query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
29ee26098e3949dd315f5c171c0f7f58
Function to close sweetalert
[ { "docid": "ab1138767b8f8ead84d41f065a6d24e3", "score": "0.84534067", "text": "function closesweetAlert(){\n\tsweetAlert.style.display ='none';\n}", "title": "" } ]
[ { "docid": "bdf34a31b4e4789209b78c055a550e42", "score": "0.81626016", "text": "function dialog_close(){\n\tswal.close();\n}", "title": "" }, { "docid": "658422962f5d9785edba24a9d69c4b04", "score": "0.75719047", "text": "function closeAlert() {\n window.alertPanel({ status: false });\n }", "title": "" }, { "docid": "e41e9ea407c7e26e732f6d46dfd28428", "score": "0.74399763", "text": "function _close() {\n _$body.find('.alert-dismissible').slideUp('slow', function() {\n _$body.find('.msg', this).text('');\n });\n }", "title": "" }, { "docid": "53ec452bb43229fbbc8d23458261d3db", "score": "0.7377938", "text": "function cerrarVentanaCarga(){\n $('.fb').hide();\n $('.fbback').hide();\n $('body').css('overflow','auto');\n var consecutivo_inspeccion = $(\"#text_consecutivo\").val();\n swal({\n title: 'TODO SALIO BIEN!',\n type: 'success',\n html: 'Se modifico la inspección Nº. ' + consecutivo_inspeccion,\n showCloseButton: false,\n showCancelButton: false,\n confirmButtonText: '<i class=\"fa fa-thumbs-up\"></i> oK',\n allowOutsideClick: false\n }).then(function () {\n window.location='../visualizar_inspecciones.html';\n })\n // message = 'Todo salio bien, se modifico la inspeccion Nº. ' + consecutivo_inspeccion;\n // if(navigator.notification && navigator.notification.alert){\n // navigator.notification.alert(message, null, \"Montajes & Procesos M.P SAS\", \"Aceptar\");\n // window.location='../visualizar_inspecciones.html';\n // }else{\n // alert(message);\n // window.location='../visualizar_inspecciones.html';\n // }\n}", "title": "" }, { "docid": "5f4065c0f8913a8d38e971536e6c77f5", "score": "0.7323585", "text": "function cerrarVentanaCarga(){\n $('.fb').hide();\n $('.fbback').hide();\n $('body').css('overflow','auto');\n var consecutivo_inspeccion = $(\"#text_consecutivo\").val();\n swal({\n title: 'TODO SALIO BIEN!',\n type: 'success',\n html: 'Se guardo revisión de la inspección Nº. ' + consecutivo_inspeccion,\n showCloseButton: false,\n showCancelButton: false,\n confirmButtonText: '<i class=\"fa fa-thumbs-up\"></i> oK',\n allowOutsideClick: false\n }).then(function () {\n window.location='../../index.html';\n })\n // message = 'Todo salio bien, se modifico la inspeccion Nº. ' + consecutivo_inspeccion;\n // if(navigator.notification && navigator.notification.alert){\n // navigator.notification.alert(message, null, \"Montajes & Procesos M.P SAS\", \"Aceptar\");\n // window.location='../../index.html';\n // }else{\n // alert(message);\n // window.location='../../index.html';\n // }\n}", "title": "" }, { "docid": "a14b9490eb862846f65be6b50dc54552", "score": "0.72322446", "text": "function close_message()\n{\n $('#div-alert-success, #div-alert-warning, #div-alert-danger').hide('fast');\n}", "title": "" }, { "docid": "190ee869248ac8c11a760531b88d383b", "score": "0.7083802", "text": "function closeAlert() {\n if (document.getElementById('alert_url').classList.contains('show'))\n document.getElementById('alert_url').classList.remove('show');\n}", "title": "" }, { "docid": "4efd68a41e01d8c41b16197564a5b962", "score": "0.704094", "text": "closeAlert() {\n this._onCloseClick();\n }", "title": "" }, { "docid": "c23df8accfea355e3871c12086652b6a", "score": "0.6832363", "text": "function alertClose() {\n $(\"#gone\").alert('close');\n}", "title": "" }, { "docid": "0bc2e8ac59e4ce157c7df0f71c1969fa", "score": "0.68127364", "text": "function alertaClose()\r\n\t{\r\n\tmodalWinClose();\r\n\t}", "title": "" }, { "docid": "e199e3bccb33ab39a9e4b064bbef5c67", "score": "0.678154", "text": "function closeAlert(){\n vm.errorText = '';\n }", "title": "" }, { "docid": "1c5c69d4eed832b969877504573aad6d", "score": "0.6739773", "text": "close() {\n\n\t\t\tthis.displayConfirm = false;\n\t\t}", "title": "" }, { "docid": "cf10d7794b51074f691451de8c154726", "score": "0.6728246", "text": "function cerrarTicket_Administrador(){/*Cuando el administrador desea cerrar un ticket*/\n const swalWithBootstrapButtons = Swal.mixin({\n customClass: {\n confirmButton: 'btn btn-success',\n cancelButton: 'btn btn-danger'\n },\n buttonsStyling: false\n })\n\n swalWithBootstrapButtons.fire({\n title: '¿Realmente desea cerrar el ticket?',\n text: \"\",\n type: 'warning',\n showCancelButton: true,\n confirmButtonText: 'Guardar',\n cancelButtonText: 'Salir',\n reverseButtons: true\n }).then((result) => {\n if (result.value) {\n swalWithBootstrapButtons.fire(\n 'Ticket finalizado!',\n 'El ticket fue finalizado correctamente!',\n 'success'\n )\n }\n })\n}", "title": "" }, { "docid": "d4042a7eb53b84049bc271a9d97bd8a2", "score": "0.6716518", "text": "function closeAlert(){\n document.getElementById(\"id_PopUp_AlertWindow\").style.display=\"none\";\n}", "title": "" }, { "docid": "2f43f68d579c5f949b1e9ea5c67e47db", "score": "0.6648984", "text": "function logout() {\n swal({\n title: \"هل انت متأكد؟\",\n text: \"تسجيل الخروج\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"نعم, قم بتسجيل الخروج\",\n cancelButtonText: \"الغاء\",\n closeOnConfirm: false },\n function(){\n localStorage.removeItem(\"username\");\n localStorage.removeItem(\"user_id\");\n\n\n swal(\"تسجيل الخروج\", \"تم تسجيل الخروج بنجاح\", \"success\");\n window.location=\"login.html\";\n\n\n }\n );\n}", "title": "" }, { "docid": "1905c39e340938eb1c2b2c9de6ff6912", "score": "0.6609738", "text": "handleOnAlertClose() {\n const { actions } = this.props;\n\n actions.alert.destroyAlert();\n }", "title": "" }, { "docid": "0682a556e1d8a665e6e0d0ee05c9e893", "score": "0.6593057", "text": "function cerrar_alert () {\r\n $('.alert').fadeOut('slow');\r\n}", "title": "" }, { "docid": "c6250b86fdc6c2fb2ede47cb44b65fc5", "score": "0.6591901", "text": "function sweetAlert(reply, close) {\nconst swalWithBootstrapButtons = Swal.mixin({\n customClass: {\n confirmButton: 'btn btn-success',\n cancelButton: 'btn btn-danger'\n },\n buttonsStyling: false\n})\n\nswalWithBootstrapButtons.fire({\n title: 'Congratulations',\n text: \"You won't be able to revert this!\",\n type: 'success',\n showCancelButton: true,\n confirmButtonText: 'Reply',\n cancelButtonText: 'Close',\n reverseButtons: true\n .then((result) => {\n if (result.value) {\n swalWithBootstrapButtons.fire(\n 'Game Starting!',\n 'Have Fun!',\n 'success'\n )\n\tsetTimeout(function(){\n\t\twindow.location.reload();\n\t},2000);\n } else if (\n /* Read more about handling dismissals below */\n result.dismiss === Swal.DismissReason.cancel\n ) {\n swalWithBootstrapButtons.fire(\n 'pause',\n 'Refresh the page if you want to play again.',\n 'error'\n )\n }\n})\n})\n}", "title": "" }, { "docid": "bce09bc24e66f2275abd32cc632fae09", "score": "0.658894", "text": "function showAlert(){\n Swal.fire({\n icon: 'success',\n title: '¡Muy bien!',\n text: 'Proceso exitoso',\n background: '#FFFF00',\n timer: 4000 ,\n showConfirmButton: false\n })\n}", "title": "" }, { "docid": "7cf26a25a32bb1f80652fe73d2983d1e", "score": "0.6577002", "text": "function alertClose(e) {\n if (document.body.contains(overlay)) {\n document.body.removeChild(overlay);\n }\n return false;\n }", "title": "" }, { "docid": "fe29f6bc7cbc8a3dcdb3cc531279be46", "score": "0.65586257", "text": "function AlertTimer(title, mensaje, status) {\n swal({\n title: title,\n text: mensaje,\n icon: status,\n buttons: false,\n timer: 1500\n });\n\n $(\"body\").removeClass(\"modal-open\");\n}", "title": "" }, { "docid": "8b91166135129de5c3827873ce35bf0d", "score": "0.6467505", "text": "close() {\n this.$emit(this.$thisvui.events.action.notConfirmed);\n this.showConfirmModal = false;\n }", "title": "" }, { "docid": "8a24df2d4b7695a780567abf02329ab9", "score": "0.6421175", "text": "close() {\n this.dismiss();\n\n if (this.onClose) {\n this.onClose();\n }\n }", "title": "" }, { "docid": "e4f9f9e5c7c30bfadf43abf4c64bf4fc", "score": "0.6413584", "text": "function closeMessage() {\n this.removeEventListener(\"click\", closeMessage);\n var alert = this.parentNode;\n alert.parentNode.removeChild(alert);\n }", "title": "" }, { "docid": "7c4ecd1fa12d49da2134a572682ef88d", "score": "0.6410996", "text": "function fechaSwalProd(){\n\tif($('#box-inc-produto').hasClass('active') ){\n swal.close();\n }else{\n setTimeout(function(){\n fechaSwalProd();\n },400);\n }\n}", "title": "" }, { "docid": "f053207a4edafb235c8627c5424707dc", "score": "0.640371", "text": "function endGame(msg) {\n allowClick = false;\n //alert(msg);\n Swal.fire(msg)\n}", "title": "" }, { "docid": "bf27ee73502ca8921692d04fbe6ed280", "score": "0.6403143", "text": "function closeToast(selector){\n document.querySelector(selector).close();\n}", "title": "" }, { "docid": "32227dad1ea720bfdfdd3c30d2b41295", "score": "0.64020175", "text": "function closePopup() {\n popupResult.style.display = 'none';\n }", "title": "" }, { "docid": "b2c98364f3f7ccd209e16af5c64bf3a9", "score": "0.63931835", "text": "function alertDismissed() {}", "title": "" }, { "docid": "426066119e4b80ef3d24807519bc0327", "score": "0.6386413", "text": "function modalDeleteSuccess(){\n swal({\n title: 'Delete successfully!',\n text: '',\n type: 'success',\n timer: 1500,\n allowOutsideClick: false,\n showConfirmButton: false\n });\n}", "title": "" }, { "docid": "4e78e845c971c159402b6a8f3844b377", "score": "0.63607097", "text": "function hideAlerts() {\n $('.alert.in').alert('close');\n }", "title": "" }, { "docid": "6a8f1a55c5c58c27195e8a5225bb5e5f", "score": "0.6353303", "text": "function cerrarVentanaEmergente() {\n $.fancybox.close();\n}", "title": "" }, { "docid": "b333a45e4a7255e6c41a5872c1352187", "score": "0.633823", "text": "closeWithAction() {\n this.dismissWithAction();\n }", "title": "" }, { "docid": "d59b59fe7447f6ed419ae85370a6ec5a", "score": "0.6327799", "text": "function cancelBtnClickEvent() {\n// show sweetaleart \n swal({\n title: \"Are you sure!\",\n text: \"Do you want to cancel adding the opportunity?\",\n icon: \"warning\",\n dangerMode: true,\n buttons: [\"No\", \"Yes\"]\n }).then((value) => {\n // if value=true > confirm cancle registration > move to adverted-scholarships\n if (value) {\n $(location).attr({\"href\": \"adverted-scholarships.html\"});\n }\n });\n}", "title": "" }, { "docid": "a30a5826471669d26eb7ccbb8325a1fd", "score": "0.6307821", "text": "function showBasicMessage1() {\n swal({\n title: 'The time Finshed',\n text: 'quiz time',\n showCancelButton: false,\n showConfirmButton: false\n });\n}", "title": "" }, { "docid": "2dbe3e2b60bd1e056b784b91b35f95e7", "score": "0.62873805", "text": "function cerrarVentana(){\n //se cierrar la ventana hijo\n window.close();\n}", "title": "" }, { "docid": "c10b14aff1e332cbff8d35805ec926d1", "score": "0.6287079", "text": "dismiss() {\n this.snackBar.dismiss();\n }", "title": "" }, { "docid": "a29c1f4e702f76f3fa79c7b6766ef0bb", "score": "0.6286748", "text": "function opensweetAlert(){\n\t\n\tsweetAlert.style.display ='block';\n\n\t\n}", "title": "" }, { "docid": "3d06aa4616ac36f5115b8e383c0d2013", "score": "0.6280945", "text": "function x_alert(){\n $('.modal_close').click();\n}", "title": "" }, { "docid": "e2fe2b50589817df1c6488a1f616150d", "score": "0.62741935", "text": "function closeAlert() {\n document.querySelector(\".closebtn\").parentElement.style.display = \"none\"\n}", "title": "" }, { "docid": "acc3be813ffb0181cd6fae2403f302fd", "score": "0.6274103", "text": "function dismissModalMonthlyReportEdit() {\n $.magnificPopup.close();\n}", "title": "" }, { "docid": "d2a1e3440b37ff95c2d60d030f0c15e5", "score": "0.62679344", "text": "closeMessage(){\n\n const $self = this;\n $self._module.style.display = 'none';\n }", "title": "" }, { "docid": "e18dadb790819922afd16a80b7ed7805", "score": "0.626133", "text": "function dismissAlertAfterTime(timespan) {\n $('.alert').each(function(i, e) {\n if($(e).find('.close').length > 0) setTimeout(function() {\n $(e).alert('close');\n }, timespan);\n });\n}", "title": "" }, { "docid": "e66f639f986806db89b6e90206d8952f", "score": "0.62581646", "text": "function deleteconfirm(title,text,location)\n{\n swal({\n title: title,\n text: text,\n type: \"warning\",\n showCancelButton: true,\n confirmButtonText: \"OK\",\n closeOnConfirm: false,\n confirmButtonColor: \"#DD6B55\"\n },\n function(){\n window.location = location\n });\n}", "title": "" }, { "docid": "c1d35b72ef4189c75d2e865cf4f12c2c", "score": "0.62465376", "text": "handleClose() {\n this.showConfirm = false;\n }", "title": "" }, { "docid": "65a03d723c1c7c05598918f9b0e91465", "score": "0.6244551", "text": "function alertDeleteSucess() {\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle : \"\",\n\t\t\t\t\t\t\ttext : \"Delete successfully.\",\n\t\t\t\t\t\t\ttype : \"success\",\n\t\t\t\t\t\t\ttimer : alertDuration,\n\t\t\t\t\t\t\tshowConfirmButton : false\n\t\t\t\t\t\t});\n\t\t\t\t\t}", "title": "" }, { "docid": "4101ab94b295fb9a2436eb002f1bc869", "score": "0.624242", "text": "handleClose(e) {\n this.setState({ alertShow: false });\n }", "title": "" }, { "docid": "27541a027ba9aa26c0852e96f7e78a45", "score": "0.62337005", "text": "close() {\n let toastOptions = {\n duration: 10000,\n button: {\n text: 'LOG',\n action: () => console.log(this.msg)\n }\n }\n this.nmdDialog.close('message')\n this.nmdToast.show('Message closed!', toastOptions)\n }", "title": "" }, { "docid": "67131df14987d4c62a371618888d54ae", "score": "0.6232869", "text": "function onAlertClose(context) {\n\t$('.alert').on('close.bs.alert', function () {\n\t\tlet _target = $(this).data('alert-id');\n\t\t$(_target).removeValidationText(context);\n\t});\n}", "title": "" }, { "docid": "1709a4ae654360218cb48ae802a7f704", "score": "0.6230746", "text": "function close(open){\r\n\t\t\tself.confirm_title = open;\r\n\t\t\tself.confirm_type = BootstrapDialog.TYPE_WARNING;\r\n\t\t\tself.confirm_msg = self.confirm_title + ' without Saving Data?';\r\n\t\t\tself.confirm_btnclass = 'btn-warning';\r\n\t\t\tConfirmDialogService.confirmBox(self.confirm_title, self.confirm_type, self.confirm_msg, self.confirm_btnclass)\r\n\t\t\t\t.then(\r\n\t\t\t\t\t\tfunction (res) {\r\n\t\t\t\t\t\t\tfetchAllServices();\r\n\t\t\t\t\t\t self.save = \"saveclose\";\r\n\t\t\t\t\t\t\treset();\r\n\t\t\t\t\t\t\tnewOrClose();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t );\r\n\t\t}", "title": "" }, { "docid": "b55e9864af939e2774e308d1fc24133f", "score": "0.622778", "text": "function closeModal(){\n modal.style.display = 'none';\n// showAweberSuccess();//for testing only - after need to comment\n}", "title": "" }, { "docid": "8e5954025de354e5aae34f05c405da15", "score": "0.62170327", "text": "function closeModal(){\n\t\t$(this).foundation('reveal', 'close');\n\t}", "title": "" }, { "docid": "6c0b719ffb75673c9ab15b71c1831040", "score": "0.62153155", "text": "closePopUp() {\n const wrapper = this.shadowRoot.getElementById('reset-confirm-popup');\n wrapper.style.display = 'none';\n }", "title": "" }, { "docid": "05b648fac309f5ff38374655e06190c7", "score": "0.62123275", "text": "function cerrarmodal(){\n\tvar span = document.getElementsByClassName(\"close\")[0];\n\tvar modal = document.getElementById('myModal');\n \tmodal.style.display = \"none\";\n}", "title": "" }, { "docid": "cc252465b699df81fb484c4351e06d6c", "score": "0.6206111", "text": "function swalDeletePopup(_this) {\n swal({\n title: _this.data('title') ? _this.data('title') : \"Are you sure ?\",\n text: _this.data('text') ? _this.data('text') : \"\",\n type: _this.data('type') ? _this.data('type') : \"warning\",\n showCancelButton: true,\n confirmButtonClass: _this.data('confirm_button_class') ? _this.data('confirm_button_class') : \"btn-danger\",\n confirmButtonText: _this.data('confirm_button_text') ? _this.data('confirm_button_text') : \"Yes!\",\n closeOnConfirm: false,\n },\n function() {\n const isLink = !!_this.is('a');\n if (isLink) {\n window.location.href = $(_this).attr('href');\n } else {\n let form;\n if (form = _this.data('form')) {\n let formAction = $(_this).data('action');\n let element = $('#' + form);\n if (formAction) {\n element.attr('action', formAction);\n }\n element.submit();\n }\n _this.closest('form').submit();\n }\n }\n );\n}", "title": "" }, { "docid": "215c05daeaa308275618fcc475b86274", "score": "0.619512", "text": "function spanClose() {\n modal.style.display = \"none\";\n}", "title": "" }, { "docid": "9533b33b181e8b6ab7bdd1f5a97af3ba", "score": "0.6175431", "text": "function showAlert(msg,type,confirm_btn_txt)\n {\n \n swal({\n title: \"\",\n text: msg,\n type: type,\n buttons: [\"sdfsf\"]\n });\n return false; \n }", "title": "" }, { "docid": "ae3fd5a6060d99b96504d8faf78686f9", "score": "0.6155975", "text": "closeAlert() {\n this.props.isOpenAlert(false);\n }", "title": "" }, { "docid": "5d963f8d919a1ba05032c70b34f14d34", "score": "0.61529744", "text": "function close(){window.close();}", "title": "" }, { "docid": "3a78ba8bc8f1370e0421b80060cfe9c5", "score": "0.61453086", "text": "showAlert() {\n swal(\"Error\", \"Hay datos requeridos vacios\", \"error\");\n }", "title": "" }, { "docid": "473f529fd17bed3364a811fc2c0f95a1", "score": "0.61418796", "text": "function closeWindow(){\n document.getElementById('popUp').style.display='none';\n}", "title": "" }, { "docid": "d7a87d3f5b29858b370ad6b10f3c7fc7", "score": "0.6135836", "text": "handlerCloseAlert(alertTitle) {\n // identify the alert name based on received alert title\n let alertName = (alertTitle.indexOf('Tips') >= 0 ? this.alertTips : this.alertWhatIs)\n localStorage.setItem(alertName, 'false')\n }", "title": "" }, { "docid": "fd8b24a05d833b700226f16bcaff1cc9", "score": "0.6132607", "text": "function autoclose_alert(selector,duration){\n $(selector).fadeTo(duration, 0.5, function(){\n $(selector).alert('close');\n });\n}", "title": "" }, { "docid": "7394bbdec211fac86a2a5b969f1f2a72", "score": "0.6122612", "text": "handleOnErrorAlertClose() {\n const { actions } = this.props;\n\n actions.errorHandler.destroyError();\n actions.alert.destroyAlert();\n }", "title": "" }, { "docid": "931ca6c4b28551f50af7caa2304fb5a6", "score": "0.61144274", "text": "function spanClose(){\n popup.classList.remove(\"show-popup\") // Remove class \"show-popup\", reverting back to display none.\n }", "title": "" }, { "docid": "f0abd8071f2da1ee46a510946824048e", "score": "0.6113292", "text": "function closeGenerateWSNs() {\r\n document.getElementById(\"generateWSNsModal\").style.display=\"none\";\r\n}", "title": "" }, { "docid": "c6d4050715badaf9d26f8fba79095908", "score": "0.60912997", "text": "onAlertClose () {\n this.setState({showAlert: false});\n }", "title": "" }, { "docid": "7f4e131c630b2c1c068b62e6bf580b5e", "score": "0.60889894", "text": "function alert () {\n\t\t\t\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: 'Not Allowed!',\n\t\t\t\t\t\t\t\t\t\t\t\ttext: \"The current vacation balance for this Employee is not enough to accept this request!\",\n\t\t\t\t\t\t\t\t\t\t\t\ticon: 'warning',\t\n\t\t\t\t\t\t\t\t\t\t\t\tdangerMode: true,\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "08454f13c82c88a6923efef32e243208", "score": "0.60837567", "text": "action() {\n this.snackBarRef.dismissWithAction();\n }", "title": "" }, { "docid": "08454f13c82c88a6923efef32e243208", "score": "0.60837567", "text": "action() {\n this.snackBarRef.dismissWithAction();\n }", "title": "" }, { "docid": "97fd603c7e1115572a1a5bb45331c2af", "score": "0.60807294", "text": "function alerta_cerrar() {\n $(\"#alert_sys\").hide();\n}", "title": "" }, { "docid": "3c75ffd7679084e08e9e56f8aab2b43e", "score": "0.608032", "text": "close() {\n var popup = this.getChildControl(\"popup\", true);\n if (popup && popup.isVisible()) {\n popup.hide();\n }\n }", "title": "" }, { "docid": "4aff96ffa0e0a503abc4654015c31436", "score": "0.60708994", "text": "function close(){\n document.getElementById('popup').style.display='none';\n}", "title": "" }, { "docid": "ff1a8c76bd540fc04e9a3b3644a4962f", "score": "0.60693085", "text": "function btn_msgn1() {\n swal.fire({\n icon: \"warning\" ,\n padding: \"25px\",\n width: \"60%\",\n position: \"center\",\n title: \" Alerta !\",\n text: \"Usted a Ejecutado una accion\",\n html:\n \"<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris arcu enim, fringilla non suscipit v </p>\",\n background: \"azure\",\n \n backdrop: true,\n allowOutsideClick: false,\n allowEscape: false,\n allowEnterKey: false,\n });\n\n}", "title": "" }, { "docid": "1fab7f3416ebb336161a1b13ce435356", "score": "0.60657823", "text": "function alertDismissed()\r\n{\r\n}//end of alertDismissed()", "title": "" }, { "docid": "1fab7f3416ebb336161a1b13ce435356", "score": "0.60657823", "text": "function alertDismissed()\r\n{\r\n}//end of alertDismissed()", "title": "" }, { "docid": "75d67f7b2d2d81d69e6f0ca9936a742d", "score": "0.6061015", "text": "function alert_ok(bigtext, smalltext) {\n\tswal(bigtext, smalltext, 'success');\n}", "title": "" }, { "docid": "6c5e766ef10d172c359e6cb2a68888c5", "score": "0.60584617", "text": "function closeTopFive() {\n $(\"#topFiveWindow\").fadeOut(400, function(){\n $(\"#top-post\").hide();\n $(\"#panel-1\").show();\n });\n $(\"#popUpVeil\").fadeOut();\n}", "title": "" }, { "docid": "2e9483f922bfa310f64b786f445f2129", "score": "0.60559523", "text": "close() {\n this._qs(\"#close-popup\").addEventListener(\"click\", () => {\n this.exitDock();\n });\n }", "title": "" }, { "docid": "e634327600110464900f6bc7ea94b003", "score": "0.60531604", "text": "function closing(){\n modal.style.display = \"none\";\n \n $(Info_Open).css(\"display\",\"none\");\n }", "title": "" }, { "docid": "f7c5ff56f4bd29749829b082c375715b", "score": "0.6044376", "text": "function sweetalert(tipo,mensaje){\n switch(tipo){\n case \"error\":\n Swal.fire({\n title: 'Error!',\n text: mensaje,\n icon: 'error',\n confirmButtonText: 'Reintentar'\n })\n \n break;\n case \"succes\":\n Swal.fire({\n position: 'center',\n icon: 'success',\n title: mensaje,\n showConfirmButton: false,\n timer: 1500\n })\n break;\n\n }\n }", "title": "" }, { "docid": "013760319daa0df485379dd09de60988", "score": "0.604419", "text": "function bClose(page) {\n page.bPopup().close();\n}", "title": "" }, { "docid": "f3043a2b0de8982d2604a6f654b9bf4c", "score": "0.6038163", "text": "function closePopUp() {\n $(\".modal\").modal(\"hide\");\n }", "title": "" }, { "docid": "908f67ba9be63205783ffb30d7206a72", "score": "0.6032186", "text": "function hide(){\n\t$('#alert').hide()\n}", "title": "" }, { "docid": "702fbd0b1c30d96d53f3dca7269ad126", "score": "0.6028203", "text": "confirm() {\n osWindow.close(this.element);\n }", "title": "" }, { "docid": "4397b06fa6d35b030507f971c238b502", "score": "0.6027465", "text": "logout() {\r\n swal({\r\n title: \"Are you sure want to Logout?\",\r\n icon: \"warning\",\r\n buttons: true,\r\n dangerMode: true,\r\n })\r\n .then((willDelete) => {\r\n\r\n if (willDelete) {\r\n this.setState({\r\n isUser: false\r\n })\r\n swal(\"Logout!\", {\r\n icon: \"success\",\r\n });\r\n } else {\r\n swal(\"Welcome!\");\r\n }\r\n });\r\n }", "title": "" }, { "docid": "e0beb944e90e492a4b6ac542c37f7d2d", "score": "0.6021988", "text": "function winAlerts() {\n $(\".alert-dark\").hide();\n $(\".alert-primary\").show();\n $(\".close\").on(\"click\", function() {\n $(\".alert-primary\").hide();\n reset();\n });\n }", "title": "" }, { "docid": "0c6f4fe2209e1780537df5fec7311030", "score": "0.6020534", "text": "function logout() {\n\tSwal.fire({\n\t\ticon: 'warning',\n\t\ttitle: 'Keluar Dari Sistem?',\n\t\tshowCancelButton: true,\n\t\tcancelButtonText: 'Batal',\n\t\tconfirmButtonText: 'Keluar',\n\t\tconfirmButtonColor: '#d33',\n\t\tpreConfirm: (Login) => {\n\t\t\tfetch(\"Auth/logout/\", {\n\t\t\t\tmethod: 'POST',\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\t//static URL\n\t\t\t\twindow.location.replace(\"http://localhost/QRperpus/Auth/logout\");\n\t\t\t})\n\t\t},\n\t})\n}", "title": "" }, { "docid": "52f0c435971e536bef658c4947e95e0f", "score": "0.60147625", "text": "function logout() {\n // **************************sweet alert ****************************************************\n\n swal({\n title: \"Are you sure?\",\n tedatat: \"You LogOut from the Home page !\",\n icon: \"warning\",\n buttons: true,\n dangerMode: true,\n })\n .then((willDelete) => {\n if (willDelete) {\n swal(\"Successfully LogOut From the Home Page\", {\n icon: \"success\",\n });\n firebase.auth().signOut().then(() => {\n window.location.assign(\"./../log-in/login.html\");\n localStorage.removeItem(\"userData\")\n })\n } else {\n swal(\"You not LogOut form the Home Page !\");\n }\n });\n\n\n}", "title": "" }, { "docid": "e4374dce5fce83649ffeb01cbd3ddfc8", "score": "0.6010641", "text": "function closeNewsletterBlock() {\n Cookies.set(\"newsletter\", \"closed\", { expires: 7 });\n $(\"#newsletter-popup\").fadeOut();\n}", "title": "" }, { "docid": "bf6585fe4359b10eae3148c9a9588e8f", "score": "0.60098815", "text": "function basket_popup_close() {\r\n var popup = document.querySelector('.basket_completed_popup');\r\n\r\n popup.style.display = 'none';\r\n}", "title": "" }, { "docid": "cba5dbc9ad377054968f7e3dbca90af5", "score": "0.60059196", "text": "function closeAlert(){\n document.getElementById('acontainer').style.visibility = 'hidden';\n}", "title": "" }, { "docid": "d238cfb92fd584ea31edb69f3902d06a", "score": "0.60045487", "text": "function deleteAlert(uri, id) {\n swal({\n title: \"¿Desea eliminar el registro?\",\n text: \"Una vez eliminado no se podrá volver a recuperar\",\n icon: \"warning\",\n buttons: {\n cancel: \"Cancelar\",\n catch: {\n text: \"Eliminar\",\n value: \"catch\"\n }\n }//FIN DE BUTTONS\n })//FIN DEL SWAL\n\n .then((value) => {\n switch (value) {\n\n case \"catch\": Delete(uri, id);\n break;\n\n default:\n swal.close();\n }//FIN SWITCH\n });//FIN THEN\n}//FIN FUCTION DELETE", "title": "" }, { "docid": "c88b5fa1287d540609a2081ce8c1c51c", "score": "0.5982002", "text": "function clickedOK() {\n window.close();\n}", "title": "" }, { "docid": "941c99e166b566440594bb554657eb68", "score": "0.59801364", "text": "async function endGame(){\n play = false;\n var score1 = score != 1 ? score + \" points \" : score + \" point \"\n var minues1 = minuteI != 1 ? minuteI + \" minues and \": minuteI + \" minue and \";\n var seconds1 = sekundeI != 1 ? sekundeI + \" seconds.\": sekundeI + \" second.\"\n\n const { value: accept } = await Swal.fire({\n icon: \"error\",\n title: \"Game over\",\n html: \"You lost all your lives!<br>You scored \" + score1 + minues1 + seconds1,\n confirmButtonText:\n \"Okay\",\n toast: true\n });\n \n if (accept) {\n location.reload();\n }\n}", "title": "" }, { "docid": "cd8374c39bba0d52162787d517265e37", "score": "0.5974992", "text": "function cerrarPopUp(){\n var popup= document.getElementById(\"popupMod\");\n popup.style.display= \"none\";\n}", "title": "" }, { "docid": "978cb4b1ae72f7531d6a2e6e567917ce", "score": "0.5972373", "text": "function close() {\n modalEl.style.display = \"none\";\n}", "title": "" }, { "docid": "8b365120c13163bc5e143681ac79d071", "score": "0.5970571", "text": "_dismiss() {\n /**\n * @event snackbar-dismiss-clicked\n * Fired when dismiss icon in snackbar-display is clicked\n * detail payload: {Object} payload\n */\n const customEvent = new Event('snackbar-dismiss-clicked', { composed: true, bubbles: true });\n customEvent.detail = this.payload;\n this.dispatchEvent(customEvent);\n\n this._close();\n }", "title": "" }, { "docid": "0a0e2024be6f02822af9a12574e61306", "score": "0.5970555", "text": "function alert() {\n let confirmation = confirm('Are you sure to log out from telegram?');\n if(confirmation == true) {\n logOut()\n }\n }", "title": "" }, { "docid": "704eadc1842e3781eeb918ca05baf806", "score": "0.59692806", "text": "function closedthis() {\n $.smallBox({\n title: \"¡DGP registrada correctamente!\",\n content: \"Ya puede visualizar la informacion del DGP\",\n color: \"#739E73\",\n iconSmall: \"fa fa-check fa-2x fadeInRight animated\",\n timeout: 6000\n });\n}", "title": "" } ]
1da6728aee3ec84fb47125cd00c16ae8
Buffer the entire stream into memory.
[ { "docid": "54b0268d3b89aecd9f4fa6f6e69168d2", "score": "0.0", "text": "function concat(res, done) {\n const chunks = []\n res\n .on('data', chunk => {\n chunks.push(chunk)\n })\n .on('end', () => {\n done(Buffer.concat(chunks))\n })\n}", "title": "" } ]
[ { "docid": "66cce7e9162038025f98c0d9c5049a7f", "score": "0.70186365", "text": "function BufferStream() {\n this.chunks = [];\n this.length = 0;\n this.writable = true;\n this.readable = true;\n}", "title": "" }, { "docid": "2f6ba310c0bf6f5662a6f9aef695aef7", "score": "0.6779785", "text": "processBuffer() {\n\n clearTimeout(this._timeout);\n\n const content = this.buffer.slice();\n this.buffer = [];\n\n for (let i = 0; i < content.length; i++) {\n this.logStream.write(content[i] + \"\\n\");\n }\n }", "title": "" }, { "docid": "c6ee9fd2098e28a4d86d3e210dc2ee96", "score": "0.66111034", "text": "reuseBuffer(buffer) {\n this.incoming.push(buffer);\n if (!this.isError && this.resolveData() && !this.isStreamEnd) {\n this.readable.resume();\n }\n }", "title": "" }, { "docid": "3906d9ce2f9d0e209ea521586d16bfa7", "score": "0.65193486", "text": "function BufferStream (source) {\n if (!Buffer.isBuffer(source)) {\n throw (new Error('Source must be a buffer.'));\n }\n\n stream.Readable.call(this);\n\n this._source = source;\n this._offset = 0;\n this._length = source.length;\n this.on('end', this._destroy);\n}", "title": "" }, { "docid": "5ba29dde7357e97571b19ec01d4fa723", "score": "0.64140576", "text": "async function streamToBuffer(stream, buffer, offset, end, encoding) {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT);\n stream.on(\"readable\", () => {\n if (pos >= count) {\n clearTimeout(timeout);\n resolve();\n return;\n }\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n // How much data needed in this chunk\n const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;\n buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);\n pos += chunkLength;\n });\n stream.on(\"end\", () => {\n clearTimeout(timeout);\n if (pos < count) {\n reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`));\n }\n resolve();\n });\n stream.on(\"error\", (msg) => {\n clearTimeout(timeout);\n reject(msg);\n });\n });\n}", "title": "" }, { "docid": "7feece3d659f813c174cebdba7323004", "score": "0.63789696", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null)\n state.lastBufferedRequest = null;\n }\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "c887106599eb1ede81b10b94f448d23e", "score": "0.6337873", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "c4cbfa732b0832b9a62f13b26ccf7286", "score": "0.6337276", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "9f7d09d6143a3eb2929aa560c2d11ba1", "score": "0.6319146", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "86a18043bb5d265c1f58c863756a0b1c", "score": "0.6319057", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(\n stream,\n state,\n true,\n state.length,\n buffer,\n \"\",\n holder.finish\n );\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "9908164e01241a2208266e577ff20dbd", "score": "0.6310945", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "c45e8a66fb26cea7c9bedf9c844b8e57", "score": "0.62922096", "text": "_read(size) {\n if (this.bufferList.length === 0) {\n // null signals end of stream\n this.push(null);\n }\n else {\n let total = 0;\n while (total < size && this.bufferList.length > 0) {\n const buffer = this.bufferList[0];\n this.push(buffer);\n this.bufferList.splice(0, 1);\n total += buffer.length;\n }\n }\n }", "title": "" }, { "docid": "f9c288bf9038f005d3f761e8bf4d3550", "score": "0.626023", "text": "buffer() {\n return consumeBody.call(this);\n }", "title": "" }, { "docid": "0be3a301744f7faa226c51d041d02719", "score": "0.62559116", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "f773991e750b8417a8ecce8d051dd9f6", "score": "0.6244084", "text": "getBufferFromStream (stream) {\n return new Promise((resolve, reject) => {\n const file = []\n stream.on('data', function (chunk) {\n file.push(chunk)\n })\n stream.on('error', e => {\n reject(e)\n })\n stream.on('end', function () {\n // concatenar o array de chunks do arquivo em uma instancia de Buffer\n resolve(Buffer.concat(file))\n })\n })\n }", "title": "" }, { "docid": "bb338dc7f1b17e7edb80de75b144562e", "score": "0.623925", "text": "async function streamToBuffer(stream) {\n const bufs = [];\n stream.on('data', function(d) { bufs.push(d); });\n return new Promise((resolve) => {\n stream.on('end', function() {\n resolve(Buffer.concat(bufs));\n });\n });\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "786ad4500a860e1412e4eb57a539a88a", "score": "0.6236984", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "570da83a99a46ee8af672db984ba7470", "score": "0.62344426", "text": "function clearBuffer(stream, state) {\r\n state.bufferProcessing = true;\r\n var entry = state.bufferedRequest;\r\n\r\n if (stream._writev && entry && entry.next) {\r\n // Fast case, write everything using _writev()\r\n var l = state.bufferedRequestCount;\r\n var buffer = new Array(l);\r\n var holder = state.corkedRequestsFree;\r\n holder.entry = entry;\r\n\r\n var count = 0;\r\n var allBuffers = true;\r\n while (entry) {\r\n buffer[count] = entry;\r\n if (!entry.isBuf) allBuffers = false;\r\n entry = entry.next;\r\n count += 1;\r\n }\r\n buffer.allBuffers = allBuffers;\r\n\r\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\r\n\r\n // doWrite is almost always async, defer these to save a bit of time\r\n // as the hot path ends with doWrite\r\n state.pendingcb++;\r\n state.lastBufferedRequest = null;\r\n if (holder.next) {\r\n state.corkedRequestsFree = holder.next;\r\n holder.next = null;\r\n } else {\r\n state.corkedRequestsFree = new CorkedRequest(state);\r\n }\r\n state.bufferedRequestCount = 0;\r\n } else {\r\n // Slow case, write chunks one-by-one\r\n while (entry) {\r\n var chunk = entry.chunk;\r\n var encoding = entry.encoding;\r\n var cb = entry.callback;\r\n var len = state.objectMode ? 1 : chunk.length;\r\n\r\n doWrite(stream, state, false, len, chunk, encoding, cb);\r\n entry = entry.next;\r\n state.bufferedRequestCount--;\r\n // if we didn't call the onwrite immediately, then\r\n // it means that we need to wait until it does.\r\n // also, that means that the chunk and cb are currently\r\n // being processed, so move the buffer counter past them.\r\n if (state.writing) {\r\n break;\r\n }\r\n }\r\n\r\n if (entry === null) state.lastBufferedRequest = null;\r\n }\r\n\r\n state.bufferedRequest = entry;\r\n state.bufferProcessing = false;\r\n }", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "2a2ff7408ee682caba44dc07907f25e4", "score": "0.62331086", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "15f66d2a5515d984348b1723b884c850", "score": "0.6227606", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, \"\", holder.finish);\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }", "title": "" }, { "docid": "d748481f2a20e193112b61a3eeebd8a4", "score": "0.62215227", "text": "function bufferToStream(buffer) {\n\tconst stream = new Duplex();\n\tstream.push(buffer);\n\tstream.push(null);\n\treturn stream;\n}", "title": "" }, { "docid": "ba7a1fe06f254e9036e3ae671586b2db", "score": "0.62061316", "text": "function flushBuffer() {\n refresh(buffer);\n buffer = [];\n }", "title": "" }, { "docid": "2211db090e2f983383b96e9a4109201d", "score": "0.6197159", "text": "function clearBuffer(stream, state) {\n\t state.bufferProcessing = true;\n\t var entry = state.bufferedRequest;\n\n\t if (stream._writev && entry && entry.next) {\n\t // Fast case, write everything using _writev()\n\t var l = state.bufferedRequestCount;\n\t var buffer = new Array(l);\n\t var holder = state.corkedRequestsFree;\n\t holder.entry = entry;\n\n\t var count = 0;\n\t while (entry) {\n\t buffer[count] = entry;\n\t entry = entry.next;\n\t count += 1;\n\t }\n\n\t doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n\t // doWrite is always async, defer these to save a bit of time\n\t // as the hot path ends with doWrite\n\t state.pendingcb++;\n\t state.lastBufferedRequest = null;\n\t state.corkedRequestsFree = holder.next;\n\t holder.next = null;\n\t } else {\n\t // Slow case, write chunks one-by-one\n\t while (entry) {\n\t var chunk = entry.chunk;\n\t var encoding = entry.encoding;\n\t var cb = entry.callback;\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t doWrite(stream, state, false, len, chunk, encoding, cb);\n\t entry = entry.next;\n\t // if we didn't call the onwrite immediately, then\n\t // it means that we need to wait until it does.\n\t // also, that means that the chunk and cb are currently\n\t // being processed, so move the buffer counter past them.\n\t if (state.writing) {\n\t break;\n\t }\n\t }\n\n\t if (entry === null) state.lastBufferedRequest = null;\n\t }\n\n\t state.bufferedRequestCount = 0;\n\t state.bufferedRequest = entry;\n\t state.bufferProcessing = false;\n\t}", "title": "" }, { "docid": "2211db090e2f983383b96e9a4109201d", "score": "0.6197159", "text": "function clearBuffer(stream, state) {\n\t state.bufferProcessing = true;\n\t var entry = state.bufferedRequest;\n\n\t if (stream._writev && entry && entry.next) {\n\t // Fast case, write everything using _writev()\n\t var l = state.bufferedRequestCount;\n\t var buffer = new Array(l);\n\t var holder = state.corkedRequestsFree;\n\t holder.entry = entry;\n\n\t var count = 0;\n\t while (entry) {\n\t buffer[count] = entry;\n\t entry = entry.next;\n\t count += 1;\n\t }\n\n\t doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n\t // doWrite is always async, defer these to save a bit of time\n\t // as the hot path ends with doWrite\n\t state.pendingcb++;\n\t state.lastBufferedRequest = null;\n\t state.corkedRequestsFree = holder.next;\n\t holder.next = null;\n\t } else {\n\t // Slow case, write chunks one-by-one\n\t while (entry) {\n\t var chunk = entry.chunk;\n\t var encoding = entry.encoding;\n\t var cb = entry.callback;\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t doWrite(stream, state, false, len, chunk, encoding, cb);\n\t entry = entry.next;\n\t // if we didn't call the onwrite immediately, then\n\t // it means that we need to wait until it does.\n\t // also, that means that the chunk and cb are currently\n\t // being processed, so move the buffer counter past them.\n\t if (state.writing) {\n\t break;\n\t }\n\t }\n\n\t if (entry === null) state.lastBufferedRequest = null;\n\t }\n\n\t state.bufferedRequestCount = 0;\n\t state.bufferedRequest = entry;\n\t state.bufferProcessing = false;\n\t}", "title": "" }, { "docid": "2211db090e2f983383b96e9a4109201d", "score": "0.6197159", "text": "function clearBuffer(stream, state) {\n\t state.bufferProcessing = true;\n\t var entry = state.bufferedRequest;\n\n\t if (stream._writev && entry && entry.next) {\n\t // Fast case, write everything using _writev()\n\t var l = state.bufferedRequestCount;\n\t var buffer = new Array(l);\n\t var holder = state.corkedRequestsFree;\n\t holder.entry = entry;\n\n\t var count = 0;\n\t while (entry) {\n\t buffer[count] = entry;\n\t entry = entry.next;\n\t count += 1;\n\t }\n\n\t doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n\t // doWrite is always async, defer these to save a bit of time\n\t // as the hot path ends with doWrite\n\t state.pendingcb++;\n\t state.lastBufferedRequest = null;\n\t state.corkedRequestsFree = holder.next;\n\t holder.next = null;\n\t } else {\n\t // Slow case, write chunks one-by-one\n\t while (entry) {\n\t var chunk = entry.chunk;\n\t var encoding = entry.encoding;\n\t var cb = entry.callback;\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t doWrite(stream, state, false, len, chunk, encoding, cb);\n\t entry = entry.next;\n\t // if we didn't call the onwrite immediately, then\n\t // it means that we need to wait until it does.\n\t // also, that means that the chunk and cb are currently\n\t // being processed, so move the buffer counter past them.\n\t if (state.writing) {\n\t break;\n\t }\n\t }\n\n\t if (entry === null) state.lastBufferedRequest = null;\n\t }\n\n\t state.bufferedRequestCount = 0;\n\t state.bufferedRequest = entry;\n\t state.bufferProcessing = false;\n\t}", "title": "" }, { "docid": "2211db090e2f983383b96e9a4109201d", "score": "0.6197159", "text": "function clearBuffer(stream, state) {\n\t state.bufferProcessing = true;\n\t var entry = state.bufferedRequest;\n\n\t if (stream._writev && entry && entry.next) {\n\t // Fast case, write everything using _writev()\n\t var l = state.bufferedRequestCount;\n\t var buffer = new Array(l);\n\t var holder = state.corkedRequestsFree;\n\t holder.entry = entry;\n\n\t var count = 0;\n\t while (entry) {\n\t buffer[count] = entry;\n\t entry = entry.next;\n\t count += 1;\n\t }\n\n\t doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n\t // doWrite is always async, defer these to save a bit of time\n\t // as the hot path ends with doWrite\n\t state.pendingcb++;\n\t state.lastBufferedRequest = null;\n\t state.corkedRequestsFree = holder.next;\n\t holder.next = null;\n\t } else {\n\t // Slow case, write chunks one-by-one\n\t while (entry) {\n\t var chunk = entry.chunk;\n\t var encoding = entry.encoding;\n\t var cb = entry.callback;\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t doWrite(stream, state, false, len, chunk, encoding, cb);\n\t entry = entry.next;\n\t // if we didn't call the onwrite immediately, then\n\t // it means that we need to wait until it does.\n\t // also, that means that the chunk and cb are currently\n\t // being processed, so move the buffer counter past them.\n\t if (state.writing) {\n\t break;\n\t }\n\t }\n\n\t if (entry === null) state.lastBufferedRequest = null;\n\t }\n\n\t state.bufferedRequestCount = 0;\n\t state.bufferedRequest = entry;\n\t state.bufferProcessing = false;\n\t}", "title": "" }, { "docid": "2211db090e2f983383b96e9a4109201d", "score": "0.6197159", "text": "function clearBuffer(stream, state) {\n\t state.bufferProcessing = true;\n\t var entry = state.bufferedRequest;\n\n\t if (stream._writev && entry && entry.next) {\n\t // Fast case, write everything using _writev()\n\t var l = state.bufferedRequestCount;\n\t var buffer = new Array(l);\n\t var holder = state.corkedRequestsFree;\n\t holder.entry = entry;\n\n\t var count = 0;\n\t while (entry) {\n\t buffer[count] = entry;\n\t entry = entry.next;\n\t count += 1;\n\t }\n\n\t doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n\t // doWrite is always async, defer these to save a bit of time\n\t // as the hot path ends with doWrite\n\t state.pendingcb++;\n\t state.lastBufferedRequest = null;\n\t state.corkedRequestsFree = holder.next;\n\t holder.next = null;\n\t } else {\n\t // Slow case, write chunks one-by-one\n\t while (entry) {\n\t var chunk = entry.chunk;\n\t var encoding = entry.encoding;\n\t var cb = entry.callback;\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t doWrite(stream, state, false, len, chunk, encoding, cb);\n\t entry = entry.next;\n\t // if we didn't call the onwrite immediately, then\n\t // it means that we need to wait until it does.\n\t // also, that means that the chunk and cb are currently\n\t // being processed, so move the buffer counter past them.\n\t if (state.writing) {\n\t break;\n\t }\n\t }\n\n\t if (entry === null) state.lastBufferedRequest = null;\n\t }\n\n\t state.bufferedRequestCount = 0;\n\t state.bufferedRequest = entry;\n\t state.bufferProcessing = false;\n\t}", "title": "" }, { "docid": "2211db090e2f983383b96e9a4109201d", "score": "0.6197159", "text": "function clearBuffer(stream, state) {\n\t state.bufferProcessing = true;\n\t var entry = state.bufferedRequest;\n\n\t if (stream._writev && entry && entry.next) {\n\t // Fast case, write everything using _writev()\n\t var l = state.bufferedRequestCount;\n\t var buffer = new Array(l);\n\t var holder = state.corkedRequestsFree;\n\t holder.entry = entry;\n\n\t var count = 0;\n\t while (entry) {\n\t buffer[count] = entry;\n\t entry = entry.next;\n\t count += 1;\n\t }\n\n\t doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n\t // doWrite is always async, defer these to save a bit of time\n\t // as the hot path ends with doWrite\n\t state.pendingcb++;\n\t state.lastBufferedRequest = null;\n\t state.corkedRequestsFree = holder.next;\n\t holder.next = null;\n\t } else {\n\t // Slow case, write chunks one-by-one\n\t while (entry) {\n\t var chunk = entry.chunk;\n\t var encoding = entry.encoding;\n\t var cb = entry.callback;\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t doWrite(stream, state, false, len, chunk, encoding, cb);\n\t entry = entry.next;\n\t // if we didn't call the onwrite immediately, then\n\t // it means that we need to wait until it does.\n\t // also, that means that the chunk and cb are currently\n\t // being processed, so move the buffer counter past them.\n\t if (state.writing) {\n\t break;\n\t }\n\t }\n\n\t if (entry === null) state.lastBufferedRequest = null;\n\t }\n\n\t state.bufferedRequestCount = 0;\n\t state.bufferedRequest = entry;\n\t state.bufferProcessing = false;\n\t}", "title": "" }, { "docid": "2c0c3c1233f0d45eadc0bf8c4ebc667a", "score": "0.619398", "text": "buffer(chunk) {\n this.pendingChunks.push(chunk);\n }", "title": "" }, { "docid": "8f303cd38688fafc36935a02760fbcb0", "score": "0.6193063", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" }, { "docid": "e751470d32cc2b52ebf2afece57fbdba", "score": "0.6186676", "text": "function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}", "title": "" } ]
ccdfaf63d15c40eba3b59b17bb22bba9
Add a new row to db and get new id back; then add to array.
[ { "docid": "4c8a3ce65b8a85501af718dc24134e18", "score": "0.5972342", "text": "async function addNewRow(buy, fav, qty, itemName) {\n const newId = await dbAddNewRow(buy, fav, qty, itemName);\n const newRow = { _id: newId, buy: buy, fav: fav, qty: qty, name: itemName };\n setDataArray([...dataArray, newRow]);\n }", "title": "" } ]
[ { "docid": "f42a9303d87bbd11da1c22f370da18a6", "score": "0.6623764", "text": "handleNewRowAddition() {\n this.insertMewRecordIntoDataStore();\n }", "title": "" }, { "docid": "85e3b573818ed2abd666ba6562353273", "score": "0.64541864", "text": "function addElementWithId(array, elem) {\n\n // if no hibernate id, assign local id\n if (elem.id == null || elem.id === '') {\n // If first time adding note in session, use note array's max Note Id, else use note array's max Local Id\n if (latestNoteId == null) {\n if (array.length == 0) {\n latestNoteId = 0;\n } else {\n latestNoteId = Math.max.apply(null, array.map(function(v) {\n return v.id;\n }));\n\t\t\t\tif (latestNoteId == 0) {\n\t\t\t\t\tlatestNoteId = array.length;\n\t\t\t\t}\n }\n }\n\n elem['localId'] = ++latestNoteId;\n }\n\n array.push(elem);\n }", "title": "" }, { "docid": "37426c3888cca49b2647f7e0617bbe2e", "score": "0.62126213", "text": "function addNewRow(rowData, tableId) {\n var table = document.getElementById(tableId).getElementsByTagName('tbody')[0];\n var row = table.insertRow(-1);\n rowCount++;\n row.id = String(tableId + '_row' + rowCount);\n for (w = 0; w < rowData.length; w++) {\n cell = row.insertCell(w);\n cell.id = String(tableId + '_row' + rowCount + '_cell' + w);\n cell.innerHTML = rowData[w];\n }\n console.log(\"Row Added to\" + \" \" + tableId);\n}", "title": "" }, { "docid": "45422a220c32dde3d6a308190c67c67b", "score": "0.6052144", "text": "addRow () {\n let index = DATA.length;\n let row = createArray(DATA[0].length).map(c => DEFAULT_VALUE());\n DATA.push(row);\n\n this.updateStorage();\n Mediator.Publish(Singleton.Subscriptions.ROW_ADDED, {index, value: row});\n }", "title": "" }, { "docid": "dcbfbbf55d8309db1785061733f80bf0", "score": "0.6010883", "text": "function addUser(user){\n return db(\"users\")\n .insert(user, \"id\")\n .then(ids => {\n console.log(user)\n const [id] = ids;\n return db(\"users\") \n .where({id})\n .first();\n });\n}", "title": "" }, { "docid": "ff9664630e6a55d8fd8415164cf9de0f", "score": "0.5892958", "text": "updateUiWithNewRecord(newId) {\n const record = {\n _id: newId,\n year: '2000',\n month: '1',\n kwh: '0',\n bill: '0',\n savings: '0'\n };\n let updatedData = update(this.state.tableData, {$splice: [[0, 0, record]]});\n this.setState({tableData: updatedData});\n\n console.log('inserted: ' + newId);\n }", "title": "" }, { "docid": "ddc71dc4841cec12a09ad9e373e187f5", "score": "0.58511996", "text": "async add(data) {\n if (this.get(data.id).length !== 0) {\n if (data.data != this.get(data.id).data) {\n await this.db.put(data)\n } else {\n }\n } else {\n await this.db.put(data)\n }\n }", "title": "" }, { "docid": "e78b946bf0ff167ee2b7c44268d85310", "score": "0.58390933", "text": "function insertOne(data, successCallback) {\n\tvar transaction = db.transaction([currObjectStoreName], IDBTransaction.READ_WRITE || 'readwrite'),\n\t\tobjectStore, request, lastID;\n\t\n\tobjectStore = transaction.objectStore(currObjectStoreName);\n\trequest = objectStore.add(data);\n\trequest.onsuccess = function(event) {\n\t\tlastID = event.target.result;\n\t}\n\trequest.onerror = indexedDBError;\n\t\n\ttransaction.onerror = indexedDBError;\n\n\ttransaction.oncomplete = function(event) {\n\t\tconsole.log('Data was inserted succesfully');\n\t\tif(successCallback) {\n\t\t\tsuccessCallback(lastID);\n\t\t}\n\t};\n}", "title": "" }, { "docid": "5ecfdd5b1b205f035dada61638984edc", "score": "0.58334446", "text": "add(table, id, obj) {}", "title": "" }, { "docid": "a1acae0223a550d2d339cb31502678c1", "score": "0.5784366", "text": "onAfterInsertRow(row) {\n axios.post(this.state.url+\"saveGenderEntry\",row).then(\n alert('The new row id is:\\n ' + row.passengerId)\n )\n }", "title": "" }, { "docid": "174266b0a780a1a89104f36f50db3d3b", "score": "0.5703396", "text": "function _createRequest(newRequest) {\n const i = (newRequest.id) - 1;\n requestsTable.push(newRequest);\n\n // Modify Table at database.json\n updateDatabase();\n\n return i; // db record inserted successfully if i > 0\n}", "title": "" }, { "docid": "bd389243b912e32c31302d23e6f791a8", "score": "0.56675285", "text": "function add(data) {\n var reqParams = {\n hostname: httpParams.hostname,\n port: httpParams.port,\n path: httpParams.index,\n method: 'POST'\n };\n\n req = http.request(reqParams, function(res) {\n //console.log('STATUS: ' + res.statusCode);\n //console.log('HEADERS: ' + JSON.stringify(res.headers));\n res.setEncoding('utf8');\n\n res.on('data', function(_d) {\n data.id = JSON.parse(_d)._id;\n });\n\n res.on('end', function() {\n save(data);\n count();\n });\n \n });\n\n req.write(JSON.stringify(data));\n req.end();\n}", "title": "" }, { "docid": "6b11b7f618698bfb819f30a1bce094c8", "score": "0.5653285", "text": "function add(item) {\n return db(\"entertainment\")\n .insert({ ...item })\n .returning(\"id\");\n}", "title": "" }, { "docid": "dd250b90adb1916ef1b17dd2f37dbe68", "score": "0.56254524", "text": "add(type, id) {\n let key = this.getKey(type)\n // First see if item is already present\n let itemExists = this.getItem(type, id)\n\n if (!itemExists) {\n this.items[key].push(id)\n }\n\n this.update();\n }", "title": "" }, { "docid": "972ba1c820cd00cab42229f4df88f99e", "score": "0.5610056", "text": "add(record) {\n if (!this.multiple) {\n this.values = {};\n }\n const key = record && record.id;\n if (key) {\n if (!this.values[key]) {\n this.values[key] = record;\n } else {\n delete this.values[key];\n }\n } else {\n throw \"Invalid record with no <id>.\";\n }\n }", "title": "" }, { "docid": "c74f04cfd85aa83a05bf93571a24f372", "score": "0.5588862", "text": "addRow() {\n if (this['params']) {\n this['params'] = this['params'].concat([{\n 'id': this.nextId_++,\n 'field': '',\n 'value': ''\n }]);\n }\n }", "title": "" }, { "docid": "f4c99f398aaa07de89933353094fa0db", "score": "0.558689", "text": "addRow(rowData) {\n let currentItemKeys = Object.keys(this.itemsOnCurrentPage);\n let mustAddRow = true;\n currentItemKeys.forEach(function (key) {\n if (this.itemsOnCurrentPage[key][\"Id\"] === rowData[\"Id\"]) {\n mustAddRow = false;\n }\n }.bind(this));\n if (!mustAddRow) {\n return;\n }\n this.itemsOnCurrentPage.push(rowData);\n\n getComponentElementById(this, \"DataList\").append(this.getRowHtml(rowData));\n }", "title": "" }, { "docid": "e62643f1932697004b271fa665d12425", "score": "0.55703187", "text": "function appendRow(row)\n {\n var that = this;\n\n function exists(item)\n {\n return that.identifier && item[that.identifier] === row[that.identifier];\n }\n\n if (!this.rows.contains(exists))\n {\n this.rows.push(row);\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "abab4882af279d535421a18ffefbed2c", "score": "0.55494684", "text": "function addRefRow() {\n\n\t\t\tif (vm.apiDomain.refAssocs == undefined) {\n\t\t\t\tvm.apiDomain.refAssocs = [];\n\t\t\t}\n\n\t\t\tvar i = vm.apiDomain.refAssocs.length;\n var refAssocTypeKey = \"1026\";\n var allowOnlyOne = 1;\n\n if (i > 0) {\n refAssocTypeKey = \"1027\";\n allowOnlyOne = 0;\n }\n\n var newRefRow = {\n \"processStatus\": \"c\",\n \"assocKey\": \"\",\n \"objectKey\": vm.apiDomain.antibodyKey,\n \"mgiTypeKey\": \"6\",\n \"refAssocTypeKey\": refAssocTypeKey,\n \"refAssocType\": \"\",\n \"allowOnlyOne\": allowOnlyOne,\n \"refsKey\": \"\",\n \"jnumid\": \"\",\n \"short_citation\": \"\",\n \"createdBy\": \"\",\n \"creation_date\": \"\",\n \"modifiedBy\": \"\",\n \"modification_date\": \"\"\n }\n vm.apiDomain.refAssocs.unshift(newRefRow);\n\n // if new Related row is being added, then set focus to new row\n if (i > 0) {\n setTimeout(function() {\n document.getElementById(\"jnumid_ref-0\").focus();\n }, (200));\n }\n\t\t}", "title": "" }, { "docid": "11139eeeca9d67167ec85463fbfb055f", "score": "0.55473244", "text": "addThought({ body }, res) {\n console.log(body);\n Thoughts.create(body)\n .then(({ _id }) => {\n return Users.findOneAndUpdate(\n { _id: body.userId },\n //$push works exactly like it would in vanilla JS and is built into mongoose\n { $push: { thoughts: _id } },\n { new: true }\n );\n })\n .then((dbUsersData) => {\n if (!dbUsersData) {\n res.status(404).json({ message: \"No user found with this id!\" });\n return;\n }\n res.json(dbUsersData);\n })\n .catch((err) => res.json(err));\n }", "title": "" }, { "docid": "8675b1365c51757f25f14f6df471a706", "score": "0.552353", "text": "function mapToDB(dataTable,inObj){\n \n var obj = _.findWhere(dataTable,inObj);\n if(!obj){\n obj = inObj;\n obj.id = obj.id || createUniqueId();\n dataTable.push(obj);\n } \n return obj.id;\n}", "title": "" }, { "docid": "fbd2d49134b4d246cd0afefc9cb1e1ee", "score": "0.5518566", "text": "async function addRefereeIDtoSeason(seasonName,refereeID){\n const DB = await makeDb();\n const result = await DB.collection(\"seasons\").findOneAndUpdate({name:seasonName},{ $push: {refereesArray: refereeID}});\n}", "title": "" }, { "docid": "1f954bac60a333ba616fe3360b5c439c", "score": "0.5504742", "text": "function add(party) {\n return db(\"parties\")\n .insert({ ...party })\n .returning('id');\n}", "title": "" }, { "docid": "d2186432937f13c8fff32628d367ec5d", "score": "0.54802114", "text": "function addRowData(id){\n var x = $(\"#rowindex\").val();\n var $tbl = $(\"#content>table\");\n var $tr = $tbl.find(\"tr\").eq(x);\n var $newtr = $tr.clone();\n var $elm = $newtr.children();\n var $dettdinp = $(\"#details tr td:nth-child(2)\").find(\"input:text\");\n if ($elm[0]){\n $elm[0].innerHTML = id;\n $dettdinp.each(function(index){\n $elm[index+1].innerHTML = $(this).val();\n });\n }\n // Add new row (cloned from original) to content table, and update product ID and row index\n $newtr.insertAfter($tr);\n $tr.removeClass('highlight');\n $(\"#details #productid\").val(id);\n $(\"#rowindex\").val(parseInt(x)+1);\n}", "title": "" }, { "docid": "2d75dbbc2cc65a8a23066f8e09fb0861", "score": "0.5459175", "text": "getNewIdAvailable() {\n var self = this;\n\n var query = Order.find().select('id').sort({id : -1}).limit(1);\n\n query.exec(function (err, orderIds) {\n if(err) {\n return self.res.status(500).json({error : err});\n } else if (orderIds.length !== 1) {\n return self.res.status(200).json({newId : 1});\n }\n return self.res.status(200).json({newId : orderIds[0].id+1});\n })\n }", "title": "" }, { "docid": "09d1340fbaf22d6e8ee51415274c03c2", "score": "0.5445068", "text": "static _fetchRestaurantByIdAndAddToDb(id, callback) {\r\n fetch(`${DBHelper.DATABASE_URL}/${id}`)\r\n .then(function(response) {\r\n return response.json();\r\n })\r\n .then(function(json) {\r\n // Put request into object store\r\n DBHelper.openDatabase().then(function(db) {\r\n const tx = db.transaction(['restaurants'], 'readwrite');\r\n const store = tx.objectStore('restaurants');\r\n store.put(json);\r\n });\r\n callback(null, json);\r\n })\r\n .catch(error => {\r\n const errorResponse = (`Request failed with error ${error}`);\r\n callback(errorResponse, null);\r\n });\r\n }", "title": "" }, { "docid": "b5c09dca0b8c43c939eefb283dc91ef5", "score": "0.5443602", "text": "function newRowLoaded() { \n\t\t// Load the new row.\n\t\tapp.showNotification(newRow);\n\t\t// If no new row to add, try again later.\n\t\tif (!newRow) return;\n \n Office.context.document.bindings.getByIdAsync(\"myTable\", function (asyncResult) { \n if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { \n var currentTable = asyncResult.value; \n var rowCount = currentTable.rowCount; \n\t\t\t\tif (nextRow == 2) {\n\t\t\t\t\treplaceRow();\n\t\t\t\t\treturn;\n\t\t\t\t}\n //app.showNotification(rowCount); \n\t\t\t\t\n\t\t\t\t// Add the new row, which is something like [\"2015-09-11T16:23:42\", 28.5, 185]\n\t\t\t\tcurrentTable.addRowsAsync([newRow], \n function (e) { \n\t\t\t\t\t\tvar json = JSON.stringify(newRow);\n if (e.status === Office.AsyncResultStatus.Failed) { \n app.showNotification(json + \" / Error\", e.error.name + \": \" + e.error.message); \n } else { \n\t\t\t\t\t app.showNotification(json + ' / OK');\n } \n });\n } \n }); \n }", "title": "" }, { "docid": "a12f2229f71e15be64fa0700e4764555", "score": "0.54171926", "text": "static addRestaurantstoIDB(jdata){\n return DBHelper.openIdb().then(db => {\n if(!db)\n return;\n const tx = db.transaction('restaurants', 'readwrite');\n const store = tx.objectStore('restaurants');\n jdata.forEach(element => store.put(element));\n return tx.complete;\n });\n }", "title": "" }, { "docid": "c6df0fc9f5b31af5625755f7642b6c34", "score": "0.5410756", "text": "function addRow() {\n\t$$(\"dataFromBackend\").add(\n\t\t{\n\t\t\ttitle: \"-----\",\n\t\t\tcontent: \"-----\",\n\t\t\tplace: \"-----\"\n\t\t\t//date: \"-----\",\n\t\t\t//priority: \"-----\"\n\t\t}\n\t);\n}", "title": "" }, { "docid": "1d41e90afabd806692aed7c652c17611", "score": "0.53966194", "text": "handleNew(rec) {\n this.datatable.row.add(rec).draw()\n }", "title": "" }, { "docid": "08c7346bd0cb88df6ba45384eef436a3", "score": "0.5390581", "text": "function addRow(table, rowId) {\r\n\tconsole.log('addRow');\r\n\t\r\n\tvar row = document.getElementById(rowId+\"[0]\");\r\n\t\r\n\tvar lastId = document.getElementById(table).getElementsByTagName(\"tr\").length-3;\r\n\tvar newId = lastId+1;\r\n\t\r\n\t// Copy the element and its child nodes\r\n\tvar clone = row.cloneNode(true);\r\n\tclone.id = rowId+'['+newId+']';\r\n\tclone.style.visibility = \"visible\";\r\n\r\n\tvar els = clone.getElementsByTagName('td');\r\n\tfor (var i = 0; i < els.length; i++) {\r\n\t\tvar elId = els[i].children[0].id;\r\n\t\tvar elIdRoot = elId.split('[');\r\n\t\tvar elNewId = elIdRoot[0]+'['+newId+']';\r\n\t\tels[i].children[0].id = elNewId;\r\n\t\tels[i].children[0].setAttribute(\"name\", elNewId);\r\n\t}\r\n\r\n\t// Append the cloned element\r\n\tdocument.getElementById(table).tBodies[0].appendChild(clone);\r\n\treturn clone;\r\n}", "title": "" }, { "docid": "5b2193c073c368a725d066c3f0026266", "score": "0.53876483", "text": "addReaction({ params, body }, res) {\n console.log(\"hello\");\n Reactions.create(body)\n .then(({ _id }) => {\n return Thoughts.findOneAndUpdate(\n { _id: params.thoughtId },\n //$push works exactly like it would in vanilla JS and is built into mongoose\n { $push: { reactions: _id } },\n { new: true }\n );\n })\n .then((dbUsersData) => {\n if (!dbUsersData) {\n res.status(404).json({ message: \"No thought found with this id!\" });\n return;\n }\n res.json(dbUsersData);\n })\n .catch((err) => res.status(400).json(err));\n }", "title": "" }, { "docid": "653b9474d05c3ac6b59ef0e6635a045a", "score": "0.53859854", "text": "function addNewMapRow(){\r\n\twindow.lastMapRowAdded = createNewMapRow();\r\n\tclearFocus();\r\n\t$(\"#map_entry\")[0].appendChild(window.lastMapRowAdded);\r\n}", "title": "" }, { "docid": "bd1882d0c2b0a91ecfbcb5a0d316e188", "score": "0.5381489", "text": "function flawless_add_row ( element ) {\r\n\r\n var args = {};\r\n\r\n var auto_increment = false;\r\n var table = jQuery( element ).closest( '.ud_ui_dynamic_table' );\r\n var element_wrapper = jQuery( element ).closest( jQuery( element ).attr( 'element_wrapper' ) );\r\n var callback_function = jQuery( element ).attr( 'callback_function' ) ? jQuery( element ).attr( 'callback_function' ) : false;\r\n\r\n //* Determine if table rows are numeric */\r\n if ( jQuery( table ).attr( 'auto_increment' ) == 'true' ) {\r\n var auto_increment = true;\r\n\r\n } else if ( jQuery( table ).attr( 'use_random_row_id' ) == 'true' ) {\r\n var use_random_row_id = true;\r\n\r\n } else if ( jQuery( table ).attr( 'allow_random_slug' ) == 'true' ) {\r\n var allow_random_slug = true;\r\n\r\n }\r\n\r\n args.last_row = jQuery( '.flawless_dynamic_table_row:last', table );\r\n\r\n //* Clone last row */\r\n var added_row = jQuery( args.last_row ).clone();\r\n\r\n //* Set unique 'id's and 'for's for elements of the new row */\r\n var unique = Math.floor( Math.random() * 1000 );\r\n flawless_set_unique_ids( added_row, unique );\r\n\r\n //* Insert new row after last one */\r\n if ( element_wrapper.length ) {\r\n jQuery( added_row ).insertBefore( element_wrapper );\r\n\r\n } else {\r\n jQuery( args.last_row ).after( added_row );\r\n\r\n }\r\n\r\n //* Bind ( Set ) ColorPicker with new fields '.flawless_input_colorpicker' */\r\n flawless_bind_color_picker( added_row );\r\n\r\n // Display row just in case\r\n jQuery( added_row ).show();\r\n\r\n //* Blank out all values */\r\n jQuery( \"textarea\", added_row ).val( '' );\r\n jQuery( \"select\", added_row ).val( '' );\r\n jQuery( \"input[type=text]\", added_row ).val( '' );\r\n jQuery( \"input[type=checkbox]\", added_row ).attr( 'checked', false );\r\n\r\n //* Increment name value automatically */\r\n if ( auto_increment ) {\r\n\r\n //* Cycle through all child elements and fix names */\r\n jQuery( 'input,select,textarea', added_row ).each( function ( element ) {\r\n var old_name = jQuery( this ).attr( 'name' );\r\n var matches = old_name.match( /\\[( \\d{1,2} )\\]/ );\r\n if ( matches ) {\r\n old_count = parseInt( matches[1] );\r\n new_count = ( old_count + 1 );\r\n }\r\n var new_name = old_name.replace( '[' + old_count + ']', '[' + new_count + ']' );\r\n //* Update to new name */\r\n jQuery( this ).attr( 'name', new_name );\r\n } );\r\n\r\n } else if ( use_random_row_id ) {\r\n\r\n //* Get the current random id of row */\r\n var random_row_id = jQuery( added_row ).attr( 'random_row_id' );\r\n var new_random_row_id = Math.floor( Math.random() * 1000 );\r\n\r\n //* Cycle through all child elements and fix names */\r\n jQuery( 'input,select,textarea', added_row ).each( function ( element ) {\r\n var old_name = jQuery( this ).attr( 'name' );\r\n var new_name = old_name.replace( '[' + random_row_id + ']', '[' + new_random_row_id + ']' );\r\n //* Update to new name */\r\n jQuery( this ).attr( 'name', new_name );\r\n } );\r\n\r\n jQuery( added_row ).attr( 'random_row_id', new_random_row_id );\r\n\r\n } else if ( allow_random_slug ) {\r\n\r\n //* Update Row names */\r\n var slug_setter = jQuery( \"input.slug_setter\", added_row );\r\n\r\n if ( slug_setter.length > 0 ) {\r\n flawless_update_row_names( slug_setter.get( 0 ), true );\r\n }\r\n\r\n }\r\n\r\n /* Unset locked status */\r\n jQuery( added_row ).removeAttr( 'lock_row' );\r\n\r\n /* Display any hidden elements are clone */\r\n jQuery( '[show_on_clone=true]', added_row ).show();\r\n\r\n /* Remove elements that do not carry over */\r\n jQuery( \"[do_not_clone=true]\", added_row ).remove();\r\n\r\n //* Unset 'new_row' attribute */\r\n jQuery( added_row ).attr( 'new_row', 'true' );\r\n\r\n //* Focus on new element */\r\n jQuery( 'input.slug_setter', added_row ).focus();\r\n\r\n //* Fire Event after Row added to the Table */\r\n jQuery( document ).trigger( 'added_dynamic_row' );\r\n\r\n /* Legacy: */\r\n added_row.trigger( 'added' );\r\n\r\n if ( callback_function ) {\r\n\r\n callback_function = window[callback_function];\r\n\r\n if ( typeof callback_function === 'function' ) {\r\n callback_function( added_row );\r\n }\r\n\r\n }\r\n\r\n return added_row;\r\n}", "title": "" }, { "docid": "d2734170d595ed1b430331ab316e8ca2", "score": "0.53725904", "text": "function getId() {\n return ++lastId;\n}", "title": "" }, { "docid": "7ea5ff320cb3e6b673d045aa43a497c0", "score": "0.53552604", "text": "insertRow() {\n fetch(baseUrl + '/record/new', {\n credentials: 'include',\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'\n }\n }).then((response) => response.text())\n .then((resronseText) => {\n this.updateUiWithNewRecord(resronseText.split(' ')[1]);\n });\n }", "title": "" }, { "docid": "9955a027550f07d1feb7214c9878a621", "score": "0.5352792", "text": "static add(name, code) {\n return db.one(`insert into Albums (name,code) values($1, $2) returning id`, [name,code])\n .then(data => {\n const u = new Album(name, code);\n return u;\n })\n}", "title": "" }, { "docid": "471afe0b2123476beb33bbf98de804cd", "score": "0.5351439", "text": "addToBookshelf(db, bookToAdd) {\n return db\n .insert(bookToAdd)\n .into('bookery_bookshelf')\n .returning('*')\n .then(rows => {\n return rows[0]\n })\n }", "title": "" }, { "docid": "aaa15ffe57183d4d8926544dc0c299da", "score": "0.53488183", "text": "insert(array,hasId) {\n\t\tif(typeof hasId==='undefined')hasId=true;\n\t\tlet valsX = [];\n\t\tlet valsV = [];\n\t\tif(hasId) { valsX.push(\"default\"); } \n\t\tlet query = \"INSERT INTO \"+this.table+\" VALUES(\";\n\t\tvar l = array.length;\n\t\tvar i;\n\t\tfor(i=0;i!=l;i++) {\n\t\t\tvalsX.push(\"$\"+(i+1));\n\t\t}\n\t\tvar v;\n\t\tfor(v of array) {\n\t\t\tvalsV.push(sanitizer.sanitize(v));\n\t\t}\n\t\tquery+= valsX.join(', ')+\");\";\n\t\tcon.query(query, valsV, function(err, result){\n\t\t\tif(err){\n\t\t\t\tconsole.log(err);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\t\n\t}", "title": "" }, { "docid": "d4ee2e595dde2a32b6babd92b45b8e6a", "score": "0.53471595", "text": "function updateOne(data, successCallback) {\n\tvar transaction = db.transaction([currObjectStoreName], IDBTransaction.READ_WRITE || 'readwrite'),\n\t\tobjectStore, request, lastID;\n\t\n\tobjectStore = transaction.objectStore(currObjectStoreName);\n\trequest = objectStore.put(data);\n\trequest.onsuccess = function(event) {\n\t\tlastID = event.target.result;\n\t}\n\trequest.onerror = indexedDBError;\n\t\n\ttransaction.onerror = indexedDBError;\n\n\ttransaction.oncomplete = function(event) {\n\t\tconsole.log('Data with ' + lastID + ' was deleted successfully');\n\t\tif(successCallback) {\n\t\t\tsuccessCallback(lastID);\n\t\t}\n\t};\n}", "title": "" }, { "docid": "50aba8833d191686cc66e40da6cabef5", "score": "0.5343627", "text": "save(post) {\n post.id = crypto.randomBytes(20).toString('hex'); // fast enough for our purpose\n this.postList.push(post);\n return 1; \n }", "title": "" }, { "docid": "48b47ac32a23506ff2306959963cd2a9", "score": "0.5339572", "text": "static setNewId(cime, nb ,id){\n\t\t\tquery.execute(conn, 'echec','insert data {:'+cime+' :'+nb+' '+id+'}',\n\t\t\t'application/sparql-results+json', {\n\t\t\t\toffset:0,\n\t\t\t\treasoning: true\n\t\t\t}).then(res =>{\n\t\t\t}).catch(e=> {console.log(e);});\t\t\n\t}", "title": "" }, { "docid": "d34187af3603a8f263064f10ea2b6fe7", "score": "0.5338248", "text": "add(row){\n\n }", "title": "" }, { "docid": "f80c49eb689950d9fc55e4e8317fa4e3", "score": "0.5333267", "text": "add (data) {\n if (data.id) {\n throw Error('adding with id provided: not implemented')\n }\n\n // Leave the body empty until it comes back from database\n const target = {} // _newlyThIng: data }\n const proxy = new Proxy(target, this.handler)\n // addAsync will fill in the id soon, but not yet\n this.addAsync(data, target, proxy)\n return proxy\n }", "title": "" }, { "docid": "120f9d0ca61026cc4df4c80f9b3da167", "score": "0.5330986", "text": "add(id) {\r\n\t\t\t//alert(id)\r\n\t\t\tvar item = this.items.find(item => item.id == id);\r\n\t\t\tif (item) {\r\n\t\t\t\titem.qty++;\r\n\t\t\t\tthis.saveToLocalStorage();\r\n\t\t\t} else {\r\n\t\t\t\t$http.get(`/rest/products/${id}`).then(resp => {\r\n\t\t\t\t\tresp.data.qty = 1;\r\n\t\t\t\t\tthis.items.push(resp.data);\r\n\t\t\t\t\tthis.saveToLocalStorage();\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\talert(\"Thêm sản phẩm vào giỏ hàng thành công\")\r\n\t\t}", "title": "" }, { "docid": "5997995b815dcd13afec2b053554abe9", "score": "0.53172755", "text": "createRow(row) {\n return new Promise((resolve, reject) => {\n row = Util_1.Util.shallowClone(row); // prevents mysql from modifying source object\n const tableName = this._tableName;\n const primaryKey = this._primaryKey;\n delete row[primaryKey];\n row = this.timestampCreatedColumn(row);\n row = this.timestampUpdatedColumn(row);\n const columnNames = TableGateway.getColumnNames(row);\n const placeholders = TableGateway.getPlaceholders(row);\n let sql = `INSERT INTO ${tableName} ( ${columnNames} ) VALUES ( ${placeholders} )`;\n const values = TableGateway.getObjectValues(row);\n sql = mysql.format(sql, values);\n let connection = null;\n this._pool.getConnection(performQuery);\n function performQuery(err, conn) {\n if (err) {\n return reject(err);\n }\n connection = conn;\n connection.query(sql, releaseConnection);\n }\n function releaseConnection(err, result) {\n connection.release();\n if (err) {\n reject(err);\n }\n else {\n if (result['insertId'] > 0) {\n row[primaryKey] = result['insertId'];\n resolve(row);\n }\n else {\n resolve(null);\n }\n }\n }\n });\n }", "title": "" }, { "docid": "083c6d98f6501e99e22b1f17c6c24ab8", "score": "0.5316504", "text": "function sendNewId(response, mysql_result)\n{\n const id = mysql_result ? mysql_result.insertId || 0 : 0;\n\n if (response)\n\t\tresponse.type('text/plain').send(200, id.toString());\n\n\treturn id;\n}", "title": "" }, { "docid": "0b6a61e1c5788b3cd13f9fbb4f5f940f", "score": "0.5312668", "text": "addWithId(key,item) {\n if (item !== null) {\n debug(\"Adding with key \" + key);\n debug(item);\n let previousResults = this.getDataFromFile();\n previousResults.push(item);\n this.overwriteFile(previousResults);\n this.savedData = previousResults;\n }\n }", "title": "" }, { "docid": "561ab321551c398bdf2d90f0f098237c", "score": "0.53100187", "text": "add() {\n return this.insert(this._aj.count);\n }", "title": "" }, { "docid": "9010e7684645d2973b4713d5a34b3124", "score": "0.530388", "text": "function saveRow(newCursor) {\n cursor = newCursor;\n pushRow(row);\n row = [];\n nextNewline = input.indexOf(newline, cursor);\n }", "title": "" }, { "docid": "d6d4f7a7581f3d995e2a60e9078b859d", "score": "0.5301509", "text": "save(book) {\n book.id = (_.isEmpty(this.bookList)) ? 1 : _.maxBy(this.bookList, 'id').id + 1;\n console.log('>>> : ' + book.id);\n this.bookList.push(book);\n return 1;\n }", "title": "" }, { "docid": "4bcf33d5652e9326b6d9441218241587", "score": "0.5295223", "text": "function expandIDList(idArray, db) {\n for (let i = 0; i < idArray.length; i++) {\n let id = idArray[i];\n idArray[i] = db[id]; // replace id with actual retreived node\n }\n }", "title": "" }, { "docid": "c35ab07a036c7bd16cac2d6ae54ce510", "score": "0.52949953", "text": "insert(item) {\n return this.arr.push(item);\n }", "title": "" }, { "docid": "21962148c0c1e58bf30e67db2397456f", "score": "0.5294333", "text": "function addUserId(result, emp_id, callback) {\n var sql = `\n UPDATE employee\n SET user_id = ${result[0].id}\n WHERE id = ${emp_id}\n RETURNING id, first_name`;\n console.log(\"Now executing SQL: \" + sql);\n db.queryDB(sql, (err, res) => {\n if (err || res == null || res.length == 0) {\n console.log(\"Error adding user_id\", err)\n callback(err, null);\n } else {\n console.log(\"Successfully added user_id\");\n callback(null, res);\n }\n })\n}", "title": "" }, { "docid": "dbd8e0516506b573da64239b322b6e49", "score": "0.5291983", "text": "updateOrAddTransaction(transaction) {\n//Checking if transaction id already exists in the pool, if exists new transaction will be replaced with the found transaction.\n let transactionWithId = this.transactions.find(t => t.id === transaction.id);\n if (transactionWithId) {\n this.transactions[this.transactions.indexOf(transactionWithId)] = transaction;\n } else {\n//else , transaction will be considered as new and pushed into transactions pool.\n this.transactions.push(transaction);\n }\n }", "title": "" }, { "docid": "bf4e76a7ea3b400a6a790b8d96e420be", "score": "0.5290952", "text": "_addPixel(gridStep) {\n\n //Generate the insert Object which contains the pixelMap and the actual timestamp and the timestamp of the previous added pixelMap\n const INSERT_DATA = { pixelMap: gridStep.pixelMap,\n timestamp: gridStep.timestamp,\n prev_timestamp: gridStep.prev_timestamp };\n\n //Generate and fulfill the transaction\n let transaction = this._db.transaction([DB_STORE], \"readwrite\");\n let objectStore = transaction.objectStore(DB_STORE);\n let request = objectStore.add(INSERT_DATA);\n\n\n //if transaction was successful\n request.onsuccess = event => {\n console.log(\"Added Pixel Data into DB\");\n };\n //if transaction was not successful\n request.onerror = event => {\n console.log(\"ERROR\");\n };\n }", "title": "" }, { "docid": "868b7a092bbd1d6d8cd52f84788b4c79", "score": "0.52870804", "text": "function insertIntoDrawNumber(drawNumbers, drawId, is_lucky_star) {\n //deferred object\n var deferred = Q.defer(),\n drawData;\n\n for (var i = 0; i < drawNumbers.length; i++) {\n drawData = {\n draw_id: drawId,\n number:drawNumbers[i],\n is_lucky_star: is_lucky_star\n };\n\n // wrap connection in function call to isolate it from changes to during async calls\n (function (drawData){\n //save to db\n connection.query('INSERT INTO draw_number SET ?', drawData, function(err, result) {\n if (err) {\n console.error('error inserting row: ' + err.stack);\n throw err;\n }\n\n console.log('> inserted into table draw_number id ' + result.insertId);\n\n // resolve promise\n deferred.resolve();\n });\n })(drawData);\n }\n\n // return promise\n return deferred.promise;\n}", "title": "" }, { "docid": "856dce54f007f0f90235965f2be87040", "score": "0.5286557", "text": "add_record_including_table_id_in_key(record, dont_index = false) {\n //console.log('add_record');\n // The record may need to make use of an incrementor.\n // Could possibly make records correspond with fields.\n // Then records could also have an ordering of fields within their keys and values.\n\n // Making the OO bulkier with fields makes sense.\n //console.log('add_record_including_table_id_in_key');\n //console.log('1) record', record);\n\n\n record[0].splice(0, 1);\n\n //console.log('2) record', record);\n\n //throw 'stop';\n\n /*\n\n\t\tvar new_record = this.new_record(record);\n\t\t//console.log('new_record', new_record);\n\t\t\n\t\tif (new_record) {\n\t\t\t// The record should not have the table id normally.\n\t\t\t// However, when we need to identify the table id it is useful.\n\t\t\t// add_records_with_table_ids.\n\n this.arr_records.push(new_record);\n this.index_record(new_record);\n\t\t\t// Then for each index, we index the record.\n\t\t} else {\n\t\t\tconsole.trace('failed to add table record');\n\t\t\tconsole.log('record', record);\n\t\t\tthrow 'stop';\n\t\t}\n\t\t// then add to the index of this table.\n\t\t//this.index_record(res);\n //console.log('res', res);\n\t\treturn new_record;\n\t\t*/\n return this.add_record(record, dont_index);\n }", "title": "" }, { "docid": "3b91ac425eb0f100b35eb81d72d4008a", "score": "0.5280354", "text": "row(row) {\n this.state.rows.push(row);\n return this;\n }", "title": "" }, { "docid": "fd5679dad8ed15a6b033fb759a7b9f62", "score": "0.52771425", "text": "save(data,cb){\nconn.query('select * from usuario where id = ?', data.id, (err, rows) => {\n\t\t\tconsole.log(`Número de registros: ${rows.length}`);\n\n\t\t\tif(!err)\n\t\t\t\treturn ( rows.length == 1 )\n\t\t\t\t\t? conn.query('update usuario SET ? where id = ?', [data, data.id], cb)\n\t\t\t\t\t: conn.query('insert into usuario SET ?', data, cb);\n\t\t});\n }", "title": "" }, { "docid": "29163ccf591b21b0c57494fec79f103c", "score": "0.5276017", "text": "function _fnOnRowAdded(data) {\n properties.fnEndProcessingMode();\n\n if (properties.fnOnNewRowPosted(data)) {\n\n var oSettings = oTable.fnSettings();\n var iColumnCount = oSettings.aoColumns.length;\n var values = new Array();\n\n $(\"input:text[rel],input:radio[rel][checked],input:hidden[rel],select[rel],textarea[rel],span.datafield[rel]\", oAddNewRowForm).each(function () {\n var rel = $(this).attr(\"rel\");\n var sCellValue = \"\";\n if (rel >= iColumnCount)\n properties.fnShowError(\"In the add form is placed input element with the name '\" + $(this).attr(\"name\") + \"' with the 'rel' attribute that must be less than a column count - \" + iColumnCount, \"add\");\n else {\n if (this.nodeName.toLowerCase() == \"select\" || this.tagName.toLowerCase() == \"select\")\n sCellValue = $(\"option:selected\", this).text();\n else if (this.nodeName.toLowerCase() == \"span\" || this.tagName.toLowerCase() == \"span\")\n sCellValue = $(this).html();\n else\n sCellValue = this.value;\n\n sCellValue = sCellValue.replace(properties.sIDToken, data);\n values[rel] = sCellValue;\n }\n });\n\n //Add values from the form into the table\n var rtn = oTable.fnAddData(values);\n var oTRAdded = oTable.fnGetNodes(rtn);\n //Apply editable plugin on the cells of the table\n _fnApplyEditable(oTRAdded);\n //add id returned by server page as an TR id attribute\n properties.fnSetRowID($(oTRAdded), data);\n //Close the dialog\n oAddNewRowForm.dialog('close');\n $(oAddNewRowForm)[0].reset();\n $(\".error\", $(oAddNewRowForm)).html(\"\");\n\n _fnSetDisplayStart();\n properties.fnOnAdded(\"success\");\n }\n }", "title": "" }, { "docid": "fadf460b9841fbd9c687595e1ea4df84", "score": "0.52755666", "text": "appendGaitRow() {\n const newRow = {\n gaitid: \"\",\n donor: \"\",\n donor_dept: \"\",\n fund_code: [],\n };\n this.setState({\n managed_data: $.extend(true, this.state.managed_data, {gaitid: [...this.state.managed_data.gaitid, newRow]})\n })\n }", "title": "" }, { "docid": "213a7aa00ba618c6565c1554ead4bc27", "score": "0.52748966", "text": "addItem() {\n let item;\n if (arguments.length === 2) {\n const id = arguments[0];\n item = arguments[1];\n if (this.items[id]) { // Won't happen if given ID is string\n throw \"ID clash: '\" + id + \"'\";\n }\n this.items[id] = item;\n return id;\n\n } else {\n item = arguments[0] || {};\n while (true) {\n const findId = this._lastUniqueId++;\n if (!this.items[findId]) {\n this.items[findId] = item;\n return findId;\n }\n }\n }\n }", "title": "" }, { "docid": "c7d20921098461763404c2cd482c778f", "score": "0.52739364", "text": "function saveRow(newCursor) {\n cursor = newCursor;\n pushRow(row);\n row = [];\n nextNewline = input.indexOf(newline, cursor);\n }", "title": "" }, { "docid": "b6808d522836c9bc9e4e1804ddaca2cd", "score": "0.52738345", "text": "async addAsync (data, target, proxy) {\n const props = []\n const dollars = []\n const values = []\n let counter = 1\n for (let key of Object.keys(data)) {\n // but let body will appear full, if you have changeNow set\n setdefault(this.newLocalValue, target, new Map()).set(key, data[key])\n\n props.push(key)\n dollars.push('$' + counter++)\n values.push(data[key])\n }\n\n const id = await this.dispenser.next()\n this.debug('id has been assigned', id)\n target.id = id\n this.proxiesById.set(id, proxy)\n this.debug('PROXIES SET id=', JSON.stringify(id), this.proxiesById)\n\n // probably not needed, but still, might be nice...\n this.debug('USING this.rowEE', this.rowEE)\n let ee = this.rowEE.get(target)\n if (ee) {\n if (this.state < CLOSING) ee.emit('id-assigned', id)\n } else {\n this.debug('no ee to get id-assigned event')\n }\n\n props.push('id')\n dollars.push('$' + counter++)\n values.push(id)\n\n const res = await this.query(\n `INSERT INTO ${this.table} (${props.join(', ')}) \n VALUES (${dollars.join(', ')}) RETURNING *`, values)\n if (res === undefined) throw Error('view closed before INSERT could run')\n this.debug('creation INSERT returned row', res.rows[0])\n\n // Whenever the NOTIFY arrives, which migth be before or\n // after this point where the INSERT returns, it will\n // ignore the event because the id is already in proxiesById.\n Object.assign(target, res.rows[0])\n\n // we could look for conflicts and warn someone... Emit\n // a 'change-refused' event or something.\n this.newLocalValue.delete(target)\n\n ee = this.rowEE.get(target)\n if (ee) {\n this.debug('emit change', {}, proxy)\n if (this.state < CLOSING) ee.emit('change', {}, proxy)\n }\n this.debug('emitting appear')\n if (this.state < CLOSING) this._ee.emit('appear', proxy)\n if (this.state < CLOSING) this._ee.emit('stable')\n }", "title": "" }, { "docid": "fcb1dee7813d601065695813af31bfb0", "score": "0.52646405", "text": "async upsert({ id, name, description, estimate, state }) {\n\t\t\tconst tasks = models.tasks;\n\t\t\tfor (let i = 0; i < tasks.length; i++) {\n\t\t\t\tif (tasks[i].id == id) {\n\t\t\t\t\tmodels.tasks[i] = { id,\tname, description, estimate, state };\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// auto-incrementing id that is synced with the frontend\n\t\t\tid = parseInt(tasks[tasks.length - 1].id) + 1;\n\t\t\tmodels.tasks.push({ id,\tname, description, estimate, state });\n\t\t\treturn id;\n\t\t}", "title": "" }, { "docid": "e17419a20574e49519e3b21f8763b3f8", "score": "0.5262292", "text": "function insertRow(tableName , values)\n{ \n\tcheckandInit();\n for(var index = 0; index < dataStoreInUtil.children.length; index++)\n {\n if(dataStoreInUtil.children[index].Table == tableName)\n {\n \tvar numberOfRows = dataStoreInUtil.children[index].records.length + 1;\n var records = dataStoreInUtil.children[index].records;\n var itemToInsert = {\"id\":(Math.floor(Math.random() * 10000000 + 1))};\n \t\tfor(var key in values)\n \t\t{\n \t\titemToInsert[key] = values[key];\n \t\t} \n records.push(itemToInsert); \n }\n } \n sessionStorage.irpt_ds = JSON.stringify(dataStoreInUtil);\n}", "title": "" }, { "docid": "8c753705aea41a54ca72b6114a933fd8", "score": "0.5262099", "text": "static insert (row) {\n var insertRow = clone(row)\n\n insertRow.payload = GitHubEvent._filterPayloadFields(\n row.payload,\n GitHubEvent._githubURLFilter\n )\n\n insertRow.payload = JSON.stringify(row.payload)\n insertRow.recorded_at = new Date(row.recorded_at * 1000)\n\n return GitHubEvent._getGitHubOrgFromPayload(row.payload)\n .then(function (githubOrgId) {\n insertRow.github_org_id = parseInt(githubOrgId)\n return GitHubEvent._getSelectQueryBuilder().insert(insertRow)\n })\n .catch(castDatabaseError)\n }", "title": "" }, { "docid": "652da8c3b56d834e98633d0af9c999f7", "score": "0.5259235", "text": "function entity_manager_create_entity() {\n _last_id += 1;\n _entity_map[_last_id] = [];\n return _last_id;\n}", "title": "" }, { "docid": "b9be0dca82ec82b33a987f0fdc6d0c5b", "score": "0.52554905", "text": "function addRow() {\n vm.request.details.push({});\n }", "title": "" }, { "docid": "7476293b9cbfa402c121e567ae11a192", "score": "0.5254921", "text": "addResource(resource){\n return db('resources').insert(resource)\n .then((id) => {\n return db('resources')\n .where({ id : id }).first();\n })\n }", "title": "" }, { "docid": "4b78ae94ce0777b2afc352872ccfe7dc", "score": "0.52512544", "text": "function addid (id, store, object) {\n // there is a potential of ID conflict but at this point it's not\n // worth worrying about. Anyway, here's how we \"handle\" the problem:\n if (exists(ids[id])) {\n delid(id); // hope it's not your star or anything!\n console.log(\"WARNING: reused ID \" + id);\n }\n ids[id] = store;\n store[id] = object;\n}", "title": "" }, { "docid": "1b0573cddb0eb1596dcf4ed91053d041", "score": "0.5249661", "text": "function storeLiveId(live_id) {\n\n var client = new pg.Client(conString);\n client.connect(function(err) {\n if (err) {\n return console.error('could not connect to postgres', err);\n }\n client.query(\"INSERT INTO TABLE live_cards (id) values (\" + live_id + \")\", function(err, result) {\n if (err) {\n return console.error('error running query', err);\n }\n console.log(result);\n //outpvut: Tue Jan 15 2013 19:12:47 GMT-600 (CST)\n client.end();\n });\n });\n}", "title": "" }, { "docid": "241eae7898d517e4f29be23d8416fae8", "score": "0.5249645", "text": "function addRow() {\n var grid = jQuery(\"#TestCaseProceduresGrid\");\n var myData = getNewRowData();\n if (grid.jqGrid('addRowData', myData[0].Id, myData[0])) {\n resetAllEditRows();\n editRow(myData[0].Id);\n }\n $(grid).find('textarea').attr(\"rows\", \"10\");\n}", "title": "" }, { "docid": "c1070335b547c69adcee23f59138c716", "score": "0.5247666", "text": "function insert(row, table) {\n knex.insert(row).into(table)\n .then(function (id) {\n //console.log(\"> DB INSERT: \" + row.id)\n })\n}", "title": "" }, { "docid": "b25fe8e522f312c670651f48969e85bc", "score": "0.52426034", "text": "save() {\n this.id = generateHash();\n const notes = getAllNotes();\n notes.push(this);\n saveAllNotes(notes);\n return true;\n }", "title": "" }, { "docid": "16704cf31b649d14a677ab7024d3cf47", "score": "0.52409166", "text": "addAnsToDB(array, Q_ID, callback){\r\n\t\t//var newForm = Form.listConstructor();\r\n\t\t//console.log(newForm);\r\n\t\tvar id = uniqueID(\"F_\");\r\n\t\tvar d = {\"F_ID\": id, \"P_ID\": this.attr[\"P_ID\"], \"Q_ID\": Q_ID, \"numQ\": array.length};\r\n\t\t//for (var i = 0; i < array.length; i++) {\r\n\t\t//\td[i] = array[i];\r\n\t\t//}\r\n\t\td[\"allAnswers\"] = JSON.stringify(array);\r\n\t\t$.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: \"includes/DB_Interface/addForm.php\",\r\n\t\t\tdata: d,\r\n\t\t\tsuccess: function(result){\r\n\t\t\t\tcallback(result);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "1ce2de2cb7d8b4e701c8475ede576602", "score": "0.5237201", "text": "async insert() {\n const { rows } = await db.query(`INSERT INTO perfume_has_tag(perfume_id, tag_id) VALUES ($1, $2) RETURNING *;`, [this.perfumeId, this.tagId]);\n this.id = rows[0].id;\n }", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "e81427b6aff8a546c00d2cbc2a3fa9e8", "score": "0.523184", "text": "function saveRow(newCursor)\n\t\t\t{\n\t\t\t\tcursor = newCursor;\n\t\t\t\tpushRow(row);\n\t\t\t\trow = [];\n\t\t\t\tnextNewline = input.indexOf(newline, cursor);\n\t\t\t}", "title": "" }, { "docid": "ee1bafa434255ca080ae593b6f39557b", "score": "0.52234215", "text": "function updateRows(){\n var count = $$('counter').getValue(); //number of rows the user wants to add to the table\n\n for(var i=0; i < count; i++){\n var obj = {id: data_points.length + 1, time_input: null, conc_input: null, conc_input2: null};\n data_points.push(obj); //add obj to data_points\n $$('input_table').add(obj); //add obj (the blank row) to the input table\n }\n //refresh the data table and close the popup window\n $$('input_table').refresh();\n $$('add_rows').close();\n }", "title": "" }, { "docid": "caf200bf268873b0b0e606ccef20d8aa", "score": "0.521807", "text": "function addUserByGithubId(GithubId){\n return db.one(\"insert into Users (GithubId) values ($1) returning id\", [GithubId])\n}", "title": "" }, { "docid": "98dbab8d548e69651a1520720717eb23", "score": "0.521624", "text": "function addToLocal(row, recordNumber) {\n if (recordNumber === undefined) recordNumber = row.id;\n\n //the column order of user added plants is verified during initial page load\n\n let arrNewPlantVal = [];\n //record new plant's values in arrNewPlantVal array\n for (let i = 0; i < arrHeaders.length; i++) {\n //for the common name (index 0), the text is inside the div inside td\n if (i === 0) {\n arrNewPlantVal.push(row.children[1].childNodes[0].textContent.toString());\n } \n else if (i === 1) {\n arrNewPlantVal.push(row.children[0].textContent.toString());\n } \n //for photo, place 0 until the functionality to upload photos is ready\n else if (i === arrHeaders.length - 1) {\n arrNewPlantVal.push(\"\");\n }\n else {\n arrNewPlantVal.push(row.children[i].textContent.toString());\n }\n }\n\n localStorage.setItem(\"aas_myGardenDb_plnt\" + recordNumber, JSON.stringify(arrNewPlantVal));\n}", "title": "" }, { "docid": "504dbd8cd174290ac137165134416dc6", "score": "0.52152", "text": "createThought({ params, body }, res) {\n Thought.create(body)\n .then(({ _id }) => {\n console.log(_id)\n return User.findOneAndUpdate(\n { _id: params.userId },\n //$push to add the thought's '_id' to the specific user we're updating\n //same as javascript, this method adds data to an array\n { $push: { thoughts: _id } },\n { new: true }\n );\n })\n .then(dbUserData => {\n if (!dbUserData) {\n res.status(404).json({ message: 'No thought found with this id!' });\n return;\n }\n res.json(dbUserData);\n })\n .catch(err => res.json(err));\n }", "title": "" }, { "docid": "88db9de16d87d90d63842071a3e61499", "score": "0.52133685", "text": "function createId(){\r\n if (fieldIdList.length === 0){\r\n var newId = Math.random();\r\n fieldIdList.push(randomId);\r\n return newId;\r\n }else{\r\n // var maxID = getMax();\r\n var lastID = fieldIdList[fieldIdList.length-1];\r\n var newId = lastID+.1;\r\n fieldIdList.push(newId);\r\n return newId;\r\n }\r\n}", "title": "" }, { "docid": "038da66acd3ff8a1ef9bb87c61018457", "score": "0.52121866", "text": "function saveDoc(row,newJson,newKey) {\n dec.updatingRow = row;\n\n var promise = saveDoc_rest(row,newJson,newKey);\n\n promise\n // did the query succeed?\n .then(function(resp) {\n var data = resp.data, status = resp.status;\n if (data.errors) {\n handleSaveFailure(newKey,data.errors);\n }\n\n dec.updatingRow = -1;\n },\n\n // ...or fail?\n function error(resp) {\n var errors = resp;\n if (resp.errors)\n errors = resp.errors;\n else if (resp.data)\n errors = resp.data;\n\n handleSaveFailure(newKey,errors);\n dec.updatingRow = -1;\n });\n\n return(promise);\n }", "title": "" }, { "docid": "b59f4413db78976810e17e2b4bd726e9", "score": "0.5211743", "text": "function addToTable( table, row ) {\n connection.query( `INSERT INTO ${ table } SET ?`, row, function( err, res ) {\n if ( err ) throw err;\n console.log( `${ res.affectedRows } new entry added to ${ table }!` );\n init();\n })\n}", "title": "" }, { "docid": "fddc1078385078ee50ebca56406ff9fd", "score": "0.5201826", "text": "function InsertValuesToDataBase(table,json) {\n var dbPromise = idb.open('DB-Restaurants');\n if (table === 'Restaurants') {\n dbPromise.then(db => {\n var tx = db.transaction(table, 'readwrite');\n tx.objectStore(table).put({\n id: json.id,\n data: {\n updated: false,\n id: json.id,\n updatedAt: json.updatedAt,\n name: json.name,\n is_favorite: json.is_favorite,\n neighborhood: json.neighborhood,\n photograph: json.photograph,\n address: json.address,\n latlng: JSON.stringify(json.latlng),\n cuisine_type: json.cuisine_type,\n operating_hours: JSON.stringify(json.operating_hours)\n }\n });\n return tx.complete;\n });\n } else {\n dbPromise.then(db => {\n var tx = db.transaction(table, 'readwrite');\n if (json instanceof Array) {\n for(var i = 0; i < json.length; i++) {\n tx.objectStore(table).put({\n id: json[i].id,\n data: {\n updated: false,\n id: json[i].id,\n restaurant_id: json[i].restaurant_id,\n name: json[i].name,\n createdAt: json[i].createdAt,\n updatedAt: json[i].updatedAt,\n rating: json[i].rating,\n comments: json[i].comments\n }\n });\n }\n } else {\n if (json.createdAt === '') { json.updated = true; }\n tx.objectStore(table).put({\n id: json.id,\n data: {\n updated: json.updated,\n id: json.id,\n restaurant_id: json.restaurant_id,\n name: json.name,\n createdAt: '',\n updatedAt: '',\n rating: json.rating,\n comments: json.comments\n }\n });\n }\n return tx.complete;\n });\n }\n}", "title": "" }, { "docid": "058806052b89cde7523e6b1263781c9b", "score": "0.5195632", "text": "function getId() {\n return ++lastId;\n }", "title": "" }, { "docid": "058806052b89cde7523e6b1263781c9b", "score": "0.5195632", "text": "function getId() {\n return ++lastId;\n }", "title": "" }, { "docid": "058806052b89cde7523e6b1263781c9b", "score": "0.5195632", "text": "function getId() {\n return ++lastId;\n }", "title": "" } ]
21d44bf39755fafda5f8d95dde475808
Funcion para mostrar los datos de un responsable modificando el dom
[ { "docid": "743ff9cdb6ea9ed89532d2ad133b1568", "score": "0.6272413", "text": "function domResponsable(pk){\n // Recogemos el ID del responsable y concatenamos la url\n var url = \"http://127.0.0.1:8000/ProyectoAPP/DetalleResponsable/\" + pk + \"/\";\n\n var div_dni = document.getElementById(\"DNI_Empleado-c\"),\n div_nombre = document.getElementById(\"Empresa-empleado-c\"),\n div_apellido = document.getElementById(\"Apellido-empleado-c\"),\n div_email = document.getElementById(\"Email-empleado-c\"),\n div_telefono = document.getElementById(\"Tel-empleado-c\");\n\n var input_dni = document.createElement(\"INPUT\");\n\n\n fetch(url)\n .then((response) => response.json())\n .then((json) => {\n\n console.log(json.nombre);\n div_dni.innerHTML = \"\";\n input_dni.type = 'text';\n input_dni.value = json.dni;\n input_dni.setAttribute(\"id\", \"DNI\");\n input_dni.setAttribute(\"readonly\", true);\n div_dni.appendChild(input_dni);\n\n div_nombre.innerHTML = \"<input type='text' readonly='true' value=\"+ json.nombre +\">\";\n\n div_apellido.innerHTML = `<input type='text' readonly='true' value='${ json.apellido }'>`;\n\n div_email.innerHTML = \"<input type='text' readonly='true' value=\"+ json.email +\">\";\n\n div_telefono.innerHTML = `<input type='number' readonly='true' value='${ json.telefono }'>`;\n\n abrir();\n\n });\n}", "title": "" } ]
[ { "docid": "354d60e2f54fb58306e1cf0c31c5e093", "score": "0.67536753", "text": "function loadDados(response){\n const res = document.querySelector('.resultado');\n res.innerHTML = response;\n}", "title": "" }, { "docid": "c943ce3c62096214e0e773fbf29dacd2", "score": "0.6561581", "text": "function rogerMudaDataBrowser(){\n\t\tvar objetos = $(\".metadata-publish-date\");\n\t\tvar divs = $(\".metadata-publish-date\").closest(\"div\");\n\t\tfor(i=0;i<objetos.length;i++){\n\t\t data = $(objetos[i]).text().replace(/^\\s+|\\s+$/g,\"\"); \n\t\t aux = data.split(\"/\");\n\t\t if($.browser.mozilla){\n\t\t\t\taux = \"<span class='mes'>\"+retornaMes(aux[1])+\"</span><span class='dia'>\"+aux[0]+\"</span>\"; \n\t\t }else{\n\t\t\t\taux = \"<span class='mes'>\"+retornaMes(aux[1])+\"</span><span class='dia'>\"+aux[0]+\"</span>\"; \n\t\t }\n\t\t $(divs[i]).html(aux); \n\t\t}\n\t}", "title": "" }, { "docid": "0e806538d17ccf696e53f8a8a81af95f", "score": "0.63996476", "text": "function pintarDatos(){\t\t\n\t\t$(\"#inscripcion\").html(inscripcion);\n\t\t$(\"#colegiatura\").html(colegiatura);\n\t\t$(\"#tramites\").html(tramites);\n\t\t$(\"#inicio_clases\").html(inicio_clases);\n\t\t$(\"#periodo\").html(periodo);\n\t\t$(\"#costos\").show(\"slow\");\n\t}", "title": "" }, { "docid": "9f1b154abe8df994a9dc703aecca7743", "score": "0.6364983", "text": "function MostrarDoctos(IDLote, Tipo){\n\t$.get(ws + \"ConsultarDoctos\",{idempresa: idempresaglobal, idlote: IDLote}, function(Response){\n\t\tvar doctos = Response;\n\t\tvar elemento;\n\t\tvar elemento1;\n\t\t\n\t\tif(doctos.length > 0){\n\t\t\t//swal(\"Exito\",\"Si hay registros\",\"success\");\n\n\t\t\t$(\"#DoctosDet tbody\").children().remove();\t\n\t\t\t$(\"#bitacora\").addClass(\"d-none\");\n \t\t$(\"#carga-movtos\").removeClass(\"d-none\");\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tif(Tipo == 3){\n\t\t\t\tdocument.getElementById(\"col3\").innerHTML = \"Folio-Serie\";\n\t\t\t\tdocument.getElementById(\"col4\").innerHTML = \"Total\";\n\t\t\t\tdocument.getElementById(\"p_info\").innerHTML = \"Tipo de Documento: Remision\";\n\t\t\t\telemento1 = \"total\";\n\t\t\t}else if(Tipo == 2){\n\t\t\t\tdocument.getElementById(\"col3\").innerHTML = \"Litros\";\n\t\t\t\tdocument.getElementById(\"col4\").innerHTML = \"Total\";\n\t\t\t\tdocument.getElementById(\"p_info\").innerHTML = \"Tipo de Documento: Consumo Diesel\";\n\t\t\t\telemento = \"campoextra1\";\n\t\t\t\telemento1 = \"total\";\n\t\t\t}else if(Tipo == 4){\n\t\t\t\tdocument.getElementById(\"col3\").innerHTML = \"Cantidad\";\n\t\t\t\tdocument.getElementById(\"col4\").innerHTML = \"Precio\";\n\t\t\t\tdocument.getElementById(\"p_info\").innerHTML = \"Tipo de Documento: Entradas de Materia Prima\";\n\t\t\t\telemento = \"campoextra1\";\n\t\t\t\telemento1 = \"total\";\n\t\t\t}else if(Tipo == 5){\n\t\t\t\tdocument.getElementById(\"col3\").innerHTML = \"Cantidad\";\n\t\t\t\tdocument.getElementById(\"col4\").innerHTML = \"Almacen\";\n\t\t\t\tdocument.getElementById(\"p_info\").innerHTML = \"Tipo de Documento: Salidas de Materia Prima\";\n\t\t\t\telemento = \"campoextra1\";\n\t\t\t\telemento1 = \"campoextra2\";\n\t\t\t}\n\n\n\n\t\t\tvar tClass = \"odd\";\n\t\t\tvar folioserie = \"\";\n\t\t\tfor (var x = 0; x < doctos.length; x++) {\n\t\t\t\tfolioserie = (Tipo == 3 ? doctos[x].folio+(doctos[x].serie == null ? \"\" : \"-\"+doctos[x].serie) : \"\");\n \t\tdocument.getElementById(\"t-Movtos\").innerHTML +=\n \t\t\"<tr id='row\"+x+\"' role='row' class='\"+tClass+\"' > \\\n\t \t\t<td class='sorting_2'> \\\n\t \t\t\t<span class='pd-l-5'>\"+doctos[x].fecha+\"</span> \\\n\t \t\t</td> \\\n\t \t\t<td> \\\n\t \t\t\t<span class='pd-l-5'>\"+doctos[x].concepto+\"</span> \\\n\t \t\t</td> \\\n\t \t\t<td class='sorting_2'> \\\n\t \t\t\t<span class='pd-l-5'>\"+(Tipo == 3 ? folioserie : doctos[x][elemento])+\"</span> \\\n\t \t\t</td> \\\n\t \t\t<td class='text-right'> \\\n\t\t\t\t\t\t<span class='pd-l-5'>\"+doctos[x][elemento1]+\"</span> \\\n\t \t\t</td> \\\n\t \t\t<td class='sorting_2'> \\\n\t\t\t\t\t\t<span class='pd-l-5'>\"+(doctos[x].estatus == 0 ? (doctos[x].error == 0 ? \"No Procesado\" : doctos[x].detalle_error) : (doctos[x].estatus == 1 ? \"Procesado.\" : (doctos[x].estatus == 2 ? \"Eliminado por el Usuario.\" : \"\")))+\"</span> \\\n\t\t\t\t\t\t<input type='hidden' id='estatus_\"+x+\"' value='\"+doctos[x].estatus+\"'> \\\n\t \t\t</td> \\\n\t \t\t<td class='wd-10'> \\\n\t \t\t\t<span class='pd-l-5'> \\\n\t\t\t\t\t\t\t<a href='#' class='btn btn-outline-primary btn-icon mg-r-5 mg-r-5' onclick='VerMovtos(\"+doctos[x].id+\",\"+Tipo+\")' title='Ver movimientos'> \\\n\t\t\t\t\t\t\t\t<div><i class='fa fa-caret-right'></i></div> \\\n\t\t\t\t\t\t\t</a> \\\n\t\t\t\t\t\t</span> \\\n\t \t\t\t<span class='pd-l-5'> \\\n\t\t\t\t\t\t\t<a href='#' class='btn btn-danger btn-icon mg-r-5 mg-r-5' id='eliminaF\"+x+\"' onclick='EliminaDocto(\"+doctos[x].id+\",\"+Tipo+\",\"+x+\");' title='Eliminar de la base de datos'> \\\n\t\t\t\t\t\t\t\t<div><i class='fa fa-trash'></i></div> \\\n\t\t\t\t\t\t\t</a> \\\n\t\t\t\t\t\t</span> \\\n\t\t\t\t\t</td> \\\n\t\t\t\t\t<td class='d-none'> \\\n\t\t\t\t\t\t<input type='hidden' id='movto\"+x+\"' value='\"+doctos[x].codigo+\"'> \\\n\t\t\t\t\t</td> \\\n\t\t\t\t</tr>\";\n\n\t\t\t\tif(tClass == \"odd\") { tClass = \"even\";\t}else{ tClass = \"odd\"; }\n\n\t\t\t}\n\n\t\t}else{\n\t\t\t$(\"#bitacora\").removeClass(\"d-none\");\n \t\t$(\"#carga-movtos\").addClass(\"d-none\");\t\t\t\n\t\t\tswal(\"Listado de Documentos\",\"Hubo un problema y no se pudo obtener los registros.\",\"error\");\n\t\t}\n\n\t}); \n}", "title": "" }, { "docid": "60e2ae7fe0260fc9f7f0acdb3da1b0b7", "score": "0.62573534", "text": "function fetchMovimientos() {\n $.ajax({\n url: 'php/informeMovimientos.php',\n type: 'GET',\n success: function(response) {\n const movimientos = JSON.parse(response);\n let template = '';\n movimientos.forEach(m => {\n template += `\n <tr>\n <td>${m.id_mov}</td>\n <td>${m.fecha}</td>\n <td>${m.componente}</td>\n <td>${m.valor}</td>\n <td>${m.estado}</td>\n </tr>\n `\n });\n $('#movimientos').html(template);\n }\n });\n }", "title": "" }, { "docid": "ce5c44375c977f027a39c10456e7fdc3", "score": "0.62272805", "text": "function MostrarMovtos(IDLote, Tipo){\n\t$.get(ws + \"ConsultarMovtosLote\",{idempresa: idempresaglobal, id: IDLote}, function(Response){\n\t\tvar movtos = Response;\n\t\tvar elemento;\n\t\tvar elemento1;\n\t\tvar elemento2;\n\t\tvar elemento3;\n\n\t\tif(movtos.length > 0){\n\t\t\t\n\t\t\t$(\"#bitacora\").addClass(\"d-none\");\n \t\t$(\"#nivelmovtos\").removeClass(\"d-none\");\n\t\t\t$(\"#NivelMovtos tbody\").children().remove();\t\n\n\n\t\t\tCabezeraMovtos(Tipo);\n\n\t\t\tif(Tipo == 3){\n\t\t\t\telemento = \"subtotal\";\n\t\t\t\telemento1 = \"descuento\";\n\t\t\t\telemento2 = \"iva\";\n\t\t\t\telemento3 = \"total\";\n\t\t\t\tclase2 = \"\";\n\t\t\t\tclase3 = \"\";\t\t\t\t\n\t\t\t}else if(Tipo == 2){\n\t\t\t\telemento = \"kilometros\";\n\t\t\t\telemento1 = \"horometro\";\n\t\t\t\telemento2 = \"unidad\";\n\t\t\t\telemento3 = \"total\";\n\t\t\t\tclase2 = \"\";\n\t\t\t\tclase3 = \"\";\n\t\t\t}else if(Tipo == 4){\n\t\t\t\telemento = \"almacen\";\n\t\t\t\telemento1 = \"unidad\";\n\t\t\t\telemento2 = \"total\";\n\t\t\t\tclase2 = \"\";\t\t\t\t\t\t\t\t\n\t\t\t\tclase3 = \"d-none\";\n\t\t\t}else if(Tipo == 5){\n\t\t\t\telemento = \"almacen\";\n\t\t\t\telemento1 = \"unidad\";\n\t\t\t\tclase2 = \"d-none\";\n\t\t\t\tclase3 = \"d-none\";\n\t\t\t}\n\n\t\t\tvar tClass = \"odd\";\n\t\t\tfor (var j = 0; j < movtos.length; j++) {\n\t\t\t\tdocument.getElementById(\"NivelMovtos\").innerHTML +=\n\t\t\t\t\t\"<tr id='rownm\"+j+\"' role='row' class='\"+tClass+\"' > \\\n\t\t \t\t<td class='sorting_2'> \\\n\t\t \t\t\t<span class='pd-l-5'>\"+movtos[j].fechamov+\"</span> \\\n\t\t \t\t</td> \\\n\t\t \t\t<td class=''> \\\n\t\t \t\t\t<span class='pd-l-5'>\"+movtos[j].producto+\"</span> \\\n\t\t \t\t</td> \\\n\t\t \t\t<td class='sorting_2'> \\\n\t\t \t\t\t<span class='pd-l-5'>\"+movtos[j].cantidad+\"</span> \\\n\t\t \t\t</td> \\\n\t\t \t\t<td class=''> \\\n\t\t \t\t\t<span class='pd-l-5'>\"+movtos[j][elemento]+\"</span> \\\n\t\t \t\t</td> \\\n\t\t \t\t<td class='sorting_2'> \\\n\t\t \t\t\t<span class='pd-l-5'>\"+movtos[j][elemento1]+\"</span> \\\n\t\t \t\t</td> \\\n\t\t \t\t<td class='\"+clase2+\"'> \\\n\t\t \t\t\t<span class='pd-l-5'>\"+movtos[j][elemento2]+\"</span> \\\n\t\t \t\t</td> \\\n\t\t \t\t<td class='sorting_2 \"+clase3+\"'> \\\n\t\t \t\t\t<span class='pd-l-5'>\"+movtos[j][elemento3]+\"</span> \\\n\t\t \t\t</td> \\\n\t\t\t\t\t </tr>\";\n\n\t\t\t\t\t if(tClass == \"odd\") { tClass = \"even\";\t}else{ tClass = \"odd\"; }\n\t\t\t}\n\n\t\t}else{\n\t\t\tswal(\"Sin Registros\",\"No hay datos\",\"error\");\n\t\t}\n\n\t}); \n}", "title": "" }, { "docid": "a7e0ef01fe1704d4190e6674b9210bd4", "score": "0.6171967", "text": "function carritoHTML() {\n \n //8- Limpiar el HTML\n limpiarHTML();\n //9- Recorre el carrito y genera el HTML\n articulosCarrito.forEach( (curso) => {\n // muestra el objeto\n console.log(curso);\n // destructuring de objetos, extrae valor y crea la variable\n const {imagen, titulo, precio, cantidad, id} = curso;\n const row = document.createElement('tr');\n row.innerHTML = `\n <td><img src=\"${imagen}\" width=\"100\"></td>\n <td>${titulo}</td>\n <td>${precio}</td>\n <td>${cantidad}</td>\n <td><a href=\"#\" class=\"borrar-curso\" data-id=\"${id}\"> x </td>\n `;\n // tiene que ser en el foreach porque puede que tengamos uno o dos\n // elementos en el carrito y queremos ir agregando todos\n // Agrega el HTML del carrito en el tbody\n contenedorCarrito.appendChild(row);\n // notar que al ir agregando y mostrando. el tbody se irá llenando pero no borra los row anteriores.\n // ¿como lo borramos?\n });\n // Agregar el carrito de compras al Storage\n sincronizarStorage();\n}", "title": "" }, { "docid": "6783e865990d0eac8a89f039fd3a400d", "score": "0.6157075", "text": "function getInfoPersoClient() {\n var client = findGetParameter('client');\n\n // Objet XMLHttpRequest.\n var xhr = getXMLHttpRequest();\n // On précise ce que l'on va faire quand on aura reçu la réponse du serveur.\n xhr.onreadystatechange = function ()\n {\n // Si l'on a tout reçu et que la requête http s'est bien passée.\n if (xhr.readyState === 4 && xhr.status === 200)\n {\n var elt = xhr.responseXML;\n\n\n // recupere les infos des balises nomU, prenomU....\n var listeNomU = elt.getElementsByTagName(\"nomU\");\n var listePrenomU = elt.getElementsByTagName(\"prenomU\");\n var listeGenreU = elt.getElementsByTagName(\"genreU\");\n var listeNaissU = elt.getElementsByTagName(\"datenaissanceU\");\n var listeStatutU = elt.getElementsByTagName(\"statutU\");\n var listeAdresseU = elt.getElementsByTagName(\"adresseU\");\n var listeProfilU = elt.getElementsByTagName(\"profilU\");\n var listeTelU = elt.getElementsByTagName(\"telU\");\n var listeMailU = elt.getElementsByTagName(\"mailU\");\n\n\n var dl = document.getElementById(\"infoPersoClient\");\n\n // affichage du libellé nom et du nom du client proprement\n var dtNom = document.createElement(\"dt\");\n dtNom.setAttribute(\"class\", \"col-sm-3\");\n dtNom.appendChild(document.createTextNode(\"Nom\"));\n var ddNom = document.createElement(\"dd\");\n var nom = document.createTextNode(listeNomU[0].childNodes[0].nodeValue);\n ddNom.append(nom);\n ddNom.setAttribute(\"class\", \"col-sm-9\");\n dl.append(dtNom);\n dl.append(ddNom);\n\n // affichage du libellé XXXX et du XXXX du client proprement\n var dtPrenom = document.createElement(\"dt\");\n dtPrenom.setAttribute(\"class\", \"col-sm-3\");\n dtPrenom.appendChild(document.createTextNode(\"Prenom\"));\n var ddPrenom = document.createElement(\"dd\");\n var Prenom = document.createTextNode(listePrenomU[0].childNodes[0].nodeValue);\n ddPrenom.append(Prenom);\n ddPrenom.setAttribute(\"class\", \"col-sm-9\");\n dl.append(dtPrenom);\n dl.append(ddPrenom);\n\n // affichage du libellé XXXX et du XXXX du client proprement\n var dtGenre = document.createElement(\"dt\");\n dtGenre.setAttribute(\"class\", \"col-sm-3\");\n dtGenre.appendChild(document.createTextNode(\"Genre\"));\n var ddGenre = document.createElement(\"dd\");\n var Genre = document.createTextNode(listeGenreU[0].childNodes[0].nodeValue);\n ddGenre.append(Genre);\n ddGenre.setAttribute(\"class\", \"col-sm-9\");\n dl.append(dtGenre);\n dl.append(ddGenre);\n\n // affichage du libellé XXXX et du XXXX du client proprement\n var dtAge = document.createElement(\"dt\");\n dtAge.setAttribute(\"class\", \"col-sm-3\");\n dtAge.appendChild(document.createTextNode(\"Naissance\"));\n var ddAge = document.createElement(\"dd\");\n var Age = document.createTextNode(listeNaissU[0].childNodes[0].nodeValue);\n ddAge.append(Age);\n ddAge.setAttribute(\"class\", \"col-sm-9\");\n dl.append(dtAge);\n dl.append(ddAge);\n\n // affichage du libellé XXXX et du XXXX du client proprement\n var dtAdresse = document.createElement(\"dt\");\n dtAdresse.setAttribute(\"class\", \"col-sm-3\");\n dtAdresse.appendChild(document.createTextNode(\"Adresse\"));\n var ddAdresse = document.createElement(\"dd\");\n var Adresse = document.createTextNode(listeAdresseU[0].childNodes[0].nodeValue);\n ddAdresse.append(Adresse);\n ddAdresse.setAttribute(\"class\", \"col-sm-9\");\n dl.append(dtAdresse);\n dl.append(ddAdresse);\n\n // affichage du libellé XXXX et du XXXX du client proprement\n var dtMail = document.createElement(\"dt\");\n dtMail.setAttribute(\"class\", \"col-sm-3\");\n dtMail.appendChild(document.createTextNode(\"Mail\"));\n var ddMail = document.createElement(\"dd\");\n var Mail = document.createTextNode(listeMailU[0].childNodes[0].nodeValue);\n ddMail.append(Mail);\n ddMail.setAttribute(\"class\", \"col-sm-9\");\n dl.append(dtMail);\n dl.append(ddMail);\n\n }\n };\n\n // var params = \"codeP = \" + code du programme ; \n xhr.open(\"GET\", \"\" + IPCONFIG + \"ServletGetOneClient?client=\" + client, true);\n xhr.send(null);\n}", "title": "" }, { "docid": "dd014a42c5b7031e6376cb4a41b52430", "score": "0.61480886", "text": "function obtenerPelicula(id) {\n $(\"#tabla_resultados\").hide();\n\n // Lanzo la petición\n const request = new XMLHttpRequest();\n request.open('GET', 'http://www.omdbapi.com/?apikey=' + api_key + '&i=' + id);\n request.send();\n\n request.onreadystatechange = (e) => {\n if (request.readyState === 4) {\n console.log('Mostrar grid');\n $(\"#grid_ficha\").show();\n const pelicula = JSON.parse(request.responseText);\n console.log(pelicula);\n $('#titulo').text(pelicula.Title);\n $('#puntuacion').text(pelicula.Ratings[0].Value);\n $('#poster').attr('src', pelicula.Poster);\n $('#director').text(pelicula.Director);\n $('#genero').text(pelicula.Genre);\n $('#actores').text(pelicula.Actors);\n $('#sinopsis').text(pelicula.Plot);\n }\n };\n}", "title": "" }, { "docid": "a2aebb58b7be14dd6b8a524e42ce5450", "score": "0.6129936", "text": "function showDataScraper() {\n\n consult_manager = new ConsultDataManager();\n\n consult_manager.initialize();\n\n consult_manager.document.toast('Timothy esta consultando los datos al servidor.', 'Data Scrapers');\n\n web_site = consult_manager.getValue(consult_manager.fields.search.web_site_id)\n\n commune = consult_manager.getValue(consult_manager.fields.search.commune_id)\n\n filters = { web_site: web_site, commune: commune, order_publish_date: 'desc' }\n\n limit = consult_manager.getValue(consult_manager.fields.search.limit)\n\n if (limit != '') {\n filters.limit = limit\n }\n\n consult_manager.showDataFromSM(\n filters = filters\n )\n\n consult_manager.document.toast('Timothy, a comenzado a filtrar los datos.', 'Data Scrapers');\n\n consult_manager.showFilterData()\n\n consult_manager.document.toast('Uff!, Datos listos.', 'Data Scrapers');\n}", "title": "" }, { "docid": "563be54c0cb5e19c1330ef455cecf6b5", "score": "0.6119633", "text": "function dibujar_resultados(datos){\n let elementos = datos.elementos;\n let resultados = datos.resultado_busqueda;\n contenedor_resultados.innerHTML=\"\";\n //--------------------------------------------------------------------------------------------------------------//\n //DIBUJAR LAS TABLAS DE LOS ELEMENTOS REFERENTES A LA BUSQUEDA CON FUNCIONES DEFINIDAS EN \"tablas-busquedas.js\" //\n //--------------------------------------------------------------------------------------------------------------//\n if(elementos==\"canciones\"){\n //LLAMAR A LA FUNCION PARA DIBUJAR LA TABLA CON LOS RESULTADOS DE LAS CANCIONES\n dibujar_tabla_canciones_busqueda(resultados);\n }\n else if(elementos==\"listas\"){ //SI LOS ELEMENTOS SON LISTAS\n //LLAMAR A LA FUNCION PARA DIBUJAR LA TABLA CON LOS RESULTADOS DE LAS LISTAS\n dibujar_tabla_listas_busqueda(resultados);\n }\n else if(elementos==\"albumes\"){\n //LLAMAR A LA FUNCION PARA DIBUJAR LA TABLA CON LOS RESULTADOS DE LOS ALBUMES\n dibujar_tabla_albumes_busqueda(resultados);\n }\n else if(elementos==\"artistas\"){\n //LLAMAR A LA FUNCION PARA DIBUJAR LA TABLA CON LOS RESULTADOS DE LOS ALBUMES\n dibujar_tabla_artistas_busqueda(resultados);\n }\n}", "title": "" }, { "docid": "83a8758199ed5a9032322ed2236f9e32", "score": "0.6117915", "text": "function carritoHtml()\n{\n\n // limpiar el html\n limpiarHtml();\n // recorre el carrito y genera el html\n\n articulosCarrito.forEach((curso)=>\n {\n // cada vez que nuestro codigo funcione intentemos mejorarlo\n // aplicando destructuring\n const {imagen,titulo,precio,cantidad}=curso;\n const row=document.createElement('tr');\n row.innerHTML=`\n <td>\n \n <img src=\"${imagen}\" width=100>\n </td>\n \n <td>\n \n ${titulo} \n \n </td>\n <td>\n \n ${precio} \n \n </td>\n <td>\n \n ${cantidad} \n \n </td>\n <td>\n <a href=\"#\" class=\"borrar-curso\" data-id=\"${curso.id}\"> X </a> \n \n </td>\n\n `\n ;\n // agregar al html cada objeto que agregamos\n contenedorCarrito.appendChild(row); \n \n \n })\n\n}", "title": "" }, { "docid": "dd464f22f277a2c911df32cedace1094", "score": "0.6085593", "text": "function getDescripcion_maquina(modelo,id_marca){\n \n /* Limpia la lista */\n $('div#listMaquina div.row').remove(); \n document.getElementById('lbl_select_maquina').innerHTML = 'Descripción';\n \n $.post('ctrlmaquina',{Action:4,Modelo:modelo,Id_marca:id_marca},function(json){\n \n var json_maquinas = $.parseJSON($.trim(json));//getMaquinas();\n \n for(i in json_maquinas){\n /* Máquinas que cumplen con la marca y el modelo seleccionados */\n\n /* Aquí debo crear los objetos: list */\n var row = document.createElement('div');\n row.setAttribute('class','row');\n row.setAttribute('data-id',json_maquinas[i].Id);\n\n var value = document.createElement('div');\n value.setAttribute('class','value');\n value.innerHTML = json_maquinas[i].Descripcion;\n\n row.appendChild(value);\n document.getElementById('listMaquina').appendChild(row);\n }\n });\n /* Reestructuración */\n $('div#listMaquina').addClass('listDescripcion');\n /* Quita las clases anteriores */\n $('div#listMaquina').removeClass('listModelo');\n}", "title": "" }, { "docid": "f1d9850ff3f9c1ad155bdfdba2b7ae05", "score": "0.60792166", "text": "function pintar_contenido_flotante(i){\r\n\tvar html=\"\";\r\n\thtml+=`<div class=\"row\" id=\"contenido_dinamico\">\r\n\t\t\t\t<div class=\"col-12\">\r\n\t\t\t\t\t<span class=\"span_modal\"><b><i>${informacion[i].nombre_titulo}</i></b></span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6\">\r\n\t\t\t\t<span class=\"span_modal\"><b>En la institucion:</b></span><span class=\"span_modal\">${informacion[i].institucion}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6\">\r\n\t\t\t\t<span class=\"span_modal\"><b>Con el programa:</b></span><span class=\"span_modal\">${informacion[i].programa}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6\">\r\n\t\t\t\t<span class=\"span_modal\"><b>A partir del:</b></span><span class=\"span_modal\">${informacion[i].fecha_inicio}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6\">\r\n\t\t\t\t<span class=\"span_modal\"><b>Finalizado en:</b></span><span class=\"span_modal\">${informacion[i].fecha_fin}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6\">\r\n\t\t\t\t<span class=\"span_modal\"><b>En el pais:</b></span><span class=\"span_modal\">${informacion[i].pais}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6\">\r\n\t\t\t\t<span class=\"span_modal\"><b>En el departamento:</b></span><span class=\"span_modal\">${informacion[i].departamento}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6\">\r\n\t\t\t\t<span class=\"span_modal\"><b>En la ciudad:</b></span><span class=\"span_modal\">${informacion[i].ciudad}</span>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12\">\r\n\t\t\t\t<button class=\"Editarbtn btn btn-primary\" id=\"editar\"> Editar </button>\r\n\t\t\t\t</div>\r\n\t\t</div>`;\r\n\t\treturn html;\r\n}", "title": "" }, { "docid": "fda08252356c6e0296205e33fa4eb822", "score": "0.6078664", "text": "function cargarNombre(id){\n const nombreDocente= document.getElementById('nombreDocente');\n //obtenemos los datos del alumno en cuestion\n fetch(`../../controllers/docentes/controlador_datosDocente.php?id=${id}`)\n .then(res => res.json())\n .then(data =>{\n let html=`Bienvenido de nuevo Docente: ${data[0].Nombre_Docente} ${data[0].Apellido_P}`;\n // nombreDocente.style.animationDuration='4s';\n // nombreDocente.style.animationName='mostrarNombre';\n nombreDocente.innerHTML=html;\n //nombreDocente.classList.add('mostrarNombre');\n \n })\n .catch(error => console.log(error));\n}", "title": "" }, { "docid": "e6a65f567125d58161f8c765ab4ec166", "score": "0.60779744", "text": "function getDetalles(elemento) {\n\n var detalles = elemento.getAttribute(\"data-detalles\");\n $(\"#div_detalle\").append(detalles);\n}", "title": "" }, { "docid": "2c4d3065d1cd67ff8f6d41b47641e999", "score": "0.6067087", "text": "function cargarListaDetalles(){\n $(\"#agregandoPlatillos\").html(\"\");\n $.ajax({\n url : \"/procesos/detail_detalle_orden\",\n data : {id: object_id_recibido},\n type: \"GET\",\n dataType: \"json\",\n success : function (data) {\n var htmlRegistrado = \"\";\n for(var i = 0; i < data.length; i++){\n htmlRegistrado = `<div id=\"${$(\".platillo_select\").toArray().length++}\" class=\"row platillo_select\" value=\"${data[i].consumible.codigoPlatillo}\">\n <div id=\"${data[i].id}\" class=\"col-12\" value=\"registrado\">\n <div class=\"row\">\n <div class=\"col-8\">\n <label id=\"lblNombrePlatillo\">${data[i].consumible.nombre}</label>\n </div>\n <div class=\"col-4\">\n <label class=\"sobre\">$&nbsp;<span id=\"lblPrecio\"></span></label>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-3\">\n <label class=\"sobre\">cant: <span id=\"lblCantidad\">${data[i].cantidad}</span></label>\n </div>\n <div class=\"col-4\">\n <label class=\"sobre\">$&nbsp;<span id=\"lblPrecioUnitario\">${data[i].precio_de_venta}</span>&nbsp;c/u</label>\n </div>\n <div class=\"col-4\">\n <label>\n <span class=\"sobre\" id=\"porcentajeDescuento\">`;\n if(data[i].descuento != 0){\n htmlRegistrado += data[i].descuento+`</span><span class=\"sobre\" id=\"lblDescuento\">% desc</span>`;\n } else{\n htmlRegistrado += `</span><span class=\"sobre\" id=\"lblDescuento\"></span>`;\n }\n\n htmlRegistrado += `\n\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-7\">\n <label class=\"sobre\">En espera: <span class=\"badge badge-success\" id=\"ordenados\">${data[i].ordenados}</span></label>\n </div>\n <div class=\"col-5\">\n <label class=\"sobre\">Ordenados: <span class=\"badge badge-success\" id=\"entregados\">${data[i].entregados}</span></label>\n </div>\n </div>\n </div>\n </div>`;\n idDetalle = i;\n $(\"#agregandoPlatillos\").html($(\"#agregandoPlatillos\").html()+htmlRegistrado);\n calcularPrecio();\n\n }\n }\n });\n }", "title": "" }, { "docid": "7231f1eb75d2826adfc277ccd7122ad1", "score": "0.6064458", "text": "publicacioToHtml() {\r\n var body = this.publicacio;\r\n let str = ''; \r\n if (this.tipus == 1) {\r\n var rutaFoto = this.publicacio;\r\n body = \"<img class='imatgePublicacio' src=\" + urlServer + \"/\" + rutaFoto + \">\";\r\n }\r\n str += \"<div class='publicacio animated fadeIn' data-id='\" + this.id + \"'>\";\r\n str += \"<div class='fotoPublicador' style='float: left'><img class='img-circle fotoPublicadorImg' src='\" + urlServer + this.imgPublicador + \"'></div>\";\r\n str += \"<div class='titolPublicacio'>\";\r\n str += \"<p>\" + this.publicador + \"</p>\"; \r\n str += \"<p>\" + Publicacio.convertirData(this.dataPublicacio) + \"</p>\"; \r\n str += \"</div>\"; \r\n str += \"<div class='bodyPublicacio'>\";\r\n str += body;\r\n str += \"</div>\";\r\n str += \"<div style='margin-top: 25px; padding-left: 15px;'>\";\r\n str += \"<button class='buttonNoStyle buttonMostrarComentaris' style='font-size: 20px;'>\";\r\n str += \"<span class='glyphicon glyphicon-comment' aria-hidden='true'></span>\";\r\n if (this.numComentaris > 0) str +='<span class=\"badge\" style=\"z-index: 1; position: relative; bottom: 15px; left: -10px; background-color: #D51C1C;\">' + this.numComentaris + '</span>';\r\n str += \"</button>\";\r\n str += \"</div>\";\r\n str += \"<div class='comentarisPublicacio' style='display: none;'>\";\r\n str += \"<div class='input-group inputComentar' style='margin-top: 5px; margin-bottom: 5px'>\";\r\n str += \"<input type='text' class='form-control inputPublicarComentari' placeholder='....'>\";\r\n str += \"<span class='input-group-btn'>\";\r\n str += \"<button class='btn btn-danger buttonComentar' type='button'>\" + __('stringComentar') + \"</button>\";\r\n str += \"</span>\";\r\n str += \"</div>\";\r\n str += \"</div>\"; \r\n str += \"</div>\";\r\n return str;\r\n }", "title": "" }, { "docid": "306cc821f1256524c8c7e18e34635658", "score": "0.6061214", "text": "function controlCarrito() {\n\n baseDeProductos.forEach(element => {\n detallePedido+= ` \n <tr>\n <td id= \"td${element.sabor}\" >${element.titulo}</td>\n <td id= \"td${element.sabor}P\">$ ${element.cantidad * element.precio}</td>\n <td id= \"td${element.sabor}C\">${element.cantidad}</td>\n </tr>`\n });\n\n let datos = document.getElementById(\"detallePedido\");\n $(datos).html(detallePedido);\n}", "title": "" }, { "docid": "5887d59f7d3d84bdf567d99707d19287", "score": "0.6059138", "text": "function visRetter() {\n\n const dest = document.querySelector(\"#liste\"); // container til articles med en person\n const skabelon = document.querySelector(\"template\").content; // select indhold af html skabelon (article)\n\n //ryd container inden loop\n dest.textContent = \"\";\n\n kategori.forEach(ret => {\n console.log(\"Kategori\", ret.kategori);\n if (filter == ret.kategori || filter == \"alle\") {\n\n // loop igennem json (personer)\n const klon = skabelon.cloneNode(true);\n klon.querySelector(\".billede\").src = medieurl + ret.billede;\n klon.querySelector(\".ret\").textContent = ret.navn;\n klon.querySelector(\".information\").textContent = ret.kortbeskrivelse;\n klon.querySelector(\".pris\").textContent += ` ${ret.pris} DKK`;\n klon.querySelector(\".more\").addEventListener(\"click\", () => visDetaljer(ret));\n dest.appendChild(klon);\n }\n })\n}", "title": "" }, { "docid": "23813f7d327b2fccf1c68106e472cda0", "score": "0.6046598", "text": "function mostrarDatos(clase, action){\n $(document).on(\"click\", clase, function(ev){\n ev.preventDefault();\n let idJuego = $(this).attr(\"data-id\");\n $.get(\"index.php?action=\" + action + idJuego, function(data) {\n $(\".contenido\").html(data);\n getComentarios(idJuego);\n });\n });\n }", "title": "" }, { "docid": "de8bd8ebfa43b41aed261b27f3ef6820", "score": "0.60395837", "text": "function fetchAndDisplayData() {\n // get the URL for the request\n const URL = requestsURL[document.querySelector(\"#title-page\").textContent];\n // request data from opendata\n $.getJSON(URL, function(result) {\n let nbElements = result['d'].length;\n for (i = 0; i < nbElements; i++) {\n addElement(result['d'][i]);\n }\n });\n}", "title": "" }, { "docid": "ec52eddd0d2dd2a1bb4357df2b58daff", "score": "0.60391396", "text": "function carritoHTML(){\n //Limpiar el HTML\n limpiarHTML();\n //Recorrer el carrito y generar el HTML\n articulosCarrito.forEach((curso)=>{\n const row = document.createElement('tr');\n const {img, titulo, precio, cantidad, id} = curso;\n row.innerHTML = `\n <td>\n <img src=\"${img}\" width=100>\n </td>\n <td>\n ${titulo}\n </td>\n <td>\n ${precio}\n </td>\n <td>\n ${cantidad}\n </td>\n <td>\n <a href=\"#\" class = \"borrar-curso\" data-id =\"${id}\">X<a>\n </td>\n `\n //Agrega el HTML al carrito tbody\n // inserta un nuevo nodo dentro de la estructura DOM de un documento\n contenedorCarrito.appendChild(row);\n })\n sincronizarStorage();\n}", "title": "" }, { "docid": "2aa887c1bb6507d119ce8170134e7f51", "score": "0.60189474", "text": "function traerDatos(Page){\n // Data del ajax\n let data = \"\";\n data = \"action=traerDatos\";\n\n // Orden de datos\n let Orden = obtenerOrden();\n data += \"&Orden=\"+Orden;\n\n // Ve que pagina es y trae los datos correspondientes a tal\n let Des = obtenerPagina(Page);\n data += \"&D=\"+Des;\n\n // Temporada de operacion\n let Temporada = obtenerTemporada();\n data += \"&Temporada=\"+Temporada;\n\n // Filtros\n let filtros = document.getElementsByName(\"FPot\");\n\n for (let i = 0; i < filtros.length; i++){\n let value = filtros[i].value.trim();\n\n \n data += \"&campo\"+[i]+\"=\"+value;\n }\n\n // colspan dinamico\n let colspan = (puas == 5) ? 7 : 6;\n\n return new Promise(function(resolve, reject) {\n\n $.ajax({\n data:data,\n url:urlDes,\n type:'POST',\n dataType:'JSON'\n }).done(function(resp){\n let Contenido = \"\";\n\n if(resp != null && resp.length != 0){\n \n $.each(resp,function(i,item){\n\n Contenido += \"<tr>\";\n Contenido += \"<td>\"+(parseInt(Des)+i+1)+\"</td>\";\n Contenido += \"<td \"+minText(item.razon_social)+\"</td>\";\n Contenido += \"<td \"+minText(item.predio)+\"</td>\";\n Contenido += \"<td \"+minText(item.region)+\"</td>\";\n Contenido += \"<td \"+minText(item.comuna)+\"</td>\";\n Contenido += \"<td \"+minText(item.nombre)+\"</td>\";\n if(puas == 5) Contenido += \"<td class='fix-edi'> <button type='button' class='btn btn-info' data-edi='\"+item.id_lote+\"' style='margin: 0; padding:.1rem .3rem'> <i class='fas fa-pencil-alt' data-edi='\"+item.id_lote+\"'></i> </button> </td>\";\n Contenido += \"</tr>\";\n });\n\n }else{\n Contenido = \"<tr> <td colspan='\"+colspan+\"' style='text-align:center'> No existen potreros </td> </tr>\";\n\n }\n\n document.getElementById(\"datos\").innerHTML = Contenido;\n\n resolve();\n\n }).fail(function( jqXHR, textStatus, responseText) {\n let Contenido = \"<tr> <td colspan='\"+colspan+\"' style='text-align:center'> Ups.. Intentamos conectarnos con el sistema, pero no hemos podido. </td> </tr>\";\n \n document.getElementById(\"datos\").innerHTML = Contenido;\n\n reject(textStatus+\" => \"+responseText);\n\n });\n \n });\n \n }", "title": "" }, { "docid": "0dae867ba2ea49798c99acb90093d686", "score": "0.6000501", "text": "function traerDatos(Page){\n // Data del ajax\n let data = \"\";\n data = \"action=traerDatos\";\n\n // Orden de datos\n let Orden = obtenerOrden();\n data += \"&Orden=\"+Orden;\n\n // Ve que pagina es y trae los datos correspondientes a tal\n let Des = obtenerPagina(Page);\n data += \"&D=\"+Des;\n\n // Filtros\n let filtros = document.getElementsByName(\"FAdm\");\n\n for (let i = 0; i < filtros.length; i++){\n let value = filtros[i].value.trim();\n\n data += \"&campo\"+[i]+\"=\"+value;\n\n }\n\n // colspan dinamico\n let colspan = (puas == 5) ? 6 : 5;\n\n return new Promise(function(resolve, reject) {\n\n $.ajax({\n data:data,\n url:urlDes,\n type:'POST',\n dataType:'JSON'\n }).done(function(resp){\n let Contenido = \"\";\n if(resp != null){\n \n $.each(resp,function(i,item){\n\n Contenido += \"<tr>\";\n Contenido += \"<td>\"+(parseInt(Des)+i+1)+\"</td>\";\n Contenido += \"<td \"+minText(item.user)+\"</td>\";\n Contenido += \"<td \"+minText(item.rut)+\"</td>\";\n Contenido += \"<td \"+minText(item.nombre)+\"</td>\";\n Contenido += \"<td \"+minText(item.email)+\"</td>\";\n if(puas == 5) Contenido += \"<td class='fix-edi'><button type='button' class='btn btn-info' data-edi='\"+item.id_usuario+\"' style='margin: 0; padding:.1rem .3rem'> <i class='fas fa-pencil-alt' data-edi='\"+item.id_usuario+\"'></i> </button></td>\";\n Contenido += \"</tr>\";\n });\n\n }else{\n Contenido = \"<tr> <td colspan='\"+colspan+\"' style='text-align:center'> No existen administradores </td> </tr>\";\n\n }\n\n document.getElementById(\"datos\").innerHTML = Contenido;\n\n resolve();\n\n }).fail(function( jqXHR, textStatus, responseText) {\n let Contenido = \"<tr> <td colspan='\"+colspan+\"' style='text-align:center'> Ups.. Intentamos conectarnos con el sistema, pero no hemos podido. </td> </tr>\";\n \n document.getElementById(\"datos\").innerHTML = Contenido;\n\n reject(textStatus+\" => \"+responseText);\n\n });\n \n });\n \n }", "title": "" }, { "docid": "87dfb44c0ea61a42bbd58b9e7374b095", "score": "0.59774643", "text": "function RecebeDados(resposta) {\n $('#id_usuario').html(resposta.id);\n $('#title_usuario').html(resposta.title);\n $('#completed_usuario').html(resposta.completed.toString());\n }", "title": "" }, { "docid": "257a759a5adddb7fde301a688a64dc4d", "score": "0.59768236", "text": "async function mosntrarServicios() {\n try { //fetch es una api que te permite indagar y buscar cualquier documento en tu proyecto y mostrarlo en consola, es como que llamar cualquier informacion que quieras llamar\n const resultado = await fetch('./servicios.json'); // fetch es parte de JS no se necesita importar nada\n \n const db = await resultado.json();\n\n // const servicios = db.servicios; // db es el resultado pero arroja un elemento llamado servicios (servicios.json) que contiene los servicios, entonces colocamos db.servicios para acceder a cada uno de los servicios \n \n const {servicios} = db; // esta es una manera mas corta y es desectrctuirando y asignandolo de una vez en una variable, se extrae ese elemento de DB y se asigna la variable al tiempo\n \n //---GENERAR EL HTML----\n // foreach es para ir interanto entre cada uno de ellos. donde va iterando cada elemento en la variable de \"servicio\"\n servicios.forEach( (servicio) => { // asi accedemos a cada uno de ellos y se llamarian servicio\n const { id, nombre, precio } = servicio; // extraemos de cada servicio el id, nombre, precio y todo se lo asignamos a la variable de \"servicio\"\n \n //recuerda que gracias al foreach estamos recorriendo TODOS los elementos\n //DOM SCRIPTING\n // vamos a sacar el servicios.json y lo vamos a mostrar en pantalla (HTML) con JS\n //---- Generar nombre de servicio\n const nombreServicio = document.createElement('P'); //creamos el primer elemento que es un parrafo\n nombreServicio.textContent = nombre; // le añadimos al parrafo el nombre de el servicio \n nombreServicio.classList.add('nombre-servicio');\n\n //--- Generar precio de el servicio\n\n const precioServicio = document.createElement('P'); // creamos el elemento que en este caso es un P\n precioServicio.textContent = `$ ${precio}`; // debido a que en el diseño tiene un signo de dolar\n precioServicio.classList.add('precio-servicio');\n\n //--- Generar DIV contenedor de CADA servicio\n\n const servicioDiv = document.createElement('DIV'); // creamos el elemento que es un div en este caso\n servicioDiv.classList.add('servicio'); // le damos una clase para darle estilos\n servicioDiv.dataset.idServicio = id; // le estamos agregando tambien qel id que estamos extrayendo a cada servicio\n\n // --- Selecciona un servicio para la cita\n\n servicioDiv.onclick = seleccionarServicio;\n\n\n //-- Inyectar precio y nombre al div de servicio\n\n servicioDiv.appendChild(nombreServicio); //appenChild es para agregarle un hijo a este div\n servicioDiv.appendChild(precioServicio); \n\n\n // -- Inyectarlo en el HTML\n // selecciono el ID ya definido en el html y el servicioDiv se le agrega como hijo a todo ese ID que esta definido para que se muestre en pantalla\n document.querySelector('#servicios').appendChild(servicioDiv);\n\n // console.log(servicioDiv)\n\n // TODO ESTO SE ESTA GENERANDO A CADA SERVICIO DEVIDO AL FOREACH de manera como un ciclo\n } );\n \n } catch (error) {\n console.log(error);\n }\n}", "title": "" }, { "docid": "224d9b1db001a8d7b4d7f35550ccfeb1", "score": "0.59743893", "text": "function mostrar_elements( mostrar, ocultar){\n\n for (var i = 0; i < mostrar.length; i++) {\n //$('#'+mostrar[i]).toggle('slow');\n $('#'+mostrar[i]).show('slow');\n $('.'+mostrar[i]).show('slow');\n\n }\n for (var i = 0; i < ocultar.length; i++) {\n console.log(ocultar[i]);\n //$('#'+ocultar[i]).toggle('slow');\n $('#'+ocultar[i]).hide('slow');\n $('.'+ocultar[i]).hide('slow');\n\n }\n\n }", "title": "" }, { "docid": "e03e03ae809d31360aea42a387283b49", "score": "0.5971686", "text": "function leerDatosServicio(serv){\n const infoServicio = {\n imagen: serv.querySelector('img').src,\n username: serv.querySelector('p').textContent,\n titulo: serv.querySelector('h2').textContent,\n desc: serv.querySelector('span').textContent,\n precio: serv.querySelector('.ctn-tag li').textContent,\n rate: serv.querySelector('.ctn-tag .rate').textContent,\n id: serv.querySelector('.agregarCarrito').getAttribute('data-id')\n }\n\n insertarCarrito(infoServicio);\n}", "title": "" }, { "docid": "646760e4f922a60144b5daa682ffd83c", "score": "0.5966866", "text": "function obtenerTodos() {\n fetch(urlp)\n .then(response => response.json())\n .then(data => {\n\n for (let valor of data) {\n mostrarPaciente.innerHTML += `\n <tr>\n <td>${valor.id}</td>\n <td>${valor.cedula}</td>\n <td>${valor.nombre}</td>\n <td>${valor.direccion}</td>\n <td>${valor.telefono}</td>\n <td>${valor.fecha_nacimiento}</td>\n <td>${valor.nacionalidad}</td>\n </tr>\n `\n }\n })\n .catch(err => console.log(err))\n}", "title": "" }, { "docid": "db6847301e38e96d15f6bef0c49f3f4a", "score": "0.5961688", "text": "function showData(data){\n $.each(data,function(key,value){\n $('.container_promotion').append(`\n <div class=\"card\">\n <div class=\"producto\">\n <div align=\"center\" class=\"circle\">\n <p class=\"costo_anterior\">s/${value.precioventa}0</p>\n <div >Oferta</div>\n <div class=\"costo_real\">s/${value.descuento}</div></div>\n </div>\n <div class=\"imagen\">\n <img src=\"${value.imageUrl}\" id=\"imagen_promocion\"> \n </div>\n </div> \n `);\n });\n }", "title": "" }, { "docid": "1af4653d178e5c8cb43c686ba036ad3e", "score": "0.59597856", "text": "function carritoHTML (){\r\n\r\n //limpiar el HTML pra que no aparezcan 1, 12, 123, 1234, etc\r\n limpiarHTML ();\r\n //recorre el carrito y genera el HTML\r\n articulosCarrito.forEach( curso => {\r\n const { imagen, titulo, precio, cantidad, id} = curso; //saco el \"curso.\" de todos los td (como curso.imagen)\r\n const row = document.createElement('tr');\r\n row.innerHTML = `\r\n <td> \r\n <img src=\"${curso.imagen}\" width=\"100\"></td> \r\n <td>${titulo}</td>\r\n <td>${precio}</td>\r\n <td>${cantidad}</td>\r\n <td><a href=\"#\" class=\"borrar-curso\" data-id=\"${id}\" > X </a>\r\n </td>\r\n `;\r\n //agrega el HTML del carrito en el tbody\r\n contenedorCarrito.appendChild(row);\r\n });\r\n\r\n //sincronizar con localStorage\r\n sincronizarStorage();\r\n}", "title": "" }, { "docid": "3e0a6944bc69c1be9a55236213b0e0d4", "score": "0.5950622", "text": "function mostrarOtros(datos)\r\n{\r\n var nom_div = $(this).attr('name');\r\n $(\"#\"+nom_div).toggleClass('widget-content');\r\n var class_icon = $(this).attr(\"class\");\r\n var icono_acord = $(this).children(\"h4\").children(\"i\");\r\n if($(icono_acord).attr(\"class\") == \"glyphicon glyphicon-chevron-up\")\r\n {\r\n icono_acord.removeClass(\"glyphicon glyphicon-chevron-up\");\r\n icono_acord.addClass(\"glyphicon glyphicon-chevron-down\");\r\n }\r\n else\r\n {\r\n icono_acord.removeClass(\"glyphicon glyphicon-chevron-down\");\r\n icono_acord.addClass(\"glyphicon glyphicon-chevron-up\");\r\n }\r\n return;\r\n}", "title": "" }, { "docid": "f3a84f2b9289dc59fbbf8ce9e20f7b60", "score": "0.5947801", "text": "async function displayData()\n{\n let getUsers= await fetch('https://jsonplaceholder.typicode.com/users');\n\n //Checamos el status de nuestro fetch (sustituye el catch) nos devuelve true o false\n console.log(getUsers.ok);\n\n //Agreamos nuestro espera (promesa) y convertimos nuestro archivo en json\n let data= await getUsers.json();\n\n //Accedemos a los elementos del arreglo\n data.forEach(user=> \n {\n //Creamos nuestros elemento parrafo en el html\n let parr=document.createElement('p');\n //ponemos los datos dentro del parrafo y seleccionamos nuestro elemento que queremos imprimir (.name) o el dato que se requiera\n parr.textContent=`Nombre de usuario: ${user.name},Email:${user.email}, Ciudad:${user.address.city}` ;\n //appendChild para meter datos dentro de una lista\n divUsers.appendChild(parr);\n \n });\n //Imprimimos nuestros datos\n console.log(data);\n}", "title": "" }, { "docid": "588243c47f0070a64437d4f8fe85501f", "score": "0.5941893", "text": "function qtd_de_agendamentos_do_dia_por_agenda(data) {\n var html = \"\";\n elem = document.getElementById('agendimentos_do_dia');\n elem1 = document.getElementById('atendimentos_total');\n\n if (elem1 && elem) {\n var qtd_agendamentos_do_dia = data[0].qtd_paciente;\n\n if (typeof qtd_agendamentos_do_dia === 0 || typeof qtd_agendamentos_do_dia === \"qtd_agendamentos_do_dia\") {\n console.log(\"verificar o json ou query nos selects.php\");\n } else {\n html = '<span>' + qtd_agendamentos_do_dia + '</span>';\n }\n\n elem.innerHTML = html;\n elem1.innerHTML = html;\n\n }\n}", "title": "" }, { "docid": "6354c3416dfecf6371ec7304432e7c1f", "score": "0.5924093", "text": "function muestra() {\n var tamanio = nomina['detalleNomina'].length;\n var detalle = nomina['detalleNomina'];\n var html =\n `<table id=\"nomina\" class=\"table m-b-0 toggle-arrow-tiny\">\n <thead>\n <tr>\n <th data-toggle=\"true\" data-sort-ignore=\"true\"> Nombre </th>\n <th data-hide=\"phone\"> Percepciones </th>\n <th data-hide=\"phone\"> Deducciones </th>\n <th data-hide=\"phone\"> Neto a pagar </th>\n <th data-hide=\"phone\" class=\"text-center\"> Acciones </th>\n <th hidden>Días trabajados</th>\n <th hidden>Faltas sin justificar</th>\n <th hidden>Días de descanso</th>\n <th hidden>Horas sábado</th>\n <th hidden>Sueldo base</th>\n <th hidden>Horas extras</th>\n <th hidden>Monto horas extras</th>\n <th hidden>Abono prestamo</th>\n <th hidden>Infonavit</th>\n <th hidden>Bono P y A</th>\n <th hidden>Bono extra</th>\n </tr>\n </thead>\n <tbody>`;\n for(var x=0; x<tamanio; x++) {\n var conceptos = detalle[x].conceptos;\n var tamanioc = detalle[x].conceptos.length;\n var tr = detalle[x];\n tr.deduccion = 0, tr.percepcion = 0;\n for (var i = 0; i <tamanioc; i++) {\n if(conceptos[i].Tipo == 0)\n tr.deduccion += conceptos[i].Monto;\n else\n tr.percepcion += conceptos[i].Monto;\n }\n tr.diasTrabajados = 0;\n tr.horasExtras = 0;\n tr.diasDescanso = 1;\n tr.horasSabado = 0;\n tr.faltasSinJustificar = 0;\n\n for (var i = 0; i < tr.asistencia.length; i++) {\n //console.log(tr.asistencia[i])\n if(tr.asistencia[i].Hora_salida === 1 && tr.asistencia[i].Hora_entrada === 1) {\n tr.horasSabado += 0.5;\n tr.diasTrabajados ++;\n }\n else if(tr.asistencia[i].Hora_salida === 1 || tr.asistencia[i].Hora_entrada === 1)\n tr.diasTrabajados +=0.5;\n if(tr.asistencia[i].Hora_extra === 1)\n tr.horasExtras ++;\n }\n tr.faltasSinJustificar = 6 - tr.diasTrabajados;\n html += `<tr>\n <td>${tr.Nombre} ${tr.Apellidos}</td>\n <td>$${tr.deduccion}</td>\n <td>$${tr.percepcion}</td>\n <td>$${tr.Cantidad}</td>\n <td class=\"text-center\">\n <span data-toggle=\"modal\" data-target=\".bs-example-modal-lg\" data-body=\"${tr.id}\" class=\"modal-show\">\n <a data-toggle=\"tooltip\" data-original-title=\"Ver detalles\"> <i class=\"icon-eye \"></i> </a>\n </span>\n </td>\n <td hidden>${tr.diasTrabajados}</td>\n <td hidden>${tr.faltasSinJustificar}</td>\n <td hidden>${tr.diasDescanso}</td>\n <td hidden>${tr.horasSabado}</td>\n <td hidden>${tr.conceptos[2].Monto}</td>\n <td hidden>${tr.horasExtras}</td>\n <td hidden>${tr.conceptos[3].Monto}</td>\n <td hidden>${tr.conceptos[0].Monto}</td>\n <td hidden>${tr.conceptos[2].Monto}</td>\n <td hidden>${tr.conceptos[4].Monto}</td>\n <td hidden>${tr.conceptos[5].Monto}</td>\n </tr>`;\n }\n html += `<tbody>\n </table>`;\n $( \".tabla\" ).append(html);\n\n imprimir();\n }", "title": "" }, { "docid": "cb5b0bee53026297111381e0204d15a6", "score": "0.5920742", "text": "function agregarAlDom()\n{\n contenedorCotizacion.innerHTML = \n `<div class= \"contenedorCotiDom\">\n <div class =\"titleCotizacion\">\n <h3>Cotización</h3>\n </div>\n <hr>\n <div class=\"superior\">\n <div class = \"text\">\n <h4 class =\"subTitleC\">Datos Remitente</h4>\n <p><strong>Nombre:</strong> ${nombreRemitente}</p>\n <p><strong>Apellido:</strong> ${telefonoRemitente}</p>\n <p><strong>Télefono:</strong> ${telefonoRemitente}</p>\n <p><strong>Email:</strong> ${emailRemitente} </p>\n </div>\n <div class = \"text\">\n <h4 class =\"subTitleC\">Datos Receptor</h4>\n <p><strong>Nombre:</strong> ${nombreReceptor}</p>\n <p><strong>Apellido:</strong> ${apellidoReceptor}</p>\n <p><strong>Télefono:</strong> ${telefonoReceptor}</p>\n <p><strong>Email:</strong> ${emailReceptor}</p>\n </div>\n </div>\n <hr> \n <div class=\"medio\"> \n <div class = \"text\">\n <h4 class =\"subTitleC\"> Datos del producto a enviar</h4>\n <p><strong>Nombre producto:</strong> ${nombreProducto}</p>\n <p><strong>Cantidad de pallet:</strong> ${cantidadPallet}</p>\n <p><strong>Valor del producto:</strong> $${valorProducto}</p>\n <p><strong>Peso:</strong> ${pesoProducto}tn.</p>\n </div>\n <div class = \"text\">\n <h4 class =\"subTitleC\">Detalle de envio</h4>\n <p><strong>Origen:</strong> Rosario, SF.</p>\n <p><strong>Destino:</strong> ${provincia.value}</p>\n </div>\n </div>\n <hr> \n <div class=\"final\"> \n <div class = \"text\">\n <h4 class =\"subTitleC\">Detalles de Costo</h4>\n <p><strong>Costo de envio:</strong> $${costoEnvio}</p>\n <p><strong>Iva 21%:</strong> $${iva}</p>\n <p><strong>Seguro de envio:</strong> $${seguroProducto}</p>\n </div>\n <div class = \"text\">\n <p class= \"textoFinal\"><strong>Costo total:</strong> $${costoTotal}</p>\n </div>\n </div>\n </div>\n <div class= \"btnConfirmarBox\">\n <button class=\"btnConfirmar\">Confirmar</button>\n </div>`;\n\n $(\".contenedorCotiDom\").css(\n { \n \"display\": \"flex\",\n \"flex-wrap\": \"wrap\",\n \"flex-direction\": \"row\",\n \"flex-wrap\": \"wrap\",\n \"justify-content\": \"center\",\n\n \"width\": \"auto\",\n \"margin\": \"2rem\",\n \"padding\": \"1rem\",\n\n \"border-radius\": \"10px\",\n \"background-color\": \" rgb(240, 205, 152)\"\n }\n );\n $(\"hr\").css(\n {\n \"border\": \"0.2px solid black\",\n\n \"width\": \"100%\",\n\n \"margin-top\": \"0.5rem\",\n \"margin-bottom\": \"0.5rem\"\n }\n );\n $(\".titleCotizacion\").css(\n { \n \"font-family\":\"Quicksand\",\n \"font-weight\": \"800\",\n \"font-size\": \"25px\", \n \"text-align\": \"center\"\n }\n );\n $(\".subTitleC\").css(\n { \n \"font-family\":\"Quicksand\",\n \"font-weight\": \"700\",\n \"font-size\": \"20px\",\n \"text-align\": \"start\",\n\n \"margin-bottom\": \"1rem\",\n \"margin-top\": \"1rem\"\n }\n );\n $(\".text\").css(\n { \n \"font-family\":\"Quicksand\",\n \"font-weight\": \"500\",\n \"font-size\": \"16px\",\n\n \"width\": \"325px\",\n \"height\": \"auto\",\n\n \"text-align\": \"justify\",\n\n \"flex-direction\": \"column\",\n \"flex-wrap\": \"wrap\",\n \"align-items\": \"stretch\"\n }\n );\n $(\".textoFinal\").css(\n {\n \"font-weight\": \"700\",\n \"font-size\": \"25px\",\n } \n ) \n $(\".superior\").css(\n { \n \"display\": \"flex\",\n \"flex-direction\": \"row\",\n \"flex-wrap\": \"wrap\",\n \"align-items\": \"flex-start\",\n \"justify-content\": \"space-evenly\",\n\n \"width\": \"100%\",\n\n \"margin-bottom\": \"1rem\",\n \"margin-top\": \"1rem\",\n }\n );\n $(\".medio\").css(\n { \n \"display\": \"flex\",\n \"flex-direction\": \"row\",\n \"flex-wrap\": \"wrap\",\n \"align-items\": \"flex-start\",\n \"justify-content\": \"space-evenly\",\n\n \"width\": \"100%\",\n\n \"margin-bottom\": \"1rem\",\n \"margin-top\": \"1rem\"\n }\n );\n $(\".final\").css(\n { \n \"display\": \"flex\",\n \"flex-direction\": \"row\",\n \"flex-wrap\": \"wrap\",\n \"align-items\": \"flex-end\",\n \"justify-content\": \"space-evenly\",\n\n \"width\": \"100%\",\n\n \"margin-bottom\": \"1rem\",\n \"margin-top\": \"1rem\"\n }\n );\n $(\".btnConfirmar\").css(\n {\n \"width\": \"200px\",\n \"height\": \"50px\",\n \n \"border-radius\": \"10px\",\n \"border\": \"none\",\n \n \"background-color\": \"rgb(39, 39, 39)\",\n \"color\": \"rgb(242, 184, 98)\",\n \n \"font-family\":\"Quicksand\",\n \"font-weight\": \"700\",\n \"font-size\": \"35px\"\n }\n )\n $(\".btnConfirmarBox\").css(\n {\n \"margin-top\": \"2rem\",\n \"margin-bottom\": \"2rem\",\n\n \"display\": \"flex\",\n \"justify-content\": \"center\"\n }\n )\n \n}", "title": "" }, { "docid": "474e66a8f1209645f2b5222236ab85e5", "score": "0.591882", "text": "function carritoHTML() {\r\n\r\n // Limpiar el HTML\r\n limpiartHTML();\r\n\r\n // Recorre le carrito y genera el HTML\r\n articulosCarrito.forEach( curso => {\r\n const { imagen, titulo, precio, cantidad, id } = curso;\r\n const row = document.createElement('tr');\r\n row.innerHTML = `\r\n <td><img src=\"${imagen}\" width=\"100\" > </td>\r\n <td>${titulo}</td>\r\n <td>${precio}</td>\r\n <td>${cantidad}</td>\r\n <td><a href=\"#\" class=\"borrar-curso\" data-id=\"${id}\" > X </td>\r\n `;\r\n\r\n // Agrega el html del carrito en el tbody\r\n contenedorCarrito.appendChild(row);\r\n });\r\n}", "title": "" }, { "docid": "55134e52eb1b4fa90ccfe12dfa6a5a23", "score": "0.59148234", "text": "function leerDatosCurso(datos){\n\tlet informacion = {\n \timagen: datos.querySelector(\"img\").src,\n titulo: datos.querySelector(\"h4\").textContent,\n \tprecio: datos.querySelector(\".precio span\").textContent,\n id: datos.querySelector(\"a\").getAttribute(\"data-id\")\n };\n agregarCarrito(informacion);\n}", "title": "" }, { "docid": "1a8b7d65bd3d43221d585561b1fcf0dc", "score": "0.591251", "text": "function carritoHtml() {\n \n//limpia el hhtml\nlimpiarHtml();\n \n artriculosCarrito.forEach((curso) =>{\n const {imagen, title , precio , cantidad ,id} = curso;\n const row = document.createElement('tr');\n row.innerHTML=`\n <td><img src=\"${imagen}\" width=\"100\"></td>\n <td>${title}</td>\n <td>${precio}</td>\n <td>${cantidad}</td>\n <td> \n <a href=\"#\" class=\"borrar-curso\" data-id=\"${id}\">X</a>\n </td>\n `;\n \n //AGREga o inyecta el tml del carrtioden en tbody\n contenedorCarrito.appendChild(row);\n });\n}", "title": "" }, { "docid": "d7dcacc5a57b43ec0f228a5f9bd335f2", "score": "0.5911756", "text": "function mostrarCargos(){\n $.get('CargoMostrar/', function (data) {\n $(\"#tablacargos\").html(\"\");\n $.each(data, function(i, item) { //recorre el data \n cargartablaCargos(item); // carga los datos en la tabla\n }); \n });\n \n}", "title": "" }, { "docid": "028d47bed9b0be1a7230d6905010ec12", "score": "0.59098595", "text": "function carritoHtml(){\r\n //limpiamos el html\r\n limpiarHtml();\r\n //recorre el carrito y genera el html\r\n articulosCarrito.forEach( curso =>{\r\n\r\n const{imagen,titulo,precio,cantidad,id} = curso;\r\n\r\n const row = document.createElement('tr')\r\n row.innerHTML = `\r\n <td><img src=\"${imagen}\" width = 100></td>\r\n <td>${titulo}</td>\r\n <td>${precio}</td>\r\n <td>${cantidad}</td>\r\n <td>\r\n <a href=\"#\" class=\"borrar-curso\" data-id=\"${id}\"> X </a> \r\n `;\r\n\r\n //agregar el html al tbody\r\n contenedorCarrito.appendChild(row);\r\n })\r\n}", "title": "" }, { "docid": "47e2b4072062cbdedd8780e71b3bd0d1", "score": "0.59044045", "text": "function displayApodData(apodData) { // function to display data on html\n //console.log(apodData); // making sure this function is connected to and being passed through fetch function\n let apod = document.getElementById('apods'); // connects this function to corresponding html id tag\n\n let img = document.createElement('img'); // creating the elements I want inside the html id tag and in what order\n let title = document.createElement('h3');\n let explan = document.createElement('p');\n let copyright = document.createElement('p');\n let date = document.createElement('p');\n let clearfix = document.createElement('div');\n\n title.innerText = apodData.title;\n explan.innerText = apodData.explanation;\n copyright.innerText = apodData.copyright;\n date.innerText = apodData.date;\n\n \n img.src = apodData.hdurl;\n img.alt = apodData.title;\n\n clearfix.setAttribute('class', 'clearfix');\n\n apod.appendChild(img);\n apod.appendChild(title);\n apod.appendChild(explan);\n apod.appendChild(copyright);\n apod.appendChild(date);\n apod.appendChild(clearfix);\n \n}", "title": "" }, { "docid": "732590fc0613ff72adda0f138a2d1eee", "score": "0.5900303", "text": "readAndRender() {\n restXHR.get(\"traer\").then(\n // restFetch.get(\"traer\").then(\n (response) => {\n if (!this.containerElement)\n this.containerElement = document.getElementById(\"container\");\n if (this.tableElement)\n this.containerElement.removeChild(this.tableElement);\n let noDataEl = document.querySelector(\".sindatos\");\n if (noDataEl)\n this.containerElement.removeChild(noDataEl);\n\n this.data = this.validateTypes(response.data)\n this.data = this.crearObjetoAnuncio(response.data);\n this.tableElement = Table.render(this.data);\n this.containerElement.appendChild(this.tableElement);\n }\n )\n }", "title": "" }, { "docid": "ee54ff967e7b3b310dd38e7183b53960", "score": "0.5892885", "text": "function listado(respuesta) {\r\n conexion.query('select * from articulos', (error,filas) => {\r\n if (error) {\t\t\t\r\n console.log('error en el listado');\r\n return;\r\n }\r\n respuesta.writeHead(200, {'Content-Type': 'text/html'});\r\n let datos='';\r\n for(let f=0;f<filas.length;f++){\r\n datos+='Codigo:'+filas[f].codigo+'<br>';\r\n datos+='Descripcion:'+filas[f].descripcion+'<br>';\r\n datos+='Precio:'+filas[f].precio+'<hr>';\r\n }\r\n respuesta.write('<!doctype html><html><head></head><body>');\r\n respuesta.write(datos);\t\r\n respuesta.write('<a href=\"index.html\">Retornar</a></body></html>');\r\n respuesta.end();\t\t\r\n });\r\n}", "title": "" }, { "docid": "a038a992c9fd95eb5db1b022edf6012b", "score": "0.5881927", "text": "function preencherProdutos(dados) {\n\t$(\".produto\").html(\"\");\n\t$.each(dados, function (key,val) {\n\t\t$(\".produto\").append(`\n\t\t\t<div class='col l3 m6 s12 center-align'>\n\t\t\t\t<div class='card'>\n\t\t\t\t<img src='${val.foto}' class='responsive-img'>\n\t\t\t\t<p>${val.nome}</p>\n\t\t\t\t<p class='valor'>R$ ${val.valor}</p>\n\t\t\t\t<a href='produto/${val.id}' class='btn red darken-4'>Detalhes</a>\n\t\t\t\t</div>\n\t\t\t</div>`);\n\t});\n}", "title": "" }, { "docid": "2a69c84a98ce6c515f3995d574906d48", "score": "0.58818954", "text": "function catalogo_mostrarInmuebles(json_datos) {\n\tvar objContenedor = $(\".catalogo_cuerpo .columna2 .resultadosConsulta\");\n\tobjContenedor.html(\"\");\n\t\n\tvar datos = template_busquedas_getData();\n\tvar cadenaResultados = \"\";\n\t\n\tif (parseInt(datos.tipoInmueble) != -1) {\n\t\tcadenaResultados += $(\"#template_busqueda_tipoInmueble li.lista li[data-value='\"+datos.tipoInmueble+\"']\").text();\n\t\tcadenaResultados += parseInt(datos.tipoInmueble) != 6 ? \"s\" : \"es\";\n\t}\n\tif (parseInt(datos.transaccion) != -1) {\n\t\tcadenaResultados += \" en \"+$(\"#template_busqueda_transaccion li.lista li[data-value='\"+datos.transaccion+\"']\").text();\n\t}\n\tif (parseInt(datos.colonia) != -1) {\n\t\tcadenaResultados += \" en la colonia \"+$(\"#template_busqueda_colonia li.lista li[data-value='\"+datos.colonia+\"']\").text();\n\t}\n\tif (parseInt(datos.ciudad) != -1) {\n\t\tcadenaResultados += \" en \"+$(\"#template_busqueda_municipio li.lista li[data-value='\"+datos.ciudad+\"']\").text();\n\t}\n\tif (parseInt(datos.estado) != -1) {\n\t\tcadenaResultados += \", \"+$(\"#template_busqueda_estado li.lista li[data-value='\"+datos.estado+\"']\").text();\n\t}\n\t\n\t$(\".catalogo_cuerpo .columna2 .cadenaResultados\").html(cadenaResultados);\n\tmaxCadena = 30;\n\t\n\t\n\tfor (var x = 0; x < json_datos.datos.length; x++) {\n\t\tmoneda = new NumeroFormato(json_datos.datos[x].precio);\n\t\ttextTitulo = (json_datos.datos[x].titulo).length > maxCadena ? ((json_datos.datos[x].titulo).substr(0, (maxCadena - 3))+\"...\") : json_datos.datos[x].titulo;\n\t\tetiquetaPrecio = json_datos.datos[x].transaccion != 3 ? \"Precio\" : \"Precio por noche\";\n\t\t\n\t\telemento =\n\t\t\t\"<div class='template_catalogo_contenedorInfo'>\"+\n\t\t\t\t\"<table>\"+\n\t\t\t\t\t\"<tbody>\"+\n\t\t\t\t\t\t\"<tr>\"+\n\t\t\t\t\t\t\t\"<td class='imagen'>\"+\n\t\t\t\t\t\t\t\t\"<div style='background:url(\"+urlArchivos+json_datos.datos[x].imagen+\") no-repeat center center / 100% auto;' onclick='gotoURL(\\\"inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1\\\");'></div>\"+\n\t\t\t\t\t\t\t\"</td>\"+\n\t\t\t\t\t\t\t\"<td class='descripcion'>\"+\n\t\t\t\t\t\t\t\t\"<div class='like'>\"+\n\t\t\t\t\t\t\t\t\t\"<h2 onclick='gotoURL(\\\"inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1\\\");'>\"+textTitulo+\"</h2>\"+(parseInt(json_datos.datos[x].like) != -1 ? (\"<a class='btnBotones estrella \"+(parseInt(json_datos.datos[x].like) != 0 ? \"activo\" : \"\")+\"' data-id='\"+json_datos.datos[x].like+\"' data-inmueble='\"+json_datos.datos[x].id+\"'>Like</a>\") : \"<a class='btnBotones estrella' data-id='\"+json_datos.datos[x].like+\"' data-inmueble='\"+json_datos.datos[x].id+\"'>Like</a>\")+\n\t\t\t\t\t\t\t\t\"</div>\"+\n\t\t\t\t\t\t\t\t\"<p class='btns'>\"+\n\t\t\t\t\t\t\t\t\t(json_datos.datos[x].dimensionTotal != \"\" ? \"<a class='otrosBotones dimensionTotal' href='inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1'>\"+json_datos.datos[x].dimensionTotal+\" m<sup>2</sup></a>\" : \"\")+\n\t\t\t\t\t\t\t\t\t(json_datos.datos[x].dimensionConstruida != \"\" ? \"<a class='otrosBotones dimensionConstruida' href='inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1'>\"+json_datos.datos[x].dimensionConstruida+\" m<sup>2</sup></a>\" : \"\")+\n\t\t\t\t\t\t\t\t\t(json_datos.datos[x].wcs != \"\" ? \"<a class='otrosBotones wcs' href='inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1'>\"+(json_datos.datos[x].wcs % 1 == 0 ? parseInt(json_datos.datos[x].wcs) : parseFloat(json_datos.datos[x].wcs).toFixed(1))+\"</a>\" : \"\")+\n\t\t\t\t\t\t\t\t\t(json_datos.datos[x].recamaras != \"\" ? \"<a class='otrosBotones recamaras' href='inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1'>\"+json_datos.datos[x].recamaras+\"</a>\" : \"\")+\n\t\t\t\t\t\t\t\t\"</p>\"+\n\t\t\t\t\t\t\t\t\"<div class='info' onclick='gotoURL(\\\"inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1\\\");'>\"+\n\t\t\t\t\t\t\t\t\t\"<h3>\"+json_datos.datos[x].coloniaNombre+\"</h3>\"+\n\t\t\t\t\t\t\t\t\t\"<p>\"+json_datos.datos[x].ciudadNombre+\", \"+json_datos.datos[x].estadoNombre+\", México</p>\"+\n\t\t\t\t\t\t\t\t\t\"<p>C.P. \"+json_datos.datos[x].cpNombre+\"</p><br />\"+\n\t\t\t\t\t\t\t\t\t\"<p class='descripcion'>\"+json_datos.datos[x].descripcion+\"</p>\"+\n\t\t\t\t\t\t\t\t\"</div>\"+\n\t\t\t\t\t\t\t\t\"<div class='precioVerMas'><span class='precio' onclick='gotoURL(\\\"inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1\\\");'>\"+etiquetaPrecio+\": $\"+(moneda.formato(2, true).replace(\".00\", \"\"))+\" MXN</span><span class='verMas' onclick='gotoURL(\\\"inmueble.php?id=\"+json_datos.datos[x].id+\"&regresar=1\\\");'>Ver más</span></div>\"+\n\t\t\t\t\t\t\t\"</td>\"+\n\t\t\t\t\t\t\"</tr>\"+\n\t\t\t\t\t\"</tbody>\"+\n\t\t\t\t\"</table>\"+\n\t\t\t\"</div>\";\n\t\t\t\n\t\tobjContenedor.append(elemento);\n\t}\n\t\n\tif (json_datos.datos.length == 0)\n\t\tobjContenedor.html(\"No tenemos resultados para tu búsqueda. Explora Inmuebles es un nuevo portal con las mejores opciones para rentar o comprar inmuebles. Pronto tendremos muchos resultados cerca de ti.\");\n\telse {\n\t\ttemplate_eventosFavoritos();\n\t\t\n\t\tif (parseInt(json_datos.maxPaginas) > 1) {\n\t\t\tcatalogo_sistemaPaginacion(json_datos.pagina, json_datos.elem, json_datos.numeroElementos, json_datos.maxPaginas);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9745554ce3c2a3f707be7127b9ec07cf", "score": "0.5878259", "text": "function preencherProdutos(dados) {\n\t$(\".produto\").html(\"\");\n\t$.each(dados, function (key,val) {\n\t\t$(\".produto\").append(`<div class='col l3 m6 s12 center-align'>\n\t\t\t\t<div class='card'>\n\t\t\t\t<img src='${val.foto}' class='responsive-img'>\n\t\t\t\t<p>${val.nome}</p>\n\t\t\t\t<p class='valor'>R$ ${val.valor}</p>\n\t\t\t\t<a href='produto/${val.id}' class='btn red darken-4'>Detalhes</a>\n\t\t\t\t</div>\n\t\t\t</div>`);\n\t});\n}", "title": "" }, { "docid": "e3548543911599f2cc3fdf9c06875f61", "score": "0.58764523", "text": "function mostrarHTML(empleados) {\n\n limpiarHTML();\n \n // let row; \n\n // forEach para recorrer en cada uno de ellos\n empleados.forEach(empleados => {\n const { id, nombre, empresa, trabajo} = empleados;\n // scripting\n const row = document.createElement('tr');\n row.innerHTML = `\n <td>${empresa}</td>\n <td>${id}</td>\n <td>${nombre}</td>\n <td>${trabajo}</td>\n `;\n contenido.appendChild(row);\n });\n \n}", "title": "" }, { "docid": "7c256543e3b253f3cc9b12a517c5abd8", "score": "0.5870517", "text": "function setDetalleArticuloAdmin(datosArticulo) {\r\n var partsOfStr = datosArticulo.split(';');\r\n\r\n $('#detalle-articulo-admin')\r\n .html('<p class=\"card-text\"><strong>Nombre: </strong>' + partsOfStr[0] + '</p>'\r\n + '<p class=\"card-text\"><strong>Descripción: </strong>' + partsOfStr[1] + '</p>'\r\n + '<p class=\"card-text\"><strong>Año: </strong>' + partsOfStr[2] + '</p>'\r\n + '<p class=\"card-text\"><strong>Estado de conservación: </strong>' + partsOfStr[3] + '</p>'\r\n + '<p class=\"card-text\"><strong>Precio: </strong>' + partsOfStr[4] + '&euro;</p>'\r\n + '<p class=\"card-text\"><strong>Categoria: </strong>' + partsOfStr[5] + '</p>'\r\n + '<p class=\"card-text\"><strong>Dimensiones: </strong>' + partsOfStr[6] + '</p>'\r\n + '<p class=\"card-text\"><strong>Procedencia: </strong>' + partsOfStr[7] + '</p>'\r\n + '<p class=\"card-text\"><strong>Autor: </strong>' + partsOfStr[8] + '</p>');\r\n}", "title": "" }, { "docid": "14228a8eb32ee17ab1e1f7fb0b537ac4", "score": "0.5868756", "text": "function mostrarActividad(){\n $.get('ActividadMostrar', function (data) {\n $(\"#tablaactividad\").html(\"\");\n $.each(data, function(i, item) { //recorre el data \n cargartablaActividad(item); // carga los datos en la tabla\n }); \n });\n \n}", "title": "" }, { "docid": "ebe296d561de05b043f1a523c1989687", "score": "0.5858908", "text": "function getAllProgramme() {\n // Objet XMLHttpRequest.\n var xhr = getXMLHttpRequest();\n // On précise ce que l'on va faire quand on aura reçu la réponse du serveur.\n xhr.onreadystatechange = function ()\n {\n // Si l'on a tout reçu et que la requête http s'est bien passée.\n if (xhr.readyState === 4 && xhr.status === 200)\n {\n // Elément html que l'on va mettre à jour.\n elt = xhr.responseXML;\n\n // recupere les infos des balises codeP, Descriptionp, Libellep\n var listeCodep = elt.getElementsByTagName(\"Codep\");\n var listeDescriptionp = elt.getElementsByTagName(\"Descriptionp\");\n var listeLibellep = elt.getElementsByTagName(\"Libellep\");\n\n // recupere la zone d'insertion dans le .HTML\n div = document.getElementById(\"listeProgramme\");\n div.innerHTML = \"\";\n\n //Parcours la liste des prenoms, creation d'une liste, concatene nom + prenom et ajoute a la liste.\n for (var i = 0; i < listeCodep.length; i++)\n {\n // mise en forme titre -- description\n var dl = document.createElement(\"dl\");\n var dt = document.createElement(\"dt\");\n dt.setAttribute(\"class\", \"col-sm-3\");\n var dd = document.createElement(\"dd\");\n dd.setAttribute(\"class\", \"col-sm-9\");\n // div comportant id code du programme \n var divprofil = document.createElement(\"div\");\n divprofil.id = listeCodep[i].childNodes[0].nodeValue;\n var ddProfil = document.createElement(\"dd\");\n //creation d'une div pour que la fct js getExerciceForSeanceType\n //ajoute les exercices dans la div\n var ddDiv = document.createElement(\"dd\");\n\n\n // div comportant id code+libelle du seance \n var divExo = document.createElement(\"div\");\n divExo.id = listeCodep[i].childNodes[0].nodeValue + listeLibellep[i].childNodes[0].nodeValue;\n var hr = document.createElement(\"hr\");\n\n\n\n //description du proramme \n var description = document.createTextNode(listeDescriptionp[i].childNodes[0].nodeValue);\n //libelle du programme avec un Href\n var a = document.createTextNode(listeLibellep[i].childNodes[0].nodeValue);\n dt.append(a);\n dd.append(description);\n ddProfil.append(divprofil);\n ddDiv.append(divExo);\n\n dl.append(dt);\n dl.append(dd);\n dl.append(ddProfil);\n dl.append(ddDiv);\n\n div.appendChild(dl);\n\n div.append(hr);\n getSeanceForProgramme(listeCodep[i].childNodes[0].nodeValue, listeCodep[i].childNodes[0].nodeValue + listeLibellep[i].childNodes[0].nodeValue);\n listeProfil(listeCodep[i].childNodes[0].nodeValue);\n }\n }\n };\n\n // Requête au serveur avec les paramètres éventuels.\n xhr.open(\"GET\", \"\" + IPCONFIG + \"ServletGetAllProgramme\", true);\n xhr.send(null);\n}", "title": "" }, { "docid": "f3ac9258194008cd6658ddee7b104d0a", "score": "0.58565533", "text": "function mostrar_juzgados(datos, campo){\n\n\n\t\tif (campo.length==0) {\n\t\tdocument.getElementById(\"juzgados\").innerHTML=\"\";\n\t\tdocument.getElementById(\"juzgados\").style.border=\"0px\";\n\t\treturn;\n\t }\n\n\t\tdivResultado = document.getElementById('juzgados');\n ajax=objetoAjax();\n ajax.open(\"GET\", datos);\n ajax.onreadystatechange=function() {\n if (ajax.readyState==4) {\n divResultado.innerHTML = ajax.responseText\n\t\t\t\t\t\tdocument.getElementById(\"juzgados\").innerHTML=ajax.responseText;\n \t\t\t\t\tdocument.getElementById(\"juzgados\").style.border=\"1px solid #A5ACB2\";\n }\n }\n ajax.send(null)\n}", "title": "" }, { "docid": "4d1c5c31ee764e1955e9f07f2f0e1b51", "score": "0.58563817", "text": "function processarContatos(){\n let lista = \"\";\n for(let i=0; i< agenda.contatos.length; i++){\n lista += agenda.contatos[i].nome + \" - \" +\n agenda.contatos[i].email + \" - \" +\n agenda.contatos[i].telefone +\"<br>\";\n }\n document.getElementById('saida-contatos').innerHTML = lista;\n}", "title": "" }, { "docid": "664c9dbe1b2044f0682ae4a63ab0ee1a", "score": "0.58549243", "text": "function obtenerBlogs(){\n alert();\n $.ajax({\n url: 'control/obtenerBlogs.php',\n method: 'POST',\n dataType: 'JSON'\n }).done(function(respuesta){\n if(respuesta.estatus == 'success'){\n let contenido = '';\n let entradas = '';\n $.each(respuesta.datos,function(index,element){\n let formatFecha = obtenerFecha(element.fecha_blog);\n entradas += `\n <section class=\"entrada descripcion_blog\" data-id_blog=\"${element.id_blog}\">\n <div class=\"imagen\">\n <img src=\"imagenes/blog/${element.imagen_blog}\" alt=\"\">\n </div>\n <div class=\"texto\">\n ${element.titulo_blog}\n <br><span class=\"fecha\">${formatFecha}</span>\n </div>\n </section>\n `;\n });\n $('#container_entradas').html(entradas);\n }else{\n console.log(respuesta.erno);\n }\n\n /*=====ENVIAR A DESCRIPCION DE BLOG====*/\n $('.descripcion_blog').click(function(){\n let id_blog = $(this).data('id_blog');\n location.href = \"detalle_blog.php?blog=\"+id_blog;\n });\n });\n}", "title": "" }, { "docid": "076a4936b7737a3664552c08f83b78d7", "score": "0.58548546", "text": "function showTablePedidos(tablaDb, idTablaHtml ){\n fetch('server/http_request/show_table_pedidos.php?tablaDb='+tablaDb)\n .then(resp => resp.json())\n .then(resp => { \n console.log(resp); \n let data; \n for(var valor of resp){ \n if(tablaDb == 'dow'){ \n data += `\n <tr class=\"data-table-dow validado-${valor.validado}\" id=\"${valor.id}\" data-status=\"${valor.status}\" data-toggle=\"modal\" data-target=\"#openOrderDow\"> \n <td>${valor.n_solicitante}</td> \n <td>${valor.solicitante}</td> \n <td>${valor.tipo}</td> \n <td>${valor.aprobador}</td>\n <td>${valor.proveedor}</td> \n <td>${valor.origen}</td> \n <td>${valor.destino}</td> \n <td>${valor.fCreacion}</td> \n <td>${valor.prioridad}</td> \n <td class=\"${valor.status}\">${valor.status}</td> \n \n </tr> \n ` \n // <td class=\"edit_dow\" id=\"edit_dow\"><i class=\"fas fa-edit\"></i></td> \n // <td class=\"delete_dow\" id=\"delete_dow\"><i class=\"fas fa-times\"></i></td> \n }\n if(tablaDb == 'orders'){\n data += `\n <tr class=\"data-table\" id=\"${valor.id}\" data-status=\"${valor.status}\" data-toggle=\"modal\" data-target=\"#openOrder\"> \n <td>${valor.id}</td> \n <td>${valor.user}</td> \n <td>${valor.destinatario}</td> \n <td>${valor.origen} ${valor.depto_origen}</td>\n <td>${valor.destino} ${valor.depto_destino}</td> \n <td>${valor.tipo}</td>\n <td>Monto</td>\n <td>${valor.cadete}</td> \n <td>${valor.fCreacion}</td> \n <td class=\"${valor.status}\">${valor.status}</td> \n </tr> \n ` \n }\n } \n\n $('#'+idTablaHtml).html(data); \n \n showOrderInfo(); \n \n $('#btn_aprobar_dow').on('click', function(){\n validarOrderDow('y');\n });\n\n $('#btn_desaprobar_dow').on('click', function(){\n validarOrderDow('n');\n });\n\n $('#btn_eliminar_dow').on('click', function(){\n eliminarOrderDow();\n });\n \n })\n .catch(error => {\n console.log('ERROR en petición http de show_table_pedidos.php', error);\n });\n}", "title": "" }, { "docid": "07bb888bc81241149a020cd4d0c5df00", "score": "0.58508986", "text": "function getArticoli(res) {\n $.ajax({\n url: \"http://localhost:8080/articoli?sesso=F\",\n type: \"GET\",\n success: res => {\n let ris = \"\";\n for(let i = 0; i < res.length; i++){\n console.log(res[i]);\n ris += `\n <article class=\"product\">\n <div class=\"img-container\">\n <img src=${res[i].immagine} alt=\"\" class=\"product-img\">\n <button class=\"bag-btn\" data-id=${res[i].id} onclick=\"getArticolo(${res[i].id})\">\n vai al prodotto\n </button>\n </div>\n <h3>${res[i].nome}</h3>\n <h4>${res[i].prezzo}&euro;</h4>\n </article>\n `;\n }\n \n productsDOM.innerHTML = ris;\n }\n });\n }", "title": "" }, { "docid": "fd20432b27f181e6a68911557bf25b41", "score": "0.5850845", "text": "function fnSp4CargarFuncionesHallazgosAsignadosDinamicasDOM()\n{\n // campo fecha desde\n $(\"#txt_fecha_desdeHA\").datetimepicker({\n timepicker:false,\n format:'d/m/Y'});\n\n // campo fecha hasta\n $(\"#txt_fecha_hastaHA\").datetimepicker({\n timepicker:false,\n format:'d/m/Y'});\n}", "title": "" }, { "docid": "ccc6cffea066eefd1405b87175c95a25", "score": "0.5849899", "text": "allEmployeesToDOM() {\n\n const employeeCardsContainer = document.querySelector(\"#display-container\")\n\n let employeeCardsHTML = \"\"\n\n api.getEmployeesInfo()\n .then(response => {\n for (let employeeObject of response) {\n\n employeeCardsHTML += HTMLBuilder.buildHTML(employeeObject)\n }\n employeeCardsContainer.innerHTML = employeeCardsHTML\n })\n }", "title": "" }, { "docid": "8eed7f6536a59ef837b24c758b7de3aa", "score": "0.5841151", "text": "function carritoHTML() {\n\n // limpia el HTML\n limpiaHTML();\n\n // recorre el carrito y genera el HTML\n articulosCarrito.forEach(curso => {\n const { imagen, titulo, precio, cantidad, id} = curso;\n\n const row = document.createElement('tr');\n row.innerHTML = `\n <td><img src=\"${imagen}\" width=\"100\"></td>\n <td>${titulo}</td>\n <td>${precio}</td>\n <td>${cantidad}</td>\n <td>\n <a href=\"#\" class=\"borrar-curso\" data-id=${id}>X</a>\n </td>\n\n `;\n\n // agregar el HTML del carrito en el body\n contenedorCarrito.appendChild(row);\n\n })\n}", "title": "" }, { "docid": "ed42923bada0139eabfb736d4c4b8091", "score": "0.5836116", "text": "async function agregarMateriasIniciales(carrera_json, carrera){\n\n await start(carrera_json);\n \n document.getElementById('seleccionarCarrera').innerHTML = carrera;\n \n var realizadas = document.querySelector('.realizadas');\n realizadas.innerHTML = \"\";\n\n const sinCorrelativas = materias.filter(materia => {\n return noPoseeCorrelativa(materia)\n });\n\n console.log(materias);\n\n const html = sinCorrelativas.map(sinCorrelativa => {\n materiasDisponibles.push(sinCorrelativa);\n return `\n <div class=\"materia ${sinCorrelativa.departamento}\" id=\"${sinCorrelativa.materia}\" onclick=\"agregarMateriaRealizada(this)\">\n ${sinCorrelativa.materia}\n </div>\n `;\n }).join('');\n var disponibles = document.querySelector('.disponibles');\n disponibles.innerHTML = html;\n\n console.log(disponibles);\n}", "title": "" }, { "docid": "8585be9b1ea40b64356ce5bb4ac51ab2", "score": "0.5836037", "text": "function cargarEtapas(){ \n\t\n\t$.post(\"php/planeacion_Coordinadora.php\",{\n accion:'cargarEtapas'\n\t\t \n \t\t\t\t\n },\n\t\t function (data) {\n\t\t\tif (data !=\t\"\"){ \t\t\n\t\t\t\t$('#etapas').html(data.html);\n\t\t\t}\n\t\t\t$('#btnGestion_1').hide(); //se oculta reconocimiento\n\t\t}\n ,\"json\");\n}", "title": "" }, { "docid": "0b573683d76d60b71ece98b5626fd5d6", "score": "0.58337194", "text": "function mostrarPersonas() {\n // console.log('Ejecutandose mostrarpersona')\n // Guradara cada uno de los objetos de tipo persona que hay en nuestro arreglo de personas\n let texto = ''\n for (let persona of personas) {\n // console.log(persona)\n // Mostrarlo dentro del HTML\n texto += `<li>${persona.name} ${persona.lastName}</li>`\n $ulPersonas.innerHTML = texto\n }\n // console.log($ulPersonas)\n}", "title": "" }, { "docid": "ab22e5f4e2aff3adbbba1b2494827cac", "score": "0.58336914", "text": "function showDataFilterScraper() {\n\n consult_manager = new ConsultDataManager();\n\n consult_manager.initialize();\n\n consult_manager.document.toast('Timothy, a comenzado a filtrar los datos.', 'Data Scrapers');\n\n consult_manager.showFilterData()\n\n consult_manager.document.toast('Uff!, Datos listos.', 'Data Scrapers');\n}", "title": "" }, { "docid": "b01f007477686087cd6a8c56903f31f9", "score": "0.5826135", "text": "function cardProdcutos(datos) {\n //console.log(datos);\n const urlPs = '/public/productos.html';\n if(URLactual.pathname === urlPs){\n contenido.innerHTML = '';\n\n for(let item of datos ){\n //console.log(item);\n contenido.innerHTML += `\n <div class=\"shadow-lg border rounded border-gray-900 bg-white roundo\">\n <div>\n <img src=\"${item.image}\" class=\"object-contain h-48 w-full\" alt=\"\" srcset=\"\">\n </div>\n <div class=\" mx-3 my-3\">\n <a href=\"producto.html?id=${item.id}\" class=\"block mt-1 text-lg leading-tight font-medium text-black hover:underline\">\n ${item.titulo}\n </a>\n <h4 class=\"mt-3 text-gray-500\">Precio: $${item.precio}</h4>\n <p class=\"mt-3\"> \n ${item.descripcion}\n </p>\n </div>\n <div class=\"flex justify-between mt-3\">\n <a id=\"${item.id}\" \n href=\"producto.html?id=${item.id}\" \n class=\"inline-block w-full text-center text-sm px-4 mx-4 py-3 ml-2 my-2 bg-blue-700 leading-none border rounded text-white font-medium border-white hover:border-transparent hover:text-gray-900 hover:bg-blue-500 mt-4 lg:mt-0\"> \n VER MÁS \n </a>\n \n\n </div>\n </div>\n `;\n }\n }\n\n}", "title": "" }, { "docid": "f28a0c969742401c87f8a20f87440a4e", "score": "0.58248186", "text": "function obteniendoDescripcion_clima (ciudad,pais,id) {\n var apikey = \"1af8d9aa4463fa066e36547746a79a3c\"\n var settings = {\n \"url\": `https://api.openweathermap.org/data/2.5/weather?q=${ciudad},${pais}&appid=${apikey}&units=metric`\n } \n $.ajax(settings).done(function (response) {\n console.log(response);\n var id_descripcion = document.getElementById(id);\n var descripcion_obt = response.weather[0].description;\n id_descripcion.innerHTML = `<p>${descripcion_obt}</p>`;\n });\n}", "title": "" }, { "docid": "449a60d52b054f9176b46b4d934ec4c9", "score": "0.5821511", "text": "function muestraHudMochila() {\n $($('.lista-objetos')[0]).html('<h4>Mochila</h4><div><img id=\"objeto1\" src=\"./media/images/objeto_vacio.png\" alt=\"objeto 1\" width=\"100\" height=\"100\"><img id=\"objeto2\" src=\"./media/images/objeto_vacio.png\" alt=\"objeto 2\" width=\"100\" height=\"100\"><img id=\"objeto3\" src=\"./media/images/objeto_vacio.png\" alt=\"objeto 3\" width=\"100\" height=\"100\"></div><div><img id=\"objeto4\" src=\"./media/images/objeto_vacio.png\" alt=\"objeto 4\" width=\"100\" height=\"100\"><img id=\"objeto5\" src=\"./media/images/objeto_vacio.png\" alt=\"objeto 5\" width=\"100\" height=\"100\"><img id=\"objeto6\" src=\"./media/images/objeto_vacio.png\" alt=\"objeto 6\" width=\"100\" height=\"100\"></div></div>');\n}", "title": "" }, { "docid": "4778aef485e79647b9a82c32144b9649", "score": "0.5820783", "text": "function enviarInfoJuicios(datos){\n divResultado = document.getElementById('info_juicios');\n ajax=objetoAjax();\n ajax.open(\"GET\", datos);\n ajax.onreadystatechange=function() {\n if (ajax.readyState==4) {\n divResultado.innerHTML = ajax.responseText\n }\n }\n ajax.send(null)\n}", "title": "" }, { "docid": "d29e20d60f97d846500a3ce7459a098f", "score": "0.5814629", "text": "function carritoHTML(){\n\n //Limpiar el HTML\n\n limpiarHTML();\n\n //Recorre el carrito y genera HTML\n articulosCarrito.forEach( juego =>{\n const row = document.createElement('tr');\n row.innerHTML = `\n <td>\n\n <img src=\"${juego.imagen}\" width=\"50\">\n\n </td>\n\n <td> ${juego.titulo} </td>\n\n <td> ${juego.precio} </td>\n\n <td>${juego.cantidad}</td>\n\n <td>\n <a href=\"#\" class=\"borrar-juego\" data-id=\"${juego.id}\">X</a>\n </td>\n \n `;\n\n //Agrega el HTML del carrito en el tbody\n\n contenedorCarrito.appendChild(row);\n })\n}", "title": "" }, { "docid": "aca9731a59ca0dae58f50660f3bf5b3b", "score": "0.5811808", "text": "function showElements()\n {\n showElements = elements => {\n const elementsDiv = document.querySelector('#table');\n elements.forEach(element => {\n \n z++;\n const elementContainer = document.createElement('p');\n elementContainer.innerText = `${z} - ${element.name.title} ${element.name.first} ${element.name.last} `;\n elementsDiv.append(elementContainer);\n \n const elementImage = document.createElement('img'); \n elementImage.src = element.picture.thumbnail;\n elementsDiv.append(elementImage);\n \n }); \n }\n }", "title": "" }, { "docid": "639e8baf727ba3a515fbc8b3d346700d", "score": "0.58083266", "text": "function mostrarNotas(id) {\n\tconsole.log(\"ESTE ES EL ID\",id);\n\t$.ajax({\n\t \turl: 'crudCursada/crudNotas/notas-list.php',\n\t \ttype: 'GET',\n\t \tsuccess: function(response) { \n\t \t\tconst notas = JSON.parse(response);\n\t \t\tlet Ntemplate = '';\n\t \tnotas.forEach(n => {\n\t \t\t//console.log(\"mostrarMaterias \",n);\n\t \t\tif (n.seguimientoid == id) {\n\t \t\t\tNtemplate += `\n\t\t \t\t\t<tr class=\"tablitatr\">\n\t\t \t<td>${n.nombre}</td>\n\t\t \t<td>${n.nota}</td>\n\t\t \t<td>${n.profesor}</td>\n\t\t \t<td>${n.fecha}</td>\n\t\t </tr>\n\t \t\t\t`\n\t \t\t}\n\t \t});\n\t \t$(\"#tnotasbody\"+id).html(Ntemplate);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "cdce229235b312fdbeaa1a929acc3dcd", "score": "0.5806968", "text": "function cargarPersonaje(){\n //VACIA ANTES DE RELLENAR\n document.getElementById(\"juego\").innerHTML = \"\";\n \n var texto = '';\n texto += '<div class=\"col-md-3 text-light itemsPJ\">';\n texto += '<p>('+comprobarItem(\"Espada\")+')</p>';\n texto += '<div><img id=\"espada\" src=\"img/'+comprobarItem(\"Espada\")+'.png\"></div>';\n texto += '<p>('+comprobarItem(\"Armadura\")+')</p>';\n texto += '<div><img id=\"armadura\" src=\"img/'+comprobarItem(\"Armadura\")+'.png\"></div>';\n texto += '<p>('+comprobarItem(\"Anillo\")+')</p>';\n texto += '<div><img id=\"anillo\" src=\"img/'+comprobarItem(\"Anillo\")+'.png\"></div>';\n texto += '</div>';\n texto += '<div class=\"col-md-6\">';\n texto += '<div class=\"row\">';\n texto += '<div class=\"col\">';\n texto += '<h2 class=\"text-light bg-dark\">'+pj.nombre+' Nvl. ('+pj.nivel+') Exp('+pj.exp+'/'+pj.expMAX+')</h2>';\n texto += '</div>';\n texto += '</div>';\n texto += '<img class=\"img-fluid\" src=\"'+pj.aspecto+'\"></img>';\n texto += '<div class=\"row text-light pt-3\">';\n texto += '<div class=\"col\">';\n texto += '<span>Ataque: <span id=\"statAtaque\">'+pj.ataque+'</span></span> <button onclick=\"sumarStats('+\"'Ataque'\"+')\" type=\"button\">+</button><span> // </span>';\n texto += '<span>Defensa: <span id=\"statDefensa\">'+pj.defensa+'</span></span> <button onclick=\"sumarStats('+\"'Defensa'\"+')\" type=\"button\">+</button><span> // </span>';\n texto += '<span>Especial: <span id=\"statEspecial\">'+pj.especial+'</span></span> <button onclick=\"sumarStats('+\"'Especial'\"+')\" type=\"button\">+</button>';\n texto += '<p>Puntos disponibles: (<span id=\"statPuntosDisponibles\">'+pj.puntosDisponibles+'</span>)</p>';\n texto += '</div>';\n texto += '</div>';\n texto += '</div>';\n texto += '<div class=\"col-md-3 text-light itemsPJ\">';\n texto += '<p>('+comprobarItem(\"Escudo\")+')</p>';\n texto += '<div><img id=\"escudo\" src=\"img/'+comprobarItem(\"Escudo\")+'.png\"></div>';\n texto += '<p>('+comprobarItem(\"Casco\")+')</p>';\n texto += '<div><img id=\"casco\" src=\"img/'+comprobarItem(\"Casco\")+'.png\"></div>';\n texto += '<p>('+comprobarItem(\"Consumible\")+')</p>';\n texto += '<div><img id=\"itemEspecial\" src=\"img/'+comprobarItem(\"Consumible\")+'.png\"></div>';\n texto += '</div>';\n\n \n document.getElementById(\"juego\").innerHTML = texto;\n document.getElementById(\"juego\").style.backgroundImage = \"url('img/fondos/fondomadera.jpg')\";\n console.log(\"- Personaje Actualmente -\"); // para debug\n console.log(pj); // para debug\n}", "title": "" }, { "docid": "a6beeeed8361c0734cf0a596e6cb96f4", "score": "0.5805289", "text": "function mapDOMElements() {\n $boutiqueHeading = $component.find(selectors.boutiqueHeading);\n $boutiqueJSONWrapper = $component.find(selectors.boutiqueJSONWrapper);\n $boutiqueMapLink = $component.find(selectors.boutiqueMapLink);\n $boutiqueTemplate = $component.find(selectors.boutiqueTemplate);\n $displayBoutique = $component.find(selectors.displayBoutique);\n }", "title": "" }, { "docid": "4b0c29d603432a316c4d9ec24d0f9685", "score": "0.5805173", "text": "function _datos_pr(){\n\t$(document).on(\"click\", \".nit-em\", function(){\n\t\tvar nit = $(this).data('id');\n\t\t/*Metodo Ajax*/\n\t\t$.ajax({\n\t\t\tbeforeSend: function(){\n\t\t\t\t/*preloader*/\n\t\t\t\t$('.loader-wrapper').removeClass(\"hide\");\n\t\t\t},\n\t\t\turl: '../includes/load.data.php',\n\t\t\ttype: 'post',\n\t\t\tdataType: \"json\",\n\t\t\tdata: \"nit_edi=\"+nit,\n\t\t\tsuccess: function(response){\n\t\t\t\t$(\"#nit_up\").val(response.nit);\n\t\t\t\t$(\"#nit_up_oc\").val(response.nit);\n\t\t\t\t$(\"#empresa_up\").val(response.empresa);\n\t\t\t\t$(\"#telefono_up\").val(response.telefono);\n\t\t\t\t$(\"#direccion_up\").val(response.direccion);\n\t\t\t\t$(\"#repa_up\").val(response.nombre);\n\t\t\t\t$(\"#repap_up\").val(response.apellido);\n\t\t\t\t$(\"#reptel_up\").val(response.tel);\n\t\t\t\t$(\"#repmail_up\").val(response.mail);\n\t\t\t\t$('.loader-wrapper').addClass(\"hide\");\n\t\t\t},\n\t\t\terror: function(jqXHR, estado, error){\n\t\t\t\tconsole.log(estado);\n\t\t\t\tconsole.log(error);\n\t\t\t},\n\t\t\tcomplete: function(jqXHR, estado){\n\t\t\t\tconsole.log(estado);\n\t\t\t},\n\t\t\ttimeout: 10000\n\t\t});\n\t});\n}", "title": "" }, { "docid": "3ee4a1986577faa002f7e64c02895a93", "score": "0.5787094", "text": "function verDetalleDeCompra() {\n\n$(\"#detComp\").empty(\n``\n);\n\n\n$(\".verDetalleCompra\").attr({\n 'class':\"btn btn-primary verDetalleCompra visible\",\n});\n\n\n\nfor (const guitarraComprada of compra) {\n$(\"#detComp\").append(`\n\n<div class=\"card text-white bg-dark\" style=\"width: 18rem;\">\n <img src=\"${guitarraComprada.img}\" class=\"card-img-top\" alt=\"...\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${guitarraComprada.modelo}</h5>\n <p class=\"card-text\">${guitarraComprada.title}</p>\n <p class=\"card-text\">Cantidad: ${guitarraComprada.cantidad}</p>\n <p class=\"card-text\">${guitarraComprada.precio}</p>\n\n </div>\n</div>\n\n\n`)\n}\n}", "title": "" }, { "docid": "02c125f0067c4d01b7b0fced1924f4a5", "score": "0.57867426", "text": "function mostrarAutos(autos) {\n limpiarHTML();\n\n autos.forEach( auto => {\n const autoHTML = document.createElement('P');\n const {marca, modelo, year, precio, puertas, color, transmision} = auto;\n autoHTML.innerHTML = `\n <p>${marca} ${modelo} - ${year} - ${puertas} Puertas - Transmisión: ${transmision} - Precio: ${precio} - Color: ${color}</p>`\n resultado.appendChild(autoHTML);\n })\n}", "title": "" }, { "docid": "d7ec35786b76fb93b3a27c5862ddc48e", "score": "0.5786411", "text": "function mostrarCitas(totalCitas) {\r\n\r\n limpiarHTML(); //elimina el html previo\r\n totalCitas.forEach(totalCita => {\r\n // console.log(totalCita.dueño)\r\n\r\n\r\n\r\n const div_contenedor = document.createElement('div');\r\n div_contenedor.id = 'tabla-detalles-admin';\r\n div_contenedor.classList.add('tabla-detalles-admin');\r\n\r\n //input 1\r\n const input_dueño = document.createElement('input');\r\n input_dueño.disabled = true;\r\n input_dueño.value = totalCita.dueño;\r\n input_dueño.id = 'inpt-dueño';\r\n\r\n //input 2\r\n const input_mascota = document.createElement('input');\r\n input_mascota.disabled = true;\r\n input_mascota.value = totalCita.nombre;\r\n input_mascota.id = 'inpt-nombre';\r\n\r\n //input 3\r\n const input_tipo = document.createElement('input');\r\n input_tipo.disabled = true;\r\n input_tipo.value = totalCita.tipo;\r\n input_tipo.id = 'inpt-tipo';\r\n\r\n //input 4\r\n const input_sintoma = document.createElement('input');\r\n input_sintoma.disabled = true;\r\n input_sintoma.value = totalCita.sintomas;\r\n input_sintoma.id = 'inpt-sintomas';\r\n\r\n //input 5\r\n const input_fecha = document.createElement('input');\r\n input_fecha.disabled = false;\r\n input_fecha.value = totalCita.fechaCita;\r\n input_fecha.id = 'inpt-fecha';\r\n input_fecha.type = 'date'\r\n\r\n //input 6\r\n const input_veterinario = document.createElement('input');\r\n input_veterinario.disabled = true;\r\n input_veterinario.value = totalCita.veterinario;\r\n input_veterinario.id = 'inpt-veterinario';\r\n\r\n //contenedor de botones\r\n const div_botones = document.createElement('div');\r\n div_botones.classList.add('div-acciones');\r\n\r\n //crear botones\r\n\r\n //boton1\r\n const btnEliminar = document.createElement('button');\r\n btnEliminar.id = 'btn-eliminar';\r\n btnEliminar.textContent = 'Eliminar'\r\n btnEliminar.onclick = eliminar;\r\n\r\n //boton2\r\n const btnModificar = document.createElement('button');\r\n btnModificar.id = 'btn-modificar';\r\n btnModificar.textContent = 'Modificar'\r\n btnModificar.onclick = modificar;\r\n\r\n //boton3\r\n const btnAceptar = document.createElement('button');\r\n btnAceptar.id = 'btn-aceptar';\r\n btnAceptar.textContent = 'Aceptar'\r\n btnAceptar.onclick = aceptar;\r\n\r\n\r\n //agregamos el boton al contenedor de botones\r\n div_botones.appendChild(btnEliminar);\r\n div_botones.appendChild(btnModificar);\r\n div_botones.appendChild(btnAceptar);\r\n\r\n //agregamos los inputs y botones al contenedor\r\n div_contenedor.appendChild(input_dueño)\r\n div_contenedor.appendChild(input_mascota)\r\n div_contenedor.appendChild(input_tipo)\r\n div_contenedor.appendChild(input_sintoma)\r\n div_contenedor.appendChild(input_fecha)\r\n div_contenedor.appendChild(input_veterinario)\r\n div_contenedor.appendChild(div_botones)\r\n\r\n //agregamos al elemento padre\r\n div_padre.appendChild(div_contenedor)\r\n });\r\n\r\n }", "title": "" }, { "docid": "3ad387179a7472af35ccf791143ee1bf", "score": "0.57833046", "text": "function setContent(data,distributor){\n\n\t//var content = \"<br><span class='label'>\" + distributor + \"'s DISTRIBUTORS</span><br>\";\n\t\n\tvar content = \"\";\n\t\n\tfor(i=0; i<data.length; i++){\n\t\t\n\t\tvar hasChild = \"noChild\";\n\n\t\tif(data[i].have_child == 1) { hasChild = \"hasChild\" }\n\n\t\tvar click = data[i].id;\n\n\t\tcontent += \"<button onclick='getDownlines(\" + click + \");' class='distributors \"+ hasChild +\"' value='\" + data[i].id + \"' uniq='name' name='\"+ data[i].distributor +\"'>[\" + data[i].id + \"]<div class='d-name' ><b class='name'> \" + data[i].distributor +\"</b><span class='rank'>RANK: \" + data[i].rank + \"</span></div><span>\" + data[i].team + \"</span></button><div id='\" + data[i].id + \"' class='container'></div>\";\n\t}\n\n\tcontent += \"<br>\"\n\n\treturn content;\t\t\n}", "title": "" }, { "docid": "7422d08185c5745d42cb8be610d5c397", "score": "0.5781834", "text": "function mostrarPermiso (datos) {\r\n espereshow();\r\n var id_solic = $(this).attr(\"name\");\r\n\r\n $(\".perm\"+id_solic).html('');\r\n $(\".perm\"+id_solic).addClass('hidden');\r\n\r\n var padre = $(this).parent(\"div\").parent(\"div\");\r\n $(padre).next(\".perm\"+id_solic).load(\"./solic_permisos_ed.php?exp_id=\"+id_solic+\"&exp_d=rep\");\r\n $(padre).next(\".perm\"+id_solic).toggleClass('hidden');\r\n}", "title": "" }, { "docid": "cbb4484099fb9806e3e6e8d34410d5e5", "score": "0.57809776", "text": "function pintarCarritoHtml() {\n\n // Limpiar el HTML carrito\n limpiarHtml();\n\n articulosCarrito.forEach( curso => {\n const fila = document.createElement('tr');\n // console.log(curso);\n fila.innerHTML = `\n <td> <img src=\"${ curso.imagen }\" width=\"100\"> </td>\n <td> ${ curso.titulo } </td>\n <td> <b> ${ curso.precio } </b> </td>\n <td> ${ curso.cantidad } </td>\n <td> <a href=\"#\" class=\"borrar-curso\" data-id=\"${ curso.id }\"> X </a> </td>\n `;\n\n contenedorCarrito.appendChild(fila);\n });\n}", "title": "" }, { "docid": "b355877b73651947419e9f606550866c", "score": "0.5778928", "text": "function cambioPagina(i){\n //limpia el contenedor de investigadores\n $(\"#output\").empty();\n $(\"#pages\").empty();\n //llama a la funcion cargarDatos\n cargarDatos(datos,paginas,i);\n}", "title": "" }, { "docid": "2d43952e49efcb4196d82eacaed0c319", "score": "0.5778399", "text": "function mostrarSolicitudes() {\n $.ajax({\n type: \"POST\",\n url: \"wsprivado/wsautorizarsolicitudart.asmx/getSolicitudes\",\n data: '',\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n beforeSend: function (data) {\n\n $(\"#solicitudes\").empty();\n },\n success: function (msg) {\n var tds = \"\"\n var i = 1;\n $.each(msg.d, function () {\n if (i == 1) {\n tds += '<div class=\"row\">';\n }\n tds += ' <div class=\"col-12 col-md-6 col-lg-3\">';\n tds += ' <div class=\"card shadow p-3 mb-5 bg-white rounded mb-4\">';\n tds += '<div class=\"card-header \">';\n tds += '<p class=\"card-tittle\">';\n tds += '<i class=\"material-icons\">assignment</i>';\n tds += '<strong>Solicitud No.' + this.id + ' </strong> </p> <p>Trabajo: ' + this.idenc + '-' + this.idtrab + '</p> <hr />';\n tds += '<p class=\"card-text\"><strong> Tipo trabajo: </strong>' + this.tipo + '</p>';\n tds += '<p class=\"card-text\"><strong> Trabajo: </strong>' + this.trabajo + '</p></div>';\n tds += '<div class=\"card-body\">';\n tds += '<p class=\"card-text\" style=\"margin-top:-15px\">';\n if (this.t1 != 0 && this.t2 == 0) {\n tds += '<strong> tecnico: </strong> ' + this.tec1 + ' </p>';\n }\n else if (this.t2 != 0 && this.t1 == 0) {\n tds += '<strong> tecnico: </strong> ' + this.tec2 + ' </p>';\n }\n else {\n tds += '<strong> tecnicos: </strong> ' + this.tec1 + '/' + this.tec2 + ' </p>';\n }\n tds += '<p class=\"card-text\" style=\"margin-top:-5px\">';\n tds += \"<button class='btn btn-success col MdAsignar' onclick='mostrar(\" + this.id + \",\" + this.idtrab + \",\\\"\" + this.tec1 + \"\\\",\\\"\" + this.trabajo + \"\\\",\\\"\" + this.tipo + \"\\\")'>Ver Detalle <i class='material-icons'>assignment_turned_in</i></button></div></div></div>\";\n if (i == 4) {\n tds += '</div>';\n i = 0;\n }\n i++;\n });\n\n $(\"#solicitudes\").append(tds);\n }\n });\n}", "title": "" }, { "docid": "7adf4ccf024d7954ed6fc9c34edd45e3", "score": "0.5776768", "text": "function showElements(type) {\n \n var list = document.getElementById('resultList'),\n uS = document.getElementById('sceltauser'),\n eS = document.getElementById('sceltaevent'),\n mS = document.getElementById('sceltamedia'),\n fS = document.getElementById('sceltafeed');\n \n if(!type || !list)\n return;\n \n list.innerHTML = \"\";\n \n switch (type)\n {\n case 'user':\n {\n DP.data.user.each(function(el){\n var re = DP.util.createResultElement(el, 'user');\n list.appendChild(re);\n });\n \n uS.style.fontWeight = 'bold';\n eS.style.fontWeight = '';\n mS.style.fontWeight = '';\n fS.style.fontWeight = '';\n \n break;\n }\n case 'event':\n {\n DP.data.event.each(function(el){\n var re = DP.util.createResultElement(el, 'event');\n list.appendChild(re);\n });\n \n uS.style.fontWeight = '';\n eS.style.fontWeight = 'bold';\n mS.style.fontWeight = '';\n fS.style.fontWeight = '';\n \n break; \n }\n case 'media':\n {\n DP.data.media.each(function(el){\n var re = DP.util.createResultElement(el, 'media');\n list.appendChild(re);\n });\n \n uS.style.fontWeight = '';\n eS.style.fontWeight = '';\n mS.style.fontWeight = 'bold';\n fS.style.fontWeight = '';\n \n break; \n }\n case 'feed':\n {\n DP.data.feed.each(function(el){\n var re = DP.util.createResultElement(el, 'feedRSS');\n list.appendChild(re);\n });\n \n uS.style.fontWeight = '';\n eS.style.fontWeight = '';\n mS.style.fontWeight = '';\n fS.style.fontWeight = 'bold';\n \n break; \n }\n }\n \n if (list.innerHTML === ''){\n var div = document.createElement('div');\n div.innerHTML = 'No ' + type + ' found';\n div.style.fontSize = '20px';\n div.style.textAlign = 'center';\n list.appendChild(div);\n }\n }", "title": "" }, { "docid": "7e6030ce2987d3b8a53d44f69fda7d41", "score": "0.57754314", "text": "function mostrarSolicitudes() {\n $.ajax({\n type: \"POST\",\n url: \"wsprivado/wsasignarorden.asmx/ObtenerDatos\",\n data: '',\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n beforeSend: function (data) {\n\n $(\"#ordent\").empty();\n },\n success: function (msg) {\n var tds = \"\"\n var i = 1;\n $.each(msg.d, function () {\n if (i == 1) {\n tds += '<div class=\"row\">';\n }\n tds += ' <div class=\"col-12 col-md-6 col-lg-3\">';\n tds += ' <div class=\"card shadow p-3 mb-5 bg-white rounded mb-4\">';\n tds += '<div class=\"card-header \">';\n tds += '<p class=\"card-tittle\">';\n tds += '<i class=\"material-icons\">assignment</i>';\n tds += '<strong>Orden No.' + this.id + ' </strong> </p><hr /></div>';\n tds += '<div class=\"card-body\">';\n tds += '<p class=\"card-text\" style=\"margin-top:-15px\">';\n tds += '<strong> Cliente: </strong> ' + this.nombre + ' </p>';\n tds += '<p class=\"card-text\"><strong> Acivo: </strong>' + this.activo + '</p>';\n tds += '<p class=\"card-text\" style=\"margin-top:-5px\">';\n tds += \"<button class='btn btn-success col MdAsignar' onclick='mostrar(\" + this.id + \",\\\"\" + this.observacion + \"\\\",\\\"\" + this.nombre + \"\\\",\\\"\" + this.activo + \"\\\")'>Ver Detalle <i class='material-icons'>assignment_turned_in</i></button></div></div></div>\";\n if (i == 4) {\n tds += '</div>';\n i = 0;\n }\n i++;\n });\n\n $(\"#ordent\").append(tds);\n }\n });\n}", "title": "" }, { "docid": "2971c33b0e28bc0d27d4325513123510", "score": "0.57673895", "text": "function nombreClima (ciudad,cant,id_1,id_2,id_3) {\n var apikey = \"1af8d9aa4463fa066e36547746a79a3c\"\n var settings = {\n \"url\": `https://api.openweathermap.org/data/2.5/forecast?q=${ciudad}&appid=${apikey}&units=metric&cnt=${cant}`\n } \n $.ajax(settings).done(function (response) {\n var clima_next_1 = document.getElementById(id_1);\n var clima_next_2 = document.getElementById(id_2);\n var clima_next_3 = document.getElementById(id_3);\n \n var clima_1 = response.list[3].weather[0].main;\n var clima_2 = response.list[11].weather[0].main;\n var clima_3 = response.list[19].weather[0].main;\n clima_next_1.innerHTML = `<p>${clima_1}</p>`;\n clima_next_2.innerHTML = `<p>${clima_2}</p>`;\n clima_next_3.innerHTML = `<p>${clima_3}</p>`;\n });\n}", "title": "" }, { "docid": "ad609d6be086ebfa3ffd1a1de19f7e88", "score": "0.5764533", "text": "function listarDespesas() {\n let lista = resgatarDados();\n let i = 1;\n for(let x of lista) {\n // Listando\n inserirDespesasNoHTML(i, x);\n // i é uma variavel auxiliar e representa o id do elemento tr\n i++\n }\n}", "title": "" }, { "docid": "279dd28f6b0a30d6618d5f53b4b5a65e", "score": "0.5763333", "text": "function cargarNoticiasHN()\n\t\t{\n\t\t\t$.post(base_url+\"principal/getAll\",{type:\"HN\"}).done(function(datos){\n\t\t\t\ttodos = jQuery.parseJSON(datos);\n\n\t\t\t\tfor(i=0;i<todos.length;i++)\n\t\t\t\t{\n\t\t\t\t\turl = todos[i].url;\n\t\t\t\t\tif(url!=null)\n\t\t\t\t\t\tboton = '<a href=\"'+url+'\" class=\"btn btn-primary\">Visitar</a>';\n\t\t\t\t\telse\n\t\t\t\t\t\tboton = '';\n\n\t\t\t\t\t$(\".top\").append('<div class=\"card cardContent\" style=\"width: 18rem;\">'+\n\t\t\t\t\t\t'<img class=\"card-img-top\" src=\"'+base_url+'/libs/img/vacio.png\" alt=\"Card image cap\">'+\n\t\t\t\t\t\t'<div class=\"card-body\">'+\n\t\t\t\t\t\t'<h5 class=\"card-title text-justify\">'+todos[i].titulo+'</h5>'+\n\t\t\t\t\t\t'<p class=\"card-text\">'+todos[i].fecha+'</p>'+boton+\n\t\t\t\t\t\t'</div>'+'</div><br>');\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "1d53470f55650265ed9f825b9c76c580", "score": "0.5761093", "text": "function render(datosDelServidor) {\n // var html = datosDelServidor.map( (mensaje, indice) => {});\n var html = datosDelServidor.map( (message, index) => {\n //<strong>${variable que hay en el objeto del servidor}</strong>\n return (`\n \n <div class='message'\n <strong>${message.nickname}</strong> Dice:\n <p> ${message.text}</p>\n </div>\n \n `);\n }).join(' '); // para meter un espacio entre elemento y elemento\n\n var divMensajes= document.querySelector('#messages');\n divMensajes.innerHTML= html;\n divMensajes.scrollTop = divMensajes.scrollHeight;\n// document.querySelector('#messages').append(html);\n\n\n}", "title": "" }, { "docid": "cff5f9e42612e61b01e41b51efc9dff1", "score": "0.5760791", "text": "function mostrarRecetas(recetas=[]){\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n // When API, we have: idMeal, strMeal, strMealThumb\n // When favorites, we have: id, titulo and img\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\n limpiarHTML(resultado);\n\n recetas.forEach(receta=>{\n const {idMeal, strMeal, strMealThumb} = receta;\n\n const recetaContenedor = document.createElement('DIV');\n recetaContenedor.classList.add('col-md-4');\n\n const recetaCard = document.createElement('DIV');\n recetaCard.classList.add('card', 'mb-4');\n\n const recetaImagen = document.createElement('IMG');\n recetaImagen.classList.add('card-img-top');\n recetaImagen.alt = `Imagen de la Receta ${strMeal??receta.titulo}`;\n recetaImagen.src = strMealThumb??receta.img;\n\n const recetaCardBody = document.createElement('DIV');\n recetaCardBody.classList.add('card-body');\n\n const recetaHeading = document.createElement('H3');\n recetaHeading.classList.add('card-title', 'mb-3', 'text-center');\n recetaHeading.textContent = strMeal??receta.titulo;\n\n const recetaButton = document.createElement('BUTTON');\n recetaButton.classList.add('btn', 'btn-danger', 'w-100');\n recetaButton.textContent = 'Open Recipe';\n //recetaButton.dataset.bsTarget = \"#modal\";\n //recetaButton.dataset.bsToggle = \"modal\";\n recetaButton.onclick = function(){\n seleccionarReceta(idMeal??receta.id);\n }\n\n\n // Inject elements\n\n recetaCardBody.appendChild(recetaHeading);\n recetaCardBody.appendChild(recetaButton);\n\n recetaCard.appendChild(recetaImagen);\n recetaCard.appendChild(recetaCardBody);\n\n recetaContenedor.appendChild(recetaCard);\n\n resultado.appendChild(recetaContenedor);\n\n })\n }", "title": "" }, { "docid": "2413a187609f8113ce38cab0cafde899", "score": "0.5755717", "text": "function responderEspecialidad(){ \n\n if (objetoAjax.readyState == 4){\n if (objetoAjax.status == 200) {\n\n var aux = objetoAjax.responseText;\n var obj_json = JSON.parse(aux);\n //alert(objetoAjax.responseText);\n //me posiciono en el div de los servicios\n var servicios = document.getElementById(\"principal\");\n eliminarSecciones();\n //recorro el array de los servicios\n for (var i = 0; i < obj_json.length; i++){\n //para cada posicion del array creo un div\n var div3 = document.createElement(\"div\");\n //le añado las clases a los div creados\n div3.setAttribute(\"class\",\"col_1_of_5 span_1_of_5 especialidad\");\n //añado al div la funcion onclick\n div3.setAttribute(\"onclick\",\"mostrarMedico(\"+obj_json[i].id+\")\");\n //creo el h3 y la imagen para cada servicio\n var h3=document.createElement(\"h3\");\n h3.setAttribute(\"style\",\"text-align:center\");\n var img = document.createElement(\"img\");\n //creo el nodo de texto que será el nombre sacado de la bases de datos\n var texto = document.createTextNode(obj_json[i].nombre);\n //añado el nodo de texto a la etiqueta h3\n h3.appendChild(texto);\n //añado a la imagen la ruta mas la variable i para que se incremente\n img.setAttribute(\"src\",\"images/\"+(i+1)+\".png\");\n //añado al div el h3 y la imagen\n div3.appendChild(h3);\n div3.appendChild(img);\n //añado a servicios todos los div creados\n servicios.appendChild(div3);\n }\n\n //alert(obj_json); \n } \n } \n}", "title": "" }, { "docid": "b8ddaa5a55c14d2ce5e4d962166ac997", "score": "0.5754059", "text": "function displayWeatherInfos(data) {\n const name = data.name;\n const temperature = data.main.temp;\n const conditions = data.weather[0].main;\n const description = data.weather[0].description;\n\n document.querySelector(\"#city\").textContent = name;\n document.querySelector(\"#temperature\").textContent = Math.round(temperature);\n document.querySelector(\"#conditions\").textContent = capitalize(description);\n // gestion classes image de fond selon la météo\n document.querySelector(\"i#wi\").className = weatherIcons[conditions];\n // console.log(document.querySelector(\"i.wi\").className)\n\n document.body.className = conditions.toLowerCase()\n\n}", "title": "" }, { "docid": "3e32c9cce770680e545348c629c25658", "score": "0.5749468", "text": "function DadosEstados() {\n var data;\n fetch(\"https://covid19-brazil-api.now.sh/api/report/v1\", {\n method: \"POST\",\n body: data,\n })\n .then(function (res) {\n return res.json();\n })\n .then(function (data) {\n console.log(data);\n return data.data.map(function (estados) {\n document.getElementById(\"estados\").innerHTML += \"<td>\" + estados.state +\"</td>\"+ \"<hr/>\";\n document.getElementById(\"casos\").innerHTML += \"<td>\" + estados.cases + \"</td>\" + \"<hr/>\";\n document.getElementById(\"mortes\").innerHTML += \"<td>\" + estados.deaths + \"</td>\" + \"<hr/>\";\n document.getElementById(\"horas\").innerHTML += \"<td>\" + estados.datetime.slice(0, 10) + \"</td>\" + \"<hr/>\";\n }); \n })\n .catch((err) => console.error(err));\n}", "title": "" }, { "docid": "f05834892a1ca71deb3d9e5e3ed43346", "score": "0.574337", "text": "function showDatosDonante() {\n \n\n//alert(\"en show donante \"+vDonanteEncuesta.nombres);\n if (0){ // comentado por ahora vDonanteEncuesta.nombres!=\"\"){\n\n $data2=\" <div class='datosDonante'>\";\n $data2+=\"CEDULA: <strong>\"+vDonanteEncuesta.cedula+\" </strong>\";\n $data2+=\"NOMBRES: <strong>\"+vDonanteEncuesta.nombres+\" \"+vDonanteEncuesta.apellido1+\" \"+vDonanteEncuesta.apellido2+\" \"+\"</strong> Sexo: <strong>\"+vDonanteEncuesta.genero+\" \"+\"</strong>\";\n $data2+=\"Consecutivo de donaci&oacute;n: <strong> \"+ vDonanteEncuesta.orden+\" </strong>\";//$num_ot\n $data2+=\"<br>Bacteriologa responsable: \";//{$_SESSION[$num_ot]['nom_bact']}\n $data2+=\"</div>\";\n /*\n data=\" <div class='datosDonante'>\";\n data+=\"CEDULA: <strong>vDonanteEncuesta.cedula </strong>\";\n data+=\"NOMBRES: <strong>vDonanteEncuesta.nombres vDonanteEncuesta.apellido1 vDonanteEncuesta.apellido2 </strong> Sexo: <strong>vDonanteEncuesta.genero </strong>\";\n data+=\"Consecutivo donaci&oacute;n: <strong> vDonanteEncuesta.orden </strong>\";//$num_ot\n data+=\"<br>Bacteriologa responsable: \";//{$_SESSION[$num_ot]['nom_bact']}\n data+=\"</div>\";*/\n\n $('#detalleDonante').html($data2);\n $('#detalleDonante').show();\n }else{\n\n $.ajax({\n type : 'POST',\n url : \"../ajax/showDatosDonanteJson.php\",\n dataType : 'html',\n data: {\n num_ot : $('#num_ot').val()\n },\n success : function(data){\n if (data!=\"\"){//14 de noviembre cambiado a un JSON\n //alert(data); informacion del donante .\n var obj = eval('('+data+')');//convierte el texto a JSON\n\n\n vDonanteEncuesta.orden = obj.ot;\n vDonanteEncuesta.cedula = obj.cc;\n vDonanteEncuesta.nombres = obj.nombre;\n vDonanteEncuesta.apellido1 = obj.apellido1;\n vDonanteEncuesta.apellido2 = obj.apellido2;\n vDonanteEncuesta.genero = obj.sexo;\n vDonanteEncuesta.bacteriologa = obj.codbact;\n\n $data2=\" <div class='datosDonante'>\";\n $data2+=\"CEDULA: <strong>\"+vDonanteEncuesta.cedula+\" </strong>\";\n $data2+=\"NOMBRES: <strong>\"+vDonanteEncuesta.nombres+\" \"+vDonanteEncuesta.apellido1+\" \"+vDonanteEncuesta.apellido2+\" \"+\"</strong> Sexo: <strong>\"+vDonanteEncuesta.genero+\" \"+\"</strong>\";\n $data2+=\"Consecutivo donaci&oacute;n: <strong> \"+ vDonanteEncuesta.orden+\" </strong>\";//$num_ot\n $data2+=\"<br>Bacteriologa responsable: \";//{$_SESSION[$num_ot]['nom_bact']}\n $data2+=\"</div>\";\n \n $('#detalleDonante').html($data2);\n $('#detalleDonante').show();\n \n }\n\n },\n error : function(XMLHttpRequest, textStatus, errorThrown) {\n $('#waiting').hide();\n $('#message').fadeIn(1000);\n $('#message').removeClass().addClass('error').text('Error al ejecutar la busqueda. Informe a sistemas [showDatosDonante]').show(500);\n $('#detalleDonante').hide();\n\n }\n });\n \n }\n\n\n\n\n\n return false;\n}", "title": "" }, { "docid": "fe81eebd76544ae4e471f8e76b25417b", "score": "0.5742813", "text": "function listaOrcamentos() {\n document.getElementById(\"todosOrcamento\").style.display = \"block\";\n document.getElementById(\"criar_orcamento\").style.display = \"none\";\n document.getElementById(\"funcionario_orcamento\").style.display = \"none\";\n request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState == 4 && request.status == 200) {\n var result = JSON.parse(json);\n var listaorcamentos = \"\";\n for (var i = 0; i < result.length; i++) {\n listaorcamentos += '<div class=\"col s12 m3 l3\">';\n listaorcamentos += '<div class=\"card\">';\n listaorcamentos += '<div class=\"card-content\">';\n listaorcamentos += '<span class=\"card-title\">' + result[i].nome.toUpperCase() + '</span>';\n listaorcamentos += '</div>';\n listaorcamentos += '<div class=\"card-action\" style=\"text-align: right;padding: 5% 0px;\">';\n listaorcamentos += '<a style=\"padding: 5%;margin: 0;background-color: #e55050;color: #fff;\">' + numberToReal(result[i].total) + '</a>';\n listaorcamentos += '</div>';\n listaorcamentos += '</div>';\n listaorcamentos += '</div>';\n }\n document.getElementById(\"todosOrcamento\").innerHTML = listaorcamentos;\n }\n }\n request.open(\"POST\", url + \"php/getOrcamentos.php\", true);\n request.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n request.send();\n }", "title": "" }, { "docid": "643347231afdc467da39b83bdcf5e38e", "score": "0.5741976", "text": "function getAllCitas(){\n var htmlTable = document.getElementById(\"cuerpoTabla\")\n fetch('https://application-be-201906576.herokuapp.com/api/getCitasAceptadas')\n .then((resp) => resp.json())\n .then(function (response) {\n console.log(response)\n document.getElementById(\"cuerpoTabla\").innerHTML = \"\";\n for (var i = 0; i < response.length; i++) {\n var cita = response[i]\n htmlTable.innerHTML += `\n <tr>\n <td>Fecha: ${cita.fecha} --- Hora: ${cita.hora} --- Descripcion ${cita.descripcion}</td>\n <td>\n <button class=\"btn btn-success\" data-bs-toggle=\"modal\" data-bs-target=\"#factura\" onclick=\"getDatos('${cita.usuario}', '${cita.doctor}')\" type=\"submit\">Facturar</button>\n </td>\n </tr>`\n }\n })\n .catch(function (error) {\n console.log(error);\n });\n}", "title": "" }, { "docid": "45acbe547c7eb9a582958a497efd1beb", "score": "0.57387245", "text": "mostrarSitiosInteres(){\n\n this.api.obtenerDatos()\n .then(datos => {\n const resultado = datos.respuestaJSON.elements;\n this.mostrarMapa(resultado);\n });\n }", "title": "" }, { "docid": "8a4210affd0a91d8e81f14660747354f", "score": "0.5737078", "text": "function cargarInformacionDeProfesionalesPorEspecialidad(){\n\tvar json_especialidad_seleccionado = document.getElementById('id_especialidad_remoto').value ;\n\t\n\telem_especialidad = new JSON_Especialidad( dojo.fromJson(json_especialidad_seleccionado), 0 );\n\n\tSeam.Remoting.loadingMessage = \"Obteniendo los dias de atenci\\u00F3n para la especialidad <span class=\\\"negrita\\\" >\"+elem_especialidad.getLabel()+\"</span> ... \";\n\tSeam.Remoting.displayLoadingMessage = displayMessageRemote_datos_profesional;\n\tSeam.Remoting.hideLoadingMessage = hideMessageRemote_datos_profesional;\n\t\n\tadmin_Turnos.obtenerInformacionDeBloqueTurnosDeProfesionalesDeEspecialidad(elem_especialidad.toString(), cargarInfoDeBloqueTurnos, manejarExcepcionRemota);\n\n\tadmin_coleccion_idLista_bloque_turnos.cargarColeccion([], funcionColeccion_infoBloqueTurnos);\n}", "title": "" }, { "docid": "465e83c8ae15af9abd6e36ddd68399bb", "score": "0.5736618", "text": "presupuestoRestante(cantidad){\n const restante = document.querySelector('#restante');\n const presupuestoRestanteUsuario = cantidadPresupuesto.presupuestoRestante(cantidad);\n\n restante.innerHTML = presupuestoRestanteUsuario;\n\n this.comprobarPresupuesto()\n }", "title": "" }, { "docid": "423b3abc6c9f3e107f8f4f7c33d1f9fa", "score": "0.5733761", "text": "function gestionarRespuestaBusquedaUsers() {\n\n let resp = JSON.parse(xhr_users.responseText);// Respuesta del servidor\n let users = resp.listaUsers; // Lista de usuarios que devuelve la busqueda\n // Si la lista está vacia se crea un cuadro indicando que no hay resultados\n if (!users.length > 0) {\n\n let cuadro = '<div class=\"notfication-details\"><span>No se ha encontrado ningún resultado..</span></div>';\n\n document.getElementById('usersContainer').innerHTML += cuadro;\n // En caso contrario se recorre la lista creando un cuadro con cada usuario\n } else {\n\n for (let i = 0; i < 50; i++) {\n\n let fotoUser = \"images/\" + users[i].foto;\n let nombre = users[i].nombre + \" \" + users[i].apellidos;\n let usuario = \"@\" + users[i].usuario;\n let id = users[i].id_usuario;\n let cuadro = '<div class=\"notfication-details\"><div class=\"noty-user-img\">' +\n '<a href=\"?pagina=perfil&id='+id+ '\"><img src=\"' + fotoUser +\n '\" alt=\"Foto del usuario\"></a></div>' +\n '<div class=\"notification-info\"><h3><a href=\"?pagina=perfil&id='+\n id + '\"> ' + nombre + '</a></h3><span>' + usuario + '</span></div></div>';\n\n document.getElementById('usersContainer').innerHTML += cuadro;\n }\n }\n\n}", "title": "" }, { "docid": "49593fd255ff815e603b2f65f758ab4c", "score": "0.57287276", "text": "function consultarTemas(){ \n\t\n\t$.post(\"php/planeacion_Coordinadora.php\",{\n accion:'consultarTemas',\n\t\t idComportamientos : idComportamientos,\n\t\t idCompetencia : idCompetencia,\t\t\t\t\n },\n\t\t function (data) {\n\t\t\tif (data.error != 1){ \t\t\n\t\t\t\t$('#selectbasicTema,#selectbasicTemare').html(data.html);\n\t\t\t}\n\t\t\t\n\t\t}\n ,\"json\");\n}", "title": "" } ]
0c7919871a3222b5876453ba309b2f4e
This function will show the win/loss/push block
[ { "docid": "e27b4f9c1f2a873c6f439ce8adbfb5da", "score": "0.5683574", "text": "function displayWinLoss(outcome) {\n setTimeout(function(){\n document.getElementById(outcome).style.display = \"block\";\n }, 1000);\n }", "title": "" } ]
[ { "docid": "e4ed6f602502de8cd25eb4c459ac1b8a", "score": "0.6529866", "text": "function displayWin() {\n\tvar b_count = 0;\n\tvar w_count = 0;\n\tfor(var y = 0; y < 8; y++){\n\t\tfor(var x = 0; x < 8; x++) {\n\t\t\tif(state.board[y][x]){\n\t\t\t\tif(state.board[y][x] === 'b') {\n\t\t\t\t\tb_count++;\n\t\t\t\t}\n\t\t\t\telse if(state.board[y][x] === 'w'){\n\t\t\t\t\tw_count++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tvar victor = null;\n\tif(b_count > w_count) {\n\t\tvictor = 'b';\n\t}\n\telse if(w_count > b_count) {\n\t\tvictor = 'w';\n\t}\n\t\n\tfor(var y = 0; y < 8; y++){\n\t\tfor(var x = 0; x < 8; x++) {\n\t\t\tstate.board[y][x] = victor;\n\t\t}\n\t}\n\t\n\trenderBoard();\n}", "title": "" }, { "docid": "41fa21834fc9aa5d6cd93929637e365b", "score": "0.63904035", "text": "function blocks() {\n\twindow.open();\n\tdocument.write('<center>');\n\tdocument.write('<h1> Active Games </h1>');\n\tvar mine = ttt.getMyGames();\n\tvar length = mine.length;\n\tfor (var m = 0; m < length - 1; m += 2) {\n\t\tdocument.write('<p> Game '+mine[m]+' with '+mine[m+1]/(10**18)+' ethers at stake </p>');\n\t\tvar grid = getState(mine[m]);\n\t\tupdateGrid(grid, mine[m]);\n\tdocument.write('<br>');\n\t}\n}", "title": "" }, { "docid": "d38aef8e34b3a86986bea7e91ffc81d8", "score": "0.63290215", "text": "function win() {\n $('#result').show()\n $('#result').text('WIN!');\n\n lossIncrementOp()\n $('#result').fadeOut(2000);\n\n }", "title": "" }, { "docid": "b777ec016a96ded3785084ddf22d0011", "score": "0.6309387", "text": "function updateWinLoss() {\n $(\"#win\").html(win);\n $(\"#loss\").html(loss);\n }", "title": "" }, { "docid": "f9ac1738c140df5af7360010db4d482b", "score": "0.62557214", "text": "function winLoss () {\n console.log(\"Wins: \" + wins + \" Losses: \" + losses + \"\\r\\n\");\n}", "title": "" }, { "docid": "c09993406f79e6215bf7f2ea598e5b73", "score": "0.624562", "text": "winMsg() {\r\n //noLoop();\r\n push();\r\n stroke(0);\r\n strokeWeight(5);\r\n fill(240);\r\n rect(0, height/2 - 70, width, 130);\r\n textAlign(CENTER);\r\n fill('#BE33D6');\r\n textSize(60);\r\n text(this.winGame, width/2, height/2);\r\n textSize(20);\r\n fill('#53145E');\r\n text(this.howReset, width/2, height/2 + 30);\r\n pop();\r\n }", "title": "" }, { "docid": "d34ee204666121a1a3ac32b06d8921f4", "score": "0.6204387", "text": "function display_debug_results(win, draw) {\n\n sims_left = 0;\n matchTimer.stop();\n\n var msg;\n if (result == 'draw') {\n msg = '<br><h1>DRAW</h1><br>';\n } else if (result) {\n msg = '<br><h1>WIN</h1><br>';\n } else {\n msg = '<br><h1>LOSS</h1><br>';\n }\n if (echo) {\n outp(echo);\n }\n setSimStatus(msg);\n showWinrate();\n showUI();\n }", "title": "" }, { "docid": "5b7ec81277d149a20d08fc24aa88d107", "score": "0.61647296", "text": "function show_state()\n{\n console.log(current_clicked, current_hover, old_winning_state);\n}", "title": "" }, { "docid": "ac6da5711c43106bdb7a1788ea51b47e", "score": "0.61608934", "text": "function showWinMessage() {\n playerMoney += winnings;\n console.log(`You won: ${winnings} and Your left credits: ${creditLabel.text}`); //show winning points and left credit on console\n resetFruitTally(); //reset fruit tally\n }", "title": "" }, { "docid": "4c23716f09c7c4f6b377b9891bb3a1f3", "score": "0.6094132", "text": "drawHeldBlock() {\n if (logic.heldTetris !== \"\") {\n let x = 50;\n let y = 20;\n this.drawBlock(logic.tetriminos[logic.heldTetris], x, y);\n }\n }", "title": "" }, { "docid": "757fbb68123361622b19ce502bf3332c", "score": "0.6092024", "text": "function gameover()\n{\n go.drawAnimated(0,0,[0]);//game over image\n wall.draw(translate,310,32,32);//previous positions of the blocks\n wall.draw(translate2,310,32,32);//hence helping the player understand jump lengths\n wall.draw(translate3,310,32,32);\n manrun.drawAnimated(manx,many,[0,1,2,3,4,5,6,7]);//game is over\n\n}", "title": "" }, { "docid": "5ca6ec0690198170ba4d4824f73cc526", "score": "0.6045399", "text": "function displaybuffs() {\n\n if (buffs.ignite) {\n stroke(0, 97, 255);\n strokeWeight(3);\n noFill();\n rect(width * 0.34, height * 0.8, width * 0.0145, width * 0.0145);\n image(images.ignite, width * 0.34, height * 0.8, width * 0.015, width * 0.015);\n if (mouseX >= width * 0.34 && mouseX <= width * 0.355 && mouseY >= height * 0.8 && mouseY <= height * 0.83) {\n fill(0, 0, 0, 75);\n rect(mouseX - width * 0.075, mouseY - height * 0.2, width * 0.15, height * 0.15, 25);\n noStroke();\n fill(226, 20, 20);\n textSize(width / 75);\n text(\"Ignite\", mouseX, mouseY - height * 0.165);\n fill(255);\n textSize(width / 120);\n text(\"This unit is dealing 10%\", mouseX, mouseY - height * 0.125);\n text(\"increased damage, this unit's\", mouseX, mouseY - height * 0.105);\n text(\"critical strikes deal 125% damage\", mouseX, mouseY - height * 0.085);\n } \n } \n\n if (buffs.barrier) {\n stroke(0, 97, 255);\n strokeWeight(3);\n noFill();\n rect(width * 0.36, height * 0.8, width * 0.0145, width * 0.0145);\n image(images.barrier, width * 0.36, height * 0.8, width * 0.015, width * 0.015);\n if (mouseX >= width * 0.36 && mouseX <= width * 0.375 && mouseY >= height * 0.8 && mouseY <= height * 0.83) {\n fill(0, 0, 0, 75);\n rect(mouseX - width * 0.075, mouseY - height * 0.2, width * 0.15, height * 0.15, 25);\n noStroke();\n fill(225, 258, 53);\n textSize(width / 75);\n text(\"Barrier\", mouseX, mouseY - height * 0.165);\n fill(255);\n textSize(width / 120);\n text(\"This unit is taking 15%\", mouseX, mouseY - height * 0.125);\n text(\"reduced damage\", mouseX, mouseY - height * 0.105);\n } \n }\n\n if (buffs.haste) {\n stroke(0, 97, 255);\n strokeWeight(3);\n noFill();\n rect(width * 0.61, height * 0.8, width * 0.0145, width * 0.0145);\n image(player.haste, width * 0.61, height * 0.8, width * 0.015, width * 0.015); \n if (mouseX >= width * 0.61 && mouseX <= width * 0.625 && mouseY >= height * 0.8 && mouseY <= height * 0.83) {\n fill(0, 0, 0, 75);\n rect(mouseX - width * 0.075, mouseY - height * 0.2, width * 0.15, height * 0.15, 25);\n noStroke();\n fill(0, 97, 255);\n textSize(width / 75);\n text(\"Haste\", mouseX, mouseY - height * 0.165);\n fill(255);\n textSize(width / 120);\n text(\"This unit has + 20\", mouseX, mouseY - height * 0.125);\n text(\"movement speed\", mouseX, mouseY - height * 0.105);\n } \n }\n\n if (buffs.angelicshield) {\n stroke(0, 97, 255);\n strokeWeight(3);\n noFill();\n rect(width * 0.63, height * 0.8, width * 0.0145, width * 0.0145);\n image(player.angelicshield, width * 0.63, height * 0.8, width * 0.015, width * 0.015);\n if (mouseX >= width * 0.63 && mouseX <= width * 0.645 && mouseY >= height * 0.8 && mouseY <= height * 0.83) {\n fill(0, 0, 0, 75);\n rect(mouseX - width * 0.075, mouseY - height * 0.2, width * 0.15, height * 0.15, 25);\n noStroke();\n fill(0, 97, 255);\n textSize(width / 75);\n text(\"Angelic Shield\", mouseX, mouseY - height * 0.165);\n fill(255);\n textSize(width / 120);\n text(\"This unit is taking 10%\", mouseX, mouseY - height * 0.125);\n text(\"reduced damage\", mouseX, mouseY - height * 0.105);\n } \n }\n\n if (buffs.holyfire) {\n stroke(0, 97, 255);\n strokeWeight(3);\n noFill();\n rect(width * 0.65, height * 0.8, width * 0.0145, width * 0.0145);\n image(player.holyfire, width * 0.65, height * 0.8, width * 0.015, width * 0.015); \n if (mouseX >= width * 0.65 && mouseX <= width * 0.665 && mouseY >= height * 0.8 && mouseY <= height * 0.83) {\n fill(0, 0, 0, 75);\n rect(mouseX - width * 0.075, mouseY - height * 0.2, width * 0.15, height * 0.15, 25);\n noStroke();\n fill(0, 97, 255);\n textSize(width / 75);\n text(\"Holy Fire\", mouseX, mouseY - height * 0.165);\n fill(255);\n textSize(width / 120);\n text(\"This unit is dealing 10%\", mouseX, mouseY - height * 0.125);\n text(\"increased damage\", mouseX, mouseY - height * 0.105);\n } \n }\n\n}", "title": "" }, { "docid": "0d7cf0ee2474ef30d96b572eebe13d8b", "score": "0.6027117", "text": "function showWinMessage() {\n playerMoney += winnings;\n resetFruitTally();\n checkJackPot();\n drawSlotMachine();\n}", "title": "" }, { "docid": "3ea87da86047fec4413ad191f246c85a", "score": "0.59821576", "text": "function showReplayMsg() {\n if (gameisover || gameiswon) {\n dashCtx.fillStyle = \"#ff0\";\n dashCtx.fillText(\"[[Rejouer : *ENTREE*]]\", 20, 410 );\n }\n }", "title": "" }, { "docid": "323b9093ab6af22bd09bfd8d55b6669e", "score": "0.5981347", "text": "function winMessage()\n{\n\tif (turn === 0) {\n\t\tconsole.log(\"\\x1b[32mI lost... sniff... but I'll get you next time!!\"\n\t\t\t+ \"\\x1b[0m\\n\")\n\t} else {\n\t\tconsole.log('\\x1b[31mYou lost, too bad...\\x1b[0m\\n')\n\t}\n}", "title": "" }, { "docid": "f1c90b07b2d836c24c886d265e262c6f", "score": "0.5963311", "text": "function showDiff()\n{\n\tfor (i=0; i<15; i++)\n\t\tdocument.images[\"tslot\"+i].src=\"images/\"+theme+\"/sempty.gif\";\n\n\t/* Compute chessmen difference */\n\tfor (i=0; i<5; i++) \n\t\tdiff[i]=0;\n\tfor (i=0; i<64; i++)\n\t\tif (board[i] > 0) {\n\t\t\tif (board[i] >=7 && board[i]<12)\n\t\t\t\tdiff[board[i]-7]--;\n\t\t\telse\n\t\t\t\tif (board[i] >=1 && board[i]<6)\n\t\t\t\t\tdiff[board[i]-1]++;\n\t\t}\n\n\t/* Bottom player first */\n\tslot_id=0;\n\tfor(i=0; i<5; i++) {\n\t\tname=diff_names[4-i];\n\t\tif (bottom==\"b\" && diff[4-i]<0) {\n\t\t\tfor (j=0; j<-diff[4-i]; j++) {\n\t\t\t\tdocument.images[\"tslot\"+slot_id].src=\n\t\t\t\t\t\"images/\"+theme+\"/sb\"+name+\".gif\";\n\t\t\t\tslot_id++;\n\t\t\t}\n\t\t} else if (bottom==\"w\" && diff[4-i]>0) {\n\t\t\tfor (j=0; j<diff[4-i]; j++) {\n\t\t\t\tdocument.images[\"tslot\"+slot_id].src=\n\t\t\t\t\t\"images/\"+theme+\"/sw\"+name+\".gif\";\n\t\t\t\tslot_id++;\n\t\t\t}\n\t\t}\n\t}\n\t/* Have one slot empty for separation */\n\tif (slot_id > 0) {\n\t\tdocument.images[\"tslot\"+slot_id].src=\"images/\"+theme+\"/sempty.gif\";\n\t\tslot_id++;\n\t}\n\t/* Top player next */\n\tfor(i=0; i<5; i++) {\n\t\tname=diff_names[4-i];\n\t\tif (bottom==\"b\" && diff[4-i]>0) {\n\t\t\tfor (j=0; j<diff[4-i]; j++) {\n\t\t\t\tdocument.images[\"tslot\"+slot_id].src=\n\t\t\t\t\t\"images/\"+theme+\"/sw\"+name+\".gif\";\n\t\t\t\tslot_id++; \n\t\t\t}\n\t\t}\n\t\telse if (bottom==\"w\" && diff[4-i]<0) {\n\t\t\tfor (j=0; j<-diff[4-i]; j++) {\n\t\t\t\tdocument.images[\"tslot\"+slot_id].src=\n\t\t\t\t\t\"images/\"+theme+\"/sb\"+name+\".gif\";\n\t\t\t\tslot_id++;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d7b7d9c004019cf091e99ad4210b6186", "score": "0.5926412", "text": "display() {\n if (!this.isFailed) { // display when game is actvie\n push();\n noStroke();\n imageMode(CENTER);\n this.radius = this.power;\n image(this.playerImg, this.x, this.y, 2 * this.radius, 2 * this.radius);\n pop();\n }\n }", "title": "" }, { "docid": "81e006cacf479150e613cb6b059ea575", "score": "0.5871135", "text": "function evaluateGame(){\n\t\tif (lost){\n\t\t\tlose();\n\t\t} else if (uncoveredBlocks == width * height - totalMines){\n\t\t\twin();\n\t\t}\n\t}", "title": "" }, { "docid": "3f7602a487d56f8630f55f244dedf5ac", "score": "0.58672", "text": "display() {\n // random color\n fill(this.color);\n // block\n rect(this.location.x, this.location.y, this.width, this.height);\n }", "title": "" }, { "docid": "588a27a23c9c1be271f127f5dacd7f94", "score": "0.58566403", "text": "function win(who, winArr) {\r\n\tlet text = '', color = ''; //initializes local variables\r\n\tresetButton.style.display = 'none'; //hides reset button\r\n\tbanners.style.display = 'none'; //removes main banners\r\n\t//if user win, assigns vars for winning blocks to green, and user win text\r\n\tif (who === 'user') { color = '#2ad61d', text = 'YOU WIN!!!'; }\r\n\t//else if machine wins, assigns red to winning block var and machine win text\r\n\telse { color = '#ff2100', text = 'MACHINE WINS!!!'; }\r\n\th2.innerText = text; //sets final message to appropriate winner\r\n\t//iterates over winning blocks and colors them as assigned\r\n\twinArr.forEach(function (el) {\r\n\t\tblocks[el].style.backgroundColor = color;\r\n\t});\r\n\t//displays final message\r\n\th2.style.display = 'block';\r\n\t//calls reset() on 3.5 sec delay\r\n\tsetTimeout(function () {\r\n\t\treset();\r\n\t}, 3500);\r\n}", "title": "" }, { "docid": "98a25db69fd3561e634aba05a21fa8da", "score": "0.5845556", "text": "show() {\n\t\tnoFill();\n\t\t//rect(this.x+10,this.y+5,this.r-20,this.r);\n\t\t//rect(this.x,this.y, this.r, this.r);\n\t\tif (!this.jumping) {\n\t\t\t// image(playerRun[frameCount%playerRun.length],this.x,this.y,this.r,this.r);\n\t\t\timage(playerRun[floor(this.ind) % playerRun.length], this.x, this.y, this.r, this.r);\n\t\t} else {\n\t\t\timage(playerJump[(frameCount + 3) % playerJump.length], this.x, this.y, this.r, this.r);\n\t\t}\n\t}", "title": "" }, { "docid": "3d6928dae91b9cca5ea197624f6a887b", "score": "0.5832513", "text": "static showAll() {\n if (!game.isOver) {\n this._updateAll();\n statsConsole.show();\n }\n }", "title": "" }, { "docid": "0355884e0d479648ffecc3953c5e9afd", "score": "0.58204234", "text": "display() { // Everything else displayed in the buyable button after the title\n let data = getClickableState(this.layer, this.id)\n return \"Matter Boosts: \" + data + \"\\n\\\n Multiplies all Matter Dimension gain by \"+format(tmp[this.layer].clickables[this.id].effect)+\"x.\\n\\\n Requires \"+format(tmp[this.layer].clickables[this.id].goal)+\" tickspeed upgrades.\"\n }", "title": "" }, { "docid": "f71ab13b58ec5c2201927e3f1fc97c29", "score": "0.5813749", "text": "display() {\n if (this.show) {\n push();\n rectMode(CENTER);\n // darken the screen\n fill(0, 100);\n rect(this.x, this.y, width, height);\n // window\n fill(255);\n stroke(this.color);\n strokeWeight(8);\n rect(this.x, this.y, this.width, this.height);\n // top border\n noStroke();\n fill(this.color);\n rect(this.x, this.y - this.height / 2 + this.height / 16, this.width, this.height / 8);\n fill(255);\n textAlign(CENTER, CENTER);\n textSize(32);\n text(\"-- \" + this.title + \" --\", this.x, this.y - this.width / 2 + this.height / 16);\n fill(0);\n // buttons\n if (this.id === 0 || this.id === 1) {\n text(\"CLOSE\", this.x, this.y + this.width / 2 - this.height / 8);\n } else if (this.id === 2) {\n text(\"READ\", this.x, this.y + this.width / 2 - this.height / 8);\n }\n\n fill(0, 200);\n textAlign(CENTER, TOP);\n textSize(16);\n text(this.des, this.x, this.y - this.width / 4 - 32);\n pop();\n }\n }", "title": "" }, { "docid": "49925d1cd9385c9a9a74e406026274fd", "score": "0.5809601", "text": "function displayGameOver(){\n displayLives();\n context.fillStyle=\"red\";\n context.fillRect(4.5*box,8*box,10*box,5*box);\n context.strokeStyle = \"black\";\n context.strokeRect(4.5*box,8*box,10*box,5*box);\n displayText(\"Game over!!\",5.5*box,10*box,50);\n displayText(\"Score : \"+score,6.5*box,12*box,50);\n}", "title": "" }, { "docid": "4a7dcb5dae21a8ef7fc6fd9517604d65", "score": "0.5798749", "text": "function output(win){\n $scope.winner = true;\n win ? displayWinCombo(isWinner(state, $scope.currentPlayer, true)) : null;\n var msg = win ? $scope.currentPlayer.name +' wins !!' : 'draw !!';\n $scope.outputMsg = msg;\n $scope.$digest();\n }", "title": "" }, { "docid": "d8c1b5c0c6bbb9a4d9a05640dee7e0f6", "score": "0.57976186", "text": "function drawBlockLevel() {\r\n var y = Math.round(chartHeight - self.options.plot.block * consumptionScreenRatio);\r\n context.strokeStyle = \"#CF4520\";\r\n context.dashedLine(self.options.chart.marginLeft, y, chartWidth + self.options.chart.marginLeft, y);\r\n context.stroke();\r\n context.fillStyle = \"rgba(255,255,255,0.5)\";\r\n context.fillRect(self.options.chart.marginLeft, y, chartWidth, Math.round(self.options.plot.block * consumptionScreenRatio));\r\n context.addText({\r\n x : self.options.chart.marginLeft - 1,\r\n y : y + 5,\r\n text : self.options.plot.block,\r\n color : \"#CF4520\",\r\n textAlign : \"right\"\r\n })\r\n }", "title": "" }, { "docid": "102dfa00188257ba391f83f8d83e3ca4", "score": "0.57938343", "text": "gameOverDisplay() {\n push();\n let title = this.gameOver;\n fill(255);\n textSize(70);\n textAlign(CENTER, CENTER);\n text(title, this.endTitleX, this.endTitleY);\n pop();\n this.restart();\n }", "title": "" }, { "docid": "6c6e6d4169f10f0634a4ddc337f5ac36", "score": "0.5787886", "text": "display() {\n //Calculate the width and height of each block\n let w = (width * this.scaleFactor) / this.size;\n let h = w;\n\n //Display Extras\n for(let y in this.grid) {\n \tfor(let x in this.grid[y]) {\n\t\t\tpush()\n\t\t\trectMode(CENTER);\n\t \ttranslate(w / 2 + (width - w * this.size) / 2 + x * w, h / 2 + (height - h * this.size) / 2 + y * h);\n\t \tfill(240);\n\t \tstrokeWeight(1);\n\t \tstroke(200);\n\t \trect(0, 0, w, h);\n\t \tpop();\n \t}\n }\n\n //Loop through the groups array and display each block\n for (let y in this.grid) {\n let row = this.grid[y];\n for (let x in row) {\n let block = row[x];\n\n\t\tif(block == null) {\n \tcontinue;\n }\n\n push();\n rectMode(CENTER);\n stroke(150);\n //Set the position of each block\n translate(w / 2 + (width - w * this.size) / 2 + x * w, h / 2 + (height - h * this.size) / 2 + y * h);\n \n\n\n // console.log(block);\n if(block.status == 0) {\n\t fill(255);\n } else if (block.status == 1) {\n \tfill(255, 200, 200);\n } else if (block.status == 2) {\n \tfill(200, 200, 255);\n } else if (block.status == 3) {\n \tfill(200, 200, 255);\n }\n rect(0, 0, w, h);\n \n //Display the correct number\n textAlign(CENTER, CENTER);\n textSize(w * 0.5);\n fill(0);\n if(!Number.isInteger(block.value)) {\n \tblock.value = \"\"\n }\n text(block.value, 0, 0);\n let groupNum = this.grid[y][x].groupNumber\n \n //Display the thicker lines around each group\n strokeWeight(5);\n stroke(0);\n // Check the top of each block\n if (block.y == 0 || this.grid[block.y - 1][block.x] == null || groupNum != this.grid[block.y - 1][block.x].groupNumber) {\n line(0 - w / 2, 0 - h / 2, 0 + w / 2, 0 - h / 2);\n }\n //Check the bottom of each block\n if (block.y == this.size - 1 || this.grid[block.y + 1][block.x] == null || groupNum != this.grid[block.y + 1][block.x].groupNumber) {\n line(0 - w / 2, 0 + h / 2, 0 + w / 2, 0 + h / 2);\n }\n //Check the left of each block\n if (block.x == 0 || this.grid[block.y][block.x - 1] == null || groupNum != this.grid[block.y][block.x - 1].groupNumber) {\n line(0 - w / 2, 0 - h / 2, 0 - w / 2, 0 + h / 2);\n }\n //Check the right of each block\n if (block.x == this.size - 1 || this.grid[block.y][block.x + 1] == null || groupNum != this.grid[block.y][block.x + 1].groupNumber) {\n line(0 + w / 2, 0 - h / 2, 0 + w / 2, 0 + h / 2);\n }\n pop();\n }\n }\n\n /*\n Display the group operation and target value\n Loops through the grid and displays the info in the\n top-most then left-most block of each group\n Tracks entered groups in the displayedOperations object\n to prevent duplicate displays\n */\n let displayedOperations = {}\n for (let y in this.grid) {\n let row = this.grid[y];\n for (let x in row) {\n let block = row[x];\n if(block == null) {\n \tcontinue;\n }\n if (displayedOperations[block.groupNumber] == null) {\n push();\n translate(w / 2 + (width - w * this.size) / 2 + x * w, h / 2 + (height - h * this.size) / 2 + y * h);\n fill(0);\n noStroke();\n textAlign(LEFT, CENTER);\n textSize(w * 0.15);\n if(!Number.isInteger(this.groups[block.groupNumber].value)) {\n\t \tthis.groups[block.groupNumber].value = \"\"\n\t }\n let dispText = this.groups[block.groupNumber].value + this.groups[block.groupNumber].operation;\n text(dispText, 0 - w * 0.41, 0 - h * 0.3);\n displayedOperations[block.groupNumber] = dispText;\n pop();\n }\n }\n }\n }", "title": "" }, { "docid": "537a5e9574a0929845e50fed9fba1f45", "score": "0.5782861", "text": "display() {\n push();\n image(imgPlayer, this.x, this.y, this.size, this.size);\n //Set the predicted image to be slightly opaque\n tint(255, 120);\n image(imgPlayer, this.nextMoveX, this.nextMoveY, this.size, this.size);\n pop();\n }", "title": "" }, { "docid": "b8f0002a27af2158a9ebd337ac97c52f", "score": "0.5777869", "text": "function drawWinsLosses(data, target) {\n\n\t\t$(target).empty();\n\n\t\tfor (i=0; i<data.wins; i++) {\n\t\t\t$(target).append(\"<span class='game-log one-run-win'>W</span>\");\n\t\t}\n\n\t\tfor (i=0; i<data.losses; i++) {\n\t\t\t$(target).append(\"<span class='game-log one-run-loss'>L</span>\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "19b25a6ac86f995e57accba1ecda575c", "score": "0.57744473", "text": "function winning() {\n clearInterval(gameON)\n $('#winningMessage > div').text('WiNNeR')\n $(\"#nextLevel\").css('display', 'flex')\n $(`#winningMessage`).addClass('show')\n}", "title": "" }, { "docid": "b0ce5383c74e51bc8a1e6be2160183e3", "score": "0.5772212", "text": "function inGameShopDisplay() {\n if (shopSubstate && state === \"game\") {\n\n fill(198, 211, 255, 165);\n rect(width * 0.13, height * 0.02, width * 0.7, height * 0.8);\n\n for (let y = 0; y < 6; y++) {\n for (let x = 0; x < 5; x++) {\n inGameShop[x][y].run();\n }\n }\n\n textSize(width / 30);\n fill(111, 242, 24);\n stroke(0);\n text(\"Shop\", width * 0.7, height * 0.08);\n \n //freeze buff timing\n if (abilitytiming.r !== -500) {\n abilitytiming.r = abilitytiming.r + 16 + 2/3;\n }\n if (abilitytiming.ignite !== -500) {\n abilitytiming.ignite = abilitytiming.ignite + 16 + 2/3;\n }\n if (abilitytiming.barrier !== -500) {\n abilitytiming.barrier = abilitytiming.barrier + 16 + 2/3;\n }\n\n } \n}", "title": "" }, { "docid": "63ad1edd9f1723e9974a44bc9a0de355", "score": "0.5763228", "text": "display() {\n push();\n rectMode(CORNER);\n imageMode(CENTER);\n noStroke();\n // display if the player is not dead\n if (!this.dead) {\n if (this.faceLeft) {\n image(this.texture, this.x, this.y, this.radius * 2, this.radius * 2);\n } else {\n image(this.texture_flipped, this.x, this.y, this.radius * 2, this.radius * 2);\n }\n // health bar\n fill(100);\n rect(this.x - this.radius, this.y - 40, this.radius * 2, 5);\n fill(255); // white\n rect(this.x - this.radius, this.y - 40, this.health * 2, 5);\n }\n pop();\n }", "title": "" }, { "docid": "01c0d5ac8c38b8999f3ee9ffb0afeb3b", "score": "0.573616", "text": "function gameStatus(pointsAccumulated) {\n targetNumber\n wins\n loss\n if(pointsAccumulated===targetNumber){\n wins++\n $(\"#win-box\").text(`Wins: ${wins}`);\n startGame();\n \n\n }else if (pointsAccumulated>targetNumber){\n loss++\n $(\"#loss-box\").text(`Loss: ${loss}`);\n $(\"#info-box\").text(`Sorry you lose :()`)\n startGame();\n console.log(loss);\n\n }else{\n ;\n \n\n }\n }", "title": "" }, { "docid": "263357094bbd937df9571ea31dade49e", "score": "0.5732352", "text": "function showGameOver() {\n background(\"#E84D53\");\n // Set up the font\n textSize(25);\n textAlign(CENTER, CENTER);\n fill(0);\n // Set up the text to display\n let gameOverText = \"GAME OVER\\n\"; // \\n means \"new line\"\n gameOverText = gameOverText + \"YOU KILLED ME!!!!\";\n let gameOverPreyEaten = \"\\nNumber of prey eaten:\" + prey.Eaten;\n // Display it in the centre of the screen\n text(gameOverText, width/2, height/2+35);\n textSize(15);\n text(gameOverPreyEaten, width/2, 435);\n push();\n imageMode(CENTER);\n drawAngryOwl();\n pop();\n // Draw restart button\n drawRestart();\n // Stop sound\n funnySound.stop();\n\n }", "title": "" }, { "docid": "bc4216db5e4b85ec4219577e4a529ff1", "score": "0.57306474", "text": "draw(){\r\n this.updateOverlayMessage('Game ended in a draw. You are both winners (or losers)!');\r\n this.showOverlay();\r\n }", "title": "" }, { "docid": "e0840ac6fb6bb7149a35104a20a64cab", "score": "0.57266897", "text": "displayNeo() {\n document.querySelector(\".map .neoPos\").classList.remove(\"hiddenOp\")\n this.neoBlink()\n setTimeout(() => {\n this.playAudio(this.audios[\"help1\"].src)\n this.neoChatWrite(this.audios[\"help1\"].transcript)\n }, 1000);\n }", "title": "" }, { "docid": "7f105999249d802e6e6e082d6b40a4ff", "score": "0.5713039", "text": "function draw_win_loss() {\n\n\twin_loss_graph.append(\"rect\")\n\t\t\t.attr(\"width\", bb_win_loss.w)\n\t\t\t.attr(\"height\", bb_win_loss.h)\n\t\t\t.attr(\"x\", 0)\n\t\t\t.attr(\"y\", 0)\n\t\t\t.attr(\"id\", \"loss_rect\")\n\t\t\t.attr(\"class\", \"loss\");\n\n\twin_loss_graph.append(\"rect\")\n\t\t\t.attr(\"width\", bb_win_loss.w/2)\n\t\t\t.attr(\"height\", bb_win_loss.h)\n\t\t\t.attr(\"x\", 0)\n\t\t\t.attr(\"id\", \"win_rect\")\n\t\t\t.attr(\"y\", 0)\n\t\t\t.attr(\"class\", \"win\");\n\n\twin_loss_graph\n\t\t\t.append(\"text\")\n\t\t\t.attr(\"x\", -65)\n\t\t\t.attr(\"y\", 20)\n\t\t\t.attr(\"class\", \"win text\")\n\t\t\t.attr(\"text-anchor\", \"start\")\n\t\t\t.text(\"HWELLO!!!\")\n\t\t\t.style(\"fill\", \"black\");\n\n\twin_loss_graph\n\t\t\t.append(\"text\")\n\t\t\t.attr(\"x\", 315)\n\t\t\t.attr(\"y\", 20)\n\t\t\t.attr(\"class\", \"loss text\")\n\t\t\t.attr(\"text-anchor\", \"end\")\n\t\t\t.text(\"HWELLO!!!\")\n\t\t\t.style(\"fill\", \"black\");\n\n\twin_loss_graph.append(\"text\")\n\t\t\t.attr(\"transform\", \"translate(130,-10)\")\n\t\t\t.attr(\"text-anchor\", \"middle\")\n\t\t\t.text(\"Win-Loss Percentage\")\n\t\t\t.style(\"font-weight\", null);\n}", "title": "" }, { "docid": "65cd5a863c07a7e035bbb21e9bdd341c", "score": "0.5699928", "text": "function won () {\n for (let i = 0; i < nrOfBlocks; i++) {\n temp[i].hidden = true\n }\n paragraf.innerHTML = 'You won!<br><br>Incorrect guesses: ' + incorrectGuesses.toString()\n restart.hidden = false\n }", "title": "" }, { "docid": "e69f9df695d6c9bb3ea32ac986dcceaf", "score": "0.56929976", "text": "function displayGameInfo() {\n console.clear();\n console.log('*** Twenty-One Game ***');\n}", "title": "" }, { "docid": "2ce6a4a26977f0afa56a464495b2c609", "score": "0.56919444", "text": "function winner(winDetected, winCon) {\n if ( winDetected == \"win\") {\n // var showMe = winDetected;\n var activePlayer = document.getElementById(\"showPlayer\").innerHTML ;\n var txt2 = \"That's three in a row, \" + activePlayer + \" wins!!!!\" ;\n writeMsg(txt2) ;\n var btn = document.getElementById(\"btnStart\") ;\n startEnabled(btn) ; //enable the start button since the game is now stopped\n var btn = document.getElementById(\"btnStop\") ;\n btnDisabled(btn) ; // disable the stop button since the game is now stopped\n document.getElementById(\"showPlayer\").innerHTML = \"Game Stopped\";\n glowBoard(winCon) ; //call function to make the gameboard pulse with colors\n }\n}", "title": "" }, { "docid": "58e79d9af0df41624600727184b4dbac", "score": "0.56875056", "text": "function winMessage() {\r\n $('#totalMoves').html(moves);\r\n $('#totalStars').text(''); // clear totalstars span\r\n totalSeconds = seconds;\r\n totalMinutes = minutes;\r\n $('#totalTime').html(`${totalMinutes}:${totalSeconds}`);\r\n $('#winModal.hidden').removeClass('hidden'); // show win modal\r\n }", "title": "" }, { "docid": "00a9f740e31bbae978bee48240902dff", "score": "0.56842285", "text": "function showbreak(){\n var txt = '您已断开连接,请刷新本页重试! <a href=\"javascript:window.location.reload()\">刷新本页<\\/a>';\n $('#playerloss').html(txt);\n $('#playerloss').fadeIn(600);\n }", "title": "" }, { "docid": "4db1b0638513ad55bb1c0dd65d98e3f3", "score": "0.56821585", "text": "drawUpcomingBlocks() {\n let x = 350;\n let y = 20;\n logic.upcomingTetris.forEach((block) => {\n this.drawBlock(logic.tetriminos[block], x, y);\n y += 40;\n });\n }", "title": "" }, { "docid": "53a27fffbd5f64bbd47b923666e6ba6d", "score": "0.5673842", "text": "function showWinMessage() {\n playerMoney += winnings;\n notification.SetText(\"You Won: \" + winnings);\n resetFruitTally();\n checkJackPot();\n }", "title": "" }, { "docid": "78b74d5b265f9d7e421bc16cb8b877fb", "score": "0.56697047", "text": "display() {\n // Display only if raining is true\n if (this.raining === true) {\n push();\n noStroke();\n fill(this.fillColor)\n ellipse(this.x, this.y, this.radius, this.radius)\n pop();\n }\n }", "title": "" }, { "docid": "1464225120437408ea15030215bf09fa", "score": "0.5669248", "text": "function gameOver() {\n\n\t// highlights all the still hidden mines\n\tvar rc = {row: 0, col: 0};\n\tfor (rc.row = 0; rc.row < size.lvl; rc.row++) {\n\t\tfor (rc.col = 0; rc.col < size.lvl; rc.col++) {\n\t\t\tif ((flags[rc.row][rc.col] != FLAG.clr) && (minefield[rc.row][rc.col] == MINE.armed)) {\n\t\t\t\tdrawRect('red', rc);\n\t\t\t\tdrawMine(rc);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tvar m1 = document.getElementById(\"message1\");\n\tm1.innerHTML = \"Game Over!!\";\n\tm1.style.fontSize = \"40px\";\n\tm1.style.fontWeight = \"bold\";\n\tm1.style.fontFamily = \"Sansita One\";\n\tm1.style.color = \"red\";\n\tvar m2 = document.getElementById(\"message2\");\n\tm2.innerHTML = \"(Click to play again.)\";\n\tm2.style.fontSize = \"16px\";\n\tm2.style.fontFamily = \"Satisfy\";\n\tm2.style.color = \"black\";\n\t\n\treturn;\n}", "title": "" }, { "docid": "43ec892f514c3fcb30aa4af5c8b8fdfd", "score": "0.56658983", "text": "TransitionScreenDisplay(message, result) {\n push();\n let title = message;\n fill(this.fillColor);\n textSize(70);\n textAlign(CENTER, CENTER);\n text(title, this.startTitleX, this.startTitleY);\n pop();\n // If player won\n if (result) {\n this.winned = true;\n this.next();\n }\n // If he failed\n else {\n this.failed = false;\n this.next();\n }\n }", "title": "" }, { "docid": "0815035213349f3b8af700fe29922724", "score": "0.56597483", "text": "function winLoss() {\n // display\n console.log(`You've won ${wins} games and have lost ${losses} times.\\r\\n`);\n playAgain();\n}", "title": "" }, { "docid": "639dd9619a8d0ac9661498c310b974e7", "score": "0.56550616", "text": "function newFrame() {\n\t\t//limpa a tela\n\t\tscreen.clearRect(0, 0, canvas.width, canvas.height);\n\n\t\tconst block = {\n\t\t\tsize: null,\n\t\t\tspace: null\n\t\t}\n\n\t\tblock.space = 80 / state.size;\n\n\t\tblock.size = {\n\t\t\twidth: (canvas.width - (state.size * block.space) - block.space) / state.size,\n\t\t\theight: (canvas.height - (state.size * block.space) - block.space) / state.size\n\t\t}\n\n\t\tscreen.textBaseline = 'middle';\n\t\tscreen.textAlign = 'center';\n\n\t\tconst color = {\n\t\t\tbackground: 'darkgray',\n\t\t\temptyBlock: 'white',\n\t\t\tnotEmptyBlock(value) {\n\t\t\t\treturn `rgb(\n ${(2 ** value <= 2048) ? (255) : (0)},\n ${(2 ** value <= 2048) ? (200 - Math.floor(mapping(value, 0, Math.log2(2048), 0, 200))) : (0)},\n ${(2 ** value <= 2048) ? (200 - Math.floor(mapping(value, 0, Math.log2(2048), 0, 200))) : (0)}\n )`;\n\t\t\t},\n\t\t\ttext: 'white'\n\t\t}\n\n\t\tscreen.fillStyle = \"darkgray\";\n\t\tscreen.fillRect(0, 0, canvas.width, canvas.height);\n\n\t\tfor (let line in state.grid) {\n\t\t\tfor (let column in state.grid[line]) {\n\t\t\t\tprintBlock(line, column, state.grid[line][column]);\n\t\t\t}\n\t\t}\n\n\t\trunAnimations();\n\n\t\tfunction runAnimations() {\n\t\t\tconst animation = animationsList[0];\n\t\t\tconst animationStep = 50;\n\n\t\t\tconst moves = {\n\t\t\t\tmove() {\n\t\t\t\t\t//printa o bloco em movimento\n\t\t\t\t\tif (animation.to.x != animation.from.x) {\n\t\t\t\t\t\t//vertical\n\t\t\t\t\t\tlet progressRelation = (animation.to.x > animation.from.x) ? (animation.progress) : (100 - animation.progress);\n\t\t\t\t\t\tlet blocksToMove = (Math.abs(animation.to.x - animation.from.x)) * (progressRelation) / 100;\n\t\t\t\t\t\tlet absoluteBlockPosition = (animation.to.x > animation.from.x) ? (animation.from.x + blocksToMove) : (animation.to.x + blocksToMove);\n\n\t\t\t\t\t\tprintBlock(absoluteBlockPosition, animation.to.y, animation.value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//horizontal\n\t\t\t\t\t\tlet progressRelation = (animation.to.y > animation.from.y) ? (animation.progress) : (100 - animation.progress);\n\t\t\t\t\t\tlet blocksToMove = (Math.abs(animation.to.y - animation.from.y)) * (progressRelation) / 100;\n\t\t\t\t\t\tlet absoluteBlockPosition = (animation.to.y > animation.from.y) ? (animation.from.y + blocksToMove) : (animation.to.y + blocksToMove);\n\n\t\t\t\t\t\tprintBlock(animation.to.x, absoluteBlockPosition, animation.value);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tjoin() {\n\t\t\t\t\t//printa o bloco em movimento\n\t\t\t\t\tif (animation.to.x != animation.from.x) {\n\t\t\t\t\t\t//vertical\n\t\t\t\t\t\tlet progressRelation = (animation.to.x > animation.from.x) ? (animation.progress) : (100 - animation.progress);\n\t\t\t\t\t\tlet blocksToMove = (Math.abs(animation.to.x - animation.from.x)) * (progressRelation) / 100;\n\t\t\t\t\t\tlet absoluteBlockPosition = (animation.to.x > animation.from.x) ? (animation.from.x + blocksToMove) : (animation.to.x + blocksToMove);\n\n\t\t\t\t\t\tprintBlock(absoluteBlockPosition, animation.to.y, animation.value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//horizontal\n\t\t\t\t\t\tlet progressRelation = (animation.to.y > animation.from.y) ? (animation.progress) : (100 - animation.progress);\n\t\t\t\t\t\tlet blocksToMove = (Math.abs(animation.to.y - animation.from.y)) * (progressRelation) / 100;\n\t\t\t\t\t\tlet absoluteBlockPosition = (animation.to.y > animation.from.y) ? (animation.from.y + blocksToMove) : (animation.to.y + blocksToMove);\n\n\t\t\t\t\t\tprintBlock(animation.to.x, absoluteBlockPosition, animation.value);\n\t\t\t\t\t}\n\n\t\t\t\t\t//printa o bloco novo\n\t\t\t\t\tprintBlock(animation.to.x, animation.to.y, animation.value);\n\n\t\t\t\t\tlet size = block.size.width + 2 * block.space;\n\n\t\t\t\t\t//penultimo passo\n\t\t\t\t\tif (animation.progress + (3 * animationStep) >= 100) {\n\t\t\t\t\t\tprintBlock(animation.to.x, animation.to.y, animation.value, size, size);\n\t\t\t\t\t}\n\n\t\t\t\t\t//ultimo passo\n\t\t\t\t\tif (animation.progress + animationStep >= 100) {\n\n\t\t\t\t\t\tprintBlock(animation.to.x, animation.to.y, animation.value + 1, size, size);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tappear() {\n\t\t\t\t\tlet size = block.size.width * animation.progress / 100;\n\t\t\t\t\tprintBlock(animation.in.x, animation.in.y, animation.value, size, size);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst begin = {\n\t\t\t\tmove(animationObj) {\n\t\t\t\t\tstate.grid[animationObj.from.x][animationObj.from.y] = 0;\n\t\t\t\t},\n\t\t\t\tjoin(animationObj) {\n\t\t\t\t\tstate.grid[animationObj.from.x][animationObj.from.y] = 0;\n\t\t\t\t},\n\t\t\t\tappear(animationObj) {\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst finish = {\n\t\t\t\tmove(animationObj) {\n\t\t\t\t\tstate.grid[animationObj.to.x][animationObj.to.y] = animationObj.value;\n\t\t\t\t},\n\t\t\t\tjoin(animationObj) {\n\t\t\t\t\tstate.grid[animationObj.to.x][animationObj.to.y] = animationObj.value + 1;\n\t\t\t\t},\n\t\t\t\tappear(animationObj) {\n\t\t\t\t\tstate.grid[animationObj.in.x][animationObj.in.y] = animationObj.value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (animation) {\n\t\t\t\tif (animation.progress == 0) {\n\t\t\t\t\tbegin[animation.type](animation);\n\t\t\t\t}\n\n\t\t\t\tif (moves[animation.type]) {\n\t\t\t\t\tmoves[animation.type]();\n\t\t\t\t}\n\n\t\t\t\tanimation.progress += animationStep;\n\n\t\t\t\tif (animation.progress >= 100) {\n\t\t\t\t\tconsole.log(`animated ${animationsList[0].type}`);\n\t\t\t\t\tfinish[animation.type](animation);\n\t\t\t\t\tanimationsList.shift();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction printBlock(x, y, value, width = block.size.width, height = block.size.height) {\n\t\t\tlet printParam = {\n\t\t\t\tinit: {\n\t\t\t\t\tx: block.space + y * (block.size.width + block.space),\n\t\t\t\t\ty: block.space + x * (block.size.height + block.space)\n\t\t\t\t},\n\t\t\t\tsize: block.size,\n\t\t\t\ttextPosition: null\n\t\t\t}\n\n\t\t\tprintParam.textPosition = {\n\t\t\t\tx: printParam.init.x + (printParam.size.width / 2),\n\t\t\t\ty: printParam.init.y + (printParam.size.height / 2)\n\t\t\t}\n\n\t\t\tif (value != 0) {\n\t\t\t\tscreen.fillStyle = color.notEmptyBlock(value);\n\n\t\t\t\tprintParam.init.x += (block.size.width / 2) - (width / 2);\n\t\t\t\tprintParam.init.y += (block.size.height / 2) - (height / 2);\n\n\t\t\t\tscreen.fillRect(printParam.init.x, printParam.init.y, width, height);\n\n\t\t\t\tscreen.fillStyle = color.text;\n\t\t\t\tif (String(2 ** value).length < 3) {\n\t\t\t\t\tscreen.font = `bold ${(2 / 3) * height}px Arial`;\n\t\t\t\t\tscreen.fillText(String(2 ** value), printParam.textPosition.x, printParam.textPosition.y);\n\t\t\t\t} else {\n\t\t\t\t\tscreen.font = `bold ${(2 / String(2 ** value).length) * (2 / 3) * height}px Arial`;\n\t\t\t\t\tscreen.fillText(String(2 ** value), printParam.textPosition.x, printParam.textPosition.y);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tscreen.fillStyle = color.emptyBlock;\n\t\t\t\tscreen.fillRect(printParam.init.x, printParam.init.y, printParam.size.width, printParam.size.height);\n\t\t\t}\n\t\t}\n\n\t\twindowInput.requestAnimationFrame(newFrame);\n\t}", "title": "" }, { "docid": "4913a69f6c0619e4f02ae11b4c8e04f5", "score": "0.5653121", "text": "function gameWon() {\n\t\t\n\t// highlights all the still hidden mines\n\tvar rc = {row: 0, col: 0};\n\tfor (rc.row = 0; rc.row < size.lvl; rc.row++) {\n\t\tfor (rc.col = 0; rc.col < size.lvl; rc.col++) {\n\t\t\tif ((flags[rc.row][rc.col] != FLAG.clr) && (minefield[rc.row][rc.col] == MINE.armed)) {\n\t\t\t\tdrawRect('dodgerblue', rc);\n\t\t\t\tdrawMine(rc);\n\t\t\t}\n\t\t}\n\t}\n\tvar m1 = document.getElementById(\"message1\");\n\tm1.innerHTML = \"You won!!\";\n\tm1.style.fontSize = \"40px\";\n\tm1.style.fontWeight = \"bold\";\n\tm1.style.fontFamily = \"Sansita One\";\n\tm1.style.color = \"blue\";\n\t\n\tvar m2 = document.getElementById(\"message2\");\n\tm2.innerHTML = \"(Click to play again.)\";\n\tm2.style.fontSize = \"16px\";\n\tm2.style.fontFamily = \"Satisfy\";\n\tm2.style.color = \"black\";\n\n\treturn;\n}", "title": "" }, { "docid": "5338eb9188ac99bc184b9c4369491d5b", "score": "0.5650811", "text": "function displayLosses() {\n // var lossesShown = 0;\n var lossesDisplay = document.querySelector(\"#lossesDisplay\");\n lossesDisplay.textContent = lossesShown;\n}", "title": "" }, { "docid": "3e7fd3e55739d06f04303b12e333541d", "score": "0.56462044", "text": "function winGameScreen() {\n ctx.fillStyle = \"rgba(24, 147, 223, 0.708)\";\n ctx.fillRect(0, 0, w, h);\n winText();\n }", "title": "" }, { "docid": "7ce164b73d2c4a265e8a7da0e284ea36", "score": "0.564615", "text": "function matchedBlocks(matchedBlock) {\r\n blocks = Array.from(blocksContains.children);\r\n var allMatchedBlocks = blocks.filter(matchedBlock => matchedBlock.classList.contains('matched'));\r\n if (allMatchedBlocks.length === blocks.length) {\r\n document.getElementById('game-over').style.display = 'block';\r\n document.querySelector('#box-over H1').textContent = \"Well Done\";\r\n document.querySelector('#box-over H3').textContent = \"Good game, you win..\";\r\n document.querySelector('#box-over H3').style.color = '#d103fc';\r\n document.getElementById('start-music').pause();\r\n document.getElementById('start-music').currentTime = 0;\r\n if (blocks.length <= 24) {document.getElementById('win').play();}\r\n document.querySelector('#box-over H4').style.display = 'block';\r\n document.getElementById('btn-next').style.display = 'inline-block';\r\n document.getElementById('or').style.display = 'inline-block';\r\n document.getElementById('btn-over-dynamic').style.display = 'none';\r\n \r\n // How long Game Take it\r\n var minuteTake = parseInt(document.querySelector('.btn-reset').textContent.slice(0, 2)),\r\n secondTake = parseInt(document.querySelector('.btn-reset').textContent.slice(4)),\r\n minutesTake = minuteTake * 60,\r\n timeTike = minutesTake + secondTake,\r\n timeYouTake = 119 - timeTike,\r\n timeMinute = Math.floor(timeYouTake / 60),\r\n timeSecond = timeYouTake % 60;\r\n // This is for box '#game-over'\r\n if (timeMinute === 0) {\r\n document.querySelector('#box-over H4').textContent =\r\n \"You Taked \" + timeSecond + \" seconds\";\r\n } else document.querySelector('#box-over H4').textContent =\r\n \"You Taked \" + timeMinute + \" minute and \" + timeSecond + \" seconds\";\r\n \r\n // This is for box '#game-end'\r\n if (timeMinute === 0) {\r\n document.querySelector('#box-game-end H3').textContent =\r\n \"You Taked \" + timeSecond + \" seconds\";\r\n } else document.querySelector('#box-game-end H3').textContent =\r\n \"You Taked \" + timeMinute + \" minute and \" + timeSecond + \" seconds\";\r\n \r\n if (btnSwitchDynamic.checked === true) {\r\n document.getElementById('game-over').style.display = 'none';\r\n document.getElementById('game-end').style.display = 'none';\r\n document.getElementById('game-dynamic-over').style.display = 'block';\r\n if (timeMinute === 0) {\r\n document.querySelector('#game-dynamic-over H3').textContent =\r\n \"You Taked \" + timeSecond + \" seconds\";\r\n } else document.querySelector('#game-dynamic-over H3').textContent =\r\n \"You Taked \" + timeMinute + \" minute and \" + timeSecond + \" seconds\";\r\n }\r\n }\r\n}", "title": "" }, { "docid": "1d1ea19116332893bc0d93205a611aa9", "score": "0.56457627", "text": "show(){\n console.log(\" __ __ __ __start of board_ __ __ __ __ __ __ \")\n console.log(\" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 \")\n console.log(\" __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ \")\n this.board.forEach((row, i)=>{\n if(i<10)\n process.stdout.write(i+\" |\")\n else\n process.stdout.write(i+\" |\")\n row.forEach((cell)=>{\n process.stdout.write(cell+\"_|\")\n })\n console.log()\n })\n console.log(\" __ __ __ __ end of board_ __ __ __ __ __ __ \")\n }", "title": "" }, { "docid": "3ad798772aeb3b86ef13068b038211ee", "score": "0.5641136", "text": "function renderSplitscreen() {\n ctx.beginPath();\n ctx.lineWidth = \"4\";\n ctx.strokeStyle = \"green\";\n ctx.fillStyle = \"white\";\n ctx.rect(103, 130, 303, 250);\n ctx.stroke();\n ctx.fill();\n console.log(player.lives);\n if (player.lives < 1) {\n ctx.font=\"20px Georgia\";\n ctx.fillStyle = \"green\";\n ctx.fillText(\"Game Over\", 220, 220);\n ctx.fillText(\"Press space to restart\", 140, 240);\n }\n }", "title": "" }, { "docid": "58595a98137dd16b82f64b2628296016", "score": "0.56363976", "text": "function checkStatus() {\n var characterTop = parseInt(\n window.getComputedStyle(character).getPropertyValue(\"top\")\n );\n if (!jumping) {\n character.style.top = characterTop + 3 + \"px\";\n character.style.transform = \"rotate(5deg)\";\n }\n\n let topBlockHeight = parseInt(\n window.getComputedStyle(topBlock).getPropertyValue(\"height\")\n );\n let topBlockLeft = parseInt(\n window.getComputedStyle(topBlock).getPropertyValue(\"left\")\n );\n let bottomBlockHeight = parseInt(\n window.getComputedStyle(bottomBlock).getPropertyValue(\"height\")\n );\n let bottomBlockLeft = parseInt(\n window.getComputedStyle(bottomBlock).getPropertyValue(\"left\")\n );\n if (\n //Slår i backen\n characterTop + characterHeight - 40 > gameHeight ||\n //Slår i topblock\n !(\n characterTop + characterHeight < 0 ||\n characterTop > 0 + topBlockHeight ||\n characterLeft + characterWidth < topBlockLeft ||\n characterLeft > topBlockLeft + blockWidth\n ) ||\n //Slår i bottomBlock\n !(\n characterTop + characterHeight < gameHeight - bottomBlockHeight ||\n characterTop > gameHeight ||\n characterLeft + characterWidth < bottomBlockLeft ||\n characterLeft > bottomBlockLeft + blockWidth\n )\n ) {\n // alert('hej')\n setHighscore(counter);\n gameOver = true;\n\n character.classList.add(\"crash\");\n game.style.pointerEvents = \"none\";\n clearInterval(updateInterval);\n\n setTimeout(() => {\n topBlock.remove();\n bottomBlock.remove();\n document.querySelectorAll(\".cloud\").forEach((c) => c.remove());\n counter--;\n endScore.innerHTML = counter;\n game.style.display = \"none\";\n end.style.display = \"flex\";\n\n // start.style.display = \"flex\";\n }, 2000);\n }\n}", "title": "" }, { "docid": "1dbc1dcd8c73b2393ea53a5c5727dbae", "score": "0.5634886", "text": "function neptuneWin (){\n background(20, 60, 90);\n push();\n textSize(62);\n textAlign(CENTER, CENTER);\n text (txt2, width/2, height/3);\n pop();\n push();\n textSize(62);\n textAlign(CENTER, CENTER);\n text (txt7, width/2, height/2);\n pop();\n}", "title": "" }, { "docid": "223776cb6c0e2e06b29017c39b400e9a", "score": "0.5624415", "text": "function win() {\n if (winConditionO() || winConditionX()) {\n let section = qsa(\"section\");\n let winner = gen(\"img\");\n let winMes = gen(\"p\");\n winMes.id = \"win message\";\n winMes.textContent = \"WINNER!!\";\n winner.id = \"winner\";\n let div = qsa(\"div\");\n section[1].classList.add(\"win\");\n section[1].appendChild(winner);\n section[1].appendChild(winMes);\n for (let i = 0; i < div.length; i++) {\n div[i].classList.add(\"hidden\");\n }\n if (winConditionX()) {\n winner.src = imgX;\n } else {\n winner.src = imgO;\n }\n }\n }", "title": "" }, { "docid": "f8a374c130ff57ea5cf16d0b986ff328", "score": "0.56215745", "text": "function checkLive() {\n if (char1.y1 + char1.height >= game.ground) {\n char1.onGround = true\n if (moveScreenCounter > 3) {\n gameOver = true\n } //gameover condition\n\n } else {\n char1.onGround = false\n }\n for(let i=0;i <blocks.length ;i++){\n\t if (blocks[i].x<char1.x1+char1.width-.13*char1.width && char1.x1<blocks[i].x+blocks[i].width-.131*char1.width && blocks[i].y<=char1.y1+char1.height && char1.y1+char1.height<blocks[i].y+10) {\n\t\t char1.onGround=true;\n moveScreenFlag=false;\n\t\t\tcurrentBlock=i;\n\n\n if(char1.y1 >0 && char1.y1 <=300 )\n {\n openscreen =true;\n }\n else \n { openscreen =false; } \n\t }\n }\n}", "title": "" }, { "docid": "25dd6a835104334bb6af4e821a0cf3fd", "score": "0.56211865", "text": "function updateSimulation(du) {\n\n //write out the score and level onto the web page\n //document.getElementById(\"Score\").innerHTML = score;\n //document.getElementById(\"Level\").innerHTML = level;\n \n Scorehtml.innerHTML = score;\n levelhtml.innerHTML = level;\n\n //initialize a new block if the game is restarted\n if(restart){\n geraKubb( );\n restart = false;\n }\n\n if( startGame ){\n //go through all the blocks and update them.\n //each block returns a signal telling us what needs to be done next.\n for(var i = 0; i<kubbar.length; i++){\n var stateOfBlock = kubbar[i].update(du)\n \n //if the state is 1 the block has landed and we need to make \n //another block\n if(stateOfBlock === 1){\n\n //this function checks to see if we have scored any points\n //by making a fumble\n checkForFumble(du);\n\n //logic for the new block\n geraKubb();\n \n //if the state is -1 that means that all 3 of the unit\n //blocks with in a block have been destroyd, meaning that\n //we can now get rid of that block alltogether\n }else if(stateOfBlock === -1){\n kubbar.splice(i,1);\n i--;\n }\n }\n }\n\n //various graphical options for debugging and such\n if( eatKey(G) ){ \n gridPoints = !gridPoints;\n }\n if( eatKey( KEY_ONE ) ){ \n GRID_ONE = !GRID_ONE;\n }\n if( eatKey( KEY_TWO ) ){ \n GRID_TWO = !GRID_TWO;\n }\n if( eatKey( KEY_T ) ){ \n initializeTextureMode();\n }\n if( eatKey( KEY_L ) ){ \n initializeLineMode();\n }\n\n\n if( eatKey( KEY_ENTER ) ) {\n startGame = true;\n // startIntro = true;\n initializeTextureMode();\n }\n\n\n /* if( eatKey( KEY_UP ) ){ //UP\n ppos[0] += step*lookdir[0];\n ppos[2] += step*lookdir[2];\n }\n if( eatKey( KEY_DOWN ) ){ //DOWN\n ppos[0] -= step*lookdir[0];\n ppos[2] -= step*lookdir[2];\n }\n if( eatKey( KEY_LEFT ) ){ // LEFT\n ppos[0] += step*lookdir[2];\n ppos[2] -= step*lookdir[0];\n }\n if( eatKey( KEY_RIGHT ) ){ //RIGHT \n ppos[0] -= step*lookdir[2];\n ppos[2] += step*lookdir[0];\n }\n if( eatKey( M )){\n look = !look;\n // mouselook = !mouselook;\n resetLook();*/\n\n}", "title": "" }, { "docid": "8e8dac91abc6651863dda468fdca0840", "score": "0.5619621", "text": "displayEndScreen() {\n push();\n background(this.barrierColor);\n fill(0);\n textAlign(CENTER);\n textSize(30);\n text(\"What kind of players are you???\\nHow you could both die and neither of you win the game??\", width / 2, height / 2);\n pop();\n this.restartButton();\n }", "title": "" }, { "docid": "f6b3cbb56f366ed34c33f94c2d53d876", "score": "0.56053805", "text": "function cb_blockstats(e, stats){\n\t\tif(chain_stats.height) stats.height = chain_stats.height - 1;\n\t\tsendMsg({msg: \"chainstats\", e: e, chainstats: chain_stats, blockstats: stats});\n\t}", "title": "" }, { "docid": "f6b3cbb56f366ed34c33f94c2d53d876", "score": "0.56053805", "text": "function cb_blockstats(e, stats){\n\t\tif(chain_stats.height) stats.height = chain_stats.height - 1;\n\t\tsendMsg({msg: \"chainstats\", e: e, chainstats: chain_stats, blockstats: stats});\n\t}", "title": "" }, { "docid": "a5aceadf49e781c5cb709acb4af6d7f4", "score": "0.560465", "text": "function update_pushing_status(payload_pos, payload_blocked, payload_moving_backwards, number_of_pushers, ctx){\n var status_text = \"\";\n if (!payload_blocked && (number_of_pushers > 0)) {\n if(team_name == \"US\"){\n arrow_img = document.getElementById(\"Arrow_Right_Blue\");\n } else {\n arrow_img = document.getElementById(\"Arrow_Right_Red\");\n }\n draw_pushing_status(ctx, payload_pos, arrow_img, number_of_pushers)\n } else if(payload_moving_backwards){\n if(team_name == \"US\"){\n arrow_img = document.getElementById(\"Arrow_Left_Red\");\n } else {\n arrow_img = document.getElementById(\"Arrow_Left_Blue\");\n }\n draw_pushing_status(ctx, payload_pos, arrow_img, 1)\n }\n}", "title": "" }, { "docid": "3c169428df442abacbf98bff16a1da6d", "score": "0.5604211", "text": "place() {\r\n const coord = this.block.getCoordinates();\r\n const matrix = this.block.getMatrix();\r\n matrix.forEach((row, y) => {\r\n row.forEach((value, x) => {\r\n if (value !== 0) {\r\n this.board.setAt(x + coord.x_min, y + coord.y_min, value);\r\n }\r\n })\r\n })\r\n\r\n const s = this.board.sweep();\r\n if (s >= 10) {\r\n this.events.emit('tetris');\r\n }\r\n this.score += s;\r\n this.events.emit('score', this.score);\r\n this.events.emit('board', this.board);\r\n this.block = this.nextBlock;\r\n // reset the board if there is no space for the new block\r\n if (this.isCollision(this.block)) {\r\n console.log(\"game over\");\r\n this.gameOver(this.score);\r\n this.events.emit(\"gameOver\", this.score);\r\n return;\r\n } else {\r\n this.nextBlock = this.resetBlock(); \r\n this.drawer.drawBlocks();\r\n this.events.emit('block', this.block);\r\n }\r\n }", "title": "" }, { "docid": "700ba1ef51acfea814bca8a943307ce8", "score": "0.5603835", "text": "function fluidGameplay() {\n gameplay.push(blockId)\n idStorage.push(topId)\n document.querySelector('#communicator').innerHTML = \"Please click a pole to place your block on\"\n poleClickedOn()\n blockClickedOff()\n }", "title": "" }, { "docid": "ca65dcf8d9be46c510e055602572cb83", "score": "0.56025624", "text": "function showBoard() {\n gameBoard.forEach(item => {\n placeMoves(item.m, item.c, item.p);\n });\n }", "title": "" }, { "docid": "1359000aa2119f44723b1936c442a8e0", "score": "0.5601533", "text": "function displayInstruction(){\n\tfill(\"#FFFFFF\");\n\trect(200,50,imgWidth-2*200, imgHeight-2*50,20);\n\tfill(\"#000000\");\n\ttextSize(24);\n\ttext(\"How to play?\", 220, 90);\n\ttextSize(16);\n\ttext(\"This is a two player game, first player is the red circle piece and the second \\nplayer is the green circle piece.\", 220, 120);\n\ttext(\"When it is your turn, press the \\\"Color card\\\" button and move your piece to the \\nnext color tile displayed on the card.\", 220, 160);\n\ttext(\"After you moved, if the color card also displays to click on the event card, press \\nthe \\\"Event card\\\" button and follow the directions on the card (the event card \\nmay help you reach the victory, hurt you, or give you a challenge to complete).\", 220, 220);\n\ttext(\"If a player fails to complete the challenge, that player moves 4 tiles back. \\nOtherwise, that player moves foward 2 tiles.\", 220, 280);\n\ttext(\"If the direction says to move backwards to a tile and that tiles does not exist,\\nplayer must move to the START tile. If the directions says to move forward to a \\ntile and that tiles does not exist, player must move to the END time.\", 220, 340);\n\ttext(\"If you stop at the tile that has the white bridge connected to another tile, \\nyou can move to the tile closer to the END tile.\", 220, 400);\n\ttext(\"The player that reaches the END tile first wins the game. Good Luck and Have \\nFun!\", 220, 460);\n\ttextSize(12);\n\ttext(\"if viewing from game board:\\n-press anywhere to close this window-\",imgWidth/2-120,imgHeight-75);\n}", "title": "" }, { "docid": "0b69fae17c40d80dfd8f87c915d7a5a3", "score": "0.5598231", "text": "gameWon() {\n if (this._isShutDown) return;\n this._gameWon = true; this._gameWonTime = (new Date()).getTime();\n this._noOps = true;\n this.drawForeground(true);\n }", "title": "" }, { "docid": "d418a0c46763752ca7db0878256cb48f", "score": "0.55922514", "text": "function showBoard(brd) {\n\t\tvar direction = [\"^\",\">\",\"v\",\"<\"];\n\t\tvar viewText = \"\";\n\t\tvar data = brd.getData();\n\t\tfor(var r = 0; r < data.n; r++){\n\t\t\tfor(var c = 0; c < data.n; c++){\n\t\t\t\tif(r === data.targ.r && c === data.targ.c)\n\t\t\t\t\tviewText += \"T \";\n\t\t\t\telse if( r === data.bobr && c === data.bobc)\n\t\t\t\t\tviewText += direction[data.dir]+\" \";\n\t\t\t\telse\n\t\t\t\t\tviewText += data.b[r][c]+\" \";\n\t\t\t}\n\t\t\tviewText += \"<br>\";\n\t\t}\n\t\tdocument.getElementById(\"board\").innerHTML = viewText;\n\t}", "title": "" }, { "docid": "62680eb5f2f2fab283c7933273cd8e56", "score": "0.5587487", "text": "function gameOverMessage(w, b) {\n var finalScoreBlack = document.getElementById('final_black_score');\n var finalScoreWhite = document.getElementById('final_white_score');\n var gameOverPopUp = document.getElementById('game_over');\n \n gameOverPopUp.style.display = \"block\";\n \n finalScoreBlack.innerHTML = b;\n finalScoreWhite.innerHTML = w;\n}", "title": "" }, { "docid": "2a96e008a372ab36cf685c16af7889ac", "score": "0.55853516", "text": "function winned(){\n background(\"#FFA447\");\n fill(0);\n noStroke();\n textSize(30);\n textAlign(CENTER);\n text(\"Yeayyyyy! You winned\", width/2, 335);\n // Draw restart button\n drawRestart();\n // Stop sound\n funnySound.stop();\n\n push();\n imageMode(CENTER);\n tint(255);\n image(owl.Image, width/2, 190, 270, 270);\n DrawHappyOwl(owl.ImageX, owl.ImageY, owl.ImageSize, owl.ImageSize);\n pop();\n}", "title": "" }, { "docid": "098e053d7c27926025541fd8bce41d11", "score": "0.55809563", "text": "function cb_blockstats(e, stats) {\n if (chain_stats.height) stats.height = chain_stats.height - 1;\n sendMsg({ msg: 'chainstats', e: e, chainstats: chain_stats, blockstats: stats });\n }", "title": "" }, { "docid": "8a70b724bcfbb6decbf54611aaa2dcac", "score": "0.55802745", "text": "function checkForWin() {\n\n// Conditional statement that returns true if stacks b or c contain all four pieces\n if ((stacks['b'].length === 4) || (stacks['c'].length === 4)) {\n\n// Console logs \"You Won!\" if true \n console.log('You Won!');\n\n// Resets the board to the starting configuration \n startOver();\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "d9a687bd1f9c87f0edebd5a9db97e4bf", "score": "0.55751675", "text": "function drawTopDisplay() {\n // [Jadle 100/100] -> [ATK or target desc]\n const charText = battleData.UI.top.left;\n const descriptionText = battleData.UI.top.right;\n\n // Borders\n ctx.fillStyle = \"#FFF\";\n ctx.fillRect(0, 0, canvas.width, UISpacing.displayHeight);\n\n // Box\n ctx.fillStyle = \"#225\";\n ctx.fillRect(\n UISpacing.displayBorders,\n UISpacing.displayBorders,\n canvas.width - UISpacing.displayBorders * 2,\n UISpacing.displayHeight - UISpacing.displayBorders * 2\n );\n\n // Left Text\n canvasWrite(\n UISpacing.displayBorders + UISpacing.displayPadding,\n UISpacing.displayBorders,\n charText\n );\n\n // Right Text\n canvasWrite(\n UISpacing.displayBorders + UISpacing.displayPadding + canvas.width / 3,\n UISpacing.displayBorders,\n descriptionText\n );\n}", "title": "" }, { "docid": "1c23c4eac2f3f697cab98af63ab0ea82", "score": "0.5573881", "text": "function showPuzzleTile(blockNum) {\n\tvar canvas = document.getElementById(\"block\" + blockNum);\n\tif (canvas.getContext) {\n\t\tvar ctx = canvas.getContext(\"2d\");\n\t\tctx.clearRect(0, 0, 200, 170);\n\t\tmatch_status[blockNum] = 'matched';\n\t}\t\n}", "title": "" }, { "docid": "615353d90171606ded969094d430b9ac", "score": "0.557086", "text": "debugScreen() {\n push();\n var rowHeight = scl / 2;\n background(0, 0, 20);\n textSize(standardTextSize / 2);\n fill(0, 255, 255);\n strokeWeight(1);\n var debugText =\n \"o - Debug and Keys\\n\" +\n \"m - KeyMode (different play)\\n\" +\n \"i - Fullscreen\\n\" +\n \"awsd - Player 1 possible controls\\n\" +\n \"arrow keys - Player 2 possible controls\";\n textLeading(20);\n textAlign(LEFT);\n text(debugText, windowWidth / 2, rowHeight, windowWidth, rowHeight * 10);\n pop();\n }", "title": "" }, { "docid": "f06a25b685a7910181bc9d012cc6e019", "score": "0.55674964", "text": "function showLossMessage() {\n playerMoney -= playerBet;\n winnings = 0;\n console.log(`You lost ${betLabel.text} and Your left credits: ${creditLabel.text}`); //show lost credit and left credit on console\n let winningReset = Number(winningsLabel.text);\n winningReset = 0;\n winningsLabel.setText(winningReset.toString()); //winningRabel is reseted\n resetFruitTally(); //fruit tally value is reseted\n }", "title": "" }, { "docid": "c312770c666799d49f0221d378692349", "score": "0.55631083", "text": "static visGameboard() {\r\n console.log('Current gameboard status:');\r\n console.table(this.gameboard);\r\n }", "title": "" }, { "docid": "64c45087f22e6a11bc9deb0020a083f9", "score": "0.55585074", "text": "function drawingLoop() {\n if (playerLevel === 1) {\n if (totalLevel1 < 5 && livesLevel1 > 0) {\n ctx.clearRect(0, 0, 700, 450);\n drawBin();\n drawGarbage();\n checkFloorCrash();\n checkTrashBinCrash();\n requestAnimationFrame(function() {\n drawingLoop();\n });\n }\n\n if (totalLevel1 === 5) {\n $(\".popup-end-win\").css({ display: \"block\" });\n $(\".flex-header, .flex-middle, footer\").css({ opacity: \"0.1\" });\n win.play();\n return;\n }\n if (livesLevel1 === 0) {\n $(\".popup-end-lose-level1\").css({ display: \"block\" });\n $(\".flex-header, .flex-middle, footer\").css({ opacity: \"0.1\" });\n lose.play();\n return;\n }\n }\n\n if (playerLevel === 2) {\n if (\n lifeLevel2 > 0 &&\n !(yellowPoints >= 10 && greenPoints >= 5 && whitePoints >= 5)\n ) {\n ctx.clearRect(0, 0, 700, 450);\n drawBin();\n drawGarbage();\n checkFloorCrash();\n checkTrashBinCrash();\n requestAnimationFrame(function() {\n drawingLoop();\n });\n }\n\n if (yellowPoints >= 10 && greenPoints >= 5 && whitePoints >= 5) {\n $(\".popup-end-win-level2\").css({ display: \"block\" });\n $(\".flex-header, .flex-middle, footer\").css({ opacity: \"0.1\" });\n win.play();\n return;\n }\n if (lifeLevel2 <= 0) {\n $(\".popup-end-lose-level2\").css({ display: \"block\" });\n $(\".flex-header, .flex-middle, footer\").css({ opacity: \"0.1\" });\n lose.play();\n return;\n }\n }\n}", "title": "" }, { "docid": "8b2a848d3513885ebf1928c222f63ace", "score": "0.5552502", "text": "function draw_gameOver() {\n background(0);\n\n // Draw and update stars\n stars.forEach((star) => {\n star.show();\n star.update();\n });\n\n // @Todo dont repeat\n // Draw meatball\n meatballs.forEach((meatball) => meatball.show());\n\n // Draw sauce after meatballs to show it is own the meatball\n sauce.show();\n\n // @Todo Change color of meatball to show its been sauced\n\n // @Todo dont repeat\n textAlign(CENTER);\n textSize(64);\n fill(255);\n stroke(0, 200, 0);\n text('Sauced!', width / 2, height / 2);\n}", "title": "" }, { "docid": "8714c69c3415bde1ba33460841e1e88f", "score": "0.555217", "text": "function showLoss() {\n addLoss();\n wordPlayDOM(showWord());\n statusIsDOM('<h3>Game over...<h3>');\n numLossesDOM();\n winningWordDOM('<h4>The femme was ' + word + '. Press \\'n\\' for the next word.</h4>');\n}", "title": "" }, { "docid": "b579626904fee11d52d6117e9993b890", "score": "0.55516446", "text": "display() {\n if (this.gameMode == XMLscene.gameMode.BOT_VS_BOT || (this.gameMode == XMLscene.gameMode.PLAYER_VS_BOT && this.player == 2)) {\n this.botHandler();\n } else if (this.gameMode == XMLscene.gameMode.MOVIE) {\n this.movieHandler();\n } else {\n this.checkCurrentState();\n }\n this.player1.displayPawns();\n this.player1.displayWalls();\n this.player1.displayStepOverButton();\n this.player1.displayBackButton();\n\n this.player2.displayPawns();\n this.player2.displayWalls();\n this.player2.displayStepOverButton();\n this.player2.displayBackButton();\n\n this.scene.pushMatrix();\n this.scene.translate(this.startPos11[0], 0.35, this.startPos11[2]);\n this.materialp1.apply();\n this.StartPos11Circle.display();\n this.scene.popMatrix();\n\n this.scene.pushMatrix();\n this.scene.translate(this.startPos12[0], 0.35, this.startPos12[2]);\n this.materialp1.apply();\n this.StartPos12Circle.display();\n this.scene.popMatrix();\n\n this.scene.pushMatrix();\n this.scene.translate(this.startPos21[0], 0.35, this.startPos21[2]);\n this.materialp2.apply();\n this.StartPos21Circle.display();\n this.scene.popMatrix();\n\n this.scene.pushMatrix();\n this.scene.translate(this.startPos22[0], 0.35, this.startPos22[2]);\n this.materialp2.apply();\n this.StartPos22Circle.display();\n this.scene.popMatrix();\n\n }", "title": "" }, { "docid": "c604cd7b69fe8e769c9aec8dabf0a4b4", "score": "0.55497116", "text": "function playerLoss(reasonloss) {\n losesound.play();\n if (reasonloss === \"scissor\") {\n scissorloose.style.display = \"block\";\n }\n if (reasonloss === \"paper\") {\n paperloose.style.display = \"block\";\n }\n if (reasonloss === \"rock\") {\n rockloose.style.display = \"block\";\n }\n scoreKeeper('loss')\n \n}", "title": "" }, { "docid": "181c3420d37151e3b3e11e2db4b0d6a6", "score": "0.5543487", "text": "display() {\n // draw the correct graphic to the screen\n imageMode(CENTER);\n if (this.state == 0) {\n image(down, this.xPos, this.yPos);\n }\n else {\n image(up, this.xPos, this.yPos);\n }\n\n // draw our state information (for debugging)\n fill(255);\n text(\"State: \" + this.state, this.xPos, this.yPos + 200);\n text(\"Frames In State: \" + this.framesInState, this.xPos, this.yPos + 220);\n text(\"Frames to Stay in State: \" + this.framesToStayInState, this.xPos, this.yPos + 240);\n\n // handle state changes\n this.framesInState += 1;\n\n // should we move into the next state?\n if (this.framesInState >= this.framesToStayInState) {\n // time to switch!\n if (this.state == 0) {\n this.state = 1;\n }\n else {\n this.state = 0;\n }\n\n // reset time in state\n this.framesInState = 0;\n\n // pick a new amount of time to stay in this new state\n this.framesToStayInState = int(random(100,200));\n }\n }", "title": "" }, { "docid": "ced3442a3bf249a2953f3a82155d1463", "score": "0.554309", "text": "function displayBirds(birds){\n for(let i = 0; i < birds.length; i++){\n if(birds[i].status === 'visible'){\n image(birds[i].image, birds[i].x, birds[i].y, birds[i].sizex, birds[i].sizey);\n if(dist(mouseX, mouseY, birds[i].x, birds[i].y) <= 70){\n \tconsole.log('triggered');\n textSize(28);\n fill(0,255,0);\n text(birds[i].name, birds[i].x, birds[i].y);\n }\n }\n }\n}", "title": "" }, { "docid": "c537861df5fccc3f086429870e2976e5", "score": "0.5542711", "text": "function checkWon () {\n console.log(countRight === (nrOfBlocks / 2))\n if (countRight === (nrOfBlocks / 2)) {\n content.classList.add('hide')\n restart.classList.remove('hide')\n score.classList.remove('hide')\n score.innerHTML = 'Number of wrongs: ' + countWrong\n for (let i = 0; i < temp.length; i++) {\n const box = temp[i]\n box.style.backgroundImage = 'none'\n box.innerHTML = '?'\n box.style.pointerEvents = ''\n countRight = 0\n countWrong = 0\n }\n run(memory, td, content, restart, countRight, countWrong, score)\n }\n }", "title": "" }, { "docid": "6ab497924f7be6f44b0a1e014d5ad6b4", "score": "0.5537513", "text": "showBoard(painter) {\n let blanks = Stage.getBlanks(this.board),\n isAboveBlanks = (col, row) => blanks.some(bl => bl[0] === col) && blanks.filter(bl => bl[0] === col)[0][1] > row;\n return (x, y) => {\n return painter.rect(x, y, STAGE_WIDTH * 32, (STAGE_HEIGHT - 2) * 32)\n .clip(this.board.map((column, colNum) => column.map((q, rowNum) => q.match({\n nothing: () => M_IO.unit(),\n just: (quark) => {\n return this.phase.match({\n wait: (_) => {\n return quark.show(painter, x + colNum * 32, y + (rowNum - 2) * 32);\n },\n move: () => {\n return quark.show(painter, x + colNum * 32, y + (rowNum - 2) * 32);\n },\n turn: (_) => {\n return quark.show(painter, x + colNum * 32, y + (rowNum - 2) * 32);\n },\n land: (_) => {\n return quark.show(painter, x + colNum * 32, y + (rowNum - 2) * 32);\n },\n clear: (clearQuarks, counter) => {\n let filteredClearQuark = clearQuarks.filter(h => h[0][0] === colNum && h[0][1] === rowNum);\n if (filteredClearQuark.length === 0) {\n return quark.show(painter, x + colNum * 32, y + (rowNum - 2) * 32);\n } else {\n let ease2 = Tween.ease(Tween.in(Tween.quad))(20 - counter, 1, -1, 20);\n return painter.globalAlpha(ease2)(quark.show(painter, x + colNum * 32, y + (rowNum - 2) * 32)).bind(_ =>\n filteredClearQuark.map(h => h[1].match({\n nothing: () => M_IO.unit(),\n just: (hadron) => painter.text(hadron.name, x + colNum * 32 + 16, y + (rowNum - 2) * 32 + 16, { font: 'Fira Sans', size: 28, align: 'center', baseline: 'middle' })\n .fill(Color.HSL(0, 0, 0).toHex())\n })).reduce((a, b) => a.bind(_ => b)));\n }\n },\n fall: (fallDistance, _) => {\n if (isAboveBlanks(colNum, rowNum)) {\n return quark.show(painter, x + colNum * 32, y + (rowNum - 2 + fallDistance) * 32);\n } else {\n return quark.show(painter, x + colNum * 32, y + (rowNum - 2) * 32);\n }\n }\n });\n }\n })).reduce((a, b) => a.bind(_ => b))).reduce((a, b) => a.bind(_ => b)));\n }\n }", "title": "" }, { "docid": "c2494e7d550e5e03d538446e391ad5e3", "score": "0.5536981", "text": "displayEndPage() {\n\n let players = snookerGame.players;\n let winner = players[0];\n\n if (players[0].matchScore < players[1].matchScore) {\n winner = players[1];\n } else if (players[0].matchScore == players[1].matchScore) {\n winner = 'undefined';\n }\n\n this.drawImage(sprites.foreground,\n new Vector(0, BOARD_HEIGHT - 100),\n new Vector(),\n 0,\n CANVAS_WIDTH,\n BOARD_HEIGHT * 0.6\n );\n\n this.drawImage(sprites.snookerBoard,\n new Vector(),\n new Vector(),\n 0,\n BOARD_WIDTH,\n BOARD_HEIGHT\n );\n\n if (this.twoPlayerMode) this.drawScoreBoard();\n\n this.canvasContext.fillStyle = 'rgba(50, 255, 92, 0.8)';\n this.canvasContext.fillRect(\n 450,\n 150,\n 500,\n 400\n );\n\n if (winner != 'undefined') {\n\n this.drawText(\n winner.name + \"Won\",\n 500,\n 250,\n \"verdana\",\n 60,\n \"black\"\n );\n\n this.drawText(\n \"Points: \" + winner.matchScore,\n 600,\n 350,\n \"verdana\",\n 40,\n \"black\"\n );\n } else {\n\n this.drawText(\n \"DRAW\",\n 625,\n 325,\n \"verdana\",\n 50,\n \"black\"\n );\n }\n\n this.drawImage(\n sprites.replay,\n new Vector(500, 500),\n new Vector(),\n 0,\n 150,\n 70\n );\n\n this.drawImage(\n sprites.back,\n new Vector(725, 500),\n new Vector(),\n 0,\n 150,\n 70\n );\n\n if (Mouse.position.y > 500\n && Mouse.position.x > 500\n && Mouse.position.y < 570\n && Mouse.position.x < 650\n ) {\n this.canvas.style.cursor = \"pointer\";\n\n if (Mouse.left.pressed) {\n\n if (snookerGame.playMusic) {\n\n audios.click.play();\n }\n\n for (let i = 0; i < players.length; i++) {\n\n players[i].reset();\n }\n snookerGame.reset();\n this.canvas.style.cursor = \"url('./assets/arrow-cursor.cur'), default\";\n startGame.stopAudio(audios.beforeGameMusic);\n snookerGame.twoPlayerMode = true;\n snookerGame.players = [players[0], players[1]];\n snookerGame.gameStarted = true;\n }\n }\n\n if (Mouse.position.y > 500\n && Mouse.position.x > 725\n && Mouse.position.y < 570\n && Mouse.position.x < 875\n ) {\n this.canvas.style.cursor = \"pointer\";\n\n if (Mouse.left.pressed) {\n\n if (snookerGame.playMusic) {\n\n audios.click.play();\n }\n\n snookerGame.reset();\n }\n }\n }", "title": "" }, { "docid": "f16a6ffb7352fe8960cddcbe27ee6933", "score": "0.5526508", "text": "function winCheck() {\n\t\tif(hitCount[0] === 17) {\n\t\t\t$(\".display\").fadeOut(2000);\n\t\t\tsetTimeout(function() {\n\t\t\t\t$(\"#win-display1\").fadeIn(2000);\n\t\t\t}, 2000);\n\t\t} else if(hitCount[1] === 17){\n\t\t\t$(\".display\").fadeOut(2000);\n\t\t\tsetTimeout(function() {\n\t\t\t\t$(\"#win-display2\").fadeIn(2000);\n\t\t\t}, 2000);\n\t\t}\n\t}", "title": "" }, { "docid": "67880f4c200d68a2187c7c09fd853cb4", "score": "0.5523013", "text": "drawHUDStep() {\n this.battle.windowTopInformations.draw();\n }", "title": "" }, { "docid": "d7a83ec48a320e6db2f3b22ce36fde7a", "score": "0.55217135", "text": "function showWinScreen() {\n showingWinScreen = true;\n colorRect(0, 0, canvas.width, canvas.height, '#353535');\n if(player1Score == winning_score) {\n canvasContext.fillStyle = '#006C0D';\n canvasContext.font = '100px Impact';\n canvasContext.fillText('Hrac 1 VYHRAL', canvas.width/2, canvas.height/2 - 100);\n canvasContext.fillStyle = '#FFFFFF';\n canvasContext.font = '50px Arial';\n canvasContext.fillText('Skore 1. hraca je:', canvas.width/2, canvas.height/2);\n canvasContext.fillText(player1Score, canvas.width/2, canvas.height/2 + 60);\n }\n if(player2Score == winning_score){\n canvasContext.fillStyle = '#006C0D';\n canvasContext.font = '100px Impact';\n canvasContext.fillText('Hrac 2 VYHRAL', canvas.width/2, canvas.height/2 - 100);\n canvasContext.fillStyle = '#FFFFFF';\n canvasContext.font = '50px Arial';\n canvasContext.fillText('Skore 2. hraca je:', canvas.width/2, canvas.height/2);\n canvasContext.fillText(player2Score, canvas.width/2, canvas.height/2 + 60);\n }\n\n canvasContext.font = '35px Arial';\n canvasContext.fillText('Kliknite pre navrat na uvodnu obrazovku!', canvas.width/2, canvas.height/2 + 150);\n\n if(player1Score > highscore){\n highscore = player1Score;\n }\n}", "title": "" }, { "docid": "761b6ba3b8047c2f83d08ef460616a05", "score": "0.5520663", "text": "function winScreen() {\n push();\n textSize(30);\n fill(235, 216, 52);\n stroke(0);\n strokeWeight(5);\n textAlign(CENTER, CENTER);\n text(`You found the dog`, width / 2, height / 2);\n pop();\n}", "title": "" }, { "docid": "0cb1a4ee0615638758cd89890aa1cc7e", "score": "0.5515679", "text": "function generateBlocks() {\n // Generate new block if current block has fully passed on window.\n var block_delta = new Ground();\n block_delta.color=\"#c47b23\";\n var last_block = blocks[blocks.length - 1];\n if (last_block.x + last_block.width < window.innerWidth + 100) {\n block_delta.x = window.innerWidth + 200;\n block_delta.y = randomize(300, 100);\n block_delta.width = randomize(50, 100);\n block_delta.height = 10;\n blocks.push(block_delta);\n }\n /* ======= DETELING BLOCKS THAT'S NO LONGER VISIBLE ====*/\n if (blocks[0].x + blocks[0].width <= 0) {\n var atr = blocks[0];\n blocks.splice(0, 1);\n }\n}", "title": "" }, { "docid": "b9aa75a738859661fa007c10e68997e6", "score": "0.55155474", "text": "function displayWin () {\n\t\tClock.stop();\n\t\tgetFinalTime('win');\n\t\tplayWin();\n\t\t$('#maingame').hide();\n\t\t$('#win').show();\n\t}", "title": "" }, { "docid": "9bca22bbd40a9b2de759d49380200d75", "score": "0.5507067", "text": "function onWin() {\n\tgameDisplay();\n\tconsole.log(chalk.green(\"\\n ***************************************\"));\n\tconsole.log(chalk.green(\"\\n You Win! The galaxy is safe once again!\\n\"));\n\tconsole.log(chalk.green(\" ***************************************\\n\"));\n\tplayAgain();\n}", "title": "" }, { "docid": "2b8969715b4118cb371b956aed998afb", "score": "0.55062205", "text": "show() {\n fill(235, 160, 125); //vult blok in met kleur\n rect(this.x, this.y, this.width, this.height, 5); //neemt waarden van constructor voor tekenen + zelfgekozen afronding\n }", "title": "" }, { "docid": "933f96869b34cdfe4f21f3c9ac425286", "score": "0.55044174", "text": "function win() {\n console.log(\"win\");\n }", "title": "" } ]
3c120c351782bdebdef4a2e39e424f87
A special extend for ajax options that takes "flat" options (not to be deep extended) Fixes 9887
[ { "docid": "6fad174c91f1c29e93a30bdc561ed79e", "score": "0.0", "text": "function ajaxExtend( target, src ) {\n\tvar deep, key,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" } ]
[ { "docid": "fa32100f0ca243f18c2b2eda86dab332", "score": "0.7778334", "text": "function ae(e,t){var n,i,r=Ee.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&Ee.extend(!0,e,i),e}", "title": "" }, { "docid": "f6c9063ed4dc3e1d0bce717ee77f252c", "score": "0.76659936", "text": "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}}", "title": "" }, { "docid": "561b8ede817869859a1880447cfac990", "score": "0.7609184", "text": "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions || {};for(key in src) {if(src[key] !== undefined){(flatOptions[key]?target:deep || (deep = {}))[key] = src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "title": "" }, { "docid": "c2dcc05395f719733311d30050e17034", "score": "0.7599643", "text": "function W(a,b){var c,d,e=ma.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&ma.extend(!0,a,d),a}", "title": "" }, { "docid": "990eeb39168038a4d07b08b94028d0d2", "score": "0.75871664", "text": "function F(e,t){var n,r,i=J.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&J.extend(!0,e,r),e}", "title": "" }, { "docid": "9c8e767694194ff04964d2c420742ac2", "score": "0.7585878", "text": "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions || {};for(key in src) {if(src[key] !== undefined){(flatOptions[key]?target:deep || (deep = {}))[key] = src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "title": "" }, { "docid": "9c8e767694194ff04964d2c420742ac2", "score": "0.7585878", "text": "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions || {};for(key in src) {if(src[key] !== undefined){(flatOptions[key]?target:deep || (deep = {}))[key] = src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "title": "" }, { "docid": "23f0c86d328059017db687ebf3b6f5c8", "score": "0.75649804", "text": "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "title": "" }, { "docid": "23f0c86d328059017db687ebf3b6f5c8", "score": "0.75649804", "text": "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "title": "" }, { "docid": "23f0c86d328059017db687ebf3b6f5c8", "score": "0.75649804", "text": "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "title": "" }, { "docid": "e6d1c60a94945cbbfea6dddc560af5a1", "score": "0.75458026", "text": "function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}", "title": "" }, { "docid": "ec114be4cc28b73ec32383f874b833e3", "score": "0.7532663", "text": "function P(a,b){var c,d,e=ea.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&ea.extend(!0,a,c),a}", "title": "" }, { "docid": "a1b2bd3f29250629ff2f18b104afee2e", "score": "0.7471959", "text": "function ajaxExtend(target,src){\nvar key,deep,\nflatOptions=jQuery.ajaxSettings.flatOptions||{};\n\nfor(key in src){\nif(src[key]!==undefined){\n(flatOptions[key]?target:deep||(deep={}))[key]=src[key];\n}\n}\nif(deep){\njQuery.extend(true,target,deep);\n}\n\nreturn target;\n}", "title": "" }, { "docid": "a5957963214bd051b767667be0f626e2", "score": "0.7320622", "text": "function ajaxExtend(target, src) {\n var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n return target;\n }", "title": "" }, { "docid": "29d309380005932be6ce13c5c2cf1c8d", "score": "0.731548", "text": "function ajaxExtend( target, src ) {\n\t var deep, key,\n\t flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t for ( key in src ) {\n\t if ( src[ key ] !== undefined ) {\n\t ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t }\n\t }\n\t if ( deep ) {\n\t jQuery.extend( true, target, deep );\n\t }\n\t\n\t return target;\n\t }", "title": "" }, { "docid": "b345fb11fe663c166612606b11c746d5", "score": "0.73116934", "text": "function R(a,b){var c,d,e=fa.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&fa.extend(!0,a,d),a}", "title": "" }, { "docid": "b2cce9186b919ceaff9d4db78330eaaf", "score": "0.7293543", "text": "function ajaxExtend(target, src) {\n var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n return target;\n }", "title": "" }, { "docid": "630de4e494397b1296dbaa7a257a539f", "score": "0.72882664", "text": "function ajaxExtend(target, src) {\n var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n return target;\n }", "title": "" }, { "docid": "630de4e494397b1296dbaa7a257a539f", "score": "0.72882664", "text": "function ajaxExtend(target, src) {\n var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n return target;\n }", "title": "" }, { "docid": "bd38e65c21a506097613df82c690ece7", "score": "0.7246738", "text": "function ajaxExtend(target, src) {\n var deep,\n key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key]\n ? target\n : deep || (deep = {}))[key] =\n src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "6951eaef823787bf4e5bb6ba8f72f25d", "score": "0.72396123", "text": "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "title": "" }, { "docid": "6951eaef823787bf4e5bb6ba8f72f25d", "score": "0.72396123", "text": "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "title": "" }, { "docid": "6951eaef823787bf4e5bb6ba8f72f25d", "score": "0.72396123", "text": "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "title": "" }, { "docid": "6951eaef823787bf4e5bb6ba8f72f25d", "score": "0.72396123", "text": "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "title": "" }, { "docid": "6b890585b125e210c54e4774a6bfe41d", "score": "0.7226983", "text": "function ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "title": "" }, { "docid": "53a58d6920e8da8dc834b3a74078feed", "score": "0.7224783", "text": "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n}", "title": "" }, { "docid": "59b6c8e3daa5ae0d168638fc9da66730", "score": "0.7221155", "text": "function ajaxExtend( target, src ) {\r\n var deep, key,\r\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n \r\n for ( key in src ) {\r\n if ( src[ key ] !== undefined ) {\r\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n }\r\n }\r\n if ( deep ) {\r\n jQuery.extend( true, target, deep );\r\n }\r\n \r\n return target;\r\n }", "title": "" }, { "docid": "846460c872ba06504111d321c9804784", "score": "0.7219575", "text": "function ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\tfor( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n}", "title": "" }, { "docid": "48f4806d5d311ddc0723d193972f072b", "score": "0.7218488", "text": "function ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}", "title": "" }, { "docid": "e0cba2c026311e648a6b00376b17f410", "score": "0.7216023", "text": "function ajaxExtend(target, src) {\n\t\t\tvar key,\n\t\t\t deep,\n\t\t\t flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\t\t\tfor (key in src) {\n\t\t\t\tif (src[key] !== undefined) {\n\t\t\t\t\t(flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (deep) {\n\t\t\t\tjQuery.extend(true, target, deep);\n\t\t\t}\n\n\t\t\treturn target;\n\t\t}", "title": "" }, { "docid": "a55d7a13990e009d550c60089adfda94", "score": "0.72138906", "text": "function ajaxExtend(target, src) {\n\t\t\tvar deep,\n\t\t\t key,\n\t\t\t flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\t\t\tfor (key in src) {\n\t\t\t\tif (src[key] !== undefined) {\n\t\t\t\t\t(flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (deep) {\n\t\t\t\tjQuery.extend(true, target, deep);\n\t\t\t}\n\n\t\t\treturn target;\n\t\t}", "title": "" }, { "docid": "a55d7a13990e009d550c60089adfda94", "score": "0.72138906", "text": "function ajaxExtend(target, src) {\n\t\t\tvar deep,\n\t\t\t key,\n\t\t\t flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\t\t\tfor (key in src) {\n\t\t\t\tif (src[key] !== undefined) {\n\t\t\t\t\t(flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (deep) {\n\t\t\t\tjQuery.extend(true, target, deep);\n\t\t\t}\n\n\t\t\treturn target;\n\t\t}", "title": "" }, { "docid": "2f588cc6398584fb893dc6070c3a4693", "score": "0.72067", "text": "function ajaxExtend(target, src) {\n var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for(key in src)if (src[key] !== undefined) (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n if (deep) jQuery.extend(true, target, deep);\n return target;\n }", "title": "" }, { "docid": "92fc44608dfb930d9fc809bf506104ee", "score": "0.7198284", "text": "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "title": "" }, { "docid": "92fc44608dfb930d9fc809bf506104ee", "score": "0.7198284", "text": "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "title": "" }, { "docid": "8bb4e233f9ed3c520dc2938057d2926d", "score": "0.71974325", "text": "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "title": "" }, { "docid": "4271f59b70c2f1ea331d4de6b57784da", "score": "0.71972406", "text": "function ajaxExtend(target, src) {\n var deep,key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "2c573dd26a0edcd9cfbf78711e18b579", "score": "0.718535", "text": "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "0503ff3e248cf2333da2e2bea990061b", "score": "0.7167529", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "6e3658422a82bf5050a1b307a3179714", "score": "0.716561", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "6e3658422a82bf5050a1b307a3179714", "score": "0.716561", "text": "function ajaxExtend( target, src ) {\n\t\tvar key, deep,\n\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\n\t\tfor ( key in src ) {\n\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t\t}\n\t\t}\n\t\tif ( deep ) {\n\t\t\tjQuery.extend( true, target, deep );\n\t\t}\n\t\n\t\treturn target;\n\t}", "title": "" }, { "docid": "8f186fd1d14525f6b70215709a4d1b91", "score": "0.7165583", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\treturn target;\n}", "title": "" }, { "docid": "03df01de68cafd391301d45774f406e3", "score": "0.7163826", "text": "function ajaxExtend( target, src ) {\n\t\t\tvar deep, key,\n\t\t\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\t\t\tfor ( key in src ) {\n\t\t\t\tif ( src[ key ] !== undefined ) {\n\t\t\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( deep ) {\n\t\t\t\tjQuery.extend( true, target, deep );\n\t\t\t}\n\n\t\t\treturn target;\n\t\t}", "title": "" }, { "docid": "5f568caaceb80d9ae5205b4691c86928", "score": "0.7162972", "text": "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "e3f3330e81c17843d5c2c851a0bccda8", "score": "0.7161994", "text": "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "abd580809e01e5d7dff59d61c2708168", "score": "0.71561563", "text": "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n}", "title": "" }, { "docid": "bb8b61a527bf6fc254cf2a7b49cb662d", "score": "0.71536034", "text": "function ajaxExtend(target, src) {\n\t\tvar key,\n\t\t deep,\n\t\t flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\t\tfor (key in src) {\n\t\t\tif (src[key] !== undefined) {\n\t\t\t\t(flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n\t\t\t}\n\t\t}\n\t\tif (deep) {\n\t\t\tjQuery.extend(true, target, deep);\n\t\t}\n\t}", "title": "" }, { "docid": "2223aeac641eca636a7a24b69246b979", "score": "0.714979", "text": "function ajaxExtend(target, src) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];\n }\n }\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n}", "title": "" }, { "docid": "dccb328edadce1fcd50bf9dc9285d150", "score": "0.7148516", "text": "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "title": "" }, { "docid": "74b4a50a364249afb1ae6b4b3913dccb", "score": "0.71448284", "text": "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "title": "" }, { "docid": "f3cdab080c8aaac8fc1c1ca77194ea95", "score": "0.7143285", "text": "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "f3cdab080c8aaac8fc1c1ca77194ea95", "score": "0.7143285", "text": "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "f3cdab080c8aaac8fc1c1ca77194ea95", "score": "0.7143285", "text": "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "f3cdab080c8aaac8fc1c1ca77194ea95", "score": "0.7143285", "text": "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "f3cdab080c8aaac8fc1c1ca77194ea95", "score": "0.7143285", "text": "function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }", "title": "" }, { "docid": "8cb634e8c857dd6f3bab2310f0c870f6", "score": "0.71395236", "text": "function ajaxExtend( target, src ) {\n var key, deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "title": "" }, { "docid": "1e4dd65a3e3a75b8ea5254c0a4093f4d", "score": "0.7138455", "text": "function ajaxExtend( target, src ) {\n var deep, key,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for ( key in src ) {\n if ( src[ key ] !== undefined ) {\n ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n }\n }\n if ( deep ) {\n jQuery.extend( true, target, deep );\n }\n\n return target;\n }", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" }, { "docid": "466eacb2f861fc5429b6d169d4c7cddf", "score": "0.71334445", "text": "function ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}", "title": "" } ]
94641b5aa0795859a3e80f2b9773e2bd
for faster DOM manipulation not faster in this case
[ { "docid": "7c0222e095c7b3e66c2ca32af0bbaa93", "score": "0.0", "text": "function detach(el) {\n var parent = el.parentNode\n var next = el.nextSibling\n parent.removeChild(el)\n return function() {\n if (next) parent.insertBefore(el, next)\n else parent.appendChild(el)\n }\n}", "title": "" } ]
[ { "docid": "889ef68bf15ba6c02192eaaabafff798", "score": "0.67106503", "text": "updateHtmlElements() {\n\t\t/**important to use labels as \"grid-container\" instead of numbers because\n\t\tthe number will change with the number of elements in HTML.\n\t\tlet numbersOfDivs = document.body.children[\"grid-container\"].children.length;*/\n\t\tlet numbersOfDivs = document.body.children[\"main\"].children[\"grid-container\"].children.length;\n\t\t/**ADDING div/span. Plus the respective class attribute*/\n\t\t/**VERY IMPORTANT!!!: IF YOU ALWAYS to add the new ones and delete the\n\t\told divs. If NOT you will receive an error:\n\t\tUncaught TypeError: Cannot read property textContent of null at exactly this\n\t\tpoint of the code: .textContent in the function gritInit.\n\t\tI think this is due to the browser that is unable to syncronize\n\t\twith my HTML elements added before! This is a very special case!!!*/\n\t\tconst fragment = document.createDocumentFragment();\n\t\tfor (let i = 0; i < (this.totalCards - this.standardNumberofCards); i++) {\n\t\t\tconst newElementDiv = document.createElement(\"div\");\n\t\t\tconst newElementSpan = document.createElement(\"span\");\n\t\t\tnewElementDiv.setAttribute(\"id\", \"div-\" + (this.standardNumberofCards + i))\n\t\t\tnewElementSpan.setAttribute(\"id\", \"span-\" + (this.standardNumberofCards + i))\n\t\t\tnewElementSpan.setAttribute(\"class\", \"hide icon-size\")\n\t\t\tfragment.appendChild(newElementDiv);\n\t\t\tnewElementDiv.appendChild(newElementSpan);\n\t\t};\n\t\t/** reflow and repaint here -- once (Optimized)!*/\n\t\tdocument.getElementById(\"grid-container\").appendChild(fragment);\n\t\t/**REMOVING div/span.*/\n\t\tfor (let i = 0; i < (numbersOfDivs - this.standardNumberofCards); i++) {\n\t\t\tlet remElement = document.getElementById(\"div-\" + (this.standardNumberofCards + i));\n\t\t\tremElement.parentNode.removeChild(remElement);\n\t\t};\n\t}", "title": "" }, { "docid": "e522a87614880b8e51ed80132c88c452", "score": "0.6489885", "text": "updateDOM(_dom) { return false; }", "title": "" }, { "docid": "06ea035df00ce0aea13753a8d7a3fba1", "score": "0.6108697", "text": "updateDOM(dom, view) {\n return false;\n }", "title": "" }, { "docid": "bdcfdc85a6b9b61133383ecf92ebc5ed", "score": "0.6070233", "text": "function cacheDOM() {\n DOM.$background = $('#background');\n} // coordinate async assembly of image element and rendering", "title": "" }, { "docid": "3f834076f9471b49d713d48fb1ce5183", "score": "0.5950658", "text": "function getUpdatedDomElems() {\n $imgs = $('img');\n $imgsRating = $('.rating');\n $imgsTitle = $('.title');\n $imgsWithIds = $imgs.filter(function (index, element) {\n return $(element).attr('id');\n });\n }", "title": "" }, { "docid": "822a9e237af8c49e54fb0a5f4347164c", "score": "0.589516", "text": "function updateDOM(): void {\n element.innerHTML =\n originalText.slice(firstIndex, lastIndex) + ellipsis;\n }", "title": "" }, { "docid": "cb41b01bb815c27c619e8219f021a392", "score": "0.58906585", "text": "function cacheDom() {\n DOM.$button = $(\"button\");\n }", "title": "" }, { "docid": "0d2e8a0ba54cf25713f49191a6bde756", "score": "0.5863594", "text": "function CacheEl() {\n \n }", "title": "" }, { "docid": "c0f8111f67c0a2c00e08b3e58d7eb6dc", "score": "0.5861092", "text": "updateDom() {\n this.domctx.update();\n }", "title": "" }, { "docid": "7eda9149d1f6171c7410d928b86c2f5d", "score": "0.5858347", "text": "function getCurrentElementContent() {\r\n \r\n\tvar elements = $(\"#afd_content\").find(\"p\");\r\n if (elements.length==0){\r\n var pArrayTemp = new Array();\r\n pArrayTemp.push(document.getElementById(\"afd_content\"));\r\n pArrayTemp.push(-1);\r\n var pArray = new Array();\r\n pArray.push(pArrayTemp);\r\n injectSpanTag(pArray);\r\n return;\r\n }\r\n\tfor ( var i = 0; i < elements.length; i++) {\r\n\t\tvar left = $(elements[i]).offset().left;\r\n\t\tvar top = $(elements[i]).offset().top;\r\n\t /*alert(((currentPage-1)*layoutWidth+10)+\",left:\"+$(elements[i]).offset().left+\",top:\"+$(elements[i]).offset().top+\",pIndex:\"+i +\",\"+elements[i].innerText.substring(0,10)+\",bodyheight:\"+layoutHeight+\",currentpage:\"+currentPage+\",height:\"+$(\"#afd_content\").height()); */\r\n\t\tif (navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)) {\r\n\t\t\tif (0<left&&left<layoutWidth){\r\n var pArrayTemp = new Array();\r\n pArrayTemp.push(elements[i]);\r\n pArrayTemp.push(i);\r\n var pArray = new Array();\r\n pArray.push(pArrayTemp);\r\n injectSpanTag(pArray);\r\n return;\r\n }\r\n if (left>=layoutWidth){\r\n if (i==0){\r\n var pArrayTemp = new Array();\r\n pArrayTemp.push(elements[i]);\r\n pArrayTemp.push(i);\r\n var pArray = new Array();\r\n pArray.push(pArrayTemp);\r\n injectSpanTag(pArray);\r\n return;\r\n }\r\n if (i>0){\r\n \tvar pArrayTemp1 = new Array();\r\n var pArrayTemp2 = new Array();\r\n var pArray = new Array();\r\n pArrayTemp1.push(elements[i-1]);\r\n pArrayTemp1.push(i-1);\r\n pArray.push(pArrayTemp1);\r\n pArrayTemp2.push(elements[i]);\r\n pArrayTemp2.push(i);\r\n pArray.push(pArrayTemp2);\r\n injectSpanTag(pArray);\r\n return;\r\n }\r\n }\r\n if (left<=0&&i==elements.length-1){\r\n var pArrayTemp = new Array();\r\n pArrayTemp.push(elements[i]);\r\n pArrayTemp.push(i);\r\n var pArray = new Array();\r\n pArray.push(pArrayTemp);\r\n injectSpanTag(pArray);\r\n return;\r\n } \r\n\t\t}\r\n\t\tif (navigator.userAgent.match(/Android/i)) {\r\n\t\t\tvar heightTemp = $(\"#afd_content\").height()-13;\r\n\t\t\tif ( heightTemp* (currentPage - 1)< top&&top<=heightTemp*currentPage) {\r\n\t\t\t\tvar pArrayTemp = new Array();\r\n pArrayTemp.push(elements[i]);\r\n pArrayTemp.push(i);\r\n var pArray = new Array();\r\n pArray.push(pArrayTemp);\r\n injectSpanTag(pArray);\r\n return;\r\n\t\t\t}\r\n\t\t\tif (top>heightTemp*currentPage){\r\n\t\t\t\tif (i==0){\r\n var pArrayTemp = new Array();\r\n pArrayTemp.push(elements[i]);\r\n pArrayTemp.push(i);\r\n var pArray = new Array();\r\n pArray.push(pArrayTemp);\r\n injectSpanTag(pArray);\r\n return;\r\n }\r\n if (i>0){\r\n \tvar pArrayTemp1 = new Array();\r\n var pArrayTemp2 = new Array();\r\n var pArray = new Array();\r\n pArrayTemp1.push(elements[i-1]);\r\n pArrayTemp1.push(i-1);\r\n pArray.push(pArrayTemp1);\r\n pArrayTemp2.push(elements[i]);\r\n pArrayTemp2.push(i);\r\n pArray.push(pArrayTemp2);\r\n injectSpanTag(pArray);\r\n return;\r\n }\r\n\t\t\t}\r\n\t\t\tif (top<=heightTemp* (currentPage - 1)&&i==elements.length-1){\r\n var pArrayTemp = new Array();\r\n pArrayTemp.push(elements[i]);\r\n pArrayTemp.push(i);\r\n var pArray = new Array();\r\n pArray.push(pArrayTemp);\r\n injectSpanTag(pArray);\r\n return;\r\n }\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "833484526ef9ab690bd4cb10a6e77753", "score": "0.5831383", "text": "function cacheDom(){\n DOM.$typeField = $(\"#customer_type\");\n DOM.$schoolLevelField = $(\"#school_level_field\");\n DOM.$countryField = $(\"#customer_institution_country\");\n DOM.$stateField = $(\"#customer_institution_state_field\");\n }", "title": "" }, { "docid": "0d449d262118fa2b74af625c4cff97ed", "score": "0.5815373", "text": "updateElements() {}", "title": "" }, { "docid": "ebef5178f2b353824ee6e0d0418f3d79", "score": "0.58036655", "text": "update(data) {\n // Updating _data in the View\n this._data = data;\n // Generating new markup\n const newMarkup = this._generateMarkup();\n // Creating new 'virtual' DOM object. This will convert the string into the DOM element which we will next compare to already existing DOM element(displayed one)\n const newDOM = document.createRange().createContextualFragment(newMarkup);\n // Selecting all elements in newly created DOM element (above) and converting them to array using Array.from()\n const newElements = Array.from(newDOM.querySelectorAll('*'));\n // Selecting all DOM elements currently displayed in the window\n const curElements = Array.from(this._parentElement.querySelectorAll('*'));\n\n // Looping over newElements array to compare each to the curElement counterpart\n newElements.forEach((newEl, i) => {\n // ensuring that we are compering same elements using matching index\n const curEl = curElements[i];\n // comparing 2 elements content using isEqualNode() method\n\n //UPDATING TEXT\n // Checking if there is a difference between elements (.isEqualNode() method) AND if the element child exist and it is a text (using .nodeValue property on selected element child)\n if (\n !newEl.isEqualNode(curEl) &&\n newEl.firstChild?.nodeValue.trim() !== ''\n ) {\n //replacing the current element text content to the new one if conditions are met\n\n curEl.textContent = newEl.textContent;\n }\n\n //UPDATING ATTRIBUTES\n // Checking if there is a difference between elements. The .attributes property will display all attribtes of selected element.\n if (!newEl.isEqualNode(curEl)) {\n //converting attribute list into array. And replacing curEl attributes(using .setAttribute() method ) with the newEl attributes\n\n Array.from(newEl.attributes).forEach(attr => {\n // console.error(Array.from(newEl.attributes));\n // Updating curEl attribute using newEl attributes\n curEl.setAttribute(attr.name, attr.value);\n });\n }\n });\n }", "title": "" }, { "docid": "8910f739d95b1d593cb20ba0bb693d16", "score": "0.57834584", "text": "function updateDOM() {\n // Check localStorage once\n\n rebuildArrays()\n const statusList = getSavedColumns()\n statusListArray.forEach((item,idx) => {\n statusList[idx].forEach((i,id) => {\n createItemEl(statusListEl[idx],idx,i,id )\n })\n })\n \n}", "title": "" }, { "docid": "5f59216721041062492a9d6efcbea203", "score": "0.5729218", "text": "function setTextElements(){\n window.js_1 = $('.__i_').children().eq(2)[0];\n window.textElements = document.getElementsByClassName('_3oh- _58nk');\n if (textElements.length == 0 || js_1 == null){\n console.log(\"waiting\");\n counter++;\n setTimeout(setTextElements, 1000);\n }else{\n js_1lastChild = window.js_1.lastElementChild.firstChild.firstChild;\n observer.observe(window.js_1, {\n childList: true\n });\n observer.observe(js_1lastChild, {\n childList: true\n })\n replaceInitialToEmotes();\n }\n}", "title": "" }, { "docid": "9af9f574773a5db477751a2d228d9207", "score": "0.5723396", "text": "function processDOMUpdate() {\n console.log('Processing DOM updates');\n $('.chat-item__chat-info-header').filter((_, el) => !$(el).attr('button-added')).each((_, el) => {\n $(el).attr('button-added', true).after(\n '<button class=\"btn btn-default\" onclick=performChatAction(this)>Do Thing</button>'\n );\n })\n }", "title": "" }, { "docid": "6d9545031764cb80fc5178761d94ee24", "score": "0.56950814", "text": "function updateDOMRev(): void {\n element.innerHTML =\n ellipsis + originalText.slice(firstIndex, lastIndex);\n }", "title": "" }, { "docid": "e5042cf0b2467f3843077e3f77ec9dc7", "score": "0.5674203", "text": "function cacheDOM() {\n\n DOM.loader = document.getElementById('Loader');\n\n DOM.editMode = document.getElementById('EditMode');\n\n DOM.searchPanel = document.getElementById('SearchPanel');\n DOM.searchByFinancialYear = document.getElementById('SearchByFinancialYear');\n DOM.searchByVendor = document.getElementById('SearchByVendor');\n DOM.searchByPurchaseBillNo = document.getElementById('SearchByPurchaseBillNo');\n DOM.searchByPurchaseBillNoButton = document.getElementById('SearchByPurchaseBillNoButton');\n\n DOM.financialYear = document.getElementById('FinancialYear');\n DOM.companyName = document.getElementById('CompanyName');\n DOM.branch = document.getElementById('Branch');\n DOM.vendor = document.getElementById('Vendor');\n DOM.purchaseBillId = document.getElementById('PurchaseBillId');\n DOM.purchaseBillNo = document.getElementById('PurchaseBillNo');\n DOM.purchaseBillDate = document.getElementById('PurchaseBillDate');\n DOM.purchaseBillDatePicker = document.getElementById('PurchaseBillDatePicker');\n DOM.transporter = document.getElementById('Transporter');\n DOM.challanNo = document.getElementById('ChallanNo');\n DOM.isTaxInclusive = document.getElementsByName('IsTaxInclusive');\n DOM.taxInclusive = document.getElementById('TaxInclusive');\n DOM.taxExclusive = document.getElementById('TaxExclusive');\n DOM.billChargeTaxInclusive = document.getElementById('BillChargeTaxInclusive');\n DOM.billChargeTaxExclusive = document.getElementById('BillChargeTaxExclusive');\n DOM.isTaxRoundOff = document.getElementById('IsTaxRoundOff');\n DOM.taxRoundOffYes = document.getElementById('TaxRoundOffYes');\n DOM.taxRoundOffNo = document.getElementById('TaxRoundOffNo');\n DOM.compositionBillYes = document.getElementById('CompositionBillYes');\n DOM.compositionBillNo = document.getElementById('CompositionBillNo');\n DOM.sampleYes = document.getElementById('SampleYes');\n DOM.sampleNo = document.getElementById('SampleNo');\n DOM.totalGSTAmountAsPerVendorBill = document.getElementById('TotalGSTAmountAsPerVendorBill');\n DOM.searchItem = document.getElementById('SearchItem');\n DOM.totalBillAmount = document.getElementById('TotalBillAmount');\n DOM.purchaseBillItemList = document.getElementById('PurchaseBillItemList');\n DOM.viewMode = document.getElementById('ViewMode');\n DOM.purchaseBillList = document.getElementById('PurchaseBillList');\n\n DOM.addNewPurchaseBill = document.getElementById('AddNewPurchaseBill');\n DOM.showPurchaseBillList = document.getElementById('ShowPurchaseBillList');\n DOM.viewPurchaseBill = document.getElementById('ViewPurchaseBill');\n DOM.editPurchaseBill = document.getElementById('EditPurchaseBill');\n DOM.savePurchaseBill = document.getElementById('SavePurchaseBill');\n DOM.deletePurchaseBill = document.getElementById('DeletePurchaseBill');\n DOM.printPurchasesBill = document.getElementById('PrintPurchasesBill');\n DOM.filterPurchaseBill = document.getElementById('FilterPurchaseBill');\n DOM.exportPurchaseillList = document.getElementById('ExportPurchaseillList');\n\n DOM.gstBreakup = document.getElementById('GSTBreakup');\n DOM.purchaseBillItemList = document.getElementById('PurchaseBillItemList');\n\n DOM.billChargesViewMode = document.getElementById('BillChargesViewMode');\n DOM.billChargesList = document.getElementById('BillChargesList');\n DOM.purchaseBillChargeSrNo = document.getElementById('PurchaseBillChargeSrNo');\n DOM.purchaseBillChargeId = document.getElementById('PurchaseBillChargeId');\n DOM.addNewBillCharge = document.getElementById('AddNewBillCharge');\n DOM.showBillChargesList = document.getElementById('ShowBillChargesList');\n DOM.editBillCharge = document.getElementById('EditBillCharge');\n DOM.saveBillCharge = document.getElementById('SaveBillCharge');\n DOM.saveAndAddNewBillCharge = document.getElementById('SaveAndAddNewBillCharge');\n DOM.deleteBillCharge = document.getElementById('DeleteBillCharge');\n\n DOM.billChargesEditMode = document.getElementById('BillChargesEditMode');\n DOM.billChargeName = document.getElementById('BillChargeName');\n DOM.billChargeAmount = document.getElementById('BillChargeAmount');\n DOM.isBillChargeTaxInclusive = document.getElementsByName('IsBillChargeTaxInclusive');\n DOM.billChargeTaxInclusive = document.getElementById('BillChargeTaxInclusive');\n DOM.billChargeTaxExclusive = document.getElementById('BillChargeTaxExclusive');\n DOM.billChargeGSTRate = document.getElementById('BillChargeGSTRate');\n DOM.billChargeGSTAmount = document.getElementById('BillChargeGSTAmount');\n DOM.billChargeTotalAmount = document.getElementById('BillChargeTotalAmount');\n\n /*cache the jquery element */\n DOM.$purchaseBillDatePicker = $('#PurchaseBillDatePicker');\n }", "title": "" }, { "docid": "0a692864641c061f8c3605c62e7cd3cb", "score": "0.5632335", "text": "function HTMLappend(x){\n //document.body.innerHTML += x; //wrong: replaces complete page whith itself and appended elements\n var d=document.createElement(\"div\");\n d.innerHTML = x;\n //append each node\n var e = workelement.e;\n var next = d.firstChild;\n while( next ){\n var curr = next;\n next = curr.nextSibling;\n e.appendChild(curr);\n }\n}", "title": "" }, { "docid": "20977bcc76efba60ca420d48efe80ecf", "score": "0.5626942", "text": "function cacheDOM() {\n\t\tDOM.$dismissNotification = $('.dismiss-notification');\n\t}", "title": "" }, { "docid": "961db398040a5c5c1241602c04d5d852", "score": "0.562645", "text": "function updateAllElements() {\n console.log(\"HI\")\n // you need to use data-ld because you can't select by attribute prefix\n document.querySelectorAll(\"[data-ld],[data-ld-class],[data-ld-text],[data-ld-width],[data-ld-height],[data-ld-src]\").forEach(elem => updateElement(elem));\n }", "title": "" }, { "docid": "4e0815f15967b3ee3da78c3ef4539c2f", "score": "0.5615992", "text": "_updateDiv(selector, html){\n let div = document.querySelector(selector);\n if (div){\n div.innerHTML = html; \n }\n else console.log(selector + \" not found\");\n }", "title": "" }, { "docid": "a0ddedb5b26781888dba65b712756c48", "score": "0.55911684", "text": "function modifyDOM(domData) {\n // if (matches = document.querySelectorAll(\"#\" + domData.id)) {\n if (matches = document.querySelectorAll(\"[data-item='\" + domData.id + \"']\" )) {\n for (var i=0; i<matches.length; i++) {\n el = matches[i];\n switch (domData.action) {\n case \"update\":\n el.innerHTML = domData.value\n connectEvents(el)\n addSubscribers(el)\n break;\n case \"update_attribute\":\n el.setAttribute(domData.attribute, domData.value)\n break;\n case \"add_class\":\n el.classList.add(domData.value)\n break;\n case \"remove_class\":\n el.classList.remove(domData.value)\n break;\n case \"value\":\n el.value = domData.value\n connectEvents(el)\n addSubscribers(el)\n break;\n case \"append_value\":\n el.value += domData.value\n connectEvents(el)\n addSubscribers(el)\n break;\n case \"delete\":\n el.parentNode.removeChild(el)\n break;\n case \"insert\":\n el.insertAdjacentHTML('beforeend',domData.value)\n el.scrollTop = el.scrollHeight;\n if (maxChildren = el.getAttribute(\"data-max-children\")) {\n children = el.children\n while (children.length > 0 && children.length > maxChildren) {\n el.removeChild(children[0])\n }\n }\n connectEvents(el.lastChild)\n addSubscribers(el.lastChild)\n break;\n }\n // el.closest(\"[data-version]\").setAttribute(\"data-version\",domData.version)\n }\n } else {\n console.log(\"cound not locate element \" + domData.id)\n }\n}", "title": "" }, { "docid": "9a173bfc8355650f390245c0626b2f2b", "score": "0.558047", "text": "render_tags(){\n var els = Array.from(document.getElementsByTagName(this.tag));\n var to_remove = [];\n this.set_tag_css(els);\n var el;\n for(var i=0; i < els.length; i++){\n try {\n if(this.html){\n if(this.keep_tag) els[i].insertAdjacentHTML(\"beforebegin\", \"<var>\"+eval(els[i].textContent)+\"</var>\");\n else els[i].insertAdjacentHTML(\"beforebegin\", eval(els[i].textContent));\n to_remove.push(els[i]);\n }\n else{\n els[i].replaceWith(document.createTextNode(eval(els[i].textContent)));\n } \n }catch(error){/*console.error(error);*/}\n }\n for(var i=0; i < to_remove.length; i++){\n to_remove[i].remove();\n }\n this.remove_tag_css();\n }", "title": "" }, { "docid": "6e9bbc2c6aafcfb6ae96e1a6b181d97c", "score": "0.5575246", "text": "function limpiarHtml() {\n while(contenedorCarrito.firstChild){\n contenedorCarrito.removeChild(contenedorCarrito.firstChild)\n }\n }", "title": "" }, { "docid": "9cd44fdf6afe6f7b1f833ef7926ad205", "score": "0.5556388", "text": "function limpiarHTML(){\r\n // contenedorCarrito.innerHTML = '';\r\n\r\n while(contenedorCarrito.firstChild){\r\n contenedorCarrito.removeChild(contenedorCarrito.firstChild);\r\n };\r\n}", "title": "" }, { "docid": "52784e60092eb826fc7790b65bd9bfa6", "score": "0.554965", "text": "function DOMImplementation() {}", "title": "" }, { "docid": "52784e60092eb826fc7790b65bd9bfa6", "score": "0.554965", "text": "function DOMImplementation() {}", "title": "" }, { "docid": "ffacb8ed73e7c66f56d268f2e329cebd", "score": "0.55403036", "text": "function limpiarHTML(){\n //contenedorCarrito.innerHTML = '';\n while (contenedorCarrito.firstChild){\n contenedorCarrito.removeChild(contenedorCarrito.firstChild)\n }\n}", "title": "" }, { "docid": "2d60c00a49177083c383e562717e6750", "score": "0.5534109", "text": "function checkForRepetion(){\n\t\t\t//spliting DOM values and pushing into an array\n\t\t\thtml_arr = ($(\"#test\").html()).split(\"<br>\");\n\t\t\t//if 1st element from dom and array is not equal then dom is made empty\n\t\t\tfor(var j=0;j<(html_arr.length);j++){\n\t\t\t\tif(array[j] != html_arr[j]){\n\t\t\t\t\t$(\"#test\").empty();\n\t\t\t\t}\n\t\t\t}\n\t\t\t//checks for repition\n\t\t\tfor(var i=0;i<array.length;i++){\n\t\t\t\t$(\"#test\").append(array[i]+\"<br>\");\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "341c0b851abd42766798eca614410099", "score": "0.55311024", "text": "function domElements() {\n document.body.removeChild(spinner); // removes spinner after the data is loaded\n createChartDiv('mainchartdiv'); // Adds the div where the main chart will be placed\n createChartDiv('casesbyage'); // Adds the div where the cases by age group chart will be placed\n createChartDiv('casesbyagemobile'); // Adds the div where the mobile version of the cases by age group chart will be placed\n createChartDiv('regionchartdiv'); // Adds the div where the regions chart will be placed\n createChartDiv('regionchartmobilediv'); // Adds the div where the mobile version of the regions chart will be placed\n }", "title": "" }, { "docid": "5d0f02efe0462d6982d8ecb10a4d5cfa", "score": "0.5525857", "text": "function limpiarHTML() {\n // contenedorCarrito.innerHTML = '';\n\n //codigo mejorado*\n while(contenedorCarrito.firstChild) {\n contenedorCarrito.removeChild(contenedorCarrito.firstChild)\n }\n}", "title": "" }, { "docid": "982aff22f362051a95b8f7d2e9362151", "score": "0.5525739", "text": "refresh() {\n if (!isDOMReady) return;\n const { root, scope, outputs, title, listeners } = dom;\n const df = document.createDocumentFragment();\n if (title)\n df.appendChild(\n transformElem(\n {\n type: \"title\",\n text: title\n },\n dom\n )\n );\n this.forEach(userElem => {\n const { name } = userElem;\n let themeElem = transformElem(userElem, dom);\n const funcs = funcArr(userElem.transform);\n if (themeElem instanceof HTMLElement || Array.isArray(themeElem)) {\n themeElem = { elem: themeElem };\n }\n themeElem.elem = [].concat(themeElem.elem);\n const main = themeElem.elem[themeElem.main || 0];\n const evtElem = themeElem.evt\n ? main.querySelectorAll(themeElem.evt)\n : [main];\n const handle = {\n textInput: () => {\n let input = evtElem[0];\n if (name) {\n scope[name] = \"\";\n input.addEventListener(\"input\", e => {\n scope[name] = funcReduce(funcs, e.currentTarget.value);\n });\n }\n },\n checkbox: () => {\n evtElem.forEach(cur =>\n cur.addEventListener(\"change\", () => {\n if (name)\n scope[name] = Array.from(evtElem).reduce(\n (arr, cur) =>\n arr.concat(cur.checked ? cur.dataset.value : []),\n []\n );\n })\n );\n },\n radio: () => {\n evtElem.forEach(cur =>\n cur.addEventListener(\"change\", () => {\n if (name) scope[name] = cur.dataset.value;\n })\n );\n },\n output: () => {\n outputs.output.push({\n elem: evtElem[0],\n transform: userElem.transform\n });\n },\n canvas: () => {\n let { interval, draw } = userElem;\n const obj = {\n type: \"canvas\",\n canvas: evtElem[0],\n onUpdate: true,\n handler: draw\n };\n if (interval == null) interval = \"update\";\n if (typeof interval === \"number\") {\n obj.onUpdate = false;\n obj.interval = setInterval(handler, interval);\n }\n if (name) {\n listeners[name] = obj;\n scope[name] = obj.canvas;\n }\n outputs.canvas.push(obj);\n },\n file: () => {\n let { fileDisplay, fileButton, fileDragTo } = themeElem;\n const fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n\n fileDisplay = fileDisplay ? main.querySelector(fileDisplay) : main;\n fileButton = fileButton ? main.querySelector(fileButton) : main;\n fileDragTo = fileDragTo ? main.querySelector(fileDragTo) : main;\n\n fileButton.addEventListener(\"click\", fileInput.click.bind(fileInput));\n\n Object.entries({\n drop: e => {\n e.preventDefault();\n var dt = e.dataTransfer;\n if (dt.items) {\n const item = dt.items[0];\n if (item.kind == \"file\") {\n haveFile(item.getAsFile());\n }\n } else {\n haveFile(dt.files[0]);\n }\n },\n dragover: e => e.preventDefault(),\n dragend: e => {\n var dt = e.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n e.dataTransfer.clearData();\n }\n }\n }).forEach(([evt, handler]) =>\n fileDragTo.addEventListener(evt, handler)\n );\n\n fileInput.addEventListener(\"input\", e =>\n haveFile(e.currentTarget.files[0])\n );\n function haveFile(file) {\n if (!file) return;\n fileDisplay.innerText = file.name;\n if (name) scope[name] = funcReduce(funcs, file.slice());\n }\n },\n button: () => {\n const listener = { type: \"button\", handler: userElem.handler };\n evtElem[0].addEventListener(\"click\", () => this.trigger(listener));\n if (name) this.listeners[name] = listener;\n },\n switch: () => {\n evtElem[0].addEventListener(\n \"change\",\n ({ currentTarget: { checked } }) => {\n scope[name] = checked;\n }\n );\n }\n };\n if (userElem.type in handle) handle[userElem.type]();\n themeElem.elem.forEach(df.appendChild.bind(df));\n });\n while (root.firstChild) root.removeChild(root.firstChild);\n this.root.appendChild(df);\n }", "title": "" }, { "docid": "38cfbccdb668125bd78c30bab7de73e6", "score": "0.5523309", "text": "generateHTML(){\n const html = `\n <li data-id='${this.retrievedSavedId}' id='save-${this.retrievedSavedId}' class='savedArticle'>\n <div class=\"imgHolder\">\n <img href=\"#\" alt=\"image\" src=\"${this.responseSavedArticle[0].image.thumb}\">\n </div>\n <div class=\"text\">\n <h2>${this.responseSavedArticle[0].title}</h2>\n <time class=\"time\">${this.responseSavedArticle[0].created.formatted}</time>\n <span class=\"showMore\">Show more..</span>\n <a href=\"#\" class=\"delete\"></a>\n </div>\n </li>\n `; \n //view 1articles in one page \n if (this.noOfArticles > 10 && this.noPages == 1) {\n this.saveHolder.querySelector(\"#loadMore\").style.display = \"block\";\n }\n this.saveHolder.insertAdjacentHTML(\"afterbegin\", html); // insert the li saved article in ul\n this.saveListHolder = this.saveHolder.querySelector(`#save-${this.retrievedSavedId}`); // refere to a certain(current) saved article(li)\n //this.saveListHolder = this.saveHolder.querySelector('li');\n // this.saveListHolder = document.getElementById(`save-${this.retrievedSavedId}`); // refere to a certain(current) saved article\n //console.log(this.saveListHolder); \n }", "title": "" }, { "docid": "ff7b9b79f215216bd58edb83f1ff2250", "score": "0.5522671", "text": "function replaceTaskDomElements() {\n // Empties listActive and listComplete, then inserts new Documents as List Items.\n let child = listActiveTask.firstElementChild;\n while (child) {\n listActiveTask.removeChild(child);\n child = listActiveTask.firstElementChild;\n }\n let completeChild = listCompleteTask.firstElementChild;\n while (completeChild) {\n listCompleteTask.removeChild(completeChild);\n completeChild = listCompleteTask.firstElementChild;\n }\n // load chosen db task documents\n loadTaskIntoDom()\n }", "title": "" }, { "docid": "0298ee04e6ed6bbecb2462bf317b7c79", "score": "0.552241", "text": "function analyze_and_modify_markup() {\n\n ol = iq(\"#\" + element_id + \" ol\");\n var slide_count = iq(\"#\" + element_id + \" ol > li\").length;\n slide_width_pc = 100.0 / (slide_count);\n slide_index = 0;\n\n ol.addClass(\"ism-slides\");\n iq(\"#\" + element_id + \" .ism-slides > li\").addClass(\"ism-slide\");\n iq(\"#\" + element_id + \" .ism-slides > .ism-slide > img, #\" + element_id + \" .ism-slides > .ism-slide > a > img\").addClass(\"ism-img\");\n\n ol.find(\"li\").each(function(indx) {\n this.addClass(\"ism-slide-\" + indx);\n });\n\n var slider_frame_html = \"<div class='ism-frame'></div>\";\n iq(\"#\" + element_id).wrapInner(slider_frame_html);\n ol = iq(\"#\" + element_id + \" ol.ism-slides\"); // wrapInner method replaces ol node with copy\n\n var img_frame_html = \"<div class='ism-img-frame'></div>\";\n iq(\"#\" + element_id + \" .ism-img\").wrap(img_frame_html);\n\n }", "title": "" }, { "docid": "056133c5cab8f2a77f9ae7714dcd2a42", "score": "0.5515294", "text": "function fn4_grabDestPageBodyElement(d) {\r\n var x = document.getElementsByTagName(\"body\")[0];\r\n var rootElem = document.createElement(\"div\")\r\n rootElem.setAttribute(\"id\",\"root\");\r\n rootElem.setAttribute(\"class\",\"\");\r\n var div0 = document.createElement(\"div\");\r\n div0.setAttribute(\"class\",\"square default hover_basic\");\r\n div0.onclick = function () {\r\n //console.log(\"clicked\");\r\n if(!LEVEL1_GENERATED) {\r\n fn5_createSquareDivTagsForEachRow(rootElem, d);\r\n console.log(\" STEP 5 : COMPLETED \");\r\n }else\r\n {\r\n var elem = document.getElementById(\"div2id\");\r\n if(elem.style.display != \"none\") {\r\n elem.style.display = \"none\";\r\n }\r\n else\r\n {\r\n elem.style.display = \"inline-block\";\r\n }\r\n }\r\n }\r\n rootElem.appendChild(div0);\r\n x.appendChild(rootElem);\r\n console.log(\" STEP 4 : COMPLETED \");\r\n}", "title": "" }, { "docid": "5044900c2fdde3dd5e167d0b2029bf2f", "score": "0.5510431", "text": "_attachDom(dom){this.appendChild(dom)}", "title": "" }, { "docid": "62cf7ef0f5351e73524fc346f3ffc846", "score": "0.5503902", "text": "function deleteHtml(domElement){\n domElement.html('');\n}", "title": "" }, { "docid": "eef4d15e926a566412d8233702f482ba", "score": "0.5497527", "text": "function RenderableDOMElement() {}", "title": "" }, { "docid": "c930f5196eab27efea352dceee8a503e", "score": "0.5492322", "text": "update() {\n this.DOMelement.innerHTML = \"\";\n\n const parent = curly.selectElement(this);\n\n this.has.forEach(child => {\n curly.render(child, parent);\n });\n }", "title": "" }, { "docid": "5cda318bb4cea88e547d631133fc58e7", "score": "0.5491212", "text": "function renderToDom(elements) {\n\t\thouses.innerHTML = elements;\n\t}", "title": "" }, { "docid": "eaf2944edaf713c1a135e9b8a2a9e8ca", "score": "0.54863924", "text": "function InitDOMChanges() {\n\n\t// Karl Swedberg's js class technique\n var $body = $('body');\n $body.removeClass('no_js').addClass('js');\n \n\t// Add extra markup for booking steps\n var $steps_li = $('li', 'ol.steps');\n $steps_li.each(function() {\n $this = $(this);\n $this.prepend('<span /><em />');\n });\n\n}", "title": "" }, { "docid": "473f1b9ba48b26ff6eb9224b0cfec32d", "score": "0.54859656", "text": "setHTML() {\n this.containerNode.classList.add(SliderClassName);\n this.containerNode.innerHTML = `\n <div class=\"${SliderContainerLineClassName}\">\n <div class=\"${SliderLineClassName}\">\n ${this.containerNode.innerHTML}\n </div>\n </div>\n <div class=\"${SliderNavClassName}\">\n <button class=\"${SliderNavLeftClassName}\"></button>\n <button class=\"${SliderNavRightClassName}\"></button>\n </div>\n `;\n\n // getting elements by classNames\n this.lineContainerNode = this.containerNode.querySelector(\n `.${SliderContainerLineClassName}`\n );\n this.lineNode = this.containerNode.querySelector(`.${SliderLineClassName}`);\n\n //create array of divs with specific className that wrap images\n this.slideNodes = Array.from(this.lineNode.children).map((childNode) =>\n wrapElement({\n element: childNode,\n className: SliderImgClassName,\n })\n );\n\n this.navLeft = this.containerNode.querySelector(\n `.${SliderNavLeftClassName}`\n );\n this.navRight = this.containerNode.querySelector(\n `.${SliderNavRightClassName}`\n );\n }", "title": "" }, { "docid": "30d9262b9ee71d2c897936ce356384bc", "score": "0.5484548", "text": "recreateDom () {\n if (this.dom && this.dom.tr && this.dom.tr.parentNode) {\n const domAnchor = this._detachFromDom()\n\n this.clearDom()\n\n this._attachToDom(domAnchor)\n } else {\n this.clearDom()\n }\n }", "title": "" }, { "docid": "01289212d8fa7170853cdfd336c15fc1", "score": "0.54845417", "text": "function changeElements() {\n let subImages = document.querySelector('.subImagesContainer');\n let objectIndex = dynamicContent[this.id];\n\n while (subImages.firstChild) {\n subImages.removeChild(subImages.firstChild);\n }\n\n objectIndex.images.forEach(function(image, index) {\n var newSubImg = document.createElement('img');\n newSubImg.src = \"images/\"+ objectIndex.images[index];\n newSubImg.className += \" thumb\";\n newSubImg.dataset.index = index;\n subImages.appendChild(newSubImg);\n newSubImg.addEventListener('click', function() {popLightBox(index, objectIndex); }, false);\n\n });\n\n theSubhead.classList.remove(appliedClass);\n theHeading.classList.remove(appliedClass);\n\n theSubhead.firstChild.nodeValue = objectIndex.headline;\n theSeasonText.firstChild.nodeValue = objectIndex.text;\n\n\n\n appliedClass = this.id;\n\n theSubhead.classList.add(this.id);\n\n }", "title": "" }, { "docid": "fd5caf46ff2a49e18f940d3d2a632bcb", "score": "0.5480446", "text": "function local_SIMPL__DOM__()\n{\n}", "title": "" }, { "docid": "d35da02ea47f90fbc427c7ba79ac17ce", "score": "0.546133", "text": "function limpiandoHTML() {\n while ($listaTuits.firstChild) {\n $listaTuits.removeChild($listaTuits.firstChild);\n }\n}", "title": "" }, { "docid": "e102cf7322d87b563f8fa6daa769b110", "score": "0.5458651", "text": "function updateDOM() {\n\n\t\t// update score counter\n\t\tdocument.getElementById(\"player-1-score\").innerText = String(player1);\n\t\tdocument.getElementById(\"player-2-score\").innerText = String(player2);\n\n\t\t// update winlimit element\n\t\tdocument.getElementById(\"win-limit\").innerText = String(winLimit);\n\n\t\t// class update\n\t\tif (limitReached && !limitApplied) {\n\t\t\tconsole.log(\"limitReached:\", limitReached)\n\t\t\tlimitApplied = addLimitClass(limitReached);\n\t\t};\n\n\t\tif (targetId === \"reset\") {\n\t\t\treset();\n\t\t}\n\n\t}", "title": "" }, { "docid": "61a68919355c4d9f6f84c1a5ce224456", "score": "0.54567695", "text": "static compile(el) {\n // Remove element from the scene if it is already there\n let scene = Api.get().getScene();\n if (scene && el.vTarget){ scene.remove(el.vTarget.mainTarget); }\n // Remove DOM element\n //if (el.dTarget && el.dTarget.parentNode){ el.dTarget.parentNode.removeChild(el.dTarget); }\n // Remove any previous references if exist (for recompiling)\n if (el.vTarget){ delete el.vTarget; }\n // Instantiate scene object and attach it to the element \n el.vTarget = new HtmlRenderer(el);\n }", "title": "" }, { "docid": "ddbb5ba39fbcf3441df3f895f901029b", "score": "0.5453424", "text": "function manipulateDOM(config) {\n domready(function () {\n // Determine which of the three banner versions to render\n if (firstVisit) {\n createClickCounter(override.get('position', config.firstvisit), config);\n } else {\n createClickCounter(override.get('position', config.secondvisit), config);\n }\n });\n }", "title": "" }, { "docid": "610603ad0894c0ed0ff2c8bcbf5362a9", "score": "0.5450494", "text": "function asyncUpdateDom() {\n productsLoaded++;\n if (productsLoaded === totalCount) {\n updateDom(); \n }\n }", "title": "" }, { "docid": "18eca5d646eabca659efb46d988f0f9c", "score": "0.5447642", "text": "static AppendHtmlUtilities() {\n if ($('#ContainerMovement').length == 0)\n AppObjects.Dispatcher.Html.New_MovementContainer().prependTo($(\"body\"));\n }", "title": "" }, { "docid": "d50ca05e5b9174f8644865d25bcea451", "score": "0.5445567", "text": "function DOMImplementation() {\n}", "title": "" }, { "docid": "d50ca05e5b9174f8644865d25bcea451", "score": "0.5445567", "text": "function DOMImplementation() {\n}", "title": "" }, { "docid": "8f8364a71feca85f648fd57ddfce1336", "score": "0.54446733", "text": "traverse() {\n let elements = document.getElementsByTagName(this.element);\n let i = 0, s = elements.length;\n\n /* istanbul ignore next: this should be tested with end-to-end tests */\n for (; i < s; i++) {\n this.process(elements[i]);\n }\n\n if (this.isObservable && !this.mutationsObserved) {\n new MutationObserver(this.observe.bind(this))\n .observe(document.body, {\n childList: true,\n subtree: true,\n attributes: true,\n characterData: true,\n attributeOldValue: true,\n characterDataOldValue: true\n });\n\n this.mutationsObserved = true;\n }\n }", "title": "" }, { "docid": "033a4457bf3fb08d4c2ddb5ffce66200", "score": "0.5440094", "text": "function observeElementChildNodes(elm) {\n elm.$domManual$ = true;\n }", "title": "" }, { "docid": "4c1dd65093cf10ac270c40404a915b9e", "score": "0.54399425", "text": "function updateDOM() {\n document.getElementById( \"text\")\n .innerHTML = \"This is really cool!\";\n }", "title": "" }, { "docid": "d31969a4cd51e5da1f0caef7498da2e0", "score": "0.5427901", "text": "insertHTML(data){\n for(let x in data){\n this.get(data[x].element).forEach((item) => {\n if(item.element.id === data[x].id){\n item.element.insertAdjacentHTML(\"afterbegin\",data[x].html)\n }\n });\n\n }\n }", "title": "" }, { "docid": "b52183da9b5f6c5f7325e3f7d6a0b095", "score": "0.54260534", "text": "function CreateDom() {\n\n\n //$page.append('<img src=\"img/bg/bgSky.png\" class=\"bgSky\" style=\"opacity: 0.3\"/>');\n $page.append('<img src=\"img/bg/bgGround.png\" class=\"bgGround\" style=\"opacity: 0.3\"/>');\n\n\n $page.append('<div class=\"buy\">点击图片可进行购买</div>');\n\n $page.append('<img src=\"img/page6/btn1.png\" class=\"btn btn1\" width=\"25%\"/>');\n $page.append('<img src=\"img/page6/btn2.png\" class=\"btn btn2\" width=\"25%\"/>');\n $page.append('<img src=\"img/page6/btn3.png\" class=\"btn btn3\" width=\"25%\"/>');\n\n\n $page.append('<div class=\"mask\" style=\"z-index: 2\"><img src=\"img/page6/share.png\" class=\"share\" width=\"35%\"/></div>');\n\n for (i = 0; i < 6; i++) {\n $page.append('<div class=\"stage stage' + i + '\"><div class=\"sec\"><img /><div class=\"text\"></div></div></div>');\n }\n }", "title": "" }, { "docid": "30e9f35b428572c39a03f9ba0d35e034", "score": "0.5421324", "text": "function runUpdate(){\r persons.forEach(function(element){\r element.update();\r });\r generateHTML();\r }", "title": "" }, { "docid": "43a71846312229c5d4fe1c5db91f70e0", "score": "0.5413818", "text": "if (! elem || elem.nodeType === 3 || elem.nodeType === 8 ||! elem.style) {\n\t\t\tregreso;\n\t\t}", "title": "" }, { "docid": "2b76f32d723c56c00366755ca794c50a", "score": "0.5411635", "text": "function eventRender(node, dom, lugar) {\n dom = dom[dom.length-1].childNodes;\n console.log(dom)\n console.log(lugar)\n for(let i = 1; i<dom.length; i+=2) {\n //if(dom[i].classList.contains(lugar)) {\n if(dom[i].dataset.sedeid == lugar) {\n dom = dom[i];\n break;\n }\n }\n //console.log(dom)\n dom.innerHTML += node;\n}", "title": "" }, { "docid": "f90c8afc60c67e4cb6c940fe8c52676b", "score": "0.54094225", "text": "refresh(components, dom) {\n while(dom.firstChild) {\n dom.removeChild(dom.firstChild)\n }\n \n dom.appendChild(components)\n }", "title": "" }, { "docid": "3cb8fcf63359089c8cbbc7a5baa71baa", "score": "0.5408896", "text": "_prepareGetHTML() {\n this.getEditor().modifyDocument(() => {\n this._joinSplitedTextNodes();\n this.eventManager.emit('wysiwygGetValueBefore', this);\n });\n }", "title": "" }, { "docid": "bfb1c9033925089ac0c1e06c8f5ddfe2", "score": "0.5404198", "text": "function delete_html(){\n // Reset results_to_display to start a fresh search and ensure load_results works properly \n results_to_display = 0\n let myNode = document.getElementById('main-div');\n while (myNode.firstChild) {\n myNode.removeChild(myNode.lastChild);\n }\n}", "title": "" }, { "docid": "bbf99765b928524bb638ad4d3a5848d6", "score": "0.54005635", "text": "function removeOldElements() {\n score = 0;\n moves = 0;\n const parent = document.getElementById(\"content\");\n while (parent.firstChild) {\n console.log(\"removing\");\n parent.removeChild(parent.firstChild);\n }\n}", "title": "" }, { "docid": "1e03e5da187a611b68f19c429b9f69a7", "score": "0.5397712", "text": "function elementManager(){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t}", "title": "" }, { "docid": "85be2dec632ec99ebaa9ba62071da9e9", "score": "0.5397122", "text": "function updateDOM() {\n alert('updating the DOM');\n for(i = 0; i < game.rows; i++) {\n var row_nl = game.container.children[i].children;\n\n for(j = 0; j < game.cols; j++) {\n\t var square_val = game.grid[i][j];\n if(square_val !== 0) {\n\t\trow_nl[j].classList.add(toWord(square_val));\n console.log(row_nl[j].classList);\n row_nl[j].innerHTML = square_val;\n }\n\n var state = 'covered';\n if(testing)\n state = 'uncovered';\n row_nl[j].classList.add(state);\n row_nl[j].addEventListener('click', uncover);\n }\n }\n}", "title": "" }, { "docid": "66f3446742d22da67c328bc11df7cc40", "score": "0.53948087", "text": "function showHTML() {\n // CARGA LOS ELEMENTOS DEL ARRAY\n queue.queueControl.forEach((arrPos) => {\n // CREA EL ELEMENTO HTML E INSERTA POR APPEND CHILD\n queueElement = document.createElement(\"li\")\n queueElement.classList.add(\"element\")\n queueElement.innerHTML = `${arrPos}`\n queueContainer.appendChild(queueElement)\n })\n}", "title": "" }, { "docid": "7ed8a86c06cf315ed094a3e47e0d9523", "score": "0.53888017", "text": "showHTML(selector){\n document.querySelector(selector).style.visibility = \"visible\";\n }", "title": "" }, { "docid": "ede191b973b091bbf8e08e2ba1b4b1d7", "score": "0.5383453", "text": "update(data) {\n this._data = data;\n\n const newMarkup = this._generateMarkup(); // As if we are updating the whole View, but here we are only updting necessary elements\n\n // Converting the newMarkup html string to a DOM object living in the memory that we use to compare to the actual DOM living on the page\n const newDOM = document.createRange().createContextualFragment(newMarkup); // will essentially create a virtual DOM (doesnt live on page, but is in memory). From the string an object will be created known as a document fragment\n const newElements = Array.from(newDOM.querySelectorAll('*')); // * means all. Node list converted to array\n // console.log(newElements); // Shows all the elements contained in the new dom element we created from the newMarkup generated from the updated data. (Originally brings up nodeList of what essentially would be rendered on the DOM from the button press [converted to array manually])\n\n const curElements = Array.from(this._parentElement.querySelectorAll('*'));\n\n // console.log(`CURRENT`, curElements); // What is currently displayed on the app\n // console.log(`NEW`, newElements); // What would be displayed after the + button clicked on servings\n\n // Looping over both arrays at the same time\n newElements.forEach((newEl, i) => {\n const curEl = curElements[i];\n // console.log(curEl, newEl.isEqualNode(curEl)); // Method available to nodes. Compares the content of newEl to that of curEl\n\n // Updates changed TEXT\n if (\n !newEl.isEqualNode(curEl) &&\n newEl.firstChild?.nodeValue.trim() !== ''\n // Explanation: 1st condition -> property available on nodes that tests whether 2 nodes are equal. Compares newEl & curEl. In this case we want to search for nodes that are NOT equal. Unequal nodes now will also be tested if they are text content - we only want to change the text content on those nodes. To do so, use another property avaialble on nodes called nodeValue. Value of nodeValue will be null if it is pretty much anything but text (if null, the whole condition will be false -> replacement wont take place). If it is text, it will return the contnent of the text node.(also added optional chaining). trim() is just removing whitespace from string. We want to select the child node cz that is what contains the text, newEl is really just an element node and not a text node (what is the text is in fact the first child node [from advanced DOM]). We want this text to NOT be empty ie different from an empty string.\n // Summary: If the newEl and curEl are different and the text of the newEl is not empty, then we apply the following code\n ) {\n // console.log(`😉☑`, newEl.firstChild.nodeValue.trim()); //\n curEl.textContent = newEl.textContent;\n }\n\n // Updates changed ATTRIBUTES\n // Changing the data attributes when the curEl is different from the newEl. This cant be done in above if statement cz that only applies to the text content of the elements, nothing to do w/ code\n if (!newEl.isEqualNode(curEl)) {\n // console.log(`😉`, Array.from(newEl.attributes)); // Logs attributes property of all the elements that changed\n Array.from(newEl.attributes).forEach(\n attr => curEl.setAttribute(attr.name, attr.value) // Replaces all the attributes in the curEl w/ the attributes coming from the newEl\n );\n }\n\n // Not really an algorithm to use in larger projects irl\n });\n }", "title": "" }, { "docid": "b674ea9fb8a9b9f0f8b3dc16a2e87a3c", "score": "0.53802717", "text": "function changeElements() {\n let subImages = document.querySelector('.subImagesContainer');\n let objectIndex = dynamicContent[this.id];\n\n while(subImages.firstChild){\n subImages.removeChild(subImages.firstChild);\n}\n\n objectIndex.images.forEach(function(image, index) {\n let newSubImage = document.createElement('img');\n\n newSubImage.classList.add('thumb');\n\n newSubImage.src = \"images/\" + objectIndex.images[index];\n\n newSubImage.dataset.index = index;\n\n newSubImage.addEventListener('click', function() {popLightbox(index, objectIndex); }, false);\n\n subImages.appendChild(newSubImage);\n\n});\n\n theSubhead.classList.remove(appliedClass);\n theHeading.classList.remove(appliedClass);\n\n theSubhead.firstChild.nodeValue = objectIndex.headline;\n theSeasonText.firstChild.nodeValue = objectIndex.text;\n\n theSubhead.classList.add(this.id);\n theSeasonText.classList.add(this.id);\n\n appliedClass = this.id;\n}", "title": "" }, { "docid": "1de804ee3a24acfd3285bc8dfa249311", "score": "0.5375584", "text": "function efficientDOMAppend() {\n\t//Sample data would be\n\tvar response = {\n\t\t\t\"data\": [{\n\t\t\t\"id\": \"pElem1\",\n\t\t\t\"value\": \"Appended Paragraph Elem1\" \n\t\t}, {\n\t\t\t\"id\": \"pElem2\",\n\t\t\t\"value\": \"Appended Paragraph Elem2\"\n\t\t}, {\n\t\t\t\"id\": \"pElem3\",\n\t\t\t\"value\": \"Appended Paragraph Elem3\"\n\t\t}]\n\t};\n\n\tvar msgContainer = document.createDocumentFragment();\n\tvar responseDataLen = response.data.length;\n\tfor (var i = 0; i < responseDataLen; i++) {\n\t\tmsgContainer.appendChild(createElem(\"p\", {\n\t\t\t'id': response.data[i].id,\n\t\t\t'innerHTML': response.data[i].value\n\t\t}));\n\t}\n\tdocument.querySelector(\"#main p:nth-child(3)\").appendChild(msgContainer);\n}", "title": "" }, { "docid": "0151a8613173d8bdae61fa68ee1b76d6", "score": "0.53512806", "text": "function updateElements(){\n\n //set the opacity to 0, over 400ms\n for(var i = 0; i < transparent_elements.length; i++){\n transparent_elements[i].style.opacity = 0;\n }\n\n //replaces all information after a timeout of 400ms, then sets the opacity to 1 again\n setTimeout(function(){\n document.getElementById(\"show_container\").style.visibility = 'visible';\n elem_title.innerText = show_title;\n elem_image.setAttribute('style', 'background-image: url('+show_image+');');\n elem_dj.innerText = show_dj;\n\n element_tags.innerText = \"\";\n for(var i = 0; i < show_tags.length; i++){\n element_tags.innerText += \"- \"+show_tags[i] + \" - \";\n }\n\n elem_description.innerHTML = show_description;\n elem_time.innerText = show_time;\n elem_archive.setAttribute('href', show_archive);\n\n for(i = 0; i < transparent_elements.length; i++){\n transparent_elements[i].style.opacity = 1;\n }\n }, 400);\n}", "title": "" }, { "docid": "4f8a3e05ca10189db8091358f25fb115", "score": "0.5348939", "text": "function visaElement(id)\n{\n var elemDiv = document.getElementById(id); //Hamta DIV med id id\n elemDiv.setAttribute(\"style\", \"\"); //Ta bort stilen som \"odoljer\" innehall\n}", "title": "" }, { "docid": "31db9b8e99d166d20ed5a107cc0f0f0b", "score": "0.53456366", "text": "function limpiarHTML() {\r\n while (contenedorCarrito.firstChild) {\r\n contenedorCarrito.removeChild(contenedorCarrito.firstChild);\r\n }\r\n}", "title": "" }, { "docid": "8317e6a9b4737f44481b1973a29734fa", "score": "0.534554", "text": "function upgradeDOM(playerslist) {\n var datalist = $(\".left\");\n for (var i = 0; i < playerslist.length; i++) {\n var id = playerslist[i].id;\n var newElement = document.createElement(\"div\");\n newElement.classList.add(\"mystyle\");\n newElement.innerHTML = id;\n datalist.append(newElement);\n }\n return;\n}", "title": "" }, { "docid": "87dbe7e437e2230490777f3345b30df1", "score": "0.53452253", "text": "function animatePageElements(time_value) {\n /* **************** **************** **************** **************** **************** \n * Triggers a sequence of modifications of CSS values and \n * properties and animations of various HTML elements which fire when a user \n * activates a menu option, intra-section, or intrasection option.\n * \n * The function has a number of purposes.\n * 1. Determine the hash of the URL, if there is one.\n * 2 Allow for the page elements to be rendered within the browser.\n * 3. Make the Sections within the page invisible while the menu is activated \n * 4. Make the invisible sections of the page visible \n * after a menu option is activated.\n * **************** *************** **************** **************** **************** */\n \n var nav_selector = new String();\n var wndow_selector = new String();\n var all_copy_selector = new String();\n var single_copy_selector = new String();\n var headr_selector = new String();\n var sub_nav_selector = new String();\n var div_selector = new String();\n var bkgrnd_selector = new Object();\n // Holds the String value of the selector, \"#bkgrnd-sctn_X\".\n\n var nav_element = new Object();\n var cntainr_element = new Object();\n var wndow_elements = new Array();\n var wndow_element = new Object();\n var all_copy_element = new Object();\n // Holds the contents of the HTML element identified by the selector, \".copy\".\n var single_copy_element = new Object();\n // Holds the contents of the HTML element identified by the selector, \".copy:nth-child(X)\".\n var headr_element = new Object();\n // Holds the contents of the HTML element identified by the selector, \".headr.sctn_X\".\n var bkgrnd_element = new Object();\n // Holds the contents of the HTML element identified by the selector, \"#bkgrnd-sctn_X\".\n var sub_nav_element = new Object();\n // Holds the contents of the HTML element identified by the selector, \"#nav-sctn_X\".\n\n var section_search_string = new String();\n // Holds a String, \"#sctn_\", which is searched for within the URL hash.\n var position_search_string = new String();\n // Holds a String, \"pos=\", which is searched for within the URL hash.\n \n var url_hash = new String();\n // Holds the String value of the URL hash\n\n var current_position = new Number();\n // Holds a number which matches the vertical position within the webpage that is viewable.\n \n var position_value_index_num = new Number();\n // Holds a Number representing the location within the URL hash where the \n // Position Valueis listed.\n \n var section_value = new String();\n // Holds the String value of the Section Value listed in the URL hash.\n var position_value = new String();\n // Holds the String value of the Position Value listed in the URL hash.\n \n var element_off_css = new Object();\n var element_on_css = new Object();\n \n var page_dimensions_Array = new Array();\n // The calculated values for the \"width\" and \"height\" of various HTML elements \n // of the webpage within the browser window are passed on to \"page_dimensions_Array\".\n\n var window_width = new Number();\n // Holds the numerical value of the width of the browser window.\n\n var bkgrnd_element_width_val = new Number();\n // Holds a number which is the product of the width of the browser window \n // and \"position_value\".\n var bkgrnd_element_x_position = new String();\n // Holds a String which the product of the calculated width of the browser window \n // and \"position_value\", which is contained by, \"bkgrnd_element_width_val\".\n // \n // This value is used to determine the CSS value of the property, \"left\", \n // of the background of a Section.\n \n nav_selector = \"nav\";\n nav_element = $jQ(nav_selector);\n \n section_search_string = \"sctn_main\";\n // \"section_search_string\" holds a string that is looked for within \"url_hash\".\n // \n // NOTE: If the variable names within the URL are changed, the value of \n // \"section_search_string\" needs to be updated.\n url_hash = window.location.hash;\n \n if ($jQ(nav_element).css(\"left\") !== \"0px\" && \n url_hash !== \"\" && \n url_hash.indexOf(section_search_string) === -1) {\n // If the HTML element, \"<nav>\", is not viewable, the URL does not include a hash of any kind \n // and the string held by, \"section_search_string\", is not contained within \"url_hash\", \n // this condition is triggered.\n \n current_position = $jQ(window).scrollTop();\n\n section_value = determineCurrentSection(current_position);\n // Based upon the vertical position of the viewable portion of the webpage \n // within the browser window, a number representing the current Section \n // is passed along to \"section_value\".\n\n position_search_string = \"pos=\";\n // \"position_search_string\" holds a string that is looked for within \"url_hash\".\n // \n // NOTE: If the variable names within the URL are changed, the value of \n // \"position_search_string\" needs to be updated.\n position_value_index_num = url_hash.indexOf(position_search_string);\n // \"position_value_index_num\" equals the \"location\" within the \"url_hash\" \n // that the beginning of the value of \"position_search_string\" occurs.\n\n if (position_value_index_num === -1) {\n // If the value of \"url_hash\" is \"#sctn_main\", this condition is triggered.\n position_value = \"0\";\n // If the value of \"url_hash\" does not include a Position value, the webpage \n // has just been loaded and therefore the next section which will be viewed \n // will default to the \"first window pane\".\n } else {\n position_value = url_hash.charAt(position_value_index_num + position_search_string.length);\n // If the value of \"url_hash\" contains a Position value, it is passed \n // on to \"position_value\".\n }\n \n position_value = parseInt(position_value);\n // The String datatype of \"position_value\" is changed to a Number.\n\n all_copy_selector = \"#wndow-sctn_\" + section_value.toString() + \" > .copy\";\n single_copy_selector = \"#wndow-sctn_\" + section_value.toString() + \" > .copy:nth-child(\" + (position_value + 2).toString() + \")\";\n headr_selector = \".headr.sctn_\" + section_value.toString();\n div_selector = \"div\";\n sub_nav_selector = \"#nav-sctn_\" + section_value.toString();\n bkgrnd_selector = \"#bkgrnd-sctn_\" + section_value.toString();\n\n all_copy_element = $jQ(all_copy_selector);\n single_copy_element = $jQ(single_copy_selector);\n headr_element = $jQ(headr_selector);\n sub_nav_element = $jQ(sub_nav_selector);\n bkgrnd_element = $jQ(bkgrnd_selector);\n\n element_off_css = {\n display: \"none\"\n };\n\n element_on_css = {\n display: \"block\"\n };\n \n page_dimensions_Array = parseWindowDimensions();\n // The calculated values for the \"width\" and \"height\" of various HTML elements \n // of the webpage within the browser window are passed on to \"page_dimensions_Array\".\n\n window_width = page_dimensions_Array[0];\n // The width, held by, \"page_dimensions_Array\", is passed to \"window_width\".\n\n if (section_value === 1) {\n // If the Section which is under processing is 'SECTION #1', this condition is \n // triggered.\n\n bkgrnd_element_width_val = window_width * position_value;\n // \"bkgrnd_element_width_val\" holds the product of \"window_width\" and \"position_value\".\n // It is also the horizontal position within a background for a Section that matches \n // up with the viewable \"window pane\".\n } else {\n // Otherwise, for any other Section, this condition is triggered.\n\n bkgrnd_element_width_val = 0;\n }\n \n bkgrnd_element_x_position = \"-\" + bkgrnd_element_width_val.toString() + \"px 0px\";\n // \"bkgrnd_element_x_position\" holds the value for the CSS property, \"backgroundPosition\" \n // for the Section that this function is processing.\n\n $jQ(bkgrnd_element).css(\"backgroundPosition\", bkgrnd_element_x_position);\n // The background of the current Section that this function is processing \n // is made to now match the viewable window pane.\n\n $jQ(all_copy_element).css(element_off_css);\n $jQ(single_copy_element).css(element_on_css);\n \n if ($jQ(sub_nav_element) !== undefined) {\n // If the Section this function is processing contains intra-sectional navigation \n // this condition is triggered.\n \n $jQ(sub_nav_element).css(element_on_css);\n }\n \n $jQ(headr_element).fadeTo(time_value, 1, \n // The contents of the window pane of the Section this function is processing are faded \n // into view, starting with the HTML element serving as the header. \n\n function () {\n fadeCopyElements(single_copy_element, div_selector, section_value, position_value, sub_nav_element, time_value);\n // \"fadeCopyElements\" is triggered to fade in the various content of the Section this\n // function is processing.\n }\n );\n }\n}", "title": "" }, { "docid": "4123801f4638c71d5c58ee4c062f144b", "score": "0.53448313", "text": "postCreateDom() {\n }", "title": "" }, { "docid": "ec62028973fc3827dfa8ec18fff8969c", "score": "0.5340126", "text": "function limpiarHTML(){\n //Forma Lenta\n //listaInversiones.innerHTML = ''\n\n // Forma optima \n while(listaInversiones.firstChild){\n listaInversiones.removeChild(listaInversiones.firstChild)\n }\n}", "title": "" }, { "docid": "27816132f6fdc2165a6238486206fbc6", "score": "0.5338304", "text": "function switchDOM(){\n $higher.css({top:\"0\", \"z-index\":1});\n $lower.css({top:\"0\", \"z-index\":1});\n\n // get elements to put switched elements BEFORE\n $lowerBefore.before($lower);\n if (shouldCorrectIndex) {\n $higherBefore.after($higher);\n }\n else {\n $higherBefore.before($higher);\n }\n if(callback){callback();};\n }", "title": "" }, { "docid": "6f3fa6c62ab47644f2fc7100afbba2b4", "score": "0.5335822", "text": "function prepareElement(){\n\n\t\townConfig.DOM.map(function(select, index){\n\t\t\tcreateElements(select, index);\n\t\t});\n\n\t\tprepareModal();\n\t}", "title": "" }, { "docid": "d533f8c1704a957ec90d16621725e86b", "score": "0.5333769", "text": "createEl (node) {\n return document.createDocumentFragment();\n }", "title": "" }, { "docid": "6a91c28a621247ed540c5cbdf7b9b6ad", "score": "0.53300637", "text": "function getElem(e,c){function f(){if(navigator.userAgent.indexOf(\"MSIE 8\")==-1&&navigator.userAgent.indexOf(\"MSIE 7\")==-1&&navigator.userAgent.indexOf(\"MSIE 6\")==-1)return!1;if(navigator.userAgent.indexOf(\"MSIE 8\")>-1)return!0;if(navigator.userAgent.indexOf(\"MSIE 7\")>-1)return!0;if(navigator.userAgent.indexOf(\"MSIE 6\")>-1)return!0}var t=function(e,n,r){document.getElementsByClassName?t=function(e,t,n){n=n||document;var r=n.getElementsByClassName(e),i=t?new RegExp(\"\\\\b\"+t+\"\\\\b\",\"i\"):null,s=[],o;for(var u=0,a=r.length;u<a;u+=1){o=r[u];(!i||i.test(o.nodeName))&&s.push(o)}return s}:document.evaluate?t=function(e,t,n){t=t||\"*\";n=n||document;var r=e.split(\" \"),i=\"\",s=\"http://www.w3.org/1999/xhtml\",o=document.documentElement.namespaceURI===s?s:null,u=[],a,f;for(var l=0,c=r.length;l<c;l+=1)i+=\"[contains(concat(' ', @class, ' '), ' \"+r[l]+\" ')]\";try{a=document.evaluate(\".//\"+t+i,n,o,0,null)}catch(h){a=document.evaluate(\".//\"+t+i,n,null,0,null)}while(f=a.iterateNext())u.push(f);return u}:t=function(e,t,n){t=t||\"*\";n=n||document;var r=e.split(\" \"),i=[],s=t===\"*\"&&n.all?n.all:n.getElementsByTagName(t),o,u=[],a;for(var f=0,l=r.length;f<l;f+=1)i.push(new RegExp(\"(^|\\\\s)\"+r[f]+\"(\\\\s|$)\"));for(var c=0,h=s.length;c<h;c+=1){o=s[c];a=!1;for(var p=0,d=i.length;p<d;p+=1){a=i[p].test(o.className);if(!a)break}a&&u.push(o)}return u};return t(e,n,r)};e=e.split(\" \");var n=/\\.[a-zA-Z0-9_-]*/,r=/#[a-zA-Z0-9_-]*/;if(!e[1]){e=e[0];if(r.test(e))return document.getElementById(e.replace(\"#\",\"\"));if(n.test(e)){var s=t(e.replace(\".\",\"\")),o=[];for(i in s)(f()&&typeof s[i].getElementsByTagName==\"object\"||!f()&&typeof s[i].getElementsByTagName==\"function\")&&o.push(s[i]);return o[1]?o:o[0]}var s=document.getElementsByTagName(e);return s[1]?s:s[0]}var u=document,a;for(i in e)if(n.test(e[i])){e[i]=e[i].replace(\".\",\"\");if(u[1]){a=[];for(s in u)if(f()&&typeof u[s].getElementsByTagName==\"object\"||!f()&&typeof u[s].getElementsByTagName==\"function\")for(x in t(e[i],\"\",u[s]))a.push(t(e[i],\"\",u[s])[x]);u=a.slice(0)}else{u=t(e[i],\"\",u);u[1]||(u=u[0])}}else if(r.test(e[i])){e[i]=e[i].replace(\"#\",\"\");u=document.getElementById(e[i])}else if(u[1]){a=[];for(s in u)if(f()&&typeof u[s].getElementsByTagName==\"object\"||!f()&&typeof u[s].getElementsByTagName==\"function\")for(x in u[s].getElementsByTagName(e[i]))a.push(u[s].getElementsByTagName(e[i])[x]);u=a.slice(0)}else{u=u.getElementsByTagName(e[i]);u[1]||(u=u[0])}return u}", "title": "" }, { "docid": "7b1d0d51c6e05e92c278f056f7d4c924", "score": "0.532898", "text": "function loadHTMLContent(tutorial){\r\n console.log(\"inside loadHTML content\");\r\n var instructor_text = $('<p id = \"sdajck3\" href=\"#\">Text box</p>');\r\n instructor_text[0].innerHTML = get_current_node(tutorial).entered_text;\r\n instructor_text.css({\r\n 'position': 'fixed', \r\n 'bottom':'5%',\r\n 'left':'5%',\r\n 'background-color': '#e60505',\r\n 'font-size':'12px',\r\n 'font-family':'sans-serif',\r\n 'padding' : '.5em 1em',\r\n 'border':'transparent',\r\n 'border-radius':'2px',\r\n 'color' : 'white'\r\n });\r\n \r\n instructor_text.appendTo('body');\r\n\r\n //console.log(\"Searching for element: \" \r\n var all_elements = document.getElementsByTagName(\"*\");\r\n console.log(get_current_node(tutorial));\r\n console.log(get_current_node(tutorial));\r\n console.log(get_current_node(tutorial).html);\r\n for (var i = 0, element; element = all_elements[i++];) {\r\n \r\n if(element.outerHTML == get_current_node(tutorial).html){\r\n element.style.border = \"thick solid green\";\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "acba50dc5bdf86351cfc8305856b02b2", "score": "0.53113395", "text": "function cacheDom() {\n var UI = {\n $body: document.getElementById('main'),\n $main: document.getElementById('mainLoad'),\n $top: document.getElementById('topBar'),\n $footer: document.getElementById('footer'),\n $contactMain: document.getElementById('contactDiv'),\n $contactBtn: document.getElementById('contactBtn'),\n $contactNav: document.getElementById('contactNav'),\n $contactFtBtn: document.getElementById('footerContact'),\n $homeBackground: document.getElementById('homeGraphicDiv'),\n $form: document.getElementById('contact_form'),\n $formName: document.getElementById('extra_name'),\n $formEmail: document.getElementById('reply_to'),\n $formSubject: document.getElementById('subject'),\n $formMessage: document.getElementById('message'),\n $formSubmit: document.getElementById('js_send'),\n };\n\n return UI\n}", "title": "" }, { "docid": "093f0bf04f67dfd2d0843d639428bbd2", "score": "0.5309064", "text": "function updateDOM () {\n var backgroundGradientDOM = document.querySelector(\".background-gradient\");\n var bodyDOM = document.querySelector(\"#body-mint\");\n\n var billsAmountDueDOM = document.querySelector(\".billsAmountDue\");\n var systemMessagesDOM = document.querySelector(\"#systemMessages\");\n var overviewSelectedDOM = document.querySelector(\"li#overview .selected\");\n\n // If all are present, hide the .background-gradient div and add overlay\n if (backgroundGradientDOM && billsAmountDueDOM && bodyDOM && overviewSelectedDOM && systemMessagesDOM && window.location.href.indexOf(\"https://mint.intuit.com/overview.event\") > -1) {\n // clearInterval timer so updateDOM() will not be called anymore.\n clearInterval (jsInitChecktimer);\n\n backgroundGradientDOM.style.display = \"none\";\n\n // quick and dirty solution for inserting proper stylized content (yes, in-line styles are bad)\n bodyDOM.insertAdjacentHTML(\"beforeend\", \"<div style='height:100vh; background-color: #add8e6;'><div style='text-align:center; color:white; font-size: 150px; font-weight:800; padding-top:35vh;'>\"+billsAmountDueDOM.innerText+\"</div><div style='text-align: center;'><a href='/bills.event' style='font-size: 18px; font-weight: 800;'>Update My Bills</a></div></div>\");\n }\n }", "title": "" }, { "docid": "0d10a77d941547ba541a44be6a0bd9a5", "score": "0.5301988", "text": "function addElements() {\n // A function that adds an element\n // The current element\n // The span element\n var addElement, elem, span;\n\n // Adds an element to the page\n // param: The new tag name (string)\n // param: The parent node\n addElement = function(tag, prt) {\n // The new element\n var newElem;\n\n // Create the new element\n newElem = {\n tag : tag,\n _parent: prt,\n content: '',\n kids : []\n };\n\n // Append it to the parent\n prt.kids.push(newElem);\n \n return newElem;\n };\n\n // Add nodes to the html tree\n elem = addElement('body', html);\n elem = addElement('div', elem);\n span = addElement('span', elem);\n addElement('br', elem);\n\n // Add content to nodes\n span.content = 'Lorem Ipsum';\n }", "title": "" }, { "docid": "a7ad1c46c2e20737a1bdf9e91daf240b", "score": "0.53015125", "text": "async element(element) {\n switch (element.getAttribute(\"id\")) {\n // display links\n case \"links\": \n var anchorList = [];\n linkObjects.forEach(function (item) {\n anchorList.push(anchor.replace(\"{href}\", item.url).replace(\"{title}\", item.name))\n });\n element.setInnerContent(anchorList.toString().replaceAll(\",\", \"\\n\"), { 'html': true })\n break;\n // remove display: none in profile\n case \"profile\":\n element.removeAttribute(\"style\");\n break;\n // add profile picture in avatar\n case \"avatar\":\n element.setAttribute(\"src\", avatarImage);\n element.setAttribute(\"alt\", \"Not found!\");\n break;\n // add username\n case \"name\":\n element.setInnerContent(username);\n break;\n // extra credit: add social media links\n case \"social\":\n var svg = \"<svg><img height=\\\"32\\\" width=\\\"32\\\" src=\\\"https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/roku.svg\\\" /></svg>\"\n element.removeAttribute(\"style\");\n element.setInnerContent(anchor.replace(\"{href}\", \"https://www.roku.com/\").replace(\"{title}\", svg), { 'html': true });\n break;\n }\n // extra credit: add title as my name\n if (element.tagName == \"title\") {\n element.setInnerContent(\"Aditya Bharadwaj\");\n // extra credit: change background\n } else if (element.tagName == \"body\") {\n element.setAttribute(\"class\", \"bg-blue-900\");\n }\n }", "title": "" }, { "docid": "f97579305afdecb8c502d382fcf41d6a", "score": "0.52967453", "text": "function inner_html_copy(src_dom_node,level) {\n\t\tvar out='';\n\n\t\tif (typeof level=='undefined') level=1;\n\t\tif (level>1) {\n\n\t\t\tif (src_dom_node.nodeType==1) {\n\n\t\t\t\t// element node\n\t\t\t\tvar this_node=document.createElement(src_dom_node.nodeName);\n\t\t\t\tout+='<'+this_node.nodeName;\n\n\t\t\t\t// attributes\n\t\t\t\tvar cleaned_attributes=[];\n\t\t\t\tfor (var a=0,attr=src_dom_node.attributes.length;a<attr;a++) {\n\t\t\t\t\tvar a_name=src_dom_node.attributes[a].name,a_value=src_dom_node.attributes[a].value;\n\t\t\t\t\tcleaned_attributes[a_name]=a_value;\n\t\t\t\t}\n\t\t\t\tfor (var a=0,attr=src_dom_node.attributes.length;a<attr;a++) {\n\t\t\t\t\tvar a_name=src_dom_node.attributes[a].name,a_value=cleaned_attributes[a_name];\n\t\t\t\t\tif (\n\t\t\t\t\t\t(a_value!==null) &&\n\t\t\t\t\t\t(a_name!='complete') &&\n\t\t\t\t\t\t(a_name!='simulated_events') && // cms, expando\n\t\t\t\t\t\t(((a_name.substr(0,2)!='on') && (a_name.substr(0,6)!='jQuery') && (a_name.substr(0,8)!='sizcache') && (a_name!='sizset') && (a_name!='nodeIndex') && (a_name!='cite') && (a_name!='nofocusrect') && (a_name!='width') && (a_name!='height') && (a_name!='cache') && (a_name!='dataFld') && (a_name!='dataFormatAs') && (a_name!='dataSrc') && (a_name!='implementation') && (a_name!='style')) || (a_value!='null')) &&\n\t\t\t\t\t\t((a_name!='start') || (a_value!='fileopen')) &&\n\t\t\t\t\t\t((a_name!='loop') || (a_value!='1')) &&\n\t\t\t\t\t\t(((a_name!='width') && (a_name!='height') && (a_name!='tabIndex') && (a_name!='hspace') && (a_name!='vspace')) || (a_value!='0')) &&\n\t\t\t\t\t\t(((a_name!='noWrap') && (a_name!='readOnly') && (a_name!='indeterminate') && (a_name!='hideFocus') && (a_name!='disabled') && (a_name!='isMap')) || (a_value!='false')) &&\n\t\t\t\t\t\t((a_name!='contentEditable') || (a_value!='inherit')) &&\n\t\t\t\t\t\t(((a_name.substr(0,6)!='border') && (a_name!='dateTime') && (a_name!='scope') && (a_name!='clear') && (a_name!='bgColor') && (a_name!='vAlign') && (a_name!='chOff') && (a_name!='ch') && (a_name!='height') && (a_name!='width') && (a_name!='axis') && (a_name!='headers') && (a_name!='background') && (a_name!='accept') && (a_name!='language') && (a_name!='longDesc') && (a_name!='border') && (a_name!='dataFld') && (a_name!='dataFormatAs') && (a_name!='dataSrc') && (a_name!='lang') && (a_name!='id') && (a_name!='name') && (a_name!='dir') && (a_name!='accessKey') && (a_name!='dynsrc') && (a_name!='vrml') && (a_name!='align') && (a_name!='useMap') && (a_name!='lowsrc')) || (a_value!=''))\n\t\t\t\t\t)\n\t\t\t\t\t\tout+=' '+a_name+'=\"'+escape_html(a_value)+'\"';\n\t\t\t\t}\n\n\t\t\t\tif (src_dom_node.childNodes.length>0)\n\t\t\t\t{\n\t\t\t\t\tout+='>';\n\n\t\t\t\t\t// do child nodes\n\t\t\t\t\tfor (var i=0,j=src_dom_node.childNodes.length;i<j;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((src_dom_node.childNodes[i].id!='_firebugConsole') && (src_dom_node.childNodes[i].type!='application/x-googlegears'))\n\t\t\t\t\t\t\tout+=inner_html_copy(src_dom_node.childNodes[i],level+1);\n\t\t\t\t\t}\n\n\t\t\t\t\tout+='</'+this_node.nodeName+'>';\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tout+=' />';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (src_dom_node.nodeType==3) {\n\t\t\t\t// text node\n\t\t\t\tout+=escape_html(src_dom_node.nodeValue?src_dom_node.nodeValue:'');\n\t\t\t}\n\t\t\telse if (src_dom_node.nodeType==4) {\n\t\t\t\t// text node\n\t\t\t\tout+=(src_dom_node.nodeValue?'<![CDATA['+src_dom_node.nodeValue+']]':'');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\t// do child nodes\n\t\t\tfor (var i=0,j=src_dom_node.childNodes.length;i<j;i++)\n\t\t\t{\n\t\t\t\tif ((src_dom_node.childNodes[i].id!='_firebugConsole') && (src_dom_node.childNodes[i].type!='application/x-googlegears'))\n\t\t\t\t\tout+=inner_html_copy(src_dom_node.childNodes[i],level+1);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}", "title": "" }, { "docid": "1a9ebf0f30e49bbea628128410490a59", "score": "0.5292419", "text": "updateContainerViaDom () {\n const renderer = this.container.env.renderer;\n if (!renderer) return;\n const node = this.getNodeFor(this.container);\n if (node && this.hasEmbeddedContainer()) {\n this.container.renderingState.inlineGridImportant = true;\n }\n }", "title": "" }, { "docid": "079d946d4131ade663d4a9d2a0c554f3", "score": "0.52915365", "text": "function intercambiarPosicionesDOM(idPieza1, idPieza2) {\n // Intercambio posiciones en el DOM\n var elementoPieza1 = document.getElementById(idPieza1);\n var elementoPieza2 = document.getElementById(idPieza2);\n\n var padre = elementoPieza1.parentNode;\n\n var clonElemento1 = elementoPieza1.cloneNode(true);\n var clonElemento2 = elementoPieza2.cloneNode(true);\n\n padre.replaceChild(clonElemento1, elementoPieza2);\n padre.replaceChild(clonElemento2, elementoPieza1);\n}", "title": "" }, { "docid": "a4879fd9070231ea7006eb8b2bb1f6f4", "score": "0.5289561", "text": "function performInitialDomManipulations() {\n if (!vwoe_$('._vwo_full_page_glass').length) {\n vwoe_$('body').append('<div class=\"_vwo_full_page_glass\"></div>');\n }\n\n resizeFullPageGlass();\n\n vwoe_$('._vwo_full_page_glass').unbind('click').bind('click', function() {\n request('VWOEditor.onGlassClick');\n }).hide();\n\n // cover all iframe with a div to prevent elements inside the iframe from being clicked\n changeApplier.putGlassOnEachIframe();\n\n // flash hacks\n vwoe_$(\"embed\").attr(\"allowscriptaccess\", \"never\");\n vwoe_$(\"param[name=allowscriptaccess]\").attr(\"value\", \"never\");\n }", "title": "" }, { "docid": "601250c57431f178c64294a753b1e026", "score": "0.52828526", "text": "function initElements() {\n for (let i = 0; i < elementCount; i++) {\n addDOMElement(elementsArr[i]);\n }\n}", "title": "" }, { "docid": "944bf05a92d2558bbb21d66f05364286", "score": "0.5280894", "text": "[applyElementData](source, target) {\n const sourceChildNodes = source ? [...source.childNodes] : [];\n const clones = sourceChildNodes.map((node) => node.cloneNode(true));\n updateChildNodes(target, clones);\n }", "title": "" }, { "docid": "e27f73dd03da6fa2774b7dfc2821ef42", "score": "0.52751374", "text": "function inner_html_copy(dom_node,xml_doc,level,script_tag_dependencies) {\n\tif (typeof level=='undefined') level=1;\n\tif (level>1) {\n\t\tvar node_upper=xml_doc.nodeName.toUpperCase();\n\n\t\tif ((node_upper=='SCRIPT') && (!xml_doc.getAttribute('src')))\n\t\t{\n\t\t\tvar text=(xml_doc.nodeValue?xml_doc.nodeValue:(xml_doc.textContent?xml_doc.textContent:(xml_doc.text?xml_doc.text:'')));\n\t\t\tif (script_tag_dependencies['to_load'].length==0)\n\t\t\t{\n\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\tif (typeof window.execScript!='undefined')\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.execScript(text);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\teval.call(window,text);\n\t\t\t\t\t}\n\t\t\t\t},0);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tscript_tag_dependencies['to_run'].push(text); // Has to wait until all scripts are loaded\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (xml_doc.nodeType==1) {\n\t\t\t// element node\n\t\t\tvar this_node=dom_node.ownerDocument.createElement(xml_doc.nodeName);\n\n\t\t\t// attributes\n\t\t\tfor (var a=0,attr=xml_doc.attributes.length;a<attr;a++) {\n\t\t\t\tvar a_name=xml_doc.attributes[a].name,a_value=xml_doc.attributes[a].value,evt=(a_name.substr(0,2)=='on');\n\t\t\t\tif (!evt) {\n\t\t\t\t\tswitch (a_name) {\n\t\t\t\t\t\tcase 'class':\n\t\t\t\t\t\t\tthis_node.className=a_value;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'for':\n\t\t\t\t\t\t\tthis_node.htmlFor=a_value;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tthis_node.setAttribute(a_name,a_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (e) {};\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis_node[a_name]=eval('var x=function(event) { '+a_value+' }; x;');\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// append node\n\t\t\tif ((node_upper=='SCRIPT') || (node_upper=='LINK')/* || (node_upper=='STYLE') Causes weird IE bug*/)\n\t\t\t{\n\t\t\t\tif ((node_upper=='SCRIPT') && (document.querySelector('script[src=\"'+this_node.src+'\"]'))) return;\n\t\t\t\tif ((node_upper=='LINK') && (document.querySelector('link[href=\"'+this_node.href+'\"]'))) return;\n\n\t\t\t\tif (node_upper=='SCRIPT')\n\t\t\t\t{\n\t\t\t\t\tscript_tag_dependencies['to_load'].push(this_node);\n\t\t\t\t\tthis_node.async=false;\n\t\t\t\t\tthis_node.onload=this_node.onreadystatechange=function() {\n\t\t\t\t\t\t// Once this <script src=\"...\"> has loaded, we need to execute any <script>...</script> code. So we need to tie into load state for this\n\t\t\t\t\t\tif ((typeof this_node.readyState=='undefined') || (this_node.readyState=='complete') || (this_node.readyState=='loaded'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar found=0,i;\n\n\t\t\t\t\t\t\tfor (i=0;i<script_tag_dependencies['to_load'].length;i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (script_tag_dependencies['to_load'][i]===this_node)\n\t\t\t\t\t\t\t\t\tdelete script_tag_dependencies['to_load'][i];\n\t\t\t\t\t\t\t\telse if (typeof script_tag_dependencies['to_load'][i]!=='undefined') found++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (found==0) // Now we know all to_loads are loaded, we do the to_runs\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (typeof window.console!='undefined')\n\t\t\t\t\t\t\t\t\tconsole.log('All AJAX-injected script tags loaded');\n\n\t\t\t\t\t\t\t\tfor (i=0;i<script_tag_dependencies['to_run'].length;i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (typeof window.execScript!='undefined')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\twindow.execScript(script_tag_dependencies['to_run'][i]);\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\teval.call(window,script_tag_dependencies['to_run'][i]);\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\tscript_tag_dependencies['to_run']=[]; // So won't run again, if both onreadystatechange and onload implemented in browser\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdom_node=document.getElementsByTagName('head')[0].appendChild(this_node);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tdom_node=dom_node.appendChild(this_node);\n\t\t\t\tvar _new_html__initialise=function() {\n\t\t\t\t\tvar found=0,i;\n\n\t\t\t\t\tfor (i=0;i<script_tag_dependencies['to_load'].length;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (script_tag_dependencies['to_load'][i]===this_node)\n\t\t\t\t\t\t\tdelete script_tag_dependencies['to_load'][i];\n\t\t\t\t\t\telse if (typeof script_tag_dependencies['to_load'][i]!=='undefined') found++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (found==0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnew_html__initialise(this_node);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {} // Could be some kind of access error (been seen in IE)\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\twindow.setTimeout(_new_html__initialise,0); // Can't do it yet\n\t\t\t\t};\n\t\t\t\twindow.setTimeout(_new_html__initialise,0);\n\t\t\t}\n\t\t}\n\t\telse if (xml_doc.nodeType==3) {\n\t\t\t// text node\n\t\t\tvar text=(xml_doc.nodeValue?xml_doc.nodeValue:(xml_doc.textContent?xml_doc.textContent:(xml_doc.text?xml_doc.text:'')));\n\t\t\tvar test=text.replace(/^\\s*|\\s*$/g,'');\n\n\t\t\tif (test.indexOf('<!--')!=0 && (test.length<=3 || test.indexOf('-->')!=(test.length-3)))\n\t\t\t{\n\t\t\t\tif ((dom_node.nodeName=='STYLE') && (!dom_node.ownerDocument.createCDATASection))\n\t\t\t\t{\n\t\t\t\t\tdom_node.cssText=text; // needed for IE\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tdom_node.appendChild(dom_node.ownerDocument.createTextNode(text));\n\t\t\t\t}\n\t\t\t\tdom_node=null;\n\t\t\t}\n\t\t}\n\t\telse if (xml_doc.nodeType==4) {\n\t\t\t// CDATA node\n\t\t\tvar text=(xml_doc.nodeValue?xml_doc.nodeValue:(xml_doc.textContent?xml_doc.textContent:(xml_doc.text?xml_doc.text:'')));\n\t\t\tif ((dom_node.nodeName=='STYLE') && (!dom_node.ownerDocument.createCDATASection))\n\t\t\t{\n\t\t\t\tdom_node.cssText=text; // needed for IE\n\t\t\t} else\n\t\t\t{\n\t\t\t\tdom_node.appendChild(dom_node.ownerDocument./*createCDATASection*/createTextNode(text)); // use of createCDATASection causes weird bug in Firefox (sibling DOM nodes skipped)\n\t\t\t}\n\t\t\tdom_node=null;\n\t\t}\n\t}\n\n\t// do child nodes\n\tif (dom_node)\n\t{\n\t\tfor (var i=0,j=xml_doc.childNodes.length;i<j;i++)\n\t\t{\n\t\t\tif (xml_doc.childNodes[i].id!='_firebugConsole')\n\t\t\t\tinner_html_copy.call(window,dom_node,xml_doc.childNodes[i],level+1,script_tag_dependencies);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9574f968dfec41b82185661c52a01767", "score": "0.52732253", "text": "clearDisplayedReuslts(elm){\n // removing any innerhtml from the element\n elm.innerHTML='';\n }", "title": "" }, { "docid": "815497fb9edcaadf767a86d30d501d5b", "score": "0.5264119", "text": "injectHTML () {\n if (query('form input', this).length === 0) {\n this.insertAdjacentHTML('beforeend', `\n <form>\n <input type=\"search\">\n <button type=\"submit\">Search</button>\n </form>\n `);\n }\n\n if (query('.od-search-results', this).length === 0) {\n this.insertAdjacentHTML('beforeend', `\n <ul class=\"od-search-results\"></ul>\n `);\n }\n\n // now that we have a DOM we can query it and save references to those nodes\n this.formEl = query('form', this)[0];\n this.inputEl = query('input', this)[0];\n this.resultsContainerEl = query('.od-search-results', this)[0];\n }", "title": "" }, { "docid": "58c4ad3edfd740cba5892cbf5a1c691f", "score": "0.5263885", "text": "function updateDOM() {\n // Check localStorage once\n if (!updatedOnLoad) {\n getSavedColumns();\n }\n // Backlog Column\n backlogListEl.textContent = '';\n backlogListArray.forEach((backlogItem, index) => {\n createItemEl(backlogListEl, 0, backlogItem, index);\n });\n backlogListArray = filterArray(backlogListArray);\n // Progress Column\n progressListEl.textContent = '';\n progressListArray.forEach((progressItem, index) => {\n createItemEl(progressListEl, 1, progressItem, index);\n });\n progressListArray = filterArray(progressListArray);\n // Complete Column\n completeListEl.textContent = '';\n completeListArray.forEach((completeItem, index) => {\n createItemEl(completeListEl, 2, completeItem, index);\n });\n completeListArray = filterArray(completeListArray);\n // Dont run more than once, Update Local Storage\n updatedOnLoad = true;\n updateSavedColumns();\n}", "title": "" }, { "docid": "2d87259bf59bfcab234c7ff6f94b6dfe", "score": "0.5263286", "text": "function prepareDom(){\r\n container.css({\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n container.addClass(WRAPPER);\r\n $('html').addClass(ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = $window.height();\r\n\r\n container.removeClass(DESTROYED); //in case it was destroyed before initilizing it again\r\n\r\n addInternalSelectors();\r\n\r\n //styling the sections / slides / menu\r\n $(SECTION_SEL).each(function(index){\r\n var section = $(this);\r\n var slides = section.find(SLIDE_SEL);\r\n var numSlides = slides.length;\r\n\r\n styleSection(section, index);\r\n styleMenu(section, index);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n });\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).appendTo($body);\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n enableVidemoAPI();\r\n\r\n if(options.scrollOverflow){\r\n if(document.readyState === 'complete'){\r\n createSlimScrollingHandler();\r\n }\r\n //after DOM and images are loaded\r\n $window.on('load', createSlimScrollingHandler);\r\n }else{\r\n afterRenderActions();\r\n }\r\n }", "title": "" } ]
bab99de5e55733e5d18a2c635b2b52c9
Get props from parent component using getDerivedStateFromProps life cycle hook, to check if the prop has changed
[ { "docid": "f9914e52042d8bbc42e1d6896f175916", "score": "0.6015013", "text": "static getDerivedStateFromProps(nextProps, prevState){\r\n //To checked if the props really be changed\r\n if(nextProps.total !== prevState.total){ \r\n //remember to use Number here to set string to int, otherwise the array cannot be created\r\n //To create an array whose length is the value we add, and add number\r\n var temp=Array.from(Array(Number(nextProps.total)).keys())\r\n return {total:nextProps.total, myList: temp,checked:0}\r\n }else return null\r\n }", "title": "" } ]
[ { "docid": "9aae904fdaf8f25cbaa14243d9df5f1d", "score": "0.7139171", "text": "static getDerivedStateFromProps(props, state) {\n // it should called when the props update or else returns null\n if (props.counter !== state.stateCounter) {\n console.log(\"should call if condition is true\", props, state);\n return { stateCounter: props.counter };\n }\n return null;\n }", "title": "" }, { "docid": "2ec50be9c8fdb4ea097396ce3d8f0345", "score": "0.67245126", "text": "static getDerivedStateFromProps(props, state){\n console.log(\"Parent getDerivedStateFromProps\", props, state)\n return null\n }", "title": "" }, { "docid": "bb4170e83859e640b9aea3d3968c2b34", "score": "0.6684292", "text": "shouldComponentUpdate(newProps, newState) {\n return !(JSON.stringify(this.props) == JSON.stringify(newProps) && this.state == newState)\n }", "title": "" }, { "docid": "486ce12dc3af736e14919e902847267a", "score": "0.66333926", "text": "static getDerivedStateFromProps(props, state) {\r\n console.log('[Persons.js] getDerivedStateFromProps');\r\n // update state of the component based on the info from props\r\n return state;\r\n }", "title": "" }, { "docid": "249e583a043c71bea7e76c1792c60a4e", "score": "0.6586101", "text": "static getDerivedStateFromProps(props, state) {\n console.log(\"AFTER componentDidMount\", state)\n // return updated state on the bases of new props coming\n if (state.name === \"suruchi\") {\n return {\n name: \"sonali\",\n age: \"21\"\n };\n } else {\n console.log(\"UPDATING getDerivedStateFromProps\")\n return {\n name: \"alice\",\n age: \"27\"\n };\n }\n }", "title": "" }, { "docid": "c8698c774809ab10f5c42d3d085e6a47", "score": "0.6531736", "text": "static getDerivedStateFromProps(props, state) {\n // Return if nothing changed\n if (props.value === state.currentValue) {\n return null;\n }\n\n // Don't update the value if we're dragging\n if (state.isMouseDown) {\n return null;\n }\n\n return {\n currentValue: props.value,\n };\n }", "title": "" }, { "docid": "29880856be0cf48976f3c09a7e1635e7", "score": "0.6529391", "text": "static getDerivedStateFromProps() {\n console.log('Inside getDerivedStateFromProps');\n return null;\n }", "title": "" }, { "docid": "5f018d98f651c04dd5b9b4995df97090", "score": "0.6468619", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n if (\n nextProps.startIsoDt !== prevState.startIsoDt ||\n nextProps.finishIsoDt !== prevState.finishIsoDt ||\n nextProps.maxResults !== prevState.maxResults ||\n nextProps.taskName !== prevState.taskName\n ) {\n //console.log(\"getDerivedStateFromProps CHANGED\");\n return {\n startIsoDt: nextProps.startIsoDt,\n finishIsoDt: nextProps.finishIsoDt,\n maxResults: nextProps.maxResults,\n taskName: nextProps.taskName\n };\n }\n return null;\n }", "title": "" }, { "docid": "96b141a41d86a6fa177b2d6126e9059e", "score": "0.6458727", "text": "static getDerivedStateFromProps(props, state) {\n if (state.reelData !== props.data) {\n return { reelData: props.data };\n }\n\n // Do not change the state\n return null;\n }", "title": "" }, { "docid": "4be3e952966f22f2b1cb29d23699f5ec", "score": "0.64288855", "text": "static getDerivedStateFromProps(props, state) {\n // If the current state or parent state changes then this function will be called\n // allows to get props from parent everytime the props are changed in parent\n // can also get state from this particular component\n // It is a singleton so static\n //1.best place to validate state and props\n\n //2. best place to make ajax calls to rest api\n\n console.log(\"In getDerivedStateFromProps: \", props.myNumber);\n console.log(\"In getDerivedStateFromProps: \", state.name);\n\n //3. we can also add new state here => augementing state\n return { counter: 10 };\n }", "title": "" }, { "docid": "677febd337b0c3e7e84e3659689fa78b", "score": "0.63924915", "text": "shouldComponentUpdate(props, state) {\n return state.infoDialogVisible !== this.state.infoDialogVisible;\n }", "title": "" }, { "docid": "4a962a8ae27a4b595a1dee9ee6b4d07d", "score": "0.6391864", "text": "static getDerivedStateFromProps(props,state){\n console.log('LifecycleA getDerivedStateFromProps')\n return null\n }", "title": "" }, { "docid": "0fdd3efddf97aec4f0ab465de4baa51c", "score": "0.63829684", "text": "static getDerivedStateFromProps(props, state) {\n console.log('LifecycleA getDerivedStateFromProps');\n return null\n }", "title": "" }, { "docid": "0b7d4a62d3bdf55df08fa58ac534085a", "score": "0.636418", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.value !== prevState.value || nextProps.readOnly !== prevState.readOnly) {\n return {value: nextProps.value, readOnly: nextProps.readOnly};\n } else return null;\n }", "title": "" }, { "docid": "403e4a16d681e7aeabb7753a98a81a8b", "score": "0.63515323", "text": "shouldComponentUpdate(props, state, context) {\n\t\tconst r = this.shouldUpdate\n\t\t\t? this.shouldUpdate(props, state, context)\n\t\t\t: super.shouldComponentUpdate\n\t\t\t\t? super.shouldComponentUpdate.call(this, props, state, context)\n\t\t\t\t: true;\n\n\t\treturn r;\n\t}", "title": "" }, { "docid": "fa0d66c5463a856bf6eb1d44c39866a0", "score": "0.6345942", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n const srcDiffers = nextProps.src !== prevState.src;\n const nameDiffers = nextProps.name !== prevState.nam;\n const themeDiffers = nextProps.theme !== prevState.theme;\n\n if (srcDiffers || nameDiffers || themeDiffers) {\n // if we pass in new props, we re-validate\n const newPartialState = {\n src: nextProps.src,\n name: nextProps.name,\n theme: nextProps.theme,\n validationMessage: nextProps.validationMessage,\n labeledStyles: themeDiffers\n ? createControlLabeledStyles(nextProps.theme)\n : prevState.labeledStyles,\n };\n return ReactJsonView.validateState(newPartialState);\n }\n return null;\n }", "title": "" }, { "docid": "d939d114f5dc8913b1b85da19573ce71", "score": "0.6284113", "text": "static getDerivedStateFromProps(props, state) {\n if (props.pizza.id !== state.pizza.id) {\n return {\n pizza: {...props.pizza},\n };\n }\n }", "title": "" }, { "docid": "017b364f646559bdb26e08aeda3aa9c5", "score": "0.62762576", "text": "static getDerivedStateFromProps (nextProps, prevState) {\n console.log('[App.js] inside getDerivedStateFromProps', nextProps, prevState);\n return prevState;\n }", "title": "" }, { "docid": "3d08ec75296497f3af3760e43f555a6b", "score": "0.62738293", "text": "static getDerivedStateFromProps(props, state) {\n if (props.show !== state.show) {\n return {show: props.show}\n }\n return null\n }", "title": "" }, { "docid": "0ed2e52825027c0b4afa780ae19f7577", "score": "0.6264671", "text": "static getDerivedStateFromProps(nextProps, prevState){\n\t if (nextProps.data !== prevState.data) {\n\t return { data: nextProps.data }\n\t }\n\t return null\n\t}", "title": "" }, { "docid": "f7283476bb3a075660a52d9bb27815d3", "score": "0.62547654", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n if(nextProps && nextProps.project && nextProps.project._id != prevState.projectId){\n return {\n projectId: nextProps.project._id,\n editMode: false,\n accessMode: false\n };\n }\n else {\n // no change to the current project\n return null;\n }\n }", "title": "" }, { "docid": "80839f8d86ea69747a8b35dfe4256f0a", "score": "0.6244447", "text": "propagateToParent(changedProps) {\n this.setState(changedProps);\n }", "title": "" }, { "docid": "9afa8b8df49c55e2755a68beb56c9a92", "score": "0.6237802", "text": "static getDerivedStateFromProps(props, oldState) {\n const newState = { match: props.match }\n if (oldState.match !== newState.match) newState.error = null\n return newState\n }", "title": "" }, { "docid": "39b8502370419dde37b77972a870601d", "score": "0.62320435", "text": "static getDerivedStateFromProps(props, state) {\n console.log(\"getDerivedStateFromProps\");\n return null;\n }", "title": "" }, { "docid": "c8a4875c8523b3ccaed29088c69bc6c8", "score": "0.62228334", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n console.log('[UPDATE User.js] getDerivedStateFromProps()', nextProps, prevState);\n return prevState; // You must return the new state, in this case is the same as the last one\n }", "title": "" }, { "docid": "2e6a34e8816183dfdd70916a4c87b28c", "score": "0.6181661", "text": "static getDerivedStateFromProps(props, state) {\n console.log('getDerivedStateFromProps');\n return null;\n }", "title": "" }, { "docid": "e46c419be0a6067e0534f8b325058860", "score": "0.6179975", "text": "static getDerivedStateFromProps(props, state) {\n if (props.value !== state.value) {\n return {\n points: props.country\n }\n }\n }", "title": "" }, { "docid": "dbdc5eb7f34a07d3bca9ca9b4d8dbf79", "score": "0.61795884", "text": "static getDerivedStateFromProps(props, state) {\n //\n console.log(props, state);\n console.log(\"LifeCycleA getDerivedStateFromProps\");\n\n return null;\n }", "title": "" }, { "docid": "8282740e29225debadbac8e3c1f7e78c", "score": "0.6163315", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n const lectureNameUpdate = !prevState.lectureNameUpdate ? nextProps.lectureName : prevState.lectureNameUpdate;\n\n if (nextProps.lectureId !== '0') {\n const currentLecture = prevState.updatedLecture;\n const propsLecture = nextProps.subject.lectures[nextProps.lectureId];\n\n const result = {\n updatedLecture: {\n ...currentLecture,\n videos: { ...propsLecture.videos },\n exercises: { ...propsLecture.exercises },\n lecture_materials: { ...propsLecture.lecture_materials },\n name: lectureNameUpdate,\n // Properly update the cloned Lecture with the correct lecture is_public value\n is_public: propsLecture.is_public !== currentLecture.is_public ? currentLecture.is_public : propsLecture.is_public,\n },\n };\n\n if (Object.keys(propsLecture.exercises).length !== Object.keys(currentLecture.exercises).length) {\n return result;\n }\n\n // Properly update the cloned Lecture with the correct exercise files is_public values\n for (let index in currentLecture.exercises) {\n if (propsLecture.exercises[index].is_public !== currentLecture.exercises[index].is_public) {\n result.updatedLecture.exercises[index].is_public = currentLecture.exercises[index].is_public;\n }\n }\n\n return result;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9dd106a2bfb3fc2be7cbddf1f2eb2111", "score": "0.6163157", "text": "shouldComponentUpdate(newProps) {\n return this.props.activeUser !== newProps.activeUser;\n }", "title": "" }, { "docid": "6d6f5cd109ceabb959c10223103d2bac", "score": "0.6162337", "text": "static getDerivedStateFromProps(props, state) {\n if (props.currentGuesserId !== state.currentGuesserId) {\n return {\n currentGuesserId: props.currentGuesserId,\n };\n }\n // Return null if the state hasn't changed\n return null;\n }", "title": "" }, { "docid": "1c7261a78ca8f982f72e4708fac3bac0", "score": "0.61306316", "text": "shouldComponentUpdate(newProps, newState) {\n console.log(\"this is shouldComponentUpdate \") \n console.log(newProps, newProps.myNumber1 <= 3)\n return newProps.myNumber1 <= 3;\n }", "title": "" }, { "docid": "2205cdcb2e1d94e66400b664c40d31c3", "score": "0.6116613", "text": "static getDerivedStateFromProps(props) {\n if (props.errorMessage.updateError) {\n const modifyError = props.errorMessage.updateError;\n props.actions.clearMessages();\n return {\n modifyOrder: 'Modify',\n modifyError\n };\n } else if (props.successMessage.updateSuccess || props.successMessage.confirmSuccess) {\n const update = props.successMessage.updateSuccess ? 'Order updated successfuly' : 'Order delivery confirmed';\n toast(update, {\n className: 'toast'\n });\n props.actions.clearMessages();\n return {\n open: false,\n confirmOrderModal: false,\n modifyOrder: 'Modify',\n confirmButton: 'Confirm'\n };\n }\n return null;\n }", "title": "" }, { "docid": "a7a2e75ddcfa0edb22b8e698c399f9f8", "score": "0.61162764", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n let questionInfo;\n nextProps.questionDetails.map(question => {\n if (question.name === nextProps.qname) {\n questionInfo = question;\n }\n });\n if (nextProps.qname !== prevState.curQuestion) {\n nextProps.setCurQuestion(questionInfo);\n return {\n ...prevState,\n curQuestion: nextProps.qname,\n curQuestionInfo: questionInfo\n };\n } else return prevState;\n }", "title": "" }, { "docid": "770796d681b04780230451410e41671b", "score": "0.61120814", "text": "static getDerivedStateFromProps(props, state){\n console.log('[Persons.js] getDerivedStateFromProps()');\n return state;\n }", "title": "" }, { "docid": "9ddd4cc415b69a969393becd9774e160", "score": "0.610888", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n // return {\n // test: 'Test is updating state'\n // };\n return null;\n }", "title": "" }, { "docid": "f6045c7065866928d4327f021fc65315", "score": "0.61082715", "text": "static getDerivedStateFromProps(props, state) {\n if (props.currentGuesserId !== state.currentGuesserId || props.players !== state.players\n || props.isGuessCorrect !== state.isGuessCorrect || props.currentWord !== state.currentWord\n || props.currentGuess !== state.currentGuess) {\n return {\n currentGuesserId: props.currentGuesserId,\n players: props.players,\n isGuessCorrect: props.isGuessCorrect,\n currentWord: props.currentWord,\n currentGuess: props.currentGuess\n };\n }\n // Return null if the state hasn't changed\n return null;\n }", "title": "" }, { "docid": "1c4bf446c09069128ba6479c6b4bb8b9", "score": "0.60894406", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.chartData !== prevState.chartData) {\n return {\n chartData: nextProps.chartData\n };\n }\n // Return null to indicate no change to state.\n return null;\n }", "title": "" }, { "docid": "2e26e46b5b7f6bf537ae5dd35b945901", "score": "0.6069222", "text": "shouldUpdateState(opts: any) {\n // console.log(\n // 'shouldUpdateState',\n // opts.changeFlags.propsOrDataChanged,\n // opts.changeFlags.stateChanged\n // );\n return super.shouldUpdateState(opts) || opts.changeFlags.stateChanged;\n }", "title": "" }, { "docid": "9c11a3fa0fd0e12aed3da880a8a1d67e", "score": "0.60625905", "text": "static getDerivedStateFromProps(props, state){\n console.log('[App.js] getDeviredStateFromProps');\n console.log(props);\n console.log(state);\n return state;\n }", "title": "" }, { "docid": "71f3f26bc13442296dd62eb9d8a92f63", "score": "0.60623026", "text": "componentDidUpdate(prevProps, prevState, snapshot){\n console.log(\"Parent componentDidUpdate\", prevProps, prevState, snapshot)\n }", "title": "" }, { "docid": "3a2cfb07e509e6b6f4042e94354b9967", "score": "0.6053149", "text": "static getDerivedStateFromProps(props, state) {\n if (props.open === true && state.lastOpenedStatus === false) {\n return {\n min: props.min,\n max: props.max,\n lastOpenedStatus: true,\n };\n }\n\n return { lastOpenedStatus: props.open };\n }", "title": "" }, { "docid": "e63989b40085770c94af43726cab1ea2", "score": "0.60452765", "text": "componentDidUpdate(prevProps) {\n if (prevProps == this.props) {\n // No change from above (currently nothing else is needed)\n return;\n } else {\n this.updateComp();\n }\n }", "title": "" }, { "docid": "8c84fc2d72874a6bf73f62c5ee06ee63", "score": "0.6041078", "text": "static getDerivedStateFromProps(props, state){\n console.log(\"getDerivedStateFromProps\")\n console.log(props, state)\n return {}\n }", "title": "" }, { "docid": "1d49a312837b27207b19d1dea444f779", "score": "0.60376376", "text": "componentDidUpdate(prevProps, prevState) {\n if (this.props.started && this.checkProperties(prevProps, this.props)) {\n\n this.updateCourses();\n\n }\n }", "title": "" }, { "docid": "7d4edf2a90fe4bebcfeeaa8565f6c4a7", "score": "0.60356486", "text": "static getDerivedStateFromProps(props, state) {\n if (props.visible !== state.visible) {\n return {\n selected: props.selected,\n visible: props.visible,\n selectedLabel: undefined,\n selectedValue: undefined,\n };\n }\n // Return null to indicate no change to state.\n return null;\n }", "title": "" }, { "docid": "663b8d21f8fc884fd4ce182dc04a03ba", "score": "0.6033728", "text": "static getDerivedStateFromProps(props, state) { \n\n // Return the new key/value pairs in state.\n return {\n hasWinner: App._doesWinnerExist(state) // Calls static method because getDerivedStateFromProps is static,\n // so I can't do this._doesWinnerExist.\n // (getDerivedStateFromProps belongs to the class, not to an instance.)\n };\n }", "title": "" }, { "docid": "90878b24d7cd89ab7835b62eb633a36e", "score": "0.60287577", "text": "static getDerivedStateFromProps(props, state){\n console.log('2. Life Cycle B - getDerivedStateFromProps');\n return null;\n }", "title": "" }, { "docid": "9d88ffe7ac250076447be84fd290c331", "score": "0.6024545", "text": "static getDerivedStateFromProps(props, state) {\n const { data } = props;\n const newState = {};\n\n if (data.agreementStatusValues.length !== state.agreementStatusValues.length) {\n newState.agreementStatusValues = data.agreementStatusValues;\n }\n\n if (data.renewalPriorityValues.length + 1 !== state.renewalPriorityValues.length) {\n newState.renewalPriorityValues = [{ value: null, label: '' }, ...data.renewalPriorityValues];\n }\n\n if (data.isPerpetualValues.length + 1 !== state.isPerpetualValues.length) {\n newState.isPerpetualValues = [{ value: null, label: '' }, ...data.isPerpetualValues];\n }\n\n if (Object.keys(newState).length) return newState;\n\n return null;\n }", "title": "" }, { "docid": "cc38657aca7009719fcbeda34c32cb07", "score": "0.60221064", "text": "componentDidUpdate(prevProps, prevState) {\n console.log('preve Proops', prevProps)\n console.log('prev state', prevState)\n }", "title": "" }, { "docid": "5ff6148378e5998176e9fd29b1fa9edf", "score": "0.60180634", "text": "static getDerivedStateFromProps(props,state){\n if(props.qty !== state.qty){\n return {qty : props.qty}\n }\n return null;\n }", "title": "" }, { "docid": "9ff5a2941bcbf994696382cd612a0d9f", "score": "0.60172653", "text": "shouldComponentUpdate(nextProps, nextState) {\n return (this.props.editable != nextProps.editable ||\n this.props.data != nextProps.data);\n }", "title": "" }, { "docid": "0cae0ced8f252e40ba9aa908dd5af45f", "score": "0.60163796", "text": "static getDerivedStateFromProps(props, state) {\n console.log('[App.js] getDerivedStateFromProps', props);\n return state;\n }", "title": "" }, { "docid": "ad268e5638b4c5af341ca16e1b0a2392", "score": "0.60155255", "text": "static getDerivedStateFromProps(props, state){\n console.log('[App.js] getDerivedStateFromProps()', props);\n return state;\n }", "title": "" }, { "docid": "9c460d9b1e8789036aa8bb59e7ccb1c7", "score": "0.6007758", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n if( prevState.name === '')\n return nextProps;\n return null;\n }", "title": "" }, { "docid": "dd72dd3342ac7bb3ad4abdd9ecae0979", "score": "0.6004603", "text": "componentDidUpdate(prevProps, prevState) {\n console.log('prevProps', prevProps)\n }", "title": "" }, { "docid": "ce8cabc097486fa1b3ce718a6874f55f", "score": "0.600138", "text": "static getDerivedStateFromProps(props, state) {\n if (!props.dataEdit._id) {\n return null;\n }\n if (props.dataEdit._id !== state.id) {\n return {\n id: props.dataEdit._id,\n time: moment(props.dataEdit.time).toDate(),\n coorFormNum:\n (props.dataEdit.coordinateRoute &&\n props.dataEdit.coordinateRoute.length) ||\n 0,\n statusCovid: props.dataEdit.statusCovid,\n name: props.dataEdit.name,\n route: props.dataEdit.route,\n address: props.dataEdit.address,\n position: props.dataEdit.position,\n coordinateRoute: props.dataEdit.coordinateRoute,\n };\n }\n }", "title": "" }, { "docid": "c8e06045a439b2b2c4509db17acb182b", "score": "0.59973514", "text": "static getDerivedStateFromProps(props,state){\n console.log('App.js getDerivedStateFromProps method called',props);\n return state; // After this method in component life cycle the render method executes.\n }", "title": "" }, { "docid": "b197dc30109b60637ce4de4353990582", "score": "0.5994295", "text": "shouldComponentUpdate(newProps) {\n if (newProps.filter && newProps.filter.shouldComponentUpdate) {\n if (newProps.filter.shouldComponentUpdate(newProps, this.props)) return true\n }\n return !_.isEqual(this.valuesFromQuery(this.props), this.valuesFromQuery(newProps))\n }", "title": "" }, { "docid": "670626c32b05a8e23e10d0dc0604716d", "score": "0.59923583", "text": "static getDerivedStateFromProps(nextProps, prevState){\n const newOutput = nextProps.cell.output;\n const datasets = nextProps.datasets;\n if(prevState.isFetching && prevState.activeTab === newOutput.type){\n if(prevState.activeTab === CONTENT_CHART || prevState.activeTab === CONTENT_DATASET){\n if (prevState.resourceName === newOutput.dataset.name || prevState.resourceName === newOutput.name\n || (prevState.activeTab === CONTENT_DATASET && prevState.resourceName.toLowerCase() === datasets[newOutput.dataset.id].name.toLowerCase())){ // forward compatibility\n return {\n isFetching: false\n }\n }\n } else if(prevState.activeTab === CONTENT_TEXT ||\n prevState.activeTab === CONTENT_MULTIPLE ||\n prevState.activeTab === CONTENT_HIDE ||\n prevState.activeTab === CONTENT_TIMESTAMPS){\n return {\n isFetching: false\n }\n }\n }\n return {}\n }", "title": "" }, { "docid": "837e0c5313e3c9edcbc10465b1f7e3f1", "score": "0.5991836", "text": "shouldComponentUpdate(newProps, newState) {\n if (this.state.issues.length === newProps.state.length){\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "94b70115fa401ba633775abca363491f", "score": "0.5990539", "text": "function isChildWithProps(child) {\n return !!child && typeof child === 'object' && 'props' in child && child.props != null;\n}", "title": "" }, { "docid": "94b70115fa401ba633775abca363491f", "score": "0.5990539", "text": "function isChildWithProps(child) {\n return !!child && typeof child === 'object' && 'props' in child && child.props != null;\n}", "title": "" }, { "docid": "13ce79f0483aabe5640c1e6128db30fa", "score": "0.598672", "text": "static getDerivedStateFromProps(props , state)\n {\n console.log('[app.js] run in getDerivedStateFromProps');\n return null;\n }", "title": "" }, { "docid": "09125ccfc658d6bb51dfaaf8235cd4c5", "score": "0.59794974", "text": "shouldComponentUpdate(nextProps){\n //console.log(nextProps.completed)\n //console.log(this.props.completed)\n return nextProps.completed ===!this.props.completed\n }", "title": "" }, { "docid": "1f1a44cfd286649ae6ef3b352824128f", "score": "0.59784234", "text": "static getDerivedStateFromProps(props, state) {\n if (props.success !== state.success) {\n return {\n success: props.success\n };\n }\n if (props.error !== state.error) {\n return {\n error: props.error\n };\n }\n if (props.warning !== state.warning) {\n return {\n warning: props.warning\n }\n }\n return null\n }", "title": "" }, { "docid": "0dba82ba6d5fed3de0a6895c9828ddff", "score": "0.59728265", "text": "shouldComponentUpdate(prevProps) {\n //If upgrade is not updated or upgrade failed, return false\n if (this.props.upgrade === prevProps.upgrade || !prevProps.upgrade.successful) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "750e719ef8d13cdf00e1a14772dc2fc0", "score": "0.5967063", "text": "static getDerivedStateFromProps(nextProps, previousState){\n\n return {\n }\n }", "title": "" }, { "docid": "03581c20e0fcaf8949e7fabb87c321e0", "score": "0.59641707", "text": "static getDerivedStateFromProps(nextProps) {\n return {\n weather: nextProps.weather,\n isLoading: nextProps.isLoading,\n error: nextProps.error\n };\n }", "title": "" }, { "docid": "1ca6fe05a59b49323bc401a043c40dc1", "score": "0.5962753", "text": "shouldComponentUpdate(nextProps, nextState) {\n console.log(\"Child. 2. shouldComponentUpdate\");\n return true;\n }", "title": "" }, { "docid": "ee4c8b17ba1ba48a1a3e9f070a6c1ec7", "score": "0.5960108", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n return null;\n }", "title": "" }, { "docid": "c9f8f1ec9968c2da09134ac4133e5304", "score": "0.5955916", "text": "shouldComponentUpdate(nextProps, nextState) {\n const { props, state } = this;\n\n // respect the case when the user defines a shouldComponentUpdate\n if (super.shouldComponentUpdate) {\n return super.shouldComponentUpdate(nextProps, nextState);\n }\n\n // return true if it is a reactive render or state changes\n if (state !== nextState) {\n return true;\n }\n\n // the component should update if any of its props shallowly changed value\n const keys = Object.keys(props);\n const nextKeys = Object.keys(nextProps);\n return (\n nextKeys.length !== keys.length ||\n nextKeys.some((key) => props[key] !== nextProps[key])\n );\n }", "title": "" }, { "docid": "5d7ce0c7789b6b62d746eee2e18ed685", "score": "0.5952081", "text": "shouldComponentUpdate() {\n return this.props.allowChange !== undefined ? this.props.allowChange : true;\n }", "title": "" }, { "docid": "f77e902202a496f54dbe838ab7e7dab8", "score": "0.59516954", "text": "static getDerivedStateFromProps(props, state) {\n const { auth } = props;\n\n if (auth.uid) {\n return { isLogin: true };\n } else {\n return { isLogin: false };\n }\n }", "title": "" }, { "docid": "5ac8b0688f7dd68a74ebac0bea39e3e2", "score": "0.5938623", "text": "shouldComponentUpdate(nextProps, nextState) {\n return this.state.lang !== nextState.lang || JSON.stringify(this.props) !== JSON.stringify(nextProps);\n }", "title": "" }, { "docid": "5989decc74f355015cea7c7be44f7c5e", "score": "0.59327114", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n if (prevState.prevPlayerName !== nextProps.playerName) {\n return {\n focusedPlayer: nextProps.playerName,\n prevPlayerName: nextProps.playerName\n };\n }\n\n return null;\n }", "title": "" }, { "docid": "024a759fab405241556465721589907b", "score": "0.5926674", "text": "function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n updater(nextProps[propName], prevProps[propName]);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d416aff553865d81a531135402094207", "score": "0.5925758", "text": "static getDerivedStateFromProps(props, state) {\n if (props.editedContacts.id !== state.id) {\n let {\n id,\n firstName,\n lastName,\n email,\n profession,\n gender\n } = props.editedContacts;\n\n return {\n id: id,\n firstName: firstName,\n lastName: lastName,\n email: email,\n profession: profession,\n gender: gender,\n errors: {}\n };\n }\n return null;\n }", "title": "" }, { "docid": "2d134ef58cb148f758938b88d3168800", "score": "0.59129786", "text": "static getDerivedStateFromProps(props,state)\n {\n console.log('getDerivedStateFromProps() is logged')\n console.log(state);\n state={ message:'life-cycle-hooks' }\n }", "title": "" }, { "docid": "743a4ded747f32ed365e5ae00227ae02", "score": "0.5910021", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n return _.pick(nextProps,\n \"apiOptions\",\n \"imageUploader\",\n \"developerMode\",\n \"problemNum\",\n \"previewDevice\"\n )\n }", "title": "" }, { "docid": "34fb911f14430b33da44eec2687334b5", "score": "0.59049827", "text": "static getDerivedStateFromProps(nextProps, prevState){\n if (nextProps.web3 !== prevState.web3 || nextProps.instance !== prevState.instance) {\n return {\n web3: nextProps.web3,\n instance: nextProps.instance,\n };\n }\n // Return null to indicate no change to state.\n return null;\n }", "title": "" }, { "docid": "3b29d49ea0f2068c7faca09bc9d53654", "score": "0.58929056", "text": "componentDidUpdate(prevProps, prevState) {\n\t\tconsole.log(prevProps);\n\t\tconsole.log(prevState); \n\t}", "title": "" }, { "docid": "6d40c1958c6ed5055ce924056431e34c", "score": "0.58925825", "text": "function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n updater(nextProps[propName], prevProps[propName]);\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6d40c1958c6ed5055ce924056431e34c", "score": "0.58925825", "text": "function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n updater(nextProps[propName], prevProps[propName]);\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6f5db17d052339d13025117efce1703b", "score": "0.58887404", "text": "static getDerivedStateFromProps(nextProps, prevState) {\n if( (nextProps.genders && nextProps.genders.value.length) &&\n (nextProps.maritalStatuses && nextProps.maritalStatuses.value.length) )\n return {\n genders: nextProps.genders.value,\n maritalStatuses: nextProps.maritalStatuses.value\n };\n return null;\n }", "title": "" }, { "docid": "d264b4581ef3bd27cb4b58ce4b3bd212", "score": "0.5885425", "text": "shouldComponentUpdate(nextProps, nextState) {\n console.log(\"CartSummary shouldComponentUpdate \")\n console.log(\"\\nnext props\", nextProps, \"\\ncurrent props\", this.props)\n console.log(\"\\nnext state\", nextState, \"\\ncurrent state\", this.state)\n // FIXME: compare prevProp with current props, prev state and current state, return true or false\n\n // cons: code is not scable across as many properties/state attribute\n const canRender = nextProps.amount !== this.props.amount ||\n nextProps.count !== this.props.count ||\n nextState.discount !== this.state.discount ||\n nextState.grandTotal !== this.state.grandTotal\n\n console.log(\"canRender\", canRender)\n return canRender;\n }", "title": "" }, { "docid": "8c688fb8d3dd5c86c41e0dcd45ddcfdf", "score": "0.5884272", "text": "componentDidUpdate(prevProps, prevState) {\n const { info, onEdit } = this.props;\n\n if (!prevState.editing && this.state.editing) {\n // when editing turns false -> true\n this.setState({\n name: info.name,\n phone: info.phone\n })\n }\n\n if (prevState.editing && !this.state.editing) {\n // when editing turns true -> false\n // call onEdit from App.js (was delivered by prop)\n onEdit(info.id, {\n name: this.state.name,\n phone: this.state.phone\n });\n }\n }", "title": "" }, { "docid": "e32a448075022775241ff41db8d247bf", "score": "0.5875375", "text": "shouldComponentUpdate(nextProps, nextState) {\n // If there is a prop change or a state change, rerender\n // If there is a state change, rerender\n // Prop changes trigger the fetch event\n // This is to handle the async, the actual determinanant\n // If no new props have appeared, there should be no state change\n if (this.state.listKey != nextState.listKey) {\n return true;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "9b53f32b934f87d9cc75a2662557983c", "score": "0.58677953", "text": "getChildProps() {\n const excludes = [\n 'onGetPropsComplete',\n 'onGetPropsError',\n 'onUpdateComplete',\n 'preloadedProps'\n ]\n return Object.assign(\n {},\n ...Object.entries(this.props)\n .filter((entry) => excludes.indexOf(entry[0]) < 0)\n .map(([k, v]) => ({[k]: v}))\n )\n }", "title": "" }, { "docid": "9762845779ac49b9ac8a00112493989e", "score": "0.5866096", "text": "shouldComponentUpdate(nextProps, nextState) {\n console.log(`Pre props = ${this.props.resource}`);\n console.log(`Next props = ${nextProps.resource}`);\n if (nextProps.resource !== this.props.resource) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ad0d466670eec22a40036c1096ab144c", "score": "0.5862878", "text": "shouldComponentUpdate(nextProps){\r\n // eslint-disable-next-line\r\n return nextProps.update == false && this.props.update == true;\r\n }", "title": "" }, { "docid": "1be0ae5f5dc408025ec37503cee82b42", "score": "0.58617985", "text": "componentDidUpdate(prevProps, prevState) {\n\n if (JSON.stringify(prevProps.selected) !== JSON.stringify(this.props.selected)) {\n this.setRightOfUser();\n }\n\n }", "title": "" }, { "docid": "6b455e4577193fc0d82eafab5a92e414", "score": "0.58606726", "text": "shouldComponentUpdate(nextProps, nextState) {\n if (!this.state.editing // if edit is complete\n && !nextState.editing // if edit is toggled\n && nextProps.info === this.props.info) { // if next props equal this props\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d53234d3eec55f6c6b5407eab2b507b0", "score": "0.585288", "text": "function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n updater(nextProps[propName], prevProps[propName]);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1f37b97af66af8de509346251a4e79b9", "score": "0.5848256", "text": "componentDidUpdate(prevProps, prevState) {\n if (prevProps.data !== this.props) {\n this.obtenerInformacion(this.props.enlace)\n }\n}", "title": "" }, { "docid": "bccf1411a7153d1952b23f3a7907815a", "score": "0.5843963", "text": "shouldComponentUpdate(nextProps, nextState) {\n if (this.props != nextProps) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "88bc33f1454ae70b0255cabbc6e67986", "score": "0.5834744", "text": "shouldComponentUpdate (nextProps, nextState) {\n return nextProps.edit !== this.props.edit;\n }", "title": "" }, { "docid": "29eb8f4debd8e9cfeaa95db56aa52545", "score": "0.58309716", "text": "static getDerivedStateFromProps(props, state) {\n // Getting the state from the auth prop of firebase from below\n const { auth } = props;\n\n if (auth.uid) {\n return { isAuthenticated: true };\n } else {\n return { isAuthenticated: false };\n }\n }", "title": "" }, { "docid": "1859cdd43dbac9cf62b981e6e8084c49", "score": "0.58276516", "text": "static getDerivedStateFromProps(nextProps, prevState){\n console.log('getDerivedStateFromProps: '+'nextProps: '+ nextProps.maxCount +' ' +'prevState: '+prevState.counter);\n if(prevState.counter > nextProps.maxCount){\n return{\n counter: nextProps.maxCount\n }\n }\n return null;\n }", "title": "" }, { "docid": "75dc871e46b99ba086aecf9ba494fd29", "score": "0.58165705", "text": "static getDerivedStateFromProps(nextProps,prevState){\n if(JSON.stringify(nextProps.auth.error) !==JSON.stringify(prevState.error)){\n return{\n error:nextProps.auth.error\n }\n }\n return null\n }", "title": "" } ]
88f9d26aed36c879cf097d9aaca37890
binding del controlador con el html, solo en el controlador
[ { "docid": "6b4eb3e603a9a1f5358e7d21869b535d", "score": "0.0", "text": "function init(){ // función que se llama así misma para indicar que sea lo primero que se ejecute\n //estadoEstudianteCtrl.estadoEstudiantes = administradorService.getEstadoEstudiante();\n // estadoEstudianteCtrl.cambiosEstadoEstudiantes = administradorService.getCambiosEstadoEstudiantes();\n administradorService.getSolicitudEstud()\n .success(function(data){\n estadoEstudianteCtrl.solicitudEstudiantes = data;\n\n });\n }", "title": "" } ]
[ { "docid": "8e2a7129b25392a834963a94520640b6", "score": "0.67522776", "text": "function html(){}", "title": "" }, { "docid": "a8aa3db7d7a802ecb6438911a4ab7629", "score": "0.64956164", "text": "setContenido(texto) {\n /* console.log(222222222222, texto) */\n this._contenido = texto;\n super.buildHtml(this.render(), \"main\", \"AvisoLegalController\");\n }", "title": "" }, { "docid": "077e0e8469d99cdd6e7b7bac65125013", "score": "0.6335265", "text": "render(html) {\r\n\r\n // we tag our templates with html\r\n // all components must have a single \r\n // element surrounding all other elements\r\n return html`\r\n <div>\r\n <section>\r\n <h1>Start page</h1>\r\n\r\n We connect our input elements to an \r\n instance-variable with the attribute 'bind'\r\n <input bind=\"inputText\" type=\"text\">\r\n\r\n The DOM gets updated everytime these variables value changes\r\n\r\n\r\n After creating new Person() objects in the class\r\n we can simply render these components the same way\r\n we add variables to strings with template literals\r\n\r\n \r\n\r\n </section>\r\n <section>\r\n\t\t\t <table id=\"game_table\">\r\n <thead>\r\n <tr>\t\r\n\r\n ${this.dropBtnS}\r\n ${this.newBoard}\r\n\r\n\r\n\r\n \r\n \r\n </tr>\t\r\n </thead>\r\n </table>\r\n\r\n </section>\r\n </div>\r\n `\r\n }", "title": "" }, { "docid": "b4d5ba8f26fd9a7086e249af3724db7e", "score": "0.6160364", "text": "constructor(){\r\n\t\t//$(\".ConteOpereciones\").append(template());\r\n\t}", "title": "" }, { "docid": "d0d9010ea726019a3e829e1db29266e6", "score": "0.6133373", "text": "setHTML(html) {\n this.html = html;\n document.body.innerHTML = this.html;\n }", "title": "" }, { "docid": "604dd6d4c4781f433a5fc63b1f07ab1f", "score": "0.6130935", "text": "render(){\n\n let self = this;\n self.setTemplate(\n 'views/sermon/sermonContent.html'\n ,function (data) { self.draw('pageContent');}\n\n );\n }", "title": "" }, { "docid": "e2145b768cf0f7dda820b591f1f5df91", "score": "0.6128693", "text": "render() {\n return html`\n <div>\n Soy otro elemento\n </div>\n `;\n }", "title": "" }, { "docid": "80773a6728f2d70e5adb89da13741e22", "score": "0.61282796", "text": "getHtml() {\n const defautHTML = `\n ${this.getCss()}\n <div class=\"${this.chooseClass()}\">\n <div>\n <div class=\"comment-info-class\">\n <p class=\"comment-id-class\"><i>ID: ${this.commentID}</i></p>\n <p class=\"author-class\">Escrito por: ${this.studentName} ${this.studentSecondName}</p> \n <p class=\"date-class\">Às: ${this.hour} do dia ${this.date}</p>\n </div>\n \n <p class=\"comment-class\">${this.comment}</p>\n <button id=\"delete-${this.id}\" type=\"button\" class=\"delete-comment\">DELETAR!</button>\n </div>\n `;\n if(this._type === \"comment-subject\") {\n return defautHTML + `\n <form id=\"subject-comment\">\n <div id=\"reply-${this.id}\">\n <textarea name=\"text-comment\" class=\"box-resposta\" id=\"reply-${this.id}-id\" cols=\"10\" rows=\"10\" placeholder=\"Responda ao comentário!\"></textarea> \n <button type=\"button\" name=\"submit\" id=\"send-reply-${this.id}\" class=\"send-comment-button\">RESPONDER!</button>\n </div>\n </form>\n </div>\n `\n } else {\n return defautHTML + \"</div>\"\n }\n\n }", "title": "" }, { "docid": "2f16b089a8413bb84ecd53828a2ec30e", "score": "0.61279243", "text": "set html(value) {\n defineProperty(this, '_html$', {configurable: true, value: value});\n }", "title": "" }, { "docid": "f306f3baa78a8a9e5a6d168b980ff2e4", "score": "0.60764754", "text": "render(){\n\n let self = this;\n self.setTemplate(\n 'views/event/eventContent.html'\n ,function (data) { self.draw('pageContent');}\n\n );\n }", "title": "" }, { "docid": "2d0fffe14a0877e262354f563665194e", "score": "0.6011975", "text": "function setContentOfPage() {\n //The object we will pass to markup that will be used to generate the HTML.\n var context = { \"listitems\": _data.items };\n \n //The SDK automatically parses any templates you associate with this view on the bc.templates object.\n var markupTemplate = bc.templates[\"first-page-tmpl\"];\n \n //The generated HTML for this template.\n var html = Mark.up( markupTemplate, context );\n \n //Set the HTML of the element.\n $( \"#first-page-content\" ).html( html );\n }", "title": "" }, { "docid": "4922ca3c9ebafc70296ada32654d4eff", "score": "0.6003791", "text": "template() {\n document.querySelector('#content').innerHTML += /*html*/ `\n <article id=\"createPartyPage\" class=\"page\">\n <section class=\"collectionOfItems\">\n <h2>Spilmester: opret gruppe</h2>\n \n <button class=\"btn\" name=\"settingsPage\" onclick=\"createParty(this.name);getThePartyId()\">Få et gruppe ID</button>\n </section>\n <section class=\"collectionOfItems\">\n <h2>Spillere: Tilslut jer gruppen</h2>\n <input class=\"inputfield\" id=\"joinPartyId\" type=\"text\" placeholder=\"Indtast gruppeID\">\n <br>\n <button class=\"btn\" type=\"button\" name=\"addPlayers\" onclick=\"joinParty(this.name)\">GOGOGO!</button>\n </section>\n </article>\n `;\n }", "title": "" }, { "docid": "a9f995a06dd859beac3300bdf012b5f1", "score": "0.59979093", "text": "html(newHtml){\n this.elements.forEach(element => {\n element.innerHTML = newHtml\n })\n return this\n }", "title": "" }, { "docid": "22b0aa032fe9bad9e912e7d5cb7f8ce9", "score": "0.59884036", "text": "_tmplChanged(newVal, oldVal) {\n let _this = this,\n html = '';\n if (newVal) {\n console.warn(this.id, 'Load remote html', newVal);\n this.importHref(newVal, e => {\n html = e.target.import.body.innerHTML;\n _this.log.logApi('inject html', _this.id);\n console.warn('inject px-view html', _this.id);\n _this.html(html);\n }, e => {\n // loading error\n console.error('Error loading page', e);\n });\n }\n }", "title": "" }, { "docid": "5961898be572ba8b7a8741e691f47098", "score": "0.59843475", "text": "render() {\n\n let self = this;\n self.setTemplate(\n 'views/contact/contactContent.html'\n , function (data) {\n document.getElementById('pageApp').innerHTML='';\n self.draw('pageContent');\n }\n );\n }", "title": "" }, { "docid": "ff3646e72d98f97dedf35e672f83f203", "score": "0.59696525", "text": "render(){\n\n let self = this;\n self.setTemplate(\n 'views/event/testimonies.html'\n ,function (data) { self.draw('pageApp');}\n\n );\n }", "title": "" }, { "docid": "e2a326a8650c5a8927031cf88ba93845", "score": "0.5959618", "text": "async _injectHTML(html) {\n\t\tawait super._injectHTML(html);\n\t\tthis.app = new FormApp({\n\t\t\ttarget: html.find(\"form\")[0],\n\t\t\tprops: {\n\t\t\t\tsheetData: this.getData(),\n\t\t\t},\n\t\t});\n\t}", "title": "" }, { "docid": "fc0326c68dd3d2cc45ceeab8d545bca6", "score": "0.59292567", "text": "body( html )\n {\n this.ui.body.empty().html(html);\n }", "title": "" }, { "docid": "6ae78296e100217e27b6ca565f72959d", "score": "0.5911659", "text": "render() {\n let that = this;\n let tmp = this.generateStaticView(this.threads, this.info,this.popular, this.user);\n tmp.then(tmp => {\n $id('main').innerHTML = tmp;\n that.bind();\n });\n }", "title": "" }, { "docid": "75f730bc1c0422aa856bd939f2624c68", "score": "0.58981746", "text": "function loadHtmlTemplate(element, url) {\n element.load(url, function () {\n console.log(\"Loading html \" + url);\n element.children().each(function() {\n\t\t\tko.applyBindings(model, this);\n\t\t});\n });\n}", "title": "" }, { "docid": "51cfbad08b30f28f5d40ca8a5e566476", "score": "0.58664507", "text": "function injectHtml(e) {\n\n e.preventDefault();\n\n const clickTarget = e.target.parentElement.id; \n\n switch (clickTarget) {\n case 'home':\n fetchTextNotes();\n break;\n case 'add-note':\n addFormInput();\n break;\n default:\n fetchTextNotes();\n break;\n }\n\n}", "title": "" }, { "docid": "553536edb6dac325a2641d7869b94da2", "score": "0.5853435", "text": "get html() {\n return this._html$ || (this.html = bind(\n // in a way or another, bind to the right node\n // backward compatible, first two could probably go already\n this.shadowRoot || this._shadowRoot || sr.get(this) || this\n ));\n }", "title": "" }, { "docid": "2aeeda81535bee3b45ca38e4f8a500f8", "score": "0.5847179", "text": "_initHtml() {\n jQuery('#notifyButtonHtml').on('click', (event) => {\n event.preventDefault();\n jQuery.notify(\n {\n title: '<strong>Bold Title</strong> ',\n message: 'Acorn is created by <a href=\"https://themeforest.net/user/coloredstrategies\" target=\"_blank\">ColoredStrategies</a>',\n },\n {type: 'primary', icon_type: 'image'},\n );\n });\n }", "title": "" }, { "docid": "8bb447c5d55b7a073630e4e444922a85", "score": "0.5838592", "text": "function AccountView(){\n\tvar html = AccountTemplate();\n\tvar content = getContainer();\n\tcontent.innerHTML = html;\n}", "title": "" }, { "docid": "be7616eeabf6bc83f7e51efe7f6a2d09", "score": "0.58344024", "text": "buildTemplate() {\n let html = `<section class=\"screen ${css.screen}\">`;\n html += `<div id=\"${this.config.id}\" class=\"${css.screen__buttons}\">`;\n html += this.config.options.map((option) => (\n `<div class=\"${css.screen__button}\" id=\"${option.id}\">${option.label}</div>`\n )).join('');\n html += '</div>';\n html += '</section>';\n document.getElementById('content').innerHTML += html;\n }", "title": "" }, { "docid": "4c5787974bbee32f90563873123dc6b0", "score": "0.58339596", "text": "render_html(path) {\n\t\tthis.win.loadURL(`file://${path}`);\n\t}", "title": "" }, { "docid": "b92463ca323af39c6d0a172f98b75619", "score": "0.5827513", "text": "html(identifier, content){\n\n this.get(identifier).innerHTML = content;\n\n }", "title": "" }, { "docid": "2cf8fac54a09ae743a132362baad5e8c", "score": "0.58232313", "text": "function renderHTML() {\n const root = document.getElementById(\"root\");\n const header = document.createElement(\"div\");\n\n header.setAttribute(\"class\", \"header\");\n root.appendChild(header);\n\n const tag = document.createElement(\"tag\");\n tag.setAttribute(\"class\", \"select-tag\");\n tag.textContent = \"Select Repositories: \";\n header.appendChild(tag);\n\n const select = createAndAppend(\"select\", tag);\n select.setAttribute(\"id\", \"select\");\n\n const container = createAndAppend(\"div\", root);\n container.setAttribute(\"id\", \"container\");\n\n const description = createAndAppend(\"div\", container);\n description.setAttribute(\"class\", \"descriptionContainer\");\n\n const contributors = createAndAppend(\"div\", container);\n contributors.setAttribute(\"id\", \"contributorsContainer\");\n\n const ul = createAndAppend(\"ul\", contributors);\n ul.setAttribute(\"id\", \"containerList\");\n const table = createAndAppend(\"table\", description);\n const tBody = createAndAppend(\"tBody\", table);\n\n}", "title": "" }, { "docid": "d918c26182f299ede7ee1ce72d2e08d7", "score": "0.5819389", "text": "function RegisterView(){\n\tvar html = document.getElementById('template8').innerHTML;\n\tvar content = getContainer();\n\tcontent.innerHTML = html;\n}", "title": "" }, { "docid": "8adca1460aa4ae240956bff7f7b9e3f0", "score": "0.5817232", "text": "function renderHtml() {\n var template = settings.datasource.role === 'index' ? 'index' : 'datasource';\n settings.extensions = { Before: null, After: null };\n self._renderTemplate(self.viewDirectory + template, settings, request, response, done);\n }", "title": "" }, { "docid": "1353550b1d0b6860dfd6976df07f04ad", "score": "0.58126307", "text": "initHtml() {\n\t\tthis.wrapper.innerHTML = '';\n\n\t\tthis.gameElements = {\n\t\t\tpVsAi: buttonFactory('control', 'Start a new game - Player VS AI', () => this.startGame('P_VS_AI')),\n\t\t\taiVsAi: buttonFactory('control', 'Start a new game - AI VS AI', () => this.startGame('AI_VS_AI')),\n\t\t\tboard: splitFactory('board'),\n\t\t\tscore: splitFactory('score'),\n\t\t\ticons: {\n\t\t\t\tquestionMark: () => buttonFactory('questionMark')\n\t\t\t},\n\t\t\tmessage: divFactory('message'),\n\t\t\trules: this.getRules()\n\t\t};\n\n\t\tthis.getPossibleMoves().forEach(move => {\n\t\t\tthis.gameElements.icons[move] = (onClick) => buttonFactory(move, '', onClick);\n\t\t});\n\n\t\tthis.wrapper.appendChild(this.gameElements.pVsAi);\n\t\tthis.wrapper.appendChild(this.gameElements.aiVsAi);\n\t\tthis.wrapper.appendChild(this.gameElements.rules);\n\t}", "title": "" }, { "docid": "d9002f70ba93eb034928b7683f94c450", "score": "0.5810409", "text": "function CarritoHTML(){\n\n\n // Limpiar el Html\n limpiarHTML();\n\n\n //Recorre el carrito \n articulosCarrito.forEach( curso =>{\n const {imagen, titulo, precio, cantidad,id} = curso;\n const row = document.createElement('tr');\n row.innerHTML = `\n <td><img src = \"${imagen}\" width = \"80\"></td>\n <td>${titulo}</td>\n <td>${precio}</td>\n <td>${cantidad}</td>\n <td> <a href='#' class=\"borrar-curso\" data-id=\"${id}\"> X </td> </a>\n `;\n // Agrega el HTML del carrito en el Tbody \n contenedorCarrito.appendChild(row);\n });\n\n\n // Agregar el carrito de compras al LocalStorage\n\n sicronizarStorage();\n}", "title": "" }, { "docid": "0d754d05328ed2c0f77814dbcb0649d8", "score": "0.5794312", "text": "render(){\n /**\n * `render` must return a lit-html `TemplateResult`.\n *\n * To create a `TemplateResult`, tag a JavaScript template literal\n * with the `html` helper function:\n */\n return html`\n <hr>\n <button @click=\"${this.mesSiguiente}\">▲</button>\n <button @click=\"${this.mesPrevio}\">▼</button>\n `;\n }", "title": "" }, { "docid": "18a769b862e78de647e31fd968d983ad", "score": "0.5788398", "text": "createHTML(){\n this.el.template = document.querySelector(\"template#table\").content;\n this.el.mainDiv = this.el.template.querySelector('.mainDiv').cloneNode(true);\n let {mainDiv} = this.el;\n mainDiv.setAttribute('id',this.id);\n mainDiv.style.display = 'none'; //zaraz po utworzeniu jest ukrywane\n this.el.divTableLg = mainDiv.querySelector('.divTable.lg');\n this.el.divTableXs = mainDiv.querySelector('.divTable.xs');\n \n\n this.el.table = mainDiv.querySelector('table');\n this.el.table.setAttribute('summary',this.nazwa);\n\n this.el.editButton = mainDiv.querySelector('.editButton');\n this.el.table.append(this.el.editButton);\n\n this.el.thead = mainDiv.querySelector('thead');\n\n this.el.trHeader = mainDiv.querySelector('tr.trHeader');\n\n this.el.tbody = mainDiv.querySelector('tbody');\n\n this.el.paginacja = mainDiv.querySelector('.pagination')\n\n this.el.paginacja.querySelector('.pag_next')\n .onclick = e => actualData.table.zmienStrone(actualData.data.page*1+1)\n\n this.el.paginacja.querySelector('.pag_prev')\n .onclick = e => actualData.table.zmienStrone(actualData.data.page*1-1)\n this.el.paginacja.querySelector('.pag_prev').disabled = true;\n\n this.el.paginacja.querySelector('.pag_per_page')\n .addEventListener('change', e => {\n const it = actualData.table;\n it.data.param.offset = 0;\n this.data.page = 1;\n this.el.strona.value = 1;\n it.data.param.limit = e.target.value;\n it.reload();\n })\n\n this.el.strona = this.el.paginacja.querySelector('.pag_page');\n this.el.strona.addEventListener('change', e => {\n actualData.table.zmienStrone(e.target.value);\n });\n\n this.el.divTableLg.addEventListener('mouseout', e => {\n getClossestTag(e.target,'tr').classList.remove('red');\n getClossestTag(e.target,'td').classList.remove('blue')\n });\n\n this.el.divTableLg.addEventListener('mouseover', e => {\n getClossestTag(e.target,'tr').classList.add('red');\n getClossestTag(e.target,'td').classList.add('blue')\n });\n\n this.el.divTableLg.onclick = e => {\n const id = getClossestClass(e.target, 'mainDiv').getAttribute('id');\n const kliknieta_tabelka = allElement[this.id].table;\n // console.log('id:', id,'wszystkie: ', allElement[id].table);\n kliknieta_tabelka.filtr.ustaw(e.target);// do filtrowania według kliknietego\n\n if (e.target.tagName === 'SPAN' && e.target.parentElement.tagName === 'TH' && e.offsetX > e.target.offsetWidth) { //sprawdza klikniete bylo na obiekcie czy na prawo od niego jesli na prawo to znaczy ze to byl pseudo element bo jego nie ma w strukturze DOM\n kliknieta_tabelka.sortuj(e.target) //do sortowania według kliknietego\n }\n }\n\n this.el.editButton.onclick = e =>{\n this.createEditTableHTML();\n $('#modal_edit_table').modal();\n }\n\n this.el.divTableXs.onclick = e =>{\n let stop = false;\n document.querySelectorAll('.menu.trans').forEach((el)=>{\n el.classList.remove('trans')\n el.addEventListener('transitionend', () => {\n el.remove();\n }); \n if (getClossestClass(el,'container') == getClossestClass(e.target,'container')) stop = true;\n })\n if (stop) return;\n let container = getClossestClass(e.target,'container');\n let menu = document.createElement('div');\n menu.classList.add('menu')\n let but1 = document.createElement('button');\n let but2 = document.createElement('button');\n let but3 = document.createElement('button');\n but1.innerText = 'Podgląd';\n but2.innerText = 'Edytuj';\n but3.innerText = 'Podziel';\n menu.append(but1);\n menu.append(but2);\n menu.append(but3);\n container.append(menu);\n window.getComputedStyle(menu).width;\n menu.classList.add('trans');\n }\n\n document.querySelector('#et_submit').onclick = e =>{\n this.columnsToShow = this.readEditTable();\n this.saveEditTable();\n this.reload();\n $('#modal_edit_table').modal('hide');\n }\n\n document.querySelector('#tableContainer').appendChild(this.el.mainDiv);\n }", "title": "" }, { "docid": "584ab8810f925a7966bb2fcab09cbdf9", "score": "0.578769", "text": "function carritoHTML() {\n\n // Limpiar HTML\n limpiarHTML();\n\n articuloscarrito.forEach( cursoAA => { // Itera sobre el array actualizado con los objetos cursoAA\n const {imagen, titulo, precio, cantidad,id} = cursoAA; // Destructuring\n const row = document.createElement('tr'); // crea una variable en la que agrega propiedades por cada obj del array\n row.innerHTML = `\n <td><img src=\"${imagen}\" width=\"100px\"></td>\n <td>${titulo}</td>\n <td>${precio}</td>\n <td>${cantidad}</td>\n <td><a href=# class=\"borrar-curso\" data-id=\"${id}\"> - </a></td>\n `;\n // Agrega el HTML del carrito en el tbody\n contenedorCarrito.appendChild(row); // Aquí se agrega al carrito a mostrarse\n })\n }", "title": "" }, { "docid": "d6edf9a1a9cd821b8d8acad678edf585", "score": "0.57855487", "text": "function renderear(datos, templateRendear, wrapperInsercion){\n\t\tvar itemsTemplate = _.template(templateRendear.html());\n\t\tvar activarRender = itemsTemplate({conexionTemplate : datos});\n\t\twrapperInsercion.html(activarRender);\n\t\t\n\t\t//funcionalidad de componentes de la seccion\n\t\t\n\n\t}", "title": "" }, { "docid": "165a62768b9cfed0fb2a9be12c5fefc5", "score": "0.5780065", "text": "function initHTML(context) {\r\n\r\n //Scroll\r\n //TODO: Need to test this\r\n $(\"[data-scroll=true]\", context).each(function () {\r\n $(window).scrollTop($(this).offset().top);\r\n });\r\n\r\n //Link click\r\n $(_config.autoEvents ? \"a:not([href=#],[href^=#],[href^=javascript],[href^=mailto],[data-ajax=false],[data-submit])\" : \"a:[data-ajax=true]\", context).each(function () {\r\n //Get link\r\n var link = $(this);\r\n var url = link.attr(\"href\");\r\n //Ensure isn't external link\r\n var base = window.location.protocol + \"//\" + window.location.hostname;\r\n if (url && url != \"\" && url.charAt(0) != \"/\" && base != url.slice(0, base.length)) {\r\n //Open all external links in new windows\r\n link.attr(\"target\", \"_blank\");\r\n return;\r\n }\r\n //Remove any existing click events\r\n link.unbind(\"click\");\r\n //Modify links to include hash\r\n if (_config.autoCorrectLinks && url != undefined && url[0] == \"/\") {\r\n url = \"#\" + url.substr(1);\r\n link.attr(\"href\", url);\r\n }\r\n //Don't attach event if link opens in new window\r\n if (link.attr(\"target\") == \"_blank\") return;\r\n //Click\r\n link.click(function (e) {\r\n //Prevent default\r\n e.preventDefault();\r\n //Prevent duplicate requests\r\n if (preventDoubleClick()) return false;\r\n //Modify link\r\n if (url[0] == \"#\") url = \"/\" + url.substr(1);\r\n //Update details\r\n //TODO: Remove this\r\n var details = link.attr(\"data-details\");\r\n if (details != undefined && $(\"#\" + details).length) url += (url.indexOf(\"?\") != -1 ? \"&\" : \"?\") + \"UpdateDetails=True\";\r\n //Get request\r\n sync.request(url, { sender: this });\r\n return false;\r\n });\r\n });\r\n\r\n //Form submit\r\n $(_config.autoEvents ? \"form:not([data-ajax=false])\" : \"form:[data-ajax=true]\", context).unbind(\"submit\").submit(function (e) {\r\n //Prevent default\r\n e.preventDefault();\r\n //Prevent duplicate requests\r\n if (preventDoubleClick()) return false;\r\n //Get form\r\n var form = $(this);\r\n //Return if no ajax\r\n if (form.attr(\"data-ajax\") == \"false\") return;\r\n //Ensure unique ids\r\n form.attr(\"id\", createRandomId());\r\n //Convert fields to array, exclude filtered items\r\n //Array is in format [{name: \"...\", value: \"..\"},{name: \"...\", value: \"...\"}]\r\n var postData = form.find(\":input\").not(_config.submitFilter).serializeArray();\r\n //Disable form\r\n toggleSender(form, false);\r\n //Post request\r\n sync.request(form.attr(\"action\"), {\r\n isPost: true,\r\n postData: postData,\r\n sender: this\r\n });\r\n return false;\r\n });\r\n\r\n //Submit button click\r\n $(_config.autoEvents ? \":submit:not([data-ajax=false])\" : \":submit[data-ajax=true]\", context).unbind(\"click\").click(function (e) {\r\n //Prevent default\r\n e.preventDefault();\r\n var form = $(this).parents(\"form:first\");\r\n //Return if no ajax\r\n if (form.attr(\"data-ajax\") == \"false\") return;\r\n //Submit form\r\n form.submit();\r\n return false;\r\n });\r\n\r\n //Request\r\n $(\"[data-get]\", context).click(function () {\r\n sync.request($(this).attr(\"data-get\"), { sender: this });\r\n });\r\n\r\n //Close\r\n $(\"[data-close=true]\", context).click(function () {\r\n $(this).closest(\"[data-update]\").remove();\r\n });\r\n\r\n //Submit on dropdown change\r\n $(\"select[data-submit=true]\", context).change(function () {\r\n $(this).parent(\"form:first\").submit();\r\n });\r\n\r\n //Submit on click\r\n $(\"[data-submit=true]:not(select)\", context).click(function () {\r\n $(this).parent(\"form:first\").submit();\r\n });\r\n\r\n //On click actions\r\n $(\"[data-hide]\").click(function () {\r\n $($(this).attr(\"data-hide\")).hide();\r\n });\r\n $(\"[data-show]\").click(function () {\r\n $($(this).attr(\"data-show\")).show();\r\n });\r\n $(\"[data-remove]\").click(function () {\r\n $($(this).attr(\"data-remove\")).remove();\r\n });\r\n $(\"[data-empty]\").click(function () {\r\n $($(this).attr(\"data-empty\")).hide();\r\n });\r\n\r\n //Autoset focus\r\n var el = $(\"[data-focus=true]\", context);\r\n if (el.length > 0) setTimeout(function () { el.first().focus(); }, 100);\r\n else setTimeout(function () { $(\":input:first:not([data-focus=false])\", context).focus(); }, 100);\r\n\r\n //Load dependent scripts\r\n $(context).find(\"[data-load]\").andSelf().filter(\"[data-load]\").each(function () {\r\n sync.load(this.getAttribute(\"data-load\"));\r\n });\r\n\r\n //Run callbacks\r\n $(context).find(\"[data-callback]\").andSelf().filter(\"[data-callback]\").each(function () {\r\n //Get the function object by string name\r\n //Account for namespaces if name has \".\"\r\n var el = $(this),\r\n parts = el.attr(\"data-callback\").split(\".\"),\r\n obj = window;\r\n for (var i = 0; i < parts.length; ++i) {\r\n obj = obj[parts[i]];\r\n }\r\n //Run method, use updated content for \"this\" value\r\n obj.call(el);\r\n });\r\n }", "title": "" }, { "docid": "89f8d79756b064d9a79b3f2eb03912ff", "score": "0.5762768", "text": "function setHtml(){\n\t\t\n\t\t//add html elements\n\t\tg_objWrapper.addClass(\"ug-theme-slider\");\n\t\t\n\t\t//set slider html\n\t\tif(g_objSlider)\n\t\t\tg_objSlider.setHtml();\n\t}", "title": "" }, { "docid": "2e368654e7ed52ef867fef6d4fa92aa5", "score": "0.57615495", "text": "function update_html() {\n\t\tvar func = \"html_from_ui_element(): \";\n\t\tif (this.attrs) {\n\t\t\tvar attr_names = Object.keys(this.attrs);\n\t\t\tfor (var i = 0; i < attr_names.length; ++i) {\n\t\t\t\tvar attr = this.attrs[attr_names[i]];\n\t\t\t\tif (attr.data) {\n\t\t\t\t\tfor (var j=0; j < attr.inds.length; ++j) {\n\t\t\t\t\t\tthis.html[attr.inds[j]] = attr.data;\n\t\t\t\t\t}\n\t\t\t\t\t//this.html[attr.ind] = attr.data;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.actions) {\n\t\t\tvar action_names = Object.keys(this.actions);\n\t\t\tfor (var i = 0; i < action_names.length; ++i) {\n\t\t\t\tvar new_action = this.actions[action_names[i]];\n\t\t\t\tif (new_action.data) {\n\t\t\t\t\tthis.html[new_action.ind] = new_action.data;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tvar result = this.html.join(\"\");\n\t\tthis.task.debug(func+\" RESULT: \"+result);\n\t}", "title": "" }, { "docid": "3f64e1c588a28e4f2c658c355723cc67", "score": "0.5761204", "text": "connectedCallback() {\n this.root.innerHTML = this.getTemplate();\n }", "title": "" }, { "docid": "a43e97545b21b11672421002826e6cad", "score": "0.57601494", "text": "function setView(html)\n{\n $(\"#view\").html(html);\n}", "title": "" }, { "docid": "5d599b90c6c8a9561732f9ba2a327997", "score": "0.5751615", "text": "function Html(){\n\t\n\t//Extension de l'héritage\n\therite(this,new Regle());\n\t\n\tthis.variables = getVariablesDocument();\n\tthis.session = null;\n\tthis.reglesXml = null;\n\n /*******************************************************************************\n * INITIALISATION\n ******************************************************************************** \n */\n\t//Initialiser la page html\n\tthis.htmlInitialiser = function(){\n\t\tthis.htmlCharger();\n\t\tthis.htmlRegles();\n\t};//end function\n\n\t//Récupère les règles de la page html\n\tthis.htmlCharger = function(){\n\t\tvar htmlXml = ajax(\"html\",\"charger\",this.variables);\n\t\tvar htmlArray = fileXmlToArray(htmlXml);\n\t\t//Chargement des règles\n\t\tthis.reglesXml = htmlXml.getElementsByTagName('regles')[0];\n\t\t//Chargement des variables de session\n\t\tthis.session = htmlArray['session'];\n\t};//end function\n\n\t//Execution des règles lors du chargement\n\tthis.htmlRegles = function(){\n\t\tvar htmlCode = this.variables['var_html_code'];\n\t\tthis.reglesExecuter(htmlCode + '.onload','all','all');\n\t};//end if\n\n }//end classe", "title": "" }, { "docid": "277b02edfaa98c5b7ebe3f1c462f655a", "score": "0.57409626", "text": "get Template() {\n return /*html*/ `\n <div class=\"col-md-12 d-flex justify-content-between\">\n <div class=\"form-group form-check\" onchange=\"app.todosController.flipSelect('${this.id}')\" >\n <input type=\"checkbox\" class=\"form-check-input\" id=\"checked\" ${this.completed ? 'checked' : ''}>\n <label class=\"form-check-label\" for=\"checked\">'${this.description}'</label>\n </div>\n <span class=\"action\" onclick=\"app.todosController.deleteTodo('${this.id}')\">X</span>\n </div>\n `\n }", "title": "" }, { "docid": "e3107ca7df1960c323192419a833450b", "score": "0.5740813", "text": "function valesHTML() {\n //limpiar el html\n limpiarHTML();\n\n valesCanjeados.forEach((vale) => {\n const div = document.createElement(\"p\");\n div.innerHTML = `\n <div class=\"div-img\">\n <div>\n <img src=\"${vale.imagen}\" width=\"200px\"; style=\"padding:5px; border-radius:20px;\" >\n \n </div>\n </div>\n `;\n\n //Agrega el html de vcanjeados en el div\n cVales.appendChild(div);\n });\n\n //agregando vales canjeados al storage\n sincronizarStorage();\n}", "title": "" }, { "docid": "4e4f485524ac2ce167a2e97ea06d915d", "score": "0.57271785", "text": "setHTML() {\n this.html = `\n <form>\n <div class=\"container\">\n <div id=\"form-title\">\n <h3>Create Invoice</h3>\n </div>\n\n <div id=\"bank-account-segment-title\">\n <h5><strong>IBAN</strong></h5>\n </div>\n <div id=\"bank-account-segment\">\n <div class=\"form-group\">\n <label>IBAN</label>\n <input id=\"${this.ibanID}\" name='iban' type=\"text\" class=\"form-control\"\n placeholder=\"IBAN\">\n </div>\n </div>\n\n <div id=\"client-segment-title\">\n <h5><strong>Klantgegevens</strong></h5>\n </div>\n <div id=\"client-segment\">\n <div class=\"two-input-fields\">\n <div class=\"form-group\">\n <label>Voornaam</label>\n <input id=\"${this.clientFirstNameID}\" name=\"firstName\" type=\"text\" class=\"form-control\"\n placeholder=\"Voornaam\">\n </div>\n <div class=\"form-group\">\n <label>Achternaam</label>\n <input id=\"${this.clientLastNameID}\" name=\"lastName\" type=\"text\" class=\"form-control\" placeholder=\"Achternaam\">\n </div>\n </div>\n\n <div id=\"email-input\" class=\"form-group\">\n <label>Email</label>\n <input id=\"${this.clientEmailID}\" name=\"email\" type=\"email\" class=\"form-control\" placeholder=\"email\">\n </div>\n\n <div class=\"two-input-fields\">\n <div class=\"form-group\">\n <label>Stad</label>\n <input id=\"${this.clientCityID}\" name=\"city\" type=\"text\" class=\"form-control\" placeholder=\"Stad\">\n </div>\n <div class=\"form-group\">\n <label>Postcode</label>\n <input id=\"${this.clientZipcodeID}\" name=\"zipcode\" type=\"text\" class=\"form-control\" placeholder=\"Postcode\">\n </div>\n </div>\n\n <div class=\"two-input-fields\">\n <div class=\"form-group\">\n <label>Straatnaam</label>\n <input id=\"${this.clientStreetID}\" name=\"street\" type=\"text\" class=\"form-control\" placeholder=\"Straatnaam\">\n </div>\n <div class=\"form-group\">\n <label>Huisnummer</label>\n <input id=\"${this.clientHouseNumberID}\" name=\"houseNumber\" type=\"number\" class=\"form-control\"\n placeholder=\"Huisnummer\">\n </div>\n </div>\n </div>\n\n <div id=\"job-segment-title\">\n <h5><strong>Werk/Opdracht gegevens</strong></h5>\n </div>\n\n <div id=\"job-segment\">\n <div class=\"form-group\">\n <label>Omschrijving</label>\n <input id=\"${this.jobDescriptionID}\" name=\"description\" type=\"text\" class=\"form-control\"\n placeholder=\"Omschrijving\">\n </div>\n\n <div class=\"two-input-fields\">\n <div class=\"form-group\">\n <label>Locatie</label>\n <input id=\"${this.jobLocationID}\" name=\"location\" type=\"text\" class=\"form-control\" placeholder=\"Locatie\">\n </div>\n\n <div class=\"form-group\">\n <label>Regie</label>\n <input id=\"${this.jobDirectedByID}\" name=\"directedBy\" type=\"text\" class=\"form-control\"\n placeholder=\"Regie\">\n </div>\n </div>\n\n <div class=\"two-input-fields\">\n <div class=\"form-group\">\n <label>Begindatum</label>\n <input id=\"${this.jobStartDateID}\" name=\"jobStartDate\" type=\"date\" class=\"form-control\"\n placeholder=\"Begindatum\">\n </div>\n\n <!-- todo: change front-end date input field format to DD/MM/YYYY from MM/DD/YYYY -->\n <div class=\"form-group\">\n <label>Einddatum</label>\n <input id=\"${this.jobEndDateID}\" name=\"jobEndDate\" type=\"date\" class=\"form-control\"\n placeholder=\"Einddatum\">\n </div>\n </div>\n </div>\n\n <div id=\"cameraman-segment-title\">\n <span style=\"display: inherit;\">\n <button id=\"${this.addCameramanID}\" type=\"button\"\n class=\"btn btn-default icon icon-right\"></button>\n <h5><strong>Cameraman</strong></h5>\n </span>\n </div>\n\n <div id=\"cameraman-segment\">\n </div>\n\n <div id=\"equipment-item-segment-title\">\n <span style=\"display: inherit;\">\n <button id=\"${this.addEquipmentItemID}\" type=\"button\"\n class=\"btn btn-default icon icon-right\"></button>\n <h5><strong>Apparatuur</strong></h5>\n </span>\n </div>\n\n <div id=\"equipment-item-segment\">\n </div>\n\n <div id=\"button-segment\">\n <div class=\"form-group\">\n <div id=\"btn-wrapper\" class=\"form-actions\">\n <a href=\"./invoices.html\" id=\"${this.cancelID}\" type=\"submit\" class=\"btn btn-form btn-default\">Cancel</a>\n <a href=\"./invoices.html\" id=\"${this.createInvoiceID}\" \n class=\"btn btn-form btn-primary\">Create</a>\n </div>\n </div>\n </div>\n </div>\n </form>\n `\n }", "title": "" }, { "docid": "0c517e15c0a14494421de2e2f53d5346", "score": "0.57248324", "text": "renderTemplate(){\n\t \t this.render('libraries/form');\n\t }", "title": "" }, { "docid": "3e959c59f0be11dfb47f1828d2ae42b5", "score": "0.57247597", "text": "function StructureHtml() {\r\n\tthis.m_html = \"\";\r\n}", "title": "" }, { "docid": "f1a76951a5b359f1ee5cb280a958c460", "score": "0.57230127", "text": "get Template() {\n return /*html*/`\n <div class=\"col-sm-3\">\n <div id=\"cards\" class=\"card m-4 ${this.color}-card\"> \n <div class=\"card-body\"><div class=\"text-right\"><i class=\"fa fa-trash-o\" onclick =\"app.listController.deleteList('${this.id}')\"></i></div>\n <h4 class=\"card-title text-center\">${this.name}</h4>\n <ul class=\"pl-3\">\n ${this.ItemsTemplate}\n </ul>\n <form onsubmit=\"app.listController.addItem(event, '${this.id}')\">\n <div class=\"form-group d-flex\">\n <input type=\"text\" class=\"form-control\" name=\"listItem\" placeholder=\"Add List Item\" required>\n <button type=\"submit\" class=\"btn btn\"><i class=\"fa fa-plus\" aria-hidden=\"true\"></i></button>\n </div>\n </form>\n </div>\n </div>\n </div>`\n }", "title": "" }, { "docid": "229d2d6464433bbd64ee0507d4581d7d", "score": "0.5711826", "text": "function handleHTML(e) {\r\n\r\n //Locals\r\n var result = e.result,\r\n scripts = [],\r\n\r\n //Load script tags \r\n scripts = [];\r\n $(result).filter(\"script[src]\").each(function () {\r\n //Store src to request later\r\n scripts.push(this.getAttribute(\"src\"));\r\n }).remove();\r\n sync.load(scripts);\r\n\r\n //Store templates\r\n $(result).filter(\"[data-template]\").each(function () {\r\n sync.storage.store(this.getAttribute(\"data-template\"), this.outerHTML);\r\n });\r\n\r\n //Update each HTML element\r\n $(result).filter(\"[data-update]:not([data-template])\").each(function () {\r\n updateElement(this, e);\r\n });\r\n\r\n //Run inline scripts\r\n $(result).filter(\"script:not([src])\").each(function () {\r\n $.globalEval($(this).html());\r\n });\r\n }", "title": "" }, { "docid": "8ba92c5d74a702cdbea9b018ed2931c7", "score": "0.5692618", "text": "static get template() {\n return html`\n <style include=\"shared-styles\">\n :host {\n display: block;\n\n padding: 11px;\n }\n </style>\n <input type=\"text\" id=\"cep-input\" search name=\"cep\" value=\"\">\n <br>\n <span id=\"endereco\">[[endereco]]</span>\n `;\n }", "title": "" }, { "docid": "037b366b0ce22ff20d522ea7699d3f8b", "score": "0.568828", "text": "function MostrarcontenedorVacio(){\n\n $(\"#contenidoCuerpo\").load(\"contenedor_vacio/contenedor_vacio.html\");\n \n \n }", "title": "" }, { "docid": "9f459a0a6bca141903311a28f9252aee", "score": "0.5679512", "text": "_init() {\n if (this._initialized === undefined) {\n this._initialized = false;\n }\n if (this._initialized) return;\n this._initialized = true;\n\n let html = `\n<div class=\"row\">\n <b>NOT IMPLEMENTED</b>\n</div>`;\n this.fwk_app_container.html(html);\n }", "title": "" }, { "docid": "6b7370c3a1594d457ee4ae86a4621431", "score": "0.56772864", "text": "function pippoKlikk(){\r\ndocument.getElementById(\"pageContent\").innerHTML = (pippoTekst);\r\n}", "title": "" }, { "docid": "9d4d50cfbfd1ab6dff50d4b723378580", "score": "0.5673317", "text": "render() {\n return html`\n <h1>Name: ${this.name}</h1>\n <div>\n ${this.isShow ?\n html`<p>${this.message}</p>` :\n html`<p>Title changed </p>`\n }\n </div>\n <ul>${this.items.map(item => html`<li>${item}</li>`)}</ul>\n <button @click=\"${this.onClick}\">Trigger</button>\n `;\n }", "title": "" }, { "docid": "673ab79856b00fa78994d17c0dde17dc", "score": "0.567176", "text": "get Template() {\n return /*html*/ `\n<div class=\"col-12 col-md-3 d-flex justify-content-around my-3 m-auto\">\n <div class=\"row w-100 text-center bg-primary text-light py-1\">\n <span class=\"col-10\">${this.title}</span>\n <i type=\"button\" class=\"col-2 fa fa-times text-danger text-right align-self-center\"\n onclick=\"app.listController.delete('${this.id}')\"></i>\n <div class=\"col-12\">\n <div class=\"card-body bg-light text-secondary\">\n <dl class=\"text-secondary\">${this.Task}</dl>\n <form onsubmit=\"app.listController.addTask(event, '${this.id}')\" class=\"input-group\">\n <input name=\"taskName\" placeholder=\"Enter New Task...\" type=\"text\" class=\"form-control\" aria-label=\"Small\"\n aria-describedby=\"inputGroup-sizing-sm\">\n <button type=\"submit\" class=\"border-0 bg-light\"><i class=\"fa fa-plus text-success text-left align-self-center\"></i></button>\n </form> \n </div>\n </div>\n </div>\n</div>\n `\n }", "title": "" }, { "docid": "1a6a3466c6b7664f135b9bbbb1a0c89e", "score": "0.566582", "text": "function init() {\n createJoinHtml();\n createSignInHtml();\n}", "title": "" }, { "docid": "7118db5107e07cd1f1a09d24b0b03dcf", "score": "0.566103", "text": "function render(html) {\n $(\"main\").html(html);\n}", "title": "" }, { "docid": "5c0054347e205216b5b0fe61c1fb8633", "score": "0.5658263", "text": "addView(html, parent) {\n if (parent) {\n this._parent = parent;\n } //const content = html.getElementsByTagName('body')[0].firstChild;\n\n\n let content = html.body || html;\n\n this._parent.appendChild(content);\n\n return html;\n }", "title": "" }, { "docid": "e06236595e0842e6178a5e3d85905cfe", "score": "0.5653858", "text": "render() {\n var _this = this\n var opts = {\n autoOpen: true,\n modal: true,\n title: `Bill ${this.id}`,\n width: '500',\n height: '600',\n buttons :[\n {'text': 'Order more..', \n 'click': function() {\n $(this).closest('.ui-dialog-content').dialog('close'); \n } \n },\n\n {'text': 'Next (Delivery)', \n 'click': function() {\n _this.save()\n $(this).closest('.ui-dialog-content').dialog('close'); \n window.location = './delivery.html'\n }\n }\n ]\n }\n openDialog('templates/bill.mustache', _this.toDict(), opts)\n \n }", "title": "" }, { "docid": "ff9e12b79b7f8c88a57bb23353aa4de0", "score": "0.5645427", "text": "function render() {\n \n mugine.render(element, templates[options.style], {\n preview: preview, \n views: views, \n buttons: buttons\n });\n \n }", "title": "" }, { "docid": "46df6e93d567033a19834c3b126cd255", "score": "0.563584", "text": "function beginHTML() {\n const html = `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Document</title>\n </head>\n <body>\n <nav class= \"navbar\" style = \" background-color: slateblue; color: white;\" > \n <span class = \"brandname\"> Company Name </span>\n </nav>\n <div class = \"container\"> \n <div class=\"row\"> \n {{body}}\n </div>\n \n </div>\n </body>\n </html>`\n return html\n\n}", "title": "" }, { "docid": "41804fffa0e772aa6bf43dc44609630c", "score": "0.56173664", "text": "function fSHcreateHTML( p_obj ){\r\n /* konfiguracja obsługi klasy */ \r\n var params = {\r\n\r\n /* obiekt JSON z danymi \r\n /nie wymagane, o ile przekaże się obiekt JSON w sourceJSONdivId */\r\n 'sourceJSONobj': p_obj['html'], \r\n\r\n /* obiekt JSON ze struktura HTML - specjalne czesci, np tabela ze zmienna iloscia kolumn i wierszy\r\n /nie wymagane/ */\r\n 'sourceJSONobjSpecial': p_obj['special'], \r\n \r\n /* obiekt JSON ze stylami skrotow klawiszowych\r\n /nie wymagane/ */\r\n 'sourceCssJSONobj': p_obj['css'] \r\n \r\n };\r\n\r\n this.struct = new InSSstructHMTL( params );\r\n return true;\r\n }", "title": "" }, { "docid": "282e6c54489e4a7335c13871163cb2c2", "score": "0.56166196", "text": "render() {\n return html`\n\n <!-- Display all fields to change -->\n <form class= \"updateUserInfo\">\n <p> Username: ${this.uname} </p>\n <p> First Name: ${this.firstName} </p>\n <p> Last Name: ${this.lastName} </p>\n <p> old password: ${this.oldPwd} </p>\n <p> new password: ${this.pwd} </p>\n\n <!-- Submit button can be implemented-->\n </form>\n `\n }", "title": "" }, { "docid": "f72dcfc970e083db6f2ded076453c7ab", "score": "0.5605977", "text": "function createHtml(item){\n console.log('dentro funzione crea html');\n\n const container = document.querySelector('.container');\n console.log('container', container);\n let prevContent = container.innerHTML;\n\n //destrutturo oggetto icon per accedere alle sue proprietà\n const {name, prefix, family, color} = item;\n console.log('nome icona', name);\n console.log('icona', item);\n\n //definisco struttura html\n prevContent +=\n `\n\t\t<div class=\"box p-3 text-center\">\n <i class=\"${family} ${prefix}${name} fs-1\"></i>\n <h5 class=\"text-uppercase fs-5\">${name}</h5>\n </div> \n </div>\n `;\n\n container.innerHTML = prevContent;\n \n}", "title": "" }, { "docid": "0129913fb1b4adcd80cfae591747a924", "score": "0.56021905", "text": "get htmlString() {\n return `<div class=\"amiibo\" id=\"amiibo${this.data.tail}\"><img src=${\n this.data.image\n } />\n <div id=\"amiiboInfo\" class=\"amiiboInfo\">\n ${this.data.name}</br>\n Series: ${this.data.gameSeries}</br>\n ${this.data.release.eu ?? \"N/A\"}</br>\n </div>\n <div class=\"buttons\">\n ${this.getActions()}\n </div>\n </div>`;\n }", "title": "" }, { "docid": "6d794b79503deac4856880d8ddfd254a", "score": "0.56011945", "text": "get Template() {\n return /*html*/ `\n \n <div class=\"col-md-3 bg-warning rounded text-light text-left m-3 shadow\" id=\"${this.id}\"><h3>${this.listTitle}</h3>\n <div class=\"row \">\n <div class=\"col-1 offset-10 text-right\">\n <button type=\"button\"class=\"borderless-button offset-button\">\n <i class=\"fa fa-minus-square text-danger bg-light rounded p-1 fa-2x text-right shadow\" onclick=\"app.listController.deleteList('${this.id}')\">\n </i>\n </button>\n </div>\n </div>\n </div>`;\n }", "title": "" }, { "docid": "74f3a7bb3d4efc46fb031756ba56ce38", "score": "0.5599921", "text": "function setHtml(){\n $(\".city\").html(city);\n $(\".des\").html(description);\n addTemp();\n }", "title": "" }, { "docid": "de7aa9255707f87f6e1b899e060f202a", "score": "0.55945367", "text": "getHTML() {\n return `<div class=\"item clearfix\" id=\"inc-${this.id}\"><div class=\"item__description\">${this.description}</div><div class=\"right clearfix\"><div class=\"item__value\">+ ${this.displayValue}</div><div class=\"item__delete\"><button class=\"item__delete--btn\"><i class=\"ion-ios-close-outline\"></i></button></div></div></div>`;\n }", "title": "" }, { "docid": "d17fe598c1ae4cdf7990d49f1efb16b0", "score": "0.5593433", "text": "function render() {\n utils.updateDom(\"root\", template.contact);\n }", "title": "" }, { "docid": "abf8e97081048539e322cdf8b7f5fa78", "score": "0.5589156", "text": "generateContentHTML () { return ''; }", "title": "" }, { "docid": "a617b89644c14ed5dc1a3433b51771d1", "score": "0.5584407", "text": "function render(){\n let html = '';\n \n // add the different parts\n html += generateMealDetailsForm();\n html += generateInfoSection();\n html += generateResetButton();\n\n // put it out there\n $('main').html(html);\n}", "title": "" }, { "docid": "eca718b72f0b0ac3a36d51061f7682bf", "score": "0.5565846", "text": "render(){\n return html`\n <h1>\n ${this.name}: \n </h1>\n <p>\n tengo ${this.perrete} perretes\n </p>\n `;\n }", "title": "" }, { "docid": "9bed5505b6aed1b4d96f2c3576291017", "score": "0.5558813", "text": "function conTem(template,data)\n{\n\tvar html=template(data);\n\t$(\"section\").html(html);\n}", "title": "" }, { "docid": "4b10996d98a2b11d91a162527e436d66", "score": "0.55511063", "text": "genhtml(html) {\n return {__html: html}\n }", "title": "" }, { "docid": "6273be5f746874a9bcc8987e9600a70f", "score": "0.5545371", "text": "render()\n {\n var html_builder = [];\n var data = this.view_data_provider.getData(this);\n\n // both are common cases\n if ($.isArray(data))\n {\n for (var i = 0; i < data.length; i++)\n {\n html_builder.push(Utils.render(this.template, data[i]));\n }\n }\n else\n {\n html_builder.push(Utils.render(this.template, data));\n }\n\n if (this.append)\n {\n this.$target.append(html_builder.join(''));\n }\n else\n {\n this.$target.html(html_builder.join(''));\n }\n }", "title": "" }, { "docid": "c7e98b5768628b8351deda8dcca6a512", "score": "0.5544052", "text": "static renderForm(){\n Contribution.contributionForm.innerHTML += `\n <form id=\"new-contribution-form\">\n Name: <input type=\"text\" id=\"name\">\n Description: <input type=\"text\" id=\"description\">\n Email: <input type=\"text\" id=\"email\">\n <input type=\"submit\" id=\"create\"> \n <form> \n `\n }", "title": "" }, { "docid": "73f76ef7b93aa113fd908bee22d629ab", "score": "0.55390453", "text": "function createHtml(data) {\n\t\n\tdivContainer.innerHTML += \n\t`<div>\n\t\t<a href=\"/detail.html?id=${data.id}\" class= \"a-tags\">\n\t\t<img src=\"${data.thumbnail}\">\n\t\t<h2>${data.title}</h2>\n\t\t<p>Platform: ${data.platform}</p>\n\t\t<date>Release Date: ${data.release_date}</date>\n\t\t</a>\n\t</div>`\n}", "title": "" }, { "docid": "6631534c81140eda50c1322f617511ed", "score": "0.5537299", "text": "function client() {\n var id = ID;\n var script_id = SCRIPT_ID;\n // valid HTML within strings, so need to encode and decode front-end\n var content = JSON.parse(decodeURIComponent(CONTENT));\n var element = $(\"#\" + id);\n var script = $(\"#\" + script_id);\n $(function () {\n bind_html(element, content);\n });\n script.remove();\n }", "title": "" }, { "docid": "4dc308192a5def9395ba66e8e8a85cd9", "score": "0.55246484", "text": "function pressTemplate(data) {\n var html = '';\n $.each(data, function(index, item){\n html += '<div class=\"content\"><h3 tabindex=\"0\">'+ item.title +'</h3><div tabindex=\"0\">'+item.description+\n '</div><div><a class=\"primary-btn\" href=\"'+item.linkurl+'\" target=\"_blank\">READ MORE</a></div>'+\n '<hr></div>';\n });\n return html;\n }", "title": "" }, { "docid": "7db8145f7b8322a0cc763addae311403", "score": "0.552158", "text": "function carritoHTML(){\n\n //limpiar el html \n\n limpiarHtml();\n\n //Recorre el carrito y genera el html\n\n listaCursos.forEach(curso =>{\n const{imagen,titulo,precio,cantidad,id} = curso;\n const row = document.createElement('tr');\n row.innerHTML=`\n <td>\n <img src='${imagen}' with=\"100\">\n </td>\n <td>\n ${titulo}\n </td>\n <td>\n ${precio}\n </td>\n <td>\n ${cantidad}\n </td>\n <td>\n <a href=\"#\" class=\"borrar-curso\" data-id=${id}>X</a>\n </td>\n \n \n `;\n\n //Agrega el html del carrito en el body\n\n contenedorCarrito.appendChild(row);\n });\n}", "title": "" }, { "docid": "924ebbfb7951d4b9ab5a0307c41ea856", "score": "0.55197424", "text": "addFormMarkup() {\n this.form.innerHTML = `\n <div class=\"form-content\">\n <div class=\"wrapper\">\n <label class=\"label title-to\">Туда\n <input class=\"field field-to\" type=\"date\">\n <div class=\"hint\"></div>\n </label>\n </div>\n <div class=\"wrapper wrapper-back\">\n <label class=\"label title-back\">Обратно\n <input class=\"field field-back-checkbox\" type=\"checkbox\">\n <input class=\"field field-back\" type=\"date\">\n <div class=\"hint\"></div>\n </label>\n </div>\n <div class=\"form-controls\">\n <button class=\"button button-form button-sale\">Купить</button>\n </div>\n <div class=\"tickets\">\n <div class=\"ticket-to\"></div>\n <div class=\"ticket-back\"></div>\n </div>\n </div>\n `;\n }", "title": "" }, { "docid": "70b7d04c270b865eab951774fc2c6f1f", "score": "0.5516572", "text": "show(el) {\n el.innerHTML = this.html;\n }", "title": "" }, { "docid": "208574dd67f5acbca427197498b2df1a", "score": "0.5512766", "text": "toHtml() {\n return this.templEngine.renderMain(this.response);\n }", "title": "" }, { "docid": "eac301226d516cce07f883466e141b44", "score": "0.55102766", "text": "buildPage(taskList) {\n this.html = this.buildHeader();\n this.html = this.html + this.buildBody(taskList) + `</html>`;\n }", "title": "" }, { "docid": "341c499622969c9a2e02a2c640c396f9", "score": "0.55066127", "text": "function carritoHTML(){\n //Limpiar el html\n limpiarHTML();\n //Recorre el carrito y genera el html\n articulosCarrito.forEach( curso =>{\n const {imagen, titulo, precio, cantidad, id} = curso; //destructuring\n const row = document.createElement('tr');\n row.innerHTML = `\n <td><img src=\"${imagen}\" width=\"100\"></td>\n <td> ${titulo}</td>\n <td>${precio}</td>\n <td>${cantidad}</td>\n <td>\n <a href=\"#\" class=\"borrar-curso\" data-id=\"${id}\"> X </a>\n </td>\n `;\n //AGREGA EL HTML DEL CARRITO AL TBODY\n contenedorCarrito.appendChild(row);\n });\n}", "title": "" }, { "docid": "c0f60277417925767ca4b0b60eda31e9", "score": "0.5504964", "text": "function setContent(content) {\n document.getElementById(\"projectinfo\").innerHTML = content;\n $(\"#menzellesModal\").modal('show');\n}", "title": "" }, { "docid": "b68235231094ebfc1a4b045c3dd90f57", "score": "0.5501405", "text": "viewregisternewcompany() {\n this.loadTemplate('pages/application/registernewcompany', 'main_body');\n }", "title": "" }, { "docid": "c74370ed4649d8902d19736bc63974aa", "score": "0.54985905", "text": "function buildHTML() {\n html=\"<li data-id='task-\"+i+\"' class=''><div class='view'>\\\n <input type='checkbox' class='toggle'>\\\n <label>\"+localStorage.getItem('task-'+i)+\"</label>\\\n <button class='destroy'></button></div>\\\n <input value=\"+localStorage.getItem('task-'+i)+\" class='edit'></li>\"\n return html;\n }", "title": "" }, { "docid": "48b5981eebb6b71fb6dc345a72a9fc94", "score": "0.5497277", "text": "createview(){\n this.view.init = new View($(\"#InitSrceen\"),[\n new Image($(\"#LogoImage\"), \"\",\"./img/poologobleu.png\",200,200),\n new TextArea($(\"#JoinGame\"),$(\"#btnip\"),\"ipinput\",\"w3-button w3-blue\",1,16,\"Connexion\",() =>{this.app.connect(this.view.init.getElem(1).toString().replace(/ /g,''))})\n ]);\n this.view.load = new View($(\"#loading\"),[]);\n\n this.view.header = new View($('#header'),[\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Compétences\",() => {this.btnHandler(\"header\",0,[\"competence\"]);}),\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Dons\",() => {this.btnHandler(\"header\",1,[\"don\"]);}),\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Sorts\",() => {this.btnHandler(\"header\",2,[\"sort\"]);}),\n new Button($(\"#barre1\"),\"w3-button w3-blue\",\"Objets\",() => {this.btnHandler(\"header\",3,[\"objet\"]);})\n ]);\n\n this.view.competence = new View($('#competence'),[\n new Button($(\"#competence .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"competence\");})\n ]);\n\n this.view.don = new View($('#don'),[\n new Button($(\"#don .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"don\");})\n ]);\n\n this.view.sort = new View($('#sort'),[\n new Button($(\"#sort .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"sort\");})\n ]);\n\n this.view.objet = new View($('#objet'),[\n new Button($(\"#objet .add_btn\"),\"w3-button w3-circle w3-blue\",\"+\",() => {this.dynamicView(\"objet\");})\n ]);\n\n this.view.main = new View($(\"#main\"),[\n new Image($(\"#PV_image\"), \"\",\"./img/PV.png\",75,75),\n new Image($(\"#CA_image\"), \"\",\"./img/CA.png\",75,75),\n new Image($(\"#PO_image\"), \"\",\"./img/coins.png\",75,75),\n new Image($(\"#Time_image\"), \"\",\"./img/clock.png\",75,75),\n new TextArea($(\"#PO_mod\"),$(\"#PO_mod\"),\"PO_modeur\",\"w3-button w3-blue PO_modeur\",1,3,\"-\",() =>{this.app.modPO(-parseInt($(\"textarea.PO_modeur\").val()))}),\n new Button($(\"#PO_mod\"),\"w3-button w3-blue PO_modeur\",\"+\",() => {this.app.modPO(parseInt($(\"textarea.PO_modeur\").val()))})\n ]);\n\n this.hideAll();\n }", "title": "" }, { "docid": "9a716915663afa8ce19452598733609d", "score": "0.5496764", "text": "function gui_htmlChanged(str) {\r\n\tif (document.getElementById('html_container')) {\r\n\t\tdocument.getElementById('html_container').value = str;\r\n\t}\r\n}", "title": "" }, { "docid": "f87264d0275acab105c38bfdb8412538", "score": "0.549537", "text": "function renderHTML (data) {\n // Recorremos los datos recibidos por parametro\n $.each(data, function(i, item) {\n // Obtenemos el contenedor donde se van a desplegar los productos\n var products = $(\"#products\");\n // Generamos el nodo html con los datos que vienen en el JSON\n var html = '<div class=\"articulos\">' + \n \"<img src=\" + data[i].imagen +\">\" + \n '<p id=\"titulos\">' + data[i].name + '</p>' +\n '<p>' + data[i].descripcion + '</p>' + '<br>'+\n '<p id=\"precio\" >' + data[i].precio + '</p>' +\n '<input type=\"button\" onClick=\"incrementar();\" value=\"Agregar al carrito\" id =\"botoncar\" class=\"btn\">'; \n // Agregamos en el contenedor de productos el html para cada dato del listado\n products.append(html);\n });\n}", "title": "" }, { "docid": "53602b05e4b6743521fb0a117cdc911d", "score": "0.54913074", "text": "addContent() {\n\t\tthis.updateHTML();\n\t\tthis.addEvent();\n\t}", "title": "" }, { "docid": "e3c1901d703cece98590ab6238cee277", "score": "0.5490576", "text": "render() {\n return html`\n ${this.InitComponents(this.setupUI())}\n `;\n }", "title": "" }, { "docid": "fde6f2af1f56579fd2437223f5aced1a", "score": "0.5484156", "text": "function carritoHTML(articuloCarrito){\n //antes de agregar al carrito se limpia para que quede vacio el html\n //limpiar html\n limpiarHTML();\n\n articuloCarrito.forEach((curso) => {\n //extraemos los atributos\n const {imagen, titulo, precio, cantidad, id}=curso;\n\n //creamos el html a pintar en la web\n const fila=document.createElement('tr');\n fila.innerHTML=`\n <td><img src=\"${imagen}\" width=\"100\"></td>\n <td>${titulo}</td>\n <td>${precio}</td>\n <td>${cantidad}</td>\n <td><a href=\"#\" class=\"borrar-curso\" data-id=\"${curso.id}\">X</a></td>\n `;\n\n contenedorCarrito.appendChild(fila);\n });\n agregarCarritoLocalStorage();\n}", "title": "" }, { "docid": "9be81eb98802262ce32bf26a0a3eb12c", "score": "0.5481134", "text": "createHTML() {\n return \"<a>\" + this.productimage + \"</a>\" +\n\n \"<h4>\" + this.productname + \"</h4>\" +\n\n \"<h5>\" + this.brandname + \"</h5>\" + \n \n \"<p>\" + this.price + \"<p>\" \n \n }", "title": "" }, { "docid": "082abbdd151441184f4888def7ac6ec9", "score": "0.5472335", "text": "function generateHtml(member){\n //ogni volta aggiungo un membro a quello che già c'è\n //non voglio sovrascrivere!!\n //leggo il contenuto di team-container\n //genero output html\n //infine lo aggiungo all'html già presente!!!\n\n const container = document.querySelector('.team-container');\n\n let prevContent = container.innerHTML;\n\n //destrutturo oggetto\n const {immagine, nome, ruolo} = member;\n console.log('member', member);\n\n //definisco struttura html\n prevContent +=\n `\n <div class=\"team-card\">\n <div class=\"card-image\">\n <img src=\"${immagine}\"/>\n </div>\n <div class=\"card-text\">\n <h3>${nome}</h3>\n <p>${ruolo}</p>\n </div>\n </div>\n `;\n\n //console.log(prevContent);\n\n container.innerHTML = prevContent;\n \n}", "title": "" }, { "docid": "a5a4e750920309b4872260ad5f4d16e6", "score": "0.5470905", "text": "async _replaceHTML(element, html) {\n\t\tawait super._replaceHTML(element, html);\n\t\tthis.app = new FormApp({\n\t\t\ttarget: html.find(\"form\")[0],\n\t\t\tprops: {\n\t\t\t\tsheetData: this.getData(),\n\t\t\t},\n\t\t});\n\t}", "title": "" }, { "docid": "c655b3852a0c80496e9a602de313a472", "score": "0.5469868", "text": "html() {\n console.log(\"Rendering\");\n const html = ` <h2>${this.name}</h2>\n <div class=\"image\"><img src=\"${this.imgSrc}\" alt=\"${this.imgAlt}\"></div>\n <div>\n <div>\n <h3>Distance</h3>\n <p>${this.distance}</p>\n </div>\n <div>\n <h3>Difficulty</h3>\n <p>${this.difficulty}</p>\n </div>\n </div>`;\n return html;\n }", "title": "" }, { "docid": "f3747624d845f616eed18eedcd83c3d0", "score": "0.5469454", "text": "function ponerDatosInputHtml(elementoHTML, elementoXML)\n{\n\telementoHTML.innerHTML = elementoXML;\n}", "title": "" }, { "docid": "bd5374e224b9a0997d6dd89f8905e0e0", "score": "0.5466735", "text": "function carritoHTML() {\n // Limpiar el HTML\n limpiarHTML();\n\n articulosCarrito.forEach(curso => {\n const row = document.createElement('tr');\n row.innerHTML = `\n <td>\n <img src=\"${curso.imagen}\" width=\"100\">\n </td>\n <td>\n ${curso.titulo}\n </td>\n <td>\n ${curso.precio}\n </td>\n <td>\n ${curso.cantidad}\n </td>\n <td>\n <a href=\"#\" class=\"borrar-curso\" data-id=\"${curso.id}\">X\n </td>\n `;\n contenedorCarrito.appendChild(row);\n })\n}", "title": "" }, { "docid": "e72e9fcce493f529c6833dd8c8a53740", "score": "0.54625034", "text": "home () {\n this.view = new Login();\n $( \"#app\" ).html( this.view.render().$el );\n }", "title": "" } ]
b034610f00ed80125ac56a9e459aa840
Ensures the option is selected when activated from the keyboard.
[ { "docid": "99804d8ddd2612df1e475e80f5436c5a", "score": "0.0", "text": "handleKeydown(event) {\n // tslint:disable-next-line\n if (event.keyCode === ENTER || event.keyCode === SPACE) {\n this.selectViaInteraction();\n // Prevent the page from scrolling down and form submits.\n event.preventDefault();\n }\n }", "title": "" } ]
[ { "docid": "e00cf7be4ca9b602e19b4f64983bab65", "score": "0.6840752", "text": "_setFocusedOption(option) {\n this._keyManager.updateActiveItem(option);\n }", "title": "" }, { "docid": "a46e270224ad5db2a9f6c4020ddad132", "score": "0.6820638", "text": "_handleOptionFocus(e){this._setActiveOption(e.detail.id)}", "title": "" }, { "docid": "7c0fd9506710182edf150759319e4cf3", "score": "0.6783515", "text": "_highlightCorrectOption() {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n }\n else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n }", "title": "" }, { "docid": "7c0fd9506710182edf150759319e4cf3", "score": "0.6783515", "text": "_highlightCorrectOption() {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n }\n else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n }", "title": "" }, { "docid": "7c0fd9506710182edf150759319e4cf3", "score": "0.6783515", "text": "_highlightCorrectOption() {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n }\n else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n }", "title": "" }, { "docid": "7c0fd9506710182edf150759319e4cf3", "score": "0.6783515", "text": "_highlightCorrectOption() {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n }\n else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n }", "title": "" }, { "docid": "0e8d6562d4464e8686361e8ff350dd67", "score": "0.6772204", "text": "_highlightCorrectOption() {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n }\n else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n }", "title": "" }, { "docid": "4b151012fa9403a1d353c24a359c81cb", "score": "0.65546435", "text": "_onSelectedOptionClick(event) {\n this._openSelect()\n this._toggleHide()\n this.input.focus()\n }", "title": "" }, { "docid": "96434351f092df25b43dffe252385896", "score": "0.65040195", "text": "onKeypress() {\n var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;\n\n if (this.opt.choices.getChoice(index)) {\n this.selected = index;\n } else {\n this.selected = undefined;\n }\n this.render();\n }", "title": "" }, { "docid": "307b960772c662586df19499d1d16c47", "score": "0.6473678", "text": "onKeypress() {\n var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;\n\n if (this.opt.choices.getChoice(index)) {\n this.selected = index;\n } else {\n this.selected = undefined;\n }\n\n this.render();\n }", "title": "" }, { "docid": "307b960772c662586df19499d1d16c47", "score": "0.6473678", "text": "onKeypress() {\n var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;\n\n if (this.opt.choices.getChoice(index)) {\n this.selected = index;\n } else {\n this.selected = undefined;\n }\n\n this.render();\n }", "title": "" }, { "docid": "47ba536eebfb88cf578ef57528a5aa28", "score": "0.6398092", "text": "optionWasSelected() {\n this.setState({\n filterText: this.props.multiple ? '' : this.state.filterText,\n empty: false,\n dropdownOpen: false,\n highlightedOption: null\n }, () => {\n this.handleDropdownPosition();\n\n if (this.props.multiple) {\n this.focusInput();\n }\n });\n }", "title": "" }, { "docid": "d205651e4cea0648e992eda6b1275013", "score": "0.6339612", "text": "onUpKey() {\n var len = this.opt.choices.realLength;\n this.selected = this.selected > 0 ? this.selected - 1 : len - 1;\n this.render();\n }", "title": "" }, { "docid": "d205651e4cea0648e992eda6b1275013", "score": "0.6339612", "text": "onUpKey() {\n var len = this.opt.choices.realLength;\n this.selected = this.selected > 0 ? this.selected - 1 : len - 1;\n this.render();\n }", "title": "" }, { "docid": "b01cf50b18dad8c6a24715171288da2d", "score": "0.6278907", "text": "onKeypress() {\r\n\t\t\t\t\tvar index = this.rl.line.length\r\n\t\t\t\t\t\t? Number(this.rl.line) - 1\r\n\t\t\t\t\t\t: 0;\r\n\r\n\t\t\t\t\tif (this.opt.choices.getChoice(index)) {\r\n\t\t\t\t\t\tthis.selected = index;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.selected = undefined;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.render();\r\n\t\t\t\t}", "title": "" }, { "docid": "88f78d33cf9797d6dc990a969f338f5c", "score": "0.62753654", "text": "confirmKeyboardSelection() {\n const _selectedItem = this._selectedItem;\n this.moves = [];\n this._disableKeyboardReorderMode();\n this._tearDownA11yApplicationContainer();\n set(_selectedItem, 'wasDropped', true);\n this.commit();\n this._updateItemVisualIndicators(_selectedItem, false);\n this._updateHandleVisualIndicators(_selectedItem, false);\n this._resetItemSelection();\n }", "title": "" }, { "docid": "6198fe92909f1644852fc00d9cb694e5", "score": "0.62459755", "text": "function optionA () { checkChoice(0); }", "title": "" }, { "docid": "ab1fd9a7056f373fb01215068dcfc066", "score": "0.6235397", "text": "select() {\n const input = this.getInput();\n if (input) {\n input.select();\n }\n }", "title": "" }, { "docid": "8b2c649e67846544dbe4a12c98225d0a", "score": "0.61807996", "text": "function activate(){\n //Hard coded initial value\n ctrl.textField = \"ABC123\";\n ctrl.checkboxFlag = true;\n //Undefined\n ctrl.option = undefined;\n ctrl.select = ctrl.arrayOfOptions[0];\n }", "title": "" }, { "docid": "4b9d36fc22ed22d82b9a2710bd8b4d95", "score": "0.6178588", "text": "validateGesture(player){\n player.selection = prompt(player.name + ': select from list: ' + this.gestureOptions)\n\n if(!this.gestureOptions.includes(player.selection)){\n alert('Incorrect value. Please try again.');\n this.validateGesture(player)\n }\n \n }", "title": "" }, { "docid": "17c950738d5c2c8b848a33a252bf83e2", "score": "0.61480826", "text": "onUpKey() {\r\n\t\t\t\t\tvar len = this.opt.choices.realLength;\r\n\t\t\t\t\tthis.selected =\r\n\t\t\t\t\t\tthis.selected > 0 ? this.selected - 1 : len - 1;\r\n\t\t\t\t\tthis.render();\r\n\t\t\t\t}", "title": "" }, { "docid": "efd926f67bcfc4abf528514a85541dbd", "score": "0.6134014", "text": "_setSelectedOption() {\n if (this.options.length > 1) super._setSelectedOption();\n }", "title": "" }, { "docid": "efd926f67bcfc4abf528514a85541dbd", "score": "0.6134014", "text": "_setSelectedOption() {\n if (this.options.length > 1) super._setSelectedOption();\n }", "title": "" }, { "docid": "346674d519e227604459b75504b130ce", "score": "0.60949296", "text": "function checkChosen() {\n\tif (chosen) {\n\t\tchosen = false;\n\t\tcharSelected();\n\t}\n}", "title": "" }, { "docid": "01067afd3cb9a64446338160a2ef3078", "score": "0.6076127", "text": "_toggleFocusedOption() {\n let focusedIndex = this._keyManager.activeItemIndex;\n if (focusedIndex != null && this._isValidIndex(focusedIndex)) {\n let focusedOption = this.options.toArray()[focusedIndex];\n if (focusedOption && !focusedOption.disabled && (this._multiple || !focusedOption.selected)) {\n focusedOption.toggle();\n // Emit a change event because the focused option changed its state through user\n // interaction.\n this._emitChangeEvent([focusedOption]);\n }\n }\n }", "title": "" }, { "docid": "1e87e2d0f726e9ec0e80aed4f13a504f", "score": "0.60349905", "text": "function _pprChoiceAction()\n{\n // this function is only needed to handle IE's weird select element\n if (!_agent.isIE)\n return true;\n\n var rv = false;\n\n // This gets called as both onClick and onBlur, but both really only want\n // to submit the event if a change has been made.\n if ((!window._pprBlocking) && (_pprChoiceChanged))\n {\n // clear the choice tracker\n _pprChoiceChanged = false;\n rv = true;\n }\n return rv;\n}", "title": "" }, { "docid": "a84d153d63d7fc0259621a392d7d9a62", "score": "0.59663206", "text": "get activeOption() {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n return null;\n }", "title": "" }, { "docid": "adaabca48bd7730e547cf500c0793fb6", "score": "0.59496456", "text": "onKeypress() {\r\n\t\t\t\t\tthis.selectedKey = this.rl.line.toLowerCase();\r\n\t\t\t\t\tvar selected = this.opt.choices.where({\r\n\t\t\t\t\t\tkey: this.selectedKey,\r\n\t\t\t\t\t})[0];\r\n\t\t\t\t\tif (this.status === \"expanded\") {\r\n\t\t\t\t\t\tthis.render();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.render(null, selected ? selected.name : null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "title": "" }, { "docid": "a46e946216c2e2cf58f9921c385ddfe8", "score": "0.5948", "text": "_onEnterOrTabKeyDown() {\n if (this.state.focusedOptionIndex >= 0) {\n this._triggerChange(this.filteredOptions[this.state.focusedOptionIndex].props.value);\n }\n }", "title": "" }, { "docid": "9b5a66667a77402563c70651a5603ff7", "score": "0.5936205", "text": "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 }", "title": "" }, { "docid": "9b5a66667a77402563c70651a5603ff7", "score": "0.5936205", "text": "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 }", "title": "" }, { "docid": "9b5a66667a77402563c70651a5603ff7", "score": "0.5936205", "text": "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 }", "title": "" }, { "docid": "8b6c99e0b63a3cb4a67fde1016896025", "score": "0.5914814", "text": "select() {\n if (this.inRange()) {\n this._selection = true;\n }\n }", "title": "" }, { "docid": "d2c0938c9c89d1874ef98958850d5a7c", "score": "0.5885976", "text": "focusSelected() {\n this._selectedField.triggerFocus();\n }", "title": "" }, { "docid": "f6b0fb1e918af8b7b947a05e1d3990c8", "score": "0.5846932", "text": "function pkg_sel_done() {\n setFocus(\"wpp\");\n}", "title": "" }, { "docid": "6a77e0a878d702b0561829f30cc95b6b", "score": "0.5813927", "text": "function trueSelection(inputtext, alertMsg) {\n if (inputtext.value == \"Please Choose\") {\n document.getElementById('p4').innerText = alertMsg; //this segment displays the validation rule for selection.\n inputtext.focus();\n return false;\n }\n else {\n return true;\n }\n}", "title": "" }, { "docid": "1b4e9e4bcad0da1a823e09e2bc75011e", "score": "0.5808715", "text": "function handleOptionPressed(idx, option, question) {\n \n }", "title": "" }, { "docid": "a338ecb37847bed0126418ede8c8f009", "score": "0.58037615", "text": "function groz_sel_done() {\n setFocus(\"cpw\");\n}", "title": "" }, { "docid": "654def98b081e2337290ed9cfab2b36a", "score": "0.5788738", "text": "_onSelect(option, isUserInput) {\n const wasSelected = this._selectionModel.isSelected(option);\n if (option.value == null && !this._multiple) {\n option.deselect();\n this._selectionModel.clear();\n this._propagateChanges(option.value);\n }\n else {\n if (wasSelected !== option.selected) {\n option.selected ? this._selectionModel.select(option) :\n this._selectionModel.deselect(option);\n }\n if (isUserInput) {\n this._keyManager.setActiveItem(option);\n }\n if (this.multiple) {\n this._sortValues();\n if (isUserInput) {\n // In case the user selected the option with their mouse, we\n // want to restore focus back to the trigger, in order to\n // prevent the select keyboard controls from clashing with\n // the ones from `mat-option`.\n this.focus();\n }\n }\n }\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n this.stateChanges.next();\n }", "title": "" }, { "docid": "f9a7b908e4d24fde42e1fd81013f017b", "score": "0.5787078", "text": "_onSelect(option, isUserInput) {\n const wasSelected = this._selectionModel.isSelected(option);\n if (option.value == null && !this._multiple) {\n option.deselect();\n this._selectionModel.clear();\n if (this.value != null) {\n this._propagateChanges(option.value);\n }\n }\n else {\n if (wasSelected !== option.selected) {\n option.selected ? this._selectionModel.select(option) :\n this._selectionModel.deselect(option);\n }\n if (isUserInput) {\n this._keyManager.setActiveItem(option);\n }\n if (this.multiple) {\n this._sortValues();\n if (isUserInput) {\n // In case the user selected the option with their mouse, we\n // want to restore focus back to the trigger, in order to\n // prevent the select keyboard controls from clashing with\n // the ones from `mat-option`.\n this.focus();\n }\n }\n }\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n this.stateChanges.next();\n }", "title": "" }, { "docid": "f9a7b908e4d24fde42e1fd81013f017b", "score": "0.5787078", "text": "_onSelect(option, isUserInput) {\n const wasSelected = this._selectionModel.isSelected(option);\n if (option.value == null && !this._multiple) {\n option.deselect();\n this._selectionModel.clear();\n if (this.value != null) {\n this._propagateChanges(option.value);\n }\n }\n else {\n if (wasSelected !== option.selected) {\n option.selected ? this._selectionModel.select(option) :\n this._selectionModel.deselect(option);\n }\n if (isUserInput) {\n this._keyManager.setActiveItem(option);\n }\n if (this.multiple) {\n this._sortValues();\n if (isUserInput) {\n // In case the user selected the option with their mouse, we\n // want to restore focus back to the trigger, in order to\n // prevent the select keyboard controls from clashing with\n // the ones from `mat-option`.\n this.focus();\n }\n }\n }\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n this.stateChanges.next();\n }", "title": "" }, { "docid": "f9a7b908e4d24fde42e1fd81013f017b", "score": "0.5787078", "text": "_onSelect(option, isUserInput) {\n const wasSelected = this._selectionModel.isSelected(option);\n if (option.value == null && !this._multiple) {\n option.deselect();\n this._selectionModel.clear();\n if (this.value != null) {\n this._propagateChanges(option.value);\n }\n }\n else {\n if (wasSelected !== option.selected) {\n option.selected ? this._selectionModel.select(option) :\n this._selectionModel.deselect(option);\n }\n if (isUserInput) {\n this._keyManager.setActiveItem(option);\n }\n if (this.multiple) {\n this._sortValues();\n if (isUserInput) {\n // In case the user selected the option with their mouse, we\n // want to restore focus back to the trigger, in order to\n // prevent the select keyboard controls from clashing with\n // the ones from `mat-option`.\n this.focus();\n }\n }\n }\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n this.stateChanges.next();\n }", "title": "" }, { "docid": "f9a7b908e4d24fde42e1fd81013f017b", "score": "0.5787078", "text": "_onSelect(option, isUserInput) {\n const wasSelected = this._selectionModel.isSelected(option);\n if (option.value == null && !this._multiple) {\n option.deselect();\n this._selectionModel.clear();\n if (this.value != null) {\n this._propagateChanges(option.value);\n }\n }\n else {\n if (wasSelected !== option.selected) {\n option.selected ? this._selectionModel.select(option) :\n this._selectionModel.deselect(option);\n }\n if (isUserInput) {\n this._keyManager.setActiveItem(option);\n }\n if (this.multiple) {\n this._sortValues();\n if (isUserInput) {\n // In case the user selected the option with their mouse, we\n // want to restore focus back to the trigger, in order to\n // prevent the select keyboard controls from clashing with\n // the ones from `mat-option`.\n this.focus();\n }\n }\n }\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n this.stateChanges.next();\n }", "title": "" }, { "docid": "d6a55fc8947522177138b87e93a1917d", "score": "0.5775808", "text": "function toggleSelect() {\n toggleSelectTask(requireCursor());\n }", "title": "" }, { "docid": "b840bba3b27b1f7f701beb59032d95a9", "score": "0.5770413", "text": "focus() {\n this.select.focus();\n }", "title": "" }, { "docid": "155b8aff1b822e187b89498ec968dfce", "score": "0.57297647", "text": "get activeOption() {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n return null;\n }", "title": "" }, { "docid": "0ac034e2e1180660fd9b1eb3d092196e", "score": "0.5726957", "text": "afterGuiAttached(){\n this.eInput.focus();\n this.eInput.select();\n }", "title": "" }, { "docid": "f3f31077b8c3a64e9e6118bf76afa16e", "score": "0.5703617", "text": "focusSelectedItem() {\n const items = this.menuItems;\n if (this.selectedIndex < 0 || this.selectedIndex > items.length) {\n // Find first visible item to focus by default.\n for (let idx = 0; idx < items.length; idx++) {\n const item = items[idx];\n if (item.hasAttribute('hidden') || item.isSeparator()) {\n continue;\n }\n // If the item is disabled we accept it, but try to find the next\n // enabled item, but keeping the first disabled item.\n if (!item.disabled) {\n this.selectedIndex = idx;\n break;\n } else if (this.selectedIndex === -1) {\n this.selectedIndex = idx;\n }\n }\n }\n\n if (this.selectedItem) {\n this.selectedItem.focus();\n this.setAttribute('aria-activedescendant', this.selectedItem.id);\n }\n }", "title": "" }, { "docid": "dea36870223ac5b6a11b7e8c25a0bada", "score": "0.5685648", "text": "_handleOpenKeydown(event) {\n const manager = this._keyManager;\n const key = event.key;\n const isArrowKey = key === \"ArrowDown\" /* ArrowDown */ || key === \"ArrowUp\" /* ArrowUp */;\n const isTyping = manager.isTyping();\n const isInputField = event.target;\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.closePanel();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n }\n else if (!isTyping && (key === \"Enter\" /* Enter */ || key === \" \" /* Space */) && manager.activeItem && !hasModifierKey(event)) {\n event.preventDefault();\n this._multiple ? manager.activeItem._selectViaInteraction() : manager.activeItem._clickViaInteraction();\n }\n else if (!isTyping && this._multiple && ['a', 'A'].includes(key) && event.ctrlKey) {\n event.preventDefault();\n const hasDeselectedOptions = this.options.some((opt) => !opt.disabled && !opt.selected);\n this.options.forEach((option) => {\n if (!option.disabled) {\n hasDeselectedOptions ? option.select() : option.deselect();\n }\n });\n }\n else if (\"Escape\" /* Escape */ === key) {\n this.closePanel();\n }\n else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n manager.onKeydown(event);\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem && manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }", "title": "" }, { "docid": "9414e27a3565b9a0dc808d10951e1738", "score": "0.568375", "text": "focusIn() {\n if (!this.get('disabled') && !this.get('focusOnlyOnKey') || !this.get('pressed')) {\n this.set('focused', true);\n }\n }", "title": "" }, { "docid": "6eb7a23d0ddc4b18f13561221605d235", "score": "0.56799924", "text": "handleInputKeyDown(name, e) {\n switch (e.keyCode) {\n // TAB\n case 9:\n // Reset the select component.\n this.setState({focused: false, active: false, value: '', focusedOption: -1});\n break;\n // UP\n case 38:\n // Focus the previous option if possible.\n if (this.state.focusedOption > 0) {\n this.setState({focusedOption: this.state.focusedOption - 1});\n }\n break;\n // DOWN\n case 40:\n // Open the options if necessary.\n if (!this.state.active) {\n this.setState({active: true});\n }\n // Focus the next option if possible.\n if (this.state.focusedOption < this.state.filteredOptions.length - 1) {\n this.setState({focusedOption: this.state.focusedOption + 1});\n }\n break;\n // ENTER\n case 13:\n // Select the focused option if possible.\n if (this.state.focusedOption != -1) {\n if (this.props.onSelectionChange) {\n if (this.props.selectedOptions) {\n this.props.onSelectionChange([...this.props.selectedOptions, this.state.filteredOptions[this.state.focusedOption]]);\n } else {\n this.props.onSelectionChange(this.state.filteredOptions[this.state.focusedOption]);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "68b2c2572612ec0374b9894de85366e2", "score": "0.565531", "text": "function selectClicked() {\n controller.selectMenu.isClicked = true;\n}", "title": "" }, { "docid": "2275e7b1fb31d742f564e4ef57b4a117", "score": "0.56478953", "text": "function choiceSelected (question, choice)\n{\n return true;\n}", "title": "" }, { "docid": "4f0c30b742f5a5c77d2be877fafd0248", "score": "0.56453174", "text": "focus () {\n // not needed\n // this.select.focus()\n }", "title": "" }, { "docid": "9db4d584505d4d86ae81bb84b53d7fc4", "score": "0.5641988", "text": "_attachInputKeyboardListener(event) {\n switch (event.keyCode) {\n case 40: // arrow down\n event.preventDefault()\n event.stopPropagation()\n const currentElement = document.activeElement\n if (!this.isSelectOpen) {\n this._openSelect()\n return\n }\n\n if (currentElement === event.target) {\n const firstElement = this.optionsList.element.querySelector('li')\n if (firstElement) {\n firstElement.focus()\n }\n }\n break\n case 13: // enter\n if (\n this.props.options.some((t) => t.label === this.input.value) ||\n this.props.blockNewEntries\n ) {\n return\n }\n\n if (this.configOptions.canAddOptions && this.input.value.trim() !== '') {\n this.optionsList.addOption(this.input.value)\n }\n break\n case 27: // esc\n if (this.isSelectOpen) {\n this._closeSelect()\n if (this._isAnySelected()) {\n this._toggleHide()\n if (this.configOptions.multiple) {\n this.isFocused = false\n } else {\n this.input.value = this._setInputValue(this.selectedOption)\n }\n }\n }\n }\n }", "title": "" }, { "docid": "b5bf269787ba66c0454552e59c0cad48", "score": "0.56322104", "text": "function selectOption(e) {\n const wrapper = e.target.parentNode.parentNode.parentNode;\n const input_search = wrapper.querySelector(\".selected-input\");\n const option = wrapper.querySelector(`select option[value=\"${e.target.dataset.value}\"]`);\n\n option.setAttribute(\"selected\", \"\");\n createToken(wrapper, e.target.dataset.value);\n if (input_search.value) {\n input_search.value = \"\";\n }\n\n input_search.focus();\n\n e.target.remove();\n const autocomplete_list = wrapper.querySelector(\".autocomplete-list\");\n\n\n if (!autocomplete_list.children.length) {\n const li = document.createElement(\"li\");\n li.classList.add(\"not-cursor\");\n li.innerText = \"No options found\";\n autocomplete_list.appendChild(li);\n }\n\n const event = new Event('keyup');\n input_search.dispatchEvent(event);\n e.stopPropagation();\n}", "title": "" }, { "docid": "49c99e395a69b0757767790e9667678c", "score": "0.56208766", "text": "function itemSelect(selectedItem) {\n itemFocus(selectedItem);\n }", "title": "" }, { "docid": "6f2097188440ef39a839b8e21cab71ee", "score": "0.5619729", "text": "function startOption() {\n\t\t$('.choice').click(function(){\n\t\t\tteamSelection = true;\n\t\t\toption = $(this).attr('value');\n\t\t\tif (option === \"1\") {\n\t\t\t\tplayer = \"x\";\n\t\t\t\t$(\"#xSquared\").addClass(\"choice-selected\");\n\t\t\t\t$(\"#oSquared\").removeClass(\"choice-selected\");\n\n\t\t\t} else {\n\t\t\t\tplayer = \"o\";\n\t\t\t\t$(\"#oSquared\").addClass(\"choice-selected\");\n\t\t\t\t$(\"#xSquared\").removeClass(\"choice-selected\");\n\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "0a00559fb8808a58ae8fdf1c21df3596", "score": "0.56156117", "text": "_resetActiveItem() {\n const autocomplete = this.autocomplete;\n if (autocomplete.autoActiveFirstOption) {\n // Note that we go through `setFirstItemActive`, rather than `setActiveItem(0)`, because\n // the former will find the next enabled option, if the first one is disabled.\n autocomplete._keyManager.setFirstItemActive();\n } else {\n autocomplete._keyManager.setActiveItem(-1);\n }\n }", "title": "" }, { "docid": "49de48a583d1549b1c053ccc045117d9", "score": "0.559094", "text": "function FocusOptions() { }", "title": "" }, { "docid": "3457942b287bc6955d855d72b26be12c", "score": "0.55812997", "text": "resetDropdownOption(controller, option) {\n controller.set(option, !controller.get(option));\n if (controller.get(option)) {\n Ember.$(document).on('mousedown.useroptions', (e) => {\n if (Ember.$(e.target).prop('tagName') === 'INPUT') {\n return;\n }\n Ember.run.later(() => {\n controller.set(option, false);\n }, 150);\n Ember.$(document).off('mousedown.useroptions');\n });\n }\n }", "title": "" }, { "docid": "ca684ea0b79895a125eee092db482af3", "score": "0.5580999", "text": "_setSelectionByValue(value) {\n if (this.multiple && value) {\n if (!Array.isArray(value)) {\n throw getMatSelectNonArrayValueError();\n }\n this._selectionModel.clear();\n value.forEach((currentValue) => this._selectValue(currentValue));\n this._sortValues();\n }\n else {\n this._selectionModel.clear();\n const correspondingOption = this._selectValue(value);\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what option the user interacted with last.\n if (correspondingOption) {\n this._keyManager.setActiveItem(correspondingOption);\n }\n else if (!this.panelOpen) {\n // Otherwise reset the highlighted option. Note that we only want to do this while\n // closed, because doing it while open can shift the user's focus unnecessarily.\n this._keyManager.setActiveItem(-1);\n }\n }\n this._changeDetectorRef.markForCheck();\n }", "title": "" }, { "docid": "6cc91eee4f35817b553a642560a9d9d6", "score": "0.5580407", "text": "function valifySelection() {\n if ($('i').hasClass('icon-check')) {\n \tvalidateChoice();\n generateAnwserComment();\n changeButton('submit', 'next');\n } else {\n alert('Please select your anwser.');\n }\n }", "title": "" }, { "docid": "e115640ef26dd4aba9e876cd6d79aa6f", "score": "0.5580295", "text": "isOptionSelected(option) {\n return option.selected;\n }", "title": "" }, { "docid": "e05ce6e95445edafb98ccbe6d10bccfc", "score": "0.55640143", "text": "function escDown() {\n\n if (!User.stateIsDefault()) {\n if (User.stateIsPick())\n GUIControlKit.togglePickColor()\n User.setDefaultState()\n }\n\n }", "title": "" }, { "docid": "e712644ae862cec7c7af6862b0a55c50", "score": "0.5561277", "text": "function activateOptions(choice) {\r\n\t\t\t$('#valSelect').change(function() {\r\n\t\t\t\tdoQuery(this.value, choice);\r\n\t\t\t});\r\n\t\t\tvar mapClick = view.on(\"click\", function(evt){getCounty(evt.mapPoint, choice)});\r\n\t\t}", "title": "" }, { "docid": "4c872c6af1724812e13547feb42a0988", "score": "0.55590874", "text": "function OptionInput () {}", "title": "" }, { "docid": "d6a5667bc2ec99c5cb3ddfbc592a47c3", "score": "0.5552944", "text": "function keyDownOption(e) {\n\tswitch (e.key) {\n\t\tcase \"ArrowLeft\":\n\t\t\tgoBeforeDay();\n\t\t\tbreak;\n\t\tcase \"ArrowRight\":\n\t\t\tgoNextDay();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "60b40b6adb3c6d743338ee6399219b3a", "score": "0.5552159", "text": "focus() {\n\t\tthis[MENU_BUTTON].isFocused(true);\n\t}", "title": "" }, { "docid": "8c48bde98a8b2fad18380e4f505c7845", "score": "0.5551618", "text": "'x-effect'() {\n this.$comboboxOption.isActive\n ? el.setAttribute('aria-selected', true)\n : el.removeAttribute('aria-selected')\n }", "title": "" }, { "docid": "8ade507e3892d481aa777592f1def317", "score": "0.5543889", "text": "get _shouldUpdateSelection(){return null!=this.selected}", "title": "" }, { "docid": "2c37e09cbef1fd009f804a3efc8ed4a3", "score": "0.55394185", "text": "function selectKeyed(e)\n{\n var theEvent;\n var keyCodeTab = \"9\";\n var keyCodeEnter = \"13\";\n var keyCodeEsc = \"27\";\n \n if (e)\n {\n theEvent = e;\n }\n else\n {\n theEvent = event;\n }\n \n if ((theEvent.keyCode == keyCodeEnter || theEvent.keyCode == keyCodeTab) && this.value != this.initValue)\n {\n this.changed = true;\n selectChanged(this);\n }\n else if (theEvent.keyCode == keyCodeEsc)\n {\n this.value = this.initValue;\n }\n else\n {\n this.changed = false;\n }\n \n return true;\n}", "title": "" }, { "docid": "099dea45ff24db5bdf58d9ac0254d707", "score": "0.5538768", "text": "_resetActiveItem() {\n const autocomplete = this.autocomplete;\n if (autocomplete.autoActiveFirstOption) {\n // Note that we go through `setFirstItemActive`, rather than `setActiveItem(0)`, because\n // the former will find the next enabled option, if the first one is disabled.\n autocomplete._keyManager.setFirstItemActive();\n }\n else {\n autocomplete._keyManager.setActiveItem(-1);\n }\n }", "title": "" }, { "docid": "cc82d15db63ad9f9a7af32f35636f65f", "score": "0.55243015", "text": "_setValueAndClose(event) {\n const toSelect = event ? event.source : this._pendingAutoselectedOption;\n if (toSelect) {\n this._clearPreviousSelectedOption(toSelect);\n this._assignOptionValue(toSelect.value);\n this._onChange(toSelect.value);\n this.autocomplete._emitSelectEvent(toSelect);\n this._element.nativeElement.focus();\n }\n this.closePanel();\n }", "title": "" }, { "docid": "dafa6dfd312a2e4bc5ac9c5a7d2b3478", "score": "0.5523841", "text": "selectChoice() {\n if (textStateFP2 === 2) {\n textStateFP2 = textStateFP2 + 1;\n friend.dialogue2.play();\n }\n }", "title": "" }, { "docid": "f96d7522d145d91c0da1b08738483460", "score": "0.5523285", "text": "autoCompleteFocus_() {\n if (!this.receivedUserInput_) {\n this.activateFocus_();\n }\n }", "title": "" }, { "docid": "eb8b320cd30da81ef81ac23189b824fb", "score": "0.5518769", "text": "function onOptionClick(e) {\n\n\t\tif(e) e.stopImmediatePropagation();\n\t\tjQuery('.help-input-focus').removeClass('help-input-focus');\n\n\t\tvar $this = jQuery(this),\n\t\t\tmodal = $this.attr('data-modal'),\n\t\t\tactions = modal && modal === 'actions',\n\t\t\tdependencies = $this.attr('data-dependencies');\n\n\t\t/*\n\t\t\tfor non-actions, dependencies need to be checked first\n\t\t\tfor actions, dependencies need to be checked last\n\t\t*/\n\n\t\t// check dependencies\n\t\tif(!actions && dependencies && checkDependencies(dependencies)) return;\n\n\t\tvar dataMenu = $this.attr('data-menu'),\n\t\t\tdataFocus = $this.attr('data-focus'),\n\t\t\tdataScroll = $this.attr('data-scrollto');\n\n\t\t// close any open modals\n\t\tif(!modal) jQuery.each(closeModals, modalClose);\n\n\t\t// open menu items\n\t\tif(dataMenu) openMenus(dataMenu);\n\n\t\t// highlight option\n\t\tif(dataFocus) focusElement(dataFocus);\n\n\t\t// scroll to option\n\t\tif(dataScroll) scrollElement(dataScroll);\n\n\t\t// check dependencies\n\t\tif(actions && dependencies) checkDependencies(dependencies);\n\n\t}", "title": "" }, { "docid": "c25e41eed8d9373eab87f54eb2d4ae4c", "score": "0.5512456", "text": "onKeyDown(event) {\n if (this.active) {\n // Prevent Scrolling\n event.preventDefault();\n // Close popup on escape key\n if (event.keyCode === KeyCodes.ESC) {\n this.toggleActive();\n return;\n }\n if (event.keyCode === KeyCodes.ENTER) {\n this.select(this.options[this.selectedIndex], this.selectedIndex);\n this.toggleActive();\n return;\n }\n\n if (event.keyCode === KeyCodes.UP && this.selectedIndex > 0) {\n this.selectedIndex--;\n this.select(this.options[this.selectedIndex], this.selectedIndex);\n this.scrollToSelected();\n } else if (event.keyCode === KeyCodes.DOWN && this.selectedIndex < this.options.length - 1) {\n this.selectedIndex++;\n this.select(this.options[this.selectedIndex], this.selectedIndex);\n this.scrollToSelected();\n } else if (event.keyCode >= 65 && event.keyCode <= 90) {\n let char = String.fromCharCode(event.keyCode);\n let element = this.element.nativeElement;\n let list = element.querySelector('.novo-select-list');\n let item = element.querySelector(`[data-automation-value^=${char}]`);\n if (item) {\n list.scrollTop = item.offsetTop;\n }\n }\n }\n }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "58cfc74890902aa2999c4bed577344ad", "score": "0.5511225", "text": "get selected() { return this._selected; }", "title": "" }, { "docid": "6b66b4a4b43065cdea994a0da18b60bc", "score": "0.55079144", "text": "selectFocused() {\n this._focusedField.selectItem();\n }", "title": "" }, { "docid": "d665a1a395b4c7ee4696bfb0812a51c4", "score": "0.55058545", "text": "selectViaInteraction() {\n if (!this._selected) {\n this._selected = true;\n this._dispatchSelectionChange(true);\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "5d026d84d0bb6d21ad37af599246e318", "score": "0.5500799", "text": "keyDown(event) {\n if (event.code === KEY_LEFT || event.code === KEY_UP) {\n event.preventDefault();\n if (this.selectedItem <= 0) {\n this.selectedItem = 4;\n } else {\n this.selectedItem--;\n }\n this.focusOnSelectedItem();\n } else if (event.code === KEY_RIGHT || event.code === KEY_DOWN) {\n event.preventDefault();\n if (this.selectedItem >= 4) {\n this.selectedItem = 0;\n } else {\n this.selectedItem++;\n }\n this.focusOnSelectedItem();\n }\n }", "title": "" }, { "docid": "ca837326bee06b35a7e22bf476c1c050", "score": "0.5491809", "text": "focus() {\n this.dropdown.focus();\n }", "title": "" }, { "docid": "c1ab7c35758b7d34db07afe625af401d", "score": "0.549074", "text": "_handleOpenKeydown(event) {\n const manager = this._keyManager;\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"DOWN_ARROW\"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"UP_ARROW\"];\n const isTyping = manager.isTyping();\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n }\n else if (!isTyping && (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"ENTER\"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"SPACE\"]) && manager.activeItem &&\n !Object(_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"hasModifierKey\"])(event)) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n }\n else if (!isTyping && this._multiple && keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"A\"] && event.ctrlKey) {\n event.preventDefault();\n const hasDeselectedOptions = this.options.some(opt => !opt.disabled && !opt.selected);\n this.options.forEach(option => {\n if (!option.disabled) {\n hasDeselectedOptions ? option.select() : option.deselect();\n }\n });\n }\n else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n manager.onKeydown(event);\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }", "title": "" }, { "docid": "c1ab7c35758b7d34db07afe625af401d", "score": "0.549074", "text": "_handleOpenKeydown(event) {\n const manager = this._keyManager;\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"DOWN_ARROW\"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"UP_ARROW\"];\n const isTyping = manager.isTyping();\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n }\n else if (!isTyping && (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"ENTER\"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"SPACE\"]) && manager.activeItem &&\n !Object(_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"hasModifierKey\"])(event)) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n }\n else if (!isTyping && this._multiple && keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"A\"] && event.ctrlKey) {\n event.preventDefault();\n const hasDeselectedOptions = this.options.some(opt => !opt.disabled && !opt.selected);\n this.options.forEach(option => {\n if (!option.disabled) {\n hasDeselectedOptions ? option.select() : option.deselect();\n }\n });\n }\n else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n manager.onKeydown(event);\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }", "title": "" }, { "docid": "c1ab7c35758b7d34db07afe625af401d", "score": "0.549074", "text": "_handleOpenKeydown(event) {\n const manager = this._keyManager;\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"DOWN_ARROW\"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"UP_ARROW\"];\n const isTyping = manager.isTyping();\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n }\n else if (!isTyping && (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"ENTER\"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"SPACE\"]) && manager.activeItem &&\n !Object(_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"hasModifierKey\"])(event)) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n }\n else if (!isTyping && this._multiple && keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__[\"A\"] && event.ctrlKey) {\n event.preventDefault();\n const hasDeselectedOptions = this.options.some(opt => !opt.disabled && !opt.selected);\n this.options.forEach(option => {\n if (!option.disabled) {\n hasDeselectedOptions ? option.select() : option.deselect();\n }\n });\n }\n else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n manager.onKeydown(event);\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }", "title": "" }, { "docid": "c5e5e125566a4fbfaf6c12c51e357125", "score": "0.5484233", "text": "updateSelection() {\n this.__selectionContents = this._getSelectedBlock() || this.__selection;\n this.setRange();\n this.toggled = !this.__prompt.value;\n this.commandVal = this.__prompt.value;\n this.execCommand();\n }", "title": "" }, { "docid": "81148cdcf70d515f695f236ece981a02", "score": "0.54802734", "text": "function selectOption($fauxOption){\n\t\t\t\t\tvar index = $fauxOption.index(),\n\t\t\t\t\t\ttext = $fauxOption.text();\n\n\t\t\t\t\t// Change selected item on the select menu\n\t\t\t\t\to.dom.$elOptions.prop('selected', false)\n\t\t\t\t\t\t.eq(index).prop('selected', true);\n\n\t\t\t\t\t// Force the default element change event to fire\n\t\t\t\t\t// This is for consistency with the defaultDropdown option\n\t\t\t\t\to.dom.$el.change();\n\t\t\t\t}", "title": "" }, { "docid": "f609a61573c7b9db95b2e2a7839dbe84", "score": "0.5479325", "text": "function setActiveFirstOption() {\n var firstItem = elem.querySelector('[role=\"option\"]');\n if (firstItem) {\n setActiveOption(firstItem);\n }\n }", "title": "" }, { "docid": "2112596b1d1d8191d3167688e037d326", "score": "0.5470316", "text": "_handleOpenKeydown(event) {\n const manager = this._keyManager;\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_16__.DOWN_ARROW || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_16__.UP_ARROW;\n const isTyping = manager.isTyping();\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n }\n else if (!isTyping && (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_16__.ENTER || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_16__.SPACE) && manager.activeItem &&\n !(0,_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_16__.hasModifierKey)(event)) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n }\n else if (!isTyping && this._multiple && keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_16__.A && event.ctrlKey) {\n event.preventDefault();\n const hasDeselectedOptions = this.options.some(opt => !opt.disabled && !opt.selected);\n this.options.forEach(option => {\n if (!option.disabled) {\n hasDeselectedOptions ? option.select() : option.deselect();\n }\n });\n }\n else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n manager.onKeydown(event);\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }", "title": "" }, { "docid": "fbf31d9b301d434f0131b5f42ff9b9f7", "score": "0.5464209", "text": "singleSelectOptionClick(e, item) {\n this.internalOptions = this.internalOptions.map((x) => {\n if (item.label === x.label) {\n x.selected = true;\n } else {\n x.selected = false;\n }\n return x;\n });\n\n if (this.hideByItemClick) {\n this.toggleDropdown();\n }\n\n if (this.isInput) {\n this.setInputValue();\n }\n\n // 使用户传入的v-model 生效\n this.$emit(\"input\", this.internalOptions);\n\n this.$emit(EMIT_EVENTS.ITEM_SELECT_CHANGE, this.internalOptions);\n }", "title": "" }, { "docid": "8c6b8ec397fe74e37f07daeb71d307a0", "score": "0.5463027", "text": "function reselect() {\n if (selectedItem) {\n selectedItem.select();\n }\n }", "title": "" } ]
915d2b23fdd85565b9fb7facd1146f01
Removes the response from the state
[ { "docid": "181867c9838f8d37a6e49f0bf341ece9", "score": "0.74480516", "text": "clearResponse() {\n this.setState({\n response: null,\n });\n }", "title": "" } ]
[ { "docid": "c855a37203f77ad06ed9ce78f9d839e5", "score": "0.6818856", "text": "clearResponses() {\n this.responses.splice(0);\n }", "title": "" }, { "docid": "8cbbde03a7e950c21f59e888b7030213", "score": "0.67398673", "text": "reset() {\n this.stub.resetHistory();\n this.responses.splice(0);\n }", "title": "" }, { "docid": "9e7efd922ee9e505409cf7d96605a2a8", "score": "0.61184895", "text": "endPreFlight(response) {\n response.status(204).send(null);\n }", "title": "" }, { "docid": "0bd33baebb92fbde258c85e79e84080d", "score": "0.6070808", "text": "onCancel(request) {\n let requestsSent = this.state.requestsSent;\n let index = requestsSent.indexOf(request);\n requestsSent.splice(index, 1);\n this.setState({ requestsSent });\n }", "title": "" }, { "docid": "a9363acf4a80ae467809e1e237df9c75", "score": "0.6061404", "text": "removeState(k){\n delete this.states[k];\n }", "title": "" }, { "docid": "733717641f9d991ba24e96b981463ee6", "score": "0.60385936", "text": "removeResource(subject, resource){\n let tempState = this.state\n tempState.resources[subject].resources.splice(resource, 1)\n this.setState(tempState)\n }", "title": "" }, { "docid": "bcec554c21cd8adf8b4a083dc23fa223", "score": "0.6037888", "text": "removeSubject(resources){\n let tempState = this.state\n tempState.resources.splice(1, 1)\n this.setState(tempState)\n }", "title": "" }, { "docid": "b8ed5b8c1e22f4f6fc0bcaa349725c9b", "score": "0.6014424", "text": "function clearResponse() {\r\n document.getElementById('response').innerHTML = '';\r\n document.getElementById('responseCode').innerHTML ='';\r\n\r\n}", "title": "" }, { "docid": "c0daad79be71f8c21cbcdbc31a7bafb9", "score": "0.5990201", "text": "async onStop(){\r\n this.options = [];\r\n this._latestResponse = null;\r\n this.responses.splice(0, this.responses.length);\r\n }", "title": "" }, { "docid": "0be76405b53179126a1fb4372e39a6b6", "score": "0.5923366", "text": "handleRemoveInstallationResponse() {\n cartEventBus.$emit('cart-update');\n this.$refs.removeInstallationModal.close();\n this.$refs.spinner.hideSpinner();\n this.installable.isInstalled = false;\n }", "title": "" }, { "docid": "be8958600bf60628f821e9092d61d0f7", "score": "0.5910525", "text": "unfollow() {\n axios.delete('interactions/follow', {\n params: {\n username: this.props.userName\n }\n }).then((response) => {\n this.setState({\n following: false,\n });\n })\n .catch((error) => {\n });\n }", "title": "" }, { "docid": "f79e684cb0828a94faa80e0dbd7b75f9", "score": "0.5884497", "text": "function removeMapping(state) {\n\t modalMap[state] = null;\n\t promiseMap[state] = null;\n\t }", "title": "" }, { "docid": "3ae380646a108a3bceb7a33bb669961c", "score": "0.5882059", "text": "emptyPantry() {\n fetch(`http://localhost:8080/${this.props.userID}/ingredients`, {\n method: 'DELETE',\n })\n .then(async response => {\n let data = await response.text();\n if(!response.ok) {\n let err = data;\n return Promise.reject(err);\n }\n this.setState({\n action: data,\n error: null,\n pantryChanged: true,\n });\n })\n .catch(err => {\n this.setState({\n error: err,\n });\n });\n }", "title": "" }, { "docid": "3d6c3d3e74304c2f6eb59787baa900bc", "score": "0.586804", "text": "function removeProblem()\n\t{\n\t\tstate.set({skip: true});\n\t}", "title": "" }, { "docid": "6d1f8ec0514bd71242af55191cebfca4", "score": "0.5820413", "text": "clearState() {\n Object.keys(this.eventTypes).forEach(event => {\n let action = { data: null, type: event, ignore: true }\n this.dispatch(action);\n });\n\n }", "title": "" }, { "docid": "b8eb05f4875c576ef92f57e2340a86e1", "score": "0.5803447", "text": "clear() {\n this.responsePromise_ = null;\n this.positiveRetries_ = 0;\n this.unblockNextNotification();\n this.storage_.remove(ENTS_STORAGE_KEY);\n this.storage_.remove(TOAST_STORAGE_KEY);\n this.storage_.remove(IS_READY_TO_PAY_STORAGE_KEY);\n }", "title": "" }, { "docid": "8d34c2ea1705e34048f978c418aa6291", "score": "0.57541335", "text": "async removeQuestion(surveyId, id) {\n console.log(\"Remove question: \" + id);\n console.log(...this.state.questions);\n // Get the survey id in question\n // => thing is basically like doing lambdas\n await fetch(\n `/api/surveys/${surveyId}/questions/${id}`,\n {\n method: 'DELETE',\n headers: {\n 'Accept' : 'application/json',\n 'Content-Type': 'application/json',\n 'Authorization': localStorage.getItem(\"bearer\")\n }\n }).then(() => {\n let updatedQuestions = [...this.state.questions].filter(i => i.id !== id);\n this.setState({questions: updatedQuestions})\n });\n }", "title": "" }, { "docid": "7d8c8dbbf9d6e6b30c2a6e9cf03c6c11", "score": "0.5753655", "text": "async remove(id) {\n await fetch('/api/expenses/${id}' , {\n method : 'DELETE' ,\n headers : {\n 'Accept' : 'application/json',\n 'Content-Type' : 'application/json'\n }\n\n }).then( () => {\n\n let updatedExpenses = [...this.state.Expenses].filter(i => i.id !== id);\n this.setState({Expenses : updatedExpenses});\n\n });\n\n }", "title": "" }, { "docid": "eb8d0fcf9f0f7c1e25354ec05f4283c6", "score": "0.575136", "text": "function clearReq() \n{\n myKey = null;\n myReq = null;\n myStorage.clear();\n //TODO: clear all responses\n}", "title": "" }, { "docid": "9dcbcc8e9f645b09b1baa7fd3836dd7e", "score": "0.574165", "text": "_stopDispatching() {\n delete this._pendingPayload;\n }", "title": "" }, { "docid": "a1f05a496770813da2a6cf7c1885c540", "score": "0.5725616", "text": "async clearState() {\n return (chatId => {\n window.WWebJS.sendChatstate('stop', chatId);\n return true;\n })(this.id._serialized);\n }", "title": "" }, { "docid": "e901203d0229f9f679428d5ff37a7425", "score": "0.5709898", "text": "clearQuestion(state, action) {\n state.count = 0;\n state.data = [];\n }", "title": "" }, { "docid": "a96af9e01c190f1b3c198759ca92e5e6", "score": "0.5698986", "text": "unsubscribe()\n {\n this.rpc.unsubscribe();\n }", "title": "" }, { "docid": "c34ad26fd0c9c116d56a40016be15491", "score": "0.56938297", "text": "function cancelInterview(id){\n\n const appointment = {\n ...state.appointments[id],\n interview: null \n };\n const appointments = {\n ...state.appointments,\n [id]: appointment\n };\n \n const days = updateSpots(state.day, state.days, appointments)\n\n return axios.delete(`http://localhost:8001/api/appointments/${id}`, { interview: null })\n .then((response)=>{\n console.log(response)\n setState({\n ...state,\n days,\n appointments\n })\n \n })\n \n \n \n\n\n \n \n }", "title": "" }, { "docid": "6ed88eb5e56da365a2c0513d053abe81", "score": "0.56894255", "text": "function afterResponse() {\n res.removeListener('finish', afterResponse);\n res.removeListener('close', afterResponse);\n\n //***\n //*** TEAR-DOWN Logic\n //***\n\n // log probe of exiting request\n logFlow.info(()=>'Exit Transaction');\n }", "title": "" }, { "docid": "b69e49b86ec2be51dcd4ed7b5a7f7c98", "score": "0.5682392", "text": "reset() {\n if (this.state.transcriptionType) {\n this.stopTranscription();\n }\n this.setState({ transcriptionResponse: [], error: null });\n }", "title": "" }, { "docid": "0c663c0369989e5bd060752a6de0443d", "score": "0.56781644", "text": "removeQuiz(state,payload){\n state.quizzes = state.quizzes.filter(quiz => quiz._id != payload)\n }", "title": "" }, { "docid": "35fc7022df08b3f6570ca07cf186be51", "score": "0.5676794", "text": "removeState(label) {\n const state = this.getState(label);\n if (state) {\n state.remove();\n return this;\n }\n else {\n throw new Error(`State container does not have a state with label ${label}`);\n }\n }", "title": "" }, { "docid": "bad566d6abb218098fd2bc7e54f31890", "score": "0.56701225", "text": "cancel(response) {\n if (this.isSubscription) {\n const r = {};\n if (typeof response === 'object' && response !== null) {\n for (const k of Object.keys(response)) {\n r[k] = response[k];\n }\n } else if (response !== undefined) {\n throw new Error('response must be an object');\n }\n r.subscribed = false;\n this.respond(r);\n }\n }", "title": "" }, { "docid": "4081b407b7c0b734c9fef294f74305bf", "score": "0.5646248", "text": "clearState() {\n // log(\"flux-state:Store:clearState\");\n this.events.forEach(event => event.value = null);\n }", "title": "" }, { "docid": "de0a488a0443bbd45be5dec8c4c78533", "score": "0.56450677", "text": "abort() {\n this.remove(0, Infinity);\n this.updating = false;\n this.readyState = \"closed\";\n this._abort();\n }", "title": "" }, { "docid": "362c643efc72ca5faf06f815ed5216fb", "score": "0.5620714", "text": "removeIngredient(id) {\n fetch(`http://localhost:8080/${this.props.userID}/ingredients/${id}`, {\n method: \"DELETE\",\n })\n .then(async response => {\n let data = await response.text();\n if(!response.ok) {\n let err = data;\n return Promise.reject(err);\n }\n this.setState({\n action: data,\n error: null,\n pantryChanged: true,\n });\n })\n .catch(err => {\n this.setState({\n error: err,\n });\n });\n }", "title": "" }, { "docid": "f4e93715d06acec162e7c2df0aa83fe5", "score": "0.5606601", "text": "removeFriend(state, payload) {\n state.friendsList.splice(payload.index, 1)\n }", "title": "" }, { "docid": "323c08b9e475ce3e2aea8e9cdb79a635", "score": "0.5593426", "text": "componentWillUnmount (){\n \taxios.interceptors.request.eject(this.intReq);\n \taxios.interceptors.response.eject(this.intRes);\n }", "title": "" }, { "docid": "0458e0ab3c36f3a975b68a064c136275", "score": "0.5591139", "text": "componentWillUnmount(){\n axios.interceptors.request.eject(this.reqInter);\n axios.interceptors.request.eject(this.resInter);\n }", "title": "" }, { "docid": "38b1fd78ea2317dd8ff87f52e2612ab3", "score": "0.55874294", "text": "logout(state){\n state.status = ''\n state.token = ''\n state.user = {}\n }", "title": "" }, { "docid": "855de4cb33d844b1d941edd9002e03e5", "score": "0.5586864", "text": "REMOVE_AC(state) {\n state.autoComplete = null;\n }", "title": "" }, { "docid": "31e4fc879860de8285ab2f762ed346e3", "score": "0.55848783", "text": "function processResponse(response) {\n if(response.status == 200) {\n removeUser(id)\n } else {\n // TO DO 4 - start\n\t\t\t\t\t//Rodrigo - begin\n\t\t\t\t\tlet body = await response.json();\n\t\t\t\t\tshowErrorStatus(body.description);\n\t\t\t\t\t//Rodrigo - end\n showErrorStatus(response.status);\n // TO DO 4 - end\n }\n }", "title": "" }, { "docid": "8d6b525a50cbc9c1fb9f2ac324174532", "score": "0.5570432", "text": "mut_logout(state){\n state.idToken = null;\n state.userId = null;\n\n // remove local token\n localStorage.removeItem('token');\n localStorage.removeItem('userId');\n }", "title": "" }, { "docid": "563e886b69be34d0b61b8a350a56063b", "score": "0.55696243", "text": "CLEAR_DATA(state) {\n state.idToken = null;\n state.uerId = null;\n }", "title": "" }, { "docid": "701d7e75c732621138004b9e43923578", "score": "0.55658776", "text": "removeOutput(name) {\r\n delete this.clientModel.outs[name];\r\n this.sendClientInfo();\r\n }", "title": "" }, { "docid": "78c98eba07cc79f2974c34a01aa85ef7", "score": "0.55559844", "text": "delete({ address }, res) {\n\t\taddresses.splice(addresses.indexOf(address), 1);\n\t\tres.sendStatus(204);\n\t}", "title": "" }, { "docid": "bb8ec38cab174df942cb736a8f09ec82", "score": "0.5542401", "text": "removeToken(state, msg){\n state.token = null;\n\n if(msg) state.tokenErr = msg;\n }", "title": "" }, { "docid": "ac5e7bcf1b6672c0f2284434328aefa4", "score": "0.55414444", "text": "handleResponse(requestNum,data){this.pendingResponses[requestNum]=data;while(this.pendingResponses[this.currentResponseNum]){const toProcess=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let i=0;i<toProcess.length;++i){if(toProcess[i]){exceptionGuard(()=>{this.onMessage_(toProcess[i]);});}}if(this.currentResponseNum===this.closeAfterResponse){if(this.onClose){this.onClose();this.onClose=null;}break;}this.currentResponseNum++;}}", "title": "" }, { "docid": "c0cc7cdcaacc30fcf235c6594c6baa3f", "score": "0.5540709", "text": "resetFailure () {\n this._responseHandler._resetFailure()\n }", "title": "" }, { "docid": "c342f04d8a7911854b051d024b99158d", "score": "0.552562", "text": "componentWillUnmount() {\n axios.interceptors.request.eject(this.reqInterceptor);\n axios.interceptors.response.eject(this.resInterceptor);\n }", "title": "" }, { "docid": "c342f04d8a7911854b051d024b99158d", "score": "0.552562", "text": "componentWillUnmount() {\n axios.interceptors.request.eject(this.reqInterceptor);\n axios.interceptors.response.eject(this.resInterceptor);\n }", "title": "" }, { "docid": "f254033598ec1822a8f033f28cc7379d", "score": "0.552542", "text": "function destroy(state, payload) {\n var entity = payload.entity;\n var where = payload.where;\n var result = payload.result;\n result.data = (new Query(state, entity)).delete(where);\n}", "title": "" }, { "docid": "dbc6a8428909d444385701b1ec0cb348", "score": "0.5521919", "text": "drop() {\n assert(this.pending);\n this.pending = null;\n }", "title": "" }, { "docid": "0307a96018b5198c5d6627055cc95ba7", "score": "0.5516759", "text": "reset() {\n this.set('_state', '');\n }", "title": "" }, { "docid": "7a2a9a264fab5656c043252a5a9ad58d", "score": "0.55149776", "text": "clearToken(state) {\n state.token = null;\n }", "title": "" }, { "docid": "8f3921d1b6f3a4ddb2b672d3db10d982", "score": "0.54974115", "text": "clearState(key) {\n const action = {\n type: apiTypes.CLEAR_API_STATE,\n payload: { key },\n };\n\n return action;\n }", "title": "" }, { "docid": "f0bc32a6ff7c78312d284fd220626e5a", "score": "0.5493989", "text": "componentWillUnmount () {\n axios.interceptors.request.eject(this.reqInterceptor);\n axios.interceptors.response.eject(this.resInterceptor);\n }", "title": "" }, { "docid": "192ce39e6a3a42165eb2bdfb07cf3c65", "score": "0.549013", "text": "function clear() {\n $log.debug(\"send-flow-state clear()\");\n\n clearCurrent();\n service.previousStates = [];\n }", "title": "" }, { "docid": "52e0c79368910adf8fa0daae14d43b94", "score": "0.54874176", "text": "clearData() {\n\t\tfetch(FINANCEAPI, {\n\t\t\tmethod: 'delete'\n\t\t})\n\t\t\t.then(() => {\n\t\t\t\tthis.setState({ finances: [] })\n\t\t\t})\n\t}", "title": "" }, { "docid": "e10f174a69b78ddacfa7948544a8556a", "score": "0.5479748", "text": "_stopDispatching(): void {\n delete this._pendingPayload;\n this._isDispatching = false;\n }", "title": "" }, { "docid": "af25fc7f2307cdfe8b838b7fa0345e12", "score": "0.547646", "text": "componentWillUnmount() {\n axios.interceptors.request.eject(this.reqInterceptor);\n axios.interceptors.response.eject(this.resInterceptor);\n }", "title": "" }, { "docid": "bed354dfc72fe3e9c1f25b8467b6835e", "score": "0.547148", "text": "[\"REMOVE_CONFIRMATION\" /* serverRemoveConfirm */](state, payload) {\n const transactionId = payload.transactionId;\n const localOnly = Object.assign({}, state.localOnly);\n delete localOnly[transactionId];\n Vue.set(state, \"localOnly\", localOnly);\n }", "title": "" }, { "docid": "cdb5f57aa43520ada83da5699985e9f3", "score": "0.5458248", "text": "handleEResourceRemoved(eResourceId) {\n const { entitlementsWithIds } = this.state;\n const newState = cloneDeep(entitlementsWithIds);\n delete newState[eResourceId];\n\n // eslint-disable-next-line react/no-unused-state\n this.setState({ entitlementsWithIds: newState, eResourceId: '' });\n }", "title": "" }, { "docid": "9bea0a37ed34c6d9e40551c097067934", "score": "0.5457549", "text": "_popRequest(id) {\n\n // if a request was sent with an id that I don't know about.\n\n if(!this._requests.hasOwnProperty(id)) {\n console.error(`Event with the id ${id} was returned twice, or the server did not send back an ID!`);\n }\n\n const request = this._requests[id];\n delete this._requests[id];\n return request;\n\n }", "title": "" }, { "docid": "026b3225e00e4fb4466844b3a35b6e9c", "score": "0.54532355", "text": "function unSetHistory(){\n console.log(\"unsetHistory\");\n socket.off('getHistory')\n }", "title": "" }, { "docid": "106d2daa8a17ab0468539696cca3611d", "score": "0.5446136", "text": "componentWillUnmount() {\n\t\t\taxios.interceptors.request.eject(this.reqInterceptor);\n\t\t\taxios.interceptors.request.eject(this.resInterceptor);\n\t\t}", "title": "" }, { "docid": "3ca76c7c2657e3cbeaf470054284164a", "score": "0.5431851", "text": "clearSlip(state) {\n state.betSlip = [];\n }", "title": "" }, { "docid": "80b5deb40b48a04b14aa3024a570faee", "score": "0.54288375", "text": "handleRemoveClick(title){\n let data = this.state;\n delete data.notes[title];\n this.setState(data);\n this.updateAsyncStorage();\n }", "title": "" }, { "docid": "760d8beed286cc48d95db3579674cec0", "score": "0.5423416", "text": "discard() {\n this._states.forEach(state => {\n state.discard();\n });\n\n this._transitionState.discard();\n this._promises.weight.cancel();\n\n delete this._states;\n delete this._transitionState;\n delete this._promises;\n }", "title": "" }, { "docid": "bd9f8306c0da1dd664479756c9c35098", "score": "0.5422314", "text": "@action removeCurrentFlight() {\n this.currentFlightData = {}\n }", "title": "" }, { "docid": "bfb64a918dd1babb149c325091080603", "score": "0.54141164", "text": "resetState() {}", "title": "" }, { "docid": "57a9223c325c5079e176eef7d44e0218", "score": "0.541232", "text": "async destroy({\n params,\n request,\n response\n }) {}", "title": "" }, { "docid": "7272ea53cb7a5898b142d626602847a2", "score": "0.5411338", "text": "handleRemove(event) {\n console.log(\"handle remove\");\n console.log(this.state);\n var li = this.state.items;\n if (li[event.idx].type == \"bot\") {\n this.state.numBots--;\n }\n console.log(\"type: \" + li[event.idx].type);\n console.log(\"numBot: \" + this.state.numBots);\n li.splice(event.idx, 1);\n this.setState({items: li});\n }", "title": "" }, { "docid": "9c98f9cdd04086e01655a5cf09e50dc9", "score": "0.5410109", "text": "unRegister(){\n \n if (window.confirm(\"Do you really want to delete your account?\")) {\n axios.delete(`https://myflapix.herokuapp.com/users/${localStorage.user}`, {\n headers: { Authorization: `Bearer ${localStorage.getItem('token')}`}\n })\n .then(response => {\n localStorage.removeItem('token');\n localStorage.removeItem('user');\n // Assign the result to the state\n this.setState({\n user: null,\n userData:[]\n });\n }\n ).catch(function (error) {\n console.log(error);\n });\n }\n }", "title": "" }, { "docid": "2b26277715ef0f07fddfb585024b0e98", "score": "0.5408552", "text": "remove(item) {\n this.state.delete(item);\n this.emitNewState();\n }", "title": "" }, { "docid": "2b26277715ef0f07fddfb585024b0e98", "score": "0.5408552", "text": "remove(item) {\n this.state.delete(item);\n this.emitNewState();\n }", "title": "" }, { "docid": "2b26277715ef0f07fddfb585024b0e98", "score": "0.5408552", "text": "remove(item) {\n this.state.delete(item);\n this.emitNewState();\n }", "title": "" }, { "docid": "ae1275cd467c8b51843079ddb4f526c8", "score": "0.5407353", "text": "removeReply(index){\n let replyArray = this.state.replies.slice();\n const removedReply = replyArray.splice(index, 1);\n this.setState({\n replies: replyArray,\n })\n }", "title": "" }, { "docid": "ea69f0c07b86d2ed426a48fc775ba1cb", "score": "0.54061186", "text": "vaciarRespacopio(state) {\n state.respacopio = new Respacopio('', '', '', '', '', '', '', '', '', '', '', '')\n }", "title": "" }, { "docid": "87f1113ac2b162d68006e28aed082072", "score": "0.54017115", "text": "deleteHiringFlow(){}", "title": "" }, { "docid": "d29654861dfa60231821d5624692e171", "score": "0.53958327", "text": "handleRemoveSentence(index, url) {\n var urlSearchParam = new URLSearchParams();\n urlSearchParam.append('url', url);\n ajax.removeSavedSentence(urlSearchParam.toString(), function() {\n console.log('sentence removed');\n });\n\n // Render the removal client side\n this.state.sentences.nativeSentences.splice(index, 1);\n this.state.sentences.learnSentences.splice(index, 1);\n this.state.sentences.urls.splice(index, 1);\n\n var sentenceObj = {\n nativeSentences: this.state.sentences.nativeSentences,\n learnSentences: this.state.sentences.learnSentences,\n urls: this.state.sentences.urls\n };\n\n this.setState({\n sentences: sentenceObj\n });\n }", "title": "" }, { "docid": "85350986b5d1978d97f5d4af117fbd5a", "score": "0.53951746", "text": "_handleRequestUnassignResource(options)\n {\n var resourcesAssigned = this._getResourceAssignments(options.inputport.get('url'));\n resourcesAssigned.remove(options.resource);\n }", "title": "" }, { "docid": "4d0ffdc6060e8a8149b16d6cd92f8f38", "score": "0.539506", "text": "componentWillUnmount(){//removemos los interceptor cuando no se usan\n axios.interceptors.request.eject(this.requestInterceptor);\n axios.interceptors.response.eject(this.responseInterceptor);\n }", "title": "" }, { "docid": "29691895b7aa7c12b86d89f1c13da01b", "score": "0.53914964", "text": "remove () {}", "title": "" }, { "docid": "46f2868b06e1aea2a6d4057381378655", "score": "0.5387773", "text": "componentWillUnmount() {\n this.serverRequest.abort();\n }", "title": "" }, { "docid": "0c73c1dfe3a8d26c9e8b1566e14eefc9", "score": "0.53863424", "text": "onRemove(){\n\t\tthis.state.value = false\n\t\tthis.state.imageData = null\n\t\tthis.updateParent()\n\t}", "title": "" }, { "docid": "1b48e02bccc5febe6d0cb1b9ebb3b448", "score": "0.5381617", "text": "cancel() {\n const { _url, serverSettings } = this;\n const init = { method: 'DELETE' };\n const promise = serverconnection_1.ServerConnection.makeRequest(_url, init, serverSettings);\n return promise.then(response => {\n if (response.status !== 204) {\n throw new serverconnection_1.ServerConnection.ResponseError(response);\n }\n });\n }", "title": "" }, { "docid": "216b9d1b0901f32dc0c6288de5cf2321", "score": "0.5374556", "text": "removeState(label) {\n const state = this.getState(label);\n if (label === this.getStartState()) {\n throw new Error(`Cannot remove start state ${label}`);\n }\n else if (state) {\n state.remove();\n return this;\n }\n else {\n throw new Error(`State container does not have a state with label ${label}`);\n }\n }", "title": "" }, { "docid": "788e35d07f48cd33865a526a8c1b7c97", "score": "0.53733563", "text": "destroy(request, response) {\n Book.findByIdAndRemove(request.params.book_id)\n .then(result => response.json(book))\n .catch(error => response.json(error));\n }", "title": "" }, { "docid": "f96bf247cb7766ffe997ef082e7e7f63", "score": "0.53704", "text": "async remove(id) {\n await fetch(`/api/expenses/${id}`, {\n method : \"DELETE\",\n headers : {\n \"Accept\" : 'application/json',\n \"Content-Type\" : \"application/json\"\n } // be careful with all of the ({ here }) caused errors when out of order and hard to catch!\n }).then( () => {\n let updatedExpenses = [ ...this.state.Expenses ].filter( ele => ele.id !== id)\n this.setState( { Expenses : updatedExpenses })\n })\n }", "title": "" }, { "docid": "cc0cbeb4619f8f5d16a25034018ae3a7", "score": "0.53688884", "text": "removeTask(taskId) {\n var tasks = this.state.tasks;\n\n // Removal request to backend API\n axios.delete(`https://orion-invoices-api.herokuapp.com/api/v1/tasks/${taskId}`).then( (response) => {\n\n toast.success(\"Task Completed\", {\n position: toast.POSITION.BOTTOM_RIGHT\n });\n\n //Removal operation from local state, filters out the spesific task\n tasks = tasks.filter(task => task.id !== taskId );\n this.setState( { tasks } );\n }).catch( (err) => {\n if(err) toast.error(\"Could not complete task, please try again\", {\n position: toast.POSITION.BOTTOM_RIGHT\n })\n })\n }", "title": "" }, { "docid": "a3cc89da39735d2ea02be34fcd7195ce", "score": "0.53681266", "text": "async deleteResponse(request, response) {\n const id = request.params.id\n const paperId = request.params.paper_id\n const user = request.session.user || null\n\n const results = await this.database.query(`\n SELECT responses.user_id AS \"userId\", responses.status FROM responses WHERE responses.id = $1\n `, [ id ])\n\n // If we didn't find a response at this stage, it's because it doesn't exist. \n if ( results.rows.length <= 0 ) {\n throw new ControllerError(404, 'not-found', `Failed to find response ${id} in DELETE attempt.`)\n }\n\n // Only the owner of the response may modify it and only the owner\n // of the response may know about their own in-progress responses.\n if ( ! user || user.id != results.rows[0].userId ) {\n const culprit = user ? user.id : 'unauthenticated user'\n if ( results.rows[0].status == 'in-progress') {\n throw new ControllerError(\n 404, \n 'not-found', \n `Unauthorized attempt to DELETE in-progress response ${id} by ${ culprit }.`)\n } else {\n throw new ControllerError(\n 403, \n 'not-authorized', \n `Unauthorized attempt to DELETE response ${id} by ${culprit}.`)\n }\n }\n\n await this.responseDAO.deleteResponse(id)\n\n return response.status(200).json({responseId: id})\n }", "title": "" }, { "docid": "ec005f76864a33c54a97dd2dc95ae6ce", "score": "0.53660136", "text": "async remove(id){\n const {Categories} = this.state;\n let errors={};\n console.log(\"Categories: \", Categories);\n\n\n await fetch('https://expense-calculator-ankit.herokuapp.com/api/category/'+id, {\n method: 'DELETE'\n }).then((response)=>{\n \n if(response.status===200){\n \n let updatedCategory = [...this.state.Categories].filter(i=>i.id!==id);\n this.setState({Categories: updatedCategory})\n } else{\n errors[\"categoryType\"] = \"*this category cannot be deleted, it has expenses\";\n this.setState(\n {Categories: Categories,\n errors: errors,\n categoryId: id})\n }\n \n })\n\n}", "title": "" }, { "docid": "580d86ab4d8ed97130c74cd19f67a6e1", "score": "0.5359801", "text": "componentWillUnmount() {\n if (this.requestSource) {\n // console.log('Cancelling in-flight request:', this.requestSource);\n this.requestSource.cancel();\n }\n }", "title": "" }, { "docid": "afb03c5f9c813bf06584c599156a0c15", "score": "0.5357448", "text": "function remove() {\n\t\t\tthis.off(name, callback);\n\t\t\tthis.off(name, remove);\n\t\t}", "title": "" }, { "docid": "1e281472f462fdd61d4701c64ed1135b", "score": "0.53564966", "text": "function removeAnswer() {\n listAnswers.pop();\n setListAnswer([...listAnswers]);\n }", "title": "" }, { "docid": "1cd7397f563f3f562c51c57017061b31", "score": "0.5354009", "text": "destroy() {\n let result = this.subtractItem(this.state.contextItem, 1);\n if (!result.result) return;\n\n this.setState({ itemContext: false, contextItem: undefined });\n if ('alt' in window) {\n alt.emit('inventory:Destroy', result.hash);\n }\n }", "title": "" }, { "docid": "fdbd776da3b88ae9ab8f3a3295ba762f", "score": "0.53525245", "text": "function pop() {\n var x = history.pop();\n x.indicator.remove();\n return x;\n}", "title": "" }, { "docid": "b292f00134bdcdae041926542f1ac2be", "score": "0.5350465", "text": "deleteToken(id) {\n axios.delete(`${SERVER_MAIN_URL}/tokendelete/${id}`).then((response) => {\n console.log(response.data);\n });\n\n this.setState({\n record: this.state.records.filter((el) => el._id !== id),\n });\n }", "title": "" }, { "docid": "30ddf023d0c0eeee19151183aac6bc8b", "score": "0.5350098", "text": "componentWillUnmount() {\n this.props.setState({\n state: Object.assign(this.props.state.state, {\n //response: this.survey.data,\n //currentPage: this.survey.currentPageNo,\n isSurveyPage: false\n })\n })\n }", "title": "" }, { "docid": "d3e4399477eef5645f4072ee7238d277", "score": "0.53497815", "text": "async removeNationality(id) { //Receives id\n await fetch(`api/nationalities/${id}`, { //call to api\n method : 'DELETE',\n headers : {\n 'Accpet' : 'application/json',\n 'Content-Type' : 'application/json'\n }\n }).then(() => {\n //... - Persons object what contains many elements in it, that's how we pass it.\n //filter - we itarate through all components what are inside Persons, we look for id.\n let updatedNationalities = [...this.state.Nationalities].filter(i => i.id !== id); //Type and value comparison.\n this.setState({Nationalities : updatedNationalities}); //We update our list because we didn't do 2nd api call.\n });\n }", "title": "" }, { "docid": "8171019cd83e5a4dd64d8a2fa9e75cee", "score": "0.53451836", "text": "erase(){\n\t\tthis.answer.value('');\n\t\tthis.reason.value('');\n\t\tthis.next.value('');\n\t}", "title": "" }, { "docid": "3886d2e3753ac3af69e23e0dce741c08", "score": "0.5338563", "text": "[REMOVE_USER](state) {\r\n state.userObject = {}\r\n }", "title": "" }, { "docid": "9478c5aaf73c4a5a03ab902f4abfd2b8", "score": "0.5337596", "text": "unFollowVenue() {\n axios.delete(`http://localhost:8000/users/${localStorage.getItem('userId')}/follows/venues`, {\n data: { user_id1: localStorage.getItem('userId'), venue_id: this.state.venueId }\n })\n .then((res) => {\n this.getData();\n });\n }", "title": "" } ]
7aab58a56aee84512a032eae3c12d32b
End of the fetch function Function for the table for the members of senate.
[ { "docid": "4551e69ab037e0757e9e73b0278281b7", "score": "0.0", "text": "function printtable(array, id) {\n let tbody = document.getElementById(id);\n\n for (let i = 0; i < array.length; i++) {\n let row = tbody.insertRow(i);\n let fullnamecell = row.insertCell(0);\n let partycell = row.insertCell(1);\n let statecell = row.insertCell(2);\n let senioritycell = row.insertCell(3);\n let totalvotescell = row.insertCell(4);\n var fullname = array[i].last_name + \" \" + array[i].first_name;\n if (array[i].middle_name !== null) {\n fullname += \" \" + array[i].middle_name;\n }\n\n fullnamecell.innerHTML = fullname.link(array[i].url);\n partycell.innerHTML = array[i].party;\n statecell.innerHTML = array[i].state;\n senioritycell.innerHTML = array[i].seniority;\n totalvotescell.innerHTML = array[i].votes_with_party_pct + \"%\";\n }\n\n document.getElementById(\"load-icon\").style.display = \"none\";\n}", "title": "" } ]
[ { "docid": "460dcbb85488f4522a7570f24d610bf2", "score": "0.62665266", "text": "function getDataSenate(table, memberData, tbody) {\n for (let i = 0; i < memberData.length; i++) {\n createTbodyOfTable(i, tbody, memberData);\n }\n}", "title": "" }, { "docid": "eddd7c9ca3cf3ab1dc7cb8c18717b1cc", "score": "0.6079728", "text": "function tabulateChamberData(chamberData) {\n let fullName;\n chamberName = chamberData.results[0].chamber;\n if (chamberName === \"House\") {\n chamberName = \"House of Representatives\";\n }\n congressNumber = addOrdinalSuffix(chamberData.results[0].congress);\n\n chamberMembers = chamberData.results[0].members; //dig down to get members\n\n let tableContents = \"<caption style='caption-side: top;'>\" + congressNumber + \" \" + chamberName + \" of the United States of America</caption>\" +\n \"<thead>\" +\n \"<tr>\" +\n \"<th>Name</th>\" +\n \"<th class='text-center'>Party</th>\" +\n \"<th class='text-center'>State</th>\" +\n \"<th class='text-center'>Years In Office</th>\" +\n \"<th class='text-center'>Votes With Party</th>\" +\n \"</tr>\" +\n \"</thead>\" +\n \"<tbody>\"\n\n for (let i = 0; i < chamberMembers.length; i++) {\n if (chamberMembers[i].middle_name === null) {\n fullName = chamberMembers[i].first_name + \" \" +\n chamberMembers[i].last_name; //for members with no middle name\n } else {\n fullName = chamberMembers[i].first_name + \" \" + chamberMembers[i].middle_name + \" \" +\n chamberMembers[i].last_name; //for members with a middle name\n }\n tableContents +=\n \"<tr>\" +\n \"<td> <a href='\" + chamberMembers[i].url + \"'>\" + fullName + \"</a></td>\" +\n \"<td class='text-center' value=\" + chamberMembers[i].party + \">\" + chamberMembers[i].party + \"</td>\" +\n \"<td class='text-center' value='\" + chamberMembers[i].state + \"'>\" + chamberMembers[i].state + \"</td>\" +\n \"<td class='text-center'>\" + chamberMembers[i].seniority + \"</td>\" +\n \"<td class='text-center'>\" + chamberMembers[i].votes_with_party_pct + \"%</td>\" +\n \"</tr>\"\n }\n tableContents += \"</tbody>\"\n return tableContents\n}", "title": "" }, { "docid": "2371f1709599ad39c0fbc5b4053236c2", "score": "0.6037816", "text": "function cityTablePop(stateAbv){\n //write query to populate tables\n //Each table has an ID assigned\n\n}", "title": "" }, { "docid": "19aca85f1012e3ee904da173a35b69da", "score": "0.5667081", "text": "function createTable(membersData) {\n var trData = document.getElementById('senate-data').innerHTML;\n trData = \"\"; //now we are clearing the html for trData.\n\n //create a table with the given data\n var trElem = '';\n for (var i = 0; i < membersData.length; i++) {\n var firstName = membersData[i].first_name;\n var middleName = membersData[i].middle_name;\n var lastName = membersData[i].last_name;\n if (middleName == null) {\n var fullName = firstName + ' ' + lastName;\n } else {\n var fullName = firstName + ' ' + middleName + ' ' + lastName;\n }\n\n var url = membersData[i].url;\n var party = membersData[i].party;\n var state = membersData[i].state;\n var seniority = membersData[i].seniority;\n var percentageOfVotesWithParty = membersData[i].votes_with_party_pct + '%';\n var votes_with_party_pct_Tr = '<td>' + percentageOfVotesWithParty + '</td>';\n var stateTr = '<td>' + state + '</td>';\n var partyTr = '<td class=party>' + party + '</td>';\n var seniorityTr = '<td>' + seniority + '</td>';\n var trElement = '<tr class=\"senate\"><td><a href=\"'+url+'\"/>'+ fullName + '</td> ' + partyTr + stateTr + seniorityTr + votes_with_party_pct_Tr + '</tr>';\n trElem = trElem + trElement;\n }\n trData = trElem;\n document.getElementById('senate-data').innerHTML = trData;\n}", "title": "" }, { "docid": "8d08e31b06088cec36317159cfb6862d", "score": "0.5649384", "text": "function getMembersToTable(members) {\n document.getElementById(\"table_body\").innerHTML = \"\";\n for (var i = 0; i < members.length; i++) {\n var row = document.getElementById(\"table_body\");\n row.innerHTML += \"<tr class='rows'></tr>\";\n\n var lastName = members[i].last_name;\n var midName = members[i].middle_name;\n if (midName == null) {\n midName = \"\";\n }\n var firstName = members[i].first_name;\n\n var name = lastName + \", \" + firstName + \" \" + midName;\n var nameLink = document.createElement(\"A\");\n nameLink.setAttribute(\"href\", members[i].url);\n nameLink.setAttribute(\"target\", \"_blank\");\n nameLink.innerHTML = name;\n var datos = [nameLink, members[i].party, members[i].state, members[i].seniority, members[i].votes_with_party_pct + \"%\"];\n\n for (var n = 0; n < datos.length; n++) {\n document.getElementsByClassName('rows')[i].innerHTML += \"<td></td>\";\n document.getElementsByClassName('rows')[i].getElementsByTagName(\"td\")[n].append(datos[n]);\n }\n }\n }", "title": "" }, { "docid": "b129940766a11b19e9eb1fd9ab2fdcc4", "score": "0.5526117", "text": "function GetAllUnitMembersForAdmin(Members) {\n try {\n var ds = {};\n var table = {};\n var data = \"{'memberObj':\" + JSON.stringify(Members) + \"}\";\n ds = getJsonData(data, \"../AdminPanel/FamilyUnit.aspx/GetAllFamilyMemberUsingChurchID\");\n table = JSON.parse(ds.d);\n return table;\n }\n catch (e) {\n noty({ type: 'error', text: e.message });\n }\n}", "title": "" }, { "docid": "9f11b13a2a81ca2082a551a47a070e1c", "score": "0.5463835", "text": "function fetchSenator(lat,lng) {\n $.ajax({\n url: \"http://openstates.org/api/v1/legislators/geo/?lat=\"+lat+\"&long=\"+lng+\"&apikey=YOUR_API_KEY&chamber=upper\",\n jsonp: \"callback\",\n dataType: \"jsonp\",\n // work with the response filter out lower chamber\n success: function( response ) {\n // we only want upper senators, reject lower\n var arr = response;\n for (var i = arr.length; i--;) {\n if (arr[i].chamber === 'lower') {\n arr.splice(i, 1);\n }\n };\n // console.log(JSON.stringify(arr));\n\n senateData = response;\n populateSenateResults(senateData) \n }\n });\n }", "title": "" }, { "docid": "27da42da6f94f982f2da05b90cd6894c", "score": "0.54383737", "text": "async genFetchMembers() { }", "title": "" }, { "docid": "6b9c4c70e43e10e217ec7167a5270ba0", "score": "0.5383258", "text": "function tabulateChamberGlance(chamberData) {\n chamberStatistics = makeStatisticsObject(chamberData);\n chamberName = chamberData.results[0].chamber;\n if (chamberName === \"House\") {\n chamberName = \"House of Representatives\";\n }\n congressNumber = addOrdinalSuffix(chamberData.results[0].congress);\n\n chamberMembers = chamberData.results[0].members;\n\n\n let tableContents =\n \"<caption style='caption-side: top;'> The \" + congressNumber + \" \" + chamberName + \" at a Glance</caption>\" +\n \"<thead>\" +\n \"<tr>\" +\n \"<th>Party</th>\" +\n \"<th class='text-center'>Number of Members</th>\" +\n \"<th class='text-center'>Party Loyalty</th>\" +\n \"<tr>\" +\n \"</thead>\" +\n \"<tbody>\" +\n\n \"<tr>\" +\n \"<td>\" + chamberStatistics.parties.demParty.name + \"</td>\" +\n \"<td class='text-center'>\" + chamberStatistics.parties.demParty.numOfMembers + \"</td>\" +\n \"<td class='text-center'>\" + Math.round(chamberStatistics.parties.demParty.partyLoyalty || 0) + \"%</td>\" +\n \"</tr>\" +\n\n \"<tr>\" +\n \"<td>\" + chamberStatistics.parties.repParty.name + \"</td>\" +\n \"<td class='text-center'>\" + chamberStatistics.parties.repParty.numOfMembers + \"</td>\" +\n \"<td class='text-center'>\" + Math.round(chamberStatistics.parties.repParty.partyLoyalty || 0) + \"%</td>\" +\n \"</tr>\" +\n\n \"<tr>\" +\n \"<td>\" + chamberStatistics.parties.indParty.name + \"</td>\" +\n \"<td class='text-center'>\" + chamberStatistics.parties.indParty.numOfMembers + \"</td>\" +\n \"<td class='text-center'>\" + Math.round(chamberStatistics.parties.indParty.partyLoyalty || 0) + \"%</td>\" +\n \"</tr>\" +\n\n \"<tr>\" +\n \"<td>Total</td>\" +\n \"<td class='text-center'>\" + chamberStatistics.totalMembers + \"</td>\" +\n \"<td class='text-center'>\" + Math.round(chamberStatistics.averageLoyalty) + \"%</td>\" +\n \"</tr>\" +\n\n \"</tbody>\";\n return tableContents;\n}", "title": "" }, { "docid": "1a45e77657bce14696cf56841a561e28", "score": "0.53247756", "text": "function displayMembers(row, i, table)\r\n{\r\n var tr = document.createElement('tr');\r\n if(i % 2 == 0) tr.className = \"even\";\r\n else tr.className = \"odd\";\r\n\r\n var membername = document.createElement(\"td\");\r\n\r\n if (row.wikiname == \"local\") {\r\n var a = document.createElement(\"a\");\r\n a.href = row.memberurl;\r\n a.appendChild(document.createTextNode(row.fullname));\r\n membername.appendChild(a);\r\n } else {\r\n membername.appendChild(document.createTextNode(row.fullname));\r\n }\r\n membername.className=\"username\";\r\n tr.appendChild(membername);\r\n\r\n /* do not allow to delete users from a group when not in inline mode */\r\n if(table.action == \"inline\")\r\n {\r\n var membermanage = document.createElement(\"td\");\r\n membermanage.className = \"manage\";\r\n\r\n var del = document.createElement('img');\r\n\r\n if (row.grayed == \"true\") {\r\n del.src = '/wiki/skins/albatross/icons/rights%2Dmanager/clearg.png';\r\n del.className = 'icon-manageg';\r\n } else {\r\n del.src = '/wiki/skins/albatross/icons/rights%2Dmanager/clear.png';\r\n Event.observe(del, 'click', deleteMember(i, table, row.fullname, row.docurl));\r\n del.className = 'icon-manage';\r\n }\r\n del.title = \"Delete\";\r\n membermanage.appendChild(del);\r\n tr.appendChild(membermanage);\r\n }\r\n\r\n return tr;\r\n}", "title": "" }, { "docid": "3283273418749acef2806d247835a04a", "score": "0.52753", "text": "function updateMemberTable() {\n $.ajax({\n\t url: \"rest/members/json\",\n\t cache: false,\n\t success: function(data) {\n $('#members').empty().append(buildMemberRows(data));\n },\n error: function(error) {\n //console.log(\"error updating table -\" + error.status);\n }\n });\n}", "title": "" }, { "docid": "7509f5b0a985c4390f155bb5bd8afffe", "score": "0.5265055", "text": "function tabla (){\n \n var miembros;\n var tablaMiembros;\n var partidosSeleccionados;\n var states; \n \n //asigno el nodo de los datos del objeto json que estan vinculados al id#state-data \n states = document.querySelector('#state-data').value\n \n console.log(states);\n \n //asigno el objeto json de los miembros del senado a la variable para reucir la direccion del objeto para cuando la quiera llamar\n miembros = data.results[0].members;\n \n //inicializo la tabla de miembros con la cabecera de la tabla\n tablaMiembros = \"<tr>\"+\n \"<th>Full name</th>\"+\n \"<th>Party</th>\"+\n \"<th>State</th>\"+\n \"<th>Years in Office</th>\"+\n \"<th>% Votes w/Party</th>\"+\n \"</tr>\";\n \n //extraigo el nodo de los objetos con el name #party lo combierto en un array lo recorro con .map y solo estraigo su value\n partidosSeleccionados = Array.from( document.querySelectorAll('input[name=party]:checked')).map(x => x.value);\n \n //console.log(partidosSeleccionados);\n\n //console.log(miembros.length);\n \n //recorro el array de todos los miembros\n for(var i=0;i<miembros.length;i++){\n\n /*la condicion es para mostrar todos lo miembros con el checkbox de partidos seleccionado y con el dropdown*/ if(partidosSeleccionados.indexOf(miembros[i].party) !== -1 && (states == miembros[i].state || states == \"all\")){\n \n /*condicion para que cuando no tiene middle name,no tomarlo y cuando si, tomarlo*/\n if(miembros[i].middle_name == null){\n\n tablaMiembros +=\n \"<tr>\" +\n \" <td><a href=\"+miembros[i].url+\">\"+miembros[i].first_name+\" \"+miembros[i].last_name+\"</a></td>\"+ \n \"<td>\"+miembros[i].party+\"</td>\"+\n \"<td>\"+miembros[i].state+\"</td>\"+\n \"<td>\"+miembros[i].seniority+\"</td>\"+\n \"<td>\"+miembros[i].votes_with_party_pct+\"%</td>\"+\n \"</tr>\";\n }else{\n\n tablaMiembros +=\n \"<tr>\"+\n \"<td><a href=\"+miembros[i].url+\">\"+miembros[i].first_name+\" \"+miembros[i].middle_name+\" \"+miembros[i].last_name+\"</a></td>\"+\n \"<td>\"+miembros[i].party+\"</td>\"+\n \"<td>\"+miembros[i].state+\"</td>\"+\n \"<td>\"+miembros[i].seniority+\"</td>\"+\n \"<td>\"+miembros[i].votes_with_party_pct+\"%</td>\"+\n \"</tr>\";\n }\n }\n \n }\n\n /*console.log(tablaMiembros);\n console.log(tablaMiembros.length);*/\n \n //retornamos la tabla de miembros\n return tablaMiembros;\n}", "title": "" }, { "docid": "a19357dad0c6b0c01a995eaa54d7a03e", "score": "0.52646273", "text": "function getMembers(){\n const getAllMembersApiUrl = \"https://title-town-cards-api.herokuapp.com/API/Members\";\n fetch(getAllMembersApiUrl).then(function(response){\n console.log(response);\n return response.json();\n }).then(function(json){ \n let html = '';\n json.forEach((member)=>{\n html += \"<tr>\"+\n \"<th scope =\\\"row\\\">\" + member.memberID + \"</th>\" +\n \"<td>\" + member.memberName + \"</td>\" +\n \"<td>\" + member.memberAddress + \"</td>\" +\n \"<td>\" + member.memberEmail + \"</td>\" +\n \"<td>\" + member.memberDOB + \"</td>\" +\n \"<td>\" + member.memberPhone + \"</td>\" +\n \"</tr>\"\n });\n document.getElementById(\"allMembers\").innerHTML = html;\n }).catch(function(error){\n console.log(error);\n });\n}", "title": "" }, { "docid": "68ad5a54e79123eaa9d6118fd57747da", "score": "0.5262498", "text": "function getEntTable(){\n\tdataReceived = \"\";\n\tgetData(\"ent.php\", sid);\n\tvar entData = JSON.parse(dataReceived);\n\tconsole.log(entData);\n\n\tif(curedDname[1][3].length!=0){\n\t\tcreatTable(\"ENT\");\n\t\t\tfor(var i = 0; i < curedDname[1][3].length; i++){\n\t\t\t\t\t//if(diseaseName!=curedDname[1][0][j])\n\t\t\t\t\tinsertRowRef('ent-table',curedDname[1][3][i]);\n\t\t\t}\t\n\t}\n\n\tif(entData['ref'] != null && entData['check']!=0 && curedDname[2]==null){\n\t\tcreatTable(\"ENT\");\n\t\tfor(var i = 0; i < entData['colNames'].length; i++){\n\t\t\tvar diseaseName = entData['colNames'][i];\n\t\t\tinsertRowRef('ent-table',diseaseName);\n\t\t}\n\n\t}\n\t/*else if(entData['ref'] != null && entData['check']!=0 && curedDname[0].length!=0){\n\t\tif(curedDname[0][3].length!=entData['colNames'].length){\n\t\t\tcreatTable(\"ENT\");\n\t\t\tfor(var i = 0; i < entData['colNames'].length; i++){\n\t\t\t\tvar diseaseName = entData['colNames'][i];\n\t\t\t\tfor(j=0;j<curedDname[0][3].length;j++){\t\n\t\t\t\t\tif(diseaseName!=curedDname[0][3][j])\t\t\t\t\n\t\t\t\t\tinsertRowRef('ent-table',diseaseName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}*/\n}", "title": "" }, { "docid": "6cacdc0ce3e92d393bdae82bb81d2091", "score": "0.52620727", "text": "function createTable(members, tableId) {\n let tablecontents = \"\";\n\n tablecontents = \"<table>\";\n // Table headers\n tablecontents += \"<tr>\";\n tablecontents += \"<th class='header'>\" + \"Full Name\" + \"</th>\";\n tablecontents += \"<th class='header'>\" + \"Party\" + \"</th>\";\n tablecontents += \"<th class='header'>\" + \"State\" + \"</th>\";\n tablecontents += \"<th class='header'>\" + \"Seniority\" + \"</th>\";\n tablecontents += \"<th class='header'>\" + \"Percentage Of Votes With Party\" + \"</th>\";\n tablecontents += \"</tr>\";\n\n // For loop for looping through all the data \n\n for (i = 0; i < members.length; i++) {\n if (members[i].middle_name === null) {\n members[i].full_name = members[i].first_name + \" \" + members[i].last_name\n } else {\n members[i].full_name = members[i].first_name + \" \" + members[i].middle_name + \" \" + members[i].last_name\n }\n // Rows with required data\n tablecontents += \"<tr>\";\n tablecontents += `<td class='name-cell'><a href='${members[i].url}'> ${members[i].full_name}</a> </td>`;\n tablecontents += \"<td>\" + members[i].party + \"</td>\";\n tablecontents += \"<td>\" + members[i].state + \"</td>\";\n tablecontents += \"<td>\" + members[i].seniority + \"</td>\";\n tablecontents += \"<td>\" + Math.round(members[i].votes_with_party_pct) + \" %\" + \"</td>\";\n tablecontents += \"</tr>\";\n }\n\n tablecontents += \"</table>\";\n // linking the html tables with javascript\n document.getElementById(tableId).innerHTML = tablecontents;\n\n}", "title": "" }, { "docid": "38df26a0e12444a1d874efcafd356aa1", "score": "0.5203932", "text": "function createMemberTable(partyFilters, stateFilter) {\r\n\r\n // clear table before filling it with content\r\n while (tableMembers.hasChildNodes()) {\r\n tableMembers.removeChild(tableMembers.firstChild);\r\n }\r\n\r\n // if no partyFilters applied, behave like all partyFilters are active\r\n if (partyFilters.length === 0) {\r\n partyFilters = [\"D\", \"R\", \"I\"]\r\n };\r\n\r\n // create table head and captions\r\n let tableHeadNode = document.createElement(\"thead\");\r\n let tableHeadRowNode = document.createElement(\"tr\");\r\n const tableHeadCaptions = [\"Name\", \"Party\", \"State\", \"Years in Office\", \"Votes with Party\"];\r\n\r\n // add data to head row\r\n for (let i = 0; i < tableHeadCaptions.length; i++) {\r\n let tableHeadRowDataNode = document.createElement(\"th\");\r\n tableHeadRowDataNode.setAttribute(\"scope\", \"col\");\r\n let tableHeadRowDataTextNode = document.createTextNode(tableHeadCaptions[i]);\r\n tableHeadRowDataNode.appendChild(tableHeadRowDataTextNode);\r\n tableHeadRowNode.appendChild(tableHeadRowDataNode);\r\n };\r\n\r\n // add head row to head node and head node to table\r\n tableHeadNode.appendChild(tableHeadRowNode);\r\n tableMembers.appendChild(tableHeadNode);\r\n\r\n // create table body\r\n let tableBodyNode = document.createElement(\"tbody\");\r\n\r\n // add data to table body\r\n for (let i = 0; i < memberList.length; i++) {\r\n let member = memberList[i];\r\n\r\n // state filter\r\n if (stateFilter != \"all\" && member.state != stateFilter) {\r\n continue;\r\n };\r\n\r\n // do not add member to table if party is not in party filter\r\n if (!partyFilters.includes(member.party)) {\r\n continue;\r\n };\r\n\r\n let tableRow = document.createElement(\"tr\");\r\n\r\n let middleName = \"\";\r\n if (member.middle_name != null) {\r\n middleName = `${member.middle_name} `;\r\n };\r\n\r\n let memberName = `${member.first_name} ${middleName}${member.last_name}`;\r\n let memberAttributes = [memberName, member.party, member.state, member.seniority, `${member.votes_with_party_pct} %`];\r\n\r\n for (let j = 0; j < memberAttributes.length; j++) {\r\n let tableRowData = document.createElement(\"td\");\r\n\r\n // add link to name\r\n if (memberAttributes[j] === memberName) {\r\n let linkMemberPage = document.createElement(\"a\");\r\n linkMemberPage.setAttribute(\"href\", member.url);\r\n let linkText = document.createTextNode(memberName);\r\n linkMemberPage.appendChild(linkText);\r\n tableRowData.appendChild(linkMemberPage);\r\n } else {\r\n let tableRowText = document.createTextNode(memberAttributes[j]);\r\n tableRowData.appendChild(tableRowText);\r\n };\r\n tableRow.appendChild(tableRowData);\r\n };\r\n tableBodyNode.appendChild(tableRow);\r\n };\r\n tableMembers.appendChild(tableBodyNode);\r\n}", "title": "" }, { "docid": "6c955f9689714baa307e338bfb9b9259", "score": "0.5198271", "text": "function allMembersQueryResponse(response) {\n // all members response\n console.log(response)\n // save off the senate members into an array\n allMembersArray = response.results[0].members;\n console.log(\"found all members array. The first name encountered is: \" + allMembersArray[0].last_name);\n }", "title": "" }, { "docid": "c1a28204680f890324c4c667b1d42fa0", "score": "0.5194766", "text": "function GetAdminMemberDetails(Members) {\n try {\n var ds = {};\n var table = {};\n var data = \"{'memberObj':\" + JSON.stringify(Members) + \"}\";\n ds = getJsonData(data, \"../AdminPanel/FamilyUnit.aspx/GetAdminMemberDetails\");\n table = JSON.parse(ds.d);\n return table;\n }\n catch (e) {\n noty({ type: 'error', text: e.message });\n }\n}", "title": "" }, { "docid": "b47470054ace919770995ad28f1d1f9d", "score": "0.5170748", "text": "function getSkinTable(){\n\tdataReceived = \"\";\n\tcheckFollowUp();\n\tgetData(\"skin.php\", sid);\n\tvar skinData = JSON.parse(dataReceived);\n\t\tconsole.log(skinData);\n\tif(curedDname[1][0].length!=0){\n\t\tcreatTable(\"Skin\");\n\t\t\tfor(var i = 0; i < curedDname[1][0].length; i++){\n\t\t\t\t\t//if(diseaseName!=curedDname[1][0][j])\n\t\t\t\t\tinsertRowRef('skin-table',curedDname[1][0][i]);\n\t\t\t}\t\n\t}\n\tif(skinData['ref'] != null && skinData['check']!=0 && curedDname[2]==null ){\n\t\tcreatTable(\"Skin\");\n\t\tfor(var i = 0; i < skinData['colNames'].length; i++){\n\t\t\tvar diseaseName = skinData['colNames'][i];\n\t\t\tinsertRowRef('skin-table',diseaseName);\n\t\t}\n\t}\t\n\n\t/*else if((skinData['ref'] != null && skinData['check']!=0 && curedDname[0].length!=0 ) && curedDname[2]==0){\n\t\tif(curedDname[0][0].length!=skinData['colNames'].length){\n\t\t\tcreatTable(\"Skin\");\n\t\t\tfor(var i = 0; i < skinData['colNames'].length; i++){\n\t\t\t\tvar diseaseName = skinData['colNames'][i];\n\t\t\t\tfor(j=0;j<curedDname[0][0].length;j++){\t\n\t\t\t\t\tif(curedDname[2]==0){\n\t\t\t\t\tif(diseaseName!=curedDname[0][0][j])\t\n\t\t\t\t\tinsertRowRef('skin-table',diseaseName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}*/\n\n\n}", "title": "" }, { "docid": "597938162282b68c75ca7eb1d46a8141", "score": "0.51458675", "text": "static async allColleges(limit,offset){\n const result=await pool.query('SELECT * FROM college ORDER BY collegecode LIMIT ?,?',[Number(offset),Number(limit)]);\n return result;\n }", "title": "" }, { "docid": "eac27a043932b498baf73c043ef23bfc", "score": "0.514382", "text": "function createMembersTable(paramMembersArray, paramCheckBox, paramSelect) {\n //Get and clear tbody\n var tbody = document.getElementById(\"congress-data\");\n while (tbody.firstChild) {\n tbody.removeChild(tbody.firstChild);\n }\n\n //Get filter parameters\n var trId = [\"D\", \"R\", \"I\"];\n var filterParty = [];\n for (let i = 0; i < paramCheckBox.length; i++) {\n if (paramCheckBox[i].checked) {\n filterParty.push(trId[i]);\n }\n }\n var filterState = paramSelect[0].selectedOptions[0].value;\n\n //Fill tbody\n var keysArray = [[\"url\", \"first_name\", \"middle_name\", \"last_name\"], \"party\", \"state\", \"seniority\", \"votes_with_party_pct\"];\n for (let i = 0; i < paramMembersArray.length; i++) {\n if (memberFulfilFilters(paramMembersArray[i], filterParty, filterState)) {\n let tr = document.createElement(\"tr\");\n for (let j = 0; j < keysArray.length; j++) {\n let td = document.createElement(\"td\");\n if (j === 0) {\n let a = document.createElement(\"a\");\n a.setAttribute(\"href\", paramMembersArray[i][keysArray[j][0]]);\n a.setAttribute(\"target\", \"_blank\");\n a.textContent = paramMembersArray[i][keysArray[j][1]];\n if (paramMembersArray[i][keysArray[j][2]] != null) {\n a.textContent += \" \" + paramMembersArray[i][keysArray[j][2]];\n }\n a.textContent += \" \" + paramMembersArray[i][keysArray[j][3]];\n td.appendChild(a);\n } else if (j === keysArray.length - 1) {\n td.textContent = paramMembersArray[i][keysArray[j]] + \"%\";\n } else {\n td.textContent = paramMembersArray[i][keysArray[j]];\n }\n tr.appendChild(td);\n }\n tr.setAttribute(\"class\", paramMembersArray[i].party + \" \" + paramMembersArray[i].state);\n tbody.appendChild(tr);\n }\n }\n\n //If there aren't any row added\n if (!tbody.firstChild) {\n let p = document.createElement(\"p\");\n p.textContent = \"There is no member\";\n tbody.appendChild(p);\n }\n}", "title": "" }, { "docid": "ef6862a55bef7a42eb958d5dfb45bc6a", "score": "0.51165295", "text": "static async allAdmitted(limit,offset){\n const result=await pool.query('SELECT student.studentid,grade.rank,studdata.fname,studdata.lname,college.collegename,course.coursename FROM student,studdata,grade,course,college,admitted WHERE student.studentid=admitted.studentid AND college.collegecode=admitted.collegecode AND grade.studentid=student.studentid AND course.coursecode=admitted.coursecode AND student.email=studdata.email ORDER BY grade.rank LIMIT ?,?',[Number(offset),Number(limit)]);\n return result;\n }", "title": "" }, { "docid": "8bc250ff42c2655e651c2d8255ab7588", "score": "0.5108713", "text": "static async allStudents(limit,offset){\n const results=await pool.query('SELECT * FROM student,studdata WHERE student.email=studdata.email ORDER BY studentid LIMIT ?,?',[Number(offset),Number(limit)]);\n return results;\n }", "title": "" }, { "docid": "6b2f0f329ce5460ccd34bfac74a0e001", "score": "0.50940347", "text": "function getTableData(county, month, year) {\n let query = `SELECT industry_title, seasonally_adjusted, current_employment` +\n ` WHERE area_name = '${county}' AND month = '${month}' AND year = '${year}'` +\n ` ORDER BY industry_title`;\n queryEDD(query, 5).done(data => populateTable(data));\n}", "title": "" }, { "docid": "f1a6251103d439f6c2298a36d194e18c", "score": "0.5087688", "text": "function senatePagesSetup(data) {\n switch (window.location.href.substr(-16)) {\n case 'ance_senate.html':\n\n document.getElementById(\"chamber-glance-senate\").innerHTML =\n tabulateChamberGlance(data);\n\n document.getElementById(\"most-engaged-senate\").innerHTML =\n tabulateMostEngaged(data);\n\n document.getElementById(\"least-engaged-senate\").innerHTML =\n tabulateLeastEngaged(data);\n\n break;\n case 'alty_senate.html':\n document.getElementById(\"chamber-glance-senate\").innerHTML =\n tabulateChamberGlance(data);\n\n document.getElementById(\"most-loyal-senate\").innerHTML =\n tabulateMostLoyal(data);\n\n document.getElementById(\"least-loyal-senate\").innerHTML =\n tabulateLeastLoyal(data);\n break;\n case 'senate_data.html':\n\n document.getElementById(\"chamber-data-senate\").innerHTML =\n tabulateChamberData(data);\n document.getElementById(\"state-select\").innerHTML =\n buildDropdown(data);\n tableFilters('chamber-data-senate');\n break;\n\n }\n}", "title": "" }, { "docid": "13511ec9e46f1a2ccd7f642f356be335", "score": "0.5070494", "text": "function renderTable() {\n // Set the value of ending index\n var endingIndex = startingIndex + resultsPerPage;\n\n $tbody.innerHTML = \"\";\n // Set the value of ending index\n for (var i = 0; i < filteredAliens.length; i++) {\n // Get the current address object and its fields\n var alien = filteredAliens[i];\n var fields = Object.keys(alien);\n // Create a new row in the tbody, set the index to be i + startingIndex\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 var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = alien[field];\n };\n };\n}", "title": "" }, { "docid": "178f46dfc9926ddfd68ee0c61c51dbfe", "score": "0.50698733", "text": "function displayEmailMembers(members){\n\t\n\t$(\"#email_members_block #communications_table_body\").empty(); // get the table empty\n\t\n\tif(members.length === 0){\n\t\t // 'no_results' css in 'display_members.css'\n\t\t$(\"#email_members_block #communications_table_body\").html(\"<div class='no_results'>No Results...</div>\");\n \n\t\treturn;\n\t}\n\t\n\t// iterate through the result array returned\n\t$.each(members, function(key, value){\n\t\t\n\t\t$(\"#email_members_block #communications_table_body\").append(\n\t\t\t\t\n\t\t\t \"<tr class='row_data'>\" +\n \"<input type='hidden' id='member_id' name='member_id' value='\" + value.id + \"' />\" +\n \"<td id='first_column'><input type='checkbox' class='row_checkbox' value='\" + value.email + \"'><input type='hidden' value='\" + value.firstName + \"' /></td>\" +\n \"<td id='second_column'>\" +value.firstName + \" \" + value.lastName + \"</td>\" +\n \"<td id='third_column'>\" + addClass(value.email) + \"</td>\" + // 'addClass' function in 'add_update_member.js'\n \"</tr>\"); // 'addClass' add style 'display_members.css' file\n\t});\n}", "title": "" }, { "docid": "074c474600bd5dfa05c4e0a4835326af", "score": "0.50692815", "text": "function editTable() {\n var studentCode = $('#studentCode');\n var studentName = $('#studentName');\n\n if (studentCode.hasClass('none') && studentName.hasClass('none')) {\n $('.member').addClass('none');\n } else {\n $('.member').removeClass('none');\n if (!studentCode.hasClass('none') && !studentName.hasClass('none')) {\n $('.member').attr('colspan', '2');\n } else {\n $('.member').attr('colspan', '1');\n }\n }\n\n }", "title": "" }, { "docid": "e1afe91b1f907fc713d7c8f812b758e2", "score": "0.50674933", "text": "function displayAll() {\n connection.query(\"SELECT e.id, e.first_name, e.last_name, r.title, r.salary, d.name, m.first_name AS ? , m.last_name AS ? FROM employee e JOIN role r ON e.role_id = r.id JOIN department d ON r.department_id = d.id LEFT JOIN employee m on e.manager_id = m.id;\", [\"manager_first_name\", \"manager_last_name\"], function (err, res) {\n renderTable(err, res);\n \n })\n}", "title": "" }, { "docid": "29c9d9c2ff20a2dc4cf95a5727852ccc", "score": "0.50368285", "text": "function ajaxOpenStatesGetsenate(state, senate_district) {\n\t$.ajax({\n\t\turl: 'http://openstates.org/api/v1/legislators/?state=' + state + '&district=' + senate_district + \n\t\t\t\t'&active=true&chamber=upper&apikey=18cdbb31b096462985cf408a5a41d3af',\n\t\tdataType: 'jsonp',\n\t\tsuccess: function(json) {\n\t\t\tvar lng = json.length, val = null;\n\n\t\t\tfor(var upIt=0; upIt<lng; upIt++) {\n\t\t\t\tval = json[upIt];\n\n\t\t\t\tif (!val.active)\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t\tconvertChamber(val);\n\n\t\t\t\t// For search\n\t\t\t\twindow.ir.docReps.push({ voteCellId: val.leg_id + \"_vote\", voteRowId: val.leg_id + \"_voteRow\", leg_id: val.leg_id });\n\t\t\t\twindow.ir.districtsenate = val.district;\n\t\t\t\tsetCookie(\"ir_district_senate\", val.district, 365);\n\n\t\t\t\tdisplayLegislator(val);\n\t\t\t}\n\n\t\t\tcheckDoneLoading();\n\t\t},\n\t\terror: function() { window.alert(\"Error connecting to Open States API.\"); }\n\t});\n}", "title": "" }, { "docid": "80ef3907496dc8efdc533cf098b339ed", "score": "0.5029516", "text": "function Display() {\r\n // this is display the book name in table\r\n\r\n\r\n}", "title": "" }, { "docid": "0c98658858e3c1d28d15afb4118aa334", "score": "0.5029335", "text": "function GetInstitutionListChurchID() {\n try {\n \n var ds = {};\n var table = {};\n var PiousOrg = new Object();\n var data = \"{'PiousObj':\" + JSON.stringify(PiousOrg) + \"}\";\n ds = getJsonData(data, \"../AdminPanel/PiousOrganizations.aspx/GetPuOrgList\");\n table = JSON.parse(ds.d);\n return table;\n }\n catch (e) {\n\n }\n\n}", "title": "" }, { "docid": "f718597e10596744a390d1d7711979a0", "score": "0.5018833", "text": "getMunicipalitiesByCounty(county, callback) {\n super.query('SELECT municipality FROM municipality WHERE county = ?', [county], callback);\n }", "title": "" }, { "docid": "de63f8070378bbf7e53bd9a31ff8774c", "score": "0.49781594", "text": "function addMemberTable(whichArr) {\n for (var e = 0; e < whichArr.length; e++) {\n var table = document.getElementById(\"table\");\n var row = document.createElement(\"tr\");\n var cell1 = document.createElement(\"td\");\n var cell2 = document.createElement(\"td\");\n var cell3 = document.createElement(\"td\");\n var cell4 = document.createElement(\"td\");\n var cell5 = document.createElement(\"td\");\n table.appendChild(row);\n row.appendChild(cell1);\n cell1.innerHTML =\n \"<a href=\" + whichArr[e].url + \">\" + whichArr[e].name + \"</a>\";\n row.appendChild(cell2);\n cell2.innerHTML = whichArr[e].party;\n row.appendChild(cell3);\n cell3.innerHTML = whichArr[e].state;\n row.appendChild(cell4);\n cell4.innerHTML = whichArr[e].seni;\n row.appendChild(cell5);\n cell5.innerHTML = whichArr[e].voWiPa_PCT / 100;\n }\n}", "title": "" }, { "docid": "f3ad260387ed9694b564e24e37870955", "score": "0.4974958", "text": "function populateFamilyMemberByClientIdCustom(clientId, tableRowId) {\n\n\tvar memberIdList = [];\n\tgetClientData(\"GET\", \"\", \"getFamilyMemberListByLifeExp/\" + clientId,\n\t\t\tfamilyMemberSuccess);\n\tfunction familyMemberSuccess(data) {\n\t\t//alert(tableRowId.find(\"td:gt(0)\"));\n\t\t$.each(data,function(index, item) {\n\t\t\tmemberIdList.push(item.id);\n\t\t\tif (item.relationID === 0) {\n\t\t\t\tif (item.gender === 'M') {\n\t\t\t\t\ttableRowId\n\t\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Man-A.png\" id=\"'\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+'</td>');\n\t\t\t\t} else {\n\t\t\t\t\ttableRowId\n\t\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Lady-A.png\" id=\"'\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+'</td>');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (item.relationID === 1) {\n\t\t\t\tif (item.gender === 'M') {\n\t\t\t\t\ttableRowId\n\t\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Lady-A.png\" id=\"'\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\t\t\t\t} else {\n\t\t\t\t\ttableRowId\n\t\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Man-A.png\" id=\"'\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (item.relationID === 2) {\n\n\t\t\t\ttableRowId\n\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Boy-A.png\" id=\"'\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\n\t\t\t}\n\n\t\t\tif (item.relationID === 3) {\n\n\t\t\t\ttableRowId\n\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Girl-A.png\" id=\"'\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\n\t\t\t}\n\n\t\t\tif (item.relationID === 4) {\n\n\t\t\t\ttableRowId\n\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Father-A.png\" id=\"'\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\n\t\t\t}\n\t\t\tif (item.relationID === 5) {\n\n\t\t\t\ttableRowId\n\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Mother-A.png\" id=\"'\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\n\t\t\t}\n\t\t\tif (item.relationID === 6) {\n\n\t\t\t\ttableRowId\n\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Other-A.png\" id=\"'\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\t\t\t}\n\t\t\t\n\t\t\tif (item.relationID === 7) {\n\n\t\t\t\ttableRowId\n\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Other-A.png\" id=\"'\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\t\t\t}\n\t\t\t\n\t\t\tif (item.relationID === 8) {\n\n\t\t\t\ttableRowId\n\t\t\t\t.append('<td><img src=\"../Common/assets/images/icons/Other-A.png\" id=\"'\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ '\" onClick=\"onClickImageCus('\n\t\t\t\t\t\t+ item.id\n\t\t\t\t\t\t+ ')\" class=\"assetOwner1_img\" alt=\"'+item.relationName+'\" tabindex=\"200\"/>'+item.relationName+' '+item.firstName+'</td>');\n\t\t\t}\n\t\t});\n\t\tonClickImageCus(memberIdList[0]);\n\t}\n\n}", "title": "" }, { "docid": "cc865a79b380b56caa270a8f76a6c7b6", "score": "0.4966017", "text": "static async findProfile(string){\n const result=await pool.query(\"select *,LOWER(fname),INSTR(LOWER(fname),?) FROM student,studdata WHERE INSTR(LOWER(fname),?)>0 AND student.email=studdata.email ORDER BY INSTR(LOWER(fname),?);\",[string,string,string]);\n return result;\n }", "title": "" }, { "docid": "a81032bb1575ac0a2e38bd7ce9461008", "score": "0.49591506", "text": "function filterTable(members) {\n console.log(\"______FILTER____\")\n document.getElementById(\"senate-data\").innerHTML = \"\";\n\n //----checked---CheckboxesParty:\n const checkedBoxes = Array.from(\n document.querySelectorAll(\"input[name=party]:checked\")\n );\n const checkedBoxesValues = checkedBoxes.map(node => node.value);\n console.log(checkedBoxesValues);\n //----selected---StateFilter:\n const selectedState = Array.from(\n document.querySelectorAll(\"option:checked\")\n );\n const selectedStateValue = selectedState.map(node => node.value);\n console.log(selectedStateValue);\n\n\n //---------------------update Table via set Filters--------------------//\n\n const filteredMembersList = [];\n\n for (var i = 0; i < fullDataList.length; i++) {\n if (checkedBoxesValues.length === 0 && selectedStateValue.length === 0) {\n filteredMembersList.push(fullDataList[i])\n }\n if (checkedBoxesValues.length === 0 && selectedStateValue.length > 0 && selectedStateValue.includes(fullDataList[i].state)) {\n filteredMembersList.push(fullDataList[i])\n }\n if (checkedBoxesValues.length > 0 && checkedBoxesValues.includes(fullDataList[i].party) && selectedState.length === 0) {\n filteredMembersList.push(fullDataList[i])\n }\n if (checkedBoxesValues.length > 0 && checkedBoxesValues.includes(fullDataList[i].party) && selectedStateValue.length > 0 && selectedStateValue.includes(fullDataList[i].state)) {\n filteredMembersList.push(fullDataList[i])\n }\n }\n\n fullDataList = [];\n\n getData(\n \"senate-data\",\n filteredMembersList,\n \"fullName\",\n \"party\",\n \"state\",\n \"seniority\",\n \"votes\",\n members\n );\n}", "title": "" }, { "docid": "aa0cbd5de8fb1197544e6a29dcd485d7", "score": "0.494628", "text": "getTable() {\n Contract.getProfiles().then(rows => this.setState({ profileTable: rows }));\n }", "title": "" }, { "docid": "6e655d44411db3e3dad91f8a42e76c67", "score": "0.49210978", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < dataSet.length; i++) {\n // Get get the current address object and its fields\n var fried_chicken = dataSet[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\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 at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = fried_chicken[field];\n }\n }\n }", "title": "" }, { "docid": "161623cbc0b3452fc13ad1549636b1db", "score": "0.49208415", "text": "function getData() {\r\n let result = fetch(\"https://cs5003-api.host.cs.st-andrews.ac.uk/api/yaks?key=ae26c4ea-2ca8-4c01-83e5-e4d810950cf1\", {\r\n method: 'GET', \r\n }).then(res =>{\r\n //console.log(res);\r\n return res.json();\r\n })\r\n .then(dat => {\r\n //console.log(dat);\r\n let response = fetch(\"https://cs5003-api.host.cs.st-andrews.ac.uk/api/user?key=ae26c4ea-2ca8-4c01-83e5-e4d810950cf1\", \r\n {\r\n method: 'GET'\r\n }).then(response =>\r\n {\r\n console.log(response);\r\n return response.json();\r\n })\r\n .then(data => {\r\n console.log(data.userNick); \r\n popTable(dat,data.userNick);\r\n })\r\n .catch(error =>{\r\n console.log(error+\"error\");\r\n }) \r\n })\r\n .catch(err=> \r\n {\r\n console.log(err+\"err\");\r\n })\r\n}", "title": "" }, { "docid": "f0905b20a3f48d06f7ca52b1d37c45e6", "score": "0.49170706", "text": "getAllCounties(callback) {\n super.query('SELECT * FROM county', [], callback);\n }", "title": "" }, { "docid": "93b1cbacebe348a0cb4e722ef5dd0d11", "score": "0.4907697", "text": "function doPartyStat() {\r\n\tvar allElements;\r\n\tallElements = document.getElementById('contentRow').children[1];\r\n\t\r\n\tvar tmp;\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Party statistics)/,\"Partijų statistika\");\r\n\t\r\n\ttmp = allElements.children[1];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Country)/,\"Valstybė\");\r\n\treplaceInputByValue({\"Show\":[\"Show\",\"Rodyti\"]});\r\n\treplaceInputByValue({\"Leave party\":[\"Leave party\",\"Palikti partiją\"]});\r\n\treplaceInputByValue({\"Join\":[\"Join\",\"Įstori\"]});\r\n\t\r\n\tvar results;\r\n\tresults = getElements(document, \"//table[@class='dataTable']\");\r\n\tfor (var i = 0; i < results.snapshotLength; i++) {\r\n\ttmp = results.snapshotItem(i);\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(No.)/,\"Nr.\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Country)/,\"Valstybė\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Party)/,\"Partija\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Members)/,\"Narių skaičius\");\r\n\tobj = results.snapshotItem(i);\r\n\t}\r\n}", "title": "" }, { "docid": "edc4e86c5b26632ace43a2c16eb3a244", "score": "0.49012977", "text": "function getRegestrationData() {\r\n\t\tfor (var i = 0; i < student_details.length; i++) {\r\n\t\t\tif (student_details[i].sex == \"M\") {\r\n\t\t\t\tcountMale++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tcountFemale++;\r\n\t\t\t}\r\n\r\n\t\t\tcountTotal = student_details.length;\r\n\t\t}\r\n\r\n\t\tbuildGenderRaceTable(student_details);\r\n\t}", "title": "" }, { "docid": "6046736626c3ab9139d1bf87cbde2f1f", "score": "0.4901005", "text": "function LoadData() {\n //Players Table :\n getChallengers();\n getDiamonds();\n getPlats();\n getGolds();\n}", "title": "" }, { "docid": "4ff4fc6afce8694d000a1b8fbdbdd5f5", "score": "0.48987398", "text": "function getOralTable(){\n\tdataReceived = \"\";\n\tgetData(\"oral.php\", sid);\n\tvar oralData = JSON.parse(dataReceived);\n\t//console.log(oralData);\n\tif(curedDname[1][1].length!=0){\n\t\tcreatTable(\"Oral\");\n\t\t\tfor(var i = 0; i < curedDname[1][1].length; i++){\n\t\t\t\t\t//if(diseaseName!=curedDname[1][0][j])\n\t\t\t\t\tinsertRowRef('oral-table',curedDname[1][1][i]);\n\t\t\t}\t\n\t}\n\n\tif(oralData['ref'] != null && oralData['check']!=0 && curedDname[2]==null){\n\t\tcreatTable(\"Oral\");\n\t\tfor(var i = 0; i < oralData['colNames'].length; i++){\n\t\t\tvar diseaseName = oralData['colNames'][i];\n\t\t\tinsertRowRef('oral-table',diseaseName);\n\t\t}\n\n\t}\n\t/*else if(oralData['ref'] != null && oralData['check']!=0 && curedDname[0][1].length!=0){\n\t\tif(curedDname[0][1].length!=oralData['colNames'].length){\n\t\t\tcreatTable(\"Oral\");\n\t\t\tfor(var i = 0; i < oralData['colNames'].length; i++){\n\t\t\t\tvar diseaseName = oralData['colNames'][i];\n\t\t\t\tfor(j=0;j<curedDname[0][1].length;j++){\t\n\t\t\t\t\tif(diseaseName!=curedDname[0][1][j])\t\n\t\t\t\t\tinsertRowRef('oral-table',diseaseName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}*/\n}", "title": "" }, { "docid": "61aad0230838f3bf60707d2b50035fb8", "score": "0.48904642", "text": "function renderTable(begin,end) {\n\t$tbody.innerHTML = \"\";\n\n\t// Create if statement b/c sometimes filtered results are less than the preset number of displayed results and it loops too many times\n\tif (filteredData.length < end) {\n\t\tfor (var i = begin, ii = filteredData.length; i<ii; i++) {\n\t\t\tvar sighting = filteredData[i];\n\t\t\tvar fields = Object.keys(sighting);\n\n\t\t\t// Create a new row in the tbody, set the index to be i + startingIndex\n\t\t\tvar $row = $tbody.insertRow();\n\t\t\tfor (var j = 0, jj = fields.length; j<jj; j++) {\n\n\t\t\t// For every field in the address object, create a new cell \n\t\t\t// and set its inner text to be the current value at the current address's field\n\t\t\tvar field = fields[j];\n\t\t\tvar $cell = $row.insertCell(j);\n\t\t\t$cell.innerText = sighting[field];\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\tfor (var i = begin, ii = end; i<ii; i++) {\n\n\t\t// Get get the current alien sighting object and its fields\n\t\tvar sighting = filteredData[i];\n\t\tvar fields = Object.keys(sighting);\n\n\t\t// Create a new row in the tbody, set the index to be i + startingIndex\n\t\tvar $row = $tbody.insertRow();\n\t\t\tfor (var j = 0, jj = fields.length; j<jj; j++) {\n\n\t\t\t// For every field in the address object, create a new cell \n\t\t\t// and set its inner text to be the current value at the current address's field\n\t\t\tvar field = fields[j];\n\t\t\tvar $cell = $row.insertCell(j);\n\t\t\t$cell.innerText = sighting[field];\n\t\t\t};\n\t\t};\n\t};\n}", "title": "" }, { "docid": "b7e3e7d8a94e81a6eb307c10303a03cd", "score": "0.48892504", "text": "function addScoutToTable(scout_name, scout_id) {\n $(\".scout-list-table\").append(`\n <tr>\n <td>` + scout_name + `</td>\n <td class=matches-` + scout_id + `>1</td>\n </tr>\n `);\n}", "title": "" }, { "docid": "a2e8f55308c769007fc3b90101620e5e", "score": "0.4888417", "text": "function getMembersWithDep(persons) {\n //write your code here\n}", "title": "" }, { "docid": "5df2d8338b5e936c06c5f498f7d359bb", "score": "0.48854244", "text": "function collegestat(){\n\t\n//this function pulls college stats from 2014 and 2013 NCAAF season\n\t\n}", "title": "" }, { "docid": "0eb12c15446c7b8b013f250c5230ce45", "score": "0.48831922", "text": "function renderTableData(dataObject) {\r\n\r\n let url = dataObject.url;\r\n\r\n fetch(url, {\r\n method: \"GET\",\r\n headers: {\r\n // for apiKey see keys.js\r\n \"X-API-Key\": apiKey,\r\n }\r\n })\r\n .then(response => {\r\n if (response.ok) {\r\n return response.json();\r\n }\r\n throw new Error(\"Request failed!\");\r\n }, networkError => console.log(networkError.message))\r\n .then(jsonResponse => {\r\n data = jsonResponse;\r\n memberList = data.results[0].members;\r\n\r\n // execute filter function to add content to checkedCheckboxesList\r\n filterByParty();\r\n\r\n // make filter checkboxes listen for change and update checkedCheckboxesList on change\r\n for (node of document.querySelectorAll(\".check-filter-party\")) {\r\n node.addEventListener(\"change\", () => {\r\n filterByParty();\r\n });\r\n };\r\n\r\n createDropdownFilter();\r\n\r\n // add event listener to select element\r\n document.getElementById(\"states-dropdown\").addEventListener(\"change\", () => {\r\n filterByState();\r\n });\r\n\r\n // disable loaders\r\n for (node of document.querySelectorAll(\".loader-table\")) {\r\n node.remove();\r\n };\r\n\r\n createMemberTable(filtersArr, selectedStateFilter);\r\n })\r\n\r\n}", "title": "" }, { "docid": "56ce8c16276990bc6b079b757733e557", "score": "0.48781124", "text": "function getInLaws(name, gender, allFamily){\n ;\n var finalInLaws = []; \n var familyMember = allFamily.filter((obj) => {return obj.name === name});\n let spouse = getKey(familyMember , 'spouse');\n\n let inLaws = getSibling(spouse, allFamily);\n\n if(gender == 'F'){\n spouse = getKey(inLaws, 'spouse');\n\n inLaws = inLaws.filter((obj) => {return obj.gender === 'F'});\n finalInLaws = getKey(inLaws, 'name') ;\n const getinlaws = finalInLaws .concat( ' ',spouse)\n\n console.log( getinlaws );\n\n }else if(gender == 'M'){\n spouse = getKey(inLaws, 'spouse');\n inLaws = inLaws.filter((obj) => {return obj.gender === 'M'});\n finalInLaws = getKey(inLaws, 'name') ;\n const getinlaws = finalInLaws .concat( ' ',spouse)\n\n console.log( getinlaws );\n }\n \n //return getinlaws ; \n}", "title": "" }, { "docid": "d5987bdc1c663312c95ce071d2afd991", "score": "0.48760554", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredAlien.length; i++) {\n // Get get the current address object and its fields\n var address = filteredAlien[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\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 at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n \n}\n} \n}", "title": "" }, { "docid": "7a5124a039166a4043430c61ef11a486", "score": "0.48689812", "text": "function searchAll(){\n connection.query('SELECT employee.first_name as \"First Name\", employee.last_name as \"Last Name\", department.name as \"Department\" FROM role INNER JOIN employee ON employee.role_id = role.id INNER JOIN department on department.id = role.department_id; ',(err,data) => {\n console.table(data);\n init();\n });\n}", "title": "" }, { "docid": "ee65b9dca0b3ec9014841712272aead5", "score": "0.48675135", "text": "function displayAllMembers(container) {\n\n fetch('http://sandbox.bittsdevelopment.com/code1/fetchemployees.php')\n .then((response) => {\n return response.json();\n })\n .then((allMembersObject) => {\n\n let cards = \"\";\n \n // Iterate over all employees and construct the HTML code for each person's card by using the generateCard() function\n Object.entries(allMembersObject).forEach(([key, value]) => {\n const card = generateCard(value);\n cards += card;\n });\n \n container.innerHTML = cards;\n\n })\n .catch((err) => {\n console.log(err)\n });\n\n}", "title": "" }, { "docid": "2560746fbff74e168e937a6dd08b4fbb", "score": "0.4866147", "text": "getStade(){\n fetch('')\n //RESPONSE\n .then(function(response){\n //console.log(responseEtatFetch.text());\n return response.json();\n })\n\n //DATA\n .then(function (data){\n //console.log(data);\n var output = ``;\n data.forEach ((row) =>{\n //console.log(row);\n output += `<tr><td>${row.nom_stade}</td>\n <td>${row.adresse_stade}</td>\n <td>${row.cp_stade}</td></tr>`;\n });\n document.getElementById(`liste-stade`).innerHTML += output;\n })\n //RENVOYER UNE ERREUR SI LE FICHIER FECTH N EST PAS TROUVE\n .catch(function(error){\n console.log(error);\n });\n }", "title": "" }, { "docid": "75ffdb75e2f920e4af3e921a0d9e5162", "score": "0.4864524", "text": "function getHouseList()\n{\n // houses element\n var houses = xmlDoc.getElementsByTagName(\"houses\")[0];\n\n var house = houses.getElementsByTagName(\"house\");\n\n // get wages rate\n var wagesRate = houses.parentNode.getElementsByTagName(\"rate\")[0].firstChild.nodeValue;\n\n var cardtop = \"<div class='card'>\"+\n \"<h4 class='card-header bg-info text-white'>House List</h4>\"+\n \"<div class='card-body table-responsive'>\";\n var cardbot = \"</div>\"+\n \"</div>\"+\n \"<br><br>\";\n\n var housetable = \"<table class='table table-bordered' id='houseTable'>\"+\n \"<thead><tr class='bg-info text-white'>\"+\n \"<th>#</th>\"+\n \"<th>Owner</th>\"+\n \"<th>Address</th>\"+\n \"<th>Type</th>\"+\n \"<th>Hire Date</th>\"+\n \"<th>Total Wages</th>\"+\n \"<th>View Schedule</th>\"+\n \"</tr></thead><tbody>\";\n\n for(i=0;i<house.length;i++)\n {\n var houseIndex = i;\n\n // get house type attribute\n var housetype = house[i].getAttribute(\"type\");\n\n // get house address\n var haddress = house[i].getElementsByTagName(\"address\")[0];\n var hstreet = haddress.getElementsByTagName(\"street\")[0].firstChild.nodeValue;\n var hcity = haddress.getElementsByTagName(\"city\")[0].firstChild.nodeValue;\n var hstate = haddress.getElementsByTagName(\"state\")[0].firstChild.nodeValue;\n var hpostcode = haddress.getElementsByTagName(\"postcode\")[0].firstChild.nodeValue;\n\n var fullAddress = hstreet+\", \"+hpostcode+\" \"+hcity+\", \"+hstate;\n\n // get house owner\n var howner = house[i].getElementsByTagName(\"owner\")[0];\n var hname = howner.getElementsByTagName(\"name\")[0].firstChild.nodeValue;\n var hcontact = howner.getElementsByTagName(\"contact\")[0];\n var hphone = hcontact.getElementsByTagName(\"phone\")[0].firstChild.nodeValue;\n var hemail = hcontact.getElementsByTagName(\"email\")[0].firstChild.nodeValue;\n\n var houseOwnerContact = \"Name: \"+hname+\"<br>Phone: \"+hphone+\"<br>Email: \"+hemail;\n\n // get house hire date\n var hiredate = house[i].getElementsByTagName(\"date\")[0];\n var start_date = hiredate.getElementsByTagName(\"start_hire\")[0].firstChild.nodeValue;\n var end_date = hiredate.getElementsByTagName(\"end_hire\")[0].firstChild.nodeValue; \n\n housetable += \"<tr>\"+\n \"<td>\"+(i+1)+\"</td>\"+\n \"<td>\"+houseOwnerContact+\"</td>\"+\n \"<td>\"+fullAddress+\"</td>\"+\n \"<td>\"+toInitUpperCase(housetype)+\"</td>\"+\n \"<td>\"+\n \"<table class='table table-bordered'>\"+\n \"<tr class='bg-info text-white'>\"+\n \"<th>Start Date</th>\"+\n \"<th>End Date</th>\"+\n \"</tr>\"+\n \"<tr>\"+\n \"<td>\"+start_date+\"</td>\"+\n \"<td>\"+end_date+\"</td>\"+\n \"</tr>\"+\n \"</table>\"+\n \"</td>\"+\n \"<td align='center'>RM\"+calcTotalWages(houseIndex,wagesRate)+\"</td>\"+\n \"<td><button class='btn btn-success btn-sm' onclick='getSchedule(\"+houseIndex+\")'>View Schedule</button></td>\"+\n \"</tr>\";\n }\n\n housetable += \"</tbody></table>\";\n\n // get output area, and output\n $(document).ready(function(){\n // empty old data\n $(\"#content\").empty();\n $(\"#schedule\").empty();\n $(\"#content\").append(cardtop + housetable + cardbot).hide().fadeIn(\"slow\");\n var houseTable = $('#houseTable').DataTable(); // initialize datatables\n });\n}", "title": "" }, { "docid": "5add324e8ad14bd43fcb5c5ea26ccaec", "score": "0.48638934", "text": "function renderTable() {\r\n $tbody.innerHTML = \"\";\r\n for (var i = 0; i < sightings_data.length; i++) {\r\n // Get get the current address object and its fields\r\n var sighting = sightings_data[i];\r\n var fields = Object.keys(sighting);\r\n // Create a new row in the tbody, set the index to be i + startingIndex\r\n var $row = $tbody.insertRow(i);\r\n for (var j = 0; j < fields.length; j++) {\r\n // For every field in the address object, create a new cell at set its inner text to be the current value at the current address's field\r\n var field = fields[j];\r\n var $cell = $row.insertCell(j);\r\n $cell.innerText = sighting[field];\r\n }\r\n }\r\n}", "title": "" }, { "docid": "fe84e58180070c300e4009c5b91b8840", "score": "0.48529476", "text": "function onChangeTable()\r\n{\r\n var conn = LIST_CONNECTION.get();\r\n var table = LIST_TABLE.get();\r\n if (table != MM.LABEL_NoTables)\r\n {\r\n var colsAndTypes = MMDB.getColumnAndTypeOfTable(conn,table)\r\n var colNames = new Array();\r\n\r\n for (var i=0; i < colsAndTypes.length; i+=2)\r\n {\r\n colNames.push (colsAndTypes[i]);\r\n\r\n }\r\n if (colNames && colNames.length > 0)\r\n {\r\n LIST_RSUSERNAME.setAll(colNames, colNames);\r\n LIST_RSPASSWORD.setAll(colNames, colNames);\r\n LIST_RSPASSWORD.setIndex(1);\r\n LIST_RSAUTHORIZATION.setAll(colNames, colNames);\r\n } \r\n else\r\n {\r\n LIST_RSUSERNAME.setAll(Array(MM.LABEL_NoRecordsetFieldsFound), Array());\r\n LIST_RSPASSWORD.setAll(Array(MM.LABEL_NoRecordsetFieldsFound), Array());\r\n LIST_RSAUTHORIZATION.setAll(Array(MM.LABEL_NoRecordsetFieldsFound), Array());\r\n }\r\n } \r\n else \r\n {\r\n LIST_RSUSERNAME.setAll(EMPTY_LIST,EMPTY_LIST);\r\n LIST_RSPASSWORD.setAll(EMPTY_LIST,EMPTY_LIST);\r\n LIST_RSAUTHORIZATION.setAll(EMPTY_LIST,EMPTY_LIST);\r\n }\r\n}", "title": "" }, { "docid": "3c7c12acfccedebef8a1c099e6b510af", "score": "0.4850406", "text": "function refreshTable() { \n\t// Verbindung mit dem Server für Anzeige aller Personen bzw. fetch lädt die Seite auf dem Server\n\tfetch(\"/json/persons/all\")\n\t\t.then(getJson) \t\t\t\t \t // entspricht: .then( irgendwas => irgendwas.json() )\n\t\t.then(getTxtFromJsonUndPackInsHTMLForTable) // entpricht: cell.textContent = myjson.personen[0].vorname);\n}", "title": "" }, { "docid": "c3eeb6a700e03b6cbf484dc5a52338ad", "score": "0.48470396", "text": "function collapseList() {\n\n // ******* TODO: PART IV *******\n tableElements = [];\n for(var i=0; i < teamData.length; i++){\n tableElements.push(teamData[i]);\n }\n\n updateTable();\n}", "title": "" }, { "docid": "47293c15abdc7de1af1f8d8bdb063eb0", "score": "0.4843218", "text": "function countyInfo(countyName, stateName, stateAbbr) {\n fetch(\"https://coronavirus-smartable.p.rapidapi.com/stats/v1/US-\" + stateAbbr + \"/\", {\n \"method\": \"GET\",\n \"headers\": {\n \"x-rapidapi-key\": virusKey,\n \"x-rapidapi-host\": \"coronavirus-smartable.p.rapidapi.com\"\n }\n })\n .then(response => {\n return response.json().then(function (response) {\n var countyLength = response.stats.breakdowns;\n for (i = 0; i < countyLength.length; i++) {\n if (countyLength[i].location.county === countyName) {\n var countyDeaths = countyLength[i].totalDeaths;\n var countyCases = countyLength[i].totalConfirmedCases;\n countyPopulation(countyName, stateName, countyCases, countyDeaths);\n }\n }\n })\n })\n .catch(err => {\n console.error(err);\n });\n }", "title": "" }, { "docid": "b397fc894c05b2c3c93688e59db8cf60", "score": "0.484019", "text": "function get_table_info() {\n ;\n}", "title": "" }, { "docid": "35ed0f4e0513af917c6c3ff126d88b04", "score": "0.4838155", "text": "function fetchCharacters() {\n let returned = fetchedData.characterInfo.map((data) => {\n return (\n <tr key={data.name}>\n <td> {data.name} </td>\n <td>{data.gender}</td>\n <td> {data.birth_year}</td>\n <td> {data.mass} </td>\n <td>{data.height}</td>\n </tr>\n );\n });\n return returned;\n }", "title": "" }, { "docid": "e56345f50d2a140296e77178398401cf", "score": "0.48369604", "text": "function buildUFOTable(){\n // Filter the data based on filter criterion\n var newTable = tableData.filter(selectUFOData);\n\n // Populate total sightings \n document.getElementById(\"totalUFO\").innerHTML = newTable.length;\n\n // Reference the ufo-table body and clear table's content\n ufoTableBody = document.getElementById(\"ufo-table\").getElementsByTagName(\"tbody\")[0];\n cleanupUFOTable();\n \n // Loop thru each returned sighting and populate the ufo-table\n newTable.forEach((ufo) => {\n var newRow = ufoTableBody.insertRow(ufoTableBody.rows.length);\n Object.values(ufo).forEach((value) =>{\n var newCell = newRow.insertCell(newRow.cells.length);\n newCell.innerHTML = value;\n });\n });\n}", "title": "" }, { "docid": "22aff0337c62b75aaa90d1e1b7a36337", "score": "0.48261732", "text": "function BstpSpeciesTable(obj){\r\n\t\tthis.obj = obj;\r\n\t\t\r\n\t\tthis.init = function(searchArgs){\r\n\t\t\tthis.obj.bootstrapTable(\"destroy\");\r\n\t\t\tthis.obj.bootstrapTable({\r\n\t\t\t\turl: '../data/getSpeciesData',\r\n method: 'post',\r\n contentType: \"application/x-www-form-urlencoded\",\r\n \r\n queryParamsType:'limit', \r\n queryParams: function queryParams(params) { \r\n var param = { \r\n limit: params.limit, \r\n offset: params.offset\r\n }; \r\n for(var key in searchArgs){\r\n param[key]=searchArgs[key]\r\n } \r\n return param; \r\n }, \r\n \r\n locale:'zh-CN',//support Chinese\r\n pagination: true,//Open pagination function\r\n sortName:\"\",\r\n exportDataType:\"basic\",\r\n showExport:true,\r\n exportTypes:['excel','csv'],\r\n exportOptions:{ \r\n ignoreColumn: [0,7], //Ignore exporting the columns to file\r\n fileName: 'data dictionary species', //the file name \r\n worksheetName: 'sheet1', //file work sheet name\r\n tableName: 'data dictionary species', \r\n excelstyles: ['background-color', 'color', 'font-size', 'font-weight'], \r\n onMsoNumberFormat: DoOnMsoNumberFormat \r\n }, \r\n buttonsAlign:'left',\r\n pageNumber:1,//the default page is 1\r\n pageSize: 10,//each page display 10 records\r\n pageList: \"[10,25,50,100,all]\",//how many records each page can display\r\n sidePagination: \"server\", //pagination type: server side or client side\r\n showRefresh:true,//refresh button\r\n columns: [\r\n {field: 'state',checkbox:true}, \r\n {field:'id',visible:false},\r\n {field: 'group.id',visible:false},\r\n {field: 'cropCode',title: '作物略号',halign:'center',sortable:true,order:'asc'},\r\n {field: 'no',title: 'No',halign:'center',sortable:true,order:'asc'},\r\n {field: 'speciesNameEn',title: 'species',halign:'center'},\r\n {field: 'speciesNameCn',title: '作物名',halign:'center'},\r\n {field: 'speciesNameCn2',title: '作物名2',halign:'center'},\r\n {field: 'group.nameCn',title: '分类',halign:'center'},\r\n ]\r\n\t\t\t});\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "372074c48a7d0b4101eb9385224835cd", "score": "0.48215073", "text": "function CheckInSubEntitySkaterCoach(parameters) {\n this.member_number = '';\n var first_name = parameters.first_name, id = parameters.id, last_name = parameters.last_name, compliance_summary = parameters.compliance_summary, ineligible = parameters.ineligible;\n this.first_name = first_name;\n this.id = id;\n this.last_name = last_name;\n this.compliance_summary = compliance_summary;\n this.ineligible = ineligible;\n }", "title": "" }, { "docid": "61106d9adce4791f641bbb0f89cfb45f", "score": "0.48213422", "text": "function allStudentData(){\n\t\t$.ajax({\n\n\t\t\turl: 'inc/ajax/show_all.php',\n\t\t\tsuccess: function(data){\n\t\t\t\t$('tbody#all_students_data').html(data);\n\t\t\t}\n\n\t\t});\n\t}", "title": "" }, { "docid": "c9d10aaa5154e41081053c39a25856bd", "score": "0.48181581", "text": "function createTable4() {\r\n var table = document.getElementById(\"info4\");\r\n var myInnerHtml = \"\";\r\n\r\n for (var i = 0; i < statistics.votes_party_prc_senate.length; i++) {\r\n\r\n myInnerHtml += \"<tr>\";\r\n myInnerHtml += \"\";\r\n\r\n myInnerHtml += \"<td><a href = ' ' >\" + statistics.votes_party_prc_senate[i].fullName + \"</a></td>\";\r\n\r\n myInnerHtml += \"<td>\" + statistics.votes_party_prc_senate[i].totalVotes + \"</td>\";\r\n\r\n myInnerHtml += \"<td>\" + statistics.votes_party_prc_senate[i].votes_with_party_pct + \"</td>\";\r\n\r\n\r\n\r\n myInnerHtml += \"</tr>\";\r\n\r\n }\r\n table.innerHTML = myInnerHtml;\r\n\r\n }", "title": "" }, { "docid": "a3b7357efcf0e4081cee990ab56a0c62", "score": "0.4812734", "text": "function createTable() {\n let message = true;\n var tableBody = document.getElementById(\"tableBody\");\n tableBody.innerHTML = \"\";\n for (var i = 0; i < members.length; i++) {\n var tableRow = document.createElement(\"tr\");\n //for each row create 5 cells (full name, party, state, seniority, precentage of votes)\n var firstName = members[i].first_name;\n var middleName = members[i].middle_name;\n //control de los que no tienen middleName\n if (middleName === null) {\n middleName = \"\";\n }\n var lastName = members[i].last_name;\n var completeName = firstName + \" \" + middleName + \" \" + lastName;\n\n var link = document.createElement(\"a\");\n link.setAttribute(\"href\", members[i].url);\n link.innerHTML = completeName;\n var party = members[i].party;\n var state = members[i].state;\n var seniority = members[i].seniority;\n var votesParty = members[i].votes_with_party_pct + \" %\";\n var cells = [link, party, state, seniority, votesParty];\n\n if (showMember(members[i])) {\n message = false;\n for (var j = 0; j < cells.length; j++) {\n var tableCell = document.createElement(\"td\");\n tableCell.append(cells[j]);\n tableRow.append(tableCell);\n }\n tableBody.append(tableRow);\n }\n }\n\n if (message) {\n var tableRow = document.createElement(\"tr\");\n var tableCell = document.createElement(\"td\");\n tableRow.append(tableCell);\n tableCell.innerHTML = \"There are no Independent members in the chamber.\";\n tableRow.append(tableCell);\n tableBody.append(tableRow);\n }\n}", "title": "" }, { "docid": "f332d1bd5abd3a00b0d818e046db1b38", "score": "0.48119855", "text": "function ListAllTable(isFetchOrder) {\n\tthis.isFetchOrder = isFetchOrder;\n this.getXML = function() {\n var xml = soapXMLBegin;\n xml += ApiReader.xmltag('ListAreasType',ApiReader.xmltag('fetchOrders',isFetchOrder));\n xml += soapXMLEnd;\n return xml;\n };\n}", "title": "" }, { "docid": "3edecae6ef833d071d345f9e226a46ae", "score": "0.4806112", "text": "function addMemberRecordToTable(data) {\n var memberslist = document.getElementById(\"memberslist\").getElementsByTagName(\"tbody\")[0];\n var newRecord =memberslist.insertRow(memberslist.length);\n\n var cell1 = newRecord.insertCell(0);\n cell1.innerHTML = data.Customerid;\n var cell2 = newRecord.insertCell(1);\n cell2.innerHTML = data.CustName;\n var cell3 = newRecord.insertCell(2);\n cell3.innerHTML = data.TelephoneNo;\n var cell4 = newRecord.insertCell(3);\n cell4.innerHTML = data.Email;\n var cell5 = newRecord.insertCell(4);\n cell5.innerHTML = '<a onclick=\"showOne(this)\">View</a> <a onclick=\"onMemberEdit(this)\">Edit</a> <a onClick=\"onMemberDelete(this)\">Delete</a>'; \n}", "title": "" }, { "docid": "7eefc80edff35111dd9ce202e2eec6ca", "score": "0.4799131", "text": "function getHouseholds() {\n $.ajax({\n url: url + 'Dashboard/GetHouseholds',\n type: \"post\",\n data: {action: 'gethouseholds'},\n success: function (response) {\n $('#showHouseholds').html(response);\n $('#table_households').DataTable({\n order: [0, 'asc']\n })\n },\n error: function (xhr) {\n console.log('Request Status:' + xhr.status);\n console.log('Status Text:' + xhr.statusText);\n console.log(xhr.responseText);\n }\n });\n }", "title": "" }, { "docid": "b2b38c256b01768e5a439773bab59d33", "score": "0.47979456", "text": "displayAsiaData(asianCountries, allCountries, tableRows){ \n\n for(let i = 0; i < allCountries.length; i++){\n if(asianCountries.indexOf(allCountries[i]) > -1){\n tableRows[i].style.display ='';\n }else{\n tableRows[i].style.display = 'none';\n }\n }\n }", "title": "" }, { "docid": "ba5932d4e34a60ae13c28f946265ce08", "score": "0.47959295", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredAlien.length; i++) {\n // Get get the current address object and its fields\n var address = filteredAlien[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\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 at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n }\n }\n}", "title": "" }, { "docid": "ba5932d4e34a60ae13c28f946265ce08", "score": "0.47959295", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredAlien.length; i++) {\n // Get get the current address object and its fields\n var address = filteredAlien[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\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 at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n }\n }\n}", "title": "" }, { "docid": "ba5932d4e34a60ae13c28f946265ce08", "score": "0.47959295", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredAlien.length; i++) {\n // Get get the current address object and its fields\n var address = filteredAlien[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\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 at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n }\n }\n}", "title": "" }, { "docid": "ba5932d4e34a60ae13c28f946265ce08", "score": "0.47959295", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredAlien.length; i++) {\n // Get get the current address object and its fields\n var address = filteredAlien[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\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 at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n }\n }\n}", "title": "" }, { "docid": "64e287e1ebfba0e61a3c790b77541056", "score": "0.47912535", "text": "function getGeneralTable(){\n\tdataReceived = \"\";\n\tgetData(\"general.php\", sid);\n\tvar genData = JSON.parse(dataReceived);\n\tconsole.log(genData);\n\n\tif(curedDname[1][4].length!=0){\n\t\tcreatTable(\"General\");\n\t\t\tfor(var i = 0; i < curedDname[1][4].length; i++){\n\t\t\t\t\t//if(diseaseName!=curedDname[1][0][j])\n\t\t\t\t\tinsertRowRef('general-table',curedDname[1][4][i]);\n\t\t\t}\t\n\t}\n\n\tif(genData['ref'] != null && genData['check']!=0 && curedDname[2]==null){\n\t\tcreatTable(\"General\");\n\t\tfor(var i = 0; i < genData['colNames'].length; i++){\n\t\t\tvar diseaseName = genData['colNames'][i];\n\t\t\tinsertRowRef('general-table',diseaseName);\n\t\t}\n\n\t}\n\t/*else if(genData['check']!=0 && genData['ref'] != null && curedDname[0].length!=0){\n\t\tif(curedDname[0][4].length!=genData['colNames'].length){\n\t\t\tcreatTable(\"General\");\n\t\t\tfor(var i = 0; i < genData['colNames'].length; i++){\n\t\t\t\tvar diseaseName = genData['colNames'][i];\n\t\t\t\tfor(j=0;j<curedDname[0][4].length;j++){\t\n\t\t\t\t\tif(diseaseName!=curedDname[0][4][j])\t\t\n\t\t\t\t\tinsertRowRef('general-table',diseaseName);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}*/\n}", "title": "" }, { "docid": "0ed8afbd5b4b798759819dfea298da73", "score": "0.47895518", "text": "function databack_getSchStudentList(xml){\r\n\t$('#table_editStudList tr').remove();\r\n\t\r\n\tif ($(xml).find('schStudentList').size() > 0) {\r\n\t\t$(xml).find('schStudentList').each(function(){\r\n\t\t\t$('#table_editStudList').append('<a class=\"a_editStudList list_'+$(this).find('gender').text()+'\" href=\"#'+$(this).find('userkey').text()+'\">●'+$(this).find('username').text()+'</a>');\r\n\t\t});\r\n\t}\r\n}", "title": "" }, { "docid": "288ee8c22e0732b975acf07b4ffe53e8", "score": "0.4788111", "text": "function getPersonsFull() {\n\t//TODO\n}", "title": "" }, { "docid": "5c59804f1c3efa81566fb80dcf4a6c81", "score": "0.4787395", "text": "function fecthMembers() {\n \n let fetch=1;\n let url = \"../controller/MembersC.php\";\n\n $.post(url, {fetch}, function (response) {\n \n if (response) {\n \n let members = JSON.parse(response);\n template = \"\";\n members.forEach(member => {\n template+=` \n <li>${member.name} ${member.surname}</li>`;\n });\n \n\n \n $(\"#members-list\").html(template);\n $(\"#members-list\").show();\n\n\n } else {\n $(\"#members-list\").html(\"\");\n \n }\n });\n }", "title": "" }, { "docid": "50ce547f5ff6f9f43a052d3feffa8d2c", "score": "0.47813106", "text": "function onloadSurnames()\n{\n let table = document.getElementById('namesTable');\n let children = table.children;\n for (let i = 0; i < children.length; i++) \n {\n children[i].addEventListener(\"click\", followLink);\n }\n\n}", "title": "" }, { "docid": "137ca232ba3e51272d9c6a81f4fc83cb", "score": "0.47792035", "text": "function showTable() {\n\t\n\tgetData(function(stations, stationName) {\n\t\tconsole.log(stations);\n\t\tvar data = stations.map(function(station) {\n\t\t\treturn [\n\t\t\t\tstation.id,\n\t\t\t\tstation.s,\n\t\t\t\tstation.ba,\n\t\t\t\tstation.da,\n\t\t\t\tstation.state,\n\t\t\t];\n\t\t});\n\t\t// On crée les titres des colonnes\n\t\t$('#caracteristique').DataTable({\n data: data,\n columns: [\n {\n title: \"ID\"\n\t\t\t\t\t}, {\n title: \"Nom\"\n\t\t\t\t\t}, {\n title: \"V&eacutelos disponibles\"\n\t\t\t\t\t}, {\n title: \"Bornes disponibles\"\n\t\t\t\t\t}, {\n title: \"&Eacutetat\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t// On charge les éléments de langue française.\n\t\t\tlanguage: {\n\t\t\t \"sProcessing\": \"Traitement en cours...\",\n\t\t\t \"sSearch\": \"Rechercher&nbsp;:\",\n\t\t\t \"sLengthMenu\": \"Afficher _MENU_ &eacute;l&eacute;ments\",\n\t\t\t \"sInfo\": \"Affichage de l'&eacute;l&eacute;ment _START_ &agrave; _END_ sur _TOTAL_ &eacute;l&eacute;ments\",\n\t\t\t \"sInfoEmpty\": \"Affichage de l'&eacute;l&eacute;ment 0 &agrave; 0 sur 0 &eacute;l&eacute;ment\",\n\t\t\t \"sInfoFiltered\": \"(filtr&eacute; de _MAX_ &eacute;l&eacute;ments au total)\",\n\t\t\t \"sInfoPostFix\": \"\",\n\t\t\t \"sLoadingRecords\": \"Chargement en cours...\",\n\t\t\t \"sZeroRecords\": \"Aucun &eacute;l&eacute;ment &agrave; afficher\",\n\t\t\t \"sEmptyTable\": \"Aucune donn&eacute;e disponible dans le tableau\",\n\t\t\t \"oPaginate\": {\n\t\t\t \"sFirst\": \"Premier\",\n\t\t\t \"sPrevious\": \"Pr&eacute;c&eacute;dent\",\n\t\t\t \"sNext\": \"Suivant\",\n\t\t\t \"sLast\": \"Dernier\"\n\t\t\t\t},\n\t\t\t \"oAria\": {\n\t\t\t \"sSortAscending\": \": activer pour trier la colonne par ordre croissant\",\n\t\t\t \"sSortDescending\": \": activer pour trier la colonne par ordre d&eacute;croissant\"\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}", "title": "" }, { "docid": "05865f1b9496d900ce91e66d73860d8b", "score": "0.47770363", "text": "function renderTable(){\n\n\n var endingIndex = startingIndex + resultsPerPage;\n\n $tbody.innerHTML =\"\";\n\n var ufoSubset = dataSet.slice(startingIndex, endingIndex);\n\n for (var i=0; i< ufoSubset.length; i++){\n\n var ufo = ufoSubset[i];\n\n var fields = Object.keys(ufo);\n var $row = $tbody.insertRow(i);\n\n for (var j=0; j< fields.length; j++){\n\n var field = fields[j];\n var $cell = $row.insertCell(j);\n\n $cell.innerText = ufo[field];\n\n }\n }\n}", "title": "" }, { "docid": "0280ea0d5725067717a4a83d0382f8c4", "score": "0.47743306", "text": "function loadViewByStateDataTable() {\r\n\r\n //create object to hold state name and count\r\n function StateCount(name, count) {\r\n this.name = name;\r\n this.count = count;\r\n }\r\n\r\n var officesByStateData = [];\r\n var officesByOtherData = [];\r\n\r\n //get the counts\r\n var sUrl = APP_SERVER_HOST_PREFIX + CONTEXT_ROOT + \"/rest/resource/brnchCntBySt/\" + urlParamBank + \"/?jsoncallback=?\";\r\n\r\n $.ajax({\r\n url: sUrl,\r\n dataType: 'json',\r\n data: '',\r\n success: function (dataSet) {\r\n\r\n //create the count objects and store them in the appropriate array depending on whether they are a state or other region\r\n var name = \"\";\r\n var count = 0;\r\n $.each(dataSet, function (i, data) {\r\n $.each(data, function (key, value) {\r\n //alert(key + \":\" + value);\r\n\r\n if (key == 'stName') {\r\n name = value;\r\n }\r\n\r\n if (key == 'countBySt') {\r\n count = value;\r\n }\r\n\r\n });\r\n if (name && count) {\r\n var stCount = new StateCount(name, count);\r\n if (name != 'American Samoa' &&\r\n name != 'Federated States Of Micronesia' &&\r\n name != 'Guam' &&\r\n name != 'Marshall Islands' &&\r\n name != 'Northern Mariana Islands' &&\r\n name != 'Palau' &&\r\n name != 'Puerto Rico' &&\r\n name != 'Virgin Islands Of The U.S.') {\r\n officesByStateData.push(stCount);\r\n } else {\r\n officesByOtherData.push(stCount);\r\n }\r\n name = \"\";\r\n count = 0;\r\n }\r\n });\r\n },\r\n complete: function (xhr, status) { saveStateData(officesByStateData, officesByOtherData); }\r\n });\r\n}", "title": "" }, { "docid": "d2fb43e4bc89134392fdbc103197ddd3", "score": "0.4770978", "text": "function dataRetrieve(){\n\t\t \tdatabase.ref().orderByChild(\"dateAdded\").on(\"child_added\", function(snapshot) {\n\t\t // storing the snapshot.val() in a variable for convenience\n\t\t var sv = snapshot.val();\n\n\t\t // Console.loging the last user's data\n\t\t console.log(sv.trnName);\n\t\t console.log(sv.trnDest);\n\t\t console.log(sv.trnFrstTme);\n\t\t console.log(sv.trnFreq);\n\t\t \n\t\t tableLoad(sv);\n\t\t \t});\n\t \t}", "title": "" }, { "docid": "53d84b64be66cfb0d5431793409d9658", "score": "0.47657084", "text": "static get tableName() {\n return 'schools';\n }", "title": "" }, { "docid": "232028adaa04d9f2911ab41d7dc8b304", "score": "0.4760969", "text": "function getMemberList(req, res)\n{\n var schemaName = conn.getDBSchema(\"\");\n getFamilyUserIds(req.session.ruid, function(err, famIds){\n if(err)\n {\n logger.debug('Error while searching members '+err);\n console.log('Error while searching members '+err);\n res.json({status:'Error', message:'Error while searching members '+err}); \n } \n else\n {\n var arrFamIds = famIds.split(',');\n getMembersMember(arrFamIds, famIds, 0, function(err, allMembers){\n if(err)\n {\n logger.debug('Error while searching members of member '+err);\n console.log('Error while searching members of member '+err);\n res.json({status:'Error', message:'Error while searching members of member '+err});\n }\n else\n {\n conn.getPGConnection(function(err, clientConn)\n { \n if(err)\n {\n console.log(\"ClientSave - Error while connection PG\" + err);\n logger.debug(\"ClientSave - Error while connection PG\" + err);\n }\n else\n {\n try\n { \n //Check if user name exists. \n clientConn.query(\"SELECT firstname,lastname,gender,city,state,country,profpicfilename,filetype,filepath FROM \"+schemaName+\".tbuserdetails ud LEFT JOIN \"+schemaName+\".tbusersecurity us on ud.userid = us.userid WHERE us.status in (-1,1) AND ud.userid in (\"+allMembers+\")\", \n [], function(err, result)\n {\n if(err)\n {\n console.log(\"Error while getting the user list \" + err);\n logger.debug(\"Relation members : Error while getting the user list = \" + err);\n res.json({status:'Error',message:\"Error while getting the user list\"}); \n } \n else\n {\n if(result && result.rows && result.rows.length > 0)\n {\n var memberList = [];\n for(var memCount=0;memCount<result.rows.length;memCount++)\n {\n var memberDetails = {};\n memberDetails.firstName = result.rows[memCount].firstname; \n memberDetails.lastName = result.rows[memCount].lastname;\n memberDetails.gender = result.rows[memCount].gender;\n memberDetails.city = result.rows[memCount].city;\n memberDetails.state = result.rows[memCount].state;\n memberDetails.country = result.rows[memCount].country;\n memberDetails.profPic = result.rows[memCount].profpicfilename;\n memberList.push(memberDetails);\n } \n \n //Cache the values in redis memory\n if(memberList.length > 0)\n {\n try\n { \n conn.redisClientObject(null, null, function(err, client)\n {\n if(!err)\n {\n client.set('usermembers_'+req.session.ruid, JSON.stringify(memberList));\n client.expire('usermembers_'+req.session.ruid, propertyFile.redisExpiryMembersSecs);\n res.json({status:'Success',message: JSON.stringify(memberList)});\n } \n else\n {\n console.log('Could not write to redis')\n res.json({status:'Error',message: memberList});\n } \n }); \n \n }\n catch(err)\n {\n res.send({status:'Error',message: \"Error : Master JSON is blank \" + err});\n }\n }\n else\n {\n logger.debug(\"Relation members : No members found\");\n res.json({status:'Error',message:\"No members found\"});\n } \n }\n else\n {\n logger.debug(\"Relation members : No members found\");\n res.json({status:'Error',message:\"No members found\"}); \n }\n }\n });\n }\n catch(err)\n {\n console.log(\"Error while verifying user \" + err);\n logger.debug(\"Relation members : Error while getting the user list = \" + err);\n res.json({status:'Error',message:\"Error while getting the user list\"}); \n }\n }\n });\n }\n }); \n } \n});\n}", "title": "" }, { "docid": "f6f46c9b68bb93b0d9ee2e42cfbf196f", "score": "0.47574803", "text": "render() {\n return(\n <tr className=\"members-profile\">\n <td>{this.props.member.firstName}</td>\n <td>{this.props.member.lastName}</td>\n <td>{this.props.member.email}</td>\n <td>{this.props.member.church}</td>\n <td>{this.props.member.year}</td>\n\n\n </tr>\n )\n }", "title": "" }, { "docid": "7c0ecaaecdab400d40a592002f88ae73", "score": "0.4752956", "text": "function showTable(adltList) {\r\n\r\n adltList.sort(function (a, b) {\r\n\r\n let nameA = a.First + \" \" + a.Last;\r\n let nameB = b.First + \" \" + b.Last;\r\n if (nameA < nameB)\r\n return -1;\r\n if (nameA > nameB)\r\n return 1;\r\n return 0;\r\n });\r\n console.log(adltList);\r\n let str = '<thead> <tr> <th>שם</th><th>מקצוע </th><th>מספר טלפון </th> </thead> <tbody> ';\r\n adltList.forEach(function (member) {\r\n str += '<tr class = \"table-text\" id = ' + member.Key + '><td>' + member.First + ' ' + member.Last + '</td> <td>' +(member.AdultProffesion) + '</td><td>' + member.PhoneNum + '</td></tr>';\r\n })\r\n str += '</tbody>';\r\n\r\n $(\"#adultTable\").html(str);\r\n //(sortTable());\r\n}", "title": "" }, { "docid": "d5cf9ecb4e173f82b118eb74c7da92d6", "score": "0.47449642", "text": "function populateTable(dataSet){\n tableContents.append(\"tr\").html(\n \"<td>\"+String(dataSet.datetime)+\"</td>\"+\n \"<td>\"+capitalizeFirstLetter(String(dataSet.city))+\"</td>\"+\n \"<td>\"+String(dataSet.state).toUpperCase()+\"</td>\"+\n \"<td>\"+String(dataSet.country).toUpperCase()+\"</td>\"+\n \"<td>\"+capitalizeFirstLetter(String(dataSet.shape))+\"</td>\"+\n \"<td>\"+capitalizeFirstLetter(String(dataSet.duration))+\"</td>\"+\n \"<td>\"+capitalizeFirstLetter(String(dataSet.comments))+\"</td>\"\n );\n}", "title": "" }, { "docid": "bee96bab94be0de83e190603597e1912", "score": "0.47310558", "text": "function genere_champs_affichage(){\n\t\n\tvar text = \"\";\n\tfor (var i = 0; i < prelevement.length; i++) {\n\t\ttext += \"<td class=\\\"prelevement\\\">\" + prelevement[i] + \"</td>\";\n\t}\n\tfor (var i = 0; i < animal.length; i++) {\n\t\ttext += \"<td class=\\\"animal\\\">\" + animal[i] + \"</td>\";\n\t}\n\tfor (var i = 0; i < cheptel.length; i++) {\n\t\ttext += \"<td class=\\\"cheptel\\\">\" + cheptel[i] + \"</td>\";\n\t}\n\tfor (var i = 0; i < race.length; i++) {\n\t\ttext += \"<td class=\\\"race\\\">\" + race[i] + \"</td>\";\n\t}\n\tfor (var i = 0; i < preleveur.length; i++) {\n\t\ttext += \"<td class=\\\"preleveur\\\">\" + preleveur[i] + \"</td>\";\n\t}\n\treturn text;\n}", "title": "" }, { "docid": "c278270f7441dc2475a59d1bec647253", "score": "0.4715896", "text": "function loadContributorInfo(lastName, firstName) {\n // first destroy old tagifies\n $($(\"#input-con-affiliation\").siblings()[0]).remove();\n $($(\"#input-con-role\").siblings()[0]).remove();\n\n var tagifyRole = new Tagify(document.getElementById(\"input-con-role\"), {\n whitelist: [\n \"PrincipleInvestigator\",\n \"Creator\",\n \"CoInvestigator\",\n \"DataCollector\",\n \"DataCurator\",\n \"DataManager\",\n \"Distributor\",\n \"Editor\",\n \"Producer\",\n \"ProjectLeader\",\n \"ProjectManager\",\n \"ProjectMember\",\n \"RelatedPerson\",\n \"Researcher\",\n \"ResearchGroup\",\n \"Sponsor\",\n \"Supervisor\",\n \"WorkPackageLeader\",\n \"Other\",\n ],\n enforceWhitelist: true,\n dropdown: {\n classname: \"color-blue\",\n maxItems: 25,\n enabled: 0,\n closeOnSelect: true,\n },\n });\n var tagifyAffliation = new Tagify(\n document.getElementById(\"input-con-affiliation\"),\n {\n dropdown: {\n classname: \"color-blue\",\n enabled: 0, // show the dropdown immediately on focus\n maxItems: 25,\n closeOnSelect: true, // keep the dropdown open after selecting a suggestion\n },\n delimiters: null,\n duplicates: false,\n }\n );\n tagifyRole.removeAllTags();\n tagifyAffliation.removeAllTags();\n var contactLabel = $(\"#ds-contact-person\");\n $(contactLabel).prop(\"checked\", false);\n document.getElementById(\"input-con-ID\").value = \"Loading...\";\n\n tagifyAffliation.loading(true);\n tagifyRole.loading(true);\n\n var airKeyContent = parseJson(airtableConfigPath);\n var airKeyInput = airKeyContent[\"api-key\"];\n var airtableConfig = Airtable.configure({\n endpointUrl: \"https://\" + airtableHostname,\n apiKey: airKeyInput,\n });\n var base = Airtable.base(\"appiYd1Tz9Sv857GZ\");\n base(\"sparc_members\")\n .select({\n filterByFormula: `AND({First_name} = \"${firstName}\", {Last_name} = \"${lastName}\")`,\n })\n .eachPage(function page(records, fetchNextPage) {\n var conInfoObj = {};\n records.forEach(function (record) {\n conInfoObj[\"ID\"] = record.get(\"ORCID\");\n conInfoObj[\"Role\"] = record.get(\"Dataset_contributor_roles_for_SODA\");\n conInfoObj[\"Affiliation\"] = record.get(\"Institution\");\n }),\n fetchNextPage();\n\n // if no records found, leave fields empty\n leaveFieldsEmpty(\n conInfoObj[\"ID\"],\n document.getElementById(\"input-con-ID\")\n );\n leaveFieldsEmpty(\n conInfoObj[\"Role\"],\n document.getElementById(\"input-con-role\")\n );\n leaveFieldsEmpty(\n conInfoObj[\"Affiliation\"],\n document.getElementById(\"input-con-affiliation\")\n );\n\n tagifyAffliation.addTags(conInfoObj[\"Affiliation\"]);\n tagifyRole.addTags(conInfoObj[\"Role\"]);\n }),\n function done(err) {\n if (err) {\n log.error(err);\n console.error(err);\n return;\n }\n };\n tagifyAffliation.loading(false);\n tagifyRole.loading(false);\n}", "title": "" }, { "docid": "2d3a6ed50c68e0c83a97ae4aa739d39c", "score": "0.47149011", "text": "function calculateStatistic() {\r\n\r\n statistics.number_of_republicans = rep.length;\r\n statistics.number_of_democrats = dem.length;\r\n statistics.number_of_independents = ind.length;\r\n statistics.total_representatives = statistics.number_of_democrats + statistics.number_of_independents + statistics.number_of_republicans;\r\n\r\n\r\n statistics.votes_party_republicans = totalAveragesVotes(rep);\r\n statistics.votes_party_democrats = totalAveragesVotes(dem);\r\n statistics.votes_party_independets = totalAveragesVotes(ind);\r\n statistics.total_votes_party = totalAveragesVotes(members);\r\n\r\n var lazyMembers = getLazy(members);\r\n statistics.least_engaged_names = getSmallAttendanceMember(lazyMembers);\r\n\r\n\r\n var activeMembers = getActive(members);\r\n statistics.most_engaged_names = getSmallAttendanceMember(activeMembers);\r\n\r\n var loyal = getLoyal(members);\r\n statistics.votes_party_prc_house = getSmallAttendanceMember2(loyal);\r\n\r\n var disloyal = getLessLoyal(members);\r\n statistics.votes_party_prc_senate =\r\n getSmallAttendanceMember2(disloyal);\r\n\r\n if ($(\"body\").attr(\"data-page\") == \"attensenate\") {\r\n createTable1();\r\n createTable2();\r\n createTable3();\r\n\r\n\r\n } else if ($(\"body\").attr(\"data-page2\") == \"dis-loyal\") {\r\n createTable4();\r\n createTable5();\r\n createTable6();\r\n createTable1();\r\n }\r\n\r\n\r\n getSmallAttendanceMember(dem);\r\n }", "title": "" }, { "docid": "e0465b9e7567442088ad9cde205ee7ee", "score": "0.47148642", "text": "function showTable(d){\n $(\"#table-team\").html(d.TEAM);\n $(\"#table-record\").html(d['Wins'] + ' - ' + (82 - d['Wins']));\n $(\"#table-record-rank\").html(findRank(d.TEAM, 'Wins'));\n\n $(\"#table-selected-stat\").html(vis.selectedStat);\n $(\"#table-stat\").html(d[vis.selectedStat]);\n $(\"#table-stat-rank\").html(findRank(d.TEAM, vis.selectedStat));\n\n // Get Golden State's object\n var goldenStateIndex = vis.filteredData.findIndex(function(e) {\n return e.TEAM == 'Golden State Warriors'\n });\n\n $(\"#gsw-record\").html(vis.displayData[goldenStateIndex]['Wins'] + ' - ' + (82 - vis.displayData[goldenStateIndex]['Wins']));\n $(\"#gsw-record-rank\").html(findRank('Golden State Warriors', 'Wins'));\n $(\"#gsw-stat\").html(vis.displayData[goldenStateIndex][vis.selectedStat]);\n $(\"#gsw-stat-rank\").html(findRank('Golden State Warriors', vis.selectedStat));\n\n $(\"#logo-comparison-other\")\n .attr(\"src\", function() {\n var team_img = d.TEAM;\n team_img = team_img.toLowerCase();\n return ('images/logos/' + team_img + '.png')\n })\n .css(\"display\", \"inline\")\n\n $(\"#logos-text\").html('Vs.').css(\"display\", \"inline\")\n\n $(\"#scatter-table\").css(\"display\", \"table\")\n }", "title": "" }, { "docid": "8614a1e03a3786ab7be4dbac4db806b7", "score": "0.47092494", "text": "fetchFreshTableData() {\n //\n }", "title": "" }, { "docid": "f9fd52ee4ebc0f7a722e6e7749fc5874", "score": "0.46967298", "text": "displayAllTimeLeaders(){\n getAllTimeLeaders().then(leaders=>this.setState({leaderTable:leaders}));\n }", "title": "" }, { "docid": "767f91d1d94fc9d693f8f58bd37eb7b6", "score": "0.4688126", "text": "function display_infoblox_owners(results) {\n if (results.length) {\n document.getElementById(\"ownTitleRow\").appendChild(create_div_title(\"iblox_owner\", \"Infoblox Owners\"));\n document.getElementById(\"ownDataRow\").appendChild(create_div_data(\"iblox_owner\", results[0]['owners']));\n }\n}", "title": "" }, { "docid": "668c5f009bd78997be7cfd3a2394fb22", "score": "0.4685195", "text": "function fetchOptionData(){\n limit = limitData[city];\n pageLimit = pageLimitData[city];\n page_number = pageNumberData[city];\n\n order = orderData[city];\n sortColId = sortColIDData[city];\n sortColNumber = sortColNumberData[city];\n \n}", "title": "" }, { "docid": "be9a1633aad06f67e07d7f627cc0bd64", "score": "0.46845734", "text": "function doMUMembers() {\r\n\tvar allElements;\r\n allElements = document.getElementById('contentRow').children[1];\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Military unit members)/,\"Karinio būrio nariai\");\r\n\ttmp = allElements.children[4];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Storage)/,\"Sandėlys\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Donations)/,\"Pervedimai\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Edit military unit)/,\"Redaguoti karinį būrį\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Change nationality)/,\"Keisti valstybę\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Privileges)/,\"Privilegijos\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Money account)/,\"Pinigų sąskaita\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Job Offers)/,\"Darbo pasiūlymai\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Recruitment)/,\"Naujokų ėmimas\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(pending applications)/,\"laukiančios paraiškos\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(View logs)/,\"Žiūrėti išklotines\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Country)/,\"Valstybė\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Military rank)/,\"karinis laipsnis\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Total members)/,\"Narių skaičius\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/((Max. members))/,\"Maks. narių\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/((Total damage in battles))/,\"Bendra žala mūšiuose\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/((Damage today))/,\"Šiandienos žala\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/((Leader))/,\"Vadas\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Storage)/,\"Sandėlys\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Donations)/,\"Pervedimai\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(%CE%91%CF%80%CE%BF%CE%B8%CE%AE%CE%BA%CE%B7)/,\"Storage\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(%CE%94%CF%89%CF%81%CE%B5%CE%AD%CF%82)/,\"Donations\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Expand members limit)/,\"Padidinti narių vietų skaičių\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Upgrade to)/,\"Patobulinti į\");\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Gold)/g,\"Gold\");\r\n\treplaceInputByValue({\"Leave military unit\":[\"Leave military unit\",\"Palikti karinį būrį\"]});\r\n\t\r\n tmp = allElements.children[6];\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/Members/,\"Nariai: \");\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/Sorting/,\"Rūšiavimas\");\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/Experience/,\"Patirtis\");\r\n tmp.innerHTML = tmp.innerHTML.replace(/Login/,\"Prisijungti\");\r\n tmp.innerHTML = tmp.innerHTML.replace(/Total damage/g,\"Bendra žala\");\r\n tmp.innerHTML = tmp.innerHTML.replace(/Damage today/g,\"Šiandienos žala\");\r\n tmp.innerHTML = tmp.innerHTML.replace(/Show/,\"Rodyti\");\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/Citizen/,\"Pilietis\");\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/XP/g,\"XP\");\r\n tmp.innerHTML = tmp.innerHTML.replace(/Operations/,\"Misijos\");\r\n tmp.innerHTML = tmp.innerHTML.replace(/Kick/g,\"Išmesti\");\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/Previous/,\"Atgal\");\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/Next/,\"Pirmyn\");\r\n\ttmp.innerHTML = tmp.innerHTML.replace(/%CE%95%CE%BC%CF%80%CE%B5%CE%B9%CF%81%CE%AF%CE%B1/g,\"XP\");\r\n}", "title": "" }, { "docid": "39d52792644dc7623089cff796e37ff1", "score": "0.46834287", "text": "static getForSelectAll(info) {\n return info.tables[0].name;\n }", "title": "" } ]
2ee1e1a085596a042c4fb45a830772bc
Small hook to use ResizeOberver if available. This fixes some issues when the component is resized. This needs a polyfill to work on all browsers. The polyfill is not included in order to keep the package light.
[ { "docid": "8b735cbdfebbec554af6de8521079efb", "score": "0.0", "text": "function useResizeObserver(ref, callback) {\n useEffect(() => {\n if (typeof window !== 'undefined' && window.ResizeObserver) {\n const resizeObserver = new ResizeObserver((entries) => {\n // Wrap it in requestAnimationFrame to avoid this error - ResizeObserver loop limit exceeded\n window.requestAnimationFrame(() => {\n if (!Array.isArray(entries) || !entries.length) {\n return;\n }\n callback(entries[0].contentRect);\n });\n });\n\n resizeObserver.observe(ref.current);\n\n return () => {\n resizeObserver.disconnect();\n };\n }\n }, [ref]);\n}", "title": "" } ]
[ { "docid": "1fa6f64e75f279af547fe713dbf5b0ac", "score": "0.6856527", "text": "function useResizeObserver(_a) {\n var _b = _a.disableHeight, disableHeight = _b === void 0 ? false : _b, _c = _a.disableWidth, disableWidth = _c === void 0 ? false : _c, onResize = _a.onResize, target = _a.target;\n react_1.useEffect(function () {\n if (disableHeight && disableWidth) {\n return;\n }\n var resizeTarget = getResizeObserverTarget(target);\n if (!resizeTarget) {\n return;\n }\n var prevSize;\n var observer = new resize_observer_polyfill_1.default(function (entries) {\n for (var i = 0; i < entries.length; i += 1) {\n var entry = entries[i];\n var target_1 = entry.target;\n var _a = entry.contentRect, height = _a.height, width = _a.width;\n var scrollHeight = target_1.scrollHeight, scrollWidth = target_1.scrollWidth;\n var nextSize = {\n height: height,\n width: width,\n scrollHeight: scrollHeight,\n scrollWidth: scrollWidth,\n };\n var isNewHeight = isHeightChange(prevSize, nextSize);\n var isNewWidth = isWidthChange(prevSize, nextSize);\n prevSize = nextSize;\n if ((isNewHeight && !disableHeight) || (isNewWidth && !disableWidth)) {\n onResize(__assign(__assign({}, nextSize), { element: target_1 }));\n }\n }\n });\n observer.observe(resizeTarget);\n return function () {\n observer.disconnect();\n };\n }, [target, onResize, disableHeight, disableWidth]);\n}", "title": "" }, { "docid": "d8237b1b86827aaa7be9e3f71f137a4d", "score": "0.6777992", "text": "onResize() {\n\t\tconst {resize} = this.props;\n\n\t\tif (resize) {\n\t\t\tresize();\n\t\t}\n\t}", "title": "" }, { "docid": "72459b5aaa64a23d31f6e9850a6814fb", "score": "0.67672485", "text": "componentDidMount() {\n this.handleResize();\n window.addEventListener('optimizedResize', () => this.handleResize());\n }", "title": "" }, { "docid": "6b3a98be8a80c83bd85b65df763ef9a7", "score": "0.6749921", "text": "_registerResizeHandlers() {\n // Bind 'this' context to the resize handler for when passed as a callback\n let resize = this.RESIZE.bind(this);\n this.RESIZE = resize;\n\n this.unifiedEventHandler.register('window', RESIZE, resize, this.resizeEventInterval);\n\n this._resizeHandlerRegistered = true;\n\n if (this.resizeOnInsert) {\n // Call the resize handler to make sure everything is in the correct state.\n // We do it after the current render, to avoid any side-effects.\n scheduleOnce('afterRender', this, () => {\n resize();\n });\n }\n }", "title": "" }, { "docid": "2b1541bc3c89319668496bb7da0e70cb", "score": "0.6660095", "text": "resize() { return; }", "title": "" }, { "docid": "ff1db9ad83fb1df94b1c461218c6db8a", "score": "0.6616285", "text": "_resizeContent(e){// fake a resize event to make contents happy\nasync.microTask.run(()=>{window.dispatchEvent(new Event(\"resize\"))})}", "title": "" }, { "docid": "48a76f2bcdc94d9cdc71da2a5e6c3de2", "score": "0.6599475", "text": "$_initResizeEvent () {\n window.addEventListener('resize', this.$_resizeHandler)\n }", "title": "" }, { "docid": "ceea712a2a5b126d5b5c88ec1cb4d3d7", "score": "0.6584168", "text": "_unregisterResizeHandlers() {\n if (this._resizeHandlerRegistered) {\n let resize = this.RESIZE;\n this.unifiedEventHandler.unregister('window', RESIZE, resize);\n this._resizeHandlerRegistered = false;\n }\n }", "title": "" }, { "docid": "fcfb21e6942b258b9d278e8f2884da6c", "score": "0.65803415", "text": "function setupResizing() {\n window.addEventListener('resize', function(e) { frameResized(false) });\n }", "title": "" }, { "docid": "95099045a5a82b99a36ef6f7868c738e", "score": "0.6499693", "text": "_handleResize(e) {\n this.__resizeTimeout && clearTimeout(this.__resizeTimeout);\n this.__resizeTimeout = setTimeout(() => {\n this.bubbleChart.adjustSize(this.getDOMNode());\n this.bubbleChart.update(this.getDOMNode(), this.getChartState());\n delete this.__resizeTimeout;\n }, 200);\n }", "title": "" }, { "docid": "7945ae9e5035e0947074f49a5dee80ad", "score": "0.6490094", "text": "onWindowResize (event) {\n\n \t// TODO: what is this??\n\t\t// this.computeComponentDimensions();\n\n\t}", "title": "" }, { "docid": "11e433088d91d21707ac76c6f6f1a5c2", "score": "0.6485399", "text": "updated() {\n window.onresize()\n }", "title": "" }, { "docid": "15735f5800268555f7f46af1d994ab7c", "score": "0.6480385", "text": "function resize() {}", "title": "" }, { "docid": "c0579bc3060da45bbb4e95e3736870f4", "score": "0.6479029", "text": "_FBPReady(){super._FBPReady();// this._FBPTraceWires()\nthis.updateComplete.then(()=>{if(window.ResizeObserver){const ro=new ResizeObserver(entries=>{window.requestAnimationFrame(()=>{for(const entry of entries){this._checkSize(entry.contentRect.width)}})});ro.observe(this)}else{// fallback, just listen to the resize event\nsetTimeout(()=>{const cr=this.getBoundingClientRect();this._checkSize(cr.width)},1);window.addEventListener(\"resize\",()=>{const cr=this.getBoundingClientRect();this._checkSize(cr.width)})}})}", "title": "" }, { "docid": "f2096d5b46d2340c4807fc7c64553352", "score": "0.644856", "text": "_onResize() {\n this.tryWithMonaco(monaco => (window.requestAnimationFrame || setTimeout)(() => monaco.layout()), undefined);\n }", "title": "" }, { "docid": "615e92fc64caf7a71ed6c7bba4dbf179", "score": "0.6445803", "text": "onResize() {\n const { onResize, delay } = this.props;\n clearTimeout(this.timeout);\n this.timeout = setTimeout(() => {\n onResize({\n mediaPrefix: this.getMediaPrefix(),\n width: window.innerWidth,\n height: window.innerHeight,\n devicePixelRatio: window.devicePixelRatio,\n isTouchEnabled: this.detectTouchInWindow()\n });\n }, delay);\n }", "title": "" }, { "docid": "2db2867d6587b53d728fb959cc2c5332", "score": "0.6424888", "text": "function resize() {\r\n if (resizeTimer)\r\n clearTimeout(resizeTimer);\r\n resizeTimer = setTimeout(fireResize, 200);\r\n}", "title": "" }, { "docid": "fd9af3d3e40918d4c37d011241d82fe7", "score": "0.64224553", "text": "refresh() {\n this.__onResize();\n }", "title": "" }, { "docid": "e7bad2d1964f51100a32521f704404d6", "score": "0.6418256", "text": "function sizeMe() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultConfig;\n var _config$monitorWidth = config.monitorWidth,\n monitorWidth = _config$monitorWidth === undefined ? defaultConfig.monitorWidth : _config$monitorWidth,\n _config$monitorHeight = config.monitorHeight,\n monitorHeight = _config$monitorHeight === undefined ? defaultConfig.monitorHeight : _config$monitorHeight,\n _config$monitorPositi = config.monitorPosition,\n monitorPosition = _config$monitorPositi === undefined ? defaultConfig.monitorPosition : _config$monitorPositi,\n _config$refreshRate = config.refreshRate,\n refreshRate = _config$refreshRate === undefined ? defaultConfig.refreshRate : _config$refreshRate,\n _config$refreshMode = config.refreshMode,\n refreshMode = _config$refreshMode === undefined ? defaultConfig.refreshMode : _config$refreshMode,\n _config$noPlaceholder = config.noPlaceholder,\n noPlaceholder = _config$noPlaceholder === undefined ? defaultConfig.noPlaceholder : _config$noPlaceholder,\n _config$resizeDetecto = config.resizeDetectorStrategy,\n resizeDetectorStrategy = _config$resizeDetecto === undefined ? defaultConfig.resizeDetectorStrategy : _config$resizeDetecto;\n\n\n invariant(monitorWidth || monitorHeight || monitorPosition, 'You have to monitor at least one of the width, height, or position when using \"sizeMe\"');\n\n invariant(refreshRate >= 16, \"It is highly recommended that you don't put your refreshRate lower than \" + '16 as this may cause layout thrashing.');\n\n invariant(refreshMode === 'throttle' || refreshMode === 'debounce', 'The refreshMode should have a value of \"throttle\" or \"debounce\"');\n\n var refreshDelayStrategy = refreshMode === 'throttle' ? throttle : debounce;\n\n var detector = resizeDetector(resizeDetectorStrategy);\n\n return function WrapComponent(WrappedComponent) {\n var SizeMeRenderWrapper = renderWrapper(WrappedComponent);\n\n var SizeAwareComponent = function (_React$Component) {\n inherits(SizeAwareComponent, _React$Component);\n\n function SizeAwareComponent() {\n var _ref2;\n\n var _temp, _this2, _ret;\n\n classCallCheck(this, SizeAwareComponent);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this2 = possibleConstructorReturn(this, (_ref2 = SizeAwareComponent.__proto__ || Object.getPrototypeOf(SizeAwareComponent)).call.apply(_ref2, [this].concat(args))), _this2), _this2.state = {\n width: undefined,\n height: undefined,\n position: undefined\n }, _this2.determineStrategy = function (props) {\n if (props.onSize) {\n if (!_this2.callbackState) {\n _this2.callbackState = _extends({}, _this2.state);\n }\n _this2.strategy = 'callback';\n } else {\n _this2.strategy = 'render';\n }\n }, _this2.strategisedSetState = function (state) {\n if (_this2.strategy === 'callback') {\n _this2.callbackState = state;\n _this2.props.onSize(state);\n } else {\n _this2.setState(state);\n }\n }, _this2.strategisedGetState = function () {\n return _this2.strategy === 'callback' ? _this2.callbackState : _this2.state;\n }, _this2.refCallback = function (element) {\n _this2.element = element;\n }, _this2.hasSizeChanged = function (current, next) {\n var c = current;\n var n = next;\n var cp = c.position || {};\n var np = n.position || {};\n\n return monitorHeight && c.height !== n.height || monitorPosition && (cp.top !== np.top || cp.left !== np.left || cp.bottom !== np.bottom || cp.right !== np.right) || monitorWidth && c.width !== n.width;\n }, _this2.checkIfSizeChanged = refreshDelayStrategy(function (el) {\n var _el$getBoundingClient = el.getBoundingClientRect(),\n width = _el$getBoundingClient.width,\n height = _el$getBoundingClient.height,\n right = _el$getBoundingClient.right,\n left = _el$getBoundingClient.left,\n top = _el$getBoundingClient.top,\n bottom = _el$getBoundingClient.bottom;\n\n var next = {\n width: monitorWidth ? width : null,\n height: monitorHeight ? height : null,\n position: monitorPosition ? { right: right, left: left, top: top, bottom: bottom } : null\n };\n\n if (_this2.hasSizeChanged(_this2.strategisedGetState(), next)) {\n _this2.strategisedSetState(next);\n }\n }, refreshRate), _temp), possibleConstructorReturn(_this2, _ret);\n }\n\n createClass(SizeAwareComponent, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.determineStrategy(this.props);\n this.handleDOMNode();\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n this.determineStrategy(nextProps);\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.handleDOMNode();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n // Change our size checker to a noop just in case we have some\n // late running events.\n this.hasSizeChanged = function () {\n return undefined;\n };\n this.checkIfSizeChanged = function () {\n return undefined;\n };\n\n if (this.domEl) {\n detector.uninstall(this.domEl);\n this.domEl = null;\n }\n }\n }, {\n key: 'handleDOMNode',\n value: function handleDOMNode() {\n var found = this.element &&\n // One day this will be deprecated then I will be forced into wrapping\n // the component with a div or such in order to get a dome element handle.\n ReactDOM.findDOMNode(this.element); // eslint-disable-line react/no-find-dom-node\n\n if (!found) {\n // This is for special cases where the element may be null.\n if (this.domEl) {\n detector.uninstall(this.domEl);\n this.domEl = null;\n }\n return;\n }\n\n if (this.domEl) {\n detector.uninstall(this.domEl);\n }\n\n this.domEl = found;\n detector.listenTo(this.domEl, this.checkIfSizeChanged);\n }\n }, {\n key: 'render',\n value: function render() {\n var disablePlaceholder = sizeMe.enableSSRBehaviour || sizeMe.noPlaceholders || noPlaceholder || this.strategy === 'callback';\n\n var size = _extends({}, this.state);\n\n return React__default.createElement(SizeMeRenderWrapper, _extends({\n explicitRef: this.refCallback,\n size: this.strategy === 'callback' ? null : size,\n disablePlaceholder: disablePlaceholder\n }, this.props));\n }\n }]);\n return SizeAwareComponent;\n }(React__default.Component);\n\n SizeAwareComponent.displayName = 'SizeMe(' + getDisplayName(WrappedComponent) + ')';\n SizeAwareComponent.propTypes = {\n onSize: PropTypes.func\n };\n\n\n SizeAwareComponent.WrappedComponent = WrappedComponent;\n\n return SizeAwareComponent;\n };\n}", "title": "" }, { "docid": "a09b5ed1cc02955f3195f56718f39f85", "score": "0.6384749", "text": "resize(/*width, height*/) {\n // extend and override\n }", "title": "" }, { "docid": "dc79a7eccf291a4c716c2a93d0258855", "score": "0.6350236", "text": "initializeResizeDetector() {\n this.disconnectResizeDetector();\n this.resizeDetector = new window.ResizeObserver(this.handleResize);\n }", "title": "" }, { "docid": "effda017156407850c193be380d284e5", "score": "0.63434964", "text": "_updateOnResize() {\n clearTimeout(this._resizeTimeout);\n\n this._resizeTimeout = setTimeout(() => {\n this.update();\n }, 300);\n }", "title": "" }, { "docid": "0abee2083cc66da6630cfb2d18051f18", "score": "0.634093", "text": "onResize(evt) {}", "title": "" }, { "docid": "293ce624c00ed7e980c3e4a70ef51f1f", "score": "0.63251126", "text": "_handleResize() {\n this.width = this.clientWidth;\n }", "title": "" }, { "docid": "d327ed32e4723de6c622617f74d9d1ca", "score": "0.62976336", "text": "static setupResize() {\n if (tetresse == null) Tetresse.envSetup();\n if (tetresse.listeners.resize != null) return;\n tetresse.listeners.resize = {\n active: false, \n onResize: {}, // [label]: func, args\n // Pause drawing the screen\n pause() {\n if (tetresse.listeners.resize.active) {\n tetresse.listeners.resize.active = false;\n tetresse.utils.removeEvent(window, \"resize\", tetresse.listeners.resize.func);\n }\n },\n // Resume drawing the screen\n resume() {\n if (!tetresse.listeners.resize.active) {\n tetresse.listeners.resize.active = true;\n tetresse.utils.addEvent(window, \"resize\", tetresse.listeners.resize.func);\n }\n },\n add(label, func, args) {\n var onResize = tetresse.listeners.resize.onResize;\n if (onResize[label] != null) console.log(\"overwriting resize\"); // TODO reportError\n onResize[label] = {func: func, args: args};\n },\n remove(label) {\n var onResize = tetresse.listeners.resize.onResize;\n if (onResize[label] == null) return false;\n return delete onResize[label];\n },\n // Executes func function in every element with specified args\n func() {\n var r = tetresse.listeners.resize.onResize;\n for (var v in r)\n r[v].func(r[v].args);\n }\n };\n }", "title": "" }, { "docid": "1272cf041b204b9966a10fb5bbc3ba9e", "score": "0.6283298", "text": "function resizeEvent() {\n\t debounce(function() {\n\t updateResizableElements(null);\n\t });\n\t}", "title": "" }, { "docid": "1272cf041b204b9966a10fb5bbc3ba9e", "score": "0.6283298", "text": "function resizeEvent() {\n\t debounce(function() {\n\t updateResizableElements(null);\n\t });\n\t}", "title": "" }, { "docid": "1272cf041b204b9966a10fb5bbc3ba9e", "score": "0.6283298", "text": "function resizeEvent() {\n\t debounce(function() {\n\t updateResizableElements(null);\n\t });\n\t}", "title": "" }, { "docid": "dc4add7fe4964aa64892bbe799832db0", "score": "0.6276993", "text": "function resize() {\n \n}", "title": "" }, { "docid": "4cd697c583d1bbf5fe157241b033c11a", "score": "0.62759304", "text": "componentWillUnmount() {\n window.removeEventListener('resize', this.resize);\n }", "title": "" }, { "docid": "c9a7ef228bcf70cf98a9e3d006b6d45f", "score": "0.6273397", "text": "setResizeHandler () {\n\n if(this.options && this.options.debugging) console.log('PolygonChart.js: Hooking resize handlers to the window object');\n\n window.addEventListener( 'resize', this.resizeAndCenter.bind(this) );\n\n return () => {\n\n if(this.options && this.options.debugging) console.log('PolygonChart.js: Unmounting chart and cleaning up event handlers');\n\n window.removeEventListener( 'resize', this.resizeAndCenter );\n\n }\n\n }", "title": "" }, { "docid": "6d41ba9f950fc6a09870c8b6c3bdbb97", "score": "0.6264335", "text": "handleResize() {\n this.updateScales();\n this.render();\n }", "title": "" }, { "docid": "0578823bb14452cf559bc5026c4d1896", "score": "0.6264196", "text": "resizeScroll(){\r\n if ( this.scrollable && this.$refs.scroll ){\r\n this.getRef('scroll').onResize();\r\n }\r\n }", "title": "" }, { "docid": "64df6906f05169fe04c9c105ed3ec799", "score": "0.6263949", "text": "resizeHandler(){\n this.debug('resizeHandler');\n this.smoothscroll.resizeContainer();\n }", "title": "" }, { "docid": "64df6906f05169fe04c9c105ed3ec799", "score": "0.6263949", "text": "resizeHandler(){\n this.debug('resizeHandler');\n this.smoothscroll.resizeContainer();\n }", "title": "" }, { "docid": "fcd64ca20a85ef2fa1583bcdc934bdfe", "score": "0.62611455", "text": "initializeResizeDetector() {\n this.disconnectResizeDetector();\n this.resizeDetector = new window.ResizeObserver(this.resized.bind(this));\n this.resizeDetector.observe(this);\n }", "title": "" }, { "docid": "252c5b3fb9970abef3cfe5bd9cdd2e0a", "score": "0.6258619", "text": "onResize() {\n this.shutdown();\n this.init();\n }", "title": "" }, { "docid": "6c16c82587551236462da68e7cc72bdc", "score": "0.6255836", "text": "function onResize(event) {\n}", "title": "" }, { "docid": "d43531bd6e71b5858225c6ba3a7d541f", "score": "0.62478304", "text": "createResizePlugin() {\n this.Resize = new Resize(this);\n }", "title": "" }, { "docid": "9ae4f34a093b27651d001d015730853b", "score": "0.62337434", "text": "_myResizeHandler() {\n console.log('Resize handler');\n }", "title": "" }, { "docid": "74d495a08c0a7d99579f1abacbd07eb6", "score": "0.62301356", "text": "componentDidMount() {\n window.addEventListener(\"resize\", this.handleResize);\n }", "title": "" }, { "docid": "a9195b28b7a824b2f8f0d9fb82881d56", "score": "0.62290365", "text": "resize() {\n\n }", "title": "" }, { "docid": "7a83ba389cb345bdffb54c9367afec7e", "score": "0.6227034", "text": "function resizeStuff() {\n \n }", "title": "" }, { "docid": "a911c116d7a9a93630e4c8dc22f15976", "score": "0.62069017", "text": "onResize() {}", "title": "" }, { "docid": "a911c116d7a9a93630e4c8dc22f15976", "score": "0.62069017", "text": "onResize() {}", "title": "" }, { "docid": "3b5f8400a4fb4b66d3954b51a3b9cedf", "score": "0.619717", "text": "initiate_event_handler_resize() {\n\n /* Timer for the scroll so we dont spam the server */\n let timer = false;\n\n window.addEventListener('resize', event => {\n\n /* Make sure the event was fired by the actual user and not programatically */\n if(!event.isTrusted) {\n return false;\n }\n\n let data = {\n viewport: this.get_viewport()\n };\n\n\n clearInterval(timer);\n\n timer = setTimeout(() => {\n\n this.event_child('resize', data);\n\n }, 500);\n\n });\n\n }", "title": "" }, { "docid": "0af06c83016dfc91343366015866bbd2", "score": "0.619352", "text": "onResize() { }", "title": "" }, { "docid": "8415501b76dd97b412a807d1e72d3162", "score": "0.6190485", "text": "onWindowResize() {\n this.recalculate();\n }", "title": "" }, { "docid": "fe44ec0fad64613b7017a6a5dc292c93", "score": "0.618669", "text": "on_resize_started() {\n }", "title": "" }, { "docid": "71611f25e64fca33c59a5ef628a25519", "score": "0.61829984", "text": "componentDidMount() {\n window.addEventListener(\"resize\", this.resize.bind(this));\n this.resize();\n }", "title": "" }, { "docid": "0ae5b8fc06c6b11dfaa972ed8f35692b", "score": "0.617441", "text": "componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize);\n }", "title": "" }, { "docid": "af77861d2d2e8bd1e783637b7bd8bf91", "score": "0.61714655", "text": "resize() {\n this.requestUpdate();\n }", "title": "" }, { "docid": "d6f3be72f2c6bccd4665f092c60b07e8", "score": "0.6168218", "text": "forceYoutubeContentResize(){\n this.dispatchEvent(new CustomEvent(\"forced-resize\"))\n }", "title": "" }, { "docid": "49365eb3f15b280fbebf053cbb5fb338", "score": "0.61669546", "text": "_resetResizable() {\n if (this.resizable && this.window) {\n this.window.style.resize = \"both\";\n }\n }", "title": "" }, { "docid": "ff8f29b74c4f5b5fecf792561c86efc8", "score": "0.6162902", "text": "function resize()\n{\n window.addEventListener(\"resize\", OnResizeCalled, false);\n}", "title": "" }, { "docid": "567d74e1c8592ba8ab6b4039ea64029c", "score": "0.6147286", "text": "componentWillUnmount() {\n window.removeEventListener(\"resize\", this.updateWidth);\n }", "title": "" }, { "docid": "4df5e9f2fb5b109bd5bb13eb96500d61", "score": "0.6144892", "text": "function setupResizeObserver(targetElement, onElementResizedCallback) {\n if (targetElement) {\n var resizeObserver = COMPATIBILITY.rO();\n var strAnimationStartEvent = 'animationstart mozAnimationStart webkitAnimationStart MSAnimationStart';\n var strChildNodes = 'childNodes';\n var constScroll = 3333333;\n var callback = function () {\n targetElement[_strScrollTop](constScroll)[_strScrollLeft](_isRTL ? _rtlScrollBehavior.n ? -constScroll : _rtlScrollBehavior.i ? 0 : constScroll : constScroll);\n onElementResizedCallback();\n };\n //add resize observer:\n if (onElementResizedCallback) {\n if (_supportResizeObserver) {\n var element = targetElement.addClass('observed').append(generateDiv(_classNameResizeObserverElement)).contents()[0];\n var observer = element[_strResizeObserverProperty] = new resizeObserver(callback);\n observer.observe(element);\n }\n else {\n if (_msieVersion > 9 || !_autoUpdateRecommended) {\n targetElement.prepend(\n generateDiv(_classNameResizeObserverElement,\n generateDiv({ c: _classNameResizeObserverItemElement, dir: 'ltr' },\n generateDiv(_classNameResizeObserverItemElement,\n generateDiv(_classNameResizeObserverItemFinalElement)\n ) +\n generateDiv(_classNameResizeObserverItemElement,\n generateDiv({ c: _classNameResizeObserverItemFinalElement, style: 'width: 200%; height: 200%' })\n )\n )\n )\n );\n\n var observerElement = targetElement[0][strChildNodes][0][strChildNodes][0];\n var shrinkElement = FRAMEWORK(observerElement[strChildNodes][1]);\n var expandElement = FRAMEWORK(observerElement[strChildNodes][0]);\n var expandElementChild = FRAMEWORK(expandElement[0][strChildNodes][0]);\n var widthCache = observerElement[LEXICON.oW];\n var heightCache = observerElement[LEXICON.oH];\n var isDirty;\n var rAFId;\n var currWidth;\n var currHeight;\n var factor = 2;\n var nativeScrollbarSize = globals.nativeScrollbarSize; //care don't make changes to this object!!!\n var reset = function () {\n /*\n var sizeResetWidth = observerElement[LEXICON.oW] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y;\n var sizeResetHeight = observerElement[LEXICON.oH] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y;\n var expandChildCSS = {};\n expandChildCSS[_strWidth] = sizeResetWidth;\n expandChildCSS[_strHeight] = sizeResetHeight;\n expandElementChild.css(expandChildCSS);\n\n\n expandElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight);\n shrinkElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight);\n */\n expandElement[_strScrollLeft](constScroll)[_strScrollTop](constScroll);\n shrinkElement[_strScrollLeft](constScroll)[_strScrollTop](constScroll);\n };\n var onResized = function () {\n rAFId = 0;\n if (!isDirty)\n return;\n\n widthCache = currWidth;\n heightCache = currHeight;\n callback();\n };\n var onScroll = function (event) {\n currWidth = observerElement[LEXICON.oW];\n currHeight = observerElement[LEXICON.oH];\n isDirty = currWidth != widthCache || currHeight != heightCache;\n\n if (event && isDirty && !rAFId) {\n COMPATIBILITY.cAF()(rAFId);\n rAFId = COMPATIBILITY.rAF()(onResized);\n }\n else if (!event)\n onResized();\n\n reset();\n if (event) {\n COMPATIBILITY.prvD(event);\n COMPATIBILITY.stpP(event);\n }\n return false;\n };\n var expandChildCSS = {};\n var observerElementCSS = {};\n\n setTopRightBottomLeft(observerElementCSS, _strEmpty, [\n -((nativeScrollbarSize.y + 1) * factor),\n nativeScrollbarSize.x * -factor,\n nativeScrollbarSize.y * -factor,\n -((nativeScrollbarSize.x + 1) * factor)\n ]);\n\n FRAMEWORK(observerElement).css(observerElementCSS);\n expandElement.on(_strScroll, onScroll);\n shrinkElement.on(_strScroll, onScroll);\n targetElement.on(strAnimationStartEvent, function () {\n onScroll(false);\n });\n //lets assume that the divs will never be that large and a constant value is enough\n expandChildCSS[_strWidth] = constScroll;\n expandChildCSS[_strHeight] = constScroll;\n expandElementChild.css(expandChildCSS);\n\n reset();\n }\n else {\n var attachEvent = _documentElementNative.attachEvent;\n var isIE = _msieVersion !== undefined;\n if (attachEvent) {\n targetElement.prepend(generateDiv(_classNameResizeObserverElement));\n findFirst(targetElement, _strDot + _classNameResizeObserverElement)[0].attachEvent('onresize', callback);\n }\n else {\n var obj = _documentElementNative.createElement(TYPES.o);\n obj.setAttribute(LEXICON.ti, '-1');\n obj.setAttribute(LEXICON.c, _classNameResizeObserverElement);\n obj.onload = function () {\n var wnd = this.contentDocument.defaultView;\n wnd.addEventListener('resize', callback);\n wnd.document.documentElement.style.display = 'none';\n };\n obj.type = 'text/html';\n if (isIE)\n targetElement.prepend(obj);\n obj.data = 'about:blank';\n if (!isIE)\n targetElement.prepend(obj);\n targetElement.on(strAnimationStartEvent, callback);\n }\n }\n }\n\n if (targetElement[0] === _sizeObserverElementNative) {\n var directionChanged = function () {\n var dir = _hostElement.css('direction');\n var css = {};\n var scrollLeftValue = 0;\n var result = false;\n if (dir !== _cssDirectionDetectedCache) {\n if (dir === 'ltr') {\n css[_strLeft] = 0;\n css[_strRight] = _strAuto;\n scrollLeftValue = constScroll;\n }\n else {\n css[_strLeft] = _strAuto;\n css[_strRight] = 0;\n scrollLeftValue = _rtlScrollBehavior.n ? -constScroll : _rtlScrollBehavior.i ? 0 : constScroll;\n }\n //execution order is important for IE!!!\n _sizeObserverElement.children().eq(0).css(css);\n _sizeObserverElement[_strScrollLeft](scrollLeftValue)[_strScrollTop](constScroll);\n _cssDirectionDetectedCache = dir;\n result = true;\n }\n return result;\n };\n directionChanged();\n addDestroyEventListener(targetElement, _strScroll, function (event) {\n if (directionChanged())\n update();\n COMPATIBILITY.prvD(event);\n COMPATIBILITY.stpP(event);\n return false;\n });\n }\n }\n //remove resize observer:\n else {\n if (_supportResizeObserver) {\n var element = targetElement.contents()[0];\n var resizeObserverObj = element[_strResizeObserverProperty];\n if (resizeObserverObj) {\n resizeObserverObj.disconnect();\n delete element[_strResizeObserverProperty];\n }\n }\n else {\n remove(targetElement.children(_strDot + _classNameResizeObserverElement).eq(0));\n }\n }\n }\n }", "title": "" }, { "docid": "4df5e9f2fb5b109bd5bb13eb96500d61", "score": "0.6144892", "text": "function setupResizeObserver(targetElement, onElementResizedCallback) {\n if (targetElement) {\n var resizeObserver = COMPATIBILITY.rO();\n var strAnimationStartEvent = 'animationstart mozAnimationStart webkitAnimationStart MSAnimationStart';\n var strChildNodes = 'childNodes';\n var constScroll = 3333333;\n var callback = function () {\n targetElement[_strScrollTop](constScroll)[_strScrollLeft](_isRTL ? _rtlScrollBehavior.n ? -constScroll : _rtlScrollBehavior.i ? 0 : constScroll : constScroll);\n onElementResizedCallback();\n };\n //add resize observer:\n if (onElementResizedCallback) {\n if (_supportResizeObserver) {\n var element = targetElement.addClass('observed').append(generateDiv(_classNameResizeObserverElement)).contents()[0];\n var observer = element[_strResizeObserverProperty] = new resizeObserver(callback);\n observer.observe(element);\n }\n else {\n if (_msieVersion > 9 || !_autoUpdateRecommended) {\n targetElement.prepend(\n generateDiv(_classNameResizeObserverElement,\n generateDiv({ c: _classNameResizeObserverItemElement, dir: 'ltr' },\n generateDiv(_classNameResizeObserverItemElement,\n generateDiv(_classNameResizeObserverItemFinalElement)\n ) +\n generateDiv(_classNameResizeObserverItemElement,\n generateDiv({ c: _classNameResizeObserverItemFinalElement, style: 'width: 200%; height: 200%' })\n )\n )\n )\n );\n\n var observerElement = targetElement[0][strChildNodes][0][strChildNodes][0];\n var shrinkElement = FRAMEWORK(observerElement[strChildNodes][1]);\n var expandElement = FRAMEWORK(observerElement[strChildNodes][0]);\n var expandElementChild = FRAMEWORK(expandElement[0][strChildNodes][0]);\n var widthCache = observerElement[LEXICON.oW];\n var heightCache = observerElement[LEXICON.oH];\n var isDirty;\n var rAFId;\n var currWidth;\n var currHeight;\n var factor = 2;\n var nativeScrollbarSize = globals.nativeScrollbarSize; //care don't make changes to this object!!!\n var reset = function () {\n /*\n var sizeResetWidth = observerElement[LEXICON.oW] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y;\n var sizeResetHeight = observerElement[LEXICON.oH] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y;\n var expandChildCSS = {};\n expandChildCSS[_strWidth] = sizeResetWidth;\n expandChildCSS[_strHeight] = sizeResetHeight;\n expandElementChild.css(expandChildCSS);\n\n\n expandElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight);\n shrinkElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight);\n */\n expandElement[_strScrollLeft](constScroll)[_strScrollTop](constScroll);\n shrinkElement[_strScrollLeft](constScroll)[_strScrollTop](constScroll);\n };\n var onResized = function () {\n rAFId = 0;\n if (!isDirty)\n return;\n\n widthCache = currWidth;\n heightCache = currHeight;\n callback();\n };\n var onScroll = function (event) {\n currWidth = observerElement[LEXICON.oW];\n currHeight = observerElement[LEXICON.oH];\n isDirty = currWidth != widthCache || currHeight != heightCache;\n\n if (event && isDirty && !rAFId) {\n COMPATIBILITY.cAF()(rAFId);\n rAFId = COMPATIBILITY.rAF()(onResized);\n }\n else if (!event)\n onResized();\n\n reset();\n if (event) {\n COMPATIBILITY.prvD(event);\n COMPATIBILITY.stpP(event);\n }\n return false;\n };\n var expandChildCSS = {};\n var observerElementCSS = {};\n\n setTopRightBottomLeft(observerElementCSS, _strEmpty, [\n -((nativeScrollbarSize.y + 1) * factor),\n nativeScrollbarSize.x * -factor,\n nativeScrollbarSize.y * -factor,\n -((nativeScrollbarSize.x + 1) * factor)\n ]);\n\n FRAMEWORK(observerElement).css(observerElementCSS);\n expandElement.on(_strScroll, onScroll);\n shrinkElement.on(_strScroll, onScroll);\n targetElement.on(strAnimationStartEvent, function () {\n onScroll(false);\n });\n //lets assume that the divs will never be that large and a constant value is enough\n expandChildCSS[_strWidth] = constScroll;\n expandChildCSS[_strHeight] = constScroll;\n expandElementChild.css(expandChildCSS);\n\n reset();\n }\n else {\n var attachEvent = _documentElementNative.attachEvent;\n var isIE = _msieVersion !== undefined;\n if (attachEvent) {\n targetElement.prepend(generateDiv(_classNameResizeObserverElement));\n findFirst(targetElement, _strDot + _classNameResizeObserverElement)[0].attachEvent('onresize', callback);\n }\n else {\n var obj = _documentElementNative.createElement(TYPES.o);\n obj.setAttribute(LEXICON.ti, '-1');\n obj.setAttribute(LEXICON.c, _classNameResizeObserverElement);\n obj.onload = function () {\n var wnd = this.contentDocument.defaultView;\n wnd.addEventListener('resize', callback);\n wnd.document.documentElement.style.display = 'none';\n };\n obj.type = 'text/html';\n if (isIE)\n targetElement.prepend(obj);\n obj.data = 'about:blank';\n if (!isIE)\n targetElement.prepend(obj);\n targetElement.on(strAnimationStartEvent, callback);\n }\n }\n }\n\n if (targetElement[0] === _sizeObserverElementNative) {\n var directionChanged = function () {\n var dir = _hostElement.css('direction');\n var css = {};\n var scrollLeftValue = 0;\n var result = false;\n if (dir !== _cssDirectionDetectedCache) {\n if (dir === 'ltr') {\n css[_strLeft] = 0;\n css[_strRight] = _strAuto;\n scrollLeftValue = constScroll;\n }\n else {\n css[_strLeft] = _strAuto;\n css[_strRight] = 0;\n scrollLeftValue = _rtlScrollBehavior.n ? -constScroll : _rtlScrollBehavior.i ? 0 : constScroll;\n }\n //execution order is important for IE!!!\n _sizeObserverElement.children().eq(0).css(css);\n _sizeObserverElement[_strScrollLeft](scrollLeftValue)[_strScrollTop](constScroll);\n _cssDirectionDetectedCache = dir;\n result = true;\n }\n return result;\n };\n directionChanged();\n addDestroyEventListener(targetElement, _strScroll, function (event) {\n if (directionChanged())\n update();\n COMPATIBILITY.prvD(event);\n COMPATIBILITY.stpP(event);\n return false;\n });\n }\n }\n //remove resize observer:\n else {\n if (_supportResizeObserver) {\n var element = targetElement.contents()[0];\n var resizeObserverObj = element[_strResizeObserverProperty];\n if (resizeObserverObj) {\n resizeObserverObj.disconnect();\n delete element[_strResizeObserverProperty];\n }\n }\n else {\n remove(targetElement.children(_strDot + _classNameResizeObserverElement).eq(0));\n }\n }\n }\n }", "title": "" }, { "docid": "2a4274b7cbf51cf051e53468a5f65aae", "score": "0.6144357", "text": "static _captureResize(event) {}", "title": "" }, { "docid": "70a5aba305a85a070932c597fe4b579a", "score": "0.6143479", "text": "componentDidMount() {\n this.handleResize();\n window.addEventListener('resize', this.handleResize);\n }", "title": "" }, { "docid": "910e2c28b6c242733f6bed318293ed5a", "score": "0.61240655", "text": "onResize(event) {\r\n this.resizeSubject.next(event.target);\r\n }", "title": "" }, { "docid": "97efc1445016a578cea53c5da8545f9b", "score": "0.6120715", "text": "function handleResize() {\n scroller.resize();\n}", "title": "" }, { "docid": "3d9164260e03c64568a0fbccf0e4c145", "score": "0.6118574", "text": "handleResize () {\n this.setState({\n size: resize(window.innerWidth)\n })\n }", "title": "" }, { "docid": "69509cb486a20940bb38e6da017a9571", "score": "0.6113169", "text": "componentDidMount(){\n window.addEventListener('resize', this.handleResize);\n }", "title": "" }, { "docid": "f85942885404f5dce21c8886e5f7bb7f", "score": "0.60975426", "text": "onResize(){\n }", "title": "" }, { "docid": "e3872c6c31e703ccbc4e4a0ef3b26a27", "score": "0.609307", "text": "resize() {\n\n }", "title": "" }, { "docid": "430e3ff744a62dbecdd3f0329bf48651", "score": "0.6087589", "text": "function resize() {\n var cs = highed.dom.size(container),\n ms = highed.dom.size(mainToolbar.container),\n wb = highed.dom.size(wizbar.container)\n ;\n\n if (!properties.useHeader) {\n ms = {\n w: 0,\n h: 0\n };\n }\n\n //wizbar.resize(undefined, cs.h - ms.h - wb.h);\n chartCustomizer.resize(undefined, cs.h - ms.h - wb.h);\n chartTemplateSelector.resize(undefined, cs.h - ms.h - wb.h);\n splitter.resize(cs.w, cs.h - ms.h - wb.h);\n dataExp.resize(cs.w, cs.h - ms.h - wb.h);\n chartPreview.resize();\n dataImp.resize(cs.w, cs.h - ms.h - wb.h);\n dataTable.resize();\n events.emit('Resized');\n\n\n highed.dom.style(chartContainer, {\n 'max-height': (cs.h - ms.h - wb.h) + 'px' \n });\n }", "title": "" }, { "docid": "8204b4cd55ffcd4fc2490a3e3778776f", "score": "0.6081777", "text": "resized() {\n if (this.resizeTimeout) {\n this.resizeTimeout = clearTimeout(this.resizeTimeout);\n }\n\n this.resizeTimeout = setTimeout(() => {\n this.width = this.offsetWidth;\n this.setFlippers();\n }, this.frameTime);\n }", "title": "" }, { "docid": "8f4efe87d4f20909bc43ae989c69c17f", "score": "0.6080828", "text": "function addOnresizeEvent(func){addEvent(window, 'resize', func);}", "title": "" }, { "docid": "15037a19f9ed70f4a88752f06a57a1e6", "score": "0.6075412", "text": "function onResize (e) {\n Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_2__[\"raf\"])(function(){ resizeTasks(getEvent(e)); });\n }", "title": "" }, { "docid": "100d602444aa660e2e9ec278a7535035", "score": "0.60686004", "text": "handleResize( event ) {\n // don't do anything if we don't have a container\n if ( ! this.jqueryMap.$container ) { return false; }\n return true;\n }", "title": "" }, { "docid": "c6a183900460b82de6530ccf0b8a2f4c", "score": "0.606504", "text": "function resizeHandler() {\n if(resizeTimeout) clearTimeout(resizeTimeout);\n resizeTimeout = setTimeout(resizeAll, 200);\n }", "title": "" }, { "docid": "9b3d6c2bf3d68ee9eff53a4b3c6364c5", "score": "0.6064839", "text": "function handleWindowResize() {\n // These are not initialized in Jasmine Spec Runner window until a test\n // is run that creates a mock document.\n if (!$windowContent || !$editorHolder) {\n return;\n }\n\n // FIXME (issue #4564) Workaround https://github.com/codemirror/CodeMirror/issues/1787\n triggerUpdateLayout();\n\n if (!windowResizing) {\n windowResizing = true;\n\n // We don't need any fancy debouncing here - we just need to react before the user can start\n // resizing any panels at the new window size. So just listen for first mousemove once the\n // window resize releases mouse capture.\n $(window.document).one(\"mousemove\", function () {\n windowResizing = false;\n updateResizeLimits();\n });\n }\n }", "title": "" }, { "docid": "2178050bc19f47335307da0401093f23", "score": "0.6063227", "text": "componentWillUnmount() {\n window.removeEventListener('resize', this.resizeFunction);\n }", "title": "" }, { "docid": "6c802af024242c516cf4b6026acc7120", "score": "0.60611105", "text": "get hasStyleObserver() {\n return 'resize';\n }", "title": "" }, { "docid": "4fae271029c3247578f0a9f4eaab7b72", "score": "0.6057924", "text": "function useResizeObserver({ ref, onResize }) {\n const defaultRef = useRef(null);\n\n if (!ref) {\n ref = defaultRef;\n }\n const [size, setSize] = useState({ width: undefined, height: undefined });\n const previous = useRef({ width: undefined, height: undefined });\n\n useEffect(() => {\n if (\n typeof ref !== \"object\" ||\n ref === null ||\n !(ref.current instanceof Element)\n ) {\n return;\n }\n\n const element = ref.current;\n const observer = new ResizeObserver((entries) => {\n if (!Array.isArray(entries) || !entries.length) {\n return;\n }\n\n const entry = entries[0];\n const newWidth = Math.round(entry.contentRect.width);\n const newHeight = Math.round(entry.contentRect.height);\n if (\n previous.current.width !== newWidth ||\n previous.current.height !== newHeight\n ) {\n const newSize = { width: newWidth, height: newHeight };\n if (onResize) {\n onResize(newSize);\n } else {\n previous.current.width = newWidth;\n previous.current.height = newHeight;\n setSize(newSize);\n }\n }\n });\n observer.observe(element);\n return () => observer.unobserve(element);\n }, [ref, onResize]);\n\n return useMemo(() => ({ ref, width: size.width, height: size.height }), [\n ref,\n size ? size.width : null,\n size ? size.height : null,\n ]);\n}", "title": "" }, { "docid": "b83717935c265614928d172b11ca9a51", "score": "0.60577327", "text": "function windowResizeEventHandler() {\n adjustToContainer();\n }", "title": "" }, { "docid": "797e3ebd6727a0e849846317c2046cac", "score": "0.6049066", "text": "function onResize (e) {\n Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__[\"raf\"])(function(){ resizeTasks(getEvent(e)); });\n }", "title": "" }, { "docid": "2bcf8645508771b67b2521d30804987b", "score": "0.6047371", "text": "function flexibleResizeHandler() {\n clearTimeout(resizeTimer);\n resizeTimer = setTimeout(function(){\n doResize();\n clearTimeout(postResizeTimer);\n postResizeTimer = setTimeout(doResize, 100);\n },1);\n }", "title": "" }, { "docid": "63ce9c24eeeaae758334a3088f345312", "score": "0.6047273", "text": "created() {\n window.addEventListener('resize', this.handleResize)\n this.handleResize();\n }", "title": "" }, { "docid": "0f541238ed71272f067f7e52f15dccfe", "score": "0.60471207", "text": "onWindowResize() {\n debugLog('ForceHorseViewer:onWindowResize');\n\n this.calcFixAspectRatio();\n this.updateGraphInDOM();\n }", "title": "" }, { "docid": "dc320d28e9cb763398e79c293a2ad5cf", "score": "0.6041455", "text": "function wireResizing() {\n //Set the mouse events for all column headers\n gridColumns = _grid.getColumnHeaders();\n gridColumns.forEach(function (col) {\n col.removeEventListener('mouseenter', columnMouseOver);\n col.addEventListener('mouseenter', columnMouseOver);\n });\n\n // gridColumns = _grid.getHeaderRow().children;\n // for (let i = 0; i < gridColumns.length; i++) {\n // gridColumns[i].removeEventListener('mouseenter', columnMouseOver);\n // gridColumns[i].addEventListener('mouseenter', columnMouseOver);\n // };\n }", "title": "" }, { "docid": "f4801f841469fec84cfbc42dab132e0d", "score": "0.6039939", "text": "registerOnResizeHandler(handler, resizeTimeout = 1000) {\n window.addEventListener('resize', () => {\n if (!this.resizeHandler) {\n this.resizeHandler = setTimeout(() => {\n this.resizeHandler = null;\n handler();\n }, resizeTimeout);\n }\n });\n }", "title": "" }, { "docid": "7398ae5348b92e1c48a8ca69ab5284dc", "score": "0.60392886", "text": "componentWillUnmount(){window.removeEventListener('resize', this.ResizeHandler)}", "title": "" }, { "docid": "4898f674a9a3ffd1dccc1b2452439cad", "score": "0.6035786", "text": "function responsiveResizeEvents() {\n let resizeTimeout;\n function resizeThrottler() {\n if (!resizeTimeout) {\n resizeTimeout = setTimeout(() => {\n resizeTimeout = null;\n if ($(window).width() > 719) {\n closeEverything();\n }\n }, 66);\n }\n }\n window.addEventListener('resize', resizeThrottler, false);\n }", "title": "" }, { "docid": "6719f7bf31f687928c9e88200554a4e5", "score": "0.6034793", "text": "componentWillUnmount() {\n window.removeEventListener('resize', this.onResize);\n }", "title": "" }, { "docid": "aad1cbcbec6ed64800c90e1046278bff", "score": "0.6024246", "text": "componentWillUnmount() {\r\n window.removeEventListener('resize', this.updateWindowDimensions);\r\n }", "title": "" }, { "docid": "51649495359f65213ad9f4d8fad5b3e6", "score": "0.6020377", "text": "function handleResize() {\n if(false === debouncingActive) {\n debouncingActive = true;\n setTimeout(smartResizeHandler, debouncingTime);\n }\n }", "title": "" }, { "docid": "5492716149a244ed4e2eff709bb4ea72", "score": "0.60131925", "text": "function resizeSouth(e) {\n var documentHeight = document.documentElement.clientHeight;\n var calculateValue = false;\n var containerRectValues;\n var currentpageY = (getEventType(e.type) === 'mouse') ? e.pageY : e.touches[0].pageY;\n var targetRectValues = getClientRectValues(targetElement);\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) {\n containerRectValues = getClientRectValues(containerElement);\n }\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) {\n calculateValue = true;\n }\n else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement) && ((documentHeight - currentpageY) >= 0 || (targetRectValues.top < 0))) {\n calculateValue = true;\n }\n var calculatedHeight = originalHeight + (currentpageY - originalMouseY);\n calculatedHeight = (calculatedHeight > minHeight) ? calculatedHeight : minHeight;\n var containerTop = 0;\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) {\n containerTop = containerRectValues.top;\n }\n var borderValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement) ? 0 : containerElement.offsetHeight - containerElement.clientHeight;\n var topWithoutborder = (targetRectValues.top - containerTop) - (borderValue / 2);\n topWithoutborder = (topWithoutborder < 0) ? 0 : topWithoutborder;\n if (targetRectValues.top > 0 && (topWithoutborder + calculatedHeight) > maxHeight) {\n calculateValue = false;\n if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {\n return;\n }\n targetElement.style.height = (maxHeight - parseInt(topWithoutborder.toString(), 10)) + 'px';\n return;\n }\n var targetTop = 0;\n if (calculateValue) {\n if (targetRectValues.top < 0 && (documentHeight + (targetRectValues.height + targetRectValues.top) > 0)) {\n targetTop = targetRectValues.top;\n if ((calculatedHeight + targetTop) <= 30) {\n calculatedHeight = (targetRectValues.height - (targetRectValues.height + targetRectValues.top)) + 30;\n }\n }\n if (((calculatedHeight + targetRectValues.top) >= maxHeight)) {\n targetElement.style.height = targetRectValues.height +\n (documentHeight - (targetRectValues.height + targetRectValues.top)) + 'px';\n }\n var calculatedTop = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) ? targetTop : topWithoutborder;\n if (calculatedHeight >= minHeight && ((calculatedHeight + calculatedTop) <= maxHeight)) {\n targetElement.style.height = calculatedHeight + 'px';\n }\n }\n}", "title": "" }, { "docid": "5492716149a244ed4e2eff709bb4ea72", "score": "0.60131925", "text": "function resizeSouth(e) {\n var documentHeight = document.documentElement.clientHeight;\n var calculateValue = false;\n var containerRectValues;\n var currentpageY = (getEventType(e.type) === 'mouse') ? e.pageY : e.touches[0].pageY;\n var targetRectValues = getClientRectValues(targetElement);\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) {\n containerRectValues = getClientRectValues(containerElement);\n }\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) {\n calculateValue = true;\n }\n else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement) && ((documentHeight - currentpageY) >= 0 || (targetRectValues.top < 0))) {\n calculateValue = true;\n }\n var calculatedHeight = originalHeight + (currentpageY - originalMouseY);\n calculatedHeight = (calculatedHeight > minHeight) ? calculatedHeight : minHeight;\n var containerTop = 0;\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) {\n containerTop = containerRectValues.top;\n }\n var borderValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement) ? 0 : containerElement.offsetHeight - containerElement.clientHeight;\n var topWithoutborder = (targetRectValues.top - containerTop) - (borderValue / 2);\n topWithoutborder = (topWithoutborder < 0) ? 0 : topWithoutborder;\n if (targetRectValues.top > 0 && (topWithoutborder + calculatedHeight) > maxHeight) {\n calculateValue = false;\n if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {\n return;\n }\n targetElement.style.height = (maxHeight - parseInt(topWithoutborder.toString(), 10)) + 'px';\n return;\n }\n var targetTop = 0;\n if (calculateValue) {\n if (targetRectValues.top < 0 && (documentHeight + (targetRectValues.height + targetRectValues.top) > 0)) {\n targetTop = targetRectValues.top;\n if ((calculatedHeight + targetTop) <= 30) {\n calculatedHeight = (targetRectValues.height - (targetRectValues.height + targetRectValues.top)) + 30;\n }\n }\n if (((calculatedHeight + targetRectValues.top) >= maxHeight)) {\n targetElement.style.height = targetRectValues.height +\n (documentHeight - (targetRectValues.height + targetRectValues.top)) + 'px';\n }\n var calculatedTop = (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(containerElement)) ? targetTop : topWithoutborder;\n if (calculatedHeight >= minHeight && ((calculatedHeight + calculatedTop) <= maxHeight)) {\n targetElement.style.height = calculatedHeight + 'px';\n }\n }\n}", "title": "" }, { "docid": "550127dc2ee7e7bb3f1542282e17bf57", "score": "0.6002885", "text": "resize() {\n this.renderModule.setSheetPanelSize();\n if (this.scrollSettings.enableVirtualization) {\n this.renderModule.refreshSheet();\n }\n }", "title": "" }, { "docid": "e1851c5b472e2d8699d55031bc1e1201", "score": "0.60004514", "text": "function initResize(event) {\n element.onresizestart(event)\n window.addEventListener('mousemove', resize, false)\n window.addEventListener('mouseup', stopResize, false)}", "title": "" }, { "docid": "0c680e621e8025de0bfacfb47a275ad1", "score": "0.5999344", "text": "handleWindowResize(onWindowResize) {\n const el = this.el\n\n el.style.width = '100%'\n el.style.height = '100%'\n\n // Set real canvas size\n el.width = el.offsetWidth\n el.height = el.offsetHeight\n\n onWindowResize()\n }", "title": "" }, { "docid": "55ae1465460b9c2397cce8cedf516f29", "score": "0.599811", "text": "componentDidMount() {\n window.addEventListener(\"resize\", this.updateWidth);\n }", "title": "" }, { "docid": "55ae1465460b9c2397cce8cedf516f29", "score": "0.599811", "text": "componentDidMount() {\n window.addEventListener(\"resize\", this.updateWidth);\n }", "title": "" }, { "docid": "c1f3df28cd412a483aca527da210b6c0", "score": "0.5995367", "text": "function resize() {\n // update something\n}", "title": "" }, { "docid": "2bb5c807e8a1cc0022ef5deb3765fc35", "score": "0.59944236", "text": "handleResize() {\n // Change state to call a signal a new redraw\n this.setState({\n mustRedraw: true\n }, () => {\n // Redraw the canvas\n this.startDraw();\n // Re-render the component\n this.render();\n });\n }", "title": "" }, { "docid": "95d024fc30eadeb6e585fdbf61b104b5", "score": "0.5991289", "text": "function ResizeListener(_a) {\n var onResize = _a.onResize, options = _a.options, _b = _a.immediate, immediate = _b === void 0 ? typeof window !== \"undefined\" : _b;\n useResizeListener_1.default({ onResize: onResize, options: options, immediate: immediate, enabled: true });\n return null;\n}", "title": "" }, { "docid": "ef2f589c1f092398a35a8cc043bcba1c", "score": "0.5990474", "text": "componentWillUnmount() {\n window.removeEventListener('resize', this.updateDimensions.bind(this));\n }", "title": "" }, { "docid": "ac6c2f3efd5f41f22633da471714380f", "score": "0.5986285", "text": "function qodeOnWindowResize() {\n }", "title": "" }, { "docid": "15ec93a70bcf41773bbabaed7a6a4015", "score": "0.598213", "text": "function onResize() {\n setSize();\n }", "title": "" } ]
d943e11266c41423d59036b620054820
Push a watcher into the watcher queue. Jobs with duplicate IDs will be skipped unless it's pushed when the queue is being flushed.
[ { "docid": "4711419a68d656330bc383c86a8a764b", "score": "0.0", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if ( true && !config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" } ]
[ { "docid": "bbd9fbf3fa36e2978deb600a13e84ce5", "score": "0.7736391", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbd9fbf3fa36e2978deb600a13e84ce5", "score": "0.7736391", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbd9fbf3fa36e2978deb600a13e84ce5", "score": "0.7736391", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbd9fbf3fa36e2978deb600a13e84ce5", "score": "0.7736391", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbd9fbf3fa36e2978deb600a13e84ce5", "score": "0.7736391", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbd9fbf3fa36e2978deb600a13e84ce5", "score": "0.7736391", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbd9fbf3fa36e2978deb600a13e84ce5", "score": "0.7736391", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "243ff0357766f67611c7db53049165cd", "score": "0.7704518", "text": "function queueWatcher (watcher) {\n\t var id = watcher.id;\n\t if (has$1[id] == null) {\n\t has$1[id] = true;\n\t if (!flushing) {\n\t queue.push(watcher);\n\t } else {\n\t // if already flushing, splice the watcher based on its id\n\t // if already past its id, it will be run next immediately.\n\t var i = queue.length - 1;\n\t while (i >= 0 && queue[i].id > watcher.id) {\n\t i--;\n\t }\n\t queue.splice(Math.max(i, index) + 1, 0, watcher);\n\t }\n\t // queue the flush\n\t if (!waiting) {\n\t waiting = true;\n\t nextTick(flushSchedulerQueue);\n\t }\n\t }\n\t}", "title": "" }, { "docid": "243ff0357766f67611c7db53049165cd", "score": "0.7704518", "text": "function queueWatcher (watcher) {\n\t var id = watcher.id;\n\t if (has$1[id] == null) {\n\t has$1[id] = true;\n\t if (!flushing) {\n\t queue.push(watcher);\n\t } else {\n\t // if already flushing, splice the watcher based on its id\n\t // if already past its id, it will be run next immediately.\n\t var i = queue.length - 1;\n\t while (i >= 0 && queue[i].id > watcher.id) {\n\t i--;\n\t }\n\t queue.splice(Math.max(i, index) + 1, 0, watcher);\n\t }\n\t // queue the flush\n\t if (!waiting) {\n\t waiting = true;\n\t nextTick(flushSchedulerQueue);\n\t }\n\t }\n\t}", "title": "" }, { "docid": "67a55ec2dcca5b0289b749c85405c272", "score": "0.7688683", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "67a55ec2dcca5b0289b749c85405c272", "score": "0.7688683", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "67a55ec2dcca5b0289b749c85405c272", "score": "0.7688683", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "67a55ec2dcca5b0289b749c85405c272", "score": "0.7688683", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "67a55ec2dcca5b0289b749c85405c272", "score": "0.7688683", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "67a55ec2dcca5b0289b749c85405c272", "score": "0.7688683", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "df24dd5509fdff32a8f55c12afeb1732", "score": "0.7683629", "text": "function queueWatcher(watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i >= 0 && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(Math.max(i, index) + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n (0, _index.nextTick)(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "2e0eb649b0df7556fbe0bd096b013245", "score": "0.76827407", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (\"development\" !== 'production' && !config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "c106f4c7e34ac748041a6629109328f0", "score": "0.76827395", "text": "function queueWatcher(watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "c106f4c7e34ac748041a6629109328f0", "score": "0.76827395", "text": "function queueWatcher(watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "c106f4c7e34ac748041a6629109328f0", "score": "0.76827395", "text": "function queueWatcher(watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "2270d394d2ca8218d1faccb311f3e932", "score": "0.7682251", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "2270d394d2ca8218d1faccb311f3e932", "score": "0.7682251", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "2270d394d2ca8218d1faccb311f3e932", "score": "0.7682251", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "2270d394d2ca8218d1faccb311f3e932", "score": "0.7682251", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n }", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "506de4458b5d915967af81c44f96758e", "score": "0.7678658", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "f0f68bf02a7fa5fc07e3dee0327fff35", "score": "0.76643384", "text": "function queueWatcher(watcher) {\n var id = watcher.id;\n\n if (has[id] == null) {\n has[id] = true;\n\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n\n queue.splice(i + 1, 0, watcher);\n } // queue the flush\n\n\n if (!waiting) {\n waiting = true;\n\n if (\"production\" !== 'production' && !config.async) {\n flushSchedulerQueue();\n return;\n }\n\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "b5845ad545a046291c18ed3a513f9253", "score": "0.7662321", "text": "function queueWatcher(watcher) {\n var id = watcher.id;\n\n if (has[id] == null) {\n has[id] = true;\n\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n\n queue.splice(i + 1, 0, watcher);\n } // queue the flush\n\n\n if (!waiting) {\n waiting = true;\n\n if (\"development\" !== 'production' && !config.async) {\n flushSchedulerQueue();\n return;\n }\n\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "a6b664883e707711e49d9df5570f5a0e", "score": "0.7654919", "text": "function queueWatcher(watcher) {\n var id = watcher.id;\n\n if (has$1[id] == null) {\n has$1[id] = true;\n\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n\n queue.splice(i + 1, 0, watcher);\n } // queue the flush\n\n\n if (!waiting) {\n waiting = true;\n\n if ( true && !config.async) {\n flushSchedulerQueue();\n return;\n }\n\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" }, { "docid": "bbea7fe24abe77ee8859d3bd348c8c61", "score": "0.7651603", "text": "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has[id] == null) {\n has[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n var i = queue.length - 1;\n while (i > index && queue[i].id > watcher.id) {\n i--;\n }\n queue.splice(i + 1, 0, watcher);\n }\n // queue the flush\n if (!waiting) {\n waiting = true;\n\n if (!config.async) {\n flushSchedulerQueue();\n return\n }\n nextTick(flushSchedulerQueue);\n }\n }\n}", "title": "" } ]
c0708200dee8daafd43af492ba4031d3
build main deps graph
[ { "docid": "b502e82ffb58d87c46e815f72be4295b", "score": "0.5066483", "text": "buildDesGraph() {\n try {\n this.emit('building_graph');\n this.graph = buildDesGraph(this.entry, this._allowExternal);\n return this;\n } catch (error) {\n console.log(`Error while building graph\\n ${prettyjson.render(error)}`);\n }\n }", "title": "" } ]
[ { "docid": "53c64046c6960afe2a2b8e57f4fda3c6", "score": "0.64123774", "text": "function createGraph() {\n const mainAsset = createAsset('./example/main.js')\n const queue = [mainAsset];\n for (const asset of queue) {\n asset.deps.forEach((relativePath) => {\n const child = createAsset(path.resolve('./example', relativePath))\n asset.mapping[relativePath] = child.id;\n queue.push(child);\n // console.log(`child`, child);\n })\n\n }\n return queue\n}", "title": "" }, { "docid": "a3f0b3f9f0f0ed190b617a1732b3c039", "score": "0.6350739", "text": "async fromClosureDeps() {\n const json = await fsExtra.readJSON(DepsSorter.CLOSURE_LIBRARY_DEPS_PATH);\n for (let fileName in json) {\n if (json.hasOwnProperty(fileName)) {\n let data = json[fileName];\n this.addSourceNode({\n fileName,\n provides: data.provides,\n requiredIter: new Set(data.requires).values(),\n forwardDeclaredIter: new Set(data.forwardDeclares).values()\n });\n }\n }\n }", "title": "" }, { "docid": "9c5a485e4c5e4cc185f260e68fc06885", "score": "0.6243168", "text": "async function runUpdateDepgraph() {\n log(`<bold:Updating dependency-graph build order (tsconfig.project.json)...>`);\n let ordered = depgraph.getOrdered();\n\n let path = resolve(local.ROOT, \"../tsconfig.project.json\")\n\n let projectConfig = local.loadJson(path);\n projectConfig.references = ordered.map((name) => ({ path: (\"./packages/\" + name) }));\n local.saveJson(path, projectConfig);\n}", "title": "" }, { "docid": "6125e1053691b47c7b0ab4b815e17ac5", "score": "0.5989146", "text": "function createGraph(mainAsset) {\n const queue = [mainAsset];\n\n for (const asset of queue) {\n asset.mapping = {};\n asset.deps.forEach((relativePath) => {\n const dirname = path.dirname(asset.filename);\n const absolutePath = path.join(dirname, relativePath);\n\n if (/\\.css$/.test(relativePath)) {\n const content = fs.readFileSync(absolutePath, \"utf-8\");\n const code = `\n const style = document.createElement(\"style\");\n style.setAttribute(\"type\", \"text/css\");\n style.innerText = ${JSON.stringify(content).replace(/\\\\n/g, \"\")}\n document.head.appendChild(style);\n `;\n\n const id = ID++;\n\n const child = {\n id: id,\n filename: absolutePath,\n code,\n deps: [],\n };\n\n asset.mapping = {\n [relativePath]: child.id\n };\n\n queue.push(child);\n\n } else {\n const child = createAsset(absolutePath);\n\n asset.mapping = {\n ...asset.mapping,\n [relativePath]: child.id\n };\n\n queue.push(child);\n }\n })\n }\n return queue;\n}", "title": "" }, { "docid": "b9cb8899f4ca483381b9fd597f99a633", "score": "0.5948871", "text": "[_loadDeps] () {}", "title": "" }, { "docid": "8455f0875761cbb5ac0c1617af16060f", "score": "0.5892067", "text": "async processPkg(data, parentName) {\n\t\tconst cwd = data.path;\n\t\tconst moduleName = data.name;\n\t\tconst pkg = data.pkg;\n\n\t\tlog.verbose(\"Analyzing %s (%s) (dependency of %s)\", moduleName, cwd, parentName || \"nothing - root project\");\n\n\t\t/*\n\t\t * \tInject collection definitions for some known projects\n\t\t *\tuntil this is either not needed anymore or added to the actual project.\n\t\t */\n\t\tthis.shimCollection(moduleName, pkg);\n\n\t\tlet dependencies = pkg.dependencies || {};\n\t\tlet optDependencies = pkg.devDependencies || {};\n\n\t\tconst version = pkg.version;\n\n\t\t// Also look for \"napa\" dependencies (see https://github.com/shama/napa)\n\t\tif (pkg.napa) {\n\t\t\tObject.keys(pkg.napa).forEach((napaName) => {\n\t\t\t\tdependencies[napaName] = pkg.napa[napaName];\n\t\t\t});\n\t\t}\n\n\t\tconst ui5Deps = pkg.ui5 && pkg.ui5.dependencies;\n\t\tif (ui5Deps && Array.isArray(ui5Deps)) {\n\t\t\tfor (let i = 0; i < ui5Deps.length; i++) {\n\t\t\t\tconst depName = ui5Deps[i];\n\t\t\t\tif (!dependencies[depName] && !optDependencies[depName]) {\n\t\t\t\t\tthrow new Error(`[npm translator] Module ${depName} is defined as UI5 dependency ` +\n\t\t\t\t\t\t`but missing from npm dependencies of module ${moduleName}`);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// When UI5-dependencies are defined, we don't care whether an npm dependency is optional or not.\n\t\t\t//\tAll UI5-dependendies need to be there.\n\t\t\tdependencies = Object.assign({}, dependencies, optDependencies);\n\t\t\toptDependencies = {};\n\n\t\t\tfor (const depName in dependencies) {\n\t\t\t\tif (dependencies.hasOwnProperty(depName) && ui5Deps.indexOf(depName) === -1) {\n\t\t\t\t\tlog.verbose(\"Ignoring npm dependency %s. Not defined in UI5-dependency configuration.\", depName);\n\t\t\t\t\tdelete dependencies[depName];\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.projectsWoUi5Deps.push(moduleName);\n\t\t}\n\n\t\t/*\n\t\t\tIt's either a project or a collection but never both!\n\n\t\t\tWe don't care about dependencies of collections for now because we only remember dependencies\n\t\t\ton projects.\n\t\t\tAlthough we could add the collections dependencies as project dependencies to the related modules\n\t\t*/\n\t\tif (!pkg.collection) {\n\t\t\treturn this.getDepProjects({\n\t\t\t\tcwd,\n\t\t\t\tparentName: moduleName,\n\t\t\t\tdependencies,\n\t\t\t\toptionalDependencies: pkg.optionalDependencies\n\t\t\t}).then((depProjects) => {\n\t\t\t\t// Array needs to be flattened because:\n\t\t\t\t// getDepProjects returns array * 2 = array with two arrays\n\t\t\t\tconst projects = Array.prototype.concat.apply([], depProjects);\n\n\t\t\t\treturn [{\n\t\t\t\t\tid: moduleName,\n\t\t\t\t\tversion,\n\t\t\t\t\tpath: cwd,\n\t\t\t\t\tdependencies: projects\n\t\t\t\t}];\n\t\t\t}).then(([project]) => {\n\t\t\t\t// Register optional dependencies as \"pending\" as we do not try to resolve them ourself.\n\t\t\t\t// If we would, we would *always* resolve them for modules that are linked into monorepos.\n\t\t\t\t// In such cases, dev-dependencies are typically always available in the node_modules directory.\n\t\t\t\t// Therefore we register them as pending. And if any other project resolved them, we add them to\n\t\t\t\t//\tour dependencies later on.\n\t\t\t\tthis.registerPendingDependencies({\n\t\t\t\t\tparentProject: project,\n\t\t\t\t\tdependencies: optDependencies\n\t\t\t\t});\n\t\t\t\treturn [project];\n\t\t\t});\n\t\t} else { // collection\n\t\t\tlog.verbose(\"Found a collection: %s\", moduleName);\n\t\t\tconst modules = pkg.collection && pkg.collection.modules || {};\n\t\t\treturn Promise.all(\n\t\t\t\tObject.keys(modules).map((depName) => {\n\t\t\t\t\tconst modulePath = path.join(cwd, modules[depName]);\n\t\t\t\t\tif (depName === parentName) { // TODO improve recursion detection here\n\t\t\t\t\t\tlog.verbose(\"Ignoring module with same name as parent: \" + parentName);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn this.readProject({modulePath, moduleName: depName, parentName: moduleName});\n\t\t\t\t})\n\t\t\t).then((projects) => {\n\t\t\t\t// Array needs to be flattened because:\n\t\t\t\t//\treadProject returns an array + Promise.all returns an array = array filled with arrays\n\t\t\t\t// Filter out null values of ignored packages\n\t\t\t\treturn Array.prototype.concat.apply([], projects.filter((p) => p !== null));\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "916952ca25715ea4afc3bf750b4de193", "score": "0.58704066", "text": "function buildYarnGraph(yarnData) {\n // 'a': ['b', 'c'] means 'a' depends on 'b' and 'c'\n const dependsOn = Object.create(null);\n Object.keys(yarnData).forEach(pkgName => {\n const pkg = yarnData[pkgName];\n const pkgNode = getNode(yarnData, pkgName);\n // If multiple version specs resolve to the same actual package version, we\n // only want to record the dependency once.\n if (dependsOn[pkgNode] !== undefined) {\n return;\n }\n dependsOn[pkgNode] = [];\n const deps = pkg.dependencies;\n if (deps) {\n Object.keys(deps).forEach(depName => {\n const depNode = getNode(yarnData, `${depName}@${deps[depName]}`);\n dependsOn[pkgNode].push(depNode);\n });\n }\n });\n return dependsOn;\n}", "title": "" }, { "docid": "b93c489f92c1e218ceda908bcf9c7530", "score": "0.5682706", "text": "mapDependencies() {\n if (this.mapped) {\n return;\n }\n this.mapped = true;\n this.packages.forEach((pkg) => {\n Object.keys(Object.assign(Object.assign({}, pkg.dependencies), pkg.peerDependencies)).forEach((depName) => {\n this.mapDependency(pkg.name, depName);\n });\n });\n }", "title": "" }, { "docid": "ac115edfd31799bc3983510f12124947", "score": "0.5632589", "text": "function depTree() {\n\n var graphs = [];\n\n for (var i in this) {\n\n var graph = {\n name: this[i].name,\n id: this[i].id,\n nodes: [],// this[i].ids,\n edges: [] // this[i].dep\n }\n\n if(i === 'toString' || i === 'inspect')\n continue;\n\n // console.log(this[i].nodes.length);\n\n for (var j = 0; j < this[i].nodes.length; j++) {\n graph.nodes.push(this[i].nodes[j]);\n };\n\n for (var j = 0; j < this[i].deps.length; j++) {\n var present = true;\n // console.log(this[i].dep[j]);\n graph.edges.push(this[i].deps[j]);\n\n for (var k = 0; k < this[i].nodes.length; k++)\n if ( this[i].deps[j].name === this[i].nodes[k].id )\n present = false;\n };\n\n\n\n graphs.push(graph);\n };\n\n return digraph(graphs);\n}", "title": "" }, { "docid": "315a998902e3ad9d48eb6a9ddd934f99", "score": "0.56276053", "text": "function buildStandard() {\n console.log('Building standard outputs to built/gcli[-uncompressed].js');\n\n copy.mkdirSync(gcliHome + '/built', 0755);\n var project = copy.createCommonJsProject({\n roots: [ gcliHome + '/lib' ]\n });\n var sources = copy.createDataObject();\n\n copy({\n source: {\n project: project,\n // This list of dependencies should be the same as in index.html\n require: [ 'gcli/index', 'demo/index', 'gclitest/index' ]\n },\n filter: copy.filter.moduleDefines,\n dest: sources\n });\n copy({\n source: { root: project, include: /.*\\.png$|.*\\.gif$/ },\n filter: copy.filter.base64,\n dest: sources\n });\n console.log(project.report());\n\n // Create a GraphML dependency report. Directions:\n // - Install yEd (http://www.yworks.com/en/products_yed_about.htm)\n // - Load gcli/built/gcli.graphml\n // - Resize the nodes (Tools->Fit Node to Label)\n // - Apply a layout (Layout->Hierarchical)\n console.log('Outputting dependency graph to built/gcli.graphml\\n');\n if (project.getDependencyGraphML) {\n copy({\n source: { value:project.getDependencyGraphML() },\n dest: 'built/gcli.graphml'\n });\n }\n\n // Create the output scripts, compressed and uncompressed\n copy({ source: 'index.html', filter: tweakIndex, dest: 'built/index.html' });\n copy({ source: 'scripts/es5-shim.js', dest: 'built/es5-shim.js' });\n copy({\n source: [ copy.getMiniRequire(), sources ],\n dest: 'built/gcli-uncompressed.js'\n });\n try {\n copy({\n source: [ copy.getMiniRequire(), sources ],\n filter: copy.filter.uglifyjs,\n dest: 'built/gcli.js'\n });\n }\n catch (ex) {\n console.log('ERROR: Uglify compression fails on windows/linux. ' +\n 'Skipping creation of built/gcli.js\\n');\n }\n}", "title": "" }, { "docid": "f02d980e6dea8cbb81c6721158c3c653", "score": "0.5603764", "text": "async function main() {\n const flags = minimist(process.argv.slice(2));\n console.error([flags.project_target].flat());\n const g = new BuildGraph(flags.source_root, [flags.project_target].flat());\n const bse = new BuildSettingsExtractor(flags.source_root);\n await g.resolveConfigs(bse);\n console.log(JSON.stringify(\n downlevelESContainer(g),\n (key, value) => /^_/.test(key) ? undefined : value,\n flags.human_readable === \"false\" ? 0 : 2,\n ));\n console.warn(\"Done processing all pbxproj files!\");\n}", "title": "" }, { "docid": "e3439c8d8b138d9df4cb733fafb438ca", "score": "0.5570273", "text": "function getDependencyGraph (name, version, cache = {}, cb) {\n cache[name] = cache[name] || {}\n\n let module = cache[name][version]\n\n if (module) return process.nextTick(() => cb(null, module))\n\n module = cache[name][version] = new Module({ name, version })\n\n getModuleDependencies(name, version, (err, dependencies) => {\n if (err) return cb(err)\n\n // No dependencies?\n if (!Object.keys(dependencies).length) return cb(null, module)\n\n Async.eachOf(dependencies, (range, name, cb) => {\n getLatestSatisfying(name, range, (err, version) => {\n if (err && err.code !== 'E404') return cb(err)\n\n // There should be a version that satisfies!\n // But...\n // The range could be a tag, or a git repo\n if (!version) {\n // Add a dummy package with the range as it's version\n module.dependencies.push(new Module({ name, range }))\n return cb()\n }\n\n getDependencyGraph(name, version, cache, (err, dependencyGraph) => {\n if (err) return cb(err)\n module.dependencies.push(dependencyGraph)\n cb()\n })\n })\n }, (err) => cb(err, module))\n })\n }", "title": "" }, { "docid": "50f9c3fc98a58776d7817ec83af7f6b5", "score": "0.5545024", "text": "buildGraphs() {\n this.buildGeneralGraph();\n this.buildIncomesGraph();\n this.buildExpensesGraph();\n }", "title": "" }, { "docid": "a1edab34d174310cff60a0ac78fd05c3", "score": "0.55044013", "text": "function getDependencyGraph(req) {\n let context = new Context(req, serverOptions);\n let dsl = new DSL_V1(context);\n return dsl.buildLocalDependencyGraph(serverOptions.workSpacePath);\n // if (!dependencyGraph){\n // rebuildGraph(req);\n // }\n // return dependencyGraph;\n }", "title": "" }, { "docid": "35d99639587d8361fe217d1ab853becc", "score": "0.5503289", "text": "static Build(deps) {\n const workflow = new Workflow();\n\n workflow.setDependency(deps);\n\n return workflow;\n }", "title": "" }, { "docid": "d14649a3276207a27a883b1d43653782", "score": "0.54041535", "text": "processNpmDependencies (next) {\n let self = this\n\n // don't use NPM on test environment (otherwise the tests will fail)\n if (self.api.env === 'test') { return next() }\n\n // get scope variable\n const scope = this.api.scope\n\n // check if the stellar is starting in clean mode. If yes we need remove all\n // temporary files and process every thing again\n if (scope.args.clean) {\n // list of temporary files\n let tempFilesLocations = [\n `${scope.rootPath}/temp`,\n `${scope.rootPath}/package.json`,\n `${scope.rootPath}/node_modules`\n ]\n\n // iterate all temp paths and remove all of them\n tempFilesLocations.forEach(path => this.api.utils.removePath(path))\n }\n\n // if the `package.json` file already exists and Stellar isn't starting with\n // the `update` flag return now\n if (this.api.utils.fileExists(`${scope.rootPath}/package.json`) &&\n !scope.args.update) { return next() }\n\n // global npm dependencies\n let npmDependencies = {}\n\n // iterate all active modules\n self.activeModules.forEach(manifest => {\n // check if the module have NPM dependencies\n if (manifest.npmDependencies !== undefined) {\n // merge the two hashes\n npmDependencies = this.api.utils.hashMerge(npmDependencies, manifest.npmDependencies)\n }\n })\n\n // compile project information\n let projectJson = {\n private: true,\n name: 'stellar-dependencies',\n version: '1.0.0',\n description: 'This is automatically generated don\\'t edit',\n dependencies: npmDependencies\n }\n\n // generate project.json file\n const packageJsonPath = `${self.api.scope.rootPath}/package.json`\n this.api.utils.removePath(packageJsonPath)\n fs.writeFileSync(packageJsonPath, JSON.stringify(projectJson, null, 2), 'utf8')\n\n self.api.log('updating NPM packages', 'info')\n\n // check the command to be executed\n const npmCommand = (scope.args.update) ? 'npm update' : 'npm install'\n\n // run npm command\n exec(npmCommand, error => {\n // if an error occurs finish the process\n if (error) {\n self.api.log('An error occurs during the NPM install command', 'emergency')\n process.exit(1)\n }\n\n // load a success message\n self.api.log('NPM dependencies updated!', 'info')\n\n // finish the loading process\n next()\n })\n }", "title": "" }, { "docid": "a7edd30564df9062b72d22d74cfd0001", "score": "0.53952765", "text": "build()/*: { code: string }*/ {\n const types = this.iterateOverTypes()\n\n return this.buildProgram(this.buildModule(types))\n // return generate(bt.program(this.buildModule(types), [], 'module'))\n }", "title": "" }, { "docid": "56305b70489d9d92943e8daf40f494fe", "score": "0.53816843", "text": "async function build() {\n // Load package.json file\n setPackageJsonFile();\n // Update addon name in package.json file\n const origBinary = JSON.parse(JSON.stringify(packageJsonFile['binary']));\n updateAddonName();\n console.error('* Building TensorFlow Node.js bindings');\n let buildOption = '--fallback-to-build';\n if (customTFLibUri !== undefined && customAddon === undefined) {\n // Has custom tensorflow shared libs but no addon. Then build it from source\n buildOption = '--build-from-source';\n }\n cp.exec(`node-pre-gyp install ${buildOption}`, (err) => {\n if (err) {\n console.log('node-pre-gyp install failed with error: ' + err);\n process.exit(1);\n }\n if (platform === 'win32') {\n // Move libtensorflow to module path, where tfjs_binding.node locates.\n cp.exec('node scripts/deps-stage.js symlink ' + modulePath, (error) => {\n if (error) {\n console.error('symlink ' + modulePath + ' failed: ', error);\n process.exit(1);\n }\n });\n }\n revertAddonName(origBinary);\n });\n}", "title": "" }, { "docid": "d68026fa1f5f4ff46949ffc426d381c3", "score": "0.53709334", "text": "function buildGraph(m) {\n // class to scaffold Cytoscape graph building\n const GraphCollection = class {\n constructor() {\n this.collection = new Map()\n }\n push(element) {\n Logger.log(\"Pushing element \" + element.data.id + \" to map\");\n this.collection.set(element.data.id, element) \n }\n get(id) {\n return this.collection.get(id);\n }\n toArray() {\n return Array.from(this.collection.values())\n }\n }\n\n let v = new GraphCollection();\n let e = new GraphCollection();\n let constraints = [];\n let relativePlacementConstraint = [];\n\n const addStock = (p) => v.push(buildStock(p.getID()));\n const addConstant = (p) => v.push(buildConstant(p.getID()));\n const addVariable = (p) => v.push(buildVariable(p.getID()));\n const addInfluence = (idSrc, idDest) => e.push(buildInfluence(m.generateID(), idSrc, idDest));\n const addFlowEdge = (idSrc, idDest, idNode, bidirectional = false) => {\n const id = \"f\" + m.generateID()\n e.push(buildFlowEdge(id + \"i\", idSrc, idNode, idNode, true, bidirectional));\n e.push(buildFlowEdge(id + \"f\", idNode, idDest, idNode, false, bidirectional));\n return id;\n }\n const addFlowNode = (id) => e.push(buildFlowNode(id));\n const addCloud = () => {\n const id = m.generateID();\n e.push(buildCloud(id));\n return id;\n }\n\n let Flow = class {\n constructor(stockOut, stockIn, influences, operators) {\n this.stockOut = stockOut;\n this.stockIn = stockIn;\n this.influences = influences;\n this.operators = operators;\n }\n\n // Check if two flows come together to form a single flow between two stocks\n isComplement(flow) {\n return (\n ((this.stockOut === null && flow.stockIn === null) ||\n ((flow.stockOut === null && this.stockIn === null))) &&\n equals(this.influences, flow.influences) &&\n equals(this.operators, flow.operators)\n );\n }\n\n getID() {\n return this.id\n }\n\n add() {\n // Build clouds if no source/dest specified\n const src = this.stockOut === null ? addCloud() : this.stockOut.getID();\n const dest = this.stockIn === null ? addCloud() : this.stockIn.getID();\n let idNode;\n if (this.influences.length == 1 && this.influences[0] instanceof Parameter) { // combined variable/flow\n idNode = this.influences[0].getID()\n Logger.log(\"XNODE: \" + idNode);\n addFlowEdge(src, dest, idNode, false);\n v.get(idNode).classes = ['flow-node'];\n } else { // separate flow\n Logger.log(\"here!!\")\n Logger.log(this.influences.length);\n idNode = m.generateID();\n addFlowNode(idNode);\n addFlowEdge(src, dest, idNode, false);\n\n // add influences to flow node\n for (const influence of this.influences) {\n if (influence.isRelation() || influence.isConstant()) {\n Logger.log(\"Dealing with influence \" + influence.getID());\n addInfluence(influence.getID(), idNode);\n }\n }\n }\n\n // Check if any elements already in array\n let iConstraint = constraints.findIndex((ids) => ids.includes(src) || ids.includes(dest));\n\n if (iConstraint != -1) {\n let ids = constraints[iConstraint];\n if (ids.includes(src)) {\n ids.push(dest);\n } else if (ids.includes(dest)) {\n ids.push(src);\n } else {\n Logger.log(\"Something may have gone wrong with building constraints - tried to add IDs, but both were already constrained\");\n }\n } else {\n constraints.push([src, idNode, dest]);\n }\n\n // TODO: OPTIONAL - also skip if bidirectional\n relativePlacementConstraint.push({left: src, right: dest});\n }\n };\n\n let inflows = []; // list of class Flow instances\n let outflows = [];\n\n const addInfluences = (p) => {\n // Iterate over elements of the equation\n const it = p.getIterator();\n let result = it.next();\n while (!result.done) {\n [operator, operand] = result.value; // get iterator values\n if (operand !== undefined && operand !== null) {\n let element = operand.getElement();\n\n if (element.isRelation() || element.isConstant()) {\n addInfluence(element.getID(), p.getID());\n }\n }\n\n result = it.next(); // continue iterating\n }\n }\n\n const addFlows = (p) => {\n let positives = []; // parameters with a positive influence on the formula\n let negatives = []; // parameters with a negative influence on the formula\n let opsPositive = [];\n let opsNegative = [];\n\n // Iterate over elements of the equation\n const it = p.getIterator();\n let result = it.next();\n\n parenDepth = 0; // number of parentheses deep\n \n while (!result.done) {\n const POS = true;\n const NEG = false;\n\n [operator, operand] = result.value; // get iterator values\n\n let current = POS; // keeps track of + or - was last seen\n let stack = []; // keeps track of positivity/negativity of each parenthetical level\n\n if (operator == \"(\") {\n stack.push(current);\n } else if (operator == \")\") {\n current = stack.pop();\n } else if (operator == \"+\") {\n current = POS;\n } else if (operator == \"-\") {\n current = NEG;\n }\n\n if (operand !== undefined && operand !== null) {\n let element = operand.getElement();\n\n // skip stock basis\n if (p.getID() == element.getID() && operand.getDisplacement() == 1) {\n result = it.next();\n continue;\n }\n\n // note whether element is positive or negative influence\n if (current == POS) {\n positives.push(element);\n if (operator !== \"+\" && operator !== \"-\") {\n opsPositive.push(operand);\n }\n } else {\n negatives.push(element);\n if (operator !== \"+\" && operator !== \"-\") {\n opsNegative.push(operand);\n }\n }\n }\n\n result = it.next(); // continue iterating\n }\n\n if (positives.length >= 1) {\n inflows.push(new Flow(null, p, positives, opsPositive));\n }\n\n if (negatives.length >= 1) {\n outflows.push(new Flow(p, null, negatives, opsNegative));\n }\n }\n\n // Build stock, constant, and variable nodes\n for (const p of m.getParameters()) {\n if (p.isRelation()) { // stock or variable\n if (p.isRecursive()) { // stock\n // **NOTE: ADD ADDITIONAL CONDITION that min recursive depth is 1?\n // Add a stock node to the graph\n addStock(p);\n addFlows(p);\n } else { // variable\n // Add a variable node to the graph\n addVariable(p);\n addInfluences(p);\n }\n } else if (p.isConstant()) { // variable\n addConstant(p);\n }\n }\n\n // Flows between two stocks\n let localFlows = [];\n // Indices of inflows and outflows that have been combined into local flows\n let iContributingInflows = [];\n let iContributingOutflows = [];\n\n // combine complementary flows together into stock-stock flow\n for (let iIn = 0; iIn < inflows.length; iIn++) {\n const inflow = inflows[iIn];\n for (let iOut = 0; iOut < outflows.length; iOut++) {\n const outflow = outflows[iOut];\n if (inflow.isComplement(outflow)) {\n // push combined flow\n localFlows.push(new Flow(outflow.stockOut, inflow.stockIn, outflow.influences, outflow.operators));\n iContributingInflows.push(iIn);\n iContributingOutflows.push(iOut);\n }\n }\n }\n \n // create list of all flows\n const flows = localFlows.concat(\n inflows.filter((_, i) => !iContributingInflows.includes(i)),\n outflows.filter((_, i) => !iContributingOutflows.includes(i))\n );\n\n for (const flow of flows) {\n flow.add()\n }\n\n let graph = v.toArray().concat(e.toArray());\n\n return [\n graph,\n {horizontal: constraints},\n relativePlacementConstraint\n ];\n}", "title": "" }, { "docid": "7e1031a15d16576ba42f0023d701b0dc", "score": "0.5363037", "text": "async updatePackages ()\n {\n for (let child of this.children) {\n let deps = await child.analyzeSourceDependencies();\n let patches = [\n ...child.generateDependencyPatches(deps),\n ...child.generateInheritPatches(),\n ];\n patches = this.updatePatches(patches);\n for (let patch of patches) {\n this.logPatch(child, patch);\n child.applyPatch(patch);\n }\n }\n }", "title": "" }, { "docid": "6bc22a4490cea2e40184966e50ba0896", "score": "0.5344635", "text": "async function BuildNetwork() {\n await GraphObj.Build();\n await InitDropdowns();\n await UpdateProvidersDropdown();\n await DrawGraph();\n}", "title": "" }, { "docid": "19174f7d1873177292756f59126dd9bd", "score": "0.5332469", "text": "_propagateRequired() {\n //\n const toVisit = [];\n\n // enumerate all non-ignored packages\n for (var _iterator4 = this.tree.entries(), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {\n var _ref5;\n\n if (_isArray4) {\n if (_i4 >= _iterator4.length) break;\n _ref5 = _iterator4[_i4++];\n } else {\n _i4 = _iterator4.next();\n if (_i4.done) break;\n _ref5 = _i4.value;\n }\n\n const entry = _ref5;\n\n if (entry[1].isRequired) {\n toVisit.push(entry[1]);\n }\n }\n\n // visit them\n while (toVisit.length) {\n const info = toVisit.shift();\n const ref = info.pkg._reference;\n invariant(ref, 'expected reference');\n\n for (var _iterator5 = ref.dependencies, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {\n var _ref6;\n\n if (_isArray5) {\n if (_i5 >= _iterator5.length) break;\n _ref6 = _iterator5[_i5++];\n } else {\n _i5 = _iterator5.next();\n if (_i5.done) break;\n _ref6 = _i5.value;\n }\n\n const depPattern = _ref6;\n\n const depinfo = this._lookupDependency(info, depPattern);\n\n if (!depinfo) {\n continue;\n }\n\n const depRef = depinfo.pkg._reference;\n\n // If it's marked as optional, but the parent is required and the\n // dependency was not listed in `optionalDependencies`, then we mark the\n // dependency as required.\n const isMarkedAsOptional = depRef && depRef.optional && this.ignoreOptional && !(info.isRequired && depRef.hint !== 'optional');\n\n if (!depinfo.isRequired && !depinfo.isIncompatible && !isMarkedAsOptional) {\n depinfo.isRequired = true;\n depinfo.addHistory(`Mark as non-ignored because of usage by ${info.key}`);\n toVisit.push(depinfo);\n }\n }\n }\n }", "title": "" }, { "docid": "87f56bd21072756b2d94f6034353f683", "score": "0.5331333", "text": "function createDependencyGraph(tasks) {\n var graph = {\n tasks: {},\n roots: [],\n leaves: [],\n resources: [],\n depth: 0,\n end : 0\n };\n\n for(var i = 0, len = tasks.length; i < len; i++) {\n var t = tasks[i];\n graph.tasks[t.id] = {\n id: t.id,\n duration: t.duration,\n priority: t.priority,\n schedule: t.schedule,\n minSchedule: t.minSchedule,\n dependsOn: t.dependsOn,\n resources: t.resources\n };\n }\n\n setResources(graph);\n setRequiredBy(graph.tasks);\n setRootsAndLeaves(graph);\n\n setDepth(graph, graph.leaves, 0);\n graph.depth += 1; // increment depth so it is 1 based\n\n forwardPass(graph, {}, graph.roots, 0);\n setEnd(graph, graph.leaves);\n backwardPass(graph, {}, graph.leaves, graph.end);\n\n return graph;\n }", "title": "" }, { "docid": "f3895f79cdccf1a9301bc7aa029f558c", "score": "0.5325433", "text": "function collectDependencies(\nast,\noptions)\n{\n const visited = new WeakSet();const\n asyncRequireModulePath = options.asyncRequireModulePath,dynamicRequires = options.dynamicRequires;\n const context = {\n asyncRequireModulePath,\n dynamicRequires,\n dependencies: [],\n nameToIndex: new Map() };\n\n const visitor = {\n Program(path, state) {\n state.dependencyMapIdentifier = path.scope.generateUidIdentifier(\n 'dependencyMap');\n\n },\n CallExpression(path, state) {const\n depMapIdent = state.dependencyMapIdentifier;\n const node = path.node;\n if (visited.has(node)) {\n return;\n }\n if (node.callee.type === 'Import') {\n processImportCall(context, path, node, depMapIdent);\n return;\n }\n if (isRequireCall(node.callee)) {\n const reqNode = processRequireCall(context, path, node, depMapIdent);\n visited.add(reqNode);\n }\n } };\n\n const traversalState = { dependencyMapIdentifier: null };\n traverse(ast, visitor, null, traversalState);\n return {\n dependencies: context.dependencies,\n dependencyMapName: nullthrows(traversalState.dependencyMapIdentifier).name };\n\n}", "title": "" }, { "docid": "52c1a631152c6e8a8a208af35b98d2a5", "score": "0.5307995", "text": "build() {}", "title": "" }, { "docid": "a3b785796d7d22972251d420ba8976b0", "score": "0.5307877", "text": "_seed(pattern, { isDirectRequire, parent }) {\n //\n const pkg = this.resolver.getStrictResolvedPattern(pattern);\n const ref = pkg._reference;\n invariant(ref, 'expected reference');\n\n //\n let parentParts = [];\n\n const isIncompatible = ref.incompatible;\n const isMarkedAsOptional = ref.optional && this.ignoreOptional;\n\n let isRequired = isDirectRequire && !ref.ignore && !isIncompatible && !isMarkedAsOptional;\n\n if (parent) {\n if (!this.tree.get(parent.key)) {\n return null;\n }\n // non ignored dependencies inherit parent's ignored status\n // parent may transition from ignored to non ignored when hoisted if it is used in another non ignored branch\n if (!isDirectRequire && !isIncompatible && parent.isRequired && !isMarkedAsOptional) {\n isRequired = true;\n }\n parentParts = parent.parts;\n }\n\n //\n const loc = this.config.generateModuleCachePath(ref);\n const parts = parentParts.concat(pkg.name);\n const key = this.implodeKey(parts);\n const info = new HoistManifest(key, parts, pkg, loc, isDirectRequire, isRequired, isIncompatible);\n\n this.nohoistResolver.initNohoist(info, parent);\n\n this.tree.set(key, info);\n this.taintKey(key, info);\n\n //\n const pushed = new Set();\n for (var _iterator3 = ref.dependencies, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {\n var _ref4;\n\n if (_isArray3) {\n if (_i3 >= _iterator3.length) break;\n _ref4 = _iterator3[_i3++];\n } else {\n _i3 = _iterator3.next();\n if (_i3.done) break;\n _ref4 = _i3.value;\n }\n\n const depPattern = _ref4;\n\n if (!pushed.has(depPattern)) {\n this.levelQueue.push([depPattern, info]);\n pushed.add(depPattern);\n }\n }\n\n return info;\n }", "title": "" }, { "docid": "85ba03750ccff40f2447a02f9caac9f0", "score": "0.5273996", "text": "function createDependencyTree(entry) {\n var engine = entry.config.engine || cnsts.defaultEngine\n , exp = cnsts.export[engine]\n , data = JSON.stringify(entry.dtree);\n\n return `${exp}\\n${data};`\n .replace(/\\r?\\n/g, \"\\n \");\n }", "title": "" }, { "docid": "48a397aef62f1110343b56a562227f98", "score": "0.52629036", "text": "listDependencies() {\n let imports = this.commonImports;\n if (this.conf.useFragments) {\n imports = imports.concat(this.fragmentsImportsData);\n } else {\n imports = imports.concat(this.consoleImportsData);\n }\n const bc = 'bower_components/';\n if (this.conf.addApiOAuthComponents) {\n imports.push(bc + 'oauth-authorization/oauth-authorization.html');\n this.logger.info('Adding OAuth authorization to the dependencies.');\n }\n if (this.conf.addCryptoJs) {\n imports.push(bc + 'cryptojs-lib/cryptojs-lib.html');\n this.logger.info('Adding CryptoJS to the dependencies.');\n }\n if (this.conf.addJsPolyfills) {\n imports.push(bc + 'arc-polyfills/arc-polyfills.html');\n this.logger.info('Adding Polyfills to the dependencies.');\n }\n if (this.conf.addXhrRequest) {\n imports.push(bc + 'xhr-simple-request/xhr-simple-request.html');\n this.logger.info('Adding XHR to the dependencies.');\n }\n // Theme import MUST be the last one or any other component can\n // override common variables.\n imports.push(this.themeImport);\n this.buildImports = imports;\n this.logger.info('Dependencies list set.');\n this.logger.info(imports.join(', '));\n }", "title": "" }, { "docid": "a2b2327f8f7533bbe1d8260ee0a05dbf", "score": "0.52604383", "text": "build() {\n\n\t\t}", "title": "" }, { "docid": "f1cdb93e1130d44d3a169f5949532942", "score": "0.52563345", "text": "function dependencies() {\n return project.splitDependencies()\n .pipe(project.rejoin());\n}", "title": "" }, { "docid": "f1cdb93e1130d44d3a169f5949532942", "score": "0.52563345", "text": "function dependencies() {\n return project.splitDependencies()\n .pipe(project.rejoin());\n}", "title": "" }, { "docid": "9402290acc81dcb6dcade2e3c9129fe2", "score": "0.5241025", "text": "prepass(patterns) {\n patterns = this.resolver.dedupePatterns(patterns).sort();\n\n const visited = new Map();\n\n const occurences = {};\n\n // visitor to be used inside add() to mark occurences of packages\n const visitAdd = (pkg, ancestry, pattern) => {\n const versions = occurences[pkg.name] = occurences[pkg.name] || {};\n const version = versions[pkg.version] = versions[pkg.version] || {\n occurences: new Set(),\n pattern\n };\n\n if (ancestry.length) {\n version.occurences.add(ancestry[ancestry.length - 1]);\n }\n };\n\n // add an occurring package to the above data structure\n const add = (pattern, ancestry, ancestryPatterns) => {\n const pkg = this.resolver.getStrictResolvedPattern(pattern);\n if (ancestry.indexOf(pkg) >= 0) {\n // prevent recursive dependencies\n return;\n }\n\n let visitedPattern = visited.get(pattern);\n\n if (visitedPattern) {\n // if a package has been visited before, simply increment occurrences of packages\n // like last time this package was visited\n visitedPattern.forEach(visitPkg => {\n visitAdd(visitPkg.pkg, visitPkg.ancestry, visitPkg.pattern);\n });\n\n visitAdd(pkg, ancestry, pattern);\n\n return;\n }\n\n const ref = pkg._reference;\n invariant(ref, 'expected reference');\n\n visitAdd(pkg, ancestry, pattern);\n\n for (var _iterator7 = ref.dependencies, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {\n var _ref8;\n\n if (_isArray7) {\n if (_i7 >= _iterator7.length) break;\n _ref8 = _iterator7[_i7++];\n } else {\n _i7 = _iterator7.next();\n if (_i7.done) break;\n _ref8 = _i7.value;\n }\n\n const depPattern = _ref8;\n\n const depAncestry = ancestry.concat(pkg);\n const depAncestryPatterns = ancestryPatterns.concat(depPattern);\n add(depPattern, depAncestry, depAncestryPatterns);\n }\n\n visitedPattern = visited.get(pattern) || [];\n visited.set(pattern, visitedPattern);\n visitedPattern.push({ pkg, ancestry, pattern });\n\n ancestryPatterns.forEach(ancestryPattern => {\n const visitedAncestryPattern = visited.get(ancestryPattern);\n if (visitedAncestryPattern) {\n visitedAncestryPattern.push({ pkg, ancestry, pattern });\n }\n });\n };\n\n // get a list of root package names since we can't hoist other dependencies to these spots!\n const rootPackageNames = new Set();\n for (var _iterator8 = patterns, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {\n var _ref9;\n\n if (_isArray8) {\n if (_i8 >= _iterator8.length) break;\n _ref9 = _iterator8[_i8++];\n } else {\n _i8 = _iterator8.next();\n if (_i8.done) break;\n _ref9 = _i8.value;\n }\n\n const pattern = _ref9;\n\n const pkg = this.resolver.getStrictResolvedPattern(pattern);\n rootPackageNames.add(pkg.name);\n add(pattern, [], []);\n }\n\n for (var _iterator9 = Object.keys(occurences).sort(), _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) {\n var _ref10;\n\n if (_isArray9) {\n if (_i9 >= _iterator9.length) break;\n _ref10 = _iterator9[_i9++];\n } else {\n _i9 = _iterator9.next();\n if (_i9.done) break;\n _ref10 = _i9.value;\n }\n\n const packageName = _ref10;\n\n const versionOccurences = occurences[packageName];\n const versions = Object.keys(versionOccurences);\n\n if (versions.length === 1) {\n // only one package type so we'll hoist this to the top anyway\n continue;\n }\n\n if (this.tree.get(packageName)) {\n // a transitive dependency of a previously hoisted dependency exists\n continue;\n }\n\n if (rootPackageNames.has(packageName)) {\n // can't replace top level packages\n continue;\n }\n\n let mostOccurenceCount;\n let mostOccurencePattern;\n for (var _iterator10 = Object.keys(versionOccurences).sort(), _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) {\n var _ref11;\n\n if (_isArray10) {\n if (_i10 >= _iterator10.length) break;\n _ref11 = _iterator10[_i10++];\n } else {\n _i10 = _iterator10.next();\n if (_i10.done) break;\n _ref11 = _i10.value;\n }\n\n const version = _ref11;\n var _versionOccurences$ve = versionOccurences[version];\n const occurences = _versionOccurences$ve.occurences,\n pattern = _versionOccurences$ve.pattern;\n\n const occurenceCount = occurences.size;\n\n if (!mostOccurenceCount || occurenceCount > mostOccurenceCount) {\n mostOccurenceCount = occurenceCount;\n mostOccurencePattern = pattern;\n }\n }\n invariant(mostOccurencePattern, 'expected most occurring pattern');\n invariant(mostOccurenceCount, 'expected most occurring count');\n\n // only hoist this module if it occured more than once\n if (mostOccurenceCount > 1) {\n this._seed(mostOccurencePattern, { isDirectRequire: false });\n }\n }\n }", "title": "" }, { "docid": "125a563acd9fff361273931515410cd2", "score": "0.5192207", "text": "function buildGraph(){\n \n //set variables from global\n var pid_cutoff = pid;\n var plen_cutoff = plen;\n\n //if not the first time creating cy\n if (cy === undefined){\n //call SelectElements to parse the pairwise_parser.py output\n all_elems = selectElements(pid_cutoff, plen_cutoff);\n //elements to include in the graph\n graph_elems = all_elems['graph_elems'];\n //elements to exclude in the graph, but to add in after creation\n exclude_elems = all_elems['exclude_elems'];\n } else{\n //update the graph with settings\n updateCutoff();\n //elements in the new graph are in cy\n graph_elems = cy.elements();\n //elements to exclude are in removed_elems\n exclude_elems = removed_elems;\n }\n\n //destroy previous graph\n if ( cy !== undefined) { cy.destroy(); } \n \n //create new cy graph. Don't add elems yet (b/c we add two different types of element collectisons)\n //On initialization we add raw objects from nodes and edges arrays. On subsequent builds we add a cytoscape collection from updateGraph()\n new_cy = cytoscape({\n container: document.getElementById('cy'),\n zoom: .3,\n minZoom: .1,\n maxZoom: 1.2,\n style: [{\n selector: 'node',\n style: {\n // 'content': 'data(name)',\n 'width': 'mapData(num_cluster_members, 0, 120, 40, 120)', //size gradient by # clust membs \n 'height': 'mapData(num_cluster_members, 0, 120, 40, 120)', \n }\n },\n {\n selector: 'edge',\n css: {\n 'width': 5,\n 'line-color': \"#A9A9A9\",\n }\n },\n ],\n });\n //add elements to the graph\n new_cy.add(graph_elems)\n \n //create the layout\n layout = new_cy.layout(params);\n layout.run();\n \n //reassign new_cy to permanent variable\n cy = new_cy;\n\n //run the MCL algorithm to color nodes (relies on having cy to operate)\n mcl();\n\n //when cy is loaded\n cy.ready(function(event){\n //add in nodes and edges that didn't meet cutoff\n cy.add(exclude_elems);\n //update labels\n updatePidLabel(pid_cutoff);\n updatePlenLabel(plen_cutoff);\n //update the graph cutoff (just in case, but does catch some wierd edge cases)\n updateCutoff();\n //hide the loading icon\n });\n\n //initialize collection\n if (firstRun === true){\n firstRun = false\n selected_elems = cy.collection()\n }\n \n // Set style on the match_protein. This is the protein we originally searched for\n var match_protein_cy = cy.$('#'+match_protein.id)\n match_protein_cy = match_protein_cy.union('#'+match_protein.UniProtKB_accession)\n match_protein_cy.style({\n 'shape':'star'\n })\n\n // Set style on the analysis proteins. These are proteins that we selected for further analysis in a past step\n var analysis_proteins_cy \n if (typeof analysis_proteins !== 'undefined'){\n analysis_proteins.forEach(function (el, i, arr) {\n if (analysis_proteins_cy === undefined){\n analysis_proteins_cy = cy.$('#'+el.id)\n }\n analysis_proteins_cy = analysis_proteins_cy.union(cy.$('#'+el.id))\n analysis_proteins_cy = analysis_proteins_cy.union(cy.$('#'+el.UniProtKB_accession))\n })\n analysis_proteins_cy = analysis_proteins_cy.difference(match_protein_cy)\n analysis_proteins_cy.style({\n 'shape':'diamond'\n })\n }\n\n /**\n * Displays node info on click\n * Adds element to selected elements if shift key is held down\n */\n cy.$(\"node\").on(\"click\", function(e) {\n \n if (shifted) {\n var ele = e.target;\n \n if (!selected_elems.contains(ele)){\n console.log(ele)\n //update the checkbox to include it \n var prot_name = ele.data(\"protein_name\");\n var uniprotkb = ele.data(\"UniProtKB_accession\");\n var id = ele.data(\"id\");\n var num_cluster_members = ele.data(\"num_cluster_members\");\n $(\"#selection-area ul\").append('<li><label for=\"' + id + '\"><input type=\"checkbox\" name=\"' + id + '\" id=\"' + id + '\"> Prot name: ' + prot_name + \". UniProtKB: \" + uniprotkb + \". Cluster members: \"+num_cluster_members+\"</label></li>\");\n }\n //add element to selected elems\n selected_elems = selected_elems.add(ele);\n }\n displayNodeInfo(e);\n });\n \n //on hover\n cy.$('node').on('mouseover', function(e){\n displayNodeInfo(e);\n });\n\n //on edge click function\n cy.$('edge').on('click', function(e){\n var ele = e.target;\n console.log(ele);\n var info_text = \"\"\n for (var key in ele.data()) {\n if (ele.data().hasOwnProperty(key)) {\n info_text = info_text.concat(key + \" -> \" + ele.data()[key] + \"<br>\");\n }\n } \n //Update info box\n document.getElementById(\"info-text\").innerHTML = info_text;\n }); \n}", "title": "" }, { "docid": "13f04a01cf71c58c7c0ecb77d49ffc37", "score": "0.5187756", "text": "function createProjectGraph(components, componentDependencies) {\n const projectGraph = new DependencyGraph();\n components.forEach(component => projectGraph.addNode(component.id, component));\n componentDependencies.forEach(link => projectGraph.addLink(link.source, link.target));\n return projectGraph;\n}", "title": "" }, { "docid": "064c63d93bb3b0f274abec05770837a1", "score": "0.5166912", "text": "async linkPackages ()\n {\n const node_modules = path.resolve(this.root, 'node_modules');\n await fs.ensureDirPlease(node_modules);\n\n for (let child of this.children) {\n const name = child.packageJson.name;\n await fs.ensureSymlinkPlease(child.root, path.resolve(node_modules, name));\n }\n\n }", "title": "" }, { "docid": "66d7f8763f88cb2daab8c63bb0eed7cc", "score": "0.515692", "text": "function finalConcat() {\n var deps = okayDependencies.filter(function(dep) {\n return dep != root;\n });\n\n var global = string(root.realName).camelize();\n\n var str = string(root.realName).camelize() + \" = (function() {\\n\\n\";\n\n str += deps.concat(root).map(function(dep) {\n var distFile = moduleDistFile(dep);\n return fs.readFileSync(distFile);\n }).join('\\n');\n\n str += \"\\n return \" + global + \";\\n\";\n str += \"}());\\n\";\n\n fs.writeFileSync('dist/' + root.realName + '.js', str);\n\n console.log('done!'.blue);\n}", "title": "" }, { "docid": "546c2d89876effafb4272c06b9fb9533", "score": "0.51443213", "text": "function build_stitch_dependencies_file(cb) {\n\tconst OUTPUT_DIR = path.join(__dirname, '../dist');\n\tconst OUTPUT = path.join(OUTPUT_DIR, 'stitch-dependencies.min.js');\n\tlet data = '';\n\n\t// build all files where order doesn't matter\n\tfs.readdirSync(__dirname).forEach(function (entry) {\n\t\tconst path2file = path.join(__dirname, entry);\n\n\t\tif (fs.lstatSync(path2file).isDirectory()) {\n\t\t\tconsole.log('skipping b/c its a folder', path2file);\n\t\t} else if (entry === SELF_FNAME) {\n\t\t\tconsole.log('skipping file b/c its myself', path2file);\n\t\t} else if (entry === OUTPUT) {\n\t\t\tconsole.log('skipping file b/c its the destination', path2file);\n\t\t} else {\n\t\t\tconsole.log('using file:', path2file);\n\t\t\tdata += build_header(entry);\n\t\t\tdata += fs.readFileSync(path2file);\n\t\t}\n\t});\n\n\tconsole.log('wrote file:', OUTPUT);\n\tfs.ensureDirSync(OUTPUT_DIR)\n\tfs.writeFileSync(OUTPUT, data);\n\tconsole.log('stitch dependencies fin.', data.length);\n\treturn cb();\n\n\tfunction build_header(fileName) {\n\t\treturn '\\n// [' + fileName + ']\\n';\n\t}\n}", "title": "" }, { "docid": "f246f862ebe60ce6be69fca228bdc351", "score": "0.51418036", "text": "function compilePackage() {\n\t\tif (debug) {\n\t\t\tvar combined = '';\n\t\t\tvar concatOutput = function(path) {\n\t\t\t\treturn '//---------------------------------------------------' +\n\t\t\t\t\t\t'--------------\\n//From file: ' + path + '\\n\\n' +\n\t\t\t\t\tIO.read(path) + '\\n';\n\t\t\t};\n\t\t\t\n// \t\t\tcombined += concatOutput(IO.join(IO.cwd(), \".tmp/list.js\"));\n// \t\t\tcombined += concatOutput(IO.join(IO.cwd(), \"../misc.js\"));\n// \n// \t\t\tcombined += concatOutput(IO.join(IO.cwd(), \".tmp/object.js\"));\n// \t\t\tcombined += concatOutput(IO.join(IO.cwd(), \".tmp/stream.js\"));\n\n\t\t\tcombined += concatOutput(IO.join(IO.cwd(), \"lib/interpreter/json2.js\"));\n\t\t\tcombined += concatOutput(IO.join(IO.cwd(), \".tmp/parser.js\"));\n\t\t\tcombined += concatOutput(IO.join(IO.cwd(), \"lib/interpreter/interpreter.js\"));\n\t\t\tcombined += concatOutput(IO.join(IO.cwd(), \".tmp/jediscript.js\"));\n\n\t\t\t//Prevent these symbols from being renamed\n\t\t\tcombined += concatOutput(IO.join(IO.cwd(), \".tmp/exports.js\"));\n\t\t\twriteBack(combined);\n\t\t} else {\n\t\t\tconsole.log(\"Compiling using the Google Closure Compiler...\");\n\n\t\t\t//Compile using Google Closure:\n\t\t\t//Include the required libraries for functionality.\n\t\t\t// gcc.addFile(IO.join(IO.cwd(), \".tmp/list.js\"));\n\t\t\t// gcc.addFile(IO.join(IO.cwd(), \"../misc.js\"));\n\n\t\t\t// gcc.addFile(IO.join(IO.cwd(), \".tmp/object.js\"));\n\t\t\t// gcc.addFile(IO.join(IO.cwd(), \".tmp/stream.js\"));\n\n\t\t\tgcc.addFile(IO.join(IO.cwd(), \"lib/interpreter/json2.js\"));\n\t\t\tgcc.addFile(IO.join(IO.cwd(), \".tmp/parser.js\"));\n\t\t\tgcc.addFile(IO.join(IO.cwd(), \"lib/interpreter/interpreter.js\"));\n\t\t\tgcc.addFile(IO.join(IO.cwd(), \".tmp/jediscript.js\"));\n\n\t\t\t//Prevent these symbols from being renamed\n\t\t\tgcc.addFile(IO.join(IO.cwd(), \".tmp/exports.js\"));\n\n\t\t\t//Compile and write output to compiled.js\n\t\t\tgcc.compile(writeBack);\n\t\t}\n\t}", "title": "" }, { "docid": "e7fca63b03dd83bed20245beb361e57c", "score": "0.51415646", "text": "function dependOn() {\n 'use strict';\n return [\n require(\"util\"),\n require(\"common\"),\n require(\"analytics\"),\n require(\"proxy\"),\n require(\"communicate\")\n ];\n}", "title": "" }, { "docid": "e1584f26ae5521e01f29577d2446586c", "score": "0.5139367", "text": "function _expandDependencies(context, seen, expanded, deps, done) {\n ASYNC.forEachSeries(deps, function(asset, next) {\n if (seen.indexOf(asset)>=0) return next();\n seen.push(asset);\n if (asset.dependencies.length === 0) {\n expanded.push(asset);\n return next();\n }\n\n ASYNC.mapSeries(asset.dependencies, function(path, next) {\n context.getSourceAsset(path, function(err, sourceAsset) {\n if (!sourceAsset) {\n err = new Error(''+path+' not found (required in '+asset.path+')');\n }\n next(err, sourceAsset);\n });\n }, function(err, assets) {\n\n if (err) return next(err);\n\n asset.children = assets; \n assets.forEach(function(childAsset) {\n childAsset.parents.push(asset);\n });\n\n _expandDependencies(context, seen, expanded, assets, function(err) {\n expanded.push(asset);\n next(err);\n });\n });\n\n }, function(err) {\n done(err, expanded); \n });\n}", "title": "" }, { "docid": "a708596da097c2e2c0b6e8fb19447477", "score": "0.51302457", "text": "async function generateSubgraph(opts={}) {\n // Get the addresses of our predeployed contracts\n const migrationFile = opts.migrationFileLocation || defaultMigrationFileLocation;\n opts.subgraphLocation = opts.subgraphLocation || defaultSubgraphLocation;\n const addresses = JSON.parse(fs.readFileSync(migrationFile, \"utf-8\"));\n const missingAddresses = {};\n if (network === 'xdai' || network === 'sokol') {\n mappings.push( //workaround :(\n {name: 'UGenericScheme',\n contractName: 'UGenericScheme',\n dao: 'base',\n mapping: 'UGenericScheme',\n arcVersion: '0.0.1-rc.39' });\n addresses[network].base['0.0.1-rc.39']['UGenericScheme'] = \"0xA92A766d62318B9c06Eb548753bD34acbD7C5f3c\" //dummy\n }\n\n // Filter out 0.0.1-rc.18 & 0.0.1-rc.17\n const latestMappings = mappings.filter(mapping =>\n !(mapping.arcVersion === \"0.0.1-rc.18\" ||\n mapping.arcVersion === \"0.0.1-rc.17\")\n );\n // Build our subgraph's datasources from the mapping fragments\n const dataSources = combineFragments(\n latestMappings, false, addresses, missingAddresses\n ).filter(el => el != null);\n\n // Throw an error if there are contracts that're missing an address\n // and are never used as a template\n const missing = Object.keys(missingAddresses).map(function(key, index) {\n return missingAddresses[key] ? key : null\n }).filter(el => el != null);\n\n if (missing.length) {\n throw Error(`The following contracts are missing addresses: ${missing.toString()}`);\n }\n\n const templates = buildTemplates();\n\n const subgraph = {\n specVersion: \"0.0.1\",\n schema: { file: \"./schema.graphql\" },\n dataSources,\n templates\n };\n\n fs.writeFileSync(\n opts.subgraphLocation,\n yaml.safeDump(subgraph, { noRefs: true }),\n \"utf-8\"\n );\n}", "title": "" }, { "docid": "c8c1c42067f6bd5813e89e81d629cddd", "score": "0.5128143", "text": "_mergeDependencies(dependencyMap,newDependencies,dependenciesToClear){if(dependenciesToClear.size>0){// Use the reverseLookup index to remove the dependencies.\n const dependenciesToClearArray=Array.from(dependenciesToClear);for(let i=0,length=dependenciesToClearArray.length;i<length;++i){const dependencyToClear=dependenciesToClearArray[i];const reverseLookupEntry=dependencyMap.dependenciesReverseLookup[dependencyToClear];if(reverseLookupEntry){const reverseLookupEntryArray=Array.from(reverseLookupEntry);for(let k=0,reverseLookupEntryArrayLength=reverseLookupEntryArray.length;k<reverseLookupEntryArrayLength;++k){const reverseLookupKey=reverseLookupEntryArray[k];const dependenciesEntryForReverseLookupKey=dependencyMap.dependencies[reverseLookupKey];if(dependenciesEntryForReverseLookupKey){dependenciesEntryForReverseLookupKey.delete(dependencyToClear);if(dependenciesEntryForReverseLookupKey.size===0){delete dependencyMap.dependencies[reverseLookupKey];}}}// Remove the entry.\n delete dependencyMap.dependenciesReverseLookup[dependencyToClear];}}}// Loop through new dependencies and shove them in.\n const newDependenciesKeys=Object.keys(newDependencies);for(let len=newDependenciesKeys.length,n=0;n<len;n++){const newDependenciesKeyString=newDependenciesKeys[n];if(!dependencyMap.dependencies[newDependenciesKeyString]){// Completely new entry.\n dependencyMap.dependencies[newDependenciesKeyString]=new Map(newDependencies[newDependenciesKeyString]);}else{// Existing entry, so merge.\n newDependencies[newDependenciesKeyString].forEach((value,key)=>{dependencyMap.dependencies[newDependenciesKeyString].set(key,value);});}if(dependencyMap.dependencies[newDependenciesKeyString].size>0){// Update the reverse lookup index.\n dependencyMap.dependencies[newDependenciesKeyString].forEach((_dependency,reverseLookupKey)=>{let reverseLookupEntry=dependencyMap.dependenciesReverseLookup[reverseLookupKey];if(!reverseLookupEntry){reverseLookupEntry=new Set();reverseLookupEntry.add(newDependenciesKeyString);dependencyMap.dependenciesReverseLookup[reverseLookupKey]=reverseLookupEntry;}else{reverseLookupEntry.add(newDependenciesKeyString);}});}}}", "title": "" }, { "docid": "2d35e0b5231026434e650d28bee20f39", "score": "0.5116327", "text": "get dependenciesMap() {\n return this.buildDependenciesMap({ type: 'all' })\n }", "title": "" }, { "docid": "bb85bf789c9bcc20c6900d48474b4129", "score": "0.5115949", "text": "async updateSelf ()\n {\n const deps = await this.analyzeSourceDependencies();\n let patches = this.generateDependencyPatches(deps)\n for (let child of this.children) {\n const childDeps = await child.analyzeSourceDependencies();\n const childPatches = child.generateDependencyPatches(childDeps);\n patches.push(...childPatches);\n }\n\n patches = this.updatePatches(patches);\n\n // shake out patches\n const shaken = {};\n for (let patch of patches) {\n if (patch.source == 'local') continue;\n\n const name = patch.name;\n\n if (!shaken[name]) {\n shaken[name] = patch;\n continue;\n }\n\n shaken[name] = Comptroller.mergePatches(shaken[name], patch);\n }\n\n for (let name in shaken) {\n const patch = shaken[name];\n this.logPatch(this, patch);\n this.applyPatch(patch);\n }\n }", "title": "" }, { "docid": "754b66cf4df529fe67f5068e8a22294f", "score": "0.51134354", "text": "function _main()\n{\n // create a graph (default undirected)\n\tvar g = new Graph();\n\n // set input graph properties (label, directed etc.)\n\tg.label = \"{Figure 3.10 (Levitin, 3rd edition)}\";\n\n // use global input arrays _v and _e to initialize its internal data structures\n\tg.read_graph(_v,_e);\n\n // use print_graph() method to check graph\n\tg.print_graph();\n\n // report connectivity status if available\n\tconsole.log(\"the connectivity is? \",g.numConnectComps);\n\tif (g.numConnectComps != 0){\n\t\tdocument.write(\"<p>DISCONNECTED \", g.numConnectComps, \"</p>\");\n\t}else{\n\t\tdocument.write(\"<p>no connectivity info </p>\");\n\t}\n\n // perform depth-first search and output stored result\n\t//g.topoSearch(\"dfs\");\n\tg.numConnectComps= g.topoSearch(g.numConnectComps, \"dfs\");\n\tdocument.write(\"<p>dfs_push: \", g.dfs_push, \"</p>\");\n // report connectivity status if available\n\n\tif (g.numConnectComps != 0){\n\t\tdocument.write(\"<p>DISCONNECTED \", g.numConnectComps, \"</p>\");\n\t}else{\n\t\tdocument.write(\"<p>no connectivity info </p>\");\n\t}\n\n // perform breadth-first search and output stored result\n\t//g.topoSearch(\"bfs\");\n\tg.topoSearch(g.connectedComp, \"bfs\");\n\tdocument.write(\"<p>bfs_out: \", g.bfs_out, \"</p>\");\n // output the graph adjacency matrix\n\tg.makeAdjMatrix();\n\tdocument.write(\"<p>first row matrix: \", g.adjacencyMatrix[0], \"</p>\");\n\tdocument.write(\"<p>last row matrix: \", g.adjacencyMatrix[g.nv - 1], \"</p>\");\n}", "title": "" }, { "docid": "b0a2bb4f3cf659a48dd5f853d1f12876", "score": "0.5112883", "text": "static async compile(settings) {\n const entries = [];\n const cache = new Set();\n for (const source of settings.sources) {\n if (source.package) {\n await this.loadPackage(entries, cache, source);\n }\n else {\n await this.loadPath(entries, source);\n }\n }\n await this.createModel(entries, settings.output);\n }", "title": "" }, { "docid": "ed3dce5a0cfcbdf2040c7eace770307b", "score": "0.5111336", "text": "function buildGraph() {\n\t$('.node').each(function(i) {\n\t\tmakeNode([], 'AND', $(this).attr('id'));\n\t});\n\n\t$('.hybrid').each(function(i) {\n\t\tvar id = $(this).attr('id');\n\t\tvar course = $(this).children('text').text();\n\t\tvar reqs = parseAnd(course)[0];\n\t\tmakeHybrid([], 'AND', id);\n\t\t$.each(reqs, function(index, elem) {\n\t\t\tif ($.isArray(elem)) {\n\t\t\t\tvar orNode = id + elem.join();\n\t\t\t\tmakeHybrid([], 'OR', orNode);\n\t\t\t\t$.each(elem, function(i, e) {\n\t\t\t\t\twindow[orNode].parents.push(window[e]);\n\t\t\t\t\twindow[e].children.push(window[orNode]);\n\t\t\t\t});\n\t\t\t\twindow[id].parents.push(window[orNode]);\n\t\t\t\twindow[orNode].children.push(window[id]);\n\t\t\t} else {\n\t\t\t\twindow[id].parents.push(window[elem]);\n\t\t\t\twindow[elem].children.push(window[id]);\n\t\t\t}\n\t\t});\n\t});\n\n\t$('.bool').each(function(i) {\n\t\tvar id = $(this).attr('id');\n\t\tvar type = $(this).children('text').text().toUpperCase();\n\t\tmakeHybrid([], type, id);\n\t})\n\n\t$('path').each(function(i) {\n\t\tvar coords = $(this).attr('d').split(' ');\n\t\tcoords = coords.filter(function(str) {return str !== 'M' && str !== 'L';});\n\t\t// Do something for internet explorer\n\t\tif (!!navigator.userAgent.match(/Trident.*rv[ :]*11\\./) ||\n\t\t\t window.navigator.userAgent.indexOf(\"MSIE \") > -1) {\n\t\t\tvar xStart = parseFloat(coords[0]);\n\t\t\tvar yStart = parseFloat(coords[1]);\n\t\t\tvar yEnd = parseFloat(coords.pop());\n\t\t\tvar xEnd = parseFloat(coords.pop());\n\t\t} else {\n\t\t\tvar xStart = parseFloat(coords[0].substr(1));\n\t\t\tvar yStart = parseFloat(coords[1]);\n\t\t\tvar yEnd = parseFloat(coords.pop());\n\t\t\tvar xEnd = parseFloat(coords.pop().substr(1));\n\t\t}\n\n\t\tvar startNode = '';\n\t\tvar endNode = '';\t\n\n\t\t$('.node, .hybrid').each(function(index) {\n\t\t\t// Check intersection\n\t\t\tvar r = $(this).children('rect');\n\t\t\tvar xRect = parseFloat(r.attr('x'));\n\t\t\tvar yRect = parseFloat(r.attr('y'));\n\t\t\tvar width = parseFloat(r.attr('width'));\n\t\t\tvar height = parseFloat(r.attr('height'));\n\n\t\t\tif (intersects(xStart, yStart, xRect, yRect, width, height, 1)) {\n\t\t\t\tstartNode = $(this).attr('id');\n\t\t\t}\n\n\t\t\tif (intersects(xEnd, yEnd, xRect, yRect, width, height, 9)) {\n\t\t\t\tendNode = $(this).attr('id');\n\t\t\t}\n\n\t\t\tif (startNode != '' && endNode != '') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\t$('.bool').each(function(index) {\n\t\t\t// Check intersection\n\t\t\tvar el = $(this).children('ellipse');\n\t\t\tvar cx = parseFloat(el.attr('cx'));\n\t\t\tvar cy = parseFloat(el.attr('cy'));\n\t\t\tvar rx = parseFloat(el.attr('rx'));\n\t\t\tvar ry = parseFloat(el.attr('ry'));\n\n\t\t\tif (Math.abs(xStart - cx) <= rx + 1 && Math.abs(yStart - cy) <= ry + 1) {\n\t\t\t\tstartNode = $(this).attr('id');\n\t\t\t}\n\n\t\t\tif (Math.abs(xEnd - cx) <= rx + 9 && Math.abs(yEnd - cy) <= ry + 9) {\n\t\t\t\tendNode = $(this).attr('id');\n\t\t\t}\n\n\t\t\tif (startNode != '' && endNode != '') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\tmakeEdge(window[startNode], window[endNode], $(this).attr('id'));\n\t});\n}", "title": "" }, { "docid": "efd688856bb9f26d982e87f491bc51d4", "score": "0.51015866", "text": "function computeBundles(){\n\n\tvar builder = new Builder();\n\n\treturn loadConfig(builder)\n\t .then(computeMainDependencies('loader'))\n\t .then(componentTree => computeComponentBundles(builder, componentTree));\n}", "title": "" }, { "docid": "4f60e0b1ef8f872098ce8184e58d5a81", "score": "0.51015717", "text": "function addDependency(dep, version, type, dir, pkgName) {\n const node = tree[ROOT][dep]\n\n if (self.versions.has(dep)) {\n const localVersion = self.versions.get(dep)\n\n if (semver.satisfies(localVersion, version)) {\n if (self.links.has(dir)) self.links.get(dir).add(dep)\n else self.links.set(dir, new Set([dep]))\n\n return\n }\n }\n\n if (node == null) {\n return setRootNode(dep, version, type, dir)\n }\n\n // Resolve conflicts\n // Note: the goal here is to get deterministic trees, not to dedupe\n if (node.origin === dir) {\n const tpl = 'Dependency %s is also listed as %s. Keeping %s'\n\n // Listed twice. Keep most significant\n if (cmpType(node.type, type) < 0) {\n log.warn(tpl, dep, node.type, type)\n setRootNode(dep, version, type, dir)\n } else {\n log.warn(tpl, dep, type, node.type)\n }\n } else if (node.version !== version) {\n if (node.origin === ROOT) {\n // Root package always takes precedence\n } else if (dir === ROOT) {\n // Root package overrides nested package\n addSubnode(node.origin, dep, node.version, node.type)\n return setRootNode(dep, version, type, dir)\n } else if (node.type !== type) {\n if (cmpType(node.type, type) < 0) {\n // Root node is less significant, move it to subnode\n addSubnode(node.origin, dep, node.version, node.type)\n return setRootNode(dep, version, type, dir)\n }\n } else if (cmpRange(node.version, version) < 0) {\n // TODO: how does cmpRange handle non-semver (e.g. a git url)?\n\n // Root node range is \"smaller\", move it to subnode\n addSubnode(node.origin, dep, node.version, node.type)\n return setRootNode(dep, version, type, dir)\n }\n\n addSubnode(dir, dep, version, type)\n } else if (node.type !== type) {\n for(let i = 0; i < TYPE_ORDER.length; i++) {\n if (node.type === TYPE_ORDER[i]) break\n\n if (type === TYPE_ORDER[i]) {\n node.type = type\n break\n }\n }\n }\n }", "title": "" }, { "docid": "30456cd52c8c30d69dce6a339a4d5c83", "score": "0.50977474", "text": "function bundle(graph) {\n let modules = \"\";\n\n graph.forEach(({id, code, mapping}) => {\n modules += `${id}: [\n function(require, module, exports) {\n ${code} \n },\n ${JSON.stringify(mapping)},\n ],`\n });\n\n const result = `\n (function(modules){\n function require(id) {\n const [fn, mapping] = modules[id];\n \n function localRequire(name) {\n return require(mapping[name]);\n }\n \n const module = { exports: {} };\n \n fn(localRequire, module, module.exports);\n \n return module.exports;\n }\n \n require(0);\n \n })({${modules}})\n `;\n return result;\n}", "title": "" }, { "docid": "93e6364a8d58c7add6cbdf7afc3bb4fc", "score": "0.50730884", "text": "function build(name) {\n\tif (typeof name == \"undefined\")\n\t\texec('make', ['-C', 'contracts/sol'])\n\telse\n\t\texec('make', ['-C', 'contracts/sol', name])\n\tinterfaces = load('interfaces');\n}", "title": "" }, { "docid": "ab2d36ab281d833b8b876fc69a3b1daa", "score": "0.50610065", "text": "function _main()\n{\n // create a graph (default undirected)\n var g = new Graph();\n\n\n // set input graph properties (label, directed etc.)\n g.label = \"Figure 3.10 (Levitin, 3rd edition)}\";\n\n\n // use global input arrays _v and _e to initialize its internal data structures\n g.readGraph(_v, _e);\n\n // output the graph adjacency matrix\n g.makeAdjMatrix();\n\n\n // use printGraph() method to check graph\n g.printGraph();\n\n\n // perform depth-first search and output stored result\n g.connectedComp = g.topoSearch(g.dfs);\n document.write(\"<p>dfs_push: \", g.dfs_push, \"</p>\");\n\n\n // report connectivity status if available\n document.write(g.componentInfo());\n\n\n // perform breadth-first search and output stored result\n g.topoSearch(g.bfs);\n document.write(\"<p>bfs_order: \", g.bfs_order, \"</p>\");\n\n\n // output the graph adjacency matrix\n document.write(\"<p>first row matrix: \", g.adjMatrix[0], \"</p>\");\n document.write(\"<p>last row matrix: \", g.adjMatrix[g.nv - 1], \"</p>\");\n\n}", "title": "" }, { "docid": "91ea3f61b4f6c6d5c1d2184ca001d41f", "score": "0.5058585", "text": "get dependencies() {\n let deps = [];\n\n this.packages.forEach(pkg => {\n deps.push(...Object.keys(pkg.allDependencies));\n });\n\n // Deduplicate dependencies\n return [...new Set(deps)];\n }", "title": "" }, { "docid": "b1af05ed11759c07e6cabe8b136f650e", "score": "0.5056875", "text": "function getModuleTreeHelper(err, allDepsList, pkg, prev, requireString, callback) {\n\n function handleLeaf(err, pkg, prev, leaf, c, d, e) {\n if (err) {\n callback(err);\n return;\n }\n \n // turns require strings into dependency objects\n function traverseLeaf(next, requireString, requireIndex) {\n var reqPath\n , reqDeps\n ;\n\n if ('.' === requireString[0]) {\n reqPath = url.resolve('/' + leaf.modulepath, requireString).substr(1); // strip leading '/'\n } else {\n // TODO handle absolute paths\n reqPath = requireString;\n }\n\n // check that we haven't visited this dependency tree already\n reqDeps = allDepsList[reqPath];\n if (reqDeps) {\n reqDeps.requiredAs[requireString] = true;\n leaf.dependencyList[requireIndex] = reqDeps;\n next();\n return;\n }\n\n getModuleTreeHelper(null, allDepsList, pkg, leaf, requireString, function (err, deps) {\n if (err) {\n callback(err);\n return;\n }\n\n leaf.dependencyList[requireIndex] = deps;\n next();\n });\n }\n\n function callCallback() {\n var deps = {}\n ;\n\n (leaf.dependencyList || []).forEach(function (dep) {\n // modulepath for local modules, dep.name for npm modules\n deps[dep.modulepath || dep.name] = dep;\n });\n\n leaf.dependencyTree = deps;\n callback(null, leaf);\n }\n\n if (!leaf.requires || 0 === leaf.requires.length) {\n callback(null, leaf);\n return;\n }\n\n allDepsList[leaf.modulepath] = leaf;\n\n leaf.dependencyList = [];\n forEachAsync(leaf.requires, traverseLeaf).then(callCallback);\n }\n\n // this function does not recurse\n getModuleLeaf(pkg, prev, requireString, handleLeaf);\n }", "title": "" }, { "docid": "cf9072cd624b70e08aeee00d66661dd9", "score": "0.5049863", "text": "function main(args: Arguments) {\n // Get the launch options/arguments.\n const options = getOptions(args);\n\n // Build the directory tree.\n const rootTree = buildTree(options.rootPath, options);\n\n // Work out which directories should have barrels.\n const destinations: Directory[] = getDestinations(rootTree, options);\n\n // Potentially there are some existing barrels that need removing.\n purge(rootTree, options);\n\n // Create the barrels.\n buildBarrels(destinations, options);\n}", "title": "" }, { "docid": "1c1d522c5cb61f415e8abb3c402d0c80", "score": "0.5034912", "text": "function createGraph(entry) {\n const entryAsset = createAsset(entry); // Let's create the first asset (the entry node)\n let assets = [entryAsset]; // Let's store this as the first element of the queue\n\n // Iterate through the assets\n assets.forEach(asset => {\n const dir = getDir(asset.path); // Get the directory of the asset\n asset.depMap = {}; // Create a dependency map, where each dependency path will be mapped to the asset (id)\n\n // Iterate through the asset dependencies\n asset.deps.forEach(dep => {\n const depPath = path.join(dir, dep); // Resolve the dependency path\n const depAsset = createAsset(depPath); // Create a new Asset from the dependency\n asset.depMap[depPath] = depAsset.id; // Add the asset to the dependency map\n\n assets = [...assets, depAsset];\n });\n });\n\n return assets; // Returns the asset graph/array\n}", "title": "" }, { "docid": "6e03e8de877eca64b0dde9bb9a0692cc", "score": "0.50297683", "text": "function dependOn() {\n 'use strict';\n return [\n require(\"communicate\"),\n require(\"proxy\"),\n require(\"common\"),\n require(\"util\")\n ];\n}", "title": "" }, { "docid": "02b03a943822dd258108e1bba9cacc76", "score": "0.5025289", "text": "function traverseLeaf(next, requireString, requireIndex) {\n var reqPath\n , reqDeps\n ;\n\n if ('.' === requireString[0]) {\n reqPath = url.resolve('/' + leaf.modulepath, requireString).substr(1); // strip leading '/'\n } else {\n // TODO handle absolute paths\n reqPath = requireString;\n }\n\n // check that we haven't visited this dependency tree already\n reqDeps = allDepsList[reqPath];\n if (reqDeps) {\n reqDeps.requiredAs[requireString] = true;\n leaf.dependencyList[requireIndex] = reqDeps;\n next();\n return;\n }\n\n getModuleTreeHelper(null, allDepsList, pkg, leaf, requireString, function (err, deps) {\n if (err) {\n callback(err);\n return;\n }\n\n leaf.dependencyList[requireIndex] = deps;\n next();\n });\n }", "title": "" }, { "docid": "e518f08e014de8aca386a604ab1a2c07", "score": "0.50185114", "text": "depend() {\n let i = this.deps.length;\n while (i--) {\n this.deps[i].depend();\n }\n }", "title": "" }, { "docid": "e518f08e014de8aca386a604ab1a2c07", "score": "0.50185114", "text": "depend() {\n let i = this.deps.length;\n while (i--) {\n this.deps[i].depend();\n }\n }", "title": "" }, { "docid": "a4bd3565ecd4c158583d23ecc177366e", "score": "0.5000077", "text": "resolveDependencies() {\n const queue = [...this.context.drivers];\n this.debug('Resolving dependencies');\n while (queue.length > 0) {\n const driver = queue.shift();\n const deps = new Set(driver.getDependencies());\n this.debug('Resolving %s', driver.name);\n deps.forEach((name) => {\n this.debug(' Including dependency %s', chalk_1.default.green(name));\n queue.push(this.tool.getPlugin('driver', name));\n });\n this.context.addDriverDependency(driver);\n }\n this.tool.onResolveDependencies.emit([this.context, Array.from(this.context.drivers)]);\n }", "title": "" }, { "docid": "8ed678112e37cee15ff48ed8a763e499", "score": "0.49956232", "text": "function _buildAllLink(pos, graph) {\n _buildLink(pos, graph);\n _buildBigSwitchLink(pos, graph);\n }", "title": "" }, { "docid": "6a061285be965cca3783a7e41f9bfd33", "score": "0.49847198", "text": "async buildVisitManifestAndDependencies(visitIds) {\n const { org, orgReferenceProps } = await this.getOrgAndReferences(),\n allEntities = await this.getVisitManifestEntities(org, visitIds, orgReferenceProps),\n { manifest, removedEntities } = this.validateAndCreateManifest(allEntities, orgReferenceProps, ['c_visit_schedules'])\n\n return { manifest, removedEntities }\n }", "title": "" }, { "docid": "239815ed09504b90dd1ac0049ab97e17", "score": "0.49845463", "text": "function loadDependencies( itcb ) {\n var\n lines = [],\n directDeps,\n pfId = pack.config['casefile-personalienfeld'] || '';\n\n // get dependencies recorded in database\n if ( pack.template.dependsOn ) {\n lines = pack.template.dependsOn.split( '\\n' );\n } else {\n pack.template.dependsOn = '';\n }\n\n // add direct dependencies (some legacy forms seem to be unmigrated)\n directDeps = Y.doccirrus.forms.exportutils.listDirectDependencies( pack.template ).split('\\n');\n lines = lines.concat( directDeps );\n\n // Add personalienfeld to the package if not already in dependencies (legacy forms issue)\n if ( pfId && '' !== pack.config['casefile-personalienfeld'] ) {\n if ( -1 === pack.template.dependsOn.indexOf( pfId ) ) {\n lines.push( 'formtemplate::' + pfId );\n Y.log( 'Added personalienfeld to dependencies: formtemplate::' + pfId, 'debug', NAME );\n }\n }\n\n // remove duplicates\n // credit: http://stackoverflow.com/questions/9229645/remove-duplicates-from-javascript-array\n lines = lines.filter( function uniqueDeps( item, pos, self ) {\n return ( self.indexOf(item) === pos );\n });\n\n async.eachSeries( lines, loadDependency, itcb );\n }", "title": "" }, { "docid": "b5d459deb0a1b05f82a771b620256323", "score": "0.49810252", "text": "function main() {\n\n var opts = cli.parse();\n var args = opts._;\n\n if (args.length < 1 || opts.help) {\n cli.help();\n process.exit();\n }\n\n files.find(opts.path).then(function(paths) {\n files.find(args).then(function(inputs) {\n deps.calculate(paths, inputs).then(function(infos) {\n if (opts.mode == 'list') {\n util.puts.apply(null, infos.map(function(info) {\n return info.path;\n }));\n } else if (opts.mode == 'concat') {\n util.puts.apply(null, infos.map(function(info) {\n return info.content;\n }));\n } else {\n util.error('Unknown output mode');\n process.exit(1);\n }\n });\n });\n });\n}", "title": "" }, { "docid": "f52aa5eb842039e7c7e3c8c1ec80fcd4", "score": "0.49769333", "text": "async function run() {\n // First check if deps library exists:\n if (forceDownload !== 'download' && await exists(depsLibTensorFlowPath)) {\n // Library has already been downloaded, then compile and simlink:\n await build();\n } else {\n // Library has not been downloaded, download, then compile and symlink:\n await cleanDeps();\n await downloadLibtensorflow(build);\n }\n}", "title": "" }, { "docid": "cb8813c182285e2840dd09ead9885b63", "score": "0.4970973", "text": "resolveBatchList() {\n this.mapDependencies();\n const batches = [];\n const seen = new Set();\n const addBatch = () => {\n const nextBatch = Array.from(this.nodes.values()).filter((node) => {\n return (!seen.has(node) &&\n (node.requirements.size === 0 ||\n Array.from(node.requirements.values()).filter((dep) => !seen.has(dep)).length === 0));\n });\n // Some nodes are missing, so they must be a cycle\n if (nextBatch.length === 0) {\n this.detectCycle();\n }\n batches.push(this.sortByDependedOn(nextBatch).map((node) => this.packages.get(node.name)));\n nextBatch.forEach((node) => seen.add(node));\n if (seen.size !== this.nodes.size) {\n addBatch();\n }\n };\n addBatch();\n return batches;\n }", "title": "" }, { "docid": "cc649ecf74e32b1a81e990333133b912", "score": "0.49655095", "text": "function _main() {\n // create a graph (default undirected)\n var g = new Graph();\n\n // set input graph properties (label, directed etc.)\n g.label = 'Exercise 8.4: 7 (Levitin, 3rd edition)';\n g.digraph = true;\n\n // use global input arrays _v and _e to initialize its internal data structures\n g.readGraph(_v, _e);\n\n // use printGraph() method to check graph\n g.printGraph();\n\n // perform breadth-first search and output stored result\n g.topoSearch(1); // 0 means DFS choice, while 1 means BFS choice of topological search\n document.write(\"<p>bfs_order: \", g.bfs_order, \"</p>\");\n\n // report connectivity status if available\n document.write(\"<p>\", g.componentInfo(), \"</p>\");\n\n //output DFS-based transitive closure matrix\n g.DfsTC();\n document.write(\"<p> TC matrix by DFS:<br>\");\n for (var i = 0; i < g.dfsTC.length; i++) {\n document.write(g.dfsTC[i], \"<br>\");\n }\n\n //output Warshall transitive closure matrix\n document.write(\"<p>TC matrix by Warshall-Floyd:<br>\");\n g.warshallFloyd();\n for (var i = 0; i < g.warshallTC.length; i++) {\n document.write(g.warshallTC[i], \"<br>\");\n }\n\n //check if the graph is DAG (directed acyclic graph)\n document.write(\"<p>DAG: \", g.isDAG(), \"</p>\");\n\n //output floyed-distance matrix\n g.warshallFloyd();\n document.write(\"<p>Distance matrix<br>\");\n\n for (var i = 0; i < g.floydD.length; i++) {\n document.write(g.floydD[i], \"<br>\");\n }\n\n}", "title": "" }, { "docid": "d195caf89c58a18433f4a0be225a2074", "score": "0.49484587", "text": "function packageImports(nodes) \n{\n var map = {},\n imports = [];\n \n nodes.forEach(function(d) // Compute a map from id to node.\n { \n map[d.id] = d;\n });\n\n // For each import, construct a link from the source to target node.\n nodes.forEach(function(d) \n {\n if (d.imports) \n\t d.imports.forEach(function(i) {\n imports.push({source: map[d.id], target: map[i]});\n });\n });\n\n return imports;\n}", "title": "" }, { "docid": "68106501995914254ec9396aca220ff1", "score": "0.49477932", "text": "stageDependencies(dependencies,cacheKey){const keyString=serialize(cacheKey);const{_stagedDependencies}=this;let dependenciesEntry=_stagedDependencies[keyString];if(dependenciesEntry===undefined){dependenciesEntry=new Map();_stagedDependencies[keyString]=dependenciesEntry;}for(let len=dependencies.length,c=0;c<len;c++){const dependencyCopy=Object.assign(Object.create(null),dependencies[c]);dependenciesEntry.set(serialize(dependencyCopy.cacheKey),dependencyCopy);}}", "title": "" }, { "docid": "2d95f6580fcc71d6d548efbc6b766c0e", "score": "0.49454525", "text": "build() {\n this.cacheTargets();\n }", "title": "" }, { "docid": "7ab623c8e1cf4062eb569ba0cadc44f1", "score": "0.4944586", "text": "depend () {\n let i = this.deps.length;\n while (i--) {\n this.deps[i].depend();\n }\n }", "title": "" }, { "docid": "e6e34d147026cde604d33d4359e8093a", "score": "0.49441835", "text": "function debug_draw(roots) {\n // check the graph before printing it since the logic below assumes a consistent graph\n debug_checkLinks(roots);\n const nodes = {};\n const edges = [];\n function getId(node) {\n let id = node['__uniqueid'];\n if (id === undefined) {\n id = util_uniqueId();\n node['__uniqueid'] = id;\n }\n return id;\n }\n function getLabel(node) {\n var _a, _b, _c;\n const out = [node.constructor.name.slice(0, -4)];\n if (node.debugName) {\n out.push(`<i>${node.debugName}</i>`);\n }\n else if (node instanceof source_SourceNode) {\n if (node.data.name || node.data.url) {\n out.push(`<i>${_a = node.data.name, (_a !== null && _a !== void 0 ? _a : node.data.url)}</i>`);\n }\n }\n const dep = node.dependentFields();\n if ((_b = dep) === null || _b === void 0 ? void 0 : _b.size) {\n out.push(`<font color=\"grey\" point-size=\"10\">IN:</font> ${[...node.dependentFields()].join(', ')}`);\n }\n const prod = node.producedFields();\n if ((_c = prod) === null || _c === void 0 ? void 0 : _c.size) {\n out.push(`<font color=\"grey\" point-size=\"10\">OUT:</font> ${[...node.producedFields()].join(', ')}`);\n }\n if (node instanceof dataflow_OutputNode) {\n out.push(`<font color=\"grey\" point-size=\"10\">required:</font> ${node.isRequired()}`);\n }\n return out.join('<br/>');\n }\n function collector(node) {\n var _a, _b;\n const id = getId(node);\n nodes[id] = {\n id: id,\n label: getLabel(node),\n hash: node instanceof source_SourceNode\n ? (_b = (_a = node.data.url, (_a !== null && _a !== void 0 ? _a : node.data.name)), (_b !== null && _b !== void 0 ? _b : node.debugName)) : String(node.hash()).replace(/\"/g, '')\n };\n for (const child of node.children) {\n edges.push([id, getId(child)]);\n collector(child);\n }\n }\n roots.forEach(n => collector(n));\n const dot = `digraph DataFlow {\n rankdir = TB;\n node [shape=record]\n ${util_entries(nodes)\n .map(({ key, value }) => ` \"${key}\" [\n label = <${value.label}>;\n tooltip = \"[${value.id}]&#010;${value.hash}\"\n ]`)\n .join('\\n')}\n\n ${edges.map(([source, target]) => `\"${source}\" -> \"${target}\"`).join(' ')}\n}`;\n console.log(dot);\n return dot;\n}", "title": "" }, { "docid": "8c770f703a68516f6bfa5444c2217107", "score": "0.49413496", "text": "depend() {\n let i = this.deps.length\n while (i--) {\n this.deps[i].depend()\n }\n }", "title": "" }, { "docid": "6f639bfc66bc207a881ff141974ea17a", "score": "0.49395835", "text": "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n if (immediateDeps) {\n Object.keys(immediateDeps).forEach(function (toName) {\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n });\n }\n}", "title": "" }, { "docid": "6f639bfc66bc207a881ff141974ea17a", "score": "0.49395835", "text": "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n if (immediateDeps) {\n Object.keys(immediateDeps).forEach(function (toName) {\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n });\n }\n}", "title": "" }, { "docid": "6f639bfc66bc207a881ff141974ea17a", "score": "0.49395835", "text": "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n if (immediateDeps) {\n Object.keys(immediateDeps).forEach(function (toName) {\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n });\n }\n}", "title": "" }, { "docid": "483ac36bfe86bc4ea92f276141c7c506", "score": "0.49372366", "text": "function DependencyGraph(projectFactory, nodeFactory, edgeFactory, pathService) {\n this.nodeFactory = nodeFactory;\n this.edgeFactory = edgeFactory;\n this.pathService = pathService;\n this.build(projectFactory.getSingletonProject());\n }", "title": "" }, { "docid": "0addbed9df587b2401b91c453edc8483", "score": "0.4933908", "text": "function dependOn(originalDeps, newDeps, name) {\n if (newDeps[root]) return;\n newDeps[name] = originalDeps[name];\n newDeps[name] && newDeps[name].forEach(function(name) {\n dependOn(originalDeps, newDeps, name);\n });\n}", "title": "" }, { "docid": "b6cbbca475125616bfc62d42ede3b733", "score": "0.49299958", "text": "generateIndex(dependencies, allDependencies) {\n return __awaiter(this, void 0, void 0, function* () {\n // Compile the source code\n const compiledFunction = pug.compileFile(path.join(__dirname, HTML_TEMPLATE_FILES.INDEX));\n const nodeModulesPath = this._countService.dependencyAnalyser.options.nodeModulesDir;\n const dependencyData = [];\n const nodeModulesData = [];\n const chartData = [{\n elementId: \"dependenciesChart\",\n title: \"Dependency Imports\",\n data: []\n }, {\n elementId: \"nodeModulesChart\",\n title: \"Minified Size of Dependency in kB\",\n data: []\n }, {\n elementId: \"customModulesChart\",\n title: \"Custom Module Imports\",\n data: []\n }];\n // separate dependency modules from NodeJs modules\n dependencies.forEach((value, key) => {\n if (value[0].isNodeModule) {\n nodeModulesData.push({\n name: key,\n count: value.length,\n });\n }\n else {\n dependencyData.push({ name: key, count: value.length });\n }\n });\n // calculate sizes of dependencies\n const promisesArray = [];\n dependencyData.forEach(value => {\n // prepare chart data for [dependency -> imports in files]\n chartData[0].data.push([value.name, value.count]);\n promisesArray.push(getSizes(value.name, {\n resolve: [nodeModulesPath]\n }).then(data => {\n /* data = {\n name: 'react,react-dom',\n size: 12023, // in bytes\n minified: 2342,\n gzipped: 534,\n versionedName: '[email protected],[email protected]'\n } */\n data[\"sizeOnDisk\"] = convertToKb(getSizeOnDiskRek(path.join(nodeModulesPath, data.name)));\n data[\"sizeInKB\"] = convertToKb(data.size);\n data[\"minifiedInKB\"] = convertToKb(data.minified);\n data[\"gzippedInKB\"] = convertToKb(data.gzipped);\n value[\"sizeInfo\"] = data;\n chartData[1].data.push([value.name, parseFloat(data[\"minifiedInKB\"])]);\n chartData[2].data.push([value.name, parseFloat(data[\"minifiedInKB\"]) / value.count]);\n }).catch(err => {\n // value[\"sizeInfo\"] = {\n // sizeOnDisk: convertToKb(getSizeOnDiskRek(path.join(nodeModulesPath, value.name)))\n // }\n // console.error(err);\n }));\n });\n // add all not used dependencies from the package.json\n Object.keys(allDependencies).forEach(dependencyName => {\n if (!dependencyData.some(value => value.name === dependencyName)) {\n dependencyData.push({\n name: dependencyName,\n count: 0,\n });\n }\n });\n // sort\n dependencyData.sort((a, b) => b.count - a.count);\n nodeModulesData.sort((a, b) => b.count - a.count);\n yield Promise.all(promisesArray);\n // add missing size info\n dependencyData.forEach(dependency => {\n if (!dependency.sizeInfo) {\n dependency.sizeInfo = {\n sizeOnDisk: convertToKb(getSizeOnDiskRek(path.join(nodeModulesPath, dependency.name))),\n sizeInKB: 0,\n minifiedInKB: 0,\n gzippedInKB: 0,\n sizeInfo: 0\n };\n }\n });\n chartData[1].data.sort(((a, b) => b[1] - a[1]));\n chartData[2].data.sort(((a, b) => b[1] - a[1]));\n chartData.forEach(value => {\n value.data.unshift([\"\", \"\"]);\n });\n // render a set of data\n return compiledFunction({\n title: 'Overview',\n folder: './',\n chartData: chartData,\n dependencies: dependencyData,\n nodeModules: nodeModulesData,\n date: this.date\n });\n /**\n * Converts the given size as bytes to kilobytes and formats for presentation.\n */\n function convertToKb(x) {\n return (x / 1024).toLocaleString(\"en-US\", {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1\n });\n }\n /**\n * Recursively loops throw the given directory and returns ins size in bytes.\n */\n function getSizeOnDiskRek(dirPath) {\n let size = 0;\n const itemStats = fs.lstatSync(dirPath);\n if (itemStats.isDirectory()) {\n const allSubs = fs.readdirSync(dirPath);\n {\n allSubs.forEach(sub => {\n size += getSizeOnDiskRek(path.join(dirPath, sub));\n });\n }\n }\n else {\n size = itemStats.size;\n }\n return size;\n }\n });\n }", "title": "" }, { "docid": "a37798437d55d9bb529436010bea69ae", "score": "0.49299228", "text": "function collectTransitiveDependencies(collected, depGraph, fromName) {\n if (!collected.has(fromName)) {\n collected.add(fromName);\n const immediateDeps = depGraph[fromName];\n if (immediateDeps !== undefined) {\n for (const toName of immediateDeps) {\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "title": "" }, { "docid": "c603b13be70a62aa0eb76f5959a8002f", "score": "0.4928789", "text": "function build(trace) {\n // A map from node ID to node.\n var eventIdToNode = new Map();\n\n var getOrMakeNode = (eventId, op) => {\n var node = null;\n if (eventIdToNode.has(eventId)) {\n node = eventIdToNode.get(eventId);\n } else {\n node = new GraphNode(eventId);\n eventIdToNode.set(eventId, node);\n }\n if (eventIdOfOperation(op) === eventId) {\n if (op.operation === Operation.CANCEL ||\n op.operation === Operation.MUTATE_DOM) {\n node.operations.push(op);\n }\n } else {\n if (op.operation === Operation.CANCEL) {\n node.cancelledBy = getOrMakeNode(op.u, {});\n }\n if (op.operation === Operation.FORK) {\n if (op.kind === ForkKind.AJAX_REQUEST) {\n node.isDerivedFromAjax = true;\n } else if (op.kind === ForkKind.LOAD_SCRIPT) {\n node.isScriptExecution = true;\n node.isDerivedFromDynamicallyLoadedScript = true;\n }\n }\n if (op.operation == Operation.JOIN) {\n switch (op.kind) {\n case JoinKind.AJAX_ERROR:\n case JoinKind.AJAX_HEADERS_RECEIVED:\n case JoinKind.AJAX_LOADING:\n case JoinKind.AJAX_PROGRESS:\n node.isDerivedFromAjax = true;\n break;\n\n case JoinKind.AJAX_DONE:\n case JoinKind.AJAX_LOADED:\n node.isAjaxResponse = true;\n node.isDerivedFromAjax = true;\n break;\n }\n }\n }\n return node;\n };\n\n if (trace.length > 0) {\n trace.forEach((x) => {\n if (x.operation === Operation.FORK || x.operation === Operation.JOIN) {\n var u = getOrMakeNode(x.u, x);\n var v = getOrMakeNode(x.v, x);\n if (x.operation === Operation.JOIN) {\n var tmp = u;\n u = v;\n v = tmp;\n }\n var label = x.kind;\n if (x.operation === Operation.FORK) {\n switch (x.kind) {\n case ForkKind.INTERVAL:\n case ForkKind.TIMER:\n label += ' (' + x.delay + 'ms)';\n break;\n }\n }\n u.addSuccessor(v, label);\n } else {\n getOrMakeNode(eventIdOfOperation(x), x);\n if (eventIdOfOperation(x) === x.u && typeof x.v === 'number') {\n getOrMakeNode(x.v, x);\n }\n if (eventIdOfOperation(x) === x.v && typeof x.u === 'number') {\n getOrMakeNode(x.u, x);\n }\n }\n });\n } else {\n // Create a single node corresponding to the root event.\n getOrMakeNode(0, {});\n }\n\n return {\n eventIdToNode: eventIdToNode,\n nodes: Array.from(eventIdToNode.values())\n };\n}", "title": "" }, { "docid": "668ec013fa2b4902e4aef1aaccfe8f75", "score": "0.4927671", "text": "function main(){\n // SceneGraphRoot object create.\n var sgroot = new SceneGraphRoot();\n\tstart(sgroot);\n}", "title": "" }, { "docid": "51bb986951a2dd8a9c35ae2c9ba12159", "score": "0.4921027", "text": "function main() {\n var args = process.argv;\n if (args[2] === 'standard') {\n buildStandard();\n }\n else if (args[2] === 'firefox') {\n buildFirefox(args[3]);\n }\n else if (args[2] === 'test') {\n test();\n }\n else if (args[2] === 'serve') {\n serve();\n }\n else {\n console.log('Targets:');\n console.log('> node node-main.js standard');\n console.log(' # Builds GCLI for the web to ./built');\n console.log('> node node-main.js firefox [directory]');\n console.log(' # Builds GCLI for firefox to ./built/mozilla or [directory]');\n console.log('> node node-main.js test');\n console.log(' # Run GCLI tests using jsdom');\n console.log('> node node-main.js serve');\n console.log(' # Serve . to http://localhost:9999 for chrome');\n process.exit(1);\n }\n}", "title": "" }, { "docid": "9f5c716ce4c0523fe5bb77f87a257f02", "score": "0.4906415", "text": "function collectTransitiveDependencies(collected, depGraph, fromName) {\n if (!collected.has(fromName)) {\n collected.add(fromName);\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps !== undefined) {\n for (var _i8 = 0; _i8 < immediateDeps.length; _i8++) {\n var toName = immediateDeps[_i8];\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "title": "" }, { "docid": "171a2c56809d70be8db51cc952b837a0", "score": "0.48994756", "text": "function collect_js_deps(b, opts) {\n const collector = new Collector(opts);\n\n b.pipeline.get('deps').push(through.obj((row, enc, next) => {\n let p = row.file || row.id;\n collector.processFile(p, row.source).then(() => { next(); });\n }));\n return b;\n}", "title": "" }, { "docid": "d02493337df77a447250c8c55d250771", "score": "0.48899943", "text": "build() {\n cloudForgeLog('Building...');\n\n return this.clean().then(() => {\n return this.compileHtml();\n }).then(() => {\n return this.compileSass();\n }).then(() => {\n return this.copyDependencies();\n }).then(() => {\n cloudForgeLog('Built successfully!');\n });\n }", "title": "" }, { "docid": "f8d9d4591ed32622d6fa0698cf75ca62", "score": "0.48832822", "text": "function loadDeps(deps, i, ok) {\n if (!deps || i >= deps.length) {\n ok();\n return;\n }\n var src = deps[i];\n var pluginPath = SceneJS_configsModule.configs.pluginPath;\n if (!pluginPath) {\n throw \"no pluginPath config\"; // Build script error - should create this config\n }\n src = pluginPath + \"/\" + src;\n loadScript(src,\n function () {\n loadDeps(deps, i + 1, ok);\n });\n }", "title": "" }, { "docid": "8de76e0f864432314eae037aee0f193e", "score": "0.48825207", "text": "function mainFn () {\n var\n param_list = argList.slice( 2 ),\n //exec_list = [],\n range_start_str = '',\n range_success_str = '',\n stage_idx = 0,\n package_matrix = jsonDataMap.package_matrix,\n prereq_type_list = [ 'predo_list', 'prereq_list' ],\n prereq_type_count = prereq_type_list.length,\n\n stage_status_map = xhiUtilObj._getStructData_(\n jsonDataMap, [ 'state_matrix', 'stage_status_map' ]\n ) || {},\n\n param_map, stage_list, command_map,\n xhi_obj, stage_fn, stage_count,\n\n alias_str, prereq_count, prereq_idx,\n prereq_list, prereq_type, inner_command_map,\n type_idx,\n\n bound_fn, prefix_str\n ;\n\n // Bail without .git directory\n if ( ! hasGit ) {\n return abortFn(\n 'NO GIT installation found!\\n'\n + 'Please follow the instructions in README.md to clone the Github \\n'\n + 'repository using git. This usually occurs with NPM installs \\n'\n + 'which are not yet supported. Sorry for the trouble :('\n );\n }\n\n // Create command table from config\n commandTable = makeCommandTable( package_matrix.xhi_commandTable );\n\n // Abort if node version < minVersionInt\n checkNodeVersionFn();\n\n // Load NPM from global (required for bootstrap) or local\n loadNpmModuleFn();\n\n param_map = makeParamMap( param_list ); // cli parameters\n stage_list = param_map.stage_list; // stage list from range\n command_map = stage_list[ 0 ]; // first stage\n xhi_obj = makeXhiObj(); // context obj for libs\n\n // Begin run in help mode\n if ( ! command_map\n || param_map.range_str === ''\n || param_map.range_str.match(/^0+$/)\n || param_map.range_str === 'help'\n ) {\n command_map = getCommandMapFn( 0 );\n xhi_obj.commandMap = command_map;\n xhi_obj.paramMap = makeParamMap( param_list, 1 );\n xhi_obj.doListShow = true;\n stage_fn = require( fqLibDirname + '/xhi_00.js' );\n return stage_fn.call( xhi_obj );\n }\n // . End run in help mode\n\n // Check install and reset stageStatusMap if wrong\n if ( stage_status_map.install ) {\n try { require( 'line-by-line' ); }\n catch ( ignore_data ) {\n warnFn( 'Installation state data is wrong. Resetting.' );\n stage_status_map = {};\n jsonDataMap.stage_status_map = stage_status_map;\n }\n }\n\n // Begin expand stage list to resolve all dependencies then sort.\n // predo_list : Stages that must be added to the stage_list\n // every time this stage is run.\n // prereq_list : List of stages to add to the stage_list if they\n // their most recent run failed.\n //\n stage_count = stage_list.length;\n while ( stage_idx < stage_count ) {\n command_map = stage_list[ stage_idx ];\n for ( type_idx = 0; type_idx < prereq_type_count; type_idx++ ) {\n prereq_type = prereq_type_list[ type_idx ];\n prereq_list = command_map[ prereq_type ] || [];\n prereq_count = prereq_list.length;\n\n for ( prereq_idx = 0; prereq_idx < prereq_count; prereq_idx++ ) {\n inner_command_map = getCommandMapFn( prereq_list[ prereq_idx ] );\n alias_str = inner_command_map.alias_str;\n\n // Skip any environment prereq that is completed\n if ( prereq_type === 'prereq_list'\n && stage_status_map[ alias_str ]\n ) { continue; }\n\n // Push prereq to end of list for further resolution\n if ( stage_list.indexOf( inner_command_map ) === -1 ) {\n stage_list.push( inner_command_map );\n stage_count++;\n }\n }\n }\n stage_idx++;\n }\n stage_list.sort( function ( a, b ) { return a.idx - b.idx; });\n // . End expand stage list\n\n // Begin run stage list\n // Walk backward through list and bind functions.\n // The last function should have nextFn set to exit function,\n // the second-to-last function should have nextFn set to\n // the last function; the third-to-last function should have\n // nextFn/ set to the second-to-last function, and so on.\n //\n // The CWD starts at the root project dirname.\n // Any modules that change the CWD should revert it before\n // running then_fn or catch_fn.\n //\n process.chdir( fqProjDirname );\n if ( stage_list.length > 1 ) {\n prefix_str = 'Process range ' + param_map.range_str;\n range_start_str = prefix_str + ' Start';\n range_success_str = prefix_str + ' Success';\n }\n\n xhi_obj.nextFn = function _nextFn () {\n exitFn( range_success_str );\n };\n\n for ( stage_idx = stage_list.length -1; stage_idx > -1; stage_idx-- ) {\n command_map = stage_list[ stage_idx ];\n xhi_obj.commandMap = command_map;\n xhi_obj.paramMap = param_map;\n\n // Load library\n stage_fn = require( fqLibDirname + '/xhi_' + command_map.id + '.js' );\n\n // Build exec chain\n bound_fn = stage_fn.bind( xhi_obj );\n // exec_list.push( bound_fn );\n\n // Make new context object and set nextFn (catchFn === abortFn )\n if ( stage_idx > 0 ) {\n xhi_obj = makeXhiObj();\n xhi_obj.nextFn = bound_fn;\n }\n }\n logFn( range_start_str );\n if ( bound_fn ) { return bound_fn(); }\n // . End run stage list\n}", "title": "" }, { "docid": "d9611afcb48f3137f2981108436cf4e7", "score": "0.48811093", "text": "function calculateLibraryDependencies(context) {\n const targetProj = context.target.project;\n const projGraph = project_graph_1.createProjectGraph();\n const hasArchitectBuildBuilder = (projectGraph) => projectGraph.data.architect &&\n projectGraph.data.architect.build &&\n projectGraph.data.architect.build.builder !== '';\n // gather the library dependencies\n return (projGraph.dependencies[targetProj] || [])\n .map(dependency => {\n const depNode = projGraph.nodes[dependency.target];\n if (depNode.type === project_graph_1.ProjectType.lib &&\n hasArchitectBuildBuilder(depNode)) {\n const libPackageJson = workspace_1.readJsonFile(path_1.join(context.workspaceRoot, depNode.data.root, 'package.json'));\n return {\n scope: libPackageJson.name,\n outputPath: `dist/${depNode.data.root}`,\n node: depNode\n };\n }\n else {\n return null;\n }\n })\n .filter(x => !!x);\n}", "title": "" }, { "docid": "06a76c09fc57c3a3722982b43260471b", "score": "0.48802692", "text": "async function init() {\n const config = await mkconfig();\n\n console.log(\"Cleaning build.\");\n await fs.remove(BUILD_PATH);\n await fs.ensureDir(BUILD_PATH);\n\n // console.log(\"Copying static resources.\");\n // await fs.copy(STATIC_PATH, BUILD_PATH);\n\n console.log(\"Building static resources.\");\n await fs.outputFile(\n path.join(BUILD_PATH, \"index.html\"),\n await html.index(config)\n );\n await fs.outputFile(\n path.join(BUILD_PATH, \".well-known/host-meta\"),\n await hostmeta(config)\n );\n\n console.log(\"Building bot resources:\");\n for (let [ name, bot ] of Object.entries(config.bots)) {\n console.log(\"\\t\", name);\n const { actor } = bot;\n const srcPath = path.join(config.BOTS_PATH, name);\n const destPath = path.join(BUILD_PATH, name);\n await fs.copy(\n path.join(srcPath, \"avatar.png\"),\n path.join(destPath, \"avatar.png\")\n );\n await fs.outputFile(\n path.join(destPath, \"actor.json\"),\n json(actor)\n );\n await fs.outputFile(\n path.join(destPath, \"index.html\"),\n await html.actor(actor)\n );\n }\n}", "title": "" }, { "docid": "b6f16bb52691ed84c0bf0790f8f245cf", "score": "0.48725402", "text": "function packageImports(nodes) {\n var map = {},\n\t imports = [];\n\n // Compute a map from name to node.\n nodes.forEach(function(d) {\n\tmap[d.name] = d;\n });\n //console.log(map)\n\n // For each import, construct a link from the source to target node.\n nodes.forEach(function(d) {\n\tif (d.imports) d.imports.forEach(function(i) {\n\t\t//console.log(d.name);\n\t\t//console.log(i)\n\t\t//console.log(d.name)\n\t\t//console.log(\"connection: \" + map[d.name][\"name\"] + \" to \" + map[i.name][\"name\"] + \" with a rate of \" + i.value);\n\t\timports.push({source: map[d.name], target: map[i.name], value: i.value});\n\t});\n });\n\n //console.log(imports);\n return imports;\n}", "title": "" }, { "docid": "6ffde598982a1710a13713459f7f7481", "score": "0.4858248", "text": "build() {\n fs.ensureDirSync(`${global.appRoot}/data/cache`);\n\n // Glob tasks\n let done = [];\n\n this._locations = global.bundleLocations;\n\n // Get files\n const tasks = glob.sync(this.files('tasks/*.js'));\n const watchers = [];\n const installers = [];\n\n // Loop tasks\n for (const rawTask of tasks) {\n // Load task\n const task = parser.task(rawTask);\n\n // Create task\n const Task = this._task(task);\n\n // Add to default task\n if (done.indexOf(task.task) === -1) installers.push(task.task);\n\n // Push to done\n done.push(task.task);\n\n // Check befores\n if (task.before) {\n // Push to dones\n done = done.concat(task.before);\n\n // Remove before from defaults\n for (const taskBefore of task.before) {\n // Set index\n const index = installers.indexOf(taskBefore);\n\n // Check defaults\n if (index > -1) installers.splice(index, 1);\n }\n }\n\n // Check afters\n if (task.after) {\n // Push to dones\n done = done.concat(task.after);\n\n // Remove after from defaults\n for (const taskAfter of task.after) {\n // Set index\n const index = installers.indexOf(taskAfter);\n\n // Check defaults\n if (index > -1) installers.splice(index, 1);\n }\n }\n\n // Add watch to watchers\n if (Task.watch) watchers.push(`${task.task}.watch`);\n }\n\n // Create tasks\n gulp.task('watch', gulp.parallel(...watchers));\n gulp.task('install', gulp.series(...installers));\n }", "title": "" }, { "docid": "fb0317b237a2f438945066f8f223aa4b", "score": "0.4854156", "text": "function buildCrossgraphEdges(crossGraphNodes) {\n\t\t\tvar nodesIndices = [];\n\t\t\tcrossGraphNodes.forEach(function (n) {\n\t\t\t\tnodesIndices.push(n.index);\n\t\t\t});\n\t\t\tvar edgesToConsider = edges.filter(function (e) {\n\t\t\t\treturn nodesIndices.includes(e.source) && nodesIndices.includes(e.target);\n\t\t\t});\n\t\t\tedgesToConsider.forEach(function (edge) {\n\t\t\t\tvar source = edge.source;\n\t\t\t\tvar target = edge.target;\n\t\t\t\tif (mergedNodes.includes(source) && mergedNodes.includes(target)) return;\n\t\t\t\tif (mergedNodes.includes(source)) source = getMergingNode(source);\n\t\t\t\tif (mergedNodes.includes(target)) target = getMergingNode(target);\n\t\t\t\tvar sourceGraph = getGraphForNode(source);\n\t\t\t\tvar targetGraph = getGraphForNode(target);\n\t\t\t\tif (sourceGraph < targetGraph) {\n\t\t\t\t\tif (Object.keys(functionCallEdges).includes(\"\" + source)) {\n\t\t\t\t\t\tvar funcCallNodeId = functionCallEdges[\"\" + source][0];\n\t\t\t\t\t\tgraphMap[sourceGraph].setNode(funcCallNodeId, {\n\t\t\t\t\t\t\tlabel: getNodeLabelFCall(edge.stmt),\n\t\t\t\t\t\t\tclass: \"cfa-node fcall\",\n\t\t\t\t\t\t\tid: \"cfa-node\" + funcCallNodeId,\n\t\t\t\t\t\t\tshape: \"rect\"\n\t\t\t\t\t\t});\n\t\t\t\t\t\tgraphMap[sourceGraph].setEdge(source, funcCallNodeId, {\n\t\t\t\t\t\t\tlabel: edge.stmt,\n\t\t\t\t\t\t\tlabelStyle: labelStyleDecider(edge, source, funcCallNodeId),\n\t\t\t\t\t\t\tclass: edgeClassDecider(edge, source, funcCallNodeId),\n\t\t\t\t\t\t\tid: \"cfa-edge_\" + source + \"-\" + funcCallNodeId\n\t\t\t\t\t\t});\n\t\t\t\t\t\tgraphMap[sourceGraph].setNode(\"\" + source + target + sourceGraph, {\n\t\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\t\tclass: \"cfa-dummy\",\n\t\t\t\t\t\t\tid: \"dummy-\" + target,\n\t\t\t\t\t\t\tshape: \"rect\"\n\t\t\t\t\t\t});\n\t\t\t\t\t\tgraphMap[sourceGraph].setEdge(funcCallNodeId, \"\" + source + target + sourceGraph, {\n\t\t\t\t\t\t\tlabel: source + \"->\" + target,\n\t\t\t\t\t\t\tstyle: \"stroke-dasharray: 5, 5;\"\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgraphMap[sourceGraph].setNode(\"\" + source + target + sourceGraph, {\n\t\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\t\tclass: \"cfa-dummy\",\n\t\t\t\t\t\t\tid: \"dummy-\" + target,\n\t\t\t\t\t\t\tshape: \"rect\"\n\t\t\t\t\t\t});\n\t\t\t\t\t\tgraphMap[sourceGraph].setEdge(source, \"\" + source + target + sourceGraph, {\n\t\t\t\t\t\t\tlabel: edge.stmt,\n\t\t\t\t\t\t\tlabelStyle: labelStyleDecider(edge, source, \"\" + source + target + sourceGraph),\n\t\t\t\t\t\t\tid: \"cfa-edge_\" + source + \"-\" + target,\n\t\t\t\t\t\t\tclass: edgeClassDecider(edge, source, \"\" + source + target + sourceGraph),\n\t\t\t\t\t\t\tstyle: \"stroke-dasharray: 5, 5;\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tgraphMap[targetGraph].setNode(\"\" + target + source + targetGraph, {\n\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\tclass: \"dummy\"\n\t\t\t\t\t});\n\t\t\t\t\tgraphMap[targetGraph].setEdge(\"\" + target + source + targetGraph, target, {\n\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\tlabelStyle: \"font-size: 12px;\",\n\t\t\t\t\t\tid: \"cfa-split-edge_\" + source + \"-\" + target,\n\t\t\t\t\t\tclass: \"cfa-split-edge\",\n\t\t\t\t\t\tstyle: \"stroke-dasharray: 5, 5;\"\n\t\t\t\t\t});\n\t\t\t\t} else if (sourceGraph > targetGraph) {\n\t\t\t\t\tgraphMap[sourceGraph].setNode(\"\" + source + target + sourceGraph, {\n\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\tclass: \"cfa-dummy\",\n\t\t\t\t\t\tid: \"dummy-\" + target\n\t\t\t\t\t});\n\t\t\t\t\tgraphMap[sourceGraph].setEdge(source, \"\" + source + target + sourceGraph, {\n\t\t\t\t\t\tlabel: edge.stmt,\n\t\t\t\t\t\tlabelStyle: labelStyleDecider(edge, \"\" + source + target + sourceGraph, source),\n\t\t\t\t\t\tid: \"cfa-edge_\" + source + \"-\" + target,\n\t\t\t\t\t\tclass: edgeClassDecider(edge, \"\" + source + target + sourceGraph, source),\n\t\t\t\t\t\tarrowhead: \"undirected\",\n\t\t\t\t\t\tstyle: \"stroke-dasharray: 5, 5;\"\n\t\t\t\t\t})\n\t\t\t\t\tgraphMap[targetGraph].setNode(\"\" + target + source + targetGraph, {\n\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\tclass: \"dummy\",\n\t\t\t\t\t\tid: \"node\" + source\n\t\t\t\t\t});\n\t\t\t\t\tgraphMap[targetGraph].setEdge(\"\" + target + source + targetGraph, target, {\n\t\t\t\t\t\tlabel: \"\",\n\t\t\t\t\t\tlabelStyle: \"font-size: 12px;\",\n\t\t\t\t\t\tid: \"cfa-split-edge_\" + source + \"-\" + target,\n\t\t\t\t\t\tclass: \"cfa-split-edge\",\n\t\t\t\t\t\tarrowhead: \"undirected\",\n\t\t\t\t\t\tstyle: \"stroke-dasharray: 5, 5;\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "5a9a84aea7f381c264b282cc13119610", "score": "0.48486394", "text": "resolveDependencies () {\n\t\tlet sorted;\n\t\ttry {\n\t\t\t// we use the toposort module to figure this out...\n\t\t\tsorted = TopoSort.array(\n\t\t\t\tthis.moduleNames,\n\t\t\t\tthis.moduleDependencies\n\t\t\t);\n\t\t}\n\t\tcatch(error) {\n\t\t\tif (error) {\n\t\t\t\tthrow `Error resolving module dependencies: ${error}`;\n\t\t\t}\n\t\t}\n\t\t// the result of the TopoSort is an array of module names, where those\n\t\t// dependent on others come first ... we need to reverse this so those\n\t\t// dependent on others are registered later\n\t\tthis.modules = sorted.map(moduleName => this.modulesByName[moduleName]);\n\t\tthis.modules.reverse();\n\t}", "title": "" }, { "docid": "f9c3744c8b26ac7e137dbfdfbe85c8a5", "score": "0.48484206", "text": "resolveTree() {\n this.mapDependencies();\n const seen = new Set();\n const resolve = (node, tree) => {\n if (seen.has(node.name)) {\n return;\n }\n // Only include nodes that have package data\n const pkg = this.packages.get(node.name);\n if (!pkg) {\n return;\n }\n const branch = {\n package: pkg,\n };\n this.sortByDependedOn(node.dependents).forEach((child) => {\n resolve(child, branch);\n });\n if (tree.nodes) {\n tree.nodes.push(branch);\n }\n else {\n tree.nodes = [branch];\n }\n seen.add(node.name);\n };\n const trunk = {\n nodes: [],\n root: true,\n };\n this.sortByDependedOn(this.getRootNodes()).forEach((node) => resolve(node, trunk));\n // Some nodes are missing, so they must be a cycle\n if (seen.size !== this.nodes.size) {\n this.detectCycle();\n }\n return trunk;\n }", "title": "" }, { "docid": "4450604368d0efc48c8f5c2dded065f0", "score": "0.48481306", "text": "function getDependencyGraph(_ref) {\n var moduleNames = _ref.moduleNames,\n level = _ref.level,\n result = _ref.result;\n\n if (level >= 5) {\n throw new Error('Possible loop in shader dependency graph');\n }\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = moduleNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var moduleName = _step2.value;\n\n result[moduleName] = level;\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = moduleNames[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var _moduleName = _step3.value;\n\n var shaderModule = getShaderModule(_moduleName);\n\n getDependencyGraph({\n moduleNames: shaderModule.dependencies,\n level: level,\n result: result\n });\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "64d5ce8580c1075e0c79a1a735d83a74", "score": "0.48394224", "text": "function displayDeps() {\n files.forEach(function(file){\n // ensure file exists\n fs.stat(file, function(err, stat){\n if (err) throw err;\n fs.readFile(file, 'utf8', function(err, str){\n if (err) throw err;\n options.filename = file;\n var style = stylus(str, options);\n\n usePlugins(style);\n importFiles(style);\n console.log(style.deps().join('\\n'));\n });\n });\n });\n}", "title": "" }, { "docid": "d80a0ad23874ba1e273e3ff1428487dc", "score": "0.48373625", "text": "function buildEdges() {\r\n\r\n\t\t// compare all nodes\r\n\t\tfor (var i = 0; i < nodes.length; i++) {\r\n\t\t\tif (config.callbacks.updateGraphProgress) {\r\n\t\t\t\tvar progress = (i+1)/nodes.length;\r\n\t\t\t\tconfig.callbacks.updateGraphProgress(progress);\r\n\t\t\t}\r\n\t\t\tfor (var j = 0; j < nodes.length; j++) {\t\t\t\t\r\n\t\t\t\tfunction addEdgesToGraph(i,j) {\r\n\t\t\t\t\t// get edges between 2 nodes\r\n\t\t\t\t\tvar edgeValues = getEdgesBetween2Nodes(nodes[i].value, nodes[j].value);\r\n\t\t\t\t\t// add each edge\r\n\t\t\t\t\tfor (var k = 0; k < edgeValues.length; k++) {\r\n\t\t\t\t\t\tnodes[i].edges.push(edges.push({source: i, target: j, value: edgeValues[k]})-1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout(addEdgesToGraph,0,i,j);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (config.callbacks.graphDone) {\r\n\t\t\tsetTimeout(config.callbacks.graphDone);\r\n\t\t}\r\n\r\n\t\t// kick off siteswap search\r\n\t\tif (config.async) {\r\n\t\t\tsetTimeout(search,0,0,[]);\r\n\t\t} else {\r\n\t\t\tsearch(0,[]);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fc685e78fa5c20d310f07c5e9901e8ec", "score": "0.48358035", "text": "async bitIdsToVersionDeps(ids) {\n _logger().default.debug(`bitIdsToVersionDeps, ${ids.length} ids`);\n\n const compDefs = await this.sources.getMany(ids);\n const versionDepsWithNulls = await (0, _pMapSeries().default)(compDefs, async ({\n component,\n id\n }) => {\n if (!component) throw new (_exceptions().ComponentNotFound)(id.toString());\n\n if (component.isEmpty() && !id.hasVersion() && !component.laneHeadLocal) {\n // this happens for example when importing a remote lane and then running \"bit fetch --components\"\n // the head is empty because it exists on the lane only, it was never tagged and\n // laneHeadLocal was never set as it originated from the scope, not the consumer.\n return null;\n }\n\n const versionComp = component.toComponentVersion(id.version);\n const version = await this.getVersionFromComponentDef(component, id);\n\n if (!version) {\n // should have been fetched before by getExternalMany(). probably doesn't exist on the remote.\n throw new (_showDoctorError().default)(`Version ${versionComp.version} of ${component.id().toString()} was not found`);\n }\n\n return new (_versionDependencies().default)(versionComp, [], version);\n });\n const versionDeps = (0, _lodash().compact)(versionDepsWithNulls);\n const allFlattened = versionDeps.map(v => v.version.getAllFlattenedDependencies());\n\n const allFlattenedUniq = _bitId().BitIds.uniqFromArray((0, _lodash().flatten)(allFlattened));\n\n const allFlattenedDefs = await this.sources.getMany(allFlattenedUniq);\n const flattenedComponentVersions = (0, _lodash().compact)(allFlattenedDefs.map(({\n id,\n component\n }) => {\n if (!component) {\n _logger().default.warn(`fetchWithoutDeps failed finding a local component ${id.toString()}`);\n\n return null;\n }\n\n return component.toComponentVersion(id.version);\n }));\n versionDeps.forEach(versionDep => {\n const deps = versionDep.version.flattenedDependencies.map(dep => flattenedComponentVersions.find(c => c.id.isEqual(dep)));\n versionDep.dependencies = (0, _lodash().compact)(deps);\n });\n return versionDeps;\n }", "title": "" } ]
bb3e95403afc209923396cc2a2a2796b
loading the Neural network data from the json file
[ { "docid": "3aafe0a928ead110c804a140d26f25a9", "score": "0.62361", "text": "function preload() {\n\tnetwork = loadJSON(\"mnist.json\");\n}", "title": "" } ]
[ { "docid": "27b578eda46cad4ab0eac95af33626ad", "score": "0.66667205", "text": "async function training() {\n\t\tlet trainingData = [];\n\t\t\n\n\t\tdb.all(`SELECT * FROM labeled_dataset`, [], async (err, rows) => {\n\t\t\tawait classifying(rows);\n\t\t\tawait traindata(20000, `./modules/neuralnet/trained_network.json`);\n\n\t\t\tfunction tokenize(sentence) {\n\t\t\t\tlet splitted_words = sentence\n\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t.replace(/[?!@,.'~-]/g, ``)\n\t\t\t\t\t\t.split(` `),\n\t\t\t\t\tobjectified = {};\n\t\t\t\tfor(let i = splitted_words.length - 1; i >= 0; i--) {\n\t\t\t\t\tobjectified = Object.assign({ [splitted_words[i]]: 1 }, objectified);\n\t\t\t\t}\n\t\t\t\treturn objectified;\n\t\t\t}\n\n\t\t\tfunction classifying(datasets) {\n\t\t\t\tfor (let i in datasets) {\n\t\t\t\t\tlet tokenized_input = tokenize(datasets[i].reference);\n\t\t\t\t\ttrainingData.push({\n\t\t\t\t\t\tinput: tokenized_input,\n\t\t\t\t\t\toutput: { [datasets[i].intent]: 1 },\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction traindata(times, path) {\n\t\t\t\tnet.train(trainingData, {\n\t\t\t\t\titerations: times,\n\t\t\t\t\ttimeout: Infinity,\n\t\t\t\t\tlearningRate: 0.1,\n\t\t\t\t\terrorThresh: 0.002,\n\t\t\t\t\tlogPeriod: 100,\n\t\t\t\t\tlog: (stats) => {\n\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\tstats\n\t\t\t\t\t\t);\n\t\t\t\t\t}, \n\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\tlet parsednetwork = net.toJSON();\n\n\t\t\t\tfs.writeFile(path, JSON.stringify(parsednetwork, null, 4), (err) => {\n\t\t\t\t\terr ? console.log(err) : console.log(`Neural network has been refreshed and stored in ${path}`);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "0a97c15859d4d16f640d4367279ea000", "score": "0.6501783", "text": "function _loadJSON(file) {\n _model = JSON.parse(fs.readFileSync(file));\n }", "title": "" }, { "docid": "885fed481367076ed64e842389d22018", "score": "0.63949233", "text": "function CargarNeurona() {\r\n console.log(\"Cargando una Neurona\");\r\n knn.load(\"./NeuronaKNN.json\", function() {\r\n console.log(\"Neurona Cargada knn\");\r\n })\r\n}", "title": "" }, { "docid": "cc69a0e7d369dff1267e125f55863b93", "score": "0.6353853", "text": "loadModel() {\n this.classifier.fromJSON(trainedModel)\n }", "title": "" }, { "docid": "a8d00c86648394f72399d5231df7a295", "score": "0.62952906", "text": "function loadMyKNN() {\n knnClassifier.load('./trained.json', updateCounts);\n}", "title": "" }, { "docid": "d621d9e98f09b519e1bb6842d5262e85", "score": "0.6233176", "text": "function loadMyKNN() {\n knnClassifier.load('./myKNNDataset.json', updateCounts);\n}", "title": "" }, { "docid": "1a7f7eb4864e4fc322f2f7cfb647d8b6", "score": "0.6196084", "text": "loadWeigthsTrained() {\n try {\n let info = fs.readFileSync('weigths.json', 'utf8');\n let data = JSON.parse(info);\n for (let i = 0; i < data.weigths.length; i++) {\n let row = data.weigths[i].rows;\n let col = data.weigths[i].cols;\n this.wih[i] = new Matrix(row, col, data.weigths[i].matrix);\n this.biasH[i] = new Matrix(row, 1, data.bias[i].matrix);\n }\n let row = data.who[0].rows;\n let col = data.who[0].cols;\n this.who = new Matrix(row, col, data.who[0].matrix);\n this.biasO = new Matrix(row, 1, data.biasO[0].matrix)\n } catch (error) {\n console.error('Error file not found!');\n }\n }", "title": "" }, { "docid": "9a01d8f00ee969e653886c970b860c19", "score": "0.6165345", "text": "readFromJSON(json) {\n\t var graph = new $G.BaseGraph(json.name), coords_json, coords, coord_idx, coord_val, features, feature;\n\t for (var node_id in json.data) {\n\t var node = graph.hasNodeID(node_id) ? graph.getNodeById(node_id) : graph.addNodeByID(node_id);\n\t /**\n\t * Reading and instantiating features\n\t * We are using the shortcut setFeatures here,\n\t * so we have to read them before any special features\n\t */\n\t if (features = json.data[node_id].features) {\n\t // for ( feature in features ) {\n\t // \tnode.setFeature(feature, features[feature]);\n\t // }\n\t node.setFeatures(features);\n\t }\n\t /**\n\t * Reading and instantiating coordinates\n\t * Coordinates are treated as special features,\n\t * and are therefore added after general features\n\t */\n\t if (coords_json = json.data[node_id].coords) {\n\t coords = {};\n\t for (coord_idx in coords_json) {\n\t coords[coord_idx] = +coords_json[coord_idx];\n\t }\n\t node.setFeature('coords', coords);\n\t }\n\t // Reading and instantiating edges\n\t var edges = json.data[node_id].edges;\n\t for (var e in edges) {\n\t var edge_input = edges[e], target_node_id = edge_input.to, \n\t // Is there any direction information? \n\t directed = this._explicit_direction ? edge_input.directed : this._direction, dir_char = directed ? 'd' : 'u', \n\t // Is there any weight information?,\n\t weight_float = this.handleEdgeWeights(edge_input), weight_info = weight_float === weight_float ? weight_float : DEFAULT_WEIGHT, edge_weight = this._weighted_mode ? weight_info : undefined, target_node = graph.hasNodeID(target_node_id) ? graph.getNodeById(target_node_id) : graph.addNodeByID(target_node_id);\n\t var edge_id = node_id + \"_\" + target_node_id + \"_\" + dir_char, edge_id_u2 = target_node_id + \"_\" + node_id + \"_\" + dir_char;\n\t if (graph.hasEdgeID(edge_id) || (!directed && graph.hasEdgeID(edge_id_u2))) {\n\t // The completely same edge should only be added once...\n\t continue;\n\t }\n\t else {\n\t var edge = graph.addEdgeByID(edge_id, node, target_node, {\n\t directed: directed,\n\t weighted: this._weighted_mode,\n\t weight: edge_weight\n\t });\n\t }\n\t }\n\t }\n\t return graph;\n\t }", "title": "" }, { "docid": "2198b515a1fa9a264b63f2b50a656e10", "score": "0.60240054", "text": "function dataParsed(data){\n data.forEach(element => {\n \n \n const inputs = {\n age : element.age,\n sex: element.sex ,\n cp: element.cp ,\n trtbps : element.trtbps ,\n chol: element.chol ,\n fbs: element.fbs ,\n restecg : element.restecg ,\n thalachh : element.thalachh ,\n exng : element.exng ,\n ldpeak : element.oldpeak ,\n slp : element.slp ,\n caa: element.caa ,\n thall : element.thall \n }\n\n // const inputs = { \n // horsepower : element.horsepower,\n // cylinders : element.cylinders\n // }\n const output = { output : element.output}\n\n nn.addData(inputs, output)\n });\n\n nn.normalizeData()\n\n const trainingOptions = {\n epochs: 32 ,\n batchSize: 12\n }\n\n nn.train(trainingOptions, finishedTraining);\n }", "title": "" }, { "docid": "fdf8d9913e90bead026d38e2228cc9e0", "score": "0.600662", "text": "function processJsonGraph(data) {\n try {\n let forest = [];\n let jgraphs = JSON.parse(data.toString());\n console.log(\"Number of trees: \" + jgraphs.length);\n for (let jgraph of jgraphs) {\n let tree = new DecisionTree(jgraph);\n forest.push(tree);\n }\n ensemble= new EnsembleClassifier(forest);\n onReady();\n }\n catch(e) {\n console.error(e);\n }\n}", "title": "" }, { "docid": "b2b81882ce1c83c200bdf4829ff862b9", "score": "0.59553367", "text": "function loadMyKNN() {\n knnClassifier.load('./ButterflyKNNDataset.json', updateCounts);\n}", "title": "" }, { "docid": "1574ed03b8cee423bfddb69a7ec28c46", "score": "0.59381926", "text": "function loadMyKNN() {\n knnClassifier.load('./CSFknnDataSet.json', updateCounts);\n}", "title": "" }, { "docid": "d8b14a544be2f5e70e5d9290379ee34b", "score": "0.58934057", "text": "async load() {\n const modelConfigRequest = await this.fetch(this.path, this.requestInit);\n if (!modelConfigRequest.ok) {\n throw new Error(`Request to ${this.path} failed with status code ` +\n `${modelConfigRequest.status}. Please verify this URL points to ` +\n `the model JSON of the model to load.`);\n }\n let modelConfig;\n try {\n modelConfig = await modelConfigRequest.json();\n }\n catch (e) {\n let message = `Failed to parse model JSON of response from ${this.path}.`;\n // TODO(nsthorat): Remove this after some time when we're comfortable that\n // .pb files are mostly gone.\n if (this.path.endsWith('.pb')) {\n message += ' Your path contains a .pb file extension. ' +\n 'Support for .pb models have been removed in TensorFlow.js 1.0 ' +\n 'in favor of .json models. You can re-convert your Python ' +\n 'TensorFlow model using the TensorFlow.js 1.0 conversion scripts ' +\n 'or you can convert your.pb models with the \\'pb2json\\'' +\n 'NPM script in the tensorflow/tfjs-converter repository.';\n }\n else {\n message += ' Please make sure the server is serving valid ' +\n 'JSON for this request.';\n }\n throw new Error(message);\n }\n const modelTopology = modelConfig.modelTopology;\n const weightsManifest = modelConfig.weightsManifest;\n const generatedBy = modelConfig.generatedBy;\n const convertedBy = modelConfig.convertedBy;\n const format = modelConfig.format;\n const userDefinedMetadata = modelConfig.userDefinedMetadata;\n // We do not allow both modelTopology and weightsManifest to be missing.\n if (modelTopology == null && weightsManifest == null) {\n throw new Error(`The JSON from HTTP path ${this.path} contains neither model ` +\n `topology or manifest for weights.`);\n }\n let weightSpecs;\n let weightData;\n if (weightsManifest != null) {\n const results = await this.loadWeights(weightsManifest);\n [weightSpecs, weightData] = results;\n }\n const artifacts = {\n modelTopology,\n weightSpecs,\n weightData,\n userDefinedMetadata,\n generatedBy,\n convertedBy,\n format\n };\n const initializer = modelConfig.modelInitializer;\n if (initializer) {\n artifacts.modelInitializer = initializer;\n }\n return artifacts;\n }", "title": "" }, { "docid": "b50a19ca4595fe5d36195ca86ce9e9af", "score": "0.5880479", "text": "async load() {\n const modelConfigRequest = await this.fetch(this.path, this.requestInit);\n\n if (!modelConfigRequest.ok) {\n throw new Error(`Request to ${this.path} failed with status code ` + `${modelConfigRequest.status}. Please verify this URL points to ` + `the model JSON of the model to load.`);\n }\n\n let modelJSON;\n\n try {\n modelJSON = await modelConfigRequest.json();\n } catch (e) {\n let message = `Failed to parse model JSON of response from ${this.path}.`; // TODO(nsthorat): Remove this after some time when we're comfortable that\n // .pb files are mostly gone.\n\n if (this.path.endsWith('.pb')) {\n message += ' Your path contains a .pb file extension. ' + 'Support for .pb models have been removed in TensorFlow.js 1.0 ' + 'in favor of .json models. You can re-convert your Python ' + 'TensorFlow model using the TensorFlow.js 1.0 conversion scripts ' + 'or you can convert your.pb models with the \\'pb2json\\'' + 'NPM script in the tensorflow/tfjs-converter repository.';\n } else {\n message += ' Please make sure the server is serving valid ' + 'JSON for this request.';\n }\n\n throw new Error(message);\n } // We do not allow both modelTopology and weightsManifest to be missing.\n\n\n const modelTopology = modelJSON.modelTopology;\n const weightsManifest = modelJSON.weightsManifest;\n\n if (modelTopology == null && weightsManifest == null) {\n throw new Error(`The JSON from HTTP path ${this.path} contains neither model ` + `topology or manifest for weights.`);\n }\n\n return (0, _io_utils.getModelArtifactsForJSON)(modelJSON, weightsManifest => this.loadWeights(weightsManifest));\n }", "title": "" }, { "docid": "465005b4e69d5480a50940a952e19843", "score": "0.58616364", "text": "function loadData() {\n Papa.parse(csvFile, {\n download: true,\n header: true,\n dynamicTyping: true,\n complete: (results) => {\n console.log(results)\n console.log(results.data)\n trainModel(results.data)\n } \n // train het model met deze data\n })\n}", "title": "" }, { "docid": "860dd071886db10f71bf1c83bc0fb43c", "score": "0.5810681", "text": "static deserialize(json) {\n let config = json['config'] || {};\n\n let graph = new Graph(config);\n\n json['nodes'].forEach(n => {\n graph.addNode(n.id);\n });\n\n json['links'].forEach(l => {\n if('weight' in l) \n graph.addEdge(l.source, l.target, Number(l.weight));\n else\n graph.addEdge(l.source, l.target);\n });\n\n return graph;\n }", "title": "" }, { "docid": "9639ff897b06f4ad75cd14121c6dc7ea", "score": "0.5797233", "text": "async function loadModel() {\r\n // Relative URL provided for my-model.json.\r\n model = await tf.loadLayersModel(\"my-model.json\");\r\n}", "title": "" }, { "docid": "e4d6baac6a2ec59efbb06027fb406fdd", "score": "0.57716906", "text": "function use_stored_nueral_net(url,array_to_predict_20) {\n\t var neededData; \n\t var prediction; \n\t var data_returned;\n\t var myRestoredNet;\nvar jqxhr = $.getJSON( url, function(data) {\n neededData = JSON.parse(data);\n\n \n\n myRestoredNet = synaptic.Network.fromJSON(neededData[0]);\n\n prediction = myRestoredNet.activate(array_to_predict_20/*$.parseJSON(array_to_predict_20)*/)\n console.log( \"success\" );\n\n})\n .done(function(data) {\n \n })\n .fail(function() {\n console.log( \"error\" );\n })\n .always(function() {\n console.log(prediction);\n });\n\n//return prediction;\n\n}", "title": "" }, { "docid": "a11565faf0667a0eeb45ec35e034aa1f", "score": "0.5765825", "text": "async function load() {\n // TODO: Implement your own data loading logic here\n const trainXs = tf.zeros([10, 1]);\n const trainYs = tf.zeros([10, 1]);\n const testXs = tf.zeros([10, 1]);\n const testYs = tf.zeros([10, 1]);\n return [trainXs, trainYs, testXs, testYs];\n}", "title": "" }, { "docid": "320a8b6ee4f6914a8450f851d63a06e0", "score": "0.5742743", "text": "async function loadMobilenet() {\n const mobilenet = await tf.loadModel(\n 'https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v1_0.25_224/model.json');\n\n // Return a model that outputs an internal activation.\n const layer = mobilenet.getLayer('conv_pw_13_relu');\n // for(let i = 0;i<mobilenet.layers.length;i++){\n // console.log(mobilenet.layers[i].name,mobilenet.layers[i].output.shape);\n // }\n M.toast({\n html: 'Model loaded...',\n displayLength: 1000\n })\n return tf.model({inputs: mobilenet.inputs, outputs: layer.output});\n}", "title": "" }, { "docid": "d8f380a6ddc37c21516eab833d48b7a6", "score": "0.57267606", "text": "function importNetwork(file) {\n\n var reader = new FileReader();\n\n var header = 'data:application/json;base64,';\n\n reader.onload = function(event) {\n the_url = event.target.result;\n if (the_url.slice(0,header.length) === header) {\n var new_data = JSON.parse(\n decodeSpecialChars(atob(the_url.slice(header.length))));\n var dataToAdd = {};\n if (new_data.ltdb === undefined) {\n dataToAdd = new_data; // this was a subset, possibly one graph, database export\n dataToAdd.graphs = [dataToAdd.graphs]; // right now we only support one graph\n } else {\n dataToAdd = new_data.ltdb; // this was a complete database export\n }\n\n // First load the existing database\n chrome.storage.local.get([\"ltdb\"], function(obj) {\n var db = window.learning_threads.build_ltdb(obj.ltdb);\n window.learning_threads.addData(db, dataToAdd);\n chrome.storage.local.set({\n \"ltdb\":window.learning_threads.prepSave_ltdb()(db)\n }, function() {\n window.close();\n });\n });\n\n } else {\n console.log('This file is not the correct format');\n }\n };\n\n reader.readAsDataURL(file);\n\n}", "title": "" }, { "docid": "2bf1d8a717709d4637c1980b5da86941", "score": "0.5712335", "text": "loadTrainData() {\n console.log('Loading Training images...');\n this.trainData = loadImages(TRAIN_IMAGES_DIR);\n console.log('Training Images loaded successfully.')\n }", "title": "" }, { "docid": "a91ad242521130e7aa7d3f990f0634e4", "score": "0.5679742", "text": "function LoadJson(){}", "title": "" }, { "docid": "4a0ef927f9cbda708b2d664fdce54782", "score": "0.5637454", "text": "async function loadMobilenet() {\n\n model = await tf.loadModel('/model2/model.json');\n const mobilenet = await tf.loadModel(\n 'https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v1_0.25_224/model.json');\n\n // Return a model that outputs an internal activation.\n const layer = mobilenet.getLayer('conv_pw_13_relu');\n return tf.model({inputs: mobilenet.inputs, outputs: layer.output});\n }", "title": "" }, { "docid": "ceec953ff694b748389f928e3aee9e3a", "score": "0.56362057", "text": "function loadBatches(){\n let batch_data = fs.readFileSync('./batches.txt');\n batches = JSON.parse(batch_data);\n //console.log(batches);\n}", "title": "" }, { "docid": "d3470c7bc880ae705e344a234e95f5d4", "score": "0.5635988", "text": "async function load (model){\n const models = await tf.io.listModels();\n const modelInfo = models['file://./ovulationdaymodel'];\n return model = await tf.loadLayersModel('file://./ovulationdaymodel/model.json');\n\n }", "title": "" }, { "docid": "59ee42201009704f02963922123bc0f7", "score": "0.5629482", "text": "function train(allInputs){\n shuffle(allInputs, true);\n for(let i = 0; i < allInputs.length; i++){\n let input = allInputs[i];\n // print(input);\n\n //Taking labels from JSON\n let targets = [];\n let labelXS = trainLabel.coordinates[i].xs/128;\n let labelYS = trainLabel.coordinates[i].ys/128;\n let labelXE = trainLabel.coordinates[i].xe/128;\n let labelYE = trainLabel.coordinates[i].ye/128;\n\n // let labelXS = trainLabel.coordinates[i].xs;\n // let labelYS = trainLabel.coordinates[i].ys;\n // let labelXE = trainLabel.coordinates[i].xe;\n // let labelYE = trainLabel.coordinates[i].ye;\n\n targets.push(labelXS);\n targets.push(labelYS);\n targets.push(labelXE);\n targets.push(labelYE);\n\n nn.train(input, targets);\n // canvasImage.updatePixels();\n }\n}", "title": "" }, { "docid": "ddea96aded003fb947b556366175965d", "score": "0.56148034", "text": "async function loadModel() {\r\n console.log(\"model loading...\");\r\n model = undefined;\r\n model = await tf.loadLayerModel(\"models/model.json\");\r\n console.log(\"model loaded...\");\r\n}", "title": "" }, { "docid": "91433c1878dd2b5f28e140db16715220", "score": "0.56091756", "text": "function NeuralNetwork(networkLayers) {\r\n\tthis.network = [];\r\n\tthis.fitness = 0;\r\n\tthis.networkLayers = networkLayers;\r\n\tthis.init();\r\n}", "title": "" }, { "docid": "24a4ebb8ae946a964bd7f42cbb2422f3", "score": "0.55953795", "text": "async function loadTrainingSet(){\n var lines = fs.readFileSync('churn_train_csv.csv').toString().split(\"\\n\");\n for(var i = 0; i < 1000; i++){\n var elements = lines[i].split(\",\");\n elements=elements.map(Number);\n Y_train.push(elements.pop());\n X_train.push(elements.map(Number));\n }\n\n}", "title": "" }, { "docid": "a5a2681d681d7b2f03652806a246eea8", "score": "0.558022", "text": "function loadData(file, idx, callback) {\n function type(d,i) { datasets[idx][i] = { x:+d.x, y:+d.y, z:+d.z, f:+d.f }}\n datasets[idx] = [];\n knn_classes[idx] = new KNN.ItemList(k);\n d3.csv(\"./data/\"+file+\".csv\", type, function(d){\n\n if (!colorScales[idx])\n colorScales[idx] = d3.scaleLinear().range([tf_margin.left, tf_width-tf_margin.right]);\n colorScales[idx].domain(d3.extent(datasets[idx],d=>d.f));\n\n datasets[idx].forEach(d => knn_classes[idx].add( new KNN.Item(d) )); \n \n xExent = d3.extent(datasets[idx], function (d) {return d.x; }),\n yExent = d3.extent(datasets[idx], function (d) {return d.y; }),\n zExent = d3.extent(datasets[idx], function (d) {return d.z; }),\n fExent = d3.extent(datasets[idx], function (d) {return d.f; }),\n\n colour.domain(fExent);\n xScale.domain(xExent);\n yScale.domain(yExent);\n zScale.domain(zExent);\n aScale.domain(fExent);\n\n callback();\n })\n}", "title": "" }, { "docid": "898e56f31ecf75b5b9441f1b7e16714f", "score": "0.5577165", "text": "constructor(props) {\n super(props);\n\n this._numOutputs = 2;\n this._numInputs = 5;\n this._nnCallbackRef = (e) => this._nnCallback(e);\n\n // this._neuralNetwork.setWeights([[[-45.42877134937925,0.06307931678138425,86.16102782528077],[1.0979752237380247,43.93067987200524,-86.27794022812651]],[[10.168778876191363,-9.997238479805933,0.552376336368361],[19.20396670170233,-13.954600932323425,12.059486933582416],[11.620645753000291,-11.462057255950354,0.6045539499607651]],[[-3.302596057655691,-5.123564179398088,-3.7756837144896305,4.960726472470421],[3.219538642433655,5.088310440177473,3.899255941522516,-4.940265049557309]]]);\n\n this.state = {\n epochs: 0,\n error: 1000000,\n dataOutOfRange: [],\n dataInRange: [],\n // weights: JSON.stringify(this._neuralNetwork.getWeights())\n weights: \"\",\n maxEpochs: 20,\n minWeightDelta: null,\n miniBatchSize: 10,\n cacheMinErrorNetwork: false,\n learningRate: 0.15,\n normalize: true,\n trainingSetSize: 2000,\n hiddenLayers: \"6, 6\",\n activationFunction: \"tanh\",\n trainDataOutOfRange: [],\n trainDataInRange: [],\n testType: \"xor\",\n greenCount: 0,\n redCount: 0,\n showDetail: false,\n includeBias: true,\n weightInitialization: \"COMPRESSED_NORMAL\",\n showVisualizer: false,\n neuralNetworkDS: null,\n backPropType: \"sgd\"\n };\n\n this._testData = {};\n }", "title": "" }, { "docid": "b7df48a9e40e03a9e1ed3f48e2a9db27", "score": "0.5573124", "text": "function loadData() {\n d3.json(dataPath, function(error, json) {\n if (error) return console.warn(error);\n data = json;\n initData();\n });\n}", "title": "" }, { "docid": "e8ce23e16055d6a08c2095a4126daea6", "score": "0.55652016", "text": "async function load_model() {\n console.log(\"button clicked\");\n model = await tf.loadLayersModel('saved_models/7813-bruno/model.json');\n console.log(model)\n}", "title": "" }, { "docid": "1c70e0c09f705f715fef8b71a2721099", "score": "0.5559183", "text": "async function load() {\n model = await tm.mobilenet.load(checkpointURL, metadataURL);\n totalClasses = model.getTotalClasses();\n console.log(\"Number of classes, \", totalClasses);\n}", "title": "" }, { "docid": "aab9f50667c7623c940121a17a07b0f2", "score": "0.554121", "text": "function train() {\n\tconsole.log('Training ' + trainData.length + ' records.');\n\tvar mind = new brain.NeuralNetwork(),\n\t\tresult = mind.train(trainData);\n\tfs.writeFileSync(DB_PATH, JSON.stringify(trainData), 'utf8');\n\tprocess.send({\n\t\ttrained: trainQueue,\n\t\tresult: result,\n\t\tmind: mind.toJSON()\n\t});\n\ttrainQueue = [];\n\ttrainScheduled = false;\n}", "title": "" }, { "docid": "fd71990544bdc22d5303301a50e3d82e", "score": "0.5523936", "text": "async function loadMobileNet(){\r\n\tconst mobilenet = await tf.loadModel('https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v1_0.25_224/model.json');\r\n const layer = mobilenet.getLayer('conv_pw_13_relu');\r\n return tf.model({inputs: mobilenet.inputs, outputs: layer.output});\r\n}", "title": "" }, { "docid": "32b4c7270079be257919e9c67a72f623", "score": "0.54993683", "text": "function modelReady() {\n console.log('MobileNet loaded!');\n knn = ml5.KNNClassifier();\n knn.load(\"model.json\").then(function () {\n console.log(\"KNN Data Loaded\");\n setTimeout(goClassify(),500);\n \n\n }).catch(function () {\n console.log(\"cannot find file\");\n goClassify();\n });\n}", "title": "" }, { "docid": "7605130471466a024f224fa8dbc33c7e", "score": "0.54854715", "text": "async function predict() {\n \n // Relative URL provided for my-model.json.\n const model = await tf.loadLayersModel('http://127.0.0.1:5500/ml_model/qq/model.json');\n // const model = await tf.loadLayersModel('model.json');\n // Once model is loaded, let's try using it to make a prediction!\n // Print to developer console for now.\n model.predict(tf.tensor2d([[0,1,0,1,0,1,0]])).print();\n }", "title": "" }, { "docid": "8007caa3857d253e78821edf140574ef", "score": "0.5475678", "text": "async function loadMobileNet(){\n\tconst mobilenet = await tf.loadModel('https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v1_0.25_224/model.json');\n\tconst layer = mobilenet.getLayer('conv_pw_13_relu');\n\treturn tf.model({inputs: mobilenet.inputs, outputs: layer.output});\n}", "title": "" }, { "docid": "d01d4e686e052b6cee8fab25dca6a660", "score": "0.54315704", "text": "async function loadModel() {\n try {\n const url = tfn.io.fileSystem(MODEL_PATH);\n model = await tf.loadLayersModel(url);\n console.log(\"CNN model loaded successfully\");\n } catch (err) {\n console.log(\"CNN model load error: \" + err);\n }\n}", "title": "" }, { "docid": "8942ada2f7e49a0b39514a13fabdb937", "score": "0.5418225", "text": "function load() {\n m_data.load(APP_ASSETS_PATH + \"Toy-Plane.json\", load_cb, preloader_cb);\n}", "title": "" }, { "docid": "39d6af6b7c24b64bff4eb2f5a41ab129", "score": "0.5411019", "text": "async load() {\n const info = JSON.parse(this.LS.getItem(this.keys.info));\n\n if (info == null) {\n throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);\n }\n\n if (info.modelTopologyType !== 'JSON') {\n throw new Error('BrowserLocalStorage does not support loading non-JSON model ' + 'topology yet.');\n }\n\n const out = {}; // Load topology.\n\n const topology = JSON.parse(this.LS.getItem(this.keys.topology));\n\n if (topology == null) {\n throw new Error(`In local storage, the topology of model '${this.modelPath}' ` + `is missing.`);\n }\n\n out.modelTopology = topology; // Load weight specs.\n\n const weightSpecs = JSON.parse(this.LS.getItem(this.keys.weightSpecs));\n\n if (weightSpecs == null) {\n throw new Error(`In local storage, the weight specs of model '${this.modelPath}' ` + `are missing.`);\n }\n\n out.weightSpecs = weightSpecs; // Load meta-data fields.\n\n const metadataString = this.LS.getItem(this.keys.modelMetadata);\n\n if (metadataString != null) {\n const metadata = JSON.parse(metadataString);\n out.format = metadata.format;\n out.generatedBy = metadata.generatedBy;\n out.convertedBy = metadata.convertedBy;\n\n if (metadata.signature != null) {\n out.signature = metadata.signature;\n }\n\n if (metadata.userDefinedMetadata != null) {\n out.userDefinedMetadata = metadata.userDefinedMetadata;\n }\n\n if (metadata.modelInitializer != null) {\n out.modelInitializer = metadata.modelInitializer;\n }\n\n if (metadata.trainingConfig != null) {\n out.trainingConfig = metadata.trainingConfig;\n }\n } // Load weight data.\n\n\n const weightDataBase64 = this.LS.getItem(this.keys.weightData);\n\n if (weightDataBase64 == null) {\n throw new Error(`In local storage, the binary weight values of model ` + `'${this.modelPath}' are missing.`);\n }\n\n out.weightData = (0, _io_utils.base64StringToArrayBuffer)(weightDataBase64);\n return out;\n }", "title": "" }, { "docid": "fd1b6045556c05a3eeaf28e2198af358", "score": "0.5379113", "text": "function modelJSON(jsonFile) {\n let data = fs.readFileSync(jsonFile);\n let parsedData = JSON.parse(data);\n return parsedData;\n}", "title": "" }, { "docid": "d1da60276889123c5eea6058a52b247d", "score": "0.5373087", "text": "function getData(){\r\n\t// get the json data via d3\r\n\td3.json(\"NL.json\", function(data) {\r\n\t\tsvgChard(data);\r\n\t});\r\n}", "title": "" }, { "docid": "27863270713ea7e794087be788be1c5d", "score": "0.53436625", "text": "constructor() {\n this.classifier = new brain.recurrent.LSTMTimeStep();\n this.loadModel()\n }", "title": "" }, { "docid": "fc1f6f28cb3275aa7ee93f797b2db311", "score": "0.53372186", "text": "function init() {\n d3.json(\"samples.json\").then((options) => {\n var samplenames = options.names;\n var initSample = samplenames[0];\n buildVisuals(initSample);\n});\n}", "title": "" }, { "docid": "f4cd8bbc34f55af76aedcdc50f60df20", "score": "0.52989155", "text": "function loadData(url) {\n\t\td3.json(url, function (error, json) {\n\t\t\tif (error) return;\n\t\t\t//console.log(json);\n\t\t\t//console.log(url);\n\t\t\t//console.log(\"getting ready for the map\");\n\t\t\tdrawMap(json);\n\t\t\tdrawTable(json);\n\t\n\t\t});\n\t}", "title": "" }, { "docid": "f8b485ee17eeb11bba971023fbc7f537", "score": "0.52922916", "text": "async load() {\n const info = JSON.parse(this.LS.getItem(this.keys.info));\n if (info == null) {\n throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);\n }\n if (info.modelTopologyType !== 'JSON') {\n throw new Error('BrowserLocalStorage does not support loading non-JSON model ' +\n 'topology yet.');\n }\n const out = {};\n // Load topology.\n const topology = JSON.parse(this.LS.getItem(this.keys.topology));\n if (topology == null) {\n throw new Error(`In local storage, the topology of model '${this.modelPath}' ` +\n `is missing.`);\n }\n out.modelTopology = topology;\n // Load weight specs.\n const weightSpecs = JSON.parse(this.LS.getItem(this.keys.weightSpecs));\n if (weightSpecs == null) {\n throw new Error(`In local storage, the weight specs of model '${this.modelPath}' ` +\n `are missing.`);\n }\n out.weightSpecs = weightSpecs;\n // Load meta-data fields.\n const metadataString = this.LS.getItem(this.keys.modelMetadata);\n if (metadataString != null) {\n const metadata = JSON.parse(metadataString);\n out.format = metadata['format'];\n out.generatedBy = metadata['generatedBy'];\n out.convertedBy = metadata['convertedBy'];\n out.userDefinedMetadata = metadata['userDefinedMetadata'];\n }\n // Load weight data.\n const weightDataBase64 = this.LS.getItem(this.keys.weightData);\n if (weightDataBase64 == null) {\n throw new Error(`In local storage, the binary weight values of model ` +\n `'${this.modelPath}' are missing.`);\n }\n out.weightData = Object(_io_utils__WEBPACK_IMPORTED_MODULE_3__[\"base64StringToArrayBuffer\"])(weightDataBase64);\n return out;\n }", "title": "" }, { "docid": "99d73930420fcdfcc83b41d3eec4c0e4", "score": "0.52864015", "text": "function digging() {\r\nvar loader = new THREE.JSONLoader();\r\n loader.load(\"Shed/exterior/shovel.json\", handle_load_shovel) \r\n}", "title": "" }, { "docid": "18023258af82e62b946e28f1c9b61670", "score": "0.52774656", "text": "function loadData() {\n d3.csv(\"data/diabetes-India-dataset.csv\", function (d) {\n data = d;\n });\n}", "title": "" }, { "docid": "8efe02f8475f229703312258646ecc12", "score": "0.52695376", "text": "function importGoodNetwork(id) {\n if(id < currentNetworkID){\n logInfo(\"Network \" + id + \" was already tested, wait for next Generation and try again\");\n return;\n } else if (hiddenLayers < 10) {\n logInfo(\"The good network can only be imported for Tests running with 10+ hidden-layer Neurons\");\n return;\n }\n\n goodNetworkString = '{\"neurons\":[{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":0,\"old\":0,\"activation\":6.039999999999997,\"bias\":0,\"layer\":\"input\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":0,\"old\":0,\"activation\":1,\"bias\":0,\"layer\":\"input\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":0,\"old\":0,\"activation\":31,\"bias\":0,\"layer\":\"input\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-41.25688410171283,\"old\":-38.591580173705026,\"activation\":1.208823499546531e-18,\"bias\":3.299826859426889,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-935.30664382671,\"old\":-940.2808762851099,\"activation\":0,\"bias\":-0.5545890434772017,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":1.281761946707992,\"old\":-2.2060048974214634,\"activation\":0.7827495494707233,\"bias\":1.0913726215621826,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":5.65115686287978,\"old\":12.291835987859047,\"activation\":0.9964988512672452,\"bias\":-0.3506361876896138,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-19.779688111365587,\"old\":-18.22853192325963,\"activation\":2.5691567263272796e-9,\"bias\":0.4745724345373834,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":94.82432167019643,\"old\":88.75057456628292,\"activation\":1,\"bias\":-1.4833536215073453,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-10.069713725206569,\"old\":-15.809743724651678,\"activation\":0.000042340941025999234,\"bias\":0.47778836444182726,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-29.83798633883703,\"old\":-38.571048265733225,\"activation\":1.1003407120641258e-13,\"bias\":3.596735885579122,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":23.87483028377885,\"old\":24.79335430917492,\"activation\":0.9999999999572149,\"bias\":0.7308544193646698,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-8.974523435509022,\"old\":-7.481766795974442,\"activation\":0.0001265782300273194,\"bias\":0.17628090656399842,\"layer\":\"0\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-663.8762233892807,\"old\":-664.0079404709991,\"activation\":4.810824513706611e-289,\"bias\":0.4383022667964556,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-148.9060725731861,\"old\":-149.55626948969257,\"activation\":2.1424680768530175e-65,\"bias\":-1.6958844788677496,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-1.3542355210398214,\"old\":-0.7793908891951506,\"activation\":0.2051787785614185,\"bias\":-1.026213400407888,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-19.568162703858267,\"old\":-20.187306232330908,\"activation\":3.1743507711687146e-9,\"bias\":-19.59263882993765,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":0.8793674132338325,\"old\":0.5593423876971615,\"activation\":0.7066911164252356,\"bias\":0.21927867954735647,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-4.664755064149356,\"old\":-1.9889052981170023,\"activation\":0.00933361841266747,\"bias\":-0.8556062746455415,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-1.9164752234595857,\"old\":-1.8281185527565262,\"activation\":0.1282551405224092,\"bias\":0.23835757169115035,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-4.466619586520133,\"old\":-5.224000526859311,\"activation\":0.011355646153087222,\"bias\":-0.1281379304945125,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":8.853330465115349,\"old\":9.133248406365988,\"activation\":0.9998571154162035,\"bias\":1.393546185059949,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":23.43006516183619,\"old\":23.253364200298616,\"activation\":0.9999999999332498,\"bias\":1.2240500436564536,\"layer\":\"1\",\"squash\":\"LOGISTIC\"},{\"trace\":{\"elegibility\":{},\"extended\":{}},\"state\":-8.289654248788754,\"old\":-11.479536251126873,\"activation\":0.00025103823028598606,\"bias\":0.3678977207598242,\"layer\":\"output\",\"squash\":\"LOGISTIC\"}],\"connections\":[{\"from\":\"0\",\"to\":\"3\",\"weight\":0.429887730323839,\"gater\":null},{\"from\":\"0\",\"to\":\"4\",\"weight\":-0.8022955578064366,\"gater\":null},{\"from\":\"0\",\"to\":\"5\",\"weight\":-0.5625430393757185,\"gater\":null},{\"from\":\"0\",\"to\":\"6\",\"weight\":1.0710772782224622,\"gater\":null},{\"from\":\"0\",\"to\":\"7\",\"weight\":0.25018648195257304,\"gater\":null},{\"from\":\"0\",\"to\":\"8\",\"weight\":-0.9796366296634696,\"gater\":null},{\"from\":\"0\",\"to\":\"9\",\"weight\":-0.9258112902330818,\"gater\":null},{\"from\":\"0\",\"to\":\"10\",\"weight\":-1.4085583753058373,\"gater\":null},{\"from\":\"0\",\"to\":\"11\",\"weight\":0.14814903635420518,\"gater\":null},{\"from\":\"0\",\"to\":\"12\",\"weight\":0.2407671999249322,\"gater\":null},{\"from\":\"1\",\"to\":\"3\",\"weight\":-1.014902212830103,\"gater\":null},{\"from\":\"1\",\"to\":\"4\",\"weight\":-0.9073546781890016,\"gater\":null},{\"from\":\"1\",\"to\":\"5\",\"weight\":-0.3943926442491512,\"gater\":null},{\"from\":\"1\",\"to\":\"6\",\"weight\":-1.9028611514078975,\"gater\":null},{\"from\":\"1\",\"to\":\"7\",\"weight\":0.2228300510420626,\"gater\":null},{\"from\":\"1\",\"to\":\"8\",\"weight\":-48.873467837670105,\"gater\":null},{\"from\":\"1\",\"to\":\"9\",\"weight\":-0.6360296825661543,\"gater\":null},{\"from\":\"1\",\"to\":\"10\",\"weight\":1.6342976250684744,\"gater\":null},{\"from\":\"1\",\"to\":\"11\",\"weight\":0.13370265874602466,\"gater\":null},{\"from\":\"1\",\"to\":\"12\",\"weight\":-0.3974364614411773,\"gater\":null},{\"from\":\"2\",\"to\":\"3\",\"weight\":-1.4883332464343741,\"gater\":null},{\"from\":\"2\",\"to\":\"4\",\"weight\":-29.96770435277074,\"gater\":null},{\"from\":\"2\",\"to\":\"5\",\"weight\":0.12846909442659027,\"gater\":null},{\"from\":\"2\",\"to\":\"6\",\"weight\":0.04630153037140716,\"gater\":null},{\"from\":\"2\",\"to\":\"7\",\"weight\":-0.7092973209012442,\"gater\":null},{\"from\":\"2\",\"to\":\"8\",\"weight\":4.874133818469072,\"gater\":null},{\"from\":\"2\",\"to\":\"9\",\"weight\":-0.13934103916369128,\"gater\":null},{\"from\":\"2\",\"to\":\"10\",\"weight\":-0.8568170084721733,\"gater\":null},{\"from\":\"2\",\"to\":\"11\",\"weight\":0.713401710518992,\"gater\":null},{\"from\":\"2\",\"to\":\"12\",\"weight\":-0.3292774763928527,\"gater\":null},{\"from\":\"3\",\"to\":\"13\",\"weight\":0.06841240773865498,\"gater\":null},{\"from\":\"3\",\"to\":\"14\",\"weight\":-1.1378956427964737,\"gater\":null},{\"from\":\"3\",\"to\":\"15\",\"weight\":-0.670593509713966,\"gater\":null},{\"from\":\"3\",\"to\":\"16\",\"weight\":0.18180469839916838,\"gater\":null},{\"from\":\"3\",\"to\":\"17\",\"weight\":0.6609113875202197,\"gater\":null},{\"from\":\"3\",\"to\":\"18\",\"weight\":2.095810618832426,\"gater\":null},{\"from\":\"3\",\"to\":\"19\",\"weight\":0.5713836588987871,\"gater\":null},{\"from\":\"3\",\"to\":\"20\",\"weight\":1.0275585356273202,\"gater\":null},{\"from\":\"3\",\"to\":\"21\",\"weight\":-0.027275989525748973,\"gater\":null},{\"from\":\"3\",\"to\":\"22\",\"weight\":0.645938567656223,\"gater\":null},{\"from\":\"4\",\"to\":\"13\",\"weight\":0.5927922043141796,\"gater\":null},{\"from\":\"4\",\"to\":\"14\",\"weight\":-1.37628534399455,\"gater\":null},{\"from\":\"4\",\"to\":\"15\",\"weight\":0.8507004076100246,\"gater\":null},{\"from\":\"4\",\"to\":\"16\",\"weight\":0.0117764402663868,\"gater\":null},{\"from\":\"4\",\"to\":\"17\",\"weight\":-0.14270823440230718,\"gater\":null},{\"from\":\"4\",\"to\":\"18\",\"weight\":-0.013824752028635257,\"gater\":null},{\"from\":\"4\",\"to\":\"19\",\"weight\":-0.8046762492119046,\"gater\":null},{\"from\":\"4\",\"to\":\"20\",\"weight\":0.23097073209468805,\"gater\":null},{\"from\":\"4\",\"to\":\"21\",\"weight\":1.3065013761043485,\"gater\":null},{\"from\":\"4\",\"to\":\"22\",\"weight\":0.010181011712280641,\"gater\":null},{\"from\":\"5\",\"to\":\"13\",\"weight\":0.1901687663829228,\"gater\":null},{\"from\":\"5\",\"to\":\"14\",\"weight\":0.2469076899067567,\"gater\":null},{\"from\":\"5\",\"to\":\"15\",\"weight\":-0.8433524402324984,\"gater\":null},{\"from\":\"5\",\"to\":\"16\",\"weight\":0.9041592374207938,\"gater\":null},{\"from\":\"5\",\"to\":\"17\",\"weight\":0.4722587808807872,\"gater\":null},{\"from\":\"5\",\"to\":\"18\",\"weight\":-3.915595941754139,\"gater\":null},{\"from\":\"5\",\"to\":\"19\",\"weight\":-0.13071241495156197,\"gater\":null},{\"from\":\"5\",\"to\":\"20\",\"weight\":1.106634333402818,\"gater\":null},{\"from\":\"5\",\"to\":\"21\",\"weight\":-0.3897331733098682,\"gater\":null},{\"from\":\"5\",\"to\":\"22\",\"weight\":0.25728025338341465,\"gater\":null},{\"from\":\"6\",\"to\":\"13\",\"weight\":-0.5339443340183405,\"gater\":null},{\"from\":\"6\",\"to\":\"14\",\"weight\":-148.1855447721461,\"gater\":null},{\"from\":\"6\",\"to\":\"15\",\"weight\":-0.3938355666134712,\"gater\":null},{\"from\":\"6\",\"to\":\"16\",\"weight\":-0.42923410575155274,\"gater\":null},{\"from\":\"6\",\"to\":\"17\",\"weight\":0.7164073868297254,\"gater\":null},{\"from\":\"6\",\"to\":\"18\",\"weight\":-0.13005448065302105,\"gater\":null},{\"from\":\"6\",\"to\":\"19\",\"weight\":-0.31990982071773993,\"gater\":null},{\"from\":\"6\",\"to\":\"20\",\"weight\":-0.22085659560513893,\"gater\":null},{\"from\":\"6\",\"to\":\"21\",\"weight\":3.735501142621418,\"gater\":null},{\"from\":\"6\",\"to\":\"22\",\"weight\":-0.6732877821284045,\"gater\":null},{\"from\":\"7\",\"to\":\"13\",\"weight\":0.510725872548712,\"gater\":null},{\"from\":\"7\",\"to\":\"14\",\"weight\":0.4378458014322274,\"gater\":null},{\"from\":\"7\",\"to\":\"15\",\"weight\":-10.093102489882163,\"gater\":null},{\"from\":\"7\",\"to\":\"16\",\"weight\":25012.39615719164,\"gater\":null},{\"from\":\"7\",\"to\":\"17\",\"weight\":1.2459706226133584,\"gater\":null},{\"from\":\"7\",\"to\":\"18\",\"weight\":-3.0711602173513923,\"gater\":null},{\"from\":\"7\",\"to\":\"19\",\"weight\":-0.13928084727120177,\"gater\":null},{\"from\":\"7\",\"to\":\"20\",\"weight\":0.4607628788229091,\"gater\":null},{\"from\":\"7\",\"to\":\"21\",\"weight\":0.3028921013907355,\"gater\":null},{\"from\":\"7\",\"to\":\"22\",\"weight\":0.9564079218828727,\"gater\":null},{\"from\":\"8\",\"to\":\"13\",\"weight\":-663.9978127888974,\"gater\":null},{\"from\":\"8\",\"to\":\"14\",\"weight\":-0.07752522782897683,\"gater\":null},{\"from\":\"8\",\"to\":\"15\",\"weight\":0.022858967284210774,\"gater\":null},{\"from\":\"8\",\"to\":\"16\",\"weight\":0.5019070062404709,\"gater\":null},{\"from\":\"8\",\"to\":\"17\",\"weight\":-0.27723734780797515,\"gater\":null},{\"from\":\"8\",\"to\":\"18\",\"weight\":-1.236797006615169,\"gater\":null},{\"from\":\"8\",\"to\":\"19\",\"weight\":-1.974167088887865,\"gater\":null},{\"from\":\"8\",\"to\":\"20\",\"weight\":0.24208887457347256,\"gater\":null},{\"from\":\"8\",\"to\":\"21\",\"weight\":2.5005799306044474,\"gater\":null},{\"from\":\"8\",\"to\":\"22\",\"weight\":0.5088954209276592,\"gater\":null},{\"from\":\"9\",\"to\":\"13\",\"weight\":-0.746198482380629,\"gater\":null},{\"from\":\"9\",\"to\":\"14\",\"weight\":0.3972573959816465,\"gater\":null},{\"from\":\"9\",\"to\":\"15\",\"weight\":5.2516885278517655,\"gater\":null},{\"from\":\"9\",\"to\":\"16\",\"weight\":0.3361069915910056,\"gater\":null},{\"from\":\"9\",\"to\":\"17\",\"weight\":0.015879450367734083,\"gater\":null},{\"from\":\"9\",\"to\":\"18\",\"weight\":0.4678657847394887,\"gater\":null},{\"from\":\"9\",\"to\":\"19\",\"weight\":1.3014194867297368,\"gater\":null},{\"from\":\"9\",\"to\":\"20\",\"weight\":-0.9309175447803113,\"gater\":null},{\"from\":\"9\",\"to\":\"21\",\"weight\":-7.5314697173267735,\"gater\":null},{\"from\":\"9\",\"to\":\"22\",\"weight\":-25.555828386569758,\"gater\":null},{\"from\":\"10\",\"to\":\"13\",\"weight\":0.4069411504170928,\"gater\":null},{\"from\":\"10\",\"to\":\"14\",\"weight\":-1.005714248092152,\"gater\":null},{\"from\":\"10\",\"to\":\"15\",\"weight\":0.4836095566244936,\"gater\":null},{\"from\":\"10\",\"to\":\"16\",\"weight\":-13.956012702044756,\"gater\":null},{\"from\":\"10\",\"to\":\"17\",\"weight\":1.1861454154663935,\"gater\":null},{\"from\":\"10\",\"to\":\"18\",\"weight\":0.010424934770037586,\"gater\":null},{\"from\":\"10\",\"to\":\"19\",\"weight\":0.5438886595606658,\"gater\":null},{\"from\":\"10\",\"to\":\"20\",\"weight\":-2.823062861141583,\"gater\":null},{\"from\":\"10\",\"to\":\"21\",\"weight\":-0.10098367311458978,\"gater\":null},{\"from\":\"10\",\"to\":\"22\",\"weight\":-0.8621426027198221,\"gater\":null},{\"from\":\"11\",\"to\":\"13\",\"weight\":0.06650844215005863,\"gater\":null},{\"from\":\"11\",\"to\":\"14\",\"weight\":0.33012417135206396,\"gater\":null},{\"from\":\"11\",\"to\":\"15\",\"weight\":0.7014925664713906,\"gater\":null},{\"from\":\"11\",\"to\":\"16\",\"weight\":-0.7575544207628382,\"gater\":null},{\"from\":\"11\",\"to\":\"17\",\"weight\":-0.1463144377880521,\"gater\":null},{\"from\":\"11\",\"to\":\"18\",\"weight\":0.6221963545700586,\"gater\":null},{\"from\":\"11\",\"to\":\"19\",\"weight\":0.2403308414490686,\"gater\":null},{\"from\":\"11\",\"to\":\"20\",\"weight\":-5.226600764115108,\"gater\":null},{\"from\":\"11\",\"to\":\"21\",\"weight\":1.542123025119495,\"gater\":null},{\"from\":\"11\",\"to\":\"22\",\"weight\":22.16762000827407,\"gater\":null},{\"from\":\"12\",\"to\":\"13\",\"weight\":0.2424065109087108,\"gater\":null},{\"from\":\"12\",\"to\":\"14\",\"weight\":84.17243322798913,\"gater\":null},{\"from\":\"12\",\"to\":\"15\",\"weight\":-0.043905697878534766,\"gater\":null},{\"from\":\"12\",\"to\":\"16\",\"weight\":0.36425129303821663,\"gater\":null},{\"from\":\"12\",\"to\":\"17\",\"weight\":0.6348464574859232,\"gater\":null},{\"from\":\"12\",\"to\":\"18\",\"weight\":-0.29894184051053935,\"gater\":null},{\"from\":\"12\",\"to\":\"19\",\"weight\":0.42031001912258825,\"gater\":null},{\"from\":\"12\",\"to\":\"20\",\"weight\":-0.5098353070993482,\"gater\":null},{\"from\":\"12\",\"to\":\"21\",\"weight\":0.3245536517000992,\"gater\":null},{\"from\":\"12\",\"to\":\"22\",\"weight\":0.9973621181773292,\"gater\":null},{\"from\":\"13\",\"to\":\"23\",\"weight\":-5814.803499751474,\"gater\":null},{\"from\":\"14\",\"to\":\"23\",\"weight\":0.42310661466795163,\"gater\":null},{\"from\":\"15\",\"to\":\"23\",\"weight\":-27.127753404165265,\"gater\":null},{\"from\":\"16\",\"to\":\"23\",\"weight\":836.6373720614065,\"gater\":null},{\"from\":\"17\",\"to\":\"23\",\"weight\":-0.9692813648684455,\"gater\":null},{\"from\":\"18\",\"to\":\"23\",\"weight\":-2.735045775698224,\"gater\":null},{\"from\":\"19\",\"to\":\"23\",\"weight\":-0.9356994178190121,\"gater\":null},{\"from\":\"20\",\"to\":\"23\",\"weight\":-3.2589390643189446,\"gater\":null},{\"from\":\"21\",\"to\":\"23\",\"weight\":-2.751356376500378,\"gater\":null},{\"from\":\"22\",\"to\":\"23\",\"weight\":0.5269739560263449,\"gater\":null}]}';\n\n var goodNetwork = Network.fromJSON(JSON.parse(goodNetworkString));\n goodNetwork.optimize();\n currentGeneration[id][1] = goodNetwork;\n logInfo(\"The network was imported for genome \" + (id+1));\n }", "title": "" }, { "docid": "1ba345f67a6eddb4dcd8628d6cc5d148", "score": "0.5266168", "text": "function preload() {\n data = loadJSON(\"pkmn.json\");\n\n \n //console.log(data.source);\n}", "title": "" }, { "docid": "1b83e30622080a08b1d3b326ecc9c595", "score": "0.52590317", "text": "async function loadMobileNetFeatureModel() {\n const URL = 'https://tfhub.dev/google/tfjs-model/imagenet/mobilenet_v3_small_100_224/feature_vector/5/default/1';\n mobilenet = await tf.loadGraphModel(URL, {fromTFHub: true});\n STATUS.innerText = 'MobileNet v3 loaded successfully!';\n \n // Warm up the model by passing zeros through it once.\n tf.tidy(function () {\n let answer = mobilenet.predict(tf.zeros([1, MOBILE_NET_INPUT_HEIGHT, MOBILE_NET_INPUT_WIDTH, 3]));\n console.log(answer.shape);\n });\n}", "title": "" }, { "docid": "7b18b15510dabdaae09865a01f4c26f6", "score": "0.52478474", "text": "load(statsFile = Statistics.defaultLocation) {\n if (!fs.existsSync(path.dirname(statsFile))) {\n fs.mkdirSync(path.dirname(statsFile), { recursive: true });\n }\n if (!fs.existsSync(statsFile)) {\n if (fs.existsSync(\"./data/stats.json\")) {\n fs.renameSync(\"./data/stats.json\", statsFile);\n }\n else {\n console.error(\"No existing file! Creating file\");\n this.save();\n return;\n }\n }\n let object = JSON.parse(fs.readFileSync(statsFile, \"utf-8\"));\n for (const key in this) {\n if (this.hasOwnProperty(key) && object.hasOwnProperty(key)) {\n this[key] = object[key];\n }\n }\n }", "title": "" }, { "docid": "2583d5fdf8cc0493de52718fa52a2897", "score": "0.52179784", "text": "function preload() {\n classifier = ml5.imageClassifier('model/model.json');\n}", "title": "" }, { "docid": "3604846a7a2c09d33a93f18bfb6c2d3f", "score": "0.52120835", "text": "function test() {\n folder = floor(random(10));\n let imgNr = floor(random(maxTe));\n img = mnist_data_te[folder][imgNr];\n img.loadPixels();\n image(img, 0, 0);\n console.log(folder+\":\");\n console.table(nn.feedforward(imgToData(img)));\n}", "title": "" }, { "docid": "293cd06c987d99d068a7c7a65fb3bb0f", "score": "0.5208706", "text": "function loadModelData() {\n util.log('-3- loading model data...');\n async.each(modelDataMappings.data, function(dataMap, callback) {\n var filePath = path.join('.', modelDataMappings.path, dataMap.source);\n jsonLoader(filePath, function(err, data) {\n if (err) return callback(err);\n modelDatas[dataMap.model] = data;\n util.log('-3- -- loaded data for ' + dataMap.model + '.');\n return callback(null);//, dataMap.model);\n });\n }, function(err) {\n if (err) throw err;\n util.log('-3- completed loading model data.');\n connectToDB();\n });\n}", "title": "" }, { "docid": "2c69a96591815d9a5163f8c8885858b5", "score": "0.5208558", "text": "function init() {\n d3.json(dataFile).then(function (dataSample) { \n var firstId = dataSample.metadata[0].id.toString();\n console.log(`first id : ${firstId}`);\n\n pieChart(firstId);\n demography(firstId);\n barChart(firstId);\n bubbleChart(firstId);\n guageChart(firstId);\n });\n}", "title": "" }, { "docid": "8da0df90995e16ed6a414f3901e545e5", "score": "0.51677465", "text": "async function loadModels() {\n RED.log.info(\"[Face-api.js] - Loading Models\", \"info\")\n try {\n const modelPath = `${__dirname}/weights`;\n const ssdMobilenetv1Method = faceapi.nets.ssdMobilenetv1.loadFromDisk(modelPath)\n const tinyFaceDetectorMethod = faceapi.nets.tinyFaceDetector.loadFromDisk(modelPath)\n const faceLandmark68NetMethod = faceapi.nets.faceLandmark68Net.loadFromDisk(modelPath)\n const faceLandmark68TinyNetMethod = faceapi.nets.faceLandmark68TinyNet.loadFromDisk(modelPath)\n const faceExpressionNetMethod = faceapi.nets.faceExpressionNet.loadFromDisk(modelPath)\n const ageGenderNetMethod = faceapi.nets.ageGenderNet.loadFromDisk(modelPath)\n const faceRecognitionNetMethod = faceapi.nets.faceRecognitionNet.loadFromDisk(modelPath)\n\n await ssdMobilenetv1Method\n await tinyFaceDetectorMethod\n await faceLandmark68NetMethod\n await faceLandmark68TinyNetMethod\n await faceExpressionNetMethod\n await ageGenderNetMethod\n await faceRecognitionNetMethod\n\n faceApiModelsLoaded = true\n RED.log.info(\"[Face-api.js] - Models Loaded\")\n }\n catch (error) {\n RED.log.warn(\"[Face-api.js] - Models failed to load: \\n\" + error)\n }\n }", "title": "" }, { "docid": "0704ccb114fe559a3ba16ee3aca3c7f2", "score": "0.51606345", "text": "function runOffline() {\n let fileInput = document.getElementById(\"js-cfg-file\");\n $(\"#js-bininfo\").click(function () { fileInput.click(); });\n fileInput.addEventListener(\"change\", function () {\n let file = fileInput.files[0];\n let reader = new FileReader();\n reader.onload = function () {\n let json = JSON.parse(reader.result);\n // let g = new FlowGraph(document, 1, dims, json, false);\n // g.drawGraph();\n // tab.setGraph(g);\n };\n try { reader.readAsText(file); }\n catch (_) { console.log(\"Error: File open failure.\"); }\n });\n}", "title": "" }, { "docid": "af6ddf8107a53040d5eafc300ee00c0d", "score": "0.51535636", "text": "function openMNIST() {\n const tkI = fs.readFileSync('MNIST/t10k-images.idx3-ubyte');\n const tkL = fs.readFileSync('MNIST/t10k-labels.idx1-ubyte');\n const trainI = fs.readFileSync('MNIST/train-images.idx3-ubyte');\n const trainL = fs.readFileSync('MNIST/train-labels.idx1-ubyte');\n\n const testLabels = [...tkL].slice(8);\n const testImages = [...tkI].slice(16);\n const trainLabels = [...trainL].slice(8);\n const trainImages = [...trainI].slice(16);\n\n const trainInput = tf.tensor2d(trainImages, [60000, 784]).reshape([60000, 28, 28, 1]);\n const trainOutput = tf.oneHot(trainLabels, 10);\n const testInput = tf.tensor2d(testImages, [10000, 784]).reshape([10000, 28, 28, 1]);\n const testOutput = tf.oneHot(testLabels, 10);\n\n return { train: { input: trainInput, output: trainOutput }, test: { input: testInput, output: testOutput } };\n}", "title": "" }, { "docid": "cd91624b3c040edd010c3f584a8a085a", "score": "0.5146513", "text": "function loadData() {\n try {\n const dataJson = fs.readFileSync(dataFileName, {encoding: \"utf8\"});\n const fsStorageAsArray = JSON.parse(dataJson);\n fromSaveFormat(fsStorageAsArray);\n } catch (err) {\n // fill some initial data\n fsStorage = [\n {\n id: 0, name: \"root\", children: [\n { id: 1, name: \"sub1\", children: [\n { id: 4, name: \"file.txt\"},\n { id: 5, name: \"sub3\", children: [\n {id: 6, name: \"file2.txt\", content: \"content2\"}\n ]}\n ]},\n { id: 2, name: \"sub2\", children: []},\n { id: 3, name: \"file1.txt\", content: \"text\"}\n ]\n }\n ]\n }\n}", "title": "" }, { "docid": "9b2fe777dc03249c7c2c936450feef05", "score": "0.5146241", "text": "function init() {\n //Call data\n d3.json(\"samples.json\").then((importedData) => {\n // console.log(importedData);\n var data = importedData;\n //extract the first sample name\n var sampleName = data.names[0];\n //console.log(sampleName);\n\n //Lets call the function to build the bar graph\n barChart(sampleName);\n\n //Lets call the function to build the bubble chart\n bubbleChart(sampleName);\n\n //Lets call the info chart function\n infoChart(sampleName);\n\n //Lets call the gauge chart function\n gaugeChart(sampleName)\n \n \n });\n }", "title": "" }, { "docid": "4f8d022597897fb72396659d0aa36b24", "score": "0.5141107", "text": "async function loadModels() {\n\ttry {\n\t\tconst modelPath = `${__dirname}/weights`;\n\t\tconst ssdMobilenetv1Method = faceapi.nets.ssdMobilenetv1.loadFromDisk(modelPath);\n\t\tconst tinyFaceDetectorMethod = faceapi.nets.tinyFaceDetector.loadFromDisk(modelPath);\n\t\tconst faceLandmark68NetMethod = faceapi.nets.faceLandmark68Net.loadFromDisk(modelPath);\n\t\tconst faceLandmark68TinyNetMethod = faceapi.nets.faceLandmark68TinyNet.loadFromDisk(modelPath);\n\t\tconst faceExpressionNetMethod = faceapi.nets.faceExpressionNet.loadFromDisk(modelPath);\n\t\tconst ageGenderNetMethod = faceapi.nets.ageGenderNet.loadFromDisk(modelPath);\n\t\tconst faceRecognitionNetMethod = faceapi.nets.faceRecognitionNet.loadFromDisk(modelPath);\n\n\t\tawait ssdMobilenetv1Method;\n\t\tawait tinyFaceDetectorMethod;\n\t\tawait faceLandmark68NetMethod;\n\t\tawait faceLandmark68TinyNetMethod;\n\t\tawait faceExpressionNetMethod;\n\t\tawait ageGenderNetMethod;\n\t\tawait faceRecognitionNetMethod;\n\n\t\tmodelsLoaded = true;\n\n\t\tconst infoMsg = \"Loaded models\";\n\t\tprocess.send( {\"info\" : infoMsg} );\n\t}\n\tcatch (error) {\n\t\tconst errorMsg = \"Failed to load models\";\n\t\tprocess.send( {\"warn\" : errorMsg} );\n\t\tmodelsLoaded = false;\n\t}\n}", "title": "" }, { "docid": "17b3ca4e2b05290aa188ceefc353a421", "score": "0.5133344", "text": "async loadModels(){\n const modelURL = path.join(__dirname, '../', './models');\n await faceapi.nets.tinyFaceDetector.loadFromDisk(modelURL);\n await faceapi.nets.faceLandmark68TinyNet.loadFromDisk(modelURL);\n await faceapi.nets.faceRecognitionNet.loadFromDisk(modelURL);\n }", "title": "" }, { "docid": "cddd75aef9700aefd5f844cbf86cc232", "score": "0.512866", "text": "async function loadData() {\n proj = d3.geoAlbers()\n .scale(900)\n .translate([350,600]);\n // Use our projection to build a path generator\n path = d3.geoPath(proj);\n\n g = d3.select('svg')\n .append('g');\n\n const data = await d3.json('canada.json');\n canada = data;\n const data1 = await d3.json('cities.json');\n all_cities = data1;\n const data2 = await d3.csv('canada.csv');\n city_size = data2;\n cities = data1.features.filter(function(d){\n names = data2.map(function(x){return x.City;});\n return names.includes(d.properties.name);\n });\n}", "title": "" }, { "docid": "380f9b26f81adb0fb21b99080ec4ae3e", "score": "0.51286143", "text": "async function loadExtractor() {\n\t// load mobilenet from Google\n\tconst mobilenet = await tf.loadModel(\"https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v1_0.25_224/model.json\");\n\n\t// return the mobilenet model with \n\t// internal activations from \"conv_pw_13_relu\" layer\n\tconst feature_layer = mobilenet.getLayer(\"conv_pw_13_relu\");\n\n\t// return mobilenet model with feature activations from specific layer\n\textractor = tf.model({\n\t\tinputs: mobilenet.inputs,\n\t\toutputs: feature_layer.output\n\t});\n}", "title": "" }, { "docid": "5a9e1486b43f82142712a3df9b0458be", "score": "0.51262", "text": "function loadModel () {\n loaded3dModel = loadWFObj(gl, modelJSON, {\n textureImage: image\n })\n}", "title": "" }, { "docid": "9f3c228227e103c1ff03d7aad7b36522", "score": "0.51205784", "text": "function loadData() {\n dataLoaded = true;\n var data = fs.readFileSync(\"countries.json\");\n db = JSON.parse(data);\n}", "title": "" }, { "docid": "ceee00d06c0b04b3b2faee658e55c364", "score": "0.51034", "text": "function trainModel(data) {\n // todo : splits data in traindata en testdata\n\n\n // maak het algoritme aan\n let decisionTree = new DecisionTree({\n ignoredAttributes: ignored,\n trainingSet: data,\n categoryAttr: trainingLabel\n })\n\n // Teken de boomstructuur - DOM element, breedte, hoogte, decision tree\n let visual = new VegaTree('#view', 800, 400, decisionTree.toJSON())\n\n\n // todo : maak een prediction met een sample uit de testdata\n\n\n // todo : bereken de accuracy met behulp van alle test data\n\n\n\n}", "title": "" }, { "docid": "0825838baa26a6f5dbeac5585cb5d4f6", "score": "0.50927174", "text": "async init() {\n this.network = await posenet.load({\n architecture: this.architecture,\n outputStride: this.outputStride,\n inputResolution: this.inputResolution,\n multiplier: this.multiplier,\n });\n this.updateKeypoints();\n }", "title": "" }, { "docid": "ea4cd835b96bdbf8c11148693d440944", "score": "0.50848216", "text": "function loadJSON()\n{\n 'use strict';\n const fs = require('fs');\n let rawdata = fs.readFileSync('data.json'); //change the .json file name if necessary\n let values = JSON.parse(rawdata);\n return values;\n}", "title": "" }, { "docid": "2d2c782239e7c9b60610e308b082eb15", "score": "0.5084403", "text": "async loadUrl(url) {\n console.log(`Loading ${url}`);\n this.errors = [];\n try {\n if (!(url instanceof URL) && typeof url != \"string\") {\n throw new Error(\"url must be a URL object or a string\");\n }\n let url_ = typeof url === \"string\" ? new URL(url) : url;\n \n let file = await fetchFile(url_);\n \n if (file.contentType == \"application/xml\" || file.contentType == \"application/xml+smil\") {\n this.model = parse(file.textData);\n }\n else {\n throw new Error(`Unsupported input file ${file.contentType}`);\n }\n process(this.model, url_);\n\n this.assets = this.model.assets;\n\n // collect the roles\n let rolesList = [];\n visit(this.model.body, node => rolesList = rolesList.concat(node?.roles ?? []));\n this.roles = Array.from(new Set(rolesList));\n this.graph = buildTimegraph(this.model.body);\n\n this.graph.reverse();\n // find the last timegraph node with a \"start\" event, which is not going to be the last node in the array\n let idx = this.graph.findIndex(entry => entry.events.find(event => event.eventType == \"start\"));\n // reverse the index\n this.indexOfLastStartEvent = this.graph.length - 1 - idx;\n this.graph.reverse();\n\n // just for debugging purposes, draw the timegraph with only media nodes (not time containers)\n let mediaGraph = this.graph.map(entry => {\n let events = entry.events.filter(event => isMedia(event.node.type));\n return {... entry, events};\n });\n console.log(mediaGraph);\n \n }\n catch(err) {\n console.log(\"ERROR\", err);\n this.errors.push(err);\n }\n }", "title": "" }, { "docid": "de6b11c7b52eed7efe3cf80aa56565c8", "score": "0.5080856", "text": "function modelReady() {\n console.log(\"Model is ready!!!\");\n classifier.load(\"model.json\", customModelReady);\n}", "title": "" }, { "docid": "9f65ef020954bde0fc7e6ee9ecfcd22f", "score": "0.50743365", "text": "function preload() {\n classifier = ml5.imageClassifier(modelURL1 + 'model.json');\n}", "title": "" }, { "docid": "d65f3b1fb88fe0a5176c8840621ac965", "score": "0.50660115", "text": "function CreateModel(){\n SaveModel();\n let inputData = getInput(app.dataSelected);\n activeModel = new ModelClass(app.epochSelected,inputData[0],inputData[1]);\n let layers = [];\n layers.push(tf.layers.conv2d({filters:8, kernelSize:5,padding:'same',activation:'relu',inputShape:[64,64,3]}));\n\tlayers.push(tf.layers.maxPooling2d({poolSize:2}));\n\tlayers.push(tf.layers.conv2d({filters:16, kernelSize:3,padding:'same',activation:'relu'}));\n\tlayers.push(tf.layers.maxPooling2d({poolSize:2}));\n\tlayers.push(tf.layers.flatten());\n\tlayers.push(tf.layers.dense({units:64, activation:'relu'}));\n layers.push(tf.layers.dense({units:Object.keys(dataDict).length, activation:'softmax'}));\n let loss = \"sparseCategoricalCrossentropy\";\n let optimizer = \"adam\";\n let metrics = [\"accuracy\"];\n activeModel.BuildModel(layers,loss,optimizer,metrics);\n TrainModel();\n}", "title": "" }, { "docid": "3c6b68269adb824709535702b4236723", "score": "0.5064464", "text": "async function loadData() {\n const data = { \n 'population': await d3.csv('data/population.csv'),\n 'gdp': await d3.csv('data/gdp.csv'),\n 'child-mortality': await d3.csv('data/cmu5.csv'),\n 'life-expectancy': await d3.csv('data/life_expectancy.csv'),\n 'fertility-rate': await d3.csv('data/fertility-rate.csv')\n };\n \n return data.population.map(d=>{\n const index = data.gdp.findIndex(item => item.geo == d.geo);\n return {\n country: d.country,\n geo: d.geo,\n region: d.region,\n population: d,\n 'gdp': data['gdp'][index],\n 'child-mortality': data['child-mortality'][index],\n 'life-expectancy': data['life-expectancy'][index],\n 'fertility-rate': data['fertility-rate'][index]\n }\n })\n}", "title": "" }, { "docid": "cb43e764011df461ecbbeca4e14503ab", "score": "0.50604105", "text": "function loadMNIST(callback) {\r\n loadFile(data_directory + 'train-images.idx3-ubyte')\r\n .then(data => {\r\n trainData = data.slice(16);\r\n return loadFile(data_directory + 'train-labels.idx1-ubyte');\r\n })\r\n .then(data => {\r\n trainLabels = data.slice(8);\r\n return loadFile(data_directory + 't10k-images.idx3-ubyte');\r\n })\r\n .then(data => {\r\n testData = data.slice(16);\r\n return loadFile(data_directory + 't10k-labels.idx1-ubyte');\r\n })\r\n .then(data => {\r\n testLabels = data.slice(8);\r\n callback();\r\n // make the sets from the train and test data and labels\r\n trainSet = makeSet(trainData, trainLabels);\r\n testSet = makeSet(testData, testLabels);\r\n // and... we don't really need these anymore, i guess. shall clean some memory\r\n trainData = undefined;\r\n testData = undefined;\r\n trainLabels = undefined;\r\n testLabels = undefined;\r\n });\r\n}", "title": "" }, { "docid": "ef237842ea3fe672e2d4f84c2dc3b0d8", "score": "0.5059176", "text": "async function predict() {\r\n // Relative URL provided for my-model.json.\r\n const model = await tf.loadLayersModel('my-model.json');\r\n // Once model is loaded, let's try using it to make a prediction!\r\n // Print to developer console for now.\r\n model.predict(tf.tensor2d([[1337]])).print();\r\n}", "title": "" }, { "docid": "8c3518ed09abf1fd2616cb9a72f7fc03", "score": "0.5058612", "text": "function use_nueral_net_before_storing(networky,array_to_predict_20) {\n\t var prediction; \nprediction = networky.activate(array_to_predict_20)\n//console.log( prediction);\nreturn prediction;\n}", "title": "" }, { "docid": "505e639a4e1c852949a35c2f9ac4c308", "score": "0.5054457", "text": "function testNetwork(dataArray){\n let real = tf.tensor1d(dataArray);\n const dreal = real.reshape([1].concat(DATASHAPE));\n\n dreal.data().then( x => console.log(\"Tensor input:\", x.length, x.slice(0, 20)));\n model.predict(dreal).data().then( x => console.log(\"Model output:\", x.length, x.slice(0, 20)));\n}", "title": "" }, { "docid": "b1d40726697b9e01c3148dd920b93a28", "score": "0.5052315", "text": "async function modelLoading(video) {\n // Loading the model\n const net = await bodyPix.load({\n architecture: 'MobileNetV1',\n outputStride: 16,\n multiplier: 0.75,\n quantBytes: 2\n });\n\n // Segmentation settings\n const segmentationConfig = {\n flipHorizontal: false,\n internalResolution: 'medium',\n segmentationThreshold: 0.7\n };\n \n // Making predictions\n make_predictions.makePredictions(net, segmentationConfig, video);\n}", "title": "" }, { "docid": "e638097cd780b9421258636f8f099659", "score": "0.5046294", "text": "function preload() {\n classifier = ml5.imageClassifier(modelURL + \"model.json\");\n}", "title": "" }, { "docid": "2099aa25a2553438efc7e0a2f3a6d2a5", "score": "0.5042093", "text": "function importJSON(ourJSON) {\n highestNodeID = 0;\n highestEdgeID = 0;\n\n if (ourJSON.sites == undefined || ourJSON.rivers == undefined) {\n return;\n }\n\n const scale = findScaleFactor(ourJSON) * (Math.log(ourJSON.sites.length) / 1.5 );\n //console.log(\"Scale factor: \" + scale);\n const elements = [];\n\n // Firstly, mark all \"mine\" nodes as mines within their data\n if (\"mines\" in ourJSON && ourJSON.mines != null) {\n for (let i = 0; i < ourJSON.mines.length; i++) {\n const mineID = ourJSON.mines[i];\n //console.log(\"Adding \" + mineID + \" to mineSet\");\n mineSet.add(mineID.toString());\n }\n }\n\n // Add all nodes\n for (let i = 0; i < ourJSON.sites.length; i++) {\n const curNode = ourJSON.sites[i];\n if (curNode.id > highestNodeID) {\n highestNodeID = curNode.id;\n }\n\n const entry = {group: \"nodes\"};\n\n if (!mineSet.has(curNode.id.toString())) {\n entry[\"classes\"] = \"plain\";\n }\n\n entry[\"data\"] = {\n \"id\": curNode.id.toString(),\n \"x\": curNode.x * scale,\n \"y\" : curNode.y * scale,\n \"selected\": false,\n };\n\n const position = { \"x\": curNode.x * scale, \"y\": curNode.y * scale};\n entry[\"position\"] = position;\n elements.push(entry);\n }\n\n for (let i = 0; i < ourJSON.rivers.length; i++) {\n const id = getFreshEdgeID();\n const curEdge = ourJSON.rivers[i];\n const entry = {group: \"edges\"};\n const data = { \"id\": id, \"source\": curEdge[\"source\"].toString(), \"target\": curEdge[\"target\"].toString()};\n entry[\"data\"] = data;\n entry[\"selected\"] = false;\n entry[\"classes\"] = \"top-center\";\n elements.push(entry);\n }\n return elements;\n}", "title": "" }, { "docid": "5a3131fdbc6ac4f3a8602a7861fe3e6a", "score": "0.5032768", "text": "async function load() {\n model = await tmImage.load(checkpointURL, metadataURL);\n totalClasses = model.getTotalClasses();\n console.log(\"Number of classes, \", totalClasses);\n}", "title": "" }, { "docid": "46fb58f846036d3b989a338848f53db6", "score": "0.5024857", "text": "loadFromJson(data) {\n // TODO: Load this object from the data\n\n }", "title": "" }, { "docid": "54e710b64afda938c7ce2f57814189b1", "score": "0.5023018", "text": "function preload() {\n classifier = ml5.imageClassifier(modelURL + 'model.json');\n}", "title": "" }, { "docid": "54e710b64afda938c7ce2f57814189b1", "score": "0.5023018", "text": "function preload() {\n classifier = ml5.imageClassifier(modelURL + 'model.json');\n}", "title": "" }, { "docid": "54e710b64afda938c7ce2f57814189b1", "score": "0.5023018", "text": "function preload() {\n classifier = ml5.imageClassifier(modelURL + 'model.json');\n}", "title": "" }, { "docid": "c63e84ae7d101def9b47cddcd6686424", "score": "0.5012251", "text": "function draw(jsonObj) {\n // console.log(jsonObj);\n // create people.\n // value corresponds with the age of the person\n var DIR = '/static/img/';\n\n var nodeArr = [];\n\n var nodes = jsonObj['result'];\n\n for (i = 0; i < nodes.length; i++) {\n node = nodes[i];\n // nodeArr.push({id:i+1, shape: 'circularImage', image: DIR + 'bluehouse.jpg', label:nodeName } );\n nodeArr.push({\n id: i + 1,\n label: decodeURIComponent(node.title)\n });\n }\n\n /*\n nodes = [{id: 1, shape: 'circularImage', image: DIR + 'bluehouse.jpg', label:\"û�ʹ�\"},{id: 2, shape: 'circularImage', image: DIR + 'sunsiri.jpg', label:\"�ּ���\"},{id: 3, shape: 'circularImage', image: DIR + 'geunhye.jpg', brokenImage: DIR + 'missingBrokenImage.png', label:\"�ڱ���\"},\n ];\n */\n // create connections between people\n // value corresponds with the amount of contact between two people\n edges = [{\n from: 2,\n to: 1\n }, {\n from: 2,\n to: 3\n }\n ];\n\n // create a network\n container = document.getElementById('container');\n var data = {\n nodes: nodeArr,\n edges: edges\n };\n var options = {\n height: '90%',\n width: '90%',\n nodes: {\n borderWidth: 4,\n size: 30,\n color: {\n border: '#222222',\n background: '#666666'\n },\n font: {\n color: '#eeeeee'\n }\n },\n edges: {\n color: 'lightgray'\n }\n };\n network = new vis.Network(container, data, options);\n console.log(network);\n}", "title": "" }, { "docid": "3383602d9d8339cbe4c5c97ee13df2a9", "score": "0.50038666", "text": "function loadData(filepath) {\n return JSON.parse(fs.readFileSync(filepath, 'utf8'));\n }", "title": "" }, { "docid": "8f571020847f383a2e23f5a020c3d06d", "score": "0.499938", "text": "function loadData() {\n\tif( loaded)\n\t\treturn;\n\tvar basefile\n\tif( fs.existsSync('entities.data')) {\n\t\tlet str = fs.readFileSync('entities.data','utf8')\n\t\tentityIds = JSON.parse(str)\n\t} \n\tfs.readdirSync('images').forEach(file => {\n\t\tif( file.endsWith('.jpg')) {\n\t\t\tvar img = fs.readFileSync('images/' + file)\n\t\t\timages.push( img)\n\t\t}\n\t});\n}", "title": "" }, { "docid": "8e0d7f94deea79abff5a9bbcb0732038", "score": "0.4995991", "text": "async loadData(dataset = []) {\n\n\n dataset = this.initLabels(dataset);\n\n tf.util.shuffle(dataset);\n\n this.trainSize = parseInt(0.8 * dataset.length);\n\n dataset = tf.data.array(dataset);\n let trainData = await (dataset.take(this.trainSize)).toArray();\n let testData = await (dataset.skip(this.trainSize)).toArray();\n\n this.testSize = testData.length;\n\n this.dataset = [trainData, testData];\n }", "title": "" }, { "docid": "eebc6ea77315196547f6195082367ff2", "score": "0.49954817", "text": "function importGraph() {\r\n\r\n // Clear current graph\r\n clearGraph();\r\n\r\n var file = $(\"#import-data\")[0].files[0];\r\n\r\n // Use FileReader to read contents of file (https://developer.mozilla.org/en-US/docs/Web/API/FileReader)\r\n var reader = new FileReader();\r\n\r\n reader.onload = (function () {\r\n return function (e) {\r\n\r\n // If uploaded file is a .txt file\r\n if (file.type == \"text/plain\") {\r\n\r\n // Parse data from file to get nodes and links\r\n var graphData = e.target.result.trim().split(/\\s+/); // Remove spaces around and split data into lines\r\n\r\n // Get nodes from data\r\n var graphNodes = [];\r\n\r\n for (var l of graphData) {\r\n\r\n // If line starts with \"{\", data represents link\r\n if (l[0] == \"{\") {\r\n var left = \"\";\r\n var right = \"\";\r\n var i = 1;\r\n\r\n // Get left node ID\r\n while (l[i] != \",\") {\r\n if (i > l.length - 4 || isNaN(l[i])) {\r\n $(\"#file-error\").show();\r\n return;\r\n }\r\n left += l[i++];\r\n }\r\n i++;\r\n\r\n // Get right node ID\r\n while (l[i] != \"}\") {\r\n if (i == l.length - 1 || isNaN(l[i])) {\r\n $(\"#file-error\").show();\r\n return;\r\n }\r\n right += l[i++];\r\n }\r\n\r\n graphNodes.push(left);\r\n graphNodes.push(right);\r\n }\r\n\r\n else if (isNaN(l[0])) {\r\n $(\"#file-error\").show();\r\n return;\r\n }\r\n\r\n }\r\n\r\n // Ensure no duplicates in IDs\r\n nodeIDs = graphNodes.filter(function (n, index) {\r\n return graphNodes.indexOf(n) == index;\r\n }).map(function (n) {\r\n return Number(n);\r\n });\r\n\r\n nodeIDs.sort((a, b) => a - b);\r\n\r\n nodeIDs.forEach(function (n) {\r\n if (selectedAlgorithm == 1)\r\n nodes.push({ id: Number(n), degree: 0 });\r\n else if (selectedAlgorithm == 2)\r\n nodes.push({ id: Number(n), degree: 0, capacity: 1 });\r\n else if (selectedAlgorithm == 3)\r\n nodes.push({ id: Number(n), degree: 0 });\r\n });\r\n\r\n // Set capacities or coordinates\r\n for (var l of graphData) {\r\n\r\n // If line does not start with \"{\", data represents capacity\r\n if (!isNaN(l[0])) {\r\n var id = \"\";\r\n var capacity = \"\";\r\n var x = \"\";\r\n var y = \"\";\r\n var i = 0;\r\n\r\n // Get node ID\r\n while (l[i] != \":\") {\r\n if (i > l.length - 3 || isNaN(l[i])) {\r\n $(\"#file-error\").show();\r\n clearGraph();\r\n return;\r\n }\r\n id += l[i++];\r\n }\r\n i++;\r\n\r\n // Get corresponding capacity for bipartite graph matching\r\n if (selectedAlgorithm == 1 || selectedAlgorithm == 2) {\r\n while (i != l.length) {\r\n if (isNaN(l[i])) {\r\n $(\"#file-error\").show();\r\n clearGraph();\r\n return;\r\n }\r\n capacity += l[i++];\r\n }\r\n }\r\n\r\n // Get corresponding coordinates for general graph matching\r\n else if (selectedAlgorithm == 3) {\r\n\r\n // If line continues with \"(\", data represents coordinates\r\n if (l[i] == \"(\") {\r\n i++;\r\n\r\n // Get x coordinate\r\n while (l[i] != \",\") {\r\n if (i > l.length - 4) {\r\n $(\"#file-error\").show();\r\n clearGraph();\r\n return;\r\n }\r\n x += l[i++];\r\n }\r\n i++;\r\n\r\n // Get y coordinate\r\n while (l[i] != \")\") {\r\n if (i == l.length - 1) {\r\n $(\"#file-error\").show();\r\n clearGraph();\r\n return;\r\n }\r\n y += l[i++];\r\n }\r\n }\r\n\r\n // Check for validity of data\r\n if (isNaN(x) || isNaN(y) || Number(x) < 0 || Number(y) < 0 || Number(x) > 100 || Number(y) > 100) {\r\n $(\"#file-error\").show();\r\n clearGraph();\r\n return;\r\n }\r\n }\r\n\r\n if (selectedAlgorithm == 2 || selectedAlgorithm == 3) {\r\n var node = nodes.filter(function (n) {\r\n return n.id == Number(id);\r\n })[0];\r\n\r\n // Set capacity or coordinates\r\n if (selectedAlgorithm == 2 && typeof node != \"undefined\")\r\n node.capacity = Number(capacity);\r\n else if (selectedAlgorithm == 3 && typeof node != \"undefined\") {\r\n node.rx = Number(x);\r\n node.ry = Number(y);\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // Create edges based on data provided in file\r\n for (var i = 0; i < graphNodes.length; i += 2) {\r\n var source = nodes.filter(function (n) {\r\n return n.id == graphNodes[i];\r\n })[0];\r\n\r\n source.degree++;\r\n\r\n var target = nodes.filter(function (n) {\r\n return n.id == graphNodes[i + 1];\r\n })[0];\r\n\r\n target.degree++;\r\n\r\n // Only add edge if it does not already exist\r\n if (!links.some(function (l) { return l.source == source && l.target == target; }))\r\n links.push({ source: source, target: target });\r\n }\r\n\r\n }\r\n\r\n // If uploaded file is a .json file\r\n else if (file.type == \"application/json\") {\r\n\r\n // Parse data from file to get nodes and links\r\n try {\r\n var jsonData = JSON.parse(e.target.result);\r\n }\r\n catch (e) {\r\n $(\"#file-error\").show();\r\n return;\r\n }\r\n\r\n // Check for validity of data\r\n if (Object.keys(jsonData).length == 0 || Object.keys(jsonData).length > 2 || Object.keys(jsonData).length == 1 && typeof jsonData.links == \"undefined\" || Object.keys(jsonData).length == 2 && (typeof jsonData.links == \"undefined\" || typeof jsonData.nodes == \"undefined\")) {\r\n $(\"#file-error\").show();\r\n return;\r\n }\r\n\r\n var graphData = [];\r\n\r\n for (var l of jsonData.links) {\r\n if (Object.keys(l).length != 2 || typeof l.source == \"undefined\" || typeof l.target == \"undefined\" || !Number.isInteger(l.source) || !Number.isInteger(l.target) || l.source < 0 || l.target < 0) {\r\n $(\"#file-error\").show();\r\n return;\r\n }\r\n graphData.push(l.source);\r\n graphData.push(l.target);\r\n }\r\n\r\n // Get nodes from data\r\n nodeIDs = graphData.filter(function (n, index) {\r\n return graphData.indexOf(n) == index;\r\n }).map(function (n) {\r\n return Number(n);\r\n });\r\n\r\n nodeIDs.sort((a, b) => a - b);\r\n\r\n nodeIDs.forEach(function (n) {\r\n if (selectedAlgorithm == 1)\r\n nodes.push({ id: Number(n), degree: 0 });\r\n else if (selectedAlgorithm == 2)\r\n nodes.push({ id: Number(n), degree: 0, capacity: 1 });\r\n else if (selectedAlgorithm == 3)\r\n nodes.push({ id: Number(n), degree: 0 });\r\n });\r\n\r\n // Set capacities or coordinates\r\n if (typeof jsonData.nodes != \"undefined\") {\r\n for (var n of jsonData.nodes) {\r\n if (typeof n.id == \"undefined\" || !Number.isInteger(n.id) || n.id < 0 || (selectedAlgorithm == 1 || selectedAlgorithm == 2) && (Object.keys(n).length != 2 || typeof n.capacity == \"undefined\" || !Number.isInteger(n.capacity) || n.capacity < 1) || selectedAlgorithm == 3 && (Object.keys(n).length != 3 || typeof n.x == \"undefined\" || typeof n.y == \"undefined\" || isNaN(n.x) || isNaN(n.y) || n.x < 0 || n.y < 0 || n.x > 100 || n.y > 100)) {\r\n $(\"#file-error\").show();\r\n clearGraph();\r\n return;\r\n }\r\n\r\n if (selectedAlgorithm == 2 || selectedAlgorithm == 3) {\r\n var node = nodes.filter(function (x) {\r\n return n.id == x.id;\r\n })[0];\r\n\r\n if (selectedAlgorithm == 2 && typeof node != \"undefined\")\r\n node.capacity = n.capacity;\r\n else if (selectedAlgorithm == 3 && typeof node != \"undefined\") {\r\n node.rx = n.x;\r\n node.ry = n.y;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Create edges based on data provided in file\r\n jsonData.links.forEach(function (l) {\r\n var source = nodes.filter(function (n) {\r\n return l.source == n.id;\r\n })[0];\r\n\r\n source.degree++;\r\n\r\n var target = nodes.filter(function (n) {\r\n return l.target == n.id;\r\n })[0];\r\n\r\n target.degree++;\r\n\r\n // Only add edge if it does not already exist\r\n if (!links.some(function (x) { return x.source == source && x.target == target; }))\r\n links.push({ source: source, target: target });\r\n });\r\n\r\n }\r\n\r\n // Initially place all nodes at center of graph\r\n nodes.forEach(function (n) {\r\n n.x = 0.5 * graphWidth;\r\n n.px = n.x;\r\n n.y = 0.525 * graphHeight;\r\n n.py = n.y;\r\n });\r\n\r\n // Update graph\r\n updateCoordinates = false;\r\n restart();\r\n\r\n var unassigned = []; // Array of nodes that are not linked to any other node\r\n\r\n // If degree of node is 0, push to 'unassigned' array\r\n nodes.forEach(function (n) {\r\n if (n.degree == 0)\r\n unassigned.push(n);\r\n });\r\n\r\n // Remove unassigned nodes\r\n unassigned.forEach(function (n) {\r\n nodes.splice(nodes.indexOf(n), 1);\r\n });\r\n\r\n if (selectedAlgorithm == 1 || selectedAlgorithm == 2)\r\n checkBipartite();\r\n\r\n else if (selectedAlgorithm == 3) {\r\n\r\n // Place nodes with unassigned coordinates in a circular layout for general graph matching\r\n nodes.forEach(function (n, i) {\r\n if (typeof n.rx == \"undefined\" || typeof n.ry == \"undefined\") {\r\n n.rx = 50 + 40 * Math.sin(2 * i * Math.PI / nodes.length);\r\n n.ry = 50 + 40 * Math.cos(2 * i * Math.PI / nodes.length + Math.PI);\r\n }\r\n });\r\n\r\n }\r\n\r\n positionNodes();\r\n updateCoordinates = true;\r\n\r\n // Reset import modal\r\n M.Modal.getInstance($(\"#import-modal\")).close();\r\n $(\"#file-error\").hide();\r\n $(\"#import-text\").val(\"\");\r\n $(\"#import-text\").removeClass(\"valid\");\r\n $(\"#import-data\").val(\"\");\r\n $(\"#import-btn\").addClass(\"disabled\");\r\n }\r\n })(file);\r\n\r\n reader.readAsText(file);\r\n \r\n}", "title": "" }, { "docid": "53111694cba080e7d4235d6cc4718e74", "score": "0.49940467", "text": "async function run(epochs, batchSize, savePath) {\n const datasetObj = await createDataset(\"file://\" + csvPath);\n const model = createModel([datasetObj.numOfColumns]);\n // El conjunto de datos tiene 4177 filas. Se divide en 2 grupos, uno para entrenamiento y otro para validacion\n // Tome alrededor de 3500 filas como conjunto de datos de entrenamiento y el resto como validacion del dataset\n const trainBatches = Math.floor(3500 / batchSize);\n const dataset = datasetObj.dataset.shuffle(1000).batch(batchSize);\n const trainDataset = dataset.take(trainBatches);\n const validationDataset = dataset.skip(trainBatches);\n\n await model.fitDataset(trainDataset, {\n epochs: epochs,\n validationData: validationDataset,\n });\n\n await model.save(savePath);\n\n const loadedModel = await tf.loadLayersModel(savePath + \"/model.json\");\n const result = loadedModel.predict(\n tf.tensor2d([[0, 0.625, 0.495, 0.165, 1.262, 0.507, 0.318, 0.39]])\n );\n\n console.log(\n `La edad real del abalon de prueba es 10, el resultado de inferencia del modelo es: \n ${result.dataSync()}`\n );\n}", "title": "" }, { "docid": "cc7eea5f42447e5cfcb3dbc09135d1f1", "score": "0.499157", "text": "async function getPretrainedNeuralNetwork() {\n\tlet mobilenet;\n\ttry {\n\t\tconsole.log('Loading MobileNet from local storage...');\n\n\t\t//To avoid downloading MobileNet again, we check if we have already stored it locally\n\t\tmobilenet = await tf.loadLayersModel(MOBILE_NET_LOCAL_ADDRESS);\n\n\t\tconsole.log('MobileNet loaded from local storage');\n\t} catch (error) {\n\t\tconsole.log('MobileNet not found in local storage, downloading it...');\n\n\t\t//We download MobileNet and load it into memory\n\t\tmobilenet = await tf.loadLayersModel(MOBILE_NET_REMOTE_ADDRESS);\n\n\t\tconsole.log('MobileNet loaded from remote, saving it');\n\n\t\t//To avoid downloading MobileNet again when reloading the page, we save it locally\n\t\tawait mobilenet.save(MOBILE_NET_LOCAL_ADDRESS);\n\t}\n\treturn mobilenet;\n}", "title": "" }, { "docid": "57bea0fea50bb9b90d591aae9032898c", "score": "0.4988344", "text": "async function train(model, data) {\n const metrics = ['loss', 'val_loss', 'acc', 'val_acc'];\n\n //Visualizing these training metrics\n\n // const container = {\n // name: 'Model Training', styles: { height: '1000px' }\n // };\n\n // Set my own container\n let container = d3.select(\"#training-view\");\n //Inserts the tfvis metric graphs into model-view div\n const fitCallbacks = tfvis.show.fitCallbacks(container.node(), metrics);\n //const fitCallbacks = onEpochEnd(epoch, showLayer(model));\n \n //Allow user to define these\n const BATCH_SIZE = parseInt(d3.select(\"#batch\").node().value);\n console.log(\"batch\",BATCH_SIZE)\n \n const TRAIN_DATA_SIZE = parseInt(d3.select(\"#training-num\").node().value);\n console.log(\"training size\",TRAIN_DATA_SIZE)\n const TEST_DATA_SIZE = parseInt(d3.select(\"#test-num\").node().value);\n console.log(\"testing size\",TEST_DATA_SIZE)\n \n //Sets up training tensors\n const [trainXs, trainYs] = tf.tidy(() => {\n const d = data.nextTrainBatch(TRAIN_DATA_SIZE);\n return [\n d.xs.reshape([TRAIN_DATA_SIZE, 28, 28, 1]),\n //d.xs,\n d.labels\n ];\n });\n \n //Sets up test tensors\n const [testXs, testYs] = tf.tidy(() => {\n const d = data.nextTestBatch(TEST_DATA_SIZE);\n return [\n d.xs.reshape([TEST_DATA_SIZE, 28, 28, 1]),\n //d.xs,\n d.labels\n ];\n });\n\n //Setting up layer divs to be using in callback\n let num_units = 10; //number of nodes to visualize in a layer\n for (let i = 0; i < num_units; i++){\n let div = d3.select(`#layer`).append(\"div\")\n .attr(\"class\",`weight-container`)\n .attr(\"id\",`weight-container-${i}`);\n\n let canvas = div.append('canvas')\n .attr(\"id\",`weight_${i}`)\n .attr(\"class\",\"weight\")\n .attr(\"width\",28)\n .attr(\"height\",28)\n .style(\"margin\",\"4px\")\n .node();\n }\n\n // model.fit starts the training loop\n let NUM_EPOCHS = parseInt(d3.select(\"#epoch\").node().value);\n console.log(\"epochs\",NUM_EPOCHS)\n\n\n const trainLogs = [];\n const lossContainer = document.getElementById('training-view');\n const beginMs = performance.now();\n \n //return model.fit(trainXs, trainYs, {\n const history = await model.fit(trainXs,trainYs, {\n batchSize: BATCH_SIZE,\n validationData: [testXs, testYs],\n epochs: NUM_EPOCHS,\n shuffle: true,\n callbacks: {\n\n onEpochEnd: async (epoch, logs) => {\n // Plot the loss and accuracy values at the end of every training epoch.\n trainLogs.push(logs);\n tfvis.show.history(lossContainer, trainLogs, metrics, { width: 625, height: 200 })\n \n //Calls the showLayer function to show layer weights at end of every epoch\n await showLayer(model)\n \n \n },\n //Visualized nodes after batch processed, gives smoother image but slows training\n // onBatchEnd: async (batch,logs) => {\n // //await showLayer(model)\n // //Could also potentially store weights for each node here for later perusal using sliderbar\n // }\n \n }\n });\n return model\n\n\n }", "title": "" }, { "docid": "95c268c08bc6c956e8e6332d987d4bb6", "score": "0.49856636", "text": "init() {\n var selfref = this;\n\n LoadOBJModel('textures/ThreeDModels/train/', 'train.obj', 'textures/ThreeDModels/train/', 'train.mtl', mesh => {\n selfref.add(mesh);\n });\n\n selfref.scale.set(8, 8, 8);\n }", "title": "" }, { "docid": "b57afe585d2a4a0f30e88ff585468dfd", "score": "0.49713975", "text": "function dml_load_JSON(myStyleNu) {\n\tif (myStyleNu == 0) {\n\t\tvar myStyleCode = dmlmyArr[0].dml_border_color;\n\t\ttry {\n\t\t\tvar c = jQuery.parseJSON(myStyleCode);\n\t\t\tdml_init_Map(myStyleCode);\n\t\t}\n\t\tcatch (err) {\n\t\t\talert('It is not a valid JSON STYLE format. Please reload the map. If you continue receiving this message, please refer to the documentation');\n\t\t\tdml_init_Map(1);\n\t\t}\n\t} else {\n\t\tvar myStyleFile = dml_php_links.UrlofPlugin + \"/dml-easy-map/styles/style\" + myStyleNu + \".json\";\n\t\tvar xobj = new XMLHttpRequest();\n\t\txobj.overrideMimeType(\"application/json\");\n\t\txobj.open('GET', myStyleFile, true); // Replace 'my_data' with the path to your file\n\t\txobj.onreadystatechange = function () {\n\t\t\tif (xobj.readyState == 4 && xobj.status == \"200\") {\n\t\t\t\tdml_init_Map(xobj.responseText);\n\t\t\t}\n\t\t};\n\t\txobj.send(null);\n\t}\n}", "title": "" } ]
6073a6acfc48162a9e41d5486694ca67
Mouse events /////////////////////////// Main function to retrieve mouse xy pos.s
[ { "docid": "94fc05fb4b959c0f34111842aa03e208", "score": "0.7549071", "text": "function getMouseXY(e) {\n\n var scrollTop = $(window).scrollTop();\n\n if (e && e.pageX) {\n mouseX = e.pageX;\n mouseY = e.pageY - scrollTop;\n } else {\n mouseX = event.clientX + document.body.scrollLeft;\n mouseY = event.clientY + document.body.scrollTop;\n }\n // catch possible negative values\n if (mouseX < 0) {\n mouseX = 0;\n }\n if (mouseY < 0) {\n mouseY = 0;\n }\n\n calculateTooltipOffset();\n\n if (config.displayMousePosition) {\n var scrollTop = win.scrollTop();\n var offset = mapWrapper.offset();\n var relX = Math.round(mouseX - offset.left);\n var relY = Math.round(mouseY - offset.top + scrollTop);\n var mapXPos = Math.round(relX - config.mapWidth / 2);\n var mapYPos = Math.round(relY - config.mapHeight / 2);\n $('.jsmaps-mouse-position .xPos').text('X: ' + relX);\n $('.jsmaps-mouse-position .yPos').text('Y: ' + relY);\n $('.jsmaps-mouse-position .mapXPos').text('Map X: ' + mapXPos);\n $('.jsmaps-mouse-position .mapYPos').text('Map Y: ' + mapYPos);\n }\n }", "title": "" } ]
[ { "docid": "82d7c7b17762205ca54c2960accb4f46", "score": "0.80481243", "text": "function getMousePos(event) {\r\n x = event.clientX - 110;\r\n y = event.clientY - 105;\r\n\r\n // console.log(x,y)\r\n}", "title": "" }, { "docid": "ae6b968efc7f6f68f29df07b0200533c", "score": "0.8015733", "text": "function mouseLocation(event){\n XPOS = event.clientX;\n YPOS = event.clientY;\n}", "title": "" }, { "docid": "cf547283544f47c7d118cb179b50aca3", "score": "0.79489225", "text": "function getMousePositions(ev)\n\t{\n\t\treturn {\n\t\t\tx : ev.pageX,\n\t\t\ty : ev.pageY\n\t\t}\n\t}", "title": "" }, { "docid": "19334e6d638fedbd8891b4894c50a876", "score": "0.782061", "text": "function getMousePos(evt) {\n var rect = canvas.getBoundingClientRect();\n console.log(2);\n mosPosx = evt.clientX - rect.left;\n mosPosy = evt.clientY - rect.top;\n pH.clickX = mosPosx;\n pH.clickY = mosPosy;\n\n}", "title": "" }, { "docid": "1ccc1caa8781a8c9554e5e767a6da21a", "score": "0.7809933", "text": "function getMouseXY(e) {\r\n// grab the x-y pos.s if browser is NS\r\n tempX = e.pageX\r\n tempY = e.pageY\r\n // catch possible negative values in NS4\r\n if (tempX < 0){tempX = 0}\r\n if (tempY < 0){tempY = 0}\r\n // show the position values in the form named Show\r\n // in the text fields named MouseX and MouseY\r\n return true\r\n}", "title": "" }, { "docid": "55679d076a54c8f9e5dc98c3597de2ca", "score": "0.77269065", "text": "getMousePos(e) {\n this.mouseX = e.offsetX;\n this.mouseY = e.offsetY; \n }", "title": "" }, { "docid": "034f4a65645da6608ef0b67b6be6bd5f", "score": "0.7695627", "text": "function getMousePos(e) {\n\n if (e.offsetX) {\n mouseX = e.offsetX;\n mouseY = e.offsetY;\n } else if (e.layerX) {\n mouseX = e.layerX;\n mouseY = e.layerY;\n }\n}", "title": "" }, { "docid": "5156f7ffb3345a5905f84eba00aac23b", "score": "0.767371", "text": "function getMousePos(canvas, evt) {\n var mouseX, mouseY;\n if (evt.offsetX) {\n mouseX = evt.offsetX;\n mouseY = evt.offsetY;\n } else if (evt.layerX) {\n mouseX = evt.layerX;\n mouseY = evt.layerY;\n }\n return {\n x: mouseX,\n y: mouseY\n };\n }", "title": "" }, { "docid": "6921e7fc677e8345e4eece994d90abbd", "score": "0.7665414", "text": "function getMouseXY(e) {\nvar tempX = 0\nvar tempY = 0\n if (IE) { // grab the x-y pos.s if browser is IE\n tempX = event.clientX + document.body.scrollLeft\n tempY = event.clientY + document.body.scrollTop\n } else { // grab the x-y pos.s if browser is NS\n tempX = e.pageX\n tempY = e.pageY\n }\n // catch possible negative values in NS4\n if (tempX < 0){tempX = 0}\n if (tempY < 0){tempY = 0}\n // show the position values in the form named Show\n // in the text fields named MouseX and MouseY\n return [tempX,tempY] ;\n}", "title": "" }, { "docid": "7033c8a45bbadf358abeef4251c5f3fb", "score": "0.766176", "text": "function getXY(e) {\n\tvar posx = 0;\n\tvar posy = 0;\n\tif (!e) var e = window.event;\n\tif (e.pageX || e.pageY) \t{\n\t\tposx = e.pageX;\n\t\tposy = e.pageY;\n\t}\n\telse if (e.clientX || e.clientY) \t{\n\t\tposx = e.clientX + document.body.scrollLeft\n\t\t\t+ document.documentElement.scrollLeft;\n\t\tposy = e.clientY + document.body.scrollTop\n\t\t\t+ document.documentElement.scrollTop;\n\t}\n\treturn new Array(posx,posy);\n//\talert(posx+\"\\n\"+posy);\n\t// posx and posy contain the mouse position relative to the document\n\t// Do something with this information\n}", "title": "" }, { "docid": "5611a2d8509e3ec446d5f850b42cb6ae", "score": "0.7659009", "text": "function mouse_pos(e) {\r\n \"use strict\";\r\n \r\n x_pos = e.clientX - left_margin_width;\r\n y_pos = e.clientY - top_margin_height;\r\n}", "title": "" }, { "docid": "885555cf5dcbab52dc5fb1d88ce82032", "score": "0.7639475", "text": "function getPosition(event){\n\tvar rect = canvas.getBoundingClientRect();\n\n\tmouse_coord.x = event.clientX - rect.left;\n\tmouse_coord.y = event.clientY - rect.top;\n\n}", "title": "" }, { "docid": "12ff0902db2fc55fc9f59d3c26b8e477", "score": "0.76320964", "text": "function getMouseCoords(event) {\n var x,y;\n x=(event.pageX);\n y=(event.pageY);\n x+=258-window.innerWidth/2;\n y-=10;\n return {\"x\": x, \"y\": y};\n}", "title": "" }, { "docid": "3ca312d273341bc4a50f31c691214406", "score": "0.7621958", "text": "function getMousePosition(evt) {\n var CTM = svg.getScreenCTM();\n return {\n x: (evt.clientX - CTM.e) / CTM.a,\n y: (evt.clientY - CTM.f) / CTM.d\n };\n }", "title": "" }, { "docid": "a7c01198d6faac7abf8039f162f4fe63", "score": "0.76198965", "text": "function getMousePos(e) {\n if (!e)\n var e = event;\n\n if (e.offsetX) {\n mouseX = e.offsetX;\n mouseY = e.offsetY;\n }\n else if (e.layerX) {\n mouseX = e.layerX;\n mouseY = e.layerY;\n }\n\n }", "title": "" }, { "docid": "64d68735f41b9929fc2fb01fdc01d258", "score": "0.76197857", "text": "function mGetMousePosition (evt) {\n\t\t/* https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollX\n\t\t * scrollX gibt den Wert des (verschieblichen) Scrollbars. Wenn der Screen/Window-Bereich nach links/rechts gescrollt wird,\n\t\t * aendert sich der scrollX-Wert. Wenn es kein Scrollbar gibt, ist scrollX immer 0. Analog fuer scrollY.\n\t\t *\n\t\t * pageXOffset ist Alias von scrollX --> ( pageXOffset == scrollX)\n\t\t * \n\t\t * Wenn (window.pageXOffset) bzw. (window.scrollX) nicht existiert, dann verwendet (document.documentElement.scrollLeft).\n\t\t *\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX\n\t\t * clientX gibt die X-Koordinate des Mouse im SICHTBAREN ScreenWindow-Bereich an. Klickt man z.B. auf eine Stelle x und \n\t\t * die Koordinate clientX=12 erhaelt. Dann scrollt man nach rechts um scrollX=100px. Anschliessend klickt man im\n\t\t * SICHTBAREN Screen/Window-Bereich wieder auf dieselbe Stelle x, erhaelt man ueberraschenderweise dieselbe Koordinate\n\t\t * clientX=12, und NICHT clientX=(12 + scrollX). Analog fuer clientY.\n\t\t *\n\t\t * Um die tatsaechliche X-Koordinate zu ermitteln, werden scrollX und clientX miteinander addiert:\n\t\t *\t\tvar x = scrollX + clientX;\n\t\t * Fuer Cross-Browserkompatibilitaet ersetzt scrollX durch pageXOffset:\n\t\t *\t\tvar x = pageXOffset + clientX;\n\t\t * Ausfuehrlicher sieht es wie folgt:\n\t\t *\t\tvar x = window.pageXOffset + event.clientX;\n\t\t * bzw.\n\t\t *\t\tvar x = ( window.pageXOffset || document.documentElement.scrollLeft ) + event.clientX;\n\t\t */\n\t\tvar x = window.pageXOffset || ( document.documentElement || document.body.parentNode || document.body ).scrollLeft;\n\t\tx += evt.clientX;\n\t\t\n\t\tvar y = window.pageYOffset || ( document.documentElement || document.body.parentNode || document.body ).scrollTop;\n\t\ty+= evt.clientY;\n\t\t\n\t\tconsole.log(\"x: \" + x + \", y: \" + y + \", pageXOffset: \" + window.pageXOffset + \", pageYOffset: \" + window.pageYOffset + \", event.clientX: \" + evt.clientX + \", event.clientY: \" + evt.clientY + \", document.documentElement.scrollLeft: \" + document.documentElement.scrollLeft);\t\t\n\t\treturn {x,y};\n\t}", "title": "" }, { "docid": "b6efe9e90714255b5e7335d9eb5fa556", "score": "0.7618814", "text": "function getMousePos(e)\r\n{\r\n\t\r\n\tmouse.x = e.clientX - this.offsetLeft;\r\n\tmouse.y = e.clientY - this.offsetTop;\r\n}", "title": "" }, { "docid": "6dfdaa3504796fe82467722fa82ee632", "score": "0.7605047", "text": "function calculateMousePos() {\n var x = event.clientX;\n var y = event.clientY;\n return {\n x,\n y\n };\n}", "title": "" }, { "docid": "5e180b3e756a306739dc9a39e214cfc4", "score": "0.7603764", "text": "function mousePosition(evt) {\n var rect = canvas.getBoundingClientRect();\n var root = document.documentElement;\n var mouseX = evt.clientX - rect.left - root.scrollLeft;\n var mouseY = evt.clientY - rect.top - root.scrollTop;\n return {\n x: mouseX,\n y: mouseY\n };\n}", "title": "" }, { "docid": "2424a3516fafcaa03f40cb60cc616866", "score": "0.7594656", "text": "function getMousePos(canvas, evt) {\r\n var rect = canvas.getBoundingClientRect();\r\n return {\r\n x: evt.clientX - rect.left,\r\n y: evt.clientY - rect.top\r\n };\r\n}", "title": "" }, { "docid": "3eb22bbb775a091fff3cb830f99bb9ca", "score": "0.7583239", "text": "function calculateMousePos(evt) {\n var rect = canvas.getBoundingClientRect(), root = document.documentElement;\n\n // account for the margins, canvas position on page, scroll amount, etc.\n var mouseX = evt.clientX - rect.left - root.scrollLeft;\n var mouseY = evt.clientY - rect.top - root.scrollTop;\n return {\n x: mouseX,\n y: mouseY\n };\n}", "title": "" }, { "docid": "577752d294a9a98f49b63eeb6a17115b", "score": "0.756926", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" }, { "docid": "15ca97035b51106aa7542457cb09b100", "score": "0.7558277", "text": "function getMousePos(event) {\n\n if (g_isVertical == false)\n return (event.pageX);\n\n return (event.pageY);\n }", "title": "" }, { "docid": "0ba9c5613ec682c8fd6aa2c6ec7dce41", "score": "0.75568753", "text": "function calculateMousePosition(evt) {\n\tvar rect = canvas.getBoundingClientRect(); \t\t\t\t// get handle on the black area on the browser \n\tvar root = document.documentElement;\t\t\t\t\t// get handle on the html document\n\tvar mouseX = evt.clientX - rect.left - root.scrollLeft;\n\tvar mouseY = evt.clientY - rect.left - root.scrollLeft;\n\treturn{\n\t\tx:mouseX,\n\t\ty:mouseY\n\t};\n}", "title": "" }, { "docid": "8621bd5cf1f1bb78aa9b391962eb98ed", "score": "0.75549424", "text": "function getMousePos(e) {\n if (!e)\n var e = event;\n\n if (e.offsetX) {\n mouseX = e.offsetX;\n mouseY = e.offsetY;\n }\n else if (e.layerX) {\n mouseX = e.layerX;\n mouseY = e.layerY;\n }\n }", "title": "" }, { "docid": "b935afc18bee4582993db4d12434a86c", "score": "0.75525594", "text": "function getMousePos(e) \n{\n\t//returns two values, x and y, representing the coordinates relative to the event provided in the parameters\n\treturn { x: e.offsetX, y: e.offsetY };\n}", "title": "" }, { "docid": "2b4b696f5c4d1f810e7f5f52d6a34dd0", "score": "0.75508595", "text": "function getMousePos(e) {\n if (!e)\n var e = event;\n\n if (e.offsetX) {\n mouseX = e.offsetX;\n mouseY = e.offsetY;\n }\n else if (e.layerX) {\n mouseX = e.layerX;\n mouseY = e.layerY;\n }\n}", "title": "" }, { "docid": "9d364d4c0770224d861d0af9168bc86c", "score": "0.7530339", "text": "getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n }", "title": "" }, { "docid": "0da9e5b11e51961c2ad24abd9ce68d7e", "score": "0.7526629", "text": "function getMousePosn(e) {\n if (!e)\n var e = event;\n\n //offset is supported in some browsers\n if (e.offsetX) {\n mouseX = e.offsetX;\n mouseY = e.offsetY;\n }\n //layerX is supported in some other browsers\n else if (e.layerX) {\n mouseX = e.layerX;\n mouseY = e.layerY;\n }\n}", "title": "" }, { "docid": "a3800c1ed62804cec1a0f87eb899165f", "score": "0.75229496", "text": "function getMousePos(c, evt){\n var rect = c.getBoundingClientRect();\n return{\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top};\n\n }", "title": "" }, { "docid": "f64add26dd861d221ac40e3962897897", "score": "0.7518213", "text": "function calculateMousePosition(evt) {\n var rect = canvas.getBoundingClientRect();\n var root = document.documentElement;\n var mouseX = evt.clientX - rect.left - root.scrollLeft;\n var mouseY = evt.clientY - rect.top - root.scrollTop;\n return { X: mouseX, y: mouseY };\n}", "title": "" }, { "docid": "5c3be69c62c310604a3642deb407743a", "score": "0.75151896", "text": "function mousePos(evt) {\n // area of the canvas\n var rect = canvas.getBoundingClientRect();\n // handle on the HTML page\n var root = document.documentElement;\n // getting the relative mouse's position based on the canvas and the scroll\n var xMouse = evt.clientX - rect.left - root.scrollLeft;\n var yMouse = evt.clientY - rect.top - root.scrollTop;\n\n return {\n x: xMouse, y: yMouse\n };\n}", "title": "" }, { "docid": "fa5964c7471c521dd2f57518412397b2", "score": "0.75132036", "text": "function getMousePos(evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" }, { "docid": "b8cce2b88323b42a4aacf408f4525d42", "score": "0.7499655", "text": "function calculateMousePos(evt) {\n var rect = canvas.getBoundingClientRect(); //the area in our browser that the canvas is in\n var root = document.documentElement; \n var mouseX = evt.clientX - rect.left - root.scrollLeft;\n var mouseY = evt.clientY - rect.top - root.scrollTop;\n return {\n x:mouseX,\n y:mouseY\n };\n}", "title": "" }, { "docid": "32094be6cd08675c690a43719f3e7bd7", "score": "0.74874", "text": "function updateMouseXY(e) {\n mouseX = e.x;\n mouseY = e.y;\n}", "title": "" }, { "docid": "68afa1eceaeb02cf454d4bfbc5073436", "score": "0.7485521", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n }", "title": "" }, { "docid": "353b783a66cf5a8395a4fae4e91e4f99", "score": "0.7485512", "text": "function calculateMousePos(evt) {\n let rect = canvas.getBoundingClientRect();\n let root = document.documentElement;\n let mouseX = evt.clientX - rect.left - root.scrollLeft;\n let mouseY = evt.clientY - rect.top - root.scrollTop;\n\n return {\n x: mouseX,\n y: mouseY\n };\n}", "title": "" }, { "docid": "642cfaa968fd8ca58a6316b6dcbd31bf", "score": "0.74831724", "text": "function getMousePos(_canvas, evt) {\n var rect = _canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n }", "title": "" }, { "docid": "3c408d4873ce8fca3254cebb006e4514", "score": "0.7476352", "text": "function getCurrentMousePos(canvas, evt) {//return X&Y of current mousePosition\n var rect = canvas.getBoundingClientRect();\n\n return {\n x: Math.round((evt.clientX - rect.left) / (rect.right - rect.left) * canvas.width),\n y: Math.round((evt.clientY - rect.top) / (rect.bottom - rect.top) * canvas.height)\n };\n}", "title": "" }, { "docid": "9f0cd1cc26dcad4f00ac6b0093270b0b", "score": "0.7475289", "text": "function getMousePosition() {\n var x_m = event.clientX; // Get the horizontal coordinate\n var y_m = event.clientY; // Get the vertical coordinate\n\n return {\n X: x_m,\n Y: y_m\n };\n}", "title": "" }, { "docid": "4447bd4bd4ca2d098a69f2ee18cfeaff", "score": "0.74620813", "text": "function getMousePos(evt) {\n var rect = canvas.getBoundingClientRect();\n return [evt.clientX - rect.left, evt.clientY - rect.top]\n}", "title": "" }, { "docid": "5c954e39de0fda0fe403536ca32f6c1d", "score": "0.7453798", "text": "function getMousePos(evt) {\n var rect = canvas.getBoundingClientRect();\n var root = document.documentElement;\n var mouseX = evt.clientX - rect.left - root.scrollLeft;\n var mouseY = evt.clientY - rect.top - root.scrollTop;\n \n return {\n x: mouseX,\n y: mouseY\n }\n}", "title": "" }, { "docid": "a6a6f553dfcaf3d8680d2a3fb774a6a0", "score": "0.74510336", "text": "function getMousePos(mouseEvent) {\n return {\n x: mouseEvent.pageX - $(\"canvas\").offset().left,\n y: mouseEvent.pageY - $(\"canvas\").offset().top\n };\n }", "title": "" }, { "docid": "dd551622263dc0c00fc89dffd3eb6c7a", "score": "0.74509346", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" }, { "docid": "a2e90f9978f3a6478efca8e295caca0f", "score": "0.74410206", "text": "function getMousePos(canvas, evt) {\n\t\tvar rect = canvas.getBoundingClientRect();\n\t\treturn {\n\t\t\tx: evt.clientX - rect.left,\n\t\t\ty: evt.clientY - rect.top\n\t\t};\n\t}", "title": "" }, { "docid": "4c3b5176c3e4160bf4ed7e4fd22c3de3", "score": "0.7429245", "text": "function get_cursor_position(e){\r\n var x;\r\n var y;\r\n \r\n if (e.pageX || e.pageY) {\r\n x = e.pageX;\r\n y = e.pageY;\r\n } else {\r\n x = e.clientX + \r\n document.body.scrollLeft + \r\n document.documentElement.scrollLeft;\r\n y = e.clientY + \r\n document.body.scrollTop + \r\n document.documentElment.scrollTop;\r\n }\r\n \r\n x -= canvas.offsetLeft;\r\n y -= canvas.offsetTop;\r\n x = Math.floor(x / entitySize);\r\n y = Math.floor(y / entitySize);\r\n return [x,y]\r\n}", "title": "" }, { "docid": "9b78e9c6fee596321561ae631ba6c52a", "score": "0.7412471", "text": "function getMousePos (canvas, evt) {\n\tvar rect = canvas.getBoundingClientRect();\n\t\treturn {\n\t\t\tx: evt.clientX - rect.left,\n\t\t\ty: evt.clientY - rect.top\n\t\t};\n}", "title": "" }, { "docid": "0e5fb3668780cdb7a4a4a13310ee767c", "score": "0.7406518", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n\t\tx: evt.clientX - rect.left,\n\t\ty: evt.clientY - rect.top\n\t};\n}", "title": "" }, { "docid": "dff49a71e522cdb7f0f5a2a225ebd56f", "score": "0.7403405", "text": "function mousePos(e) {\n\tvar posx = 0;\n\tvar posy = 0;\n\tif (!e) var e = window.event;\n\tif (e.pageX || e.pageY) \t{\n\t\tposx = e.pageX;\n\t\tposy = e.pageY;\n\t}\n\telse if (e.clientX || e.clientY) \t{\n\t\tposx = e.clientX + document.body.scrollLeft\n\t\t\t+ document.documentElement.scrollLeft;\n\t\tposy = e.clientY + document.body.scrollTop\n\t\t\t+ document.documentElement.scrollTop;\n\t}\n\t// posx and posy contain the mouse position relative to the document\n\t// Do something with this information\n return posx;\n return posy;\n}", "title": "" }, { "docid": "27d85d4f9c5f1044f2850055395f8193", "score": "0.7403179", "text": "function calcMousePos(e){\n\t\t\tlet rect = canvas.getBoundingClientRect();\n\t\t\tlet root = document.documentElement;\n\t\t\tlet mouseX = e.clientX - rect.left - root.scrollLeft;\n\t\t\tlet mouseY = e.clientY - rect.top - root.scrollTop;\n\t\t\treturn {\n\t\t\t\tx: mouseX,\n\t\t\t\ty: mouseY\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "29fd2b6961b76445ba9049b12b791f6a", "score": "0.7398165", "text": "function getCoords(ev) {\n var x, y, w, h, el;\n // ignore browsers without pageX for now\n if (ev.pageX == null)\n return;\n x = ev.pageX;\n y = ev.pageY;\n el = self.element;\n // should probably check offsetParent\n // but this is more portable\n while (el && el !== self.document.documentElement) {\n x -= el.offsetLeft;\n y -= el.offsetTop;\n el = 'offsetParent' in el ?\n el.offsetParent :\n el.parentNode;\n }\n // convert to cols/rows\n w = self.element.clientWidth;\n h = self.element.clientHeight;\n x = Math.ceil((x / w) * self.cols);\n y = Math.ceil((y / h) * self.rows);\n // be sure to avoid sending\n // bad positions to the program\n if (x < 0)\n x = 0;\n if (x > self.cols)\n x = self.cols;\n if (y < 0)\n y = 0;\n if (y > self.rows)\n y = self.rows;\n // xterm sends raw bytes and\n // starts at 32 (SP) for each.\n x += 32;\n y += 32;\n return {\n x: x,\n y: y,\n type: 'wheel'\n };\n }", "title": "" }, { "docid": "6996aeefc6b6943f8e12ee524a54c2c0", "score": "0.7398055", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n }", "title": "" }, { "docid": "47b10d33661d0a71ad571f4985e90c9a", "score": "0.7396362", "text": "function mouse_pos(ev)\r\n{\r\n var cv = ev.currentTarget;\r\n\r\n var x = ev.pageX;\r\n var y = ev.pageY;\r\n \r\n var node = cv;\r\n while (node)\r\n {\r\n if (node.offsetLeft != undefined && node.offsetTop != undefined)\r\n {\r\n x -= node.offsetLeft;\r\n y -= node.offsetTop;\r\n }\r\n \r\n node = node.offsetParent;\r\n }\r\n \r\n return new point(x, y);\r\n}", "title": "" }, { "docid": "601de5e93cfc1f2560dd21f8b5f95281", "score": "0.73880523", "text": "function getMouseXY(e) \r\n{\r\n\tvar targ;\r\n\tif (!e) \r\n\t\te = window.event;\r\n\tif (e.target) \r\n\t\ttarg = e.target;\r\n\telse if (e.srcElement) \r\n\t\ttarg = e.srcElement;\r\n\t\r\n\tif (targ != null)\r\n\t{\r\n\t\tif (targ.nodeType == 3) // defeat Safari bug\r\n\t\t\ttarg = targ.parentNode;\r\n\t}\r\n\t\r\n\tvar code;\r\n\tif (e.keyCode) \r\n\t\tcode = e.keyCode;\r\n\telse if (e.which) \r\n\t\tcode = e.which;\r\n\t\r\n\tif (e.pageX || e.pageY)\r\n\t{ // grab the x-y pos.s if browser is NS\r\n\t\tMouseX = e.pageX;\r\n\t\tMouseY = e.pageY;\r\n\t} \r\n\telse if (e.clientX || e.clientY)\r\n\t{\r\n\t\t//What is wrong ???\r\n\t\tif (e == \"[object]\" && document.body == \"[object]\")\r\n\t\t{\r\n\t\t\tif (e.clientX != null && document.body.scrollLeft != null)\r\n\t\t\t\tMouseX = e.clientX + document.body.scrollLeft;\r\n\t\t\telse\r\n\t\t\t\tMouseX = 0;\r\n\t\t\t\r\n\t\t\tif (e.clientY != null && document.body.scrollTop != null)\r\n\t\t\t\tMouseY = e.clientY + document.body.scrollTop;\r\n\t\t\telse\r\n\t\t\t\tMouseY = 0;\r\n\t\t}\r\n\t}\r\n\t\r\n\t// catch possible negative values in NS4\r\n\tif (MouseX < 0){MouseX = 0;}\r\n\tif (MouseY < 0){MouseY = 0;}\r\n\r\n\t//MoveSquare();\r\n\tUpdateColumnWidth();\r\n}", "title": "" }, { "docid": "243c94ca2d3c216ab973dae1112a066f", "score": "0.7386926", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n }\n }", "title": "" }, { "docid": "d5758c38761547f72e4ff09017a59f6e", "score": "0.7380654", "text": "function getMouseXY(e) {\r\n // Detect if the browser is IE or not.\r\n // If it is not IE, we assume that the browser is NS.\r\n var IE = document.all ? true : false;\r\n\r\n if (IE) { // grab the x-y pos.s if browser is IE\r\n mouseLocation.X = window.event.clientX + document.body.scrollLeft;\r\n mouseLocation.Y = window.event.clientY + document.body.scrollTop;\r\n } else { // grab the x-y pos.s if browser is NS\r\n mouseLocation.X = e.pageX;\r\n mouseLocation.Y = e.pageY;\r\n }\r\n // catch possible negative values in NS4\r\n if (mouseLocation.X < 0) { mouseLocation.X = 0; }\r\n if (mouseLocation.Y < 0) { mouseLocation.Y = 0; }\r\n}", "title": "" }, { "docid": "c377307671bd35071f703f3029add460", "score": "0.7379517", "text": "function updateMousePos(evt)\n{\n var rect = canvas.getBoundingClientRect();\n var root = document.documentElement;\n\n mouseX = evt.clientX - rect.left - root.scrollLeft;\n mouseY = evt.clientY - rect.top - root.scrollTop;\n}", "title": "" }, { "docid": "f56bc67ee4dbdcfd015360b39b324749", "score": "0.7377412", "text": "function getMousePos(canvas, event) \n{\n var rect = canvas.getBoundingClientRect();\n return {\n \tx: event.clientX - rect.left,\n \ty: event.clientY - rect.top\n };\n}", "title": "" }, { "docid": "2ebad33e207d59eb2a04e7bf79b964cb", "score": "0.7369015", "text": "function mousePos(event) {\n\tvar posX = 0,\n\t\tposY = 0;\n\tif (!event) event = window.event;\n\tif (event.pageX || event.pageY) {\n\t\tposX = event.pageX;\n\t\tposY = event.pageY;\n\t} else if (event.clientX || event.clientY) {\n\t\tposX = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;\n\t\tposY = event.clientY + document.body.scrollTop + document.documentElement.scrollTop;\n\t}\n\treturn {\n\t\tx: posX,\n\t\ty: posY\n\t};\n}", "title": "" }, { "docid": "73ebfb3f75a398234ea03f4708c12b14", "score": "0.73643565", "text": "function getMousePos(canvas, evt){\n\t// get canvas position\n\tvar obj = canvas;\n\tvar top = 0;\n\tvar left = 0;\n\twhile (obj && obj.tagName != 'BODY') {\n\t\ttop += obj.offsetTop;\n\t\tleft += obj.offsetLeft;\n\t\tobj = obj.offsetParent;\n\t}\n\t// return relative mouse position\n\tGetScrollPositions();\n\t//\n\tvar mX = evt.clientX - left + theScrollLeft;\n\tvar mY = evt.clientY - top + theScrollTop;\n\treturn {\n\t\tx: mX,\n\t\ty: mY\n\t};\n}", "title": "" }, { "docid": "5fbdaa1d723c9369cfcdad31d9d77f4c", "score": "0.7362212", "text": "function getMousePosition(c, event) {\n let rect = c.canvas.getBoundingClientRect();\n let x = event.clientX - rect.left;\n let y = event.clientY - rect.top;\n return [x, y]; \n}", "title": "" }, { "docid": "2d3d819267ff608cc358e085e77253b4", "score": "0.7354495", "text": "function MouseCoords(ev){\n if(ev.pageX || ev.pageY){\n\t return {x:ev.pageX, y:ev.pageY};\n }\n return {\n\t x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,\n\t y:ev.clientY + document.body.scrollTop - document.body.clientTop\n };\n}", "title": "" }, { "docid": "06fe590b98a8172dd1d07213ec52d1a9", "score": "0.7347019", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" }, { "docid": "06fe590b98a8172dd1d07213ec52d1a9", "score": "0.7347019", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" }, { "docid": "06fe590b98a8172dd1d07213ec52d1a9", "score": "0.7347019", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" }, { "docid": "aa4cc001934ed2789017992eaadf88d1", "score": "0.7340098", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: Math.round(evt.clientX - rect.left),\n y: Math.round(evt.clientY - rect.top)\n };\n}", "title": "" }, { "docid": "a063008445dd6b899b4d7714aac68bb4", "score": "0.7337496", "text": "function GetCoordinate(e){\r\n global_mouse_x = e.clientX + document.body.scrollLeft;\r\n global_mouse_y = e.clientY + document.body.scrollTop;\r\n return true\r\n}", "title": "" }, { "docid": "8662b0f417c6c2de44a1d3b5b841707a", "score": "0.73351675", "text": "function mousePosition(evt) {\n // IE:\n if (window.event && window.event.contentOverflow !== undefined) {\n return { x: window.event.offsetX, y: window.event.offsetY };\n }\n // Webkit:\n if (evt.offsetX !== undefined && evt.offsetY !== undefined) {\n return { x: evt.offsetX, y: evt.offsetY };\n }\n // Firefox:\n var wrapper = evt.target.parentNode.parentNode;\n return { x: evt.layerX - wrapper.offsetLeft, y: evt.layerY - wrapper.offsetTop };\n }", "title": "" }, { "docid": "4cef92161391898616e16267aacb9aa7", "score": "0.73293245", "text": "function GetCoordinates(e){\r\n\r\n var PosX = 0;\r\n var PosY = 0;\r\n var ImgPos;\r\n ImgPos = FindPosition(output);\r\n\r\n if (!e) var e = window.event;\r\n if (e.pageX || e.pageY)\r\n {\r\n PosX = e.pageX;\r\n PosY = e.pageY;\r\n }\r\n else if (e.clientX || e.clientY)\r\n {\r\n PosX = e.clientX + document.body.scrollLeft\r\n + document.documentElement.scrollLeft;\r\n PosY = e.clientY + document.body.scrollTop\r\n + document.documentElement.scrollTop;\r\n }\r\n PosX = PosX - ImgPos[0];\r\n PosY = PosY - ImgPos[1];\r\n //document.getElementById(\"x\").innerHTML = PosX;\r\n //document.getElementById(\"y\").innerHTML = PosY;\r\n return (PosX, PosY);\r\n}", "title": "" }, { "docid": "536639d80b41ddcd66922cdad33e5753", "score": "0.73270416", "text": "function getMousePos(canvasDom, mouseEvent) {\nvar rect = canvasDom.getBoundingClientRect();\nreturn {\n x: mouseEvent.clientX - rect.left,\n y: mouseEvent.clientY - rect.top\n};\n}", "title": "" }, { "docid": "d43159bc23805b6224dfa66809345f9c", "score": "0.7324788", "text": "function getCoords(e){\r\n var xy_pos = getXYpos(e.target);\r\n\r\n // if IE\r\n if(navigator.appVersion.indexOf('MSIE') !=-1) {\r\n //in some IE scrolling page affects mouse coordinates into an element\r\n //This gets the page element that will be used to add scrolling value to correct mouse coords\r\n var standardBody = (document.compatMode =='CSS1Compat') ? document.documentElement : document.body;\r\n\r\n x = event.clientX + standardBody.scrollLeft;\r\n y = event.clientY + standardBody.scrollTop;\r\n }\r\n else {\r\n x = e.pageX;\r\n y = e.pageY;\r\n }\r\n return [x - xy_pos['x'], y - xy_pos['y']];\r\n }", "title": "" }, { "docid": "da708f03ee3c76d690cb3d6ab5c46395", "score": "0.7314228", "text": "function getMousePos(e) {\n if (!e) var e = window.event;\n if (e.pageX || e.pageY) {\n mouseX = e.pageX;\n mouseY = e.pageY;\n }\n else if (e.clientX || e.clientY) {\n mouseX = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;\n mouseY = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;\n }\n}", "title": "" }, { "docid": "704684b1474ef1f3d6a3ecff6f1634e8", "score": "0.73120594", "text": "function getMousePos(canvas, evt) {\n\n var rect = canvas.getBoundingClientRect();\n\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" }, { "docid": "7c6a83d3350236ce84fe4df281782ba9", "score": "0.7310755", "text": "function getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top,\n };\n}", "title": "" }, { "docid": "df5fd54817eaa40c4e8c01e3cf9d38be", "score": "0.7308826", "text": "function getRealMousePos(evt)\n{\n var rect = canvas.getBoundingClientRect(),\n scaleX = canvas.width / rect.width,\n scaleY = canvas.height / rect.height;\n\n return {\n x: ((evt.clientX - rect.left) * scaleX) - offset,\n y: ((evt.clientY - rect.top) * scaleY) - offset\n }\n}", "title": "" }, { "docid": "1da9d72c27613f2906a2acb4acab4bcb", "score": "0.73074824", "text": "function getMousePos(canvas, evt)\n{\n var rect = canvas.getBoundingClientRect();\n return {\n x: (evt.clientX - rect.left) / (rect.right - rect.left) * canvas.width,\n y: (evt.clientY - rect.top) / (rect.bottom - rect.top) * canvas.height\n };\n}", "title": "" }, { "docid": "26b5666af8fc4509789ece3957117f07", "score": "0.73050946", "text": "function GetCoordinates(e){\r\n\r\n var PosX = 0;\r\n var PosY = 0;\r\n var ImgPos;\r\n ImgPos = FindPosition(output);\r\n \r\n if (!e) var e = window.event;\r\n if (e.pageX || e.pageY)\r\n {\r\n PosX = e.pageX;\r\n PosY = e.pageY;\r\n }\r\n else if (e.clientX || e.clientY)\r\n {\r\n PosX = e.clientX + document.body.scrollLeft\r\n + document.documentElement.scrollLeft;\r\n PosY = e.clientY + document.body.scrollTop\r\n + document.documentElement.scrollTop;\r\n }\r\n PosX = PosX - ImgPos[0];\r\n PosY = PosY - ImgPos[1];\r\n //document.getElementById(\"x\").innerHTML = PosX;\r\n //document.getElementById(\"y\").innerHTML = PosY;\r\n return (PosX, PosY);\r\n}", "title": "" }, { "docid": "9adbd828c27cc978a7847ea37f0ec294", "score": "0.7291449", "text": "function getMousePosition(evt) {\n var CTM = svg.getScreenCTM();\n // working on mobile consideration\n if (evt.touches) { evt = evt.touches[0]; }\n return {\n x: (evt.clientX - CTM.e) / CTM.a,\n y: (evt.clientY - CTM.f) / CTM.d\n };\n }", "title": "" }, { "docid": "c7fee55d6b6b5ba9200d26eafc0400c9", "score": "0.7290349", "text": "function trackPosition(e) { mouse.x = e.pageX; mouse.y = e.pageY; }", "title": "" }, { "docid": "6092e8832996d6d4b637fcc2d57d5ef2", "score": "0.728899", "text": "function getCursorPos(event){\n var rect = myCanvas.getBoundingClientRect();\n return {\n x: event.clientX - rect.left,\n y: event.clientY - rect.top\n }\n}", "title": "" }, { "docid": "b32fd32a089c5cfd37e9b3e2ec85c913", "score": "0.72866064", "text": "get MousePos() { return this.native.getMousePos(); }", "title": "" }, { "docid": "946a3f90380f2aed6d5f29651c78a79c", "score": "0.72859436", "text": "function getPosition(ev){ //returns coords relative to center of mainCanvas\n var x = ev.x;\n var y = ev.y;\n if (ev.x || ev.x == 0){ //chrome\n x = ev.x;\n y = ev.y;\n var canvas = document.getElementById(\"dongCanvas2\");\n x -= canvas.offsetLeft;\n y -= canvas.offsetTop;\n }\n else if (ev.layerX || ev.layerX == 0){ //Firefox\n x = ev.layerX;\n y = ev.layerY;\n }\n else if (ev.offsetX || ev.offsetX == 0){ //Opera\n x = ev.offsetX;\n y = ev.offsetY;\n }\n else if (ev.pageX || ev.pageX == 0){ //Safari i think\n x = ev.pageX;\n y = ev.pageY;\n }\n else{ //Anything Else\n x = mainCanvas.width/2;\n y = mainCanvas.height/2;\n }\n// alert(document.body.scrollTop);\n y -= document.body.scrollTop; //adjusts for having a scrolled window\n x -= document.body.scrollLeft;\n// alert(\"x=\"+x+\", y=\"+y);\n mouseCoords[0] = x;\n mouseCoords[1] = y;\n}", "title": "" }, { "docid": "245881304c41b70274c5823bb55f4901", "score": "0.7281767", "text": "function getMouseXY(e)\n{\n\t if (IE)\n\t {\n\t\t// grab the x-y pos.s if browser is IE\n\t\ttempX = event.clientX + document.body.scrollLeft\n\t\ttempY = event.clientY + document.body.scrollTop\n\t } \n\t else \n\t {\n\t\t// grab the x-y pos.s if browser is NS\n\t\ttempX = e.pageX\n\t\ttempY = e.pageY\n\t } \n\t // catch possible negative values in NS4\n\t if (tempX < 0){tempX = 0}\n\t if (tempY < 0){tempY = 0} \n\t \n\t moveDiv(tempX);\n\t \n\t return true\n}", "title": "" }, { "docid": "73b908b75b88a568b5c3d7a54c318aea", "score": "0.7280326", "text": "getEventXY (element, evt) { // http://goo.gl/356S91\n const rect = element.getBoundingClientRect()\n return [ evt.clientX - rect.left, evt.clientY - rect.top ]\n }", "title": "" }, { "docid": "824a196beaa1cb83e79ea1e0bcdb0cb4", "score": "0.7261966", "text": "function calculateMousePos(event) {\n var rect = canvas.getBoundingClientRect(); // Canvas dimensions\n var root = document.documentElement; // Main document element\n\n // Get the effective mouse co-ordinates within the canvas, accounting for scrolling within the window\n var mouseX = event.clientX - rect.left - root.scrollLeft;\n var mouseY = event.clientY - rect.top - root.scrollTop;\n\n // Return the effective mouse co-ordinates\n return {\n x: mouseX,\n y: mouseY\n };\n}", "title": "" }, { "docid": "f8b152957617d9d24ff7b3a600cd3602", "score": "0.7260034", "text": "function getCoords(ev) {\n var x, y, w, h, el;\n\n // ignore browsers without pageX for now\n if (ev.pageX == null) return;\n\n x = ev.pageX;\n y = ev.pageY;\n el = self.element;\n\n // should probably check offsetParent\n // but this is more portable\n while (el && el !== self.document.documentElement) {\n x -= el.offsetLeft;\n y -= el.offsetTop;\n el = 'offsetParent' in el\n ? el.offsetParent\n : el.parentNode;\n }\n\n // convert to cols/rows\n w = self.element.clientWidth;\n h = self.element.clientHeight;\n x = Math.ceil((x / w) * self.cols);\n y = Math.ceil((y / h) * self.rows);\n\n // be sure to avoid sending\n // bad positions to the program\n if (x < 0) x = 0;\n if (x > self.cols) x = self.cols;\n if (y < 0) y = 0;\n if (y > self.rows) y = self.rows;\n\n // xterm sends raw bytes and\n // starts at 32 (SP) for each.\n x += 32;\n y += 32;\n\n return {\n x: x,\n y: y,\n type: 'wheel'\n };\n }", "title": "" }, { "docid": "e436d6c691a831fb6e3bc3c237bf4e94", "score": "0.72532266", "text": "function getMouseCoordinates(canvas, event) {\n var totalOffsetX = 0;\n var totalOffsetY = 0;\n var canvasX = 0;\n var canvasY = 0;\n var currentElement = canvas;\n\n do {\n totalOffsetX += currentElement.offsetLeft - currentElement.scrollLeft;\n totalOffsetY += currentElement.offsetTop - currentElement.scrollTop;\n }\n while(currentElement = currentElement.offsetParent)\n\n canvasX = event.pageX - totalOffsetX;\n canvasY = event.pageY - totalOffsetY;\n\n return { x: canvasX, y: canvasY };\n}", "title": "" }, { "docid": "54858d45a042c01d1d96e18153581fb5", "score": "0.7250397", "text": "function alert_coords(evt) {\n pt.x = evt.clientX;\n pt.y = evt.clientY;\n\n // The cursor point, translated into svg coordinates\n var cursorpt = pt.matrixTransform(svg.getScreenCTM().inverse());\n \n}", "title": "" }, { "docid": "711082a5baacca44ad2a232c9f6edb32", "score": "0.7240838", "text": "function getCoords(ev) {\n var x, y, w, h, el;\n\n // ignore browsers without pageX for now\n if (ev.pageX == null) return;\n\n x = ev.pageX;\n y = ev.pageY;\n el = self.element;\n\n // should probably check offsetParent\n // but this is more portable\n while (el && el !== self.document.documentElement) {\n x -= el.offsetLeft;\n y -= el.offsetTop;\n el = 'offsetParent' in el\n ? el.offsetParent\n : el.parentNode;\n }\n\n // convert to cols/rows\n w = self.element.clientWidth;\n h = self.element.clientHeight;\n x = Math.round((x / w) * self.cols);\n y = Math.round((y / h) * self.rows);\n\n // be sure to avoid sending\n // bad positions to the program\n if (x < 0) x = 0;\n if (x > self.cols) x = self.cols;\n if (y < 0) y = 0;\n if (y > self.rows) y = self.rows;\n\n // xterm sends raw bytes and\n // starts at 32 (SP) for each.\n x += 32;\n y += 32;\n\n return {\n x: x,\n y: y,\n type: ev.type === wheelEvent\n ? 'mousewheel'\n : ev.type\n };\n }", "title": "" }, { "docid": "a9ac0784695395e90a73dcc10ceae061", "score": "0.72297263", "text": "function normalizeMouseXY(e){\n\tvar x;\n\tvar y;\n\tif (e.pageX || e.pageY) { \n\t x = e.pageX;\n\t y = e.pageY;\n\t}\n\telse { \n\t x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; \n\t y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; \n\t} \n\tx -= canvas.offsetLeft;\n\ty -= canvas.offsetTop;\n\t\n\t// x and y contain the mouse position r\n\t// Do something with this information\n\treturn [x,y];\n}", "title": "" }, { "docid": "81e0ce59e215789bc3395b1380cc0d37", "score": "0.7221559", "text": "function handleMouseMove(event){\r\n //here we converting mouse pos val recived\r\n //to a normalized value varying between -1 and 1;\r\n //this is the formula for the horizontall axis;\r\n \r\n var tx=-1+ (event.clientX/WIDTH)*2;\r\n \r\n //for the vertical (becouse the 2d y goes the opposite direction of the 3d y)\r\n \r\n var ty=1-(event.clientY/HEIGHT)*2;\r\n mousePos={x:tx,y:ty};\r\n}", "title": "" }, { "docid": "141c2fd64cfd4e42a354ca92f613f456", "score": "0.72079176", "text": "function getMousePos(canvasDom, mouseEvent) {\n var rect = canvasDom.getBoundingClientRect();\n return {\n x: mouseEvent.clientX - rect.left,\n y: mouseEvent.clientY - rect.top\n };\n }", "title": "" }, { "docid": "3c6ace47417ed92fc7ba2a7aa2f094e0", "score": "0.72051924", "text": "function getMousePos(canvas, event) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: event.clientX - rect.left,\n y: event.clientY - rect.top\n };\n }", "title": "" }, { "docid": "9431de349c0482287fd0dddf774166ab", "score": "0.72034264", "text": "function handleMouseMove(event) {\n mouseX = event.pageX;\n mouseY = event.pageY;\n}", "title": "" }, { "docid": "37ab0737dbf71f960a6abe785bd164ee", "score": "0.7198827", "text": "function getMousePos(event) {\n\n var mousePos = g_functions.getMousePosition(event);\n\n if (g_temp.isNavigationVertical == true)\n return (mousePos.pageY);\n else\n return (mousePos.pageX);\n\n }", "title": "" }, { "docid": "3844411a9eaab2c90681d83cd853485c", "score": "0.7195096", "text": "function getMousePos(canvasDom, mouseEvent) {\r\n\t\tvar rect = canvasDom.getBoundingClientRect();\r\n\t\treturn {\r\n\t\t\tx: mouseEvent.clientX - rect.left,\r\n\t\t\ty: mouseEvent.clientY - rect.top\r\n\t\t};\r\n\t}", "title": "" }, { "docid": "b5bc67b1dc61c9fae968e51d3e3748c5", "score": "0.71926326", "text": "function getMousePos(canvas, evt){\n var rect = canvas.getBoundingClientRect();\n var margintop = parseInt(getComputedStyle(canvas, null).getPropertyValue(\"margin-top\"));\n var marginLeft = parseInt(getComputedStyle(canvas, null).getPropertyValue(\"margin-left\"));\n var borderTop = parseInt(getComputedStyle(canvas, null).getPropertyValue(\"border-top-width\"));\n var borderLeft = parseInt(getComputedStyle(canvas, null).getPropertyValue(\"border-left-width\"));\n\n return {\n x: evt.clientX - rect.left - marginLeft - borderLeft,\n y: evt.clientY - rect.top - marginLeft - borderTop\n };\n}", "title": "" }, { "docid": "7c3dd4b89e26df566027a6ea2585fa81", "score": "0.7189697", "text": "function getMousePos(canvasDom, mouseEvent) {\n\t\tlet rect = canvasDom.getBoundingClientRect();\n\t\treturn {\n\t\t x: mouseEvent.clientX - rect.left,\n\t\t y: mouseEvent.clientY - rect.top\n\t \t};\n\t}", "title": "" }, { "docid": "66aa6b027a47df5c7239a209dbe0c963", "score": "0.7183518", "text": "function calculateMousePos(evt) {\n\tvar rect = scaledCanvas.getBoundingClientRect(),\n\t\troot = document.documentElement;\n\n\t// account for the margins, canvas position on page, scroll amount, etc.\n\tmouseX = evt.clientX - rect.left;\n\tmouseY = evt.clientY - rect.top;\n\tvar canvasStretch = scaledCanvas.width/ canvas.width;\n\tmouseX /= canvasStretch;\n\tmouseY /= canvasStretch;\n}", "title": "" }, { "docid": "75c35d65ebe3dd3fd063519dbafd4b39", "score": "0.7180836", "text": "function getMousePos(canvas1, evt) {\n var rect = canvas1.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}", "title": "" } ]
4f1b871469db0945f75211278b820378
set even then click button save on dialog
[ { "docid": "71b14104dac380fd2f0eb8a822ace4b5", "score": "0.0", "text": "function btnClickSave() {\n $(\"#btnSave\").click(function () {\n var customerCode = $(\"#txtCustomerCode\").val();\n var txtMemberCardCode = $(\"#txtMemberCardCode\").val();\n var dateOfBirth = $(\"#dateOfBirth\").val();\n var txtFullName = $(\"#txtFullName\").val();\n var customerGroup = $(\"#customerGroup\").val();\n var txtCustomerEmail = $(\"#txtCustomerEmail\").val();\n var customerPhone = $(\"#customerPhone\").val();\n var txtCompanyNamme = $(\"#txtCompanyNamme\").val();\n var txtAddress = $(\"#txtAddress\").val();\n var txtCompanyTaxCode = $(\"#txtCompanyTaxCode\").val();\n var gender = $('input[name=\"gender\"]:checked').val();\n var newCustomer = {\n\n \"CustomerCode\": customerCode,\n \"FullName\": txtFullName,\n \"Gender\": gender,\n \"Address\": txtAddress,\n \"DateOfBirth\": dateOfBirth,\n \"Email\": txtCustomerEmail,\n \"PhoneNumber\": customerPhone,\n \"CompanyName\": txtCompanyNamme,\n \"CompanyTaxCode\": txtCompanyTaxCode,\n \"CustomerGroupId\": customerGroup,\n \"MemberCardCode\": txtMemberCardCode\n\n }\n // goi service de luu lai\n let method = \"\";\n let url = \"\";\n if (checkSaveEdit == 0) {\n method = \"POST\";\n url = \"http://api.manhnv.net/api/customers\";\n } else {\n newCustomer.CustomerId = recordId;\n method = \"PUT\"\n url = `http://api.manhnv.net/api/customers/${recordId}`;\n }\n $.ajax({\n type: method,\n url: url,\n data: JSON.stringify(newCustomer),\n async: false,\n contentType: \"application/json\"\n\n }).done(function (response) {\n alert(\"thanh cong\");\n }).fail(function (response){\n alert(response);\n });\n $(\"#dialog\").hide();\n loadData();\n });\n}", "title": "" } ]
[ { "docid": "3ad2ff34813d741416104c08233942d5", "score": "0.771892", "text": "function onSaveClick() {\n _save(false);\n }", "title": "" }, { "docid": "0e6fa22b16a896f0566e879e4781b1f5", "score": "0.7516483", "text": "function onSaveClick(ev) {\n // TODO...\n }", "title": "" }, { "docid": "e862cd3b4c6afef02a7512dfa8e0c252", "score": "0.74055517", "text": "function openSaveDialog(){\n\n}", "title": "" }, { "docid": "d216a33c2ccd1fe89ef2a99b5a8de124", "score": "0.7191722", "text": "goSave() {\n this.setMode('save');\n }", "title": "" }, { "docid": "4e469abdb46d356f77cb9142115b3348", "score": "0.7179414", "text": "_clickSaveButton() {\n const saveButton = '.modal-footer .btn-primary';\n this.I.click(saveButton);\n this.I.waitForInvisible('#overlay', 5);\n }", "title": "" }, { "docid": "cba6880992c708aff33d3c2c3e276f2d", "score": "0.71062446", "text": "onClickSave() {\n this.$saveBtn.toggleClass('working', true);\n\n SettingsHelper.setSettings(ProjectHelper.currentProject, ProjectHelper.currentEnvironment, 'providers', this.model)\n .then(() => {\n this.$saveBtn.toggleClass('working', false);\n\n location.reload();\n })\n .catch(errorModal);\n }", "title": "" }, { "docid": "a884d5b270f021404c348d3f6cfee4ea", "score": "0.70865035", "text": "save() {\n this.suiteView.doSaveAction(false);\n }", "title": "" }, { "docid": "aa80b8e7b3cb350543e1ee789d84c9f8", "score": "0.69772327", "text": "function setCloseAfterSave(on) {\n var field = $('save_and_close');\n if (field) {\n if (on) {\n field.value = '1';\n } else {\n field.value = '0';\n }\n }\n}", "title": "" }, { "docid": "c63a10b46bbb7fcf8eaed7019be2d36e", "score": "0.6876439", "text": "function finishSave (event) {\n var spec = event.data;\n menu = spec.closest('.c-menu-scope');\n menu.find('button, a').show();\n menu.children('span.c-saving').remove('.c-saving');\n }", "title": "" }, { "docid": "70c561e0ac86c89f629d6e95f2d637f1", "score": "0.68078893", "text": "_handleClickButtonSave()\n {\n Radio.channel('rodan').request(RODAN_EVENTS.REQUEST__RESOURCE_SAVE, {resource: this.model,\n fields: {resource_type: this.ui.selectResourceType.find(':selected').val(),\n name: this.ui.resourceName.val(),\n description: this.ui.resourceDescription.val()}});\n }", "title": "" }, { "docid": "be446c0b14260ffd1e38d286d52ae8e1", "score": "0.6760086", "text": "function editDialogSave() {\n\tvar index = parseInt(document.formEdit.editingIndex.value);\n\tvar required = 0;\n\tif (document.formEdit.fieldRequired[1].checked == true) required = 1\n\t// Daten speichern\n\tdocument.getElementsByName('ffi_Desc[]')[index].value = document.formEdit.fieldDesc.value;\n\tdocument.getElementsByName('ffi_Name[]')[index].value = document.formEdit.fieldName.value;\n\tdocument.getElementsByName('ffi_Value[]')[index].value = document.formEdit.fieldValue.value;\n\tdocument.getElementsByName('ffi_Required[]')[index].value = required;\n\tdocument.getElementsByName('ffi_Class[]')[index].value = document.formEdit.fieldClass.value;\n\tdocument.getElementsByName('ffi_Width[]')[index].value = document.formEdit.fieldWidth.value;\n\tdocument.getElementsByName('ffi_Changed[]')[index].value = 1;\n\t// Dialog ausblenden\n\teditDialogHide();\n\t// Speichern der Angaben\n\tupdateFormfield(index);\n\tdocument.formEdit.submit();\n}", "title": "" }, { "docid": "a37d152d533166383d7b83834b062e41", "score": "0.67487466", "text": "function onDoneClick() { \n //Publish the save rule event so that the back-end logic can be invoked\n $('.modal .RbRuleContainer').trigger(RuleBuilderUtils.createEventName(RULE_BUILDER_CONSTANTS.CUSTOM_DOM_EVENTS.CLOSE_DIALOG, \n config.widgetId)); \n }", "title": "" }, { "docid": "ea31ed6d43eab2d256655d521e97cc4b", "score": "0.6738252", "text": "onSaveSettingsPopup() {\n const popup = this.props.pager.grid.popupFactorySaveSettingsPopup.newInstance();\n popup.setGrid(this.props.pager.grid);\n popup.showDialog();\n }", "title": "" }, { "docid": "3a071d1d69cda74a06c99ca3461007ab", "score": "0.66955674", "text": "function createGeneralSaveUI() {\n $save_success_dialog = createConfirmDialog({\n selector: \"#\" + container_id + \" .save-success-dialog\"\n });\n $save_error_dialog = createConfirmDialog({\n selector: \"#\" + container_id + \" .save-error-dialog\"\n });\n $(\".save-button\").on(\"click\", function () {\n var $ui = $(this);\n var $back = $ui.siblings(\".back-button\");\n var $next = $ui.siblings(\".next-button\");\n $back.prop(\"disabled\", true);\n $next.prop(\"disabled\", true);\n $ui.prop(\"disabled\", true);\n var $parent = $ui.parent().parent().parent();\n var from;\n if ($parent.hasClass(\"story-editor-edit-waypoint\")) {\n from = \"waypoint\";\n } else if ($parent.hasClass(\"story-editor-edit-story\")) {\n from = \"story\";\n } else if ($parent.hasClass(\"story-editor-edit-theme\")) {\n from = \"theme\";\n }\n saveStoryCollection({\n desired_sheet_id: current_sheet_id,\n desired_sheet_name: current_sheet_name,\n from: from,\n success: function () {\n $back.prop(\"disabled\", false);\n $next.prop(\"disabled\", false);\n $ui.prop(\"disabled\", false);\n $save_success_dialog.dialog(\"open\");\n },\n error: function () {\n $back.prop(\"disabled\", false);\n $next.prop(\"disabled\", false);\n $ui.prop(\"disabled\", false);\n $save_error_dialog.dialog(\"open\");\n }\n });\n });\n }", "title": "" }, { "docid": "f615dfaac6f329c18a846dde67835b7e", "score": "0.6681654", "text": "function handle_save_button() {\n\tif (add_or_update === 1) {\n\t\tupdate_version()\n\t} else {\n\t\tadd_new_version();\n\t}\n}", "title": "" }, { "docid": "ec3c0c357b56a13e162a5cf937516868", "score": "0.6664475", "text": "save() {\n this.optionForm.onSubmit();\n this.activeModal.close();\n }", "title": "" }, { "docid": "3a6782599729948bdf7afe189f363dd8", "score": "0.660492", "text": "save() {\n // call our confirm function with the file name and mode\n this['confirm'](this['fileName'], this['mode']);\n this.close_();\n }", "title": "" }, { "docid": "3557985a672d31e2cd410dfaf767e38d", "score": "0.6598926", "text": "function save_options() {\n\tif(document.getElementById('display_hide').checked) {\n\t\thideStory = 'hide';\n\t}\n\tif(document.getElementById('display_fade').checked){\n\t\thideStory = 'fade';\n\t}\n\tif (document.getElementById('disable').checked) {\n\t\thideStory = 'disable';\n\t}\n\n\taddon.port.emit('guardar', hideStory);\n\t//animacion\n\tvar status = document.getElementById('status');\n\tstatus.textContent = '✓ Saved';\n\tsetTimeout(function() {\n\t\tstatus.textContent = '';\n\t}, 1000)\n}", "title": "" }, { "docid": "c5fb6a1212ce6ce989543473fc3a7ef8", "score": "0.65667665", "text": "function startSave (event) {\n var spec = event.data,\n menu = spec.closest('.c-menu-scope');\n menu.find('button, a').hide();\n menu.append($('#c-saving').children('span.c-saving').clone(false));\n }", "title": "" }, { "docid": "9fc52cbd5fa9ffe47f5e76769e42b963", "score": "0.65657544", "text": "function onSave() {\r\n\t$.jGrowl('Successfully saved Herb', {\r\n\t\tlife : 3000\r\n\t});\r\n\t$(\"$btnCancel\").click();\r\n}", "title": "" }, { "docid": "bb1406fb5deb374377c54623cc80bee6", "score": "0.65162456", "text": "function save(){\n \n }", "title": "" }, { "docid": "b0d53bd3a1a5b1af32a958552b474e36", "score": "0.6510549", "text": "run() {\n this.suiteView.doSaveAction(true);\n }", "title": "" }, { "docid": "2fcefe79c98c3805ed0c5ed8ce6fabac", "score": "0.6497955", "text": "function onSave() {\n\t\tg.saveData();\n\t\ttogglePanel();\n\t\tlocation.reload();\n\t}", "title": "" }, { "docid": "8ebc2c590070611bf1fc10d97901d4a0", "score": "0.6481511", "text": "function saveProjectSuccess() {\n tbl.clear();\n buttonEvents(); // after redrawing the table, we must wire the new buttons\n $(\"#editDiv\").hide();\n swal(\"הפרויקט נשמר בהצלחה!\", \"הפעולה בוצעה\", \"success\");\n mode = \"\";\n parent.location = 'projectsList.html';\n}", "title": "" }, { "docid": "9c252e9eb6270d60f7bd4426ba0faa02", "score": "0.64791775", "text": "onClickSave() {\n let view = this;\n\n view.$saveBtn.toggleClass('saving', true);\n\n apiCall('post', 'connections/' + view.model.id, view.model)\n .then(() => {\n view.$saveBtn.toggleClass('saving', false);\n \n location.reload(); \n })\n .catch(this.onError);\n }", "title": "" }, { "docid": "e938a8fe478696e9b2ccc6352c273f88", "score": "0.6471997", "text": "function whenGoToSaveUI() {\n if ($save_file_name_textbox.val() == \"\") {\n $save_file_name_textbox.val(current_sheet_name);\n }\n }", "title": "" }, { "docid": "49e8fe0cbefd564cf45e5495622fa96e", "score": "0.6461788", "text": "function askSaveConfirmation() {\n alertPopup(\"Do you want to continue to save?<br />Note: Before saving, You can also first edit your file then translate or first translate then edit your file.\", \"\", scrollPage, \"\");\n}", "title": "" }, { "docid": "eb89649d7e2f9677c9336f257b4a075d", "score": "0.6455065", "text": "save() {\n localStorage.setItem(\"settings\", JSON.stringify(this.data));\n this.confirm();\n }", "title": "" }, { "docid": "0febf30bb335691b2072f5a0a190808d", "score": "0.643638", "text": "function autoSave() {\r\n _this.save(true); // The true value keeps us in the editing state\r\n }", "title": "" }, { "docid": "644344ee8e473bbdb26698c0a19ef25b", "score": "0.6432651", "text": "function save() {\n $rootScope.$broadcast(\"modal:blockAllOperations\");\n ModelService.saveModel($scope.model);\n }", "title": "" }, { "docid": "f6de922b9482edbfcdcef1bf5941d17e", "score": "0.6411538", "text": "function save() {\n global.knockVM._kb_vm.model.save();\n}", "title": "" }, { "docid": "17eb6fb5826d53f06c29ca16d4a8a7a4", "score": "0.64037436", "text": "onSaveClick() {\n console.log(\"Saving!\");\n this.configMap.on_save();\n return false;\n }", "title": "" }, { "docid": "cdb6d1e929e485b2c00d1de45026d229", "score": "0.6387977", "text": "function addSaveButtonVisibilityHandler() {\n $(\"#central_service_save_ok\").enableForInput(\n $(\"#central_service_details_service_code\"));\n }", "title": "" }, { "docid": "eb8ee6ae532d8f56f29d9abf08eac0c5", "score": "0.63748693", "text": "function setSaved() {\n $(\".tablemenu input[type=submit]\")\n .removeClass('unsaved')\n .addClass('saved');\n }", "title": "" }, { "docid": "8bda060a1f4b21845c065f17a6fce1a5", "score": "0.6348535", "text": "_saveButtonView_pressed()\n\t{\n\t\tsuper._saveButtonView_pressed()\n\t\t//\n\t\tconst self = this\n\t\tself._tryToCreateOrSaveContact()\n\t}", "title": "" }, { "docid": "d42f0c47433a1ae383a42e78911978ab", "score": "0.6334705", "text": "_save() {\n let context = this._context;\n // Trigger the next update.\n this._setTimer();\n if (!context) {\n return;\n }\n // Bail if the model is not dirty or the file is not writable, or the dialog\n // is already showing.\n let writable = context.contentsModel && context.contentsModel.writable;\n if (!writable || !context.model.dirty || this._inDialog) {\n return;\n }\n let start = new Date().getTime();\n context\n .save()\n .then(() => {\n if (this.isDisposed) {\n return;\n }\n let duration = new Date().getTime() - start;\n // New save interval: higher of 10x save duration or min interval.\n this._interval = Math.max(this._multiplier * duration, this._minInterval);\n // Restart the update to pick up the new interval.\n this._setTimer();\n })\n .catch(err => {\n // If the user canceled the save, do nothing.\n if (err.message === 'Cancel') {\n return;\n }\n // Otherwise, log the error.\n console.error('Error in Auto-Save', err.message);\n });\n }", "title": "" }, { "docid": "247e3dbfffe082ab0e9358e11cbf97af", "score": "0.63331693", "text": "onSave() {\n this.activityForm.onSave();\n }", "title": "" }, { "docid": "6a37c5b86f32311dea5e6b1d0d40c9b4", "score": "0.63286257", "text": "function submitSave()\n {\n if (isValidForm()) {\n showWaitMsg(); // msc its 966 show please wait message\n document.forms[0].cmd.value = save;\n document.forms[0].submit();\n }\n else {\n // reset Save buttons to display as enabled\n if (mtbSave) {\n mtbSave.reset();\n }\n if (mtbSave2) {\n mtbSave2.reset();\n }\n }\n }//end function", "title": "" }, { "docid": "ba7ec9190d0449d92536a23425c454e5", "score": "0.63265735", "text": "function save() {\n\tvar code = '<center><b>Save snapshot</b></center><br><label for=\"snap_name\">Name: </label><input id=\"snap_name\" type=\"text\" placeholder=\"Snapshot name...\"><br><br><button class=\"btn btn-default\" id=\"save\" onclick=\"send($(\\'#snap_name\\').val());$(\\'#overlay\\').hide();$(\\'#overlay-back\\').hide()\">Save</button> <button class=\"btn btn-default\" id=\"cancel\" onclick=\"$(\\'#overlay\\').hide();$(\\'#overlay-back\\').hide()\">Cancel</button>';\n\t$('#loading').html(code);\n\t$('#overlay').show();\n\t$('#overlay-back').show();\n}", "title": "" }, { "docid": "5fcd2120899e47b44909bb2905c7a0b0", "score": "0.6313892", "text": "static setExecuteButtonToAddBook() {\r\n\t\tlet btn = document.getElementById(\"add-book\");\r\n\r\n\t\tif (btn.value === \"UPDATE BOOK\") {\r\n\t\t\tdocument.getElementById(\"add-book\").value = \"ADD BOOK\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e00f2373c2e5b7501754093a3e883c3e", "score": "0.63120645", "text": "function saveDialog() {\n const options = {\n title: 'Save a letter',\n filters: [\n {name: 'Letter', extensions: ['let']}\n ]\n };\n dialog.showSaveDialog(options, (filename) => {\n mainWindow.send('saved-file', filename)\n })\n}", "title": "" }, { "docid": "31cd3020ffcd06cf143bfe63ec51dd7a", "score": "0.63063914", "text": "static setExecuteButtonToUpdateButton() {\r\n\t\tlet btn = document.getElementById(\"add-book\");\r\n\r\n\t\tif (btn.value === \"ADD BOOK\") {\r\n\t\t\tdocument.getElementById(\"add-book\").value = \"UPDATE BOOK\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "25cd4b7dae125ff38edc7daa4bc7c350", "score": "0.62959504", "text": "function save() {\n\tconst inp = document.getElementById(\"newsetname\")\n\tif (inp.style.display == \"inline\") {\n\t\tsetname = inp.value\n\t}\n\tif (setname) {\n\t\tset.name = setname\n\t\tcfg.set(\"set\", setname)\n\t\tgetValues()\n\t\ttoggle()\n\t\tsetValues()\n\t\tinp.value = \"\"\n\t\tinp.style.display = \"none\"\n\t} else {\n\t\talert(\"Please enter a name for this backup profile\")\n\t\tinp.focus()\n\t}\n}", "title": "" }, { "docid": "94fb84dd916be6556a2ed5d64d16672a", "score": "0.6289931", "text": "handleSave() {\n // Show save dialog\n this.setState({\n savePopupShown: true,\n formPopupError: false,\n formPopupErrorMessage: \"\",\n });\n }", "title": "" }, { "docid": "2003e6c7df8143bfc3a811c0cc3b18b8", "score": "0.62860495", "text": "function SwitchAndSave() {\n\tSwitch();\n\tactiveDocument.save();\n}", "title": "" }, { "docid": "b74e253024ad4572aae411d4eef8e7b7", "score": "0.6283921", "text": "function bind_save_button_click($button) {\n $button.click(function () {\n var instance = populate_instance();\n if (settings.save_callback !== null) {\n settings.save_callback(instance, settings.closure_data);\n }\n });\n }", "title": "" }, { "docid": "e0d1f9f05800394f14ba2c8665a4901e", "score": "0.6278055", "text": "openSaveWorkModalDialog() {\n //Show dialog\n this.setState({modalIsOpen: true});\n\n //Analytics opened how to save your work\n Analytics.sendEvent(Analytics.getDataLayerOptions(\"link clicked: \" + this.props.buttonText, \"Saving your work\"));\n }", "title": "" }, { "docid": "1bac337e1da98dda79ac4a16ca00099b", "score": "0.62769383", "text": "function evhan_accept_button(ev) {\n ev.preventDefault();\n if (!is_open)\n return false;\n\n //GlkOte.log('### accept save');\n var fel = $('#'+dialog_el_id+'_infield');\n if (!fel.length)\n return false;\n var filename = fel.val();\n filename = jQuery.trim(filename);\n if (!filename.length)\n return false;\n\n var callback = dialog_callback;\n //GlkOte.log('### selected ' + filename);\n dialog_close();\n if (callback)\n callback(filename);\n\n return false;\n}", "title": "" }, { "docid": "767bd4ae6fdfd9fbdba681e9d54b72d7", "score": "0.6267966", "text": "function loadSave(){\n\t// disable \"Publish\" tab\n tabsFrame.setTabEnabled(\"page7\", false);\n \n\t// get grid and activity and process buttons\n var form = Ab.view.View.getControl('', 'afm_processes_form');\n var activityObj = $('afm_processes_form_afm_processes.activity_id');\n var processObj = $('afm_processes_form_afm_processes.process_id');\n \n\t// set the activity and process buttons to readOnly and disabled\n activityObj.readOnly = true;\n processObj.readOnly = true;\n activityObj.disabled = false;\n processObj.disabled = false;\n\t\n\t// if no activity selected, clear the default\n if (tabsFrame.activity_id == undefined) {\n form.setInputValue('afm_processes.activity_id', '');\n form.setInputValue('afm_processes.process_id', '');\n }\n else {\n\t\t// otherwise, fill in with previously selected activity and process\n form.setInputValue('afm_processes.activity_id', tabsFrame.activity_id);\n form.setInputValue('afm_processes.process_id', tabsFrame.process_id);\n }\n \n\t// show \"Publish\", \"Save View\", and \"Start Over\" buttons\n $('publishToPNav').style.display = \"\";\n $('saveView').style.display = \"\";\n $('startOver').style.display = \"\";\n \n\t// enable activity select value button and hide create, convert, publish buttons\n $('selectActivity').readOnly = false;\n $('createNewView').style.display = \"none\";\n $('convertNewView').style.display = \"none\";\n $('publishToPNav').style.display = \"none\";\n \n\t \n\t// enable file name input box\n $('textFileName').readOnly = false;\n\t\n\t// disable save button\n $('saveView').disabled = true;\n \n\t// get file name\n var uniqueFileName = tabsFrame.uniqueFileName;\n if (uniqueFileName == undefined) {\n uniqueFileName = \"\";\n }\n\t\n // Manually create label for file name\n $('textFileName').parentNode.previousSibling.innerHTML = getMessage(\"saveName\");\n \n // append username\n //if(isMiniWizard()){\n //\tuniqueFileName += View.user.name;\n //}\n\n\t\t// 3024706\n $('textFileName').value = \"a\" + uniqueFileName + \".axvw\";\n $('textFileName').disabled = false;\n $('fileSavedConfirmation').innerHTML = \"\";\n}", "title": "" }, { "docid": "dd3629d7a6e8e586c7e03f44bf6407d5", "score": "0.624001", "text": "function saveClick(e){\n\te.preventDefault();\n\ttinker.save();\n}", "title": "" }, { "docid": "8676c94ba2d56e7ee126eb22ef38e5b8", "score": "0.622934", "text": "function handleSaveButton() {\n dispatch({\n type: 'change_presets',\n maxBreakTime: (presetsState.breakMin * 60) + presetsState.breakSec, // Minutes + Seconds => Just seconds\n maxWorkTime: (presetsState.workMin * 60) + presetsState.workSec, // Minutes + Seconds => Just seconds\n maxSeries: presetsState.series\n });\n dispatch({ type: 'reset' });\n\n navigation.navigate('Home');\n }", "title": "" }, { "docid": "ea332b1176b43881b2ae7e49195a2d6e", "score": "0.6225308", "text": "function save (){\n\n}", "title": "" }, { "docid": "2d0102f1bc696899d2104019be889a16", "score": "0.62243944", "text": "function filterSaveClick() {\n // console.log('filterSaveClick');\n\n Common.Settings.Filters.Brightness = PageData.Controls.Brightness.value;\n Common.Settings.Filters.Contrast = PageData.Controls.Contrast.value;\n Common.Settings.Filters.Hue = PageData.Controls.Hue.value;\n Common.Settings.Filters.Saturation = PageData.Controls.Saturation.value;\n\n Common.saveSettings();\n\n PageData.ControlsOpen = false;\n setControlsPosition();\n}", "title": "" }, { "docid": "7e66ffb28a3624e28f4a34eb806ec537", "score": "0.6221699", "text": "function save() {\n vm.page.saveButtonState = 'busy';\n vm.script.content = vm.editor.getValue();\n contentEditingHelper.contentEditorPerformSave({\n saveMethod: codefileResource.save,\n scope: $scope,\n content: vm.script,\n rebindCallback: function rebindCallback(orignal, saved) {\n }\n }).then(function (saved) {\n localizationService.localizeMany([\n 'speechBubbles_fileSavedHeader',\n 'speechBubbles_fileSavedText'\n ]).then(function (data) {\n var header = data[0];\n var message = data[1];\n notificationsService.success(header, message);\n });\n //check if the name changed, if so we need to redirect\n if (vm.script.id !== saved.id) {\n contentEditingHelper.redirectToRenamedContent(saved.id);\n } else {\n vm.page.saveButtonState = 'success';\n vm.script = saved;\n //sync state\n editorState.set(vm.script);\n // sync tree\n navigationService.syncTree({\n tree: 'scripts',\n path: vm.script.path,\n forceReload: true\n }).then(function (syncArgs) {\n vm.page.menu.currentNode = syncArgs.node;\n });\n }\n }, function (err) {\n vm.page.saveButtonState = 'error';\n localizationService.localizeMany([\n 'speechBubbles_validationFailedHeader',\n 'speechBubbles_validationFailedMessage'\n ]).then(function (data) {\n var header = data[0];\n var message = data[1];\n notificationsService.error(header, message);\n });\n });\n }", "title": "" }, { "docid": "f73b9c292a95f59075e707e3e84c5a45", "score": "0.621669", "text": "function activateSaveButton(edit) {\n //console.log(\"entro\");\n //console.log(\"jquery\"+$(edit).id); undefined\n //console.log(\"js\"+edit.id); right answer\n var id= edit.id;\n $('#guardar'+edit.id).css('display','inline');\n //enable input fields\n $('#number'+id).prop(\"disabled\", false);\n $('#name'+id).prop(\"disabled\", false);\n}", "title": "" }, { "docid": "1fe65e7f5c3f4e6817e9040659b4d2b1", "score": "0.62115484", "text": "submitSaveChanges() {\n confirmAlert({\n title: 'Bekreftelse av rediering',\n message: 'Er du sikker på at du vil redigere brukeren?',\n buttons: [\n {\n label: 'Ja',\n onClick : () => this.saveChanges()\n },\n {\n label: 'Nei'\n }\n ]\n });\n }", "title": "" }, { "docid": "3c1d6df1cd18feaed0ac26eb59728feb", "score": "0.62019426", "text": "onSaveActionFulfilled() {\n this.set('showFormSuccessMessage', true);\n this.set('showFormErrorMessage', false);\n\n this._super(...arguments);\n }", "title": "" }, { "docid": "a225c4113972426357e0902ea7b6543f", "score": "0.61965334", "text": "handleSave() {\n const { editor, target } = this;\n const code = this.getCodeViewer().getContent();\n target.set(keyCustomCode, code);\n target.trigger(`change:${keyCustomCode}`);\n var nestedComp = getAllComponents(target);\n if (nestedComp.length > 0) {\n $(nestedComp).each(function (index, value) {\n value.set({ removable: false, draggable: false, droppable: false, badgable: false, stylable: false, highlightable: false, copyable: false, resizable: false, layerable: false, selectable: false, editable: false, hoverable: false });\n });\n }\n editor.Modal.close();\n }", "title": "" }, { "docid": "3079cb38448411854ad5f5861b92ce91", "score": "0.61926085", "text": "function savedoc(mode) {\r\n\r\n //called from saverecord_onclick()\r\n if (!mode)\r\n mode = 'SAVE'\r\n\r\n //first update the current field\r\n //otherwise the db is updated without the last entry!!!\r\n if (!validateupdate())\r\n return false\r\n\r\n if (gKeyNodes && (!gchangesmade || !glocked) && !gallowsavewithoutchanges) {\r\n neosysinvalid('Nothing to be saved.\\r\\rPlease enter or change some data first or just click Close')\r\n return false\r\n }\r\n\r\n //return saveandorcleardoc(mode,save=true,clear=false)\r\n return saveandorcleardoc(mode)\r\n\r\n}", "title": "" }, { "docid": "851f8181d0ccbeeb3ea83247df78ba2b", "score": "0.6187112", "text": "function handleSave(e) {\n }", "title": "" }, { "docid": "38953413a335226aaebce0500a1c1bfd", "score": "0.61733663", "text": "save(close = false) {\n let data = this[this.dataKey]\n\n // pre-validation?\n if (this.preSaveValidation) {\n const validationErrorMessage = this.preSaveValidation();\n\n // if has validation error => show error text and stop the submit process\n if (validationErrorMessage) {\n ALERT_DIALOG.show(validationErrorMessage);\n return;\n }\n }\n\n if (close) {\n this.$emit(this.emitSaveAndCloseKey, data)\n } else {\n this.$emit(this.emitSaveKey, data)\n }\n }", "title": "" }, { "docid": "67902e4426f816a8731219b59cc5b4e2", "score": "0.61704934", "text": "function displaySelectSave() {\n var form = document.createElement(\"div\");\n var selected = getSelectedValues(true, true);\n form.setAttribute(\"id\", \"change-save-form\");\n form.appendChild( createFormTitle(\"Change Save\") );\n form.appendChild( createSystemMenu( selected.system, false, true, true, true, true ) );\n form.appendChild( createFolderMenu( selected.parents, selected.system, false, false, true, true) );\n form.appendChild( createGameMenu(selected.game, selected.system, false, true, selected.parents, true) );\n form.appendChild( createSaveMenu(selected.save, selected.system, selected.game, true, selected.parents) );\n form.appendChild( createButton( \"Change Save\", function(event) {\n if( (!event.detail || event.detail == 1) && !makingRequest ) {\n startRequest();\n var systemSelect = document.querySelector(\".modal #change-save-form #system-select\");\n var gameSelect = document.querySelector(\".modal #change-save-form #game-select\");\n var saveSelect = document.querySelector(\".modal #change-save-form #save-select\");\n var parents = extractParentsFromFolderMenu();\n changeSave( systemSelect.options[systemSelect.selectedIndex].value, gameSelect.options[gameSelect.selectedIndex].value, saveSelect.options[saveSelect.selectedIndex].value, parents );\n }\n } ) );\n launchModal( form );\n}", "title": "" }, { "docid": "dce02823d1df662f8d60d05136600dc3", "score": "0.6162789", "text": "function saveModalDataClient() {\r\n\r\n $(\"[id$=modalHdnType]\").val(dialog.getModalBody().find(\"[id$=modalHdnType]\").val());\r\n $(\"[id$=modalActionHdn]\").val(dialog.getModalBody().find(\"[id$=modalActionHdn]\").val());\r\n $(\"[id$=modalIdentifierHdn]\").val(dialog.getModalBody().find(\"[id$=modalIdentifierHdn]\").val());\r\n $(\"[id$=modalInput1]\").val(dialog.getModalBody().find(\"[id$=modalInput1]\").val());\r\n $(\"[id$=modalInput2]\").val(dialog.getModalBody().find(\"[id$=modalInput2]\").val());\r\n\r\n //Invoke server side event for save.\r\n $(\"[id$=btSaveModalId]\").click();\r\n}", "title": "" }, { "docid": "8267a612389ee714166eb681909e0b87", "score": "0.615825", "text": "function changeSaveBtnColor() {\n const saveNeeded = isSaveNeeded($(this).attr(\"data-time\"), $(this).val());\n const saveBtn = $(this).parent()\n .children(\"div.input-group-append\")\n .children(\"button\");\n if (saveNeeded) {\n saveBtn.addClass(\"need-save\");\n }\n else {\n saveBtn.removeClass(\"need-save\");\n }\n\n }", "title": "" }, { "docid": "e77732f400d4d51ae57bc92b66de1e1f", "score": "0.61535025", "text": "function save() {\n vm.page.saveButtonState = 'busy';\n vm.partialViewMacro.content = vm.editor.getValue();\n contentEditingHelper.contentEditorPerformSave({\n saveMethod: codefileResource.save,\n scope: $scope,\n content: vm.partialViewMacro,\n rebindCallback: function rebindCallback(orignal, saved) {\n }\n }).then(function (saved) {\n // create macro if needed\n if ($routeParams.create && $routeParams.nomacro !== 'true') {\n macroResource.createPartialViewMacroWithFile(saved.virtualPath, saved.name).then(function (created) {\n navigationService.syncTree({\n tree: 'macros',\n path: '-1,new',\n forceReload: true,\n activate: false\n });\n completeSave(saved);\n }, Utilities.noop);\n } else {\n completeSave(saved);\n }\n }, function (err) {\n vm.page.saveButtonState = 'error';\n localizationService.localize('speechBubbles_validationFailedHeader').then(function (headerValue) {\n localizationService.localize('speechBubbles_validationFailedMessage').then(function (msgValue) {\n notificationsService.error(headerValue, msgValue);\n });\n });\n });\n }", "title": "" }, { "docid": "577c9c9cfc7b816614fda0398778f666", "score": "0.6151302", "text": "savefiledlg(Variant, Variant, Variant, Variant) {\n\n }", "title": "" }, { "docid": "8edc3378dcbfdb9b973e0ce63ea9054b", "score": "0.61489457", "text": "function handleSaveClick (cb) {\n const query = {}\n if (!saveAllWindowsCheckbox.checked) {\n query.windowId = chrome.windows.WINDOW_ID_CURRENT\n }\n chrome.tabs.query(query, cb)\n }", "title": "" }, { "docid": "e5538355e047eef5c77bf43ad05550d3", "score": "0.6148508", "text": "function btn_save_work(p_hdn_tag_obj,p_hdn_value_obj,p_url,p_dateNow,obj_date,message){\r\n\ttry{\r\n\t\tif(date_compare(p_dateNow,obj_date.value) > 0){\r\n\t\t\talert(message);\r\n\t\t\tobj_date.focus();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}catch(e){;}\r\n\t_save_xml_tag_and_value_list(document.forms[0], p_hdn_tag_obj, p_hdn_value_obj, true);\r\n\tif (verify(document.forms[0])){\t\r\n\t\t//Hidden luu danh sach the va gia tri tuong ung trong xau XML\t\t\t\r\n\t\tdocument.getElementById('hdn_XmlTagValueList').value = p_hdn_tag_obj.value + '|{*^*}|' + p_hdn_value_obj.value;\t\r\n\t\t//document.getElementsByTagName('form')[0].disabled = true;\r\n\t\tdocument.getElementsByTagName('form')[0].action = p_url;\r\n\t\tdocument.getElementsByTagName('form')[0].submit(); \r\n\t}\t\r\n}", "title": "" }, { "docid": "02a411824f575dda02f014a87a7d484c", "score": "0.6128671", "text": "function displayUpdateSave() {\n var form = document.createElement(\"div\");\n var selected = getSelectedValues(true, true);\n form.setAttribute(\"id\", \"update-save-form\");\n form.appendChild( createFormTitle(\"Update Save\") );\n form.appendChild( createSystemMenu( selected.system, false, true, true, true, true, null, null, true ) );\n form.appendChild( createFolderMenu( selected.parents, selected.system, false, false, true, true, null, null, null, null, true) );\n form.appendChild( createGameMenu(selected.game, selected.system, false, true, selected.parents, true, null, true) );\n var saveMenu = createSaveMenu(selected.save, selected.system, selected.game, true, selected.parents, true);\n form.appendChild( saveMenu );\n var saveInput = createSaveInput(null, true);\n form.appendChild( saveInput );\n form.appendChild( createButton( \"Update Save\", function(event) {\n if( (!event.detail || event.detail == 1) && !makingRequest ) {\n startRequest();\n var systemSelect = document.querySelector(\".modal #update-save-form #system-select\");\n var gameSelect = document.querySelector(\".modal #update-save-form #game-select\");\n var saveSelect = document.querySelector(\".modal #update-save-form #save-select\");\n var saveInput = document.querySelector(\".modal #update-save-form #save-input\");\n var parents = extractParentsFromFolderMenu();\n updateSave( systemSelect.options[systemSelect.selectedIndex].value, gameSelect.options[gameSelect.selectedIndex].value, parents, saveSelect.options[saveSelect.selectedIndex].value, saveInput.value );\n }\n }, [saveInput.firstElementChild.nextElementSibling] ) );\n launchModal( form );\n}", "title": "" }, { "docid": "ae2a66ac370921061ad5cfad4ed57181", "score": "0.6124847", "text": "function saveSelection() {\n _server__WEBPACK_IMPORTED_MODULE_2__[\"default\"].post('question/toggle', {\n questions: questions.data\n }).then(function () {\n enqueueSnackbar('Votre sélection a bien été enregistrée !', {\n variant: 'success',\n anchorOrigin: {\n vertical: 'top',\n horizontal: 'center'\n }\n });\n });\n }", "title": "" }, { "docid": "247961cc4ac75f7d1c9f78f61fb7d12b", "score": "0.6119905", "text": "function setUpSaveButton(exercise){ \n var currentQuestion = exercise.questions[exercise.currentQuestion - 1];\n var saveQuestionButton = document.getElementById(exercise.name + \"SaveButton\");\n saveQuestionButton.onclick = function() {\n if(confirm(\"Are you sure you want to save changes?\")){\n if(canvasBlank(currentQuestion)){\n alert(\"Please ensure all canvases are complete\");\n }\n else prepareQuestionForSave(currentQuestion,exercise.num,exercise.currentQuestion)};\n \n }\n }", "title": "" }, { "docid": "b27bad17665a400ee3c6981ff098c283", "score": "0.61185503", "text": "function save_options_reload() {\n\tif(document.getElementById('display_hide').checked) {\n\t\thideStory = 'hide';\n\t}\n\tif(document.getElementById('display_fade').checked){\n\t\thideStory = 'fade';\n\t}\n\tif (document.getElementById('disable').checked) {\n\t\thideStory = 'disable';\n\t}\n\n\taddon.port.emit('guardar', hideStory);\n\taddon.port.emit('recargar', '');\n\t//animacion\n\tvar status = document.getElementById('status');\n\tstatus.textContent = '✓ Saved';\n\tsetTimeout(function() {\n\t\tstatus.textContent = '';\n\t}, 1000)\n}", "title": "" }, { "docid": "0fdc0d11b8cab673ef0d453c0d02f7a1", "score": "0.6108761", "text": "function save(dialog) {\n var serviceData = getSaveableCentralServiceData();\n var controllerAction = isNew ?\n \"save_service\" : \"update_service\";\n\n $.post(\"central_services/\" + controllerAction, serviceData, function() {\n XROAD_CENTRAL_SERVICES.refreshTable();\n $(dialog).dialog(\"close\");\n }, \"json\");\n }", "title": "" }, { "docid": "12a0770f9a225d6e57428530820522f8", "score": "0.6106607", "text": "function save_options() {\n\tlocalStorage['MagicInputs_defaultPreset']=(JSON.stringify(window.sts));\n\t$('changed').fadeOut();\n\twindow.onbeforeunload=null;\n\talert(window.miText['saved']);\n}", "title": "" }, { "docid": "51ca82379e80d96928eb2274acf0827c", "score": "0.6104586", "text": "function save() {\n // Update stored options\n _.each(BINDINGS, function(combo, name) {\n localStorage[name] = KEYS.getComboString(combo);\n });\n\n success('Options Saved.');\n }", "title": "" }, { "docid": "507bca72bddb8d9f4433f0ee38ff7ee3", "score": "0.610277", "text": "function saveSettings(event) {\n if (event.target.tagName.toLowerCase() === 'button') {\n event.preventDefault();\n var selectedValues = [];\n $(\"#translation_locale :selected\").each(function(){\n selectedValues.push($(this).val());\n });\n //alert(selectedValues);\n\n GM_setValue('lang', selectedValues);\n\n setTimeout(function() {\n document.querySelector('body').removeEventListener('click', saveSettings, false);\n actions.children[0].click();\n }, 500);\n }\n }", "title": "" }, { "docid": "f2add75edd67261b6571d19c070ffe22", "score": "0.6093623", "text": "function setDirty() {\n dirty = true;\n SaveButton.disabled = false;\n window.onbeforeunload = function() {\n return 'Save changes first?';\n };\n}", "title": "" }, { "docid": "27e8381ca862a6907be5c9f1cdfe632f", "score": "0.6091161", "text": "function saveEvent() {\r\n\t\tdocument.getElementById(\"eventForm\").showPreview.value = 'false';\r\n\t\tsubmitEvent();\r\n\t}", "title": "" }, { "docid": "77084129ffb1cbf4a46ba8f681f6e7c5", "score": "0.60884917", "text": "function save()\n{\n\n}", "title": "" }, { "docid": "111e262131addde125106469bc5b11e4", "score": "0.6086909", "text": "function onSaveSuccess(data, response, xhr)\n\t{\n\t\tthis.sidebar.layout.removeClass('saving');\n\t\tthis.data.fields = data.fields;\n\t\tthis.sidebar.breadcrumbsView.back();\n\t\tthis.renderGridView();\n\t\tthis.showGridView();\n\t\tLiveUpdater.changedModel(this.data.field);\n\t}", "title": "" }, { "docid": "60a44093931fccce62ac8b2e9d71ad98", "score": "0.6085617", "text": "function saveChoice(btn) {\n\t\t\tif (!nameTextField.validate()) {\n\t\t\t\tExt.MessageBox.show({\n\t\t\t\t\t\ttitle : 'Warning!',\n\t\t\t\t\t\tmsg : 'Please specify your Name',\n\t\t\t\t\t\twidth : 75,\n\t\t\t\t\t\tbuttons : Ext.MessageBox.OK\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!emailTextField.validate()) {\n\t\t\t\tExt.MessageBox.show({\n\t\t\t\t\t\ttitle : 'Warning!',\n\t\t\t\t\t\tmsg : 'Please enter valid email-id',\n\t\t\t\t\t\twidth : 175,\n\t\t\t\t\t\tbuttons : Ext.MessageBox.OK\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!commentTextArea.validate()) {\n\t\t\t\tExt.MessageBox.show({\n\t\t\t\t\t\ttitle : 'Warning!',\n\t\t\t\t\t\tmsg : 'Please specify your reason',\n\t\t\t\t\t\twidth : 175,\n\t\t\t\t\t\tbuttons : Ext.MessageBox.OK\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar selectedBrws = new Array();\n\t\t\tselectedBrws = favBrowserCheckBoxGroup.getChecked();\n\t\t\tvar checkedBrws = new Array(7);\n\t\t\tfor (j = 0; j < 7; ++j) {\n\t\t\t\tcheckedBrws[j] = 0;\n\t\t\t}\n\t\t\tfor (i = 0; i < selectedBrws.length; ++ i) {\n\t\t\t\tif (selectedBrws[i].getName() != null) {\n\t\t\t\t\tcheckedBrws[parseInt(selectedBrws[i].getName())-1] = 1;\n\t\t\t\t} \n\t\t\t}\n\n\t\t\tif (selectedBrws.length == 0) {\n\t\t\t\tExt.MessageBox.show({\n\t\t\t\t\t\ttitle : 'Warning!',\n\t\t\t\t\t\tmsg : 'Please select atleast one browser',\n\t\t\t\t\t\twidth : 200,\n\t\t\t\t\t\tbuttons : Ext.MessageBox.OK\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tExt.Ajax.request({\n\t\t\t\turl : 'insertSurveyDetiails.php',\n\t\t\t\tmethod : 'POST',\n\t\t\t\tparams : {\n\t\t\t\t\tname : nameTextField.getValue(), // TimeFrameIndex is the selected option of the TimeFrameaList\n\t\t\t\t\temail : emailTextField.getValue(), // NotificationIndex is the selected option of the NotificationList\n\t\t\t\t\tIE : checkedBrws[0],\n\t\t\t\t\tfirefox : checkedBrws[1],\n\t\t\t\t\tsafari : checkedBrws[2],\n\t\t\t\t\tchrome : checkedBrws[3],\n\t\t\t\t\topera : checkedBrws[4],\n\t\t\t\t\tkonquer : checkedBrws[5],\n\t\t\t\t\tlynx : checkedBrws[6],\n\t\t\t\t\treason : commentTextArea.getValue(),\n\t\t\t\t\tconfirm : 1\n\t\t\t\t},\n\t\t\t\tscope : this\n\t\t\t});\n\n\t\t\tExt.MessageBox.show({\n\t\t\t\t\t\ttitle : 'Confirmation!',\n\t\t\t\t\t\tmsg : 'Thank you for participating in the Survey.',\n\t\t\t\t\t\twidth : 300,\n\t\t\t\t\t\tbuttons : Ext.MessageBox.OK,\n\t\t\t\t\t\tanimateTarget : 'confirm-button'\n\t\t\t\t\t});\n\t\t\t// Update results\n\t\t\tshowResults();\n\t\t}", "title": "" }, { "docid": "cbe1b988efef8f76baffb38c6c4269cf", "score": "0.60843533", "text": "batchSave() {\n this.endEdit();\n }", "title": "" }, { "docid": "848b6f9518861cce246e0e164eece9ad", "score": "0.6083596", "text": "function dialogOk(){\r\n// parentDialog.Ok();\r\n}", "title": "" }, { "docid": "5edaacc29ac2a331893b305978f6f2f2", "score": "0.6079795", "text": "function saveButton() {\n\t$(this).hide();\t\n\t// Show the save button\n\t$(this).siblings().find(\".glyphicon-pencil\").parent().show();\n\t// Variable to hold id of row\n\tvar rowID = '#' + $(this).parents('tr').attr('id');\n\t// Loop through each editable field and turn it back into just text\n\t$(rowID).children('.editable').each( function(index, value) {\n\t\tvar temp = $(this).children('input').val();\n\t\t$(this).html(temp);\n\t});\n\t// Update record in database with the specified key\n\tvar trainRef = trainDatabase.ref().child($(this).parents('tr').attr('id'));\n\ttrainRef.update( {\n\t\ttrainName: $(rowID).children(\".trainName\").text(),\n\t\tdestination: $(rowID).children(\".destination\").text(),\n\t\tfrequency: $(rowID).children(\".frequency\").text()\n\t});\n\t\n}", "title": "" }, { "docid": "a40ea6f20f50b0105f001fd7ac49c049", "score": "0.6072772", "text": "function saveDraft() {\n showNotification('The draft is saved.');\n draftIsSaved = true;\n }", "title": "" }, { "docid": "869c8960ee85ec46df3ff5108ee66c4e", "score": "0.60698086", "text": "function saveButton() {\n var $title = $('#title').val()\n var $body = $('#task').val()\n var newIdea = new CardObject($title, $body)\n clearInputs()\n storeIdea(newIdea)\n prependCard(newIdea)\n}", "title": "" }, { "docid": "30fcd8460784caf08225fdb221c575a4", "score": "0.60616106", "text": "function save() {\n\t\t\t\t\t\t// Check if anything changed with dimensionElements and if Dimension has Model ($scope.account.model.modelId > 0).\n\t\t\t\t\t\t// If yes - show alert with \"submit immediately\" question.\n\t\t\t\t\t\t// If we save Dimension without Model, task for its Elements is not created, so additional question is unnecessary.\n\t\t\t\t\t\tvar operationCount = 0;\n\t\t\t\t\t\tangular.forEach($scope.account.dimensionElements, function(element) {\n\t\t\t\t\t\t\tif (element.operation == \"update\" || element.operation == \"insert\" || element.operation == \"remove\") {\n\t\t\t\t\t\t\t\toperationCount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (operationCount > 0 && $scope.account.model.modelId > 0) {\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttitle: \"Changes will be saved.\",\n\t\t\t\t\t\t\t\ttext: \"Do you wish to submit the change management request immediately?\",\n\t\t\t\t\t\t\t\ttype: \"warning\",\n\t\t\t\t\t\t\t\tshowCancelButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonColor: \"#d9534f\",\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Yes\",\n\t\t\t\t\t\t\t\tcancelButtonText: \"No\",\n\t\t\t\t\t\t\t}, function(isConfirm) {\n\t\t\t\t\t\t\t\tif (isConfirm) {\n\t\t\t\t\t\t\t\t\t$scope.account.submitChangeManagementRequest = true;\n\t\t\t\t\t\t\t\t\t$rootScope.$broadcast(\"modal:blockAllOperations\");\n\t\t\t\t\t\t\t\t\tAccountService.save($scope.account);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$scope.account.submitChangeManagementRequest = false;\n\t\t\t\t\t\t\t\t\t$rootScope.$broadcast(\"modal:blockAllOperations\");\n\t\t\t\t\t\t\t\t\tAccountService.save($scope.account);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$rootScope.$broadcast(\"modal:blockAllOperations\");\n\t\t\t\t\t\t\tAccountService.save($scope.account);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "title": "" }, { "docid": "3e86a1111448f7355b21d60c94a5898e", "score": "0.6059502", "text": "function onSave() {\r\n\tXimfmailAccountPage.getInstance().save();\r\n}", "title": "" }, { "docid": "850000a8c1ddc4ae529b52a6cea30bd5", "score": "0.60563564", "text": "function save() {\n vm.page.saveButtonState = 'busy';\n vm.partialView.content = vm.editor.getValue();\n contentEditingHelper.contentEditorPerformSave({\n saveMethod: codefileResource.save,\n scope: $scope,\n content: vm.partialView,\n rebindCallback: function rebindCallback(orignal, saved) {\n }\n }).then(function (saved) {\n localizationService.localize('speechBubbles_partialViewSavedHeader').then(function (headerValue) {\n localizationService.localize('speechBubbles_partialViewSavedText').then(function (msgValue) {\n notificationsService.success(headerValue, msgValue);\n });\n });\n //check if the name changed, if so we need to redirect\n if (vm.partialView.id !== saved.id) {\n contentEditingHelper.redirectToRenamedContent(saved.id);\n } else {\n vm.page.saveButtonState = 'success';\n vm.partialView = saved;\n //sync state\n editorState.set(vm.partialView);\n // normal tree sync\n navigationService.syncTree({\n tree: 'partialViews',\n path: vm.partialView.path,\n forceReload: true\n }).then(function (syncArgs) {\n vm.page.menu.currentNode = syncArgs.node;\n });\n // clear $dirty state on form\n setFormState('pristine');\n }\n }, function (err) {\n vm.page.saveButtonState = 'error';\n localizationService.localize('speechBubbles_validationFailedHeader').then(function (headerValue) {\n localizationService.localize('speechBubbles_validationFailedMessage').then(function (msgValue) {\n notificationsService.error(headerValue, msgValue);\n });\n });\n });\n }", "title": "" }, { "docid": "7dc41a81567acc9642c4171ea4b69bc4", "score": "0.60442704", "text": "_setIsSaved(value) {\r\n this._isSaved = value;\r\n }", "title": "" }, { "docid": "add5e16fd70fd6340db44bd6e824d23b", "score": "0.60424876", "text": "function behaviors_save_form() \n{\n\tdocument.getElementById('QC_behaviors_request').value = 'save';\n\tdocument.itemNavForm.submit();\n\treturn false;\n}", "title": "" }, { "docid": "5acc0014d5b8bdfcb7eefa9ed4d48e29", "score": "0.6041996", "text": "function saveFile() {\n model.setFile(filepath,editor.session.doc.getValue());\n }", "title": "" }, { "docid": "ecfe97280284c670ce7db2c5ceefbaab", "score": "0.60282254", "text": "function saveAction(state) {\n api.setSaveMenu(state);\n}", "title": "" }, { "docid": "5153d71f2c62f3a64f0db6e2b54b36b0", "score": "0.6023004", "text": "function saveOptions() {\n //alert('saving');\n var openInNewTab = document.getElementById('openInNewTab').checked;\n var showElink = document.getElementById('showElink').checked;\n var openTwoAtOnce = false; //document.getElementById('openTwoAtOnce').checked;\n chrome.storage.sync.set({\n openInNewTab: openInNewTab,\n showElink: showElink,\n\topenTwoAtOnce: openTwoAtOnce\n }, function() {\n // Update status to let user know options were saved.\n var status = document.getElementById('status');\n status.textContent = 'zapisano! odśwież zakładki z ogłoszeniami';\n setTimeout(function() {\n status.textContent = '';\n }, 1500);\n });\n}", "title": "" }, { "docid": "1e782e8493cf8443843412f543b655d8", "score": "0.6016935", "text": "function saveWithDialog() {\n return FileSystem.pathType(realComponent)\n .then(function(type) {\n var index = realComponent.lastIndexOf('/');\n var openAt;\n\n // Get a reasonable location to open the dialog at.\n if (realComponentType === 'directory') openAt = realComponent;\n else if (realComponentType === 'file') openAt = realComponent.slice(0, index);\n else openAt = buffer.filepath || null;\n\n // Show the save dialog, and get the user's selection.\n return FileSystem.showSaveDialogue(openAt, title)\n .then(function(selection) {\n return FileSystem.writeFile(selection, buffer.text)\n .then(function() {\n buffer.setFilepath(selection);\n });\n });\n });\n }", "title": "" }, { "docid": "38a138d95ba81bba18303ed828a3149b", "score": "0.60141766", "text": "saveSettings() {\n const doIt = this.window_.confirm(\n 'Settings changes take effect immediately. Are you sure?');\n if (doIt) {\n if (this.scope_['virusTotalApiKey'].$dirty) {\n this.saveApiKey_('virustotal');\n }\n if (this.scope_['bit9ApiKey'].$dirty) {\n this.saveApiKey_('bit9');\n }\n if (this.scope_['dataDogApiKey'].$dirty) {\n this.saveApiKey_('datadog');\n }\n if (this.scope_['fbnSantaSyncApiKey'].$dirty) {\n this.saveApiKey_('fbn_santa_sync');\n }\n }\n }", "title": "" }, { "docid": "d386c1b3ea76580f9dbbe21806c891b9", "score": "0.6008535", "text": "function saveAndRun(){\n\tipcRenderer.send('open-break-dialog-countdown', [longTimeSettedBetweenRest.value, longTimeSettedRest.value, longTimeSettedNotification.value, shorTimeSettedBetweenRest.value, shorTimeSettedRest.value, enableSound.checked, enableStrictMode.checked, enableCloseMode.checked, enableCloseWhenPlayVideo.checked, enable_long_break.checked, enable_notification.checked, enable_short_break.checked]);\n}", "title": "" }, { "docid": "b90b753af285f17e2ad1b9c97e912ad2", "score": "0.60082155", "text": "save(){\n pubsub.publish(\"click/savePomodoras\", this.getOptions());\n }", "title": "" }, { "docid": "3ef099ef8f0090fcb6f90da743b92a23", "score": "0.60081387", "text": "function save() {\n var str = myDiagram.model.toJson();\n document.getElementById(\"mySavedModel\").value = str;\n myDiagram.isModified = false;\n }", "title": "" }, { "docid": "b29ddc094d8096a6f2a2f96a23ac04b4", "score": "0.6004791", "text": "function EnableSave()\r\n{\r\n UpdateTitlebar(true);\r\n document.getElementById(\"cmd_save\").removeAttribute(\"disabled\");\r\n}", "title": "" }, { "docid": "0fad34c2e3cd3ac46017c89da917ac4f", "score": "0.60032773", "text": "function saveComplete(success, extraMsg, count) {\n\n bsyDiv[0].style.visibility = \"hidden\";\n // if success, then refresh grid.\n if (success) {\n refreshUI = true;\n }\n if (self.onClose != null) {\n self.onClose();\n }\n disposeComponent();\n\n // var msg = VIS.Msg.getMsg(\"RecordsSavedPlzRequery\");\n var msg = VIS.Msg.getMsg(\"RecSaved\");\n\n if (!success) {\n if (count > 0) {\n msg = count + \" \" + VIS.Msg.getMsg(\"RecordsNotSaved\");\n }\n else\n msg = VIS.Msg.getMsg(\"ErrorInSaving\");\n }\n\n if (extraMsg && extraMsg != \"\")\n msg += \", \" + extraMsg;\n\n VIS.ADialog.info(\"\", true, msg);\n }", "title": "" } ]
6344bead76bc89ce72dbbfd4fe32926d
Check if password matches hash
[ { "docid": "67c9ed9a2de65c89b953080d433b9a61", "score": "0.77518636", "text": "function checkPwd(hash,pwd) {\n return q.ninvoke(bcrypt,\"compare\",pwd, hash);\n}", "title": "" } ]
[ { "docid": "1db328c7a20db6355d47aeabba462620", "score": "0.81266326", "text": "function verifyPassword(hashPass, plainPass) {\n return (hashPass === hashPassword(plainPass))\n}", "title": "" }, { "docid": "94f2baf338f55910bf85fa8b5d73c566", "score": "0.7855902", "text": "function validatePassword(password, hash, salt) {\n const hashVerify = crypto.pbkdf2Sync(password, salt, 10000, 64, 'sha512').toString('hex');\n\n return hash === hashVerify;\n}", "title": "" }, { "docid": "88dc6b1e556bd808896597fbde7adb2d", "score": "0.7827503", "text": "verifyPassword(password) {\n let testHashCode = this.hashPassword(password);\n\n return testHashCode === this._hashCode;\n }", "title": "" }, { "docid": "eb28387a628a84d16e97b0069695191d", "score": "0.7789156", "text": "function checkPassword(pass, fullHash) {\n // Extract the algorithm, expected hash, and salt\n const [algorithm, expectedHash, saltEncoded] = fullHash.split(separator);\n\n // Convert the encoded salt to a buffer\n const salt = Buffer.from(saltEncoded, encoding);\n\n // Compute the actual hash of the password\n const actualHash = generateHash(algorithm, pass, salt);\n\n // Compare the actual hash with the expected hash to verify the password\n return actualHash === expectedHash;\n}", "title": "" }, { "docid": "b0da2955d622e2fdfd21a2a042d8be19", "score": "0.77036244", "text": "async function pwCheck(password, hash) {\n const isValid = await bcryptjs.compare(password, hash);\n return isValid;\n}", "title": "" }, { "docid": "36210ab2fd3452d7fc3fe0b70acf2e3d", "score": "0.7671682", "text": "async passwordMatches(password) {\n const encryptedPassword = crypto.createHash('sha256').update(password).digest('hex');\n return bcrypt.compareSync(encryptedPassword, this.services.password.bcrypt);\n }", "title": "" }, { "docid": "7993cdb5adc4b29b749a3b5369e64362", "score": "0.75890696", "text": "function isValidPassword(input, password) {\n // console.log(\"input: \" + createHash(input));\n // console.log(\"password: \" + password);\n\treturn (password === createHash(input))\n}", "title": "" }, { "docid": "23bb9e62097b1194e65345e1604c9acc", "score": "0.7460791", "text": "function verifyHash(password, original) {\r\n const originalHash = original.split('$')[1];\r\n const salt = original.split('$')[0];\r\n const hash = crypto.pbkdf2Sync(password, salt, 2048, 32, 'sha512').toString('hex');\r\n return hash === originalHash\r\n}", "title": "" }, { "docid": "1d0ce6c8faeaec76b66099c7111a796e", "score": "0.7416644", "text": "function verifyHash(password, original) {\n const originalHash = original.split('$')[1];\n const salt = original.split('$')[0];\n\n const hash = crypto.pbkdf2Sync(password, salt, 2048, 32, 'sha512').toString('hex');\n\n if (hash === originalHash)\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "03e78134de3cd1055def72e08e04ec5a", "score": "0.72611994", "text": "function checkPassword(textEnteredInLoginForm, hashedPasswordFromDatabase, callback) {\n bcrypt.compare(textEnteredInLoginForm, hashedPasswordFromDatabase, function(err, doesMatch) {\n if (err) {\n return callback(err);\n }\n console.log(doesMatch);\n callback(null, doesMatch);\n });\n}", "title": "" }, { "docid": "4b4804d4da74079a962afc3694641028", "score": "0.7220653", "text": "function checkHash(enteredPassword, storedPassword, response, request, rows, callback) {\n bcrypt.compare(enteredPassword, storedPassword, function(err, res) {\n callback(response, request, rows, res);\n });\n}", "title": "" }, { "docid": "8d2e9af4128df6715277f512eb8bb97d", "score": "0.7169239", "text": "function comparePassword(plaintextPassword, hashPassword) {\n return bcrypt.compareSync(plaintextPassword, hashPassword);\n}", "title": "" }, { "docid": "f91d7169703d5770cea5a535e5b49a0a", "score": "0.71447957", "text": "function checkValidPassword(password1, password2) {\n return password1 === password2;\n}", "title": "" }, { "docid": "9f0f9fc508bb14b2716a14e68f89706d", "score": "0.7135516", "text": "function comparePassword(password, hash, callback) {\n winston.info('comparePassword');\n\n bcrypt.compare(password, hash, function (err, match) {\n if (err) {\n return callback(err);\n }\n return callback(null, match);\n });\n}", "title": "" }, { "docid": "d92d7283f15041c13a78b711fb153d7c", "score": "0.7133899", "text": "function isValidUnhashedPassword(input, password) {\n\treturn (input === password);\n}", "title": "" }, { "docid": "c839ccae157296b0198664dc72c83303", "score": "0.7108911", "text": "checkPassword(password) {\n // You should never do this and use an hash of the password in db instead!!\n return this.password === password;\n }", "title": "" }, { "docid": "b3b2d8d4d627f1b494f89fb5d6d5579f", "score": "0.70927304", "text": "function passwordCheck(password){\n if (password) {\n return true\n } else {\n return false\n }\n}", "title": "" }, { "docid": "5f3dea7da4a19f806692e04c2e898b6b", "score": "0.70796645", "text": "function equalPassws (usrPass, usrDbPass) {\n return bcrypt.compareSync(usrPass, usrDbPass)\n}", "title": "" }, { "docid": "d5ad4c705b15fe8e7b9f57262e83218f", "score": "0.7067246", "text": "function comparePassword(pass1,pass2){\n\n if(pass1===pass2){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "e2b13f5b9c6c00798dbe21080b71f594", "score": "0.70537966", "text": "checkPassword(password) {\n return bcrypt.compare(password, this.password_hash);\n }", "title": "" }, { "docid": "15fed57648955c12ceec286fc18ac8f7", "score": "0.7027316", "text": "function isValidPassword(password, username) {\n let newPassWord = password.split(\" \").join(\"\");\n\n if (newPassWord !== username && newPassWord.length >= 8) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "674f880d3d6d8bdd5e61465f71d322bf", "score": "0.70245546", "text": "async comparePasswords(saved, supplied) {\n // saved -> password saved in the database. 'hashed.salt'\n // supplied -> password provided by the user\n\n const [hashed, salt] = saved.split(\".\");\n const hashedSuppliedBuf = await scrypt(supplied, salt, 64);\n\n return hashed === hashedSuppliedBuf.toString(\"hex\");\n }", "title": "" }, { "docid": "3b449f1fe16edf9240b82de1813d0e81", "score": "0.70216954", "text": "function verifyPassword(user, password) {\n return user.password == password;\n}", "title": "" }, { "docid": "975c9e684347790aed6335784c8b5383", "score": "0.70056736", "text": "function checkPassword(textEnteredInLoginForm, hashedPasswordFromDatabase) {\n return new Promise(function(resolve, reject) {\n bcrypt.compare(\n textEnteredInLoginForm,\n hashedPasswordFromDatabase,\n function(err, doesMatch) {\n if (err) {\n reject(err);\n } else {\n resolve(doesMatch);\n }\n }\n );\n });\n}", "title": "" }, { "docid": "d88f225a859c00feccbd43031e6d9f8a", "score": "0.700333", "text": "function compare_hash(password, hashFromDB, callback) {\n bcrypt.compare(password, hashFromDB, function (error, match) {\n if (error) {\n throw error;\n } else {\n callback(error, match);\n }\n });\n}", "title": "" }, { "docid": "6b65d707eee054183d41da258036caa2", "score": "0.69908816", "text": "function is_valid_password(value) { return PASSWORD_PATTERN.test(value); }", "title": "" }, { "docid": "94b4df1c89e0f43fbdffeb90607fb4df", "score": "0.69732314", "text": "checkPasswordsMatch() {\n if (this.formData.password !== this.formData.confirmPassword) {\n this._Alert.passwordsNotMatching();\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "94b4df1c89e0f43fbdffeb90607fb4df", "score": "0.69732314", "text": "checkPasswordsMatch() {\n if (this.formData.password !== this.formData.confirmPassword) {\n this._Alert.passwordsNotMatching();\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "1b721373dadc5788198627ee9084767e", "score": "0.6968153", "text": "async comparePasswords(saved, supplied) {\n const [hashed, salt] = saved.split('.');\n const hashedSupplied = await scrypt(supplied, salt, 64);\n\n return hashed === hashedSupplied.toString('hex');\n }", "title": "" }, { "docid": "d29bfe208e59dfd9020514d2f3474549", "score": "0.6968114", "text": "function checkPasswordsMatch(pass1, pass2) {\n if (pass1.value !== pass2.value) showError(pass2, 'Passwords do not match');\n}", "title": "" }, { "docid": "fa68ea6ea1231f0d0e740d329cd7aef9", "score": "0.6945295", "text": "function valid_password_verify(pwd1, pwd2){\n\tif (pwd1 != pwd2){\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "5f6d6a87f62113457415d58a8936efc5", "score": "0.6941619", "text": "function hashPassword(password){\n if(typeof(str) == 'string' && str.length > 0){\n var hash = crypto.createHmac('sha256', config.hashingSecret).update(str).digest('hex');\n return hash;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "40e286b848b44d17a3c04650219eff85", "score": "0.6939959", "text": "function comparePwd(pwd,hash){ \n return new Promise( (resolve, reject) => {\n bcrypt.compare(pwd, hash, function(err, res) {\n res ? resolve(true) : resolve(false); \n });\n });\n}", "title": "" }, { "docid": "b0d4ca905edc61c5d6b5eb9b289bfb78", "score": "0.69241846", "text": "function testMatchingPassword(id) {\n\tvar x = $(id).value;\n\tvar y = $(\"txtNewPassword\").value;\n\t\n\treturn ( x != y && x.length > 0 );\n}", "title": "" }, { "docid": "339ab654d6296a006182a5848d2d1c90", "score": "0.6906846", "text": "function isValidPassword(pass){\n return pass.length >= 8 && !pass.includes('password');\n}", "title": "" }, { "docid": "934e241f359da08c2aaf7c23afba7d15", "score": "0.6899166", "text": "verifyPassword(unverifiedPassword){\n //encrypt unverifiedPassword\n const encryptedUnverifiedPassword = this.encrypt(unverifiedPassword)\n //compare encryptedUnverifiedPassword with password\n return encryptedUnverifiedPassword === this.get('encryptedPassword')\n }", "title": "" }, { "docid": "03cdcdb8efd4542c32cadc6772698807", "score": "0.6895218", "text": "isValidPassword(password) {\n var passw = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,20}$/;\n if (password.match(passw)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1f0825fea81281fabcaf0f29cf5b06c9", "score": "0.6882788", "text": "function checkpassword($pass1, $pass2) {\n\tif ($pass1 == $pass2) {\n\t\treturn true;\n\t} else { \n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "de22d1b139928b54d3ce5bb731719508", "score": "0.68770826", "text": "matchPasswordPIN(pwd, confrmPwd, message) {\n if (pwd != confrmPwd) {\n Alert.alert(globals.appName, message)\n return false\n }\n return true\n }", "title": "" }, { "docid": "5bd4d94535e0a58cb1d31f18e9db65d8", "score": "0.6869869", "text": "passwordValid(password) {\n return bcryptjs.compare(password, this.password_hash);\n }", "title": "" }, { "docid": "5bdd732023eb6e5b9eeb7baa77b43a72", "score": "0.68319327", "text": "hashPassword(rawPassword){\n var a = 1, c = 0, h, o;\n if (rawPassword) {\n a = 0;\n /*jshint plusplus:false bitwise:false*/\n for (h = rawPassword.length - 1; h >= 0; h--) {\n o = rawPassword.charCodeAt(h);\n a = (a<<6&268435455) + o + (o<<14);\n c = a & 266338304;\n a = c!==0?a^c>>21:a;\n }\n }else {\n\n //Throw an error if password input field is empty \n throw new Error(\"The password is not valid\");\n }\n return String(a);\n }", "title": "" }, { "docid": "2b80e65c72fca561e7cc696e701d9b1d", "score": "0.6828201", "text": "function checkPasswords(fPassword, sPassword) {\n if (fPassword === sPassword) {\n if (fPassword.length >= 8) {\n return true;\n } else {\n swal('Passwords must be a minimum of 8 characters');\n return false;\n }\n } else {\n swal('Passwords do not match');\n return false;\n }\n }", "title": "" }, { "docid": "2aef40d8721e351a40a1d388bce21e0c", "score": "0.6823144", "text": "function isValidPassword(pwd) {\r\n return pwd.length >= 8;\r\n}", "title": "" }, { "docid": "70e000f1f44096d9d8b79a3350ccead6", "score": "0.6818969", "text": "function checkPassword (password) {\n\thash = this.password;\n\treturn bcrypt.compare(password, hash).then(function(res) {\n\t\treturn res;\n\t});\n}", "title": "" }, { "docid": "35f4764dabc23b6c0ee8b06455989ad7", "score": "0.681658", "text": "function isValidPassword() {\n var passwordPattern = /^[a-zA-Z0-9]{6,10}$/;\n if (regUserPassword.val().match(passwordPattern))\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "cb5e0856e1aa929c7adcd94db5664257", "score": "0.68144786", "text": "async comparePasswords(savedPass, suppliedPass) {\n\t\t// Extract hashed psasword and salt from db\n\t\tconst [oldHashedPassword, salt] = savedPass.split(\".\");\n\t\t// Generate new hashed password using suppliedPass\n\t\t// 注意scrypt返回一个buffer需要在比较前使用toString()\n\t\tconst newHashedPasswordBuf = await scrypt(suppliedPass, salt, 64);\n\t\t// Compare two hashed passwords\n\t\treturn newHashedPasswordBuf.toString(\"hex\") === oldHashedPassword;\n\t}", "title": "" }, { "docid": "17cc6aee2561cf397a0afa280aec8810", "score": "0.67866135", "text": "hashPassword(rawPassword){\n var a = 1, c = 0, h, o;\n if (rawPassword) {\n a = 0;\n /*jshint plusplus:false bitwise:false*/\n //This is a loop that goes through all passwords and emails\n for (h = rawPassword.length - 1; h >= 0; h--) {\n o = rawPassword.charCodeAt(h);\n a = (a<<6&268435455) + o + (o<<14);\n c = a & 266338304;\n a = c!==0?a^c>>21:a;\n }\n }else {\n // If the password is not valid, we'll throw and error we're able to catch\n throw new Error(\"Password or email is not correct - try again or sign up\");\n }\n return String(a);\n }", "title": "" }, { "docid": "b7666489499b690dc64a2da5b54b952e", "score": "0.6744188", "text": "function checkPassword(str)\n{\n var re = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,}$/;\n return re.test(str);\n}", "title": "" }, { "docid": "98b1fa37cdd3fc271f6ec095cd4610f2", "score": "0.67426264", "text": "isRightPassword(password) {\n return bcrypt.compareSync(password, this.hashedPassword);\n }", "title": "" }, { "docid": "77ba2c59c03f5a8e7885ed24ea8cb314", "score": "0.67364043", "text": "function correctPassword(password,resultHas){ // cek \n return bcrypt.compareSync(password,resultHas)\n}", "title": "" }, { "docid": "3f9885e5ac59569b966f45c66c808fe4", "score": "0.6736305", "text": "isSamePassword(newPassword, newPasswordRepeat) {\n if (newPassword !== newPasswordRepeat) {\n this.message = \"Passwörter stimmen nicht überein.\";\n this.event = new Event(Config.INPUT_CHECKER.EVENT.INPUT_ERROR_FOUND, {\n field: \"password\",\n message: this.message,\n });\n this.notifyAll(this.event);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "b156e87e3301ec703c98a6267de1e2f8", "score": "0.67301893", "text": "function comparePass(userPassword, databasePassword) {\n // databasePassword has hash and salt\n return bcrypt.compareSync(userPassword, databasePassword);\n}", "title": "" }, { "docid": "a7be83fd4d7a6b2af493cfee7334f0bd", "score": "0.67236245", "text": "function matchPass(pass,confirm){\n\treturn (pass==confirm)\n\n}", "title": "" }, { "docid": "9aa78f8f048c9654f49a3e191227d9bc", "score": "0.67213184", "text": "function isValidPassword(pass) {\n if (pass == undefined) {\n return false;\n }\n else {\n let re = /^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@#$%!])[A-Za-z@#$%!\\d]{8,20}$/;\n return re.test(pass);\n }\n}", "title": "" }, { "docid": "dbe15b3ec1097ba6e1c322a5bb1d501e", "score": "0.6720358", "text": "function regPasswordMatch(input1, input2){\n if(input1.value !== input2.value){\n\tregShowError(input2, \"Passowrds do not match\");\n }\n}", "title": "" }, { "docid": "941f42b4bdd61677e47ac4b437e24732", "score": "0.67155486", "text": "function checkPasswordMatch(){\n var password = $('#reg-pass').val();\n var confirmPassword = $('#confirm-pass').val();\n\n if(password != confirmPassword){\n $('.alert').attr('class', 'alert alert-yellow alert-dismissable')\n $('.alert').css('display','block').html(\"Password Fields Do Not Match\");\n\n }\n else{\n $('.alert').css('display','none').html(\"\");\n }\n }//password check end function", "title": "" }, { "docid": "1d6cedbf19bd1ad26f3a18e46a8fa5b7", "score": "0.6700474", "text": "function validatePassword() {\n var x = document.querySelector(\"#password\").value;\n var y = document.querySelector(\"#confirmPassword\").value;\n if (x !== y) {\n alert(\"password do not match\");\n return false;\n }\n}", "title": "" }, { "docid": "81683bd7dc4e45d52f7feecf7ebf0934", "score": "0.6700211", "text": "validPassword(password) {\n return bcrypt.compareSync(password, this.local.password);\n }", "title": "" }, { "docid": "58c6f43528511e4237d5b8af88c5ceeb", "score": "0.669482", "text": "function checkPass(password) {\n for(let id in users){\n if(bcrypt.compareSync(password, users[id].password)){\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "f72f7f85165a7619b3b2045341f09659", "score": "0.66947407", "text": "function checkPassword(str)\n{\n var re = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,}$/;\n return re.test(str);\n}", "title": "" }, { "docid": "ead86f8dc07cf6b4ce8b6f224e321b25", "score": "0.66868246", "text": "function checkPasswordsMatch(input1, input2) {\n if (input1.value !== input2.value) {\n showError(input2, 'Passwords do not match');\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "d7135e332dd9a9bdca7fc6171ddf3e31", "score": "0.6684154", "text": "function matchpass() {\n var firstpass = document.f1.password1.value;\n var secondpass = document.f1.password2.value;\n \n if(firstpass == secondpass && firstpass.length>6) {\n return true;\n }if(firstpass.length<6 && secondpass.length<6){\n alert(\"password must be at least 6 chars\");\n return false;\n \n }else{\n alert(\"Be sure to check your passwords. They do not match.\");\n return false;\n }\n\n}", "title": "" }, { "docid": "e0a300e648b268270a24aeb90ed89048", "score": "0.66797405", "text": "function checkPassword(password) {\n const regex = /^(?=.*\\d)(?=.*[!@#$%^&*])(?=.*[a-z])(?=.*[A-Z]).{8,}$/;\n return regex.test(password);\n}", "title": "" }, { "docid": "a34d308e7f515aea6bb06ebb9e2796ee", "score": "0.66786796", "text": "function is_password_correct(){\n console.log(\"function: is_password_correct\");\n\n let correctPass = passwords_enum[currentAccount];\n for(let i = 0; i < 6; i++){\n\n // Checks all password attempt values\n if(password[i] !== correctPass[i]){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "4363acf291e34e1291dbf3e4373eca27", "score": "0.66697997", "text": "function isCorrectPassword(username, password){\n let user = JSON.parse(fs.readFileSync(`bookings/${username}.json`).toString());\n return user.password === password;\n}", "title": "" }, { "docid": "157040e46589fecc2cf67edea81eac58", "score": "0.66691893", "text": "function ensurePasswordsMatch(form) {\n\n if (form.password.value != form.password_confirm.value) {\n window.alert(\"Paswords do not match\");\n return false;\n }\n\n return true;\n\n}", "title": "" }, { "docid": "2651203c808358eca33e39a236873a4c", "score": "0.66651726", "text": "function validatePassword(pass) {\n var char = false;\n var upp = false;\n var low = false;\n var num = false;\n var symbol = true;\n if(pass.length >= 6){\n char = true;\n }\n if(pass.toUpperCase() != pass){\n low = true;\n }\n if(pass.toLowerCase() != pass){\n upp = true;\n }\n if(/\\d/.test(pass)){\n num = true;\n }\n if(/[^a-zA-Z0-9]/.test(pass)){\n symbol = false;\n }\n return(char && upp && low && num && symbol);\n}", "title": "" }, { "docid": "2cf8c567bcf0ed5088a4a8b7c054dc2f", "score": "0.66621387", "text": "function checkPasswordsMatch(pw1, pw2) {\r\n if (pw1.value !== pw2.value) {\r\n showError(pw2, \"Passwords do not match\");\r\n }\r\n}", "title": "" }, { "docid": "adbea97e17a032d32aac842d891f04e6", "score": "0.66613406", "text": "function isValidPassword(password){\n return password.length >= 8 && !password.includes('password')\n \n}", "title": "" }, { "docid": "8c397c029e8f7fb15acab26f27a4e418", "score": "0.66545755", "text": "function isPasswordValid(pass) {\nreturn pass.length >= 6 && pass.toUpperCase() != pass && pass.toLowerCase() != pass && (pass.includes(\"0\") || pass.includes(\"1\") || pass.includes(\"2\") || pass.includes(\"3\") || pass.includes(\"4\") || pass.includes(\"5\") || pass.includes(\"6\") || pass.includes(\"7\") || pass.includes(\"8\") || pass.includes(\"9\")) && ((pass.includes(\"#\") || pass.includes(\"$\") || pass.includes(\"!\")));\n}", "title": "" }, { "docid": "808d71e26dbacd6848f4376e20b3b60b", "score": "0.6653619", "text": "function validPass(password){\n return /(?=.+[a-z])(?=.+\\d)^[a-z\\d]{3,20}$/i.test(password) ? 'VALID' : 'INVALID';\n }", "title": "" }, { "docid": "41be6b690a23236ef18006078ae06825", "score": "0.66472423", "text": "function validatePassword(password) {\n const regularExpression =\n /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{6,16}$/;\n return regularExpression.test(password);\n}", "title": "" }, { "docid": "4cc51caacc38e6bdd3a6276b8753921e", "score": "0.6645604", "text": "function checkMatchingPasswords(pw1, pw2) {\n if (pw1.value !== pw2.value || pw1.value === \"\") {\n showError(pw2, `${pw2.id} does not match`);\n showError(pw1, `${pw1.id} does not match`);\n return false;\n } else if (checkValidLength(pw1, 3, 20) && checkValidLength(pw2, 3, 20)) {\n successCount += 1;\n return true;\n }\n}", "title": "" }, { "docid": "1c8827db06ac159f973c39258d7d16b0", "score": "0.6643496", "text": "function weakSecret()\n{\n var password = document.getElementById('devinfo_secret').value;\n var origional_password = document.getElementById('devinfo_secret_origional').value;\n\n if (password == origional_password)\n {\n return false;\n }\n\n if (password.length <= 5)\n {\n alert('The secret must be at minimum six characters in length.');\n return true;\n }\n\n if (password.match(/[a-z].*[a-z]/i) == null || password.match(/\\d\\D*\\d/) == null)\n {\n alert('The secret must contain at least two numbers and two letters.');\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f93562f9bc885c64c95e531dbea7d9cb", "score": "0.6642063", "text": "function getPass(form) { \n\tlet pw1 = document.getElementById(\"pass1\").value\n\tlet pw2 = document.getElementById(\"pass2\").value\n\tif (pw1.length !== 8 && pw2.length !== 8) {\n\t\t\talert (\"Password do not match. Please enter your password EXACTLY 8 characters!\") \n\t} \n\telse if (pw1.length === pw2.length) { \n\t\talert (\"Password confirmed!\")\n\t}\n\t\n\t\n\t//////////////////////////////////////////////////////\n\t\n\t\n\t//else { \n\t//\talert(\"Password confirmed!\")\n\t//\treturn true\t\t\n\t//}\n\t\n\t/*if (pw1 == '') {\n\t\talert (\"Please enter a password. Exactly 8 characters only.\");\n\t}\n\telse if (pw2 == '') {\n\t\talert (\"Please enter confirm password\"); \n\t}\t \n\telse if (pw1 !== pw2) { \n\t\talert (\"Password do not match\") \n\t\t\n\t} \n\telse{ \n\t\talert(\"Password confirmed!\") \n\t\t\n\t}\n\t\n\tlet pw0 = /^(?=.*[0-8])(?=.*[!@#$%^&*])[a-zA-Z0-8!@#$%^&*]{0,8}$/*/\n}", "title": "" }, { "docid": "6875ae002549b4c97ecc6f6691b87243", "score": "0.66412336", "text": "function checkPasswords(password, repeatPassword) {\n if (password === repeatPassword) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "dcb31fd4e6be5ea3986063e1806bfb1c", "score": "0.6637084", "text": "function checkPassword(password){\n var pattern = /^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%&]).*$/;\n if(pattern.test(password)){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "1edcca42992225534ff750fa90b45607", "score": "0.66104007", "text": "function checkCredentials(user, pass, db, callback) {\r\n\tvar\tpasswordHash = require('password-hash');\r\n\tdb.collection(\"users\").findOne({username: user}, (function(err, userRecord) {\r\n\t\tassert.equal(null, err);\r\n\t\tif(userRecord) {\r\n\t\t\tcallback(null, (passwordHash.verify(pass,userRecord.password)), userRecord._id);\r\n\t\t\tdb.close();\r\n\t\t} else { \r\n\t\t\tcallback(null, false);\r\n\t\t\tdb.close();\r\n\t\t}\r\n }));\r\n}", "title": "" }, { "docid": "e10131342c33b7b73b785e417c599ec2", "score": "0.6609995", "text": "function comparePasswords (reqPass, dbPass) {\n return bcrypt.compareSync(reqPass, dbPass) \n}", "title": "" }, { "docid": "dff2f2c2d7ca7bbc10eafd9d756b3bd2", "score": "0.66049474", "text": "function validPass(password) {\n return /^(?=.*?[0-9])(?=.*?[a-z])[a-zA-Z0-9]{4,19}$/.test(password)\n ? \"VALID\"\n : \"INVALID\";\n}", "title": "" }, { "docid": "5384df6817456c29374f35863e89c66f", "score": "0.6590371", "text": "function testValidPassword(id) {\n\treturn ( /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{6,}$/.test( $(id).value ) );\n}", "title": "" }, { "docid": "4a84169700ad038d15d557624177ede0", "score": "0.658944", "text": "function isValidPassword (pass) {\n if (pass.length >= 8 && pass.length <= 15 && hasTwoNumbers(pass) && !hasWhiteSpace(pass)) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "d86396b4ced43b7dcf8c257000005041", "score": "0.6579168", "text": "function passwordValidity(password) {\n return /^(?=.*[A-Z])(?=.*\\d)(?=.*[\\W\\_])[A-Z\\d\\W\\_]{7}$/.test(password);\n}", "title": "" }, { "docid": "06819d10d302138414aac02a52e96d59", "score": "0.6566337", "text": "function arePasswordsMatch(req, res, next) {\n if (req.body.password !== req.body.repeatPassword) {\n return next(newError(400, 'Two password inputs do not match'));\n }\n next();\n}", "title": "" }, { "docid": "4130d30b6cb96936e0aece75725212fa", "score": "0.656098", "text": "function verify( username, password, done ) {\n\n // the id field from the user objects will play the role of username\n var user = _.find( users, 'id', username );\n\n if ( user ) {\n if ( password === user.password ) return done( null, user );\n\n // user was found but password doesn’t match\n return done( null, false, { message:'Incorrect password.' } );\n }\n\n done( null, false, { message:'Incorrect username.' } );\n}", "title": "" }, { "docid": "d2474e88b81cd374d8189ce9249d892b", "score": "0.65606654", "text": "function _validatePassword(savedAuthInfo, authInfo){\n var salt = utilService.fromBase64String(savedAuthInfo.salt);\n var savedHashedPassword = utilService.toBase64String(_getSaltedPassword(salt, authInfo.password));\n return savedHashedPassword === savedAuthInfo.hashedPassword ? true : false;\n }", "title": "" }, { "docid": "406eaa68abd7ed2f061cb6c0802a9313", "score": "0.65603983", "text": "function validatePassword(password) { \n\tvar re = /^(?=.*[A-Za-z])(?=.*\\d)(?=.*[$@$!%*#?&])[A-Za-z\\d$@$!%*#?&]{8,}$/; \n\treturn re.test(password); \n}", "title": "" }, { "docid": "b53454a70d8f936fccd8f742b1e924a3", "score": "0.6560318", "text": "checkPassword(loginPw) {\n return bcrypt.compareSync(loginPw, this.password);\n }", "title": "" }, { "docid": "46642ce60b3a0596acca8c49c08b57d8", "score": "0.6559998", "text": "function passwordValidity(password)\n{\n //regex untuk memvalidasi passwword\n let regex = /([0-9]{1}[A-Z]{5}[-@!$%#^&*()_+|~=`{}\\[\\]:\";'<>?,.\\/]{1})/;\n\n//untuk mengembalikan true/false\n return regex.test(password)\n}", "title": "" }, { "docid": "8592898ca02fe802461cc798a3c2886b", "score": "0.6551481", "text": "function passwordMatch() {\n if ($('#register-password').val() != $('#register-confirm-password').val()) {\n $('#register-password-hint').stop(true, true).fadeIn(500);\n } else {\n $('#register-password-hint').stop(true, true).fadeOut(500);\n }\n }", "title": "" }, { "docid": "a7d24faff2a0cbd5548de7308bb124bd", "score": "0.655049", "text": "function checkPass(user, pass) {\n for (var i = 0; i < us.users.length; i++) {\n if (us.users[i].username == user && bcrypt.compareSync(pass, us.users[i].password)) {\n //console.log('ok');\n return true;\n }\n }\n //console.log('no');\n return false;\n}", "title": "" }, { "docid": "1fa31d37716387e8ea9b12aa092a4719", "score": "0.6550433", "text": "function validatePassword(password) {\n const re = /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@$!%*?&])([a-zA-Z0-9@$!%*?&]{8,})$/;\n return re.test(password);\n \n}", "title": "" }, { "docid": "666c996e3c8418a18c46b194cfb9783f", "score": "0.65395755", "text": "function isPwd(password) {\n return /^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@$!%*#?&])[A-Za-z\\d@$!%*#?&]{7,}$/.test(\n password\n );\n}", "title": "" }, { "docid": "cda79a68f92c0a59bd10a6248a4cc37d", "score": "0.65359074", "text": "function passwordMatch(input1, input2) {\n if (input1.value !== input2.value) {\n showError(input2, \"Password do not match\");\n } else {\n showSuccess(input2);\n }\n}", "title": "" }, { "docid": "f9cdcc5c5f253e7e25efc7f2e1ce674b", "score": "0.65357244", "text": "function passwordCheck(password) {\n\t\t\t// check to see if password = \"HelloWorld\"\n\t\t\tif (password === \"HelloWorld\") {\n\t\t\t\treturn alert(\"Your password is correct.\")\n\t\t\t}\n\t\t\t// otherwise, print 'incorrect' statement\n\t\t\telse {\n\t\t\t\treturn alert(\"Your password is incorrect. Please try again.\")\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8da86864388deb7427d83fc1eee6744c", "score": "0.65354645", "text": "function validate(password) {\n return /^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)[A-Za-z\\d]{6,}$/.test(password)\n}", "title": "" }, { "docid": "709278d4f4fd3461030db2f02755b57f", "score": "0.65332556", "text": "function arePasswordsEqual(newPassword,confirmPassword)\n{\n if (newPassword.value == confirmPassword.value)\n {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "709278d4f4fd3461030db2f02755b57f", "score": "0.65332556", "text": "function arePasswordsEqual(newPassword,confirmPassword)\n{\n if (newPassword.value == confirmPassword.value)\n {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "7b8b7a2cdff27e38da5b680b0325003d", "score": "0.6530094", "text": "function isValidPassword(password) {\n var pattern = /^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@$!%*#?&])[A-Za-z\\d@$!%*#?&]{8,}$/; //min 8 caratteri, almeno 1 numero e almeno 1 carattere speciale\n return pattern.test(password);\n }", "title": "" }, { "docid": "c20d27578079959ce1dfa60e344eaf40", "score": "0.6529864", "text": "function checkPasswordMatch() {\n //valore del campo che permette di inserire la nuova password\n var password = $(\"#txtNewPassword\").val();\n //valore del campo che permette di confermare password\n var confirmPassword = $(\"#txtConfirmPassword\").val();\n\n //se le due password non corrispondono\n if (password != confirmPassword)\n //viene modificato l'elemento html che ha come id CheckPasswordMatch\n //Viene modificato il valore testuale e il colore del testo\n $(\"#CheckPasswordMatch\").html(\"Le password non corrispondono!\").css('color', 'red');\n else\n $(\"#CheckPasswordMatch\").html(\"Le password corrispondono\").css('color', 'green');\n }", "title": "" } ]
642e44280464badd22bf3f59dddc31dd
Full cone type, NAT punchthrough fully supported.
[ { "docid": "9960dc69a4f1473b48cbbc07c9c95365", "score": "0.61879903", "text": "set NATpunchthroughFullCone(value) {}", "title": "" } ]
[ { "docid": "48c7a550632132417def246b6b98b39f", "score": "0.7030409", "text": "get NATpunchthroughFullCone() {}", "title": "" }, { "docid": "10eb3389553c7d1962ce1f6bf3643996", "score": "0.5720153", "text": "get NATpunchthroughAddressRestrictedCone() {}", "title": "" }, { "docid": "598be4a4412331416780f79aca27d171", "score": "0.5365342", "text": "function newConnective(type){\n var name;\n\n switch(type){\n case CONNECTIVE.NEGATION.value: name = \"NOT\"; break;\n case CONNECTIVE.CONJUNCTION.value: name = \"AND\"; break;\n case CONNECTIVE.DISJUNCTION.value: name = \"OR\"; break;\n case CONNECTIVE.IMPLICATION.value: name = \"RARROW\"; break;\n case CONNECTIVE.BICONDITIONAL.value: name = \"RLARROW\"; break;\n case CONNECTIVE.THUS.value: name = \"THUS\"; break;\n default: name = \"\"; break;\n }\n\n this.name = name;\n this.value = type;\n this.type = TYPE.CONNECTIVE;\n this.index = 0;\n}", "title": "" }, { "docid": "ac8eb8d6300437458452ac4c01558df8", "score": "0.48952776", "text": "get LimitedNATPunchthroughSymmetric() {}", "title": "" }, { "docid": "9ae5db50b6c5b9ff8699f827bc134ee9", "score": "0.48357287", "text": "set NATpunchthroughAddressRestrictedCone(value) {}", "title": "" }, { "docid": "2db558237a51bb01f7beb8935524f789", "score": "0.47882807", "text": "get endpointType() {\n return this.getStringAttribute('endpoint_type');\n }", "title": "" }, { "docid": "8172f539d56ec63a381eb611fe9ba46b", "score": "0.47782174", "text": "getType() {\n return 'universal';\n }", "title": "" }, { "docid": "6ef65237abfac7f58212a1b5a24f8f0f", "score": "0.47762108", "text": "function updateConnectionTypes(cp) {\n\tlet max = 0;\n\tlet counted = cp.linkedWith.reduce((result, entity) => {\n\t\tif (entity instanceof Link) {\n\t\t\t((entity.from === cp ? entity.to : entity.from).types || []).forEach(type => {\n\t\t\t\tlet count = result[type] + 1 || 1;\n\t\t\t\tresult[type] = count;\n\t\t\t\tif (count > max) max = count;\n\t\t\t});\n\t\t}\n\t\treturn result;\n\t}, {});\n\tcp.types = Object.keys(counted).filter(type => type !== 'any' && counted[type] === max);\n\tif (!cp.types.length) cp.types = ['any'];\n\tcp.render();\n}", "title": "" }, { "docid": "83c3bad20e024de63b418c42c64541de", "score": "0.47066537", "text": "get LimitedNATPunchthroughPortRestricted() {}", "title": "" }, { "docid": "b8b3908889ad4f194540551f3d679120", "score": "0.46757603", "text": "async function _getNetworkType() {\n await web3.eth.net.getNetworkType().then(result => {\n $networkType.innerHTML = `Connected to \"${result}\"`\n })\n .catch(_e => {\n $networkType.innerHTML = `Error retrieving network type`;\n });\n }", "title": "" }, { "docid": "45ae14366101f83266e087dcd4e7534d", "score": "0.4652316", "text": "get type() {\n return this._carrier.type;\n }", "title": "" }, { "docid": "45ae14366101f83266e087dcd4e7534d", "score": "0.4652316", "text": "get type() {\n return this._carrier.type;\n }", "title": "" }, { "docid": "aaf6da9db9c721cbb6f7657b398d1021", "score": "0.46505457", "text": "function PipeType() { }", "title": "" }, { "docid": "ea0cd54401204f971aafacddd835ff61", "score": "0.46439782", "text": "get remoteType() {\n return this.__remoteType.get();\n }", "title": "" }, { "docid": "59dc46016b311518e679bb97a961292f", "score": "0.46331155", "text": "function PipeType(){}", "title": "" }, { "docid": "03399f63dd0a79ede00ff2627fcacbc0", "score": "0.45881295", "text": "function CIRCChanMode (parent)\n{\n this.parent = parent;\n\n this.modeA = new Object();\n this.modeB = new Object();\n this.modeC = new Object();\n this.modeD = new Object();\n\n this.invite = false;\n this.moderated = false;\n this.publicMessages = true;\n this.publicTopic = true;\n this.secret = false;\n this.pvt = false;\n this.key = \"\";\n this.limit = -1;\n}", "title": "" }, { "docid": "f17bea312c028c386ab07fa2151bce82", "score": "0.45823333", "text": "function isConjugated(a) {\n const _bp = a.structure.getBondProxy();\n const atomicNumber = a.number;\n const hetero = atomicNumber === 8 /* O */ || atomicNumber === 7 /* N */;\n if (hetero && a.bondCount === 4) {\n return false;\n }\n let flag = false;\n a.eachBond(b => {\n if (b.bondOrder > 1) {\n flag = true;\n return;\n }\n if (hetero) {\n const a2 = b.getOtherAtom(a);\n a2.eachBond(b2 => {\n if (b2.bondOrder > 1) {\n const atomicNumber2 = a2.number;\n if ((atomicNumber2 === 15 /* P */ || atomicNumber2 === 16 /* S */) &&\n b2.getOtherAtom(a2).number === 8 /* O */) {\n return;\n }\n flag = true;\n }\n }, _bp); // Avoid reuse of structure._bp\n }\n });\n return flag;\n}", "title": "" }, { "docid": "63cd9f3747c8b8c760086a8024b47d44", "score": "0.45690286", "text": "isEdge(type) {\n return [this.types.NW, this.types.NE, this.types.SW, this.types.SE].indexOf(type) > -1\n }", "title": "" }, { "docid": "d043c9da32e4ae401b706d5b45c6220f", "score": "0.45566422", "text": "function Network() {}", "title": "" }, { "docid": "d043c9da32e4ae401b706d5b45c6220f", "score": "0.45566422", "text": "function Network() {}", "title": "" }, { "docid": "d043c9da32e4ae401b706d5b45c6220f", "score": "0.45566422", "text": "function Network() {}", "title": "" }, { "docid": "87a5ef0aae0991f0285d8ddc909eff25", "score": "0.45555001", "text": "isPole(type) {\n return [this.types.N, this.types.S].indexOf(type) > -1\n }", "title": "" }, { "docid": "97e6eb714417ef4a40c03f6d27bc5231", "score": "0.45396388", "text": "function isCon(bits) {\n var code = bits.peek(codelen);\n return (code == codes.ConList || code == codes.ConObject);\n }", "title": "" }, { "docid": "a9212887307a5c9776e4e710ef718ed5", "score": "0.45332468", "text": "function handleNegotiation(e) {\n\n\t\t//Create an offer\n\t\trtcConnectionsByHandle[toHandle].createOffer()\n\t\t\t//Set the local description of the connection\n\t\t\t.then((offer) => rtcConnectionsByHandle[toHandle].setLocalDescription(offer))\n\t\t\t.then(() => {\n\n\n\t\t\t\t//Create the msg for remote peer\n\t\t\t\tconst msg = {\n\t\t\t\t\ttype: 'offer',\n\t\t\t\t\tfrom: {\n\t\t\t\t\t\thandle: window.handle,\n\t\t\t\t\t\tid: window.socketId\n\t\t\t\t\t},\n\t\t\t\t\tto: {\n\t\t\t\t\t\thandle: toHandle,\n\t\t\t\t\t\tid: toId\n\t\t\t\t\t},\n\t\t\t\t\tsdp: rtcConnectionsByHandle[toHandle].localDescription\n\n\t\t\t\t}\n\n\t\t\t\t//Send the offer to the remote peer\n\t\t\t\twindow.socket.emit(\"offer\", msg);\n\t\t\t})\n\t\t\t.catch((err) => console.log(err));\n\n\n\t}", "title": "" }, { "docid": "435cf7b6ac646ec1499602d6060a175e", "score": "0.45171142", "text": "function fix_cobblestone_wall(block, type) {\n if (type.Properties) {\n const properties = type.Properties.value\n\n if (block.name === 'cobblestone_wall') {\n console.log('\\t', 'Forcing property up of cobblestone_wall')\n properties.up = { type: 'string', value: 'true' }\n }\n }\n}", "title": "" }, { "docid": "50d2fc433145ca8fdbd1c075ec7f50e1", "score": "0.45168215", "text": "function onLoadProtocolBindingFn(toggleObj) {\n\tPBCSourceNetworkType('tf1_sourceNetworkType1');\n\tPBCDestinationNetworkType('tf1_destinationNetworkType1');\n}", "title": "" }, { "docid": "2f326df95b40e1872b0c48466dbab066", "score": "0.45124128", "text": "function ATNType() {\r\n\r\n}", "title": "" }, { "docid": "aee51ce2dfb99a4ca45bb19f221b5eb2", "score": "0.4510633", "text": "get default() {\n return {\n listen: 2206,\n discovery: {\n type: 'broadcast'\n },\n debug: () => {}\n }\n }", "title": "" }, { "docid": "83dd8154eb3ad689c2316f22f3955ed5", "score": "0.4473638", "text": "type() {\r\n return `${this.isEAFN() ? \"e-\" : \"\"}AF${(this.isDeterministic() ? \"D\" : \"N\") + (this.isComplete() ? \"C\" : \"\")} `;\r\n }", "title": "" }, { "docid": "591430d98af7e5e4210dd3d01f3a610a", "score": "0.44658643", "text": "get coneOuterGain() {\n return this._panner.coneOuterGain;\n }", "title": "" }, { "docid": "591430d98af7e5e4210dd3d01f3a610a", "score": "0.44658643", "text": "get coneOuterGain() {\n return this._panner.coneOuterGain;\n }", "title": "" }, { "docid": "511759af440e3f69e347c5b9b60e6479", "score": "0.44500107", "text": "is_consumable(){ return false; }", "title": "" }, { "docid": "4bdb024b0731c11b41c55c334847ee8a", "score": "0.44493213", "text": "static myProtocolMask(){return Protocol.WS|Protocol.RTC;}", "title": "" }, { "docid": "dc36d562b51153b1fe524f3b4cc8f5f4", "score": "0.4440905", "text": "ORES_TRIP(type) {\n return Math.floor(BF.MISC.INV_SPACE / (BF[type].COAL + 1));\n }", "title": "" }, { "docid": "b4fc0485180d85cbccb1fbf488d97863", "score": "0.44308126", "text": "static myProtocolMask() {\n return Protocol.WS | Protocol.RTC;\n }", "title": "" }, { "docid": "f946fe213d51f1235b2574c03349f822", "score": "0.4423229", "text": "eo(t) {\n this.onlineState = t;\n let e = !1;\n return this.ro && !this.io && this.ao(this.ro, t) && (this.co(this.ro), e = !0), \n e;\n }", "title": "" }, { "docid": "1cb0345b43a7ae7f090e8ba6e10b49e7", "score": "0.44229755", "text": "function cropConnection(e) {\n var context = e.context,\n hints = context.hints || {},\n connection;\n\n if (!context.cropped && hints.createElementsBehavior !== false) {\n connection = context.connection;\n connection.waypoints = connectionDocking.getCroppedWaypoints(connection);\n context.cropped = true;\n }\n }", "title": "" }, { "docid": "e08946c728e88594d7b8ee094a7f1d3c", "score": "0.4415712", "text": "function detectConstraintType(){\n return \"singleEntity\";\n}", "title": "" }, { "docid": "3a0c16d0ba3273d9b51e7c28eaa5e42e", "score": "0.4388376", "text": "get connectionColor()\n\t{\n\t\tif (this.outputPlug.type == null\n\t\t\t|| this.outputPlug.type.connectionColor == null)\n\t\t\treturn this.tree.theme.connectionColor;\n\n\t\treturn this.outputPlug.type.connectionColor;\n\t}", "title": "" }, { "docid": "538c678de1cae2a31b70cb863221d38b", "score": "0.43760306", "text": "function p(e,t){const n=e.schema.options.discriminatorKey;return null!=t&&t.hasOwnProperty(n)&&(e=i(e,t[n])||e),e}", "title": "" }, { "docid": "a2a1f025692764cbebbcee68e9e3ba7c", "score": "0.43604845", "text": "static get __resourceType() {\n\t\treturn 'Communication';\n\t}", "title": "" }, { "docid": "a2a1f025692764cbebbcee68e9e3ba7c", "score": "0.43604845", "text": "static get __resourceType() {\n\t\treturn 'Communication';\n\t}", "title": "" }, { "docid": "8bc2278e71145dac71986bafe373f480", "score": "0.43534318", "text": "async function negotiateConnection() {\n pc.onnegotiationneeded = async function() {\n try {\n console.log('Making an offer...');\n clientIs.makingOffer = true;\n try {\n // Very latest browsers are totally cool with an\n // argument-less call to setLocalDescription:\n await pc.setLocalDescription();\n } catch(error) {\n // Older (and not even all that old) browsers\n // are NOT cool. So because we're making an\n // offer, we need to prepare an offer:\n var offer = await pc.createOffer();\n await pc.setLocalDescription(new RTCSessionDescription(offer));\n } finally {\n sc.emit('signal', { description: pc.localDescription });\n }\n } catch(error) {\n console.error(error);\n } finally {\n clientIs.makingOffer = false;\n }\n }\n}", "title": "" }, { "docid": "46d86c8e1d776cd9ea8d84d0d8a93dcb", "score": "0.4350873", "text": "async function negotiateConnection() {\n pc.onnegotiationneeded = async function() {\n try {\n console.log('Making an offer');\n clientIs.makingOffer = true;\n try {\n // Very latest browsers are ok with an\n // argument-less call to setLocalDescription:\n await pc.setLocalDescription();\n } catch (error) {\n // Older browsers are NOT ok. So because we're making an\n // offer, we need to prepare an offer:\n var offer = await pc.createOffer();\n await pc.setLocalDescription(new RTCSessionDescription(offer));\n } finally {\n sc.emit('signal', { description: pc.localDescription });\n }\n } catch (error) {\n console.error(error);\n } finally {\n clientIs.makingOffer = false;\n }\n }\n}", "title": "" }, { "docid": "f66550fccdfa23f23cbe53ec360b56e1", "score": "0.43137583", "text": "function showConnectionStatus() {\n document.getElementById('o-connection-status').innerHTML = window.gConnectionType;\n}", "title": "" }, { "docid": "e78fa18fa1ab0adcda943711f2a4e234", "score": "0.4299149", "text": "getSpecificType(){\r\n return \"DIAMONDNODE\"\r\n }", "title": "" }, { "docid": "1690c7d81e2ffbcf26ea580c33c02c65", "score": "0.42967933", "text": "get ctype() {\n return this.constructor.ctype();\n }", "title": "" }, { "docid": "1c83c45ff0e8abfda542f13976c1e1c7", "score": "0.4292623", "text": "function isUnifiedPlanDefault() {\n\t// Safari supports addTransceiver() but not Unified Plan when\n\t// currentDirection is not defined.\n\tif (!('currentDirection' in RTCRtpTransceiver.prototype))\n\t\treturn false;\n\n\t// If Unified Plan is supported, addTransceiver() should not throw.\n\tconst tempPc = new RTCPeerConnection();\n\tlet canAddTransceiver = false;\n\ttry {\n\t\ttempPc.addTransceiver('audio');\n\t\tcanAddTransceiver = true;\n\t} catch (e) {\n\t}\n\n\ttempPc.close();\n\treturn canAddTransceiver;\n}", "title": "" }, { "docid": "39fe612728ab6bd066c6635d9ed1a682", "score": "0.42834786", "text": "function cropConnection(e) {\n var context = e.context,\n connection;\n\n if (!context.cropped) {\n connection = context.connection;\n connection.waypoints = connectionDocking.getCroppedWaypoints(connection);\n context.cropped = true;\n }\n }", "title": "" }, { "docid": "46f2b2719f471515fbeb5482256272ee", "score": "0.42710668", "text": "get net() {\n\t\treturn this.__net;\n\t}", "title": "" }, { "docid": "0b956bfec927f912a952564e904ae8d3", "score": "0.42700592", "text": "get isSupported() {\n return this.isSupportedNatively;\n }", "title": "" }, { "docid": "0b956bfec927f912a952564e904ae8d3", "score": "0.42700592", "text": "get isSupported() {\n return this.isSupportedNatively;\n }", "title": "" }, { "docid": "fcf7fc1492221dc6cc295bc12cce9ae6", "score": "0.42657465", "text": "function isConnection(element) {\n return element.waypoints;\n}", "title": "" }, { "docid": "fcf7fc1492221dc6cc295bc12cce9ae6", "score": "0.42657465", "text": "function isConnection(element) {\n return element.waypoints;\n}", "title": "" }, { "docid": "1412b0747bc354fd036b3aad6b28e578", "score": "0.42611712", "text": "function topologyTypeFromOptions(options) {\n if (options === null || options === void 0 ? void 0 : options.directConnection) {\n return common_1.TopologyType.Single;\n }\n\n if (options === null || options === void 0 ? void 0 : options.replicaSet) {\n return common_1.TopologyType.ReplicaSetNoPrimary;\n }\n\n if (options === null || options === void 0 ? void 0 : options.loadBalanced) {\n return common_1.TopologyType.LoadBalanced;\n }\n\n return common_1.TopologyType.Unknown;\n}", "title": "" }, { "docid": "2a6fb15f4e08445046c4f75505f167bd", "score": "0.4247249", "text": "function PBCDestinationNetworkType(radioName) {\n\tvar selValue = radioCheckedValueGet(radioName);\n\tif (!selValue)\n\t\treturn;\n\tswitch (parseInt(selValue, 10)) {\n\t\tcase 1:\n\t\t\t/* Any */\n\t\t\tfieldStateChangeWr('tf1_txtDestStart tf1_txtDestEnd', '', '', '');\n\t\t\tvidualDisplay('tf1_txtDestStart tf1_txtDestEnd', 'hide');\n\t\t\tvidualDisplay('break1Dest break2Dest', 'hide');\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t/* Single Address */\n\t\t\tfieldStateChangeWr('tf1_txtDestEnd', '', 'tf1_txtDestStart', '');\n\t\t\tvidualDisplay('tf1_txtDestStart', 'configRow');\n\t\t\tvidualDisplay('break1Dest', 'break');\n\t\t\tvidualDisplay('tf1_txtDestEnd', 'hide');\n\t\t\tvidualDisplay('break2Dest', 'hide');\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\t/* Address range */\n\t\t\tfieldStateChangeWr('', '', 'tf1_txtDestStart tf1_txtDestEnd', '');\n\t\t\tvidualDisplay('tf1_txtDestStart tf1_txtDestEnd', 'configRow');\n\t\t\tvidualDisplay('break1Dest break2Dest', 'break');\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "af2785a94a942446b0d7a317cb5d3b41", "score": "0.42453596", "text": "function Edge(node, type) {\n this.type = type;\n this.ports = {};\n this.node = node;\n }", "title": "" }, { "docid": "639ba2ccc17e764442d5786db09e4a11", "score": "0.42446935", "text": "function topologyTypeFromOptions(options) {\n if (options === null || options === void 0 ? void 0 : options.directConnection) {\n return common_1.TopologyType.Single;\n }\n if (options === null || options === void 0 ? void 0 : options.replicaSet) {\n return common_1.TopologyType.ReplicaSetNoPrimary;\n }\n if (options === null || options === void 0 ? void 0 : options.loadBalanced) {\n return common_1.TopologyType.LoadBalanced;\n }\n return common_1.TopologyType.Unknown;\n}", "title": "" }, { "docid": "639ba2ccc17e764442d5786db09e4a11", "score": "0.42446935", "text": "function topologyTypeFromOptions(options) {\n if (options === null || options === void 0 ? void 0 : options.directConnection) {\n return common_1.TopologyType.Single;\n }\n if (options === null || options === void 0 ? void 0 : options.replicaSet) {\n return common_1.TopologyType.ReplicaSetNoPrimary;\n }\n if (options === null || options === void 0 ? void 0 : options.loadBalanced) {\n return common_1.TopologyType.LoadBalanced;\n }\n return common_1.TopologyType.Unknown;\n}", "title": "" }, { "docid": "4f3913eec13fb335cfa29bfdfbc7ca59", "score": "0.42405435", "text": "function CANGatewayECU() {\n var self = this;\n}", "title": "" }, { "docid": "2a27fdbfb9fa6772248bf2df4905297f", "score": "0.4234897", "text": "_consoleErrorNotInitializeConnectionType(){\n console.warn('💥 Error initialize connection Postgre : Type connection not information on constructor');\n }", "title": "" }, { "docid": "d22d2afaea4bcf3220cc7da609ead1ba", "score": "0.4232883", "text": "function BtnsPlcConnectionStatusCuptor(isConnectedPlcCuptor) {\n // Verificam daca Plc-ul este conectat\n if (isConnectedPlcCuptor) {\n // Verificam daca deja butonul indica ca serviciul e pornit\n // Daca nu indica, ii adaugam clasa ca sa indice\n if (!btnConnectPlcCuptor.classList.contains(\"btn-success\"))\n btnConnectPlcCuptor.classList.add(\"btn-success\");\n // Verificam daca butonul stop indica ca este oprit\n // Daca este il facem sa nu mai indice\n if (btnDeconnectPlcCuptor.classList.contains(\"btn-danger\"))\n btnDeconnectPlcCuptor.classList.remove(\"btn-danger\");\n }\n else { // La fel si daca nu merge serviciul\n if (btnConnectPlcCuptor.classList.contains(\"btn-success\"))\n btnConnectPlcCuptor.classList.remove(\"btn-success\");\n if (!btnDeconnectPlcCuptor.classList.contains(\"btn-danger\"))\n btnDeconnectPlcCuptor.classList.add(\"btn-danger\");\n }\n}", "title": "" }, { "docid": "268de3fda5a1c73a54c83a84fa6d4bb7", "score": "0.42275894", "text": "function issinglecia() {\n\t\treturn SAEV_config.chipset.ide || SAEV_config.chipset.pcmcia || SAEV_config.chipset.mbdmac;\n\t}", "title": "" }, { "docid": "bba55b63caddc6b5e3897bf73fb762eb", "score": "0.42214513", "text": "function ConnectToEjidoChain(){\n\tconst proc = 'multichaind [email protected]:4787';\n\tconst proc2 = 'multichaind chainInteroEjido -daemon';\n\tcmd.get(proc);\n\tcmd.get(proc2);\n}", "title": "" }, { "docid": "2dc6597e6eeb1589732bbfb9e7c7c6d9", "score": "0.4219092", "text": "_pickPeerEndpoint(resourceType) {\n let returnEndpoint;\n switch(resourceType) {\n case 'parties':\n returnEndpoint = this.alsEndpoint ? this.alsEndpoint : this.peerEndpoint;\n break;\n case 'participants':\n returnEndpoint = this.alsEndpoint ? this.alsEndpoint : this.peerEndpoint;\n break;\n case 'quotes':\n returnEndpoint = this.quotesEndpoint ? this.quotesEndpoint : this.peerEndpoint;\n break;\n case 'transfers':\n returnEndpoint = this.transfersEndpoint ? this.transfersEndpoint : this.peerEndpoint;\n break;\n case 'transactionRequests':\n returnEndpoint = this.transactionRequestsEndpoint ? this.transactionRequestsEndpoint : this.peerEndpoint;\n break;\n case 'authorizations':\n returnEndpoint = this.transactionRequestsEndpoint ? this.transactionRequestsEndpoint : this.peerEndpoint;\n break;\n default:\n returnEndpoint = this.peerEndpoint;\n }\n return returnEndpoint;\n }", "title": "" }, { "docid": "21e798a9023f8b2c1b7fad9f8837c694", "score": "0.4218346", "text": "getType() {\r\n return \"NODE\";\r\n }", "title": "" }, { "docid": "ab36eefe734055df6b9cf996b2642ff0", "score": "0.4215269", "text": "static get clanName(){\n return \"EVOLUTION\";\n }", "title": "" }, { "docid": "1170597a0d95210cccbeb1a553a34eb3", "score": "0.4212627", "text": "function CanAddConnectionFrom(R){\r\n\r\n if(R.connections.length<MAX_CONNECTS){\r\n return 1;\r\n }\r\n else{\r\n return 0;\r\n }\r\n}", "title": "" }, { "docid": "6d49688cb7680ee4ce35370f8c2f492d", "score": "0.42079332", "text": "getPacketType() {\n return this.buffer.readUInt8(1);\n }", "title": "" }, { "docid": "84a2940e86b022fa09596d85bc7ea5c9", "score": "0.42050052", "text": "getPortUsed() {\n return null; // Abstract - overridden by individual solutions\n }", "title": "" }, { "docid": "b67910659ecede5fbb026697680c5b78", "score": "0.41965717", "text": "constructor() {\n super();\n this.registerAsType(DefaultSenecaFactory.SenecaEndpointDescriptor, SenecaEndpoint_1.SenecaEndpoint);\n }", "title": "" }, { "docid": "349fe2e50a928966362123117a0c8d69", "score": "0.4194668", "text": "function PeerConnection() {\n\n }", "title": "" }, { "docid": "e1a189f87ccb460d36a7f9ebd1e9a01f", "score": "0.4192797", "text": "formatTypePreference(pref) {\n if (platform.name === 'Chrome') {\n switch (pref) {\n case 0:\n return 'TURN/TLS';\n case 1:\n return 'TURN/TCP';\n case 2:\n return 'TURN/UDP';\n default:\n break;\n }\n } else if (platform.name === 'Firefox') {\n switch (pref) {\n case 0:\n return 'TURN/TCP';\n case 5:\n return 'TURN/UDP';\n default:\n break;\n }\n }\n return '';\n }", "title": "" }, { "docid": "4d123afd4a173065e68ead03250ea8b5", "score": "0.41817698", "text": "function getApparentType(type) {\r\n if (type.flags & 512 /* TypeParameter */) {\r\n do {\r\n type = getConstraintOfTypeParameter(type);\r\n } while (type && type.flags & 512 /* TypeParameter */);\r\n if (!type) {\r\n type = emptyObjectType;\r\n }\r\n }\r\n if (type.flags & 258 /* StringLike */) {\r\n type = globalStringType;\r\n }\r\n else if (type.flags & 132 /* NumberLike */) {\r\n type = globalNumberType;\r\n }\r\n else if (type.flags & 8 /* Boolean */) {\r\n type = globalBooleanType;\r\n }\r\n return type;\r\n }", "title": "" }, { "docid": "0ae69170b2c6504dbf85fe7117b160d7", "score": "0.41782403", "text": "function CoapServerNode(n) {\n RED.nodes.createNode(this, n);\n this.port = n.port;\n\n // collection of 'coap in' nodes that represent coap resources\n this.resources = [];\n this.inputNodes = [];\n\n // setup node-coap server and start\n // TODO: make server options configurable\n this.server = coap.createServer({\n piggybackReplyMs: 1000,\n });\n this.server.on('request', (req, res) => {\n res.on('error', err => {\n this.log('server error');\n this.log(err);\n });\n this.handleRequest(req, res);\n });\n this.server.listen(this.port, () => {\n this.log('CoAP Server listening on ' + this.port);\n });\n\n this.on('close', () => {\n this.inputNodes = [];\n this.server.close();\n });\n }", "title": "" }, { "docid": "e57b8cc07aa517093057b6899e520d63", "score": "0.41748124", "text": "function OpcUaWebSocket() {\r\n // create web socket event\r\n this.eventOpcUaWebSocket = new EventOpcUaWebSocket();\r\n }", "title": "" }, { "docid": "347b54c78192d489a2f470f33e8de987", "score": "0.41658098", "text": "function setWanMode(mode) {\n\tvar changed = (uci['network']['wan']['mode'] === mode);\n\tif (mode === 'static' || mode === 'bridge') {\n\t\tuci['network']['wan']['mode'] = mode;\n\t\tuci['network'].pchanged = changed;\n\t}\n}", "title": "" }, { "docid": "639825c7dc1579ca84088b5579e6de70", "score": "0.41628188", "text": "getConnectonState() {\n return this.connected;\n }", "title": "" }, { "docid": "a5016fda29dda0b535475c6a1852ad5a", "score": "0.41589895", "text": "function enumGameCfgType(){}", "title": "" }, { "docid": "4b33ec1dea68d57d03416f27af515e07", "score": "0.4158543", "text": "get protocol () {\n\t\treturn this._protocol;\n\t}", "title": "" }, { "docid": "70cd672cb2449a161d19b020e29da48d", "score": "0.41576695", "text": "get RealtimeEmissive() {}", "title": "" }, { "docid": "a519e07f1b16e73e2258ea39b5b15814", "score": "0.4152116", "text": "function isCompatProxy(replicaOrAny) {\n return replicaOrAny && replicaOrAny._ES5ProxyType;\n }", "title": "" }, { "docid": "b3dfa6ce502269ae9b8150f38cc58ce5", "score": "0.41516235", "text": "function getApparentType(type) {\n var t = !(type.flags & 465829888 /* Instantiable */) ? type : getBaseConstraintOfType(type) || unknownType;\n return ts.getObjectFlags(t) & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) :\n t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t) :\n t.flags & 402653316 /* StringLike */ ? globalStringType :\n t.flags & 296 /* NumberLike */ ? globalNumberType :\n t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 7 /* ES2020 */) :\n t.flags & 528 /* BooleanLike */ ? globalBooleanType :\n t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ES2015 */) :\n t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType :\n t.flags & 4194304 /* Index */ ? keyofConstraintType :\n t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType :\n t;\n }", "title": "" }, { "docid": "2333f149378a58b3e68b7ce18bd3b2d2", "score": "0.41491097", "text": "function isSimple(type) {\n return !!TYPE_CONVERTERS[type];\n}", "title": "" }, { "docid": "d740620298a1e1c1fed94580116436ff", "score": "0.4149014", "text": "get protocol() {\n return this._protocol;\n }", "title": "" }, { "docid": "b05fdadd627cb11d8ecb5a61252bd8dc", "score": "0.41488183", "text": "constructor() {\n super();\n this.type = exports.types.GETADDR;\n }", "title": "" }, { "docid": "5a67894d76268f64744b4007508322a1", "score": "0.41383857", "text": "function l(e,t){const n=e.schema.options.discriminatorKey;return null!=t&&t.hasOwnProperty(n)&&(e=r(e,t[n])||e),e}", "title": "" }, { "docid": "5a67894d76268f64744b4007508322a1", "score": "0.41383857", "text": "function l(e,t){const n=e.schema.options.discriminatorKey;return null!=t&&t.hasOwnProperty(n)&&(e=r(e,t[n])||e),e}", "title": "" }, { "docid": "5a4190c3fdd9d6e567a3f426c58c6ded", "score": "0.4135714", "text": "static myProtocolMask() {\n return Protocol.WS;\n }", "title": "" }, { "docid": "b759a0733976e0766465a2039adee1a4", "score": "0.41327828", "text": "function typeCoercion(){\n var stringType = 'praveen';\n var numberType = 32;\n var undefinedType = undefined;\n var nullType = null;\n var booleanType = true;\n //Not doing for String as we know, any operation of String with other primitive type will convert it to String\n\n //1 number with undefined\n console.log('number with undefined: ');\n console.log(numberType + undefinedType);\n\n //2 number with null\n console.log('number with null: ');\n console.log(numberType + nullType);\n\n //3 number with boolean\n console.log('number with boolean: ');\n console.log(numberType + booleanType);\n\n //4 undefined with null\n console.log('undefined with null: ');\n console.log(undefinedType + nullType);\n\n //5 undefined with boolean\n console.log('undefined with boolean: ');\n console.log(undefinedType + booleanType);\n\n //6 null with boolean\n console.log('null with boolean: ');\n console.log(nullType + booleanType);\n\n console.log('null * boolean: ');\n console.log(nullType * booleanType);\n console.log(null / undefined);\n \n}", "title": "" }, { "docid": "fe3b0ae506c3a7e7b59983d5f972cf19", "score": "0.41324976", "text": "set LimitedNATPunchthroughSymmetric(value) {}", "title": "" }, { "docid": "0505015f710142c748f0df2955884146", "score": "0.41316962", "text": "toJSON() {\n return [this.addr, this.flags & ~FLAG_CONNECTED];\n }", "title": "" }, { "docid": "3af2f8e31a6857e9b0fc9e03b1ae32d3", "score": "0.41263986", "text": "function isatapTunnelsConfigOnload(toggleObj) {\n\tendPointAddressTypeChange('tf1_endPointAddressLAN');\n}", "title": "" }, { "docid": "4d14e654d5bc0827859083a89d7db413", "score": "0.41257763", "text": "function graphType() {\n return isAnimeGraph? 'anime' : 'manga';\n}", "title": "" }, { "docid": "94654057e861b871ac5ce646a21cedf2", "score": "0.41250238", "text": "function checkConnection() {\n var networkState = navigator.connection.type;\n var states = {};\n states[Connection.UNKNOWN] = '1';\n states[Connection.ETHERNET] = '1';\n states[Connection.WIFI] = '1';\n states[Connection.CELL_2G] = '1';\n states[Connection.CELL_3G] = '1';\n states[Connection.CELL_4G] = '1';\n states[Connection.CELL] = '1';\n states[Connection.NONE] = '0';\n if(states[networkState]=='1'){\n $('#conexionInfo').show();\n }\n else {\n $('#conexionInfo').hide();\n }\n }", "title": "" }, { "docid": "ebd5ccebde0ed56f5e0338b0ccdc709c", "score": "0.4123883", "text": "function verbCardTypePanel(type) {\n switch (type) {\n case 'doorway':\n case 'incident':\n case 'objective':\n return ['name', 'info', 'property', 'gametext'];\n default:\n return ['name', 'info', 'property', 'lore', 'gametext', 'verbTemplate'];\n }\n}", "title": "" }, { "docid": "ccae427c595b9c1a0b85bcd570282ed4", "score": "0.41138074", "text": "getType() {\n return \"BASIC\"\n }", "title": "" }, { "docid": "5890d9bf0b7cac86bb0b7c347658a616", "score": "0.41081226", "text": "static createFullColony() {\n return new AntColony(100, 3, 8, 0);\n }", "title": "" }, { "docid": "61dc7080cc0ad2b9cc4ab5158105322c", "score": "0.41060024", "text": "isSide(type) {\n return [this.types.E, this.types.W].indexOf(type) > -1\n }", "title": "" }, { "docid": "c4c5f3c16007c22cc2eb5967a60303a0", "score": "0.4105898", "text": "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ConnectionAssociation.__pulumiType;\n }", "title": "" } ]
88d78595a46dea675976829c9913d3c5
Listener for dropdowns in Actions Block
[ { "docid": "2627792495f8a61f07c5a3a87fa1e3bb", "score": "0.5794827", "text": "function actionDropdownOpenerListener() {\n let allPanels = $('.action-dropdown-hiding');\n $('.action-dropdown').on('click', function(e) {\n // hide all previous opened dropdowns in case we open new one\n for(let i = 0; i < allPanels.length; i++) {\n let element = $(allPanels[i]);\n if(element.attr(\"data-id\") !== $(this).attr(\"data-id\")) {\n if(element.hasClass('opened')) {\n element.hide();\n element.removeClass('opened').addClass('closed');\n }\n let dropdownArrow = $(allPanels[i]).parent().find('i');\n if(dropdownArrow.hasClass('fa-caret-up')) {\n dropdownArrow.removeClass('fa-caret-up').addClass('fa-caret-down');\n }\n }\n }\n // hide/show dropown if click on arrow button\n let actionDropdownHiding = $(this).find('.action-dropdown-hiding');\n actionDropdownHiding.toggle(\n \"slide\",\n {\n direction: 'up',\n duration: '200',\n easing: 'easeOutQuart'\n } , function () {\n actionDropdownHiding.toggleClass('closed opened');\n }\n );\n // change arrow when dropdown opened/closed\n $(this).find('i').toggleClass('fa-caret-down fa-caret-up');\n //close all notifications\n $('.close-open-button.close-button').trigger('click');\n // stop propagation so that the event is not identified by body listener\n e.stopPropagation();\n });\n function closeDropdowns(e) {\n if($(e.currentTarget).hasClass('action-dropdown')) {\n return;\n }\n for(let i = 0; i < allPanels.length; i++) {\n let element = $(allPanels[i]);\n if(element.hasClass('opened')) {\n element.hide();\n element.removeClass('opened').addClass('closed');\n let dropdownArrow = $(allPanels[i]).parent().find('i');\n if(dropdownArrow.hasClass('fa-caret-up')) {\n dropdownArrow.removeClass('fa-caret-up').addClass('fa-caret-down');\n }\n }\n }\n }\n // close dropdowns if click in any another place of body\n $('body').on('click', closeDropdowns);\n // and click on #advanced-options-fieldset because of stopPropagation on this element\n $('#advanced-options-fieldset').on('click', closeDropdowns);\n}", "title": "" } ]
[ { "docid": "b65f58a46df1a40c1f0cc7be25c7a4ce", "score": "0.73709565", "text": "clickOnDropDownButton() {\n commonActions.click(this.dropDownMenu);\n }", "title": "" }, { "docid": "b858b2d2804d948690f6928687fef591", "score": "0.6857148", "text": "function dropDown() {}", "title": "" }, { "docid": "16559d4015eeeb773153bd56a19f764e", "score": "0.66156286", "text": "dropdownClicked(event){\r\n if(event.data.parent.showingAssignments){\r\n event.data.parent.showingAssignments = false\r\n $('#'+event.data.parent.classesDiv).css(\"visibility\", \"hidden\")\r\n }\r\n else{\r\n event.data.parent.showingAssignments = true\r\n $('#'+event.data.parent.classesDiv).css(\"visibility\", \"visible\")\r\n }\r\n }", "title": "" }, { "docid": "42b513580d184e5ac365c6b91c9af12f", "score": "0.6560128", "text": "function knowledge_select_changed_evt(evt){\n\n var action_selection = $('#wizardLO #actionSelection');\n\n // Setup knowledge dropdown\n action_selection.empty()\n\n // add a default none option\n action_selection.append(new Option(\"Select Action...\", \"\", true, true));\n\n $.each(verbsByKnowledge[evt.currentTarget.value], function(i, verb){\n action_selection.append(new Option(verb.verb, verb.id, false, false));\n });\n\n // trigger the action selection change, since the options were updated\n action_selection.trigger('change');\n}", "title": "" }, { "docid": "d4524ba4bb38db46a5aa259d34744a30", "score": "0.64647806", "text": "onkeydown(dropdown, e)\n {\n this.sendAction(\"onkeydown\", dropdown, e);\n }", "title": "" }, { "docid": "95d8322508c3de7ef663ad123cd20264", "score": "0.63963103", "text": "change() {\n let optionValue = this.$('option:selected').val();\n this.sendAction('onSelect', optionValue);\n }", "title": "" }, { "docid": "fc267d44222218338c5fa21b4dfdcdf9", "score": "0.62764645", "text": "function CBLimitTypeSelect(event)\n{\n CBLimitTypeChange();\n}", "title": "" }, { "docid": "42c346c22c0cbc71e486d6f3b353c7c7", "score": "0.62272877", "text": "_onDropdownClick() {\n\t\tif (this.usersListShown()) {\n\t\t\tthis.hideUserList();\n\t\t} else {\n\t\t\tthis.showUserList();\n\t\t}\n\t}", "title": "" }, { "docid": "691458edae79c84016bd276b7102d5be", "score": "0.6223078", "text": "function addDropDownEventHandlers(appSettings) {\n $('#audit-history-module').live('change', function () {\n showSubModuleNames(appSettings);\n });\n }", "title": "" }, { "docid": "ca5045bd184e92c563c902d20b7b3931", "score": "0.6220538", "text": "function addDropDownSelectListeners() {\n\n\t$('#select_landowner_titledeeds').change(function(e) {\n\n\t});\n\n\t$('#select_filter_titledeeds_nature').change(function(e) {\n\t\tpopulateTitleDeedNatures();\n\t});\n}", "title": "" }, { "docid": "352b7798b532ca9be5de58676e43aa66", "score": "0.6215628", "text": "_actionButtonsChanged() {\n // set _notifyActionChange false to prevent firing px-dropdown-selection-changed while updating the new set of buttons\n this._notifyActionChange = false;\n let actionBtns = JSON.parse(JSON.stringify(this.actionButtons));\n // set default max buttons if not passed in the JSON object\n let maxButtons = actionBtns.maxButtons || 3;\n // set default max primary buttons if not passed in the JSON object\n let maxPrimaryButtons = actionBtns.maxPrimaryButtons || 1;\n let primaryBtns = [];\n let btns = [];\n for(let x in actionBtns.items) {\n if(actionBtns.items[x].isPrimary) {\n if(primaryBtns.length < maxPrimaryButtons) {\n // add primary button to array\n primaryBtns.push(actionBtns.items[x]);\n } else {\n // just delete isPrimary to add to btns array\n delete actionBtns.items[x].isPrimary;\n }\n }\n if(!actionBtns.items[x].isPrimary) {\n btns.push(actionBtns.items[x]);\n }\n }\n this._isDisplayDropdown = false;\n if(this.primary) {\n actionBtns.items = primaryBtns;\n } else {\n actionBtns.items = btns;\n this._isDisplayDropdown = actionBtns.items.length > maxButtons;\n }\n this._isDisplayButtons = false;\n \n \n if(this._isDisplayDropdown) {\n this._setupDropdownButtons(actionBtns);\n } else {\n this._items = actionBtns.items;\n this._isDisplayButtons = true;\n }\n this._notifyActionChange = true;\n }", "title": "" }, { "docid": "20551f76fa7f7aa24f8d7cc350cda1d3", "score": "0.617274", "text": "function click_handler(e) {\n\n if (!dropdown_visible && e.target.classList.contains(selectors.hooks.toggle.substring(1))) {\n // show dropdown\n dropdown_visible = true;\n // set max-height to the scrollHeight of the element\n /* note: had this variable scoped up but had to wait for window load, this is more consistent with\n resizing pages, dynamic heights, etc. */\n nodes.dropdown.style.maxHeight = nodes.dropdown.scrollHeight + 'px';\n }\n else if (\n (dropdown_visible && e.target.classList.contains(selectors.hooks.toggle.substring(1))) ||\n !nodes.dropdown.contains(e.target)\n ) {\n // hide dropdown\n dropdown_visible = false;\n nodes.dropdown.style.maxHeight = 0;\n }\n }", "title": "" }, { "docid": "1f01920e48ae333da262cb0e874ec8f4", "score": "0.6153299", "text": "get __selectEvent() {\n return \"select-item\";\n }", "title": "" }, { "docid": "240904abee2f5cd73e897c52fb00f3da", "score": "0.61214375", "text": "function BindEvents(type) {\n MEPSTEMP.Global.ApplyMenuSelection('Workstation');\n MEPSTEMP.Global.KeyLocking('.hasKeyLocking', 'data-keylocking');\n // Functionality to handle ajax dropdown\n MEPSTEMP.Global.ValidateDropdown('#ddlSystem');\n $('#ddlSystem').focus();\n\n $('#ddlSystem').change(function () {\n MEPSTEMP.Global.BindDropDownOnClick(\"GET\", 'Dropdown/PopulateOrganizationDropDownList?SystemId=' + $(this).val() + \"&OrganizationId=\" + $('#ddlOrganization').data('saved'), 0, 0, function (result) {\n \n $('#DivOrganization').html(result);\n MEPSTEMP.Global.ValidateDropdownOnChange();\n if ($('#ddlOrganization').data('saved') > 0 && type == 1) {\n $('#ddlOrganization').val($('#ddlOrganization').data('saved'));\n } \n });\n });\n if (type == 1) {\n\n $('#ddlSystem').val($('#ddlSystem').data('saved'));\n $('#ddlSystem').trigger('change');\n\n }\n\n\n\n\n }", "title": "" }, { "docid": "832c659dfd0565f9ef3d7aee427c0a59", "score": "0.61076224", "text": "function handleDropDownButton(value){\n setDropDownState(value);\n isDropDownButtonClicked = true;\n }", "title": "" }, { "docid": "2a7a477af43bc26cf0809185efda0f09", "score": "0.6107125", "text": "renderedCallback() {\n let self = this;\n\n this.template.querySelector(`[data-id=\"combo-input\"]`)\n .addEventListener('click', event => {\n if (!self.disableInput) {\n self.dropdownSelector = 'display:block';\n }\n //stopping propagation so that below event listner won't handle click event \n event.stopPropagation();\n\n })\n document.addEventListener('click', () => {\n self.dropdownSelector = 'display:none'\n })\n }", "title": "" }, { "docid": "28311988da815906c5f200be0c35b0fe", "score": "0.6095773", "text": "clickDropdown(dropdownSelector, optionSelector, opt) {\n opt = !!opt ? opt : {};\n opt.cancelClickScript = true;\n if (!opt.timeout) {\n opt.timeout = ActionBot.getTimeout(\"clickDropdown\");\n }\n var _this = this;\n var p;\n this.driver.call(startStep(\"Open dropdown:\" + dropdownSelector, opt));\n var dropdown = this.getElement(dropdownSelector, opt);\n if(!!args.debug) {\n this.exists(dropdownSelector).then(function(res) {\n console.log(dropdownSelector, 'exists:', res);\n })\n }\n \n var p = commons.flow.execute(function(){\n if (args.browser === 'firefox') {\n new commons.webdriver.ActionSequence(_this.driver)\n .click(dropdown)\n .click(_this.waitForElementToBeVisible(dropdown.findElement(optionSelector), opt))\n .sendKeys(commons.webdriver.Key.ENTER)\n .perform();\n } else {\n commons.flow.execute(function() {\n _this.clickElement(dropdown, opt); \n });\n var option;\n commons.flow.execute(function() {\n option = dropdown.findElement(optionSelector);\n option.then(function(element) {\n option = element;\n });\n });\n commons.flow.execute(function() {\n _this.clickElement(option, opt);\n });\n \n// var option = _this.waitForElementToBeVisible(dropdown.findElement(optionSelector), opt);\n// _this.wait(('Wait for dropdown option:' + optionSelector + ': to be visible'), customUntil.elementIsVisible(option), opt);\n// p = option.click({cancelClickScript:true});\n }\n });\n p.then(onSuccess(opt), onErrorFail(this, opt));\n }", "title": "" }, { "docid": "2c4e702da7d67ab4bc7650e5df352ba3", "score": "0.6093732", "text": "function td_smart_list_dropdown() {\r\n jQuery('.td-smart-list-dropdown').on('change', function() {\r\n window.location = this.value;\r\n });\r\n}", "title": "" }, { "docid": "1e282634921e3d3c55a2ccafa77673a0", "score": "0.6060996", "text": "function customSelectDropdownFunctionalities() { \n function getSelectedValue(id) {\n return $(\"#\" + id).find(\"dt a span.value\").html();\n }\n\n $(\"button\").click(function (e) {\n var val = getSelectedValue('countries');\n alert(val);\n });\n\n $(\".custom-select-dropdown--selected-option a\").on('click', function (e) {\n $(\".custom-select-dropdown ul\").toggle();\n e.preventDefault();\n });\n\n $(\".custom-select-dropdown ul li a\").on('click', function () {\n var text = $(this).html();\n $(\".custom-select-dropdown--selected-option a span\").html(text);\n $(\".custom-select-dropdown ul\").hide();\n\n });\n\n $(document).bind('click', function (e) {\n var $clicked = $(e.target);\n if (!$clicked.parents().hasClass(\"custom-select-dropdown\"))\n $(\".custom-select-dropdown--selected-option ul\").hide();\n });\n }", "title": "" }, { "docid": "3256440c0eada4e8e61e129cba870c01", "score": "0.60331976", "text": "function spawn_dropdown_on(label, file, path, collection_id, type) {\n var whee = $(label).find('> .dropdown > .dropdown-toggle').get(0);\n create_dropdown(whee, file, path, collection_id, type, false);\n return false;\n}", "title": "" }, { "docid": "5106be94dfb5fe0d6b3c74816944a2de", "score": "0.60184133", "text": "function switchDropdown(){\n\n}", "title": "" }, { "docid": "d0e0f7c862c9a4da249b401f415fe02f", "score": "0.5985378", "text": "static aspectDropdownOnChanged(that){\n return (event) => {\n const editNode = event.target.parentNode.parentNode.parentNode.parentNode\n const keypoint = editNode.querySelector('.filter__item').firstChild\n const method = editNode.querySelector('.filter__detail').firstChild\n const defaultkeypoint = 0\n // if the label is 5 or 6 remove keypoint and method choice\n if(Number(event.target.value) === 5 || Number(event.target.value) === 6 || Number(event.target.value) === -1){\n editNode.querySelector('.keypointBlock').classList.add('visbility--hidden')\n editNode.querySelector('.methodBlock').classList.add('visbility--hidden')\n }\n else {\n editNode.querySelector('.keypointBlock').classList.remove('visbility--hidden')\n editNode.querySelector('.methodBlock').classList.remove('visbility--hidden')\n keypoint.innerHTML = that.htmlTable[event.target.value]['table']\n keypoint.value = defaultkeypoint\n method.innerHTML = that.htmlTable[event.target.value]['keypoint'][keypoint.value]\n }\n // handle show all option\n if(editNode.classList.contains('filter')){\n keypoint.innerHTML += '<option value=\\'-1\\'>全部</option>'\n method.innerHTML += '<option value=\\'-1\\'>全部</option>'\n }\n }\n }", "title": "" }, { "docid": "2011befa7370740b5d19a2bad2ae3289", "score": "0.5971099", "text": "function showOptions() {\n\n dom.module.addClass( \"dropdown-open\" );\n\n }", "title": "" }, { "docid": "3ec309499033464a54264c4a70ccaa49", "score": "0.59570915", "text": "function doAfterSelectOptionChangedForTaskScheduleInfoExt(fieldName)\n{\n //Custom handling\n}", "title": "" }, { "docid": "0700fb191b0e0e3a1c94e4633046663f", "score": "0.59569085", "text": "docClickHandler(e) {\n const { showDropdown } = this.state;\n if (showDropdown) {\n this.toggleDropdown(e);\n }\n }", "title": "" }, { "docid": "d0ccfa2036e3a52bac6691db6b6d5413", "score": "0.5956482", "text": "onEventSelect(selectedEvent){\n OrderWizardActions.setEvent(selectedEvent)\n }", "title": "" }, { "docid": "d365f549114bf7c21cfe1bf1b0b28d69", "score": "0.5925949", "text": "function downloadDropdown (){\n\t ga('send', 'event', {\n eventCategory: 'Propeller Component ',\n eventAction: 'Download',\n eventLabel: 'Dropdown'\n });\n}", "title": "" }, { "docid": "510cd23510f15eaef5058414d8731b2b", "score": "0.5925313", "text": "function handleDropdownSelection(e) {\n var $a = $(e.target);\n var value = $a.attr('data-value');\n updateOption(this, value, $a.hasClass('aui-dropdown2-checked'));\n }", "title": "" }, { "docid": "a15268d0f4c83239ae0d9d06817ecd02", "score": "0.59180707", "text": "function setDropDownToBeChoosenItemDetails() {\n bindChosenDDLMulitpleSelectEvent('ddlItemTypeId');\n bindChosenDDLMulitpleSelectEvent('ddlItemGroupId');\n bindChosenDDLMulitpleSelectEvent('ddlItemStatus');\n bindChosenDDLMulitpleSelectEvent('ddlInventoryItemType');\n}", "title": "" }, { "docid": "639253fbb88b880d2dded534cf90caa5", "score": "0.5916157", "text": "function showItemOnChangeEvent(){\n\t/* Checking the select object to check the dependency */\n\t$('select').each(function(){\n\t\t/* checking the dependency the target element */\n\t\tif($(this).attr('is-change-event') && $(this).attr('action')){\n\t\t\tvar strAction\t= $(this).attr('action');\n\t\t\t//objectRefrence\t= $(this).attr('is-change-event');\n\t\t\t$(this).bind('change',function(){\n\t\t\t\t$('#frmDynamicEventDataSet').append('<input type=\"hidden\" name=\"txtElementCode\" id=\"txtElementCode\" value=\"'+$(this).val()+'\" />');\n\t\t\t\t/* if module and widget attributes configuration module exist then do needful */\n\t\t\t\tif($('#cboLeadAttributeCode').length > 0){\n\t\t\t\t\t$('#frmDynamicEventDataSet').append('<input type=\"hidden\" name=\"txtModuleFieldCode\" id=\"txtModuleFieldCode\" value=\"'+$('#txtModuleFieldCode').val()+'\" />');\n\t\t\t\t}\n\t\t\t\t$('#frmDynamicEventDataSet').attr('action',SITE_URL+'/'+strAction);\n\t\t\t\tpostUserRequest('frmDynamicEventDataSet');\n\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "6ca530cf2e82243288c7031487c849dc", "score": "0.58951676", "text": "function attachClickAction($listFilter) {\n switch ($listFilter.attr('data-id')) {\n case \"sectors-add\":\n \t$listFilter.data('click_handler', function() {\n \t\tvar $field = $(this);\n \t\tvar overlayTitle = $field.attr('data-title');\n \t\tvar labels = [];\n \t\t$.each(global.config['FORECAST_SECTOR'].data, function(key, data){\n \t\t\tlabels.push(data.label);\n \t\t});\n \t\tcreateOverlayOptionSelection(overlayTitle, labels, $field.list_filter('get_values'), function(selected){\n \t\t\t$field.list_filter('set_values', selected);\n \t\t\t$field.list_filter('refresh_display');\n \t\t\t$field.change(); // Use jQuery to fire the change event\n \t\t});\n \t});\n \tbreak;\n case \"productCat-add\":\n \t$listFilter.data('click_handler', function() {\n \t\tvar $field = $(this);\n \t\tvar overlayTitle = $field.attr('data-title');\n \t\tvar options = [];\n \t\tvar labels = [];\n \t\tvar selected = [];\n \t\t$.each(global.config['PRODUCT_CATEGORY'].data, function(key, data){\n \t\t\toptions.push(key);\n \t\t\tlabels.push(data.label);\n \t\t});\n \t\t$.each($field.list_filter('get_values'), function(key, data){\n \t\t\tselected.push(data[0]);\n \t\t});\n \t\tcreateOverlayOptionSelection(overlayTitle, labels, selected, function(selected){\n \t\t\t$field.list_filter('set_values', selected);\n \t\t\t$field.list_filter('refresh_display');\n \t\t\t$field.change(); // Use jQuery to fire the change event\n \t\t}, false, options);\n \t});\n \tbreak;\n case \"probability-add\":\n $listFilter.data('click_handler', function() {\n var $field = $(this);\n var overlayTitle = $field.attr('data-title');\n var data = [];\n var sortedProbability = [];\n var categories = global.config['FORECAST_PROBABILITY'].data;\n $.each(categories, function(i, v) {\n if (v.status == 'active') {\n sortedProbability.push(v)\n }\n });\n sortedProbability.sort(function(a, b) {\n return a.seq - b.seq;\n });\n $.each(sortedProbability, function(i, v) {\n data.push(v.label)\n });\n createOverlayOptionSelection(overlayTitle, data, $field.list_filter('get_values'), function(selected) {\n $field.list_filter('set_values', selected);\n $field.list_filter('refresh_display');\n \t\t\t$field.change(); // Use jQuery to fire the change event\n });\n });\n break;\n case \"leadSource-add\":\n case \"oppOwner-add\":\n \tbreak; // Theese are special and are handled by a separate event handler further down\n case \"country-add\":\n \t// WARNING: Hack Ahead\n \t// Because of the peculiarities of the country filter, it was\n \t// decided to hardcode this filter for the BST filters pane\n \t// Hopefully this will not be a permanent state of affairs\n \tif( $listFilter.attr('data-context') == 'bst-mgmt-report' ) {\n \t$listFilter.data('click_handler', function() {\n \t\tvar $field = $(this);\n \t\tvar overlayTitle = $field.attr('data-title');\n \t\tvar labels = ['Canada', 'US']; // Options are hardcoded\n \t\tcreateOverlayOptionSelection(overlayTitle, labels, $field.list_filter('get_values'), function(selected){\n \t\t\t$field.list_filter('set_values', selected);\n \t\t\t$field.list_filter('refresh_display');\n \t\t\t$field.change(); // Use jQuery to fire the change event\n \t\t});\n \t});\n \tbreak;\n \t}\n \t// If the data-context is not bst-mgmt-report, fall through to default\n default:\n $listFilter.data('click_handler', createOverlayFromData($listFilter));\n }\n }", "title": "" }, { "docid": "d762c5aa849a1856fef34ab6adef75b0", "score": "0.58922976", "text": "function setPullDownEvents(){\n\t/* Checking the select object to check the dependency */\n\t$('select').each(function(){\n\t\t/* checking the dependency the target element */\n\t\tif($(this).attr('check-dependency') && $(this).attr('dependency-element')){\n\t\t\tvar strAction\t= $(this).attr('check-dependency');\n\t\t\tobjectRefrence\t= $(this).attr('dependency-element');\n\t\t\t$(this).bind('change',function(){\n\t\t\t\t$('#frmDynamicEventDataSet').append('<input type=\"hidden\" name=\"txtRegionCode\" id=\"txtRegionCode\" value=\"'+$(this).val()+'\" />');\n\t\t\t\t$('#frmDynamicEventDataSet').attr('action',SITE_URL+'leadsoperation/leadsoperation/'+strAction);\n\t\t\t\tpostUserRequest('frmDynamicEventDataSet');\n\t\t\t\t\n\t\t\t\t/* if current drop down is lead transfer region or branch box then do below */\n\t\t\t\tif($(this).attr('id') == 'cboTransferRegionCode'){\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t$('#frmDynamicEventDataSet').attr('action',SITE_URL+'settings/locations/getUserListByLocation');\n\t\t\t\t\t\tobjectRefrence\t= 'cboUSerCode';\n\t\t\t\t\t\tpostUserRequest('frmDynamicEventDataSet');\n\t\t\t\t\t},1000);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t})\n}", "title": "" }, { "docid": "4d7ede3f84ec8071acaf7eb36f3ebe82", "score": "0.58866763", "text": "function optionListEventHandlers(ed) {\n\t\t\t\tjQuery(autocomplete_data.list).find(\"li\").hover(function () {\n\t\t\t\t\tjQuery(autocomplete_data.list).find(\"[data-selected=true]\").attr(\"data-selected\", \"false\");\n\t\t\t\t\tjQuery(this).attr(\"data-selected\", \"true\");\n\t\t\t\t});\n\t\t\t\tjQuery(autocomplete_data.list).find(\"li\").click(function () {\n\t\t\t\t\tselectOption(ed, getCurrentWord(ed));\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "2981ea92c1314d72c285b0c8caafb323", "score": "0.5865705", "text": "function actionSelect(actionSel){\n\tvar action = actionSel.options[actionSel.selectedIndex].value;\n\tif ( action == \"addTemplate\" ){\n\t\tstartAddingTemplate();\n\t}else if ( action == \"viewTemplateUploadingHistroy\" ){\n\t\tshowHistroyView();\n\t}else if ( action == \"uploadTemplateForms\" ){\n\t\tshowUploadForms();\n\t}else if ( action == \"viewUploadedForms\"){\n\t\tshowViewUploadForms();\n\t}\n\tactionSel.options[0].selected = true;\n}", "title": "" }, { "docid": "f15ea3466dc2539ffe4cb8bb846c7b68", "score": "0.5860577", "text": "function add_action(){\n\n let action = clone(actions[0]);\n let var_actions = elements_array[_g('#elements').selectedIndex].events[_g('#select_subproperties').selectedIndex].actions;\n let count = _g('#select_action').childElementCount;\n var_actions[count]=action;\n let option = document.createElement('option');\n option.text = count;\n option.value = count;\n option.id = count;\n _g('#select_action').add(option);\n _g('#remove_action').style=\"visibility: visible;\";\n let actions_table = _g('#actions_table');\n actions_table.innerHTML = select_action_type();\n show_action();\n\n}", "title": "" }, { "docid": "662cc83d2ec01b72c8eccc8d550eac5d", "score": "0.584759", "text": "function handleDropdownSelection(e) {\n var $a = (0, _jquery2.default)(e.target);\n var value = $a.attr('data-value');\n updateOption(this, value, $a.hasClass('aui-dropdown2-checked'));\n }", "title": "" }, { "docid": "7f9ebb833b369d88366a8950f63372a3", "score": "0.5845064", "text": "dropdownClick () {\n console.log(\"dropdown menu working\")\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "title": "" }, { "docid": "5f46c173e01b106dcd705d1cf8677514", "score": "0.5840347", "text": "function kobeAmenagementHandle() {\n $('[design-old=nue]').click(function (e) {\n // selectItem('designKobe', e);\n // $('#'+formFieldId).val('sansAmenagement_v1');\n $('[design=sansAmenagement_v1]').click();\n });\n $('[design=sansAmenagement_v1]').click(function (e) {\n $('.select-nue').hasClass('selected') ? null : $('.select-nue').addClass('selected');\n $(\".select-amenage\").removeClass('noBorder');\n });\n $('[design=sansAmenagement_v2]').click(function (e) {\n $('.select-nue').hasClass('selected') ? null : $('.select-nue').addClass('selected');\n $(\".select-amenage\").removeClass('noBorder');\n });\n $(\"[design='amenagement_v1']\").click(function (e) {\n $(\".select-nue\").removeClass('selected');\n $(\".select-amenage\").addClass('noBorder');\n });\n}", "title": "" }, { "docid": "3126dc9d7667a013b4f00be03fb899ad", "score": "0.58341", "text": "function fbClickRecipientTypeDropdown(moduleObject, element, event)\n{\n\tvar selectionlist = dhtml.getElementById(\"meetingrequest_recipienttype_selectionlist\")\n\tif(selectionlist){\n\t\tselectionlist.parentNode.removeChild(selectionlist);\n\t}\n\n\tvar selectionlist = dhtml.addElement(document.getElementsByTagName(\"body\")[0], \"div\", \"meetingrequest_recipienttype_selectionlist\", \"meetingrequest_recipienttype_selectionlist\");\n\tselectionlist.userid = element.userid;\n\tselectionlist.icon_element = element;\n\n\tvar elemPos = dhtml.getElementTopLeft(element);\n\tselectionlist.style.left = elemPos[0] + \"px\";\n\tselectionlist.style.top = (elemPos[1] + Number(element.offsetHeight)) + \"px\";\n\n\tvar ul = dhtml.addElement(selectionlist, \"ul\");\n\tul.container = selectionlist;\n\t//dhtml.addEvent(moduleObject, ul, \"mouseout\", fbMouseOutRecipientTypeDropDownList);\n\n\tvar liReqAtt = dhtml.addElement(ul, \"li\", \"icon icon_meetingrequest_requiredattendee\", \"\", _(\"Required Attendee\"));\n\tliReqAtt.recipientType = 1;\n\tvar liOptAtt = dhtml.addElement(ul, \"li\", \"icon icon_meetingrequest_optionalattendee\", \"\", _(\"Optional Attendee\"));\n\tliOptAtt.recipientType = 2;\n\tvar liRes = dhtml.addElement(ul, \"li\", \"icon icon_meetingrequest_resource\", \"\", _(\"Resource (Room or Equipment)\"));\n\tliRes.recipientType = 3;\n\tdhtml.addEvent(moduleObject, liReqAtt, \"mouseover\", fbMouseOverRecipientTypeDropDownListItem);\n\tdhtml.addEvent(moduleObject, liReqAtt, \"mouseout\", fbMouseOutRecipientTypeDropDownListItem);\n\tdhtml.addEvent(moduleObject, liReqAtt, \"click\", fbClickRecipientTypeDropDownListItem);\n\n\tdhtml.addEvent(moduleObject, liOptAtt, \"mouseover\", fbMouseOverRecipientTypeDropDownListItem);\n\tdhtml.addEvent(moduleObject, liOptAtt, \"mouseout\", fbMouseOutRecipientTypeDropDownListItem);\n\tdhtml.addEvent(moduleObject, liOptAtt, \"click\", fbClickRecipientTypeDropDownListItem);\n\n\tdhtml.addEvent(moduleObject, liRes, \"mouseover\", fbMouseOverRecipientTypeDropDownListItem);\n\tdhtml.addEvent(moduleObject, liRes, \"mouseout\", fbMouseOutRecipientTypeDropDownListItem);\n\tdhtml.addEvent(moduleObject, liRes, \"click\", fbClickRecipientTypeDropDownListItem);\n\n\t// Cancel further event handlers\n\tevent.stopPropagation();\n}", "title": "" }, { "docid": "3057439167e580b70cf438d6aedf91db", "score": "0.58334917", "text": "addDropdownMenusEvent() {\n this.dropdownMenus.forEach((menu) => {\n this.events.forEach((userEvent) => {\n menu.addEventListener(userEvent, this.activeDropdownMenu);\n });\n });\n }", "title": "" }, { "docid": "233283869298c6ac41768d6e4c6901fe", "score": "0.58251584", "text": "function listenerDropdownCategorias(isAdmin, username, categoria){\n \n document.querySelectorAll(\".btn-dropdown-categoria\").forEach(dropDownItem => {\n dropDownItem.addEventListener(\"click\", function (e) {\n let categoria = dropDownItem.id;\n $(\"*\").css(\"pointer-events\", \"none\");\n $(\"*\").css(\"cursor\", \"not-allowed\");\n document.getElementById(\"content\").innerHTML = `<img src=\"./img/loading.gif\" alt=\"Loading...\" width=\"50px\" style=\"margin-left:auto;margin-right:auto\"></img>`;\n setTimeout(function () {\n $(\"*\").css(\"pointer-events\", \"auto\");\n $(\"*\").css(\"cursor\", \"default\");\n extraerExperiencias(isAdmin, username, categoria);\n }, 2000);\n })\n });\n }", "title": "" }, { "docid": "41a2776f4665c90c2376de34e45ca308", "score": "0.58139175", "text": "static keypointDropdownOnChanged(that){\n return (event) => {\n const editNode = event.target.parentNode.parentNode.parentNode.parentNode\n const aspect = editNode.querySelector('.filter__dimension').firstChild.value\n const method = editNode.querySelector('.filter__detail').firstChild\n if(Number(event.target.value) === -1){\n editNode.querySelector('.methodBlock').classList.add('visbility--hidden')\n }\n else {\n method.innerHTML = that.htmlTable[aspect]['keypoint'][event.target.value]\n editNode.querySelector('.methodBlock').classList.remove('visbility--hidden')\n }\n // handle show all option\n if(editNode.classList.contains('filter')){\n method.innerHTML += '<option value=\\'-1\\'>全部</option>'\n }\n }\n }", "title": "" }, { "docid": "18643142c9e591eaa94f4d50248b2457", "score": "0.5804479", "text": "function dropdownManagerMod(){\n if (menuShownMod == false){\n openMenuMod();\n headingOptionHoverMod();\n menuShownMod = true\n }\n else{\n closeMenuMod();\n headingOptionLeaveMod();\n menuShownMod=false;\n }\n\n}", "title": "" }, { "docid": "3b346c59db1334f353ce5d023d6afe2e", "score": "0.5803387", "text": "handleOptionsChange(itemMeta, e) {\n e.preventDefault();\n e.stopPropagation();\n\n const { loan, action } = itemMeta;\n\n if (action && this[action]) {\n this[action](loan);\n }\n }", "title": "" }, { "docid": "56bd8c7e74f04fb0765f1a5a50f69269", "score": "0.58020115", "text": "onBlockSelect() {\n // Do something when a section block is selected\n }", "title": "" }, { "docid": "56bd8c7e74f04fb0765f1a5a50f69269", "score": "0.58020115", "text": "onBlockSelect() {\n // Do something when a section block is selected\n }", "title": "" }, { "docid": "f423ee70d472ca0c50f46f56f0a10548", "score": "0.5785687", "text": "addEvents(container, selector){\n container.addEventListener('click', ()=>{\n this.toggleSelect();\n });\n selector.addEventListener('change', (event) => {\n debugger;\n try{\n if(this.options.selectFunction !== undefined){\n debugger;\n this.options.selectFunction(event.target.value);\n }\n // setState({ selectedOptions: event.target.value});\n }\n catch(err){\n console.error(`Failed to set value: ${ err.toString()}`);\n }\n });\n }", "title": "" }, { "docid": "d4814b91947b659f84d7545b519f1472", "score": "0.57817346", "text": "function clickHandler() {\n\t\t\tif (!shown) {\n\t\t\t\tshown = true;\n\t\t\t\tif (spinner.getSpinnerType() === 'time') {\n\t\t\t\t\told_value = spinner.getTimeValueAsSeconds();\n\t\t\t\t} else {\n\t\t\t\t\told_value = spinner.getValue();\n\t\t\t\t}\n\t\t\t\tdropdown_layer.show().on('mousedown', function(e) {\n\t\t\t\t\tif (e.target === dropdown_layer[0]) {\n\t\t\t\t\t\tcancelAndHide();\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t\tdropdown_layer.find('.dropdown_' + settings.name).show();\n\t\t\t\tslider.setValue(old_value);\n\t\t\t} else {\n\t\t\t\tcancelAndHide();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3298e070b8ca95d0c1941ab3d788c8a4", "score": "0.57728344", "text": "function itemHandler(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tselect.val($(this).data('value'));\n\t\t\t\tselect.change();\n\t\t\t\tupdateButton();\n\t\t\t}", "title": "" }, { "docid": "567bb964de49b8149b78dd0c960385b5", "score": "0.5769769", "text": "function toggleDropdown(){\n\n}", "title": "" }, { "docid": "61f34c85f4a500493edeba01605b7c46", "score": "0.5759685", "text": "function dropdownHandler(e) {\r\n var s = document.getElementById(SELECT_QU); \r\n var sid=s.selectedIndex; \r\n if (parseInt(s.options[sid].value)>0) { // normal selection\r\n s.selectedIndex=0; \r\n doSelection(sid,\"yes\");\r\n } else if (s.options[sid].value==\"-1\") { // configure link\r\n s.selectedIndex=0; \r\n cfgHandler();\r\n } else if (s.options[sid].value==\"-2\") { // new version update link\r\n s.selectedIndex=0; \r\n // wipe out any state potentially incorrect after update\r\n var pname=GM_getValue(\"currentPlayer\",\"\");\r\n GM_setValue(pname+\"_lastselect\",\"0\");\r\n GM_setValue(pname+\"_quickbutton\",\"1\");\r\n // update script\r\n window.open('http://userscripts.org/scripts/source/35691.user.js');\r\n window.location.reload();\r\n }\r\n}", "title": "" }, { "docid": "face195d146618222257efb0ad623d72", "score": "0.57471216", "text": "function optionsDropdownShown(e) {\n // If an item has a matching diff option set it to the value.\n // default to false\n $(this).find(ddCoreItems).each(function () {\n var $el = $(this);\n var key = $el.attr('data-key');\n var val = $el.attr('data-value');\n var storedValue = diffViewOptions.get(key);\n var isChecked = storedValue && (storedValue === val || storedValue === true);\n\n $el.toggleClass('aui-dropdown2-checked checked', isChecked).attr('aria-checked', isChecked);\n });\n\n destroyables.push(events.chain().on('window.scroll.throttled', closeDiffViewOptions).destroy);\n }", "title": "" }, { "docid": "12363678cab32e7aa079a7ae1cc15dcd", "score": "0.57450056", "text": "function optionChanged(updateSelect) {\n dropdownMenu(updateSelect);\n barplot(updateSelect);\n bubble(updateSelect);\n demoInfo(updateSelect)\n}", "title": "" }, { "docid": "652bbe1db2c92e0f88616388ec12f9fa", "score": "0.5737355", "text": "function sendItem() {\n gtag('event', 'select_content', {\n 'event_category': 'engagement',\n 'event_label': 'Autocomplete suggestion of \"Company\" is selected'\n });\n}", "title": "" }, { "docid": "adaa71f768691cde500dfed0578b5958", "score": "0.5733302", "text": "function onSelectChangeButtonVal() {\n $(\".attribute-dropdown .dropdown-menu .dropdown-item\").click(function () {\n text = $(this).html();\n val = $(this).val();\n dropDownBtn = $(this).parent().siblings('.dropdown-toggle'); // get dropdown-btn ID using dropdown menu [data-aria-labelledby]\n\n $(dropDownBtn).html(text).val(val); //replace btn text with selected dropdown\n })\n}", "title": "" }, { "docid": "d059a26b12d8bdbed16c6636b9cec0ff", "score": "0.57304263", "text": "function handleDropDown() {\n $('.dropdown-filter').on('change', function (event) {\n const rate = $(':selected').val();\n store.minRating = rate;\n render();\n });\n }", "title": "" }, { "docid": "c68d2fd8345a62c7cf7706341ddc981a", "score": "0.5728722", "text": "function bindHandlerElements() {\n\t\t\t\tchoose_el = (options.label_choose_type == 'element') ? 'status' : 'choose';\n\t\t\t\t$j('#'+getElementID(choose_el)).click(function(){\n\t\t\t\t\t$j($input).trigger('filter');\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t\t$j('#'+getElementID('reset')).click(function(){\n\t\t\t\t\t$j($input).trigger('reset');\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "57bdb8151032a04b86711e3299d24b61", "score": "0.57104844", "text": "events(){\n this.elem.addEventListener('keydown', (event) => {\n if(event.keyCode === 40) this.keyMove(1);\n if(event.keyCode === 38) this.keyMove(-1);\n if(event.keyCode === 27) this.closeDropdown();\n });\n\n window.addEventListener('mousedown', (event) => {\n if(!compareElements(this.elem, event.target, true))\n this.closeDropdown();\n });\n\n /*\n When mouse is over the content and user use mouse scroll. Basically content moves vertically. Holding CTRL button content moves horizontally.\n */\n this.dropdown.content.elem.addEventListener('wheel', (event) => {\n event.preventDefault();\n this.mouseScroll(event);\n });\n /*\n When mouse is over certain track and user use mouse scroll.\n */\n this.dropdown.track.elem.addEventListener('wheel', (event) => {\n event.preventDefault();\n this.mouseScroll(event);\n });\n /*\n When thumb of certain track is held.\n */\n this.dropdown.track.thumb.elem.addEventListener('mousedown', (event) => {\n this.mouse_hold = true;\n });\n /*\n When track is clicked.\n */\n this.dropdown.track.elem.addEventListener('mousedown', (event) => {\n event.preventDefault();\n this.mouseMove(event);\n });\n /*\n When mouse is moved. Work only if thumb of certain track is held.\n */\n window.addEventListener('mousemove', (event) => {\n event.preventDefault();\n if (this.mouse_hold) this.mouseMove(event);\n });\n /*\n When mouse button is released.\n */\n window.addEventListener('mouseup', (event) => {\n event.preventDefault();\n this.mouse_hold = false;\n });\n }", "title": "" }, { "docid": "ba03bb842bed274c97bb244bca0a7d88", "score": "0.5705794", "text": "function initiateOptionPanePopulateClickListener(id, items, title, type, selected) {\n $(id).on(\"click\", () => {\n // Populate the options \n let innerHTML = \"\";\n $(\"#options\").html(innerHTML)\n for (item in items) {\n if (selected.indexOf(items[item]) >= 0) {\n innerHTML += `<li class = \"list-item btn btn-block btn-lg btn-info notransition active\">${items[item]}</li>`\n } else {\n innerHTML += `<li class = \"list-item btn btn-block btn-lg btn-info notransition\">${items[item]}</li>`\n }\n }\n $(\".title\").html(title);\n $(\"#options\").html(innerHTML);\n\n // Setup the check all status based on the type\n if (checkAllState[type]) {\n setCheckAllActive(type)\n } else {\n setCheckAllInactive(type)\n }\n\n // set the state of opened option type\n filterSelected = type\n })\n}", "title": "" }, { "docid": "703354e962c06ebb737f530903a6b156", "score": "0.56998014", "text": "function goUpdateSelectEditMenuItems()\n{\n goUpdateCommand('cmd_cut');\n goUpdateCommand('cmd_copy');\n goUpdateCommand('cmd_delete');\n goUpdateCommand('cmd_selectAll');\n}", "title": "" }, { "docid": "96189ce403534329c0bfc3397e429451", "score": "0.5693136", "text": "OnSelectedIndexChanged() {\n this.Trigger('SelectedIndexChanged', {});\n }", "title": "" }, { "docid": "96189ce403534329c0bfc3397e429451", "score": "0.5693136", "text": "OnSelectedIndexChanged() {\n this.Trigger('SelectedIndexChanged', {});\n }", "title": "" }, { "docid": "96189ce403534329c0bfc3397e429451", "score": "0.5693136", "text": "OnSelectedIndexChanged() {\n this.Trigger('SelectedIndexChanged', {});\n }", "title": "" }, { "docid": "96189ce403534329c0bfc3397e429451", "score": "0.5693136", "text": "OnSelectedIndexChanged() {\n this.Trigger('SelectedIndexChanged', {});\n }", "title": "" }, { "docid": "96189ce403534329c0bfc3397e429451", "score": "0.5693136", "text": "OnSelectedIndexChanged() {\n this.Trigger('SelectedIndexChanged', {});\n }", "title": "" }, { "docid": "5b33ea8f79a6e535b301eca87fa66b65", "score": "0.5678635", "text": "function showHideBySelectBox(e) {\n\n if ($(e).children(\"option:selected\").attr(\"data-target\") != null && $(e).children(\"option:selected\").attr(\"data-target-action\") != \"\") {\n let dataTargets = $(e).children(\"option:selected\").attr(\"data-target\").split(\",\");\n let dataActions = $(e).children(\"option:selected\").attr(\"data-target-action\").split(\",\");\n\n $.each(dataTargets, function (i, data) {\n var elm;\n if ($(data).length > 0) {\n elm = data;\n }\n else {\n elm = \"#elm\" + data.split(\"#\")[1];\n }\n if (dataActions[i].toLowerCase() === \"false\") {\n $(elm).hide()\n }\n else if (dataActions[i].toLowerCase() === \"enable\") {\n $(elm).removeAttr('disabled');\n }\n else if (dataActions[i].toLowerCase() === \"disable\") {\n $(elm).attr('disabled', 'disabled');\n }\n else {\n $(elm).show();\n }\n });\n }\n\n}", "title": "" }, { "docid": "94d2e3ac7fe1ec51c3d33469a3461794", "score": "0.5673418", "text": "function clickOption() {\n\n // Retrieve dropdownId\n var dropdownId = this.getAttribute('data-dropdown-id');\n\n // Set hidden field to value and display field to text\n document.querySelector('#' + dropdownId).value = this.getAttribute('data-value');\n document.querySelector('#' + dropdownId + '-display').innerHTML = this.innerHTML;\n }", "title": "" }, { "docid": "964f787a7719afa12dc9cbaf9fba2c71", "score": "0.5671524", "text": "function dropDownHandler() {\n // for click\n $(this).children('.cutomArrowIcon').toggleClass('customArrowIconSelected');\n //for hover \n $(this).children('.collapse').collapse('show');\n // console.log(e)\n}", "title": "" }, { "docid": "41a4fadf4cd6d33cdf507e0594566e71", "score": "0.56702113", "text": "function handleDropDownFocus(e) {\n DeviceContextMenuController.getInstance().setSession(session);\n }", "title": "" }, { "docid": "50d360745fba9fbe914982c134dd84c9", "score": "0.5656978", "text": "function edgtfOnDocumentReady() {\n\t\tedgtfSetDropDownMenuPosition();\n\t\tedgtfDropDownMenu();\n\t}", "title": "" }, { "docid": "acec9d7eadb06ecab918ba171588c09e", "score": "0.56524825", "text": "componentSelect() {\n this.querySelectorAll('clh-menu .submenu input').forEach(ins => { \n const $this = this;\n ins.addEventListener('change', function() {\n $this.updateComp(this);\n });\n });\n }", "title": "" }, { "docid": "955d66fa32aa23c7edf4a1758b384728", "score": "0.564997", "text": "function contextmenu(event) {\r\n if (!event.target.matches('.dropbtn')) {\r\n var dropdowns = document.getElementsByClassName(\"dropdown-content\");\r\n var i;\r\n for (i = 0; i < dropdowns.length; i++) {\r\n var openDropdown = dropdowns[i];\r\n if (openDropdown.classList.contains('show')) {\r\n openDropdown.classList.remove('show');\r\n }\r\n }\r\n }\r\n event.preventDefault();\r\n}", "title": "" }, { "docid": "f273402e781aaf3fe85523ee08aa5703", "score": "0.5636969", "text": "onSlcFocus(e) {\n let _ev = e || global.event;\n let elm = Event.target(_ev);\n this.activeFilterId = elm.getAttribute('id');\n this.activeFlt = Dom.id(this.activeFilterId);\n // select is populated when element has focus\n if(this.loadFltOnDemand && elm.getAttribute('filled') === '0'){\n let ct = elm.getAttribute('ct');\n this.Mod.dropdown._build(ct);\n }\n if(this.popupFilters){\n Event.cancel(_ev);\n Event.stop(_ev);\n }\n }", "title": "" }, { "docid": "e42b960e5890373f604a85f8cc0cbe66", "score": "0.5631218", "text": "function updateDropdownLabel() {\n // code goes here\n}", "title": "" }, { "docid": "942dd3e637d29ac320aebefcc66b8eae", "score": "0.5628294", "text": "function postLink() {\n\n // Bind DOM-related preventDropdownCutOff method to component's controller\n PreventDropdownCutOffService.preventDropdownCutOff($element, '.three-dot-menu');\n }", "title": "" }, { "docid": "2e1cf7398d73d386c9276c6ba113d9cf", "score": "0.56057084", "text": "handleSelectBulkActions(event) {\n \n console.log(event.detail.value);\n if(event.detail.value === 'download') {\n this.downloadMultipleFiles();\n }else if(event.detail.value === 'delete') {\n this.deleteSelectedFiles();\n }\n }", "title": "" }, { "docid": "060f97b1e36f05f1188df818ccbdccea", "score": "0.5604979", "text": "function setUpDropDownToggle(){\n $('body .dropdown-toggle').dropdown();\n}", "title": "" }, { "docid": "d52393d54bdfb66f6d36fae7782f9bde", "score": "0.5597297", "text": "function dropdownClick() {\n document.getElementById(\"inv-dropdown-content\").classList.show();\n}", "title": "" }, { "docid": "12773e02a0570fd693a9cf6b9aea2132", "score": "0.5588045", "text": "selectChanged() {\n if (this.getSelectedText() === \"-- Select --\") {\n removeVisibility(\"selection_buttons\");\n } else {\n addVisibility(\"selection_buttons\");\n }\n }", "title": "" }, { "docid": "8af6fcc801f87e1f93357ce99512b557", "score": "0.5585451", "text": "function SelectCaseCloseType(){\n\tvar chk_status = checkformstatus(\"event\"); // check form edit status \n\tif(chk_status == true) \n\t\tCaseCloseType();\n}", "title": "" }, { "docid": "3f201962a2235a494a6cfd9c76205679", "score": "0.55779344", "text": "function ksfLayout_dropDownIn()\n{\n\t$('#dropdownmenu').collapse('show');\n}", "title": "" }, { "docid": "cba9252ad37f53c540add2c1d6445496", "score": "0.55771613", "text": "function registerEventListeners(){\n $(\"#currencyList\").on('change', dropdownAutoSwitcher);\n $(\"#currentPriceGet\").on('mousedown', updateClicked);\n}", "title": "" }, { "docid": "8aa4c417c94715adf1471459a7450ea0", "score": "0.55763054", "text": "function bindEvents(dlpCustomSelect) {\n dlpCustomSelect.elements.addButton.on('click', function() {\n addOption(dlpCustomSelect);\n });\n dlpCustomSelect.elements.deleteButton.on('click', function() {\n deleteOption(dlpCustomSelect);\n });\n //backup method.\n /*\n $(document).on('click', '.box1 .btn-pull-buttom', function() {\n addOption(dlpCustomSelect);\n });\n */\n }", "title": "" }, { "docid": "8c1216f043a209d7e7c20b37dc588730", "score": "0.5568874", "text": "function hideOptions() {\n\n dom.module.removeClass( \"dropdown-open\" );\n\n }", "title": "" }, { "docid": "97839ef7fde099b221c83bfdab286acb", "score": "0.5565256", "text": "function selectMenu() {\n $(this).unbind('click').removeClass('ready').wrapInner('<span style=\"display:none\" />');\n var id = $(this).attr('data-id');\n var type = $(this).attr('data-type');\n var options = D.settings.ws_staff[type];\n var items = '';\n for (var o in options) {\n items += '<option ' + (id == o ? 'selected=\"selected\"' : '') + ' value=\"' + o + '\">' + options[o] + '</option>';\n }\n $(this).prepend('<select>' + items + '</select>');\n $('select', this).change(function() {\n var ele = $(this).parent();\n var id = $(this).val();\n var label = $('option:selected', this).text();\n var type = ele.attr('data-type');\n var row = $(this).parents('tr');\n var case_id = row.attr('data-case-id');\n var contact_id = row.attr('data-contact-id');\n if (confirm(\"Change \" + rowName(row) + \"'s \" + type + \" to \" + label + \"?\")) {\n $.get('/staff/admissions/js', {op: type, case_id: case_id, contact_id: contact_id, selected: id, ts: timeStamp, sem: D.settings.ws_staff.semester}, function(data) {\n if (data == '' || data == 'error' || !data) {\n setMsg('Sorry, an error occurred. Refresh this page and try again.');\n $('option', this).each(function() {\n $(this).attr('selected', $(this).attr('defaultSelected'));\n });\n }\n else {\n applyUpdates(data);\n }\n }, 'json');\n }\n else {\n // Reset on user cancel\n $('select', ele).remove();\n $('span', ele).replaceWith($('span', ele).text());\n ele.addClass('ready').click(selectMenu);\n }\n });\n }", "title": "" }, { "docid": "0b2e11b0e5639011a598d9759f8e6357", "score": "0.556356", "text": "_configureElements() {\n var valueInput = document.getElementById(\"pretty-dropdown__value\");\n var submitButton = valueInput.closest(\"form\").querySelector(\":scope > button[type=submit]\");\n submitButton.setAttribute(\"disabled-by-dropdown\", submitButton.disabled.toString());\n\n valueInput.addEventListener('input', function () {\n if (valueInput.value !== \"\") {\n submitButton.setAttribute(\"disabled-by-dropdown\", \"false\");\n } else {\n submitButton.setAttribute(\"disabled-by-dropdown\", \"true\");\n }\n\n // NOTE: The following logic is used specifically for coordinating logic between the dropdown and the pay button\n if (submitButton.getAttribute(\"disabled-by-amount\")) {\n submitButton.disabled = submitButton.getAttribute(\"disabled-by-amount\") === \"true\" || submitButton.getAttribute(\"disabled-by-dropdown\") === \"true\";\n } else {\n submitButton.disabled = submitButton.getAttribute(\"disabled-by-dropdown\") === \"true\";\n }\n \n });\n\n var inputEvent = new Event(\"input\");\n valueInput.dispatchEvent(inputEvent);\n }", "title": "" }, { "docid": "874fbe1ddd71b66ad062a77047f5ae53", "score": "0.55570924", "text": "function hideDropDownsOnClick(event) {\r\n var a = Event.element(event);\r\n if (a.tagName == 'a') { return false; }\r\n var dropdowns = $$('.select');\r\n for (var i = 0; i < dropdowns.length; i++) {\r\n dropdown = dropdowns[i];\r\n Element.addClassName(dropdown, 'hide-dropdown');\r\n }\r\n}", "title": "" }, { "docid": "3677807f00b0834354902b381bf3a40f", "score": "0.5545753", "text": "function DropDownStages(index) {\n\n var StagesList = $(\"#listStages\").val();\n\n var htmlContent = \"\";\n\n htmlContent += '<fieldset>';\n htmlContent += '<legend class=\"hide\">Dropdown con opciones</legend>';\n htmlContent += '<ul class=\"optionList\">';\n htmlContent += '<li class=\"small\">';\n\n htmlContent += '<span class=\"k-widget k-dropdown k-header kendoDropDown\" unselectable=\"on\" role=\"listbox\" aria-haspopup=\"true\" aria-expanded=\"false\" tabindex=\"0\" aria-owns=\"\" aria-disabled=\"false\" aria-readonly=\"false\" aria-busy=\"false\" aria-activedescendant=\"\" style=\"\">';\n htmlContent += '<span unselectable=\"on\" class=\"k-dropdown-wrap k-state-default k-state-hover\">';\n htmlContent += '<span unselectable=\"on\" class=\"k-input\"></span>';\n htmlContent += '<span unselectable=\"on\" class=\"k-select\">';\n htmlContent += '<span unselectable=\"on\" class=\"k-icon k-i-arrow-s\">select</span>';\n htmlContent += '</span>';\n htmlContent += '</span>';\n htmlContent += '<select class=\"StageskendoDropDown\" data-val=\"true\" data-val-required=\"The StageId field is required.\" id=\"FindingRecommendations_' + index + '__StageId\" name=\"FindingRecommendations[' + index + '].StageId\" data-role=\"dropdownlist\" style=\"display: none;\">';\n\n var count = 0;\n $.each($.parseJSON(StagesList), function (index, Stages) {\n if (count == 0) {\n htmlContent += \"<option value='\" + Stages.Item1 + \"' selected = 'selected'>\" + Stages.Item2 + \"</option>\";\n } else {\n htmlContent += \"<option value='\" + Stages.Item1 + \"'>\" + Stages.Item2 + \"</option>\";\n }\n count++;\n });\n\n htmlContent += '</select>';\n htmlContent += '</span>';\n htmlContent += '</li>';\n htmlContent += '</ul>';\n htmlContent += '</fieldset>';\n\n return htmlContent;\n}", "title": "" }, { "docid": "8e97216176765261a646f509672b7ce3", "score": "0.55378747", "text": "function onAction(e){\n previouslySelected = [];\n var action = e.target.action;\n // Set default panel options. panel is an instance var\n var panelOpts = {\n loading_msg: 'Loading ' + action.title,\n showClose: true\n };\n if(action.rel !== 'create' && (!selection || selection.length === 0)){\n // In some cases dblclicking a feature on the map results in\n // an empty selection. Oddly only in firefox so far.\n return;\n }\n // Get the specific link from this action, whether generic or not, \n // that applies to the current selection. Note selection is a \n // private instance variable set by the onSelect handler\n var link = action.getLink(selection);\n // First check if the user even wants to perform the action before\n // proceeding if a confirm message is provided.\n if(link.confirm){\n if(!confirm(link.confirm)){\n return;\n }\n }\n // Compile the uri-template against the current selection\n var url = action.getUrl(selection);\n\n if(link.method === 'GET'){\n // Self and edit links are the only links opened in the \n // sidebar\n if(action.rel === 'self'){\n panel.showUrl(url, panelOpts);\n }else if(action.rel in {alternate: 1, related: 1}){\n // Open all alternate and related links in a new tab. It \n // is up to the server to set the Content-Type and\n // Content-Disposition headers for correct handling by the \n // browser\n window.open(url);\n }else{\n if(action.rel==='create'){\n tree.clearSelection();\n }\n // likely an edit form. It will be up to the panel \n // component to appropriately handle forms.\n panelOpts['showCloseButton'] = false;\n panelOpts['success'] = function(){\n lingcod.setupForm = function(){\n alert('error:setupForm called after clearing?');\n };\n }\n // set a setupForm function that can be called by content\n // of the panel\n lingcod.setupForm = function(form){\n setupForm(form);\n }\n panelOpts['loading_msg'] = 'Loading form';\n panel.showUrl(url, panelOpts);\n return;\n \n }\n }else if(link.method === 'DELETE' || link.method === 'POST'){\n tree.clearSelection();\n spin('Performing action');\n $.ajax({\n url: url,\n type: link.method,\n dataType: 'text',\n error: onError,\n success: onChange,\n context: {\n action: action,\n link: link\n }\n });\n }else{\n alert('invalid link method \"'+link.method+'\"');\n }\n }", "title": "" }, { "docid": "64f257ee92bd91741e4f257e0e154ef3", "score": "0.5530135", "text": "function attachLabAccNumEventHandler() {\r\n\r\n var container = $('#fmcontainer2');\r\n\r\n $('#LabAccNum').on('select2-removed', function (e) {\r\n resetWizStep2Element($('#TestCode'), $('#tc-badge'));\r\n HideTestTypeSiteAvailablityWarning();\r\n });\r\n\r\n container.on('change', '#LabAccNum', function () {\r\n\r\n var testCode = container.find(\"#TestCode\");\r\n var lab = container.find(\"#Lab\");\r\n var labAccNum = container.find(\"#LabAccNum\");\r\n\r\n var Location = $(\"#LabAccNum option[value='\" + labAccNum.val() + \"']\").text().replace((labAccNum.val() + \" - \"), \"\");\r\n\r\n HideTestTypeSiteAvailablityWarning();\r\n\r\n if (Location == $(\"#s2id_MainAccount .select2-chosen\").text() || Location == $(\"#s2id_SubAccount .select2-chosen\").text()) {\r\n Location = \"N/A\";\r\n }\r\n\r\n // if ($(\"#s2id_TestCode\").text().indexOf(\"HRS\") > -1) { alert(\"here\"); }\r\n\r\n $(\"#AccountClientName\").val(Location);\r\n\r\n // Do not proceed if lab id is blank\r\n if (labAccNum.val() == '') {\r\n // Update badge count so user can get easy confirmation of how many items there are in the drop down list\r\n updateBadgeCounts(testCode, $('#tc-badge'), true, true);\r\n return;\r\n }\r\n\r\n testCode.find('option[value!=\"\"]').remove();\r\n\r\n displayBadgeLoader(testCode, $('#tc-loader'), $('#tc-badge'), true);\r\n\r\n $.getJSON($(this).attr(\"data-tt-action\"), { AccountNumber: labAccNum.val(), LabId: lab.val() })\r\n .done(function (data) {\r\n $(data).each(function () {\r\n $(\"<option value=\" + this.TestCode + \">\" + this.TestCode + \" - \" + this.TestCodeDescription + \" (\" + this.BodySpecimen + \")\" + \"</option>\").appendTo(testCode);\r\n });\r\n\r\n // Hide loading icon\r\n displayBadgeLoader(testCode, $('#tc-loader'), $('#tc-badge'), false);\r\n\r\n // Update badge count so user can get easy confirmation of how many items there are in the drop down list\r\n updateBadgeCounts(testCode, $('#tc-badge'), false, false);\r\n })\r\n .fail(function (jqxhr, textStatus, error) {\r\n // Hide loading icon\r\n displayBadgeLoader(testCode, $('#tc-loader'), $('#tc-badge'), false);\r\n if (jqxhr.status = 403) {\r\n SessionTimeoutRedirector();\r\n }\r\n else if (jqxhr.status != 200) {\r\n ttGrowl('An Error Has Occurred', 'Error processing request: ' + jqxhr.status + ' ' + textStatus, 'error');\r\n }\r\n });\r\n });\r\n}", "title": "" }, { "docid": "5e8918e424e358727b0db15cde34b1b9", "score": "0.5528551", "text": "function example() {\n // Create a new setting tab with the label <Advanced Filter>.\n const settingsUi = new SettingsUI({\n groupName: 'Advanced Filter'\n ,settingsTreeConfig: { saveLocation: 'FilterSettings' }\n })\n // Create a new multiselect with the label <NSFW tags>, accessible from the settings tree via the key <nsfw_tags>.\n const selectNsfw = settingsUi.addMultiselect({\n key: 'nsfw_tags' ,title: 'NSFW tags'\n })\n // Add an option labeled <Echi> to the multiselect. Accessible from the settings tree via the <echi> key.\n selectNsfw.addOption({\n title: 'Echi' ,key: 'echi' ,settingsTreeConfig: { autosave: true }\n })\n // title is optional. Defaults to key value.\n // Add an option labeled <Smut> to the multiselect. Accessible from the settings tree via the <Smut> key.\n selectNsfw.addOption({\n key: 'Smut'\n ,settingsTreeConfig: { saveLocation: 'SmutIsSpecial' } // NOTE, autosave is off\n })\n // Optional callbacks for select, deselct, and toggle.\n selectNsfw.addOption({\n key: 'NSFW'\n ,settingsTreeConfig: {\n onchange: (item ,value) => {\n dbg('Doing something everytime NSFW value changes.')\n dbg(`In this case, printg the new value <${value}> on the console`)\n }\n }\n ,onselect: (item ,value) => {\n dbg('We could also listen to only select events')\n }\n ,ondeselect: (item ,value) => {\n dbg('We could also listen to only deselect events')\n }\n })\n // Create another multiselect\n const block_mulsel = settingsUi.addMultiselect({\n key: 'blocked' ,title: 'Blacklist' ,autosave: true\n })\n // Create a bunch of options with the same callbacks.\n for (const [idx ,name] of ['yaoi' ,'sports' ,'mecha' ,'no chapters'].entries()) {\n const item = block_mulsel.addOption({\n title: name\n ,key: name\n ,settingsTreeConfig: {\n onchange: (value) => {\n // Do something\n dbg(`Changed <${name}> to <${value}>`)\n dbg(value)\n }\n }\n ,onselect: (item ,value) => {\n // Do something\n dbg(`Selected <${name}>`)\n dbg(value)\n }\n ,ondeselect: (item ,value) => {\n // Do something\n dbg(`Deselected <${name}>`)\n dbg(value)\n }\n })\n }\n // Great! Now everything was just built into our settings tree.\n // Now we just need a refrence to the value getter, which is stored in our\n // setting tree\n const settings = settingsUi.settingsTree.value\n // settings now refers to our settings getter. You can now access or change\n // the current state by changing the relavent key in settings.\n // Check if yaoi is blocked.\n dbg('Check if yaoi is blocked')\n dbg(settingsUi.settingsTree.all_savable)\n dbg(settings.blocked.yaoi)\n // Change value from outside ui. UI will update to reflect the new value.\n // Block yaoi.\n dbg('Blocked yaoi. Checking new value')\n settings.blocked.yaoi = true\n dbg(settings.blocked.yaoi)\n // Get value from Blacklist every 5 seconds.\n // Prove that all our easy methods for accessing/setting state stay in sync with the ui.\n // Try changing the value from the ui and see what we print.\n // Export settingsUi for playing with in the console.\n settingsUi.list_all_values = () => new Promise((r ,e) => {\n const gm_values = GM_listValues()\n const { length } = gm_values\n for (const v of Object.values(gm_values)) {\n console.log(`${v} = ${GM_getValue(v ,undefined)}`) // + ' = ' + GM_getValue(arry[p]) );\n }\n })\n setInterval(() => {\n // these should all print the same thing\n dbg(settingsUi.settingsTree.value.blocked.yaoi)\n // note value is a refrence to settingsTree.value\n // dbg(settingsUi.value.blocked.yaoi);\n dbg(settings.blocked.yaoi)\n dbg(block_mulsel.settingsTree.value.yaoi)\n settingsUi.list_all_values()\n // dbg(block_mulsel.value.yaoi);\n } ,5000)\n // NOTE:\n // SettingsTree.value reutrns getters/setters tree.\n // Refrences can be made to any non-leaf node without becoming detatched from\n // the SettingsTree.\n // These of these are bound to the SettingsTree\n const st_a = settingsUi.settingsTree.value.blocked\n const st_b = settings.blocked\n const st_c = st_b\n // Leaf nodes return actual value, not accessors. So refrences to them will\n // not be bound to the setting tree.\n // In our example, All of these would be leaf nodes.\n // As such, assignments to the new leaf_* variables will not affect the SettingsTree.\n const leaf_a = settingsUi.settingsTree.value.blocked.sports\n const leaf_b = settings.blocked.sports\n const leaf_c = st_b.sports\n // This is only usefull for caching the value of the leaf to ensure that changes to it\n // do not affect an operation. If you don't need to cache the value\n // I recomend to always refrence the leaf through the parent tree.\n // This will help avoid\n // settingsTree.value is a tree of getters/setters.\n // If we want a snapshot of the current value, we need to use\n // settingsTree.all_savable instead.\n // savable is usefull for encoding an entire tree or subtree to JSON, or\n // printing a tree to screen.\n // As a demo, first lets look at what value gives you on a tree\n dbg('settingsTree.value is nothing but getters/setters')\n dbg(settingsUi.settingsTree.value)\n // Next lets print the savable.\n dbg('settingsTree.all_savable accesses value, calling the getters and yielding a snapshot of the current value.')\n dbg(settingsUi.settingsTree.all_savable)\n dbg('all_savable returns a snapshot of all children, regardless of their save method.')\n dbg(selectNsfw.settingsTree.all_savable)\n dbg('own_savable returns a snapshot containing only children with the same save method.')\n dbg(selectNsfw.settingsTree.own_savable)\n // You can also assign to value. If you assigning an object to value\n // we will descend the object and setting tree by the shared key, when we\n // encounter a leaf node, we will assign it the object/value that shares its\n // key instead of descending. Any keys in object that do not have a\n // corasponging setting tree value will be skipped.\n settingsUi.value = { blocked: { sports: true } }\n // Since savable is a snapshot, getting the value and then asigning to the\n // keys of the result will not affect the ui or setting tree.\n // DO NOT TRY THIS\n dbg('Savable getter returns a snapshot. Assignments to the snapshot can NOT be used to change the settingsTree value')\n // DO NOT TRY THIS.\n let savable = settingsUi.settingsTree.all_savable\n // DO NOT TRY THIS. Sports will not update on the UI nor settings tree. Replaces with value instead\n savable.blocked.sports = true\n // DO NOT TRY THIS. Sports will not update on the UI nor settings tree. Replaces with value instead\n savable = { blocked: { sports: true } }\n dbg('blocked.sports was not updated in settings tree, because assignment occured on a snapshot object, completly detatched from the settings tree.')\n dbg(settingsUi.settingsTree.all_savable)\n // TL;DR settingsTree.value returns getters/setters attatched to the tree.\n // savable returns an object with a snapshot of the value, but completly detatched from the tree.\n unsafeWindow.settingsUi = settingsUi\n}", "title": "" }, { "docid": "08a259ff9c5d216c80de6ec11a9b553e", "score": "0.55281585", "text": "function init() {\n\n $(document).on('click', function (e) {\n\n var $target = $(e.target);\n\n if ($target.hasClass('pnl-DropDownMenu-toggle') || $target.parents('.pnl-DropDownMenu-toggle').size()) {\n\n var $menu = $target.parents('.pnl-DropDownMenu');\n\n $('.pnl-DropDownMenu--open').not($menu).removeClass('pnl-DropDownMenu--open');\n\n $menu.toggleClass('pnl-DropDownMenu--open');\n\n e.preventDefault();\n\n } else {\n $('.pnl-DropDownMenu--open').removeClass('pnl-DropDownMenu--open');\n }\n\n });\n\n}", "title": "" }, { "docid": "9c1f798d1daeaed822f2e6aee887faab", "score": "0.5525606", "text": "function _onOptionClick(event) {\n\t\tvar items;\n\t\tif (config.uiElements[event.toElement.id]) {\n\t\t\titems = document.querySelectorAll('.' + event.toElement.id);\n\t\t\tif (event.toElement.classList.toggle('open')) {\n\t\t\t\tevent.toElement.classList.remove('close');\n\t\t\t\tfor (var i = 0; i < items.length; i++) {\n\t\t\t\t\titems[i].classList.remove('hide');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tevent.toElement.classList.add('close');\n\t\t\t\tfor (var i = 0; i < items.length; i++) {\n\t\t\t\t\titems[i].classList.add('hide');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\twindow.location.href = 'http://www.hugeinc.com';\n\t\t}\n\t}", "title": "" }, { "docid": "b2000785ee4f100d9e28326ebbde26f6", "score": "0.5523286", "text": "function menuItemEvent(menuItem) {\n if (menuItem == \"LOAD 'createTestBlocks.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'createTestBlocks.js'\")) {\n Script.loadScript(createTestBlocksScript, true);\n Menu.setIsOptionChecked(\"LOAD 'createTestBlocks.js'\", false);\n }\n if (menuItem == \"UNLOAD 'createTestBlocks.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'createTestBlocks.js'\")) {\n ScriptDiscoveryService.stopScript(createTestBlocksScript);\n Menu.setIsOptionChecked(\"UNLOAD 'createTestBlocks.js'\", false);\n }\n if (menuItem == \"OPEN ATP Upload [Press CTRL+SHIFT+A]\") {\n null;\n }\n if (Menu.isOptionChecked(\"OPEN ATP Upload [Press CTRL+SHIFT+A]\")) {\n Menu.setIsOptionChecked(\"OPEN ATP Upload [Press CTRL+SHIFT+A]\", false);\n }\n if (menuItem == \"ENABLE Echo Server Audio [Un-Mute Microphone + Manually Select DEVELOPER - AUDIO - ECHO SERVER AUDIO]\") {\n null;\n }\n if (Menu.isOptionChecked(\"ENABLE Echo Server Audio [Un-Mute Microphone + Manually Select DEVELOPER - AUDIO - ECHO SERVER AUDIO]\")) {\n Menu.setIsOptionChecked(\"ENABLE Echo Server Audio [Un-Mute Microphone + Manually Select DEVELOPER - AUDIO - ECHO SERVER AUDIO]\", false);\n }\n if (menuItem == \"LOAD 'harmonicOscillator.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'harmonicOscillator.js'\")) {\n Script.loadScript(harmonicOscillatorScript, true);\n Menu.setIsOptionChecked(\"LOAD 'harmonicOscillator.js'\", false);\n }\n if (menuItem == \"UNLOAD 'harmonicOscillator.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'harmonicOscillator.js'\")) {\n ScriptDiscoveryService.stopScript(harmonicOscillatorScript);\n Menu.setIsOptionChecked(\"UNLOAD 'harmonicOscillator.js'\", false);\n }\n if (menuItem == \"LOAD 'reverbTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'reverbTest.js'\")) {\n Script.loadScript(reverbTestScript, true);\n Menu.setIsOptionChecked(\"LOAD 'reverbTest.js'\", false);\n }\n if (menuItem == \"UNLOAD 'reverbTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'reverbTest.js'\")) {\n ScriptDiscoveryService.stopScript(reverbTestScript);\n Menu.setIsOptionChecked(\"UNLOAD 'reverbTest.js'\", false);\n }\n if (menuItem == \"LOAD 'playaPerformanceTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'playaPerformanceTest.js'\")) {\n Script.loadScript(playaPerformanceTestScript, true);\n Menu.setIsOptionChecked(\"LOAD 'playaPerformanceTest.js'\", false);\n }\n if (menuItem == \"UNLOAD 'playaPerformanceTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'playaPerformanceTest.js'\")) {\n ScriptDiscoveryService.stopScript(playaPerformanceTestScript);\n Menu.setIsOptionChecked(\"UNLOAD 'playaPerformanceTest.js'\", false);\n }\n if (menuItem == \"Generate Non-Smoke Test [CUT + PASTE RESULT]\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate Non-Smoke Test [CUT + PASTE RESULT]\")) {\n generateNonSmokeTestManualTestingReport();\n Menu.setIsOptionChecked(\"Generate Non-Smoke Test [CUT + PASTE RESULT]\", false);\n }\n if (menuItem == \"Generate Smoke Test Manual Testing Report\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate Smoke Test [CUT + PASTE RESULT]\")) {\n generateSmokeTestManualTestingReport();\n Menu.setIsOptionChecked(\"Generate Smoke Test [CUT + PASTE RESULT]\", false);\n }\n\n if (Menu.isOptionChecked(\"Generate RC Results [CUT + PASTE RESULT]\")) {\n\n rcresults();\n Menu.setIsOptionChecked(\"Generate RC Results [CUT + PASTE RESULT]\", false);\n }\n\n if (Menu.isOptionChecked(\"Test 1\")) {\n if (rctestdone1 != 1) {\n rctest1_prompt();\n }\n rctestdone1 = 1;\n } else {\n rctestdone1 = 0;\n }\n if (Menu.isOptionChecked(\"Test 2\")) {\n if (rctestdone2 != 1) {\n rctest2_prompt();\n }\n rctestdone2 = 1;\n } else {\n rctestdone2 = 0;\n }\n if (Menu.isOptionChecked(\"Test 3\")) {\n if (rctestdone3 != 1) {\n rctest3_prompt();\n }\n rctestdone3 = 1;\n } else {\n rctestdone3 = 0;\n }\n if (Menu.isOptionChecked(\"Test 4\")) {\n if (rctestdone4 != 1) {\n rctest4_prompt();\n }\n rctestdone4 = 1;\n } else {\n rctestdone4 = 0;\n }\n if (Menu.isOptionChecked(\"Test 5\")) {\n if (rctestdone5 != 1) {\n rctest5_prompt();\n }\n rctestdone5 = 1;\n } else {\n rctestdone5 = 0;\n }\n if (Menu.isOptionChecked(\"Test 6\")) {\n if (rctestdone6 != 1) {\n rctest6_prompt();\n }\n rctestdone6 = 1;\n } else {\n rctestdone6 = 0;\n }\n if (Menu.isOptionChecked(\"Test 7\")) {\n if (rctestdone7 != 1) {\n rctest7_prompt();\n }\n rctestdone7 = 1;\n } else {\n rctestdone7 = 0;\n }\n if (Menu.isOptionChecked(\"Test 8\")) {\n if (rctestdone8 != 1) {\n rctest8_prompt();\n }\n rctestdone8 = 1;\n } else {\n rctestdone8 = 0;\n }\n if (Menu.isOptionChecked(\"Test 9\")) {\n if (rctestdone9 != 1) {\n rctest9_prompt();\n }\n rctestdone9 = 1;\n } else {\n rctestdone9 = 0;\n }\n if (Menu.isOptionChecked(\"Test 10\")) {\n if (rctestdone10 != 1) {\n rctest10_prompt();\n }\n rctestdone10 = 1;\n } else {\n rctestdone10 = 0;\n }\n if (Menu.isOptionChecked(\"Test 11\")) {\n if (rctestdone11 != 1) {\n rctest11_prompt();\n }\n rctestdone11 = 1;\n } else {\n rctestdone11 = 0;\n }\n if (Menu.isOptionChecked(\"Test 12\")) {\n if (rctestdone12 != 1) {\n rctest12_prompt();\n }\n rctestdone12 = 1;\n } else {\n rctestdone12 = 0;\n }\n if (Menu.isOptionChecked(\"Test 13\")) {\n if (rctestdone13 != 1) {\n rctest13_prompt();\n }\n rctestdone13 = 1;\n } else {\n rctestdone13 = 0;\n }\n if (Menu.isOptionChecked(\"Test 14\")) {\n if (rctestdone14 != 1) {\n rctest14_prompt();\n }\n rctestdone14 = 1;\n } else {\n rctestdone14 = 0;\n }\n if (Menu.isOptionChecked(\"Test 15\")) {\n if (rctestdone15 != 1) {\n rctest15_prompt();\n }\n rctestdone15 = 1;\n } else {\n rctestdone15 = 0;\n }\n if (Menu.isOptionChecked(\"Test 16\")) {\n if (rctestdone16 != 1) {\n rctest16_prompt();\n }\n rctestdone16 = 1;\n } else {\n rctestdone16 = 0;\n }\n if (Menu.isOptionChecked(\"Test 17\")) {\n if (rctestdone17 != 1) {\n rctest17_prompt();\n }\n rctestdone17 = 1;\n } else {\n rctestdone17 = 0;\n }\n if (Menu.isOptionChecked(\"Test 18\")) {\n if (rctestdone18 != 1) {\n rctest18_prompt();\n }\n rctestdone18 = 1;\n } else {\n rctestdone18 = 0;\n }\n if (Menu.isOptionChecked(\"Test 19\")) {\n if (rctestdone19 != 1) {\n rctest19_prompt();\n }\n rctestdone19 = 1;\n } else {\n rctestdone19 = 0;\n }\n if (Menu.isOptionChecked(\"Test 20\")) {\n if (rctestdone20 != 1) {\n rctest20_prompt();\n }\n rctestdone20 = 1;\n } else {\n rctestdone20 = 0;\n }\n\n\n\n\n\n\n\n\n\n\n\n if (menuItem == \"Generate Domain Stats Report [CUT + PASTE RESULT]\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate Domain Stats Report [CUT + PASTE RESULT]\")) {\n generateDomainStatsReport();\n Menu.setIsOptionChecked(\"Generate Domain Stats Report [CUT + PASTE RESULT]\", false);\n }\n if (menuItem == \"HMD RC Test Instructions\") {\n null;\n }\n if (Menu.isOptionChecked(\"HMD RC Test Instructions\")) {\n hmdRCHelp();\n Menu.setIsOptionChecked(\"HMD RC Test Instructions\", false);\n }\n if (menuItem == \"Generate HMD RC Testing Report [CUT + PASTE RESULT]\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate HMD RC Testing Report [CUT + PASTE RESULT]\")) {\n generateHMDRCManualTestingReport();\n Menu.setIsOptionChecked(\"Generate HMD RC Testing Report [CUT + PASTE RESULT]\", false);\n }\n if (menuItem == \"Help\") {\n null;\n }\n if (Menu.isOptionChecked(\"Help\")) {\n help();\n Menu.setIsOptionChecked(\"Help\", false);\n }\n}", "title": "" }, { "docid": "9c405912d0a1ea5f2baa77d1cf8958b9", "score": "0.5519251", "text": "function selectionTool() {\r\n var ref = $(\"[id^='select-']\");\r\n for (var i = 0; i < ref.length; i++) {\r\n $(ref[i]).click(function (evt) {\r\n if (varsel == 0) {\r\n selctfeaturelayerlistwidget.show();\r\n }\r\n var t = evt.target.value;\r\n t = t.toUpperCase();\r\n gl = 1;\r\n selectionToolbar.activate(Draw[t]);\r\n $(\"#select_clear\").prop(\"disabled\", false);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "b100c6a3a5511efc9ff4fa050008b305", "score": "0.5517734", "text": "accept()\n\t{\n\t\tif ( this._options.length > 0 )\n\t\t{\n\t\t\tvar ch = this.options[ this.activeIndex ];\n\t\t\tvar sel = new Event(\"select\");\n\t\t\tsel.character = ch.character;\n\t\t\tsel.score = ch.score;\n\t\t\tthis.dispatchEvent(sel);\n\t\t}\n\n\t\tthis.reset();\n\t}", "title": "" }, { "docid": "efce9af947c6c0cb098c6bf3d928ddc6", "score": "0.55166024", "text": "function setupActions() {\n $settingsPanel.find('b[name=\"attendee_drawing\"]').on('click', function(e) {\n openAttendeeDrawing();\n });\n\n // The CSV upload requires the FileReader object\n // Only enable upload if FileReader is supported by the browser\n if(window.FileReader) {\n\t$settingsPanel.find('b[name=\"upload_attendees\"]').on('click', function(e) {\n\t\t$('#upload_csv').trigger('click'); \n\t});\n\t$('#upload_csv').change(function(ev) {\n\n\t\t// Only continue of the user selected a file\n\t\tif(this.files.length > 0) {\n\n\t\t\t// Save the file object \n\t\t\tvar file_obj = this.files[0];\n\n\t\t\t// Clear the input value so that the upload dialog event is triggered again\n\t\t\t$(this).val(\"\");\n\n\t\t\t// Upload the file contents\n\t\t\tuploadAttendees(file_obj);\n\t\t}\n\t});\n } else {\n\n\t// FileReader is not supported, so hide the upload menu option\n $settingsPanel.find('#upload_csv_div').hide();\n }\n\n $settingsPanel.find('b[name=\"fullscreen\"]').on('click', toggleFullScreen);\n\n $settingsPanel.find('b[name=\"back_to_socio\"]').on('click', function(e) {\n window.location = \"https://socio.events\"\n });\n}", "title": "" }, { "docid": "1fae9d54b9c3af9755560aeab5976287", "score": "0.55144733", "text": "function SelectionChange() {}", "title": "" }, { "docid": "9e0c247381d90c745b5d271205641724", "score": "0.55131334", "text": "attached() {\n this.listen(this, 'px-dropdown-selection-changed', '_itemSelected');\n }", "title": "" }, { "docid": "03bf7049b5712297ece23788e96f9ce5", "score": "0.5511184", "text": "function doAfterSelectOptionChangedForLoginSessionInfoExt(fieldName)\n{\n //Custom handling\n}", "title": "" } ]
5fb2e4461d72cc8bbb8a1f249f72c970
UTF16 (JavaScript Unicode array) to SJIS
[ { "docid": "d83d19abda2ab5bed24655faf67804ac", "score": "0.6406404", "text": "function UNICODEToSJIS(data) {\n return UTF8ToSJIS(UNICODEToUTF8(data));\n}", "title": "" } ]
[ { "docid": "0fdf566baa8a10a0f173f9f4317a1fe8", "score": "0.6732913", "text": "function SJISToUNICODE(data) {\n return UTF8ToUNICODE(SJISToUTF8(data));\n}", "title": "" }, { "docid": "0fdf566baa8a10a0f173f9f4317a1fe8", "score": "0.6732913", "text": "function SJISToUNICODE(data) {\n return UTF8ToUNICODE(SJISToUTF8(data));\n}", "title": "" }, { "docid": "51c1c19172999f3de135ca69c7f3395d", "score": "0.66513693", "text": "function UNICODEToJIS (data) {\n return UTF8ToJIS(UNICODEToUTF8(data))\n }", "title": "" }, { "docid": "51c36cbe49af402e999bbc02853cdbd1", "score": "0.663674", "text": "function SJISToUNICODE (data) {\n return UTF8ToUNICODE(SJISToUTF8(data))\n }", "title": "" }, { "docid": "9dfc830e43c8c80a54b689a62898b73d", "score": "0.6592065", "text": "function UNICODEToJIS(data) {\n return UTF8ToJIS(UNICODEToUTF8(data));\n}", "title": "" }, { "docid": "9dfc830e43c8c80a54b689a62898b73d", "score": "0.6592065", "text": "function UNICODEToJIS(data) {\n return UTF8ToJIS(UNICODEToUTF8(data));\n}", "title": "" }, { "docid": "f08753bf6f0878ebbaafaae6812ba76a", "score": "0.6562619", "text": "function UNICODEToSJIS (data) {\n return UTF8ToSJIS(UNICODEToUTF8(data))\n }", "title": "" }, { "docid": "6bebfa35f055bd4325aac2797b79652e", "score": "0.64662594", "text": "function UTF16ToUNICODE (data) {\n var results = []\n var i = 0\n var len = data && data.length\n var isLE = false\n var first = true\n var c1, c2\n\n while (i < len) {\n c1 = data[i++]\n c2 = data[i++]\n\n if (first && i === 2) {\n first = false\n if (c1 === 0xFE && c2 === 0xFF) {\n isLE = false\n } else if (c1 === 0xFF && c2 === 0xFE) {\n // Little-endian\n isLE = true\n } else {\n isLE = isUTF16LE(data)\n i = 0\n }\n continue\n }\n\n if (isLE) {\n if (c2 === 0) {\n results[results.length] = c1\n } else {\n results[results.length] = ((c2 & 0xFF) << 8) | (c1 & 0xFF)\n }\n } else {\n if (c1 === 0) {\n results[results.length] = c2\n } else {\n results[results.length] = ((c1 & 0xFF) << 8) | (c2 & 0xFF)\n }\n }\n }\n\n return results\n }", "title": "" }, { "docid": "e50b0a7f34037b2f04c6fefc3f421b20", "score": "0.64584494", "text": "function UTF16ToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var isLE = false;\n var first = true;\n var c1, c2;\n\n while (i < len) {\n c1 = data[i++];\n c2 = data[i++];\n\n if (first && i === 2) {\n first = false;\n if (c1 === 0xFE && c2 === 0xFF) {\n isLE = false;\n } else if (c1 === 0xFF && c2 === 0xFE) {\n // Little-endian\n isLE = true;\n } else {\n isLE = isUTF16LE(data);\n i = 0;\n }\n continue;\n }\n\n if (isLE) {\n if (c2 === 0) {\n results[results.length] = c1;\n } else {\n results[results.length] = ((c2 & 0xFF) << 8) | (c1 & 0xFF);\n }\n } else {\n if (c1 === 0) {\n results[results.length] = c2;\n } else {\n results[results.length] = ((c1 & 0xFF) << 8) | (c2 & 0xFF);\n }\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "e50b0a7f34037b2f04c6fefc3f421b20", "score": "0.64584494", "text": "function UTF16ToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var isLE = false;\n var first = true;\n var c1, c2;\n\n while (i < len) {\n c1 = data[i++];\n c2 = data[i++];\n\n if (first && i === 2) {\n first = false;\n if (c1 === 0xFE && c2 === 0xFF) {\n isLE = false;\n } else if (c1 === 0xFF && c2 === 0xFE) {\n // Little-endian\n isLE = true;\n } else {\n isLE = isUTF16LE(data);\n i = 0;\n }\n continue;\n }\n\n if (isLE) {\n if (c2 === 0) {\n results[results.length] = c1;\n } else {\n results[results.length] = ((c2 & 0xFF) << 8) | (c1 & 0xFF);\n }\n } else {\n if (c1 === 0) {\n results[results.length] = c2;\n } else {\n results[results.length] = ((c1 & 0xFF) << 8) | (c2 & 0xFF);\n }\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "83c27709f19339708a4a93c07900f02c", "score": "0.6406856", "text": "function UTF16BEToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c1, c2;\n\n if (len >= 2 &&\n ((data[0] === 0xFE && data[1] === 0xFF) ||\n (data[0] === 0xFF && data[1] === 0xFE))\n ) {\n i = 2;\n }\n\n while (i < len) {\n c1 = data[i++];\n c2 = data[i++];\n if (c1 === 0) {\n results[results.length] = c2;\n } else {\n results[results.length] = ((c1 & 0xFF) << 8) | (c2 & 0xFF);\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "83c27709f19339708a4a93c07900f02c", "score": "0.6406856", "text": "function UTF16BEToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c1, c2;\n\n if (len >= 2 &&\n ((data[0] === 0xFE && data[1] === 0xFF) ||\n (data[0] === 0xFF && data[1] === 0xFE))\n ) {\n i = 2;\n }\n\n while (i < len) {\n c1 = data[i++];\n c2 = data[i++];\n if (c1 === 0) {\n results[results.length] = c2;\n } else {\n results[results.length] = ((c1 & 0xFF) << 8) | (c2 & 0xFF);\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "db41fec66373e377c5dceb853f4f4718", "score": "0.6385534", "text": "function UTF16BEToUNICODE (data) {\n var results = []\n var i = 0\n var len = data && data.length\n var c1, c2\n\n if (len >= 2 &&\n ((data[0] === 0xFE && data[1] === 0xFF) ||\n (data[0] === 0xFF && data[1] === 0xFE))\n ) {\n i = 2\n }\n\n while (i < len) {\n c1 = data[i++]\n c2 = data[i++]\n if (c1 === 0) {\n results[results.length] = c2\n } else {\n results[results.length] = ((c1 & 0xFF) << 8) | (c2 & 0xFF)\n }\n }\n\n return results\n }", "title": "" }, { "docid": "8faa6e949338ec7c69a2b0b69ec37cbb", "score": "0.63445634", "text": "function SJIStoJIS( sjis ) {\r\n\tvar b1 = sjis >> 8;\r\n\tvar b2 = sjis & 0xFF;\r\n\r\n\tif( 0xA1 <= b1 && b1 <= 0xDF ) {\r\n\t\treturn b1 - 0x80;\r\n\t}\r\n\telse if( b1 >= 0x80 ) {\r\n\t\tb1 <<= 1;\r\n\r\n\t\tif( b2 < 0x9F ) {\r\n\t\t\tif( b1 < 0x13F ) {\r\n\t\t\t\tb1 -= 0xE1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tb1 -= 0x61;\r\n\t\t\t}\r\n\t\t\tif( b2 > 0x7E ) {\r\n\t\t\t\tb2 -= 0x20;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tb2 -= 0x1F;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif( b1 < 0x13F ) {\r\n\t\t\t\tb1 -= 0xE0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tb1 -= 0x60;\r\n\t\t\t}\r\n\t\t\tb2 -= 0x7E;\r\n\t\t}\r\n\t\treturn ( (b1 & 0xFF) << 8 ) + b2;\r\n\t}\r\n\telse {\r\n\t\treturn b1;\r\n\t}\r\n}", "title": "" }, { "docid": "040091880979849f2a2ab6faba323679", "score": "0.6314142", "text": "function UTF16LEToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c1, c2;\n\n if (len >= 2 &&\n ((data[0] === 0xFE && data[1] === 0xFF) ||\n (data[0] === 0xFF && data[1] === 0xFE))\n ) {\n i = 2;\n }\n\n while (i < len) {\n c1 = data[i++];\n c2 = data[i++];\n if (c2 === 0) {\n results[results.length] = c1;\n } else {\n results[results.length] = ((c2 & 0xFF) << 8) | (c1 & 0xFF);\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "040091880979849f2a2ab6faba323679", "score": "0.6314142", "text": "function UTF16LEToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c1, c2;\n\n if (len >= 2 &&\n ((data[0] === 0xFE && data[1] === 0xFF) ||\n (data[0] === 0xFF && data[1] === 0xFE))\n ) {\n i = 2;\n }\n\n while (i < len) {\n c1 = data[i++];\n c2 = data[i++];\n if (c2 === 0) {\n results[results.length] = c1;\n } else {\n results[results.length] = ((c2 & 0xFF) << 8) | (c1 & 0xFF);\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "0a862e6b16a1dd29357f048ca78fa51a", "score": "0.6293247", "text": "function UTF16LEToUNICODE (data) {\n var results = []\n var i = 0\n var len = data && data.length\n var c1, c2\n\n if (len >= 2 &&\n ((data[0] === 0xFE && data[1] === 0xFF) ||\n (data[0] === 0xFF && data[1] === 0xFE))\n ) {\n i = 2\n }\n\n while (i < len) {\n c1 = data[i++]\n c2 = data[i++]\n if (c2 === 0) {\n results[results.length] = c1\n } else {\n results[results.length] = ((c2 & 0xFF) << 8) | (c1 & 0xFF)\n }\n }\n\n return results\n }", "title": "" }, { "docid": "783094c81e4a8f1a76d4c082839d9c91", "score": "0.6286945", "text": "function UTF8ArrayToString(u8Array, idx) {\n var u0, u1, u2, u3, u4, u5;\n\n var str = '';\n while (1) {\n // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n u0 = u8Array[idx++];\n if (!u0) return str;\n if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n u1 = u8Array[idx++] & 63;\n if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n u2 = u8Array[idx++] & 63;\n if ((u0 & 0xF0) == 0xE0) {\n u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n } else {\n u3 = u8Array[idx++] & 63;\n if ((u0 & 0xF8) == 0xF0) {\n u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;\n } else {\n u4 = u8Array[idx++] & 63;\n if ((u0 & 0xFC) == 0xF8) {\n u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;\n } else {\n u5 = u8Array[idx++] & 63;\n u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;\n }\n }\n }\n if (u0 < 0x10000) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 0x10000;\n str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n }\n }\n}", "title": "" }, { "docid": "783094c81e4a8f1a76d4c082839d9c91", "score": "0.6286945", "text": "function UTF8ArrayToString(u8Array, idx) {\n var u0, u1, u2, u3, u4, u5;\n\n var str = '';\n while (1) {\n // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n u0 = u8Array[idx++];\n if (!u0) return str;\n if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n u1 = u8Array[idx++] & 63;\n if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n u2 = u8Array[idx++] & 63;\n if ((u0 & 0xF0) == 0xE0) {\n u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n } else {\n u3 = u8Array[idx++] & 63;\n if ((u0 & 0xF8) == 0xF0) {\n u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;\n } else {\n u4 = u8Array[idx++] & 63;\n if ((u0 & 0xFC) == 0xF8) {\n u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;\n } else {\n u5 = u8Array[idx++] & 63;\n u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;\n }\n }\n }\n if (u0 < 0x10000) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 0x10000;\n str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n }\n }\n}", "title": "" }, { "docid": "783094c81e4a8f1a76d4c082839d9c91", "score": "0.6286945", "text": "function UTF8ArrayToString(u8Array, idx) {\n var u0, u1, u2, u3, u4, u5;\n\n var str = '';\n while (1) {\n // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n u0 = u8Array[idx++];\n if (!u0) return str;\n if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n u1 = u8Array[idx++] & 63;\n if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n u2 = u8Array[idx++] & 63;\n if ((u0 & 0xF0) == 0xE0) {\n u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n } else {\n u3 = u8Array[idx++] & 63;\n if ((u0 & 0xF8) == 0xF0) {\n u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;\n } else {\n u4 = u8Array[idx++] & 63;\n if ((u0 & 0xFC) == 0xF8) {\n u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;\n } else {\n u5 = u8Array[idx++] & 63;\n u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;\n }\n }\n }\n if (u0 < 0x10000) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 0x10000;\n str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n }\n }\n}", "title": "" }, { "docid": "783094c81e4a8f1a76d4c082839d9c91", "score": "0.6286945", "text": "function UTF8ArrayToString(u8Array, idx) {\n var u0, u1, u2, u3, u4, u5;\n\n var str = '';\n while (1) {\n // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n u0 = u8Array[idx++];\n if (!u0) return str;\n if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n u1 = u8Array[idx++] & 63;\n if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n u2 = u8Array[idx++] & 63;\n if ((u0 & 0xF0) == 0xE0) {\n u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n } else {\n u3 = u8Array[idx++] & 63;\n if ((u0 & 0xF8) == 0xF0) {\n u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;\n } else {\n u4 = u8Array[idx++] & 63;\n if ((u0 & 0xFC) == 0xF8) {\n u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;\n } else {\n u5 = u8Array[idx++] & 63;\n u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;\n }\n }\n }\n if (u0 < 0x10000) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 0x10000;\n str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n }\n }\n}", "title": "" }, { "docid": "783094c81e4a8f1a76d4c082839d9c91", "score": "0.6286945", "text": "function UTF8ArrayToString(u8Array, idx) {\n var u0, u1, u2, u3, u4, u5;\n\n var str = '';\n while (1) {\n // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n u0 = u8Array[idx++];\n if (!u0) return str;\n if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n u1 = u8Array[idx++] & 63;\n if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n u2 = u8Array[idx++] & 63;\n if ((u0 & 0xF0) == 0xE0) {\n u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n } else {\n u3 = u8Array[idx++] & 63;\n if ((u0 & 0xF8) == 0xF0) {\n u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;\n } else {\n u4 = u8Array[idx++] & 63;\n if ((u0 & 0xFC) == 0xF8) {\n u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;\n } else {\n u5 = u8Array[idx++] & 63;\n u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;\n }\n }\n }\n if (u0 < 0x10000) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 0x10000;\n str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n }\n }\n}", "title": "" }, { "docid": "783094c81e4a8f1a76d4c082839d9c91", "score": "0.6286945", "text": "function UTF8ArrayToString(u8Array, idx) {\n var u0, u1, u2, u3, u4, u5;\n\n var str = '';\n while (1) {\n // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n u0 = u8Array[idx++];\n if (!u0) return str;\n if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n u1 = u8Array[idx++] & 63;\n if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n u2 = u8Array[idx++] & 63;\n if ((u0 & 0xF0) == 0xE0) {\n u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n } else {\n u3 = u8Array[idx++] & 63;\n if ((u0 & 0xF8) == 0xF0) {\n u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;\n } else {\n u4 = u8Array[idx++] & 63;\n if ((u0 & 0xFC) == 0xF8) {\n u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;\n } else {\n u5 = u8Array[idx++] & 63;\n u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;\n }\n }\n }\n if (u0 < 0x10000) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 0x10000;\n str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n }\n }\n}", "title": "" }, { "docid": "27fc9ca10cd05fc9d3468431399966a7", "score": "0.6258268", "text": "function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString('utf16le',i);if(r){var c=r.charCodeAt(r.length-1);if(c>=0xD800&&c<=0xDBFF){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1);}}return r;}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString('utf16le',i,buf.length-1);}// For UTF-16LE we do not explicitly append special replacement characters if we", "title": "" }, { "docid": "27fc9ca10cd05fc9d3468431399966a7", "score": "0.6258268", "text": "function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString('utf16le',i);if(r){var c=r.charCodeAt(r.length-1);if(c>=0xD800&&c<=0xDBFF){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1);}}return r;}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString('utf16le',i,buf.length-1);}// For UTF-16LE we do not explicitly append special replacement characters if we", "title": "" }, { "docid": "4846ecfbdaa8064432dc21e565855b87", "score": "0.6248287", "text": "function UTF8ArrayToString(u8Array, idx) {\n var u0, u1, u2, u3, u4, u5;\n\n var str = '';\n while (1) {\n // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n u0 = u8Array[idx++];\n if (!u0) return str;\n if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n u1 = u8Array[idx++] & 63;\n if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n u2 = u8Array[idx++] & 63;\n if ((u0 & 0xF0) == 0xE0) {\n u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n } else {\n u3 = u8Array[idx++] & 63;\n if ((u0 & 0xF8) == 0xF0) {\n u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;\n } else {\n u4 = u8Array[idx++] & 63;\n if ((u0 & 0xFC) == 0xF8) {\n u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;\n } else {\n u5 = u8Array[idx++] & 63;\n u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;\n }\n }\n }\n if (u0 < 0x10000) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 0x10000;\n str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n }\n }\n }", "title": "" }, { "docid": "50e8d1c28787f2183c3ccfd51a392217", "score": "0.62415624", "text": "function UNICODEToUTF16BE (data) {\n var results = []\n var i = 0\n var len = data && data.length\n var c\n\n while (i < len) {\n c = data[i++]\n if (c <= 0xFF) {\n results[results.length] = 0\n results[results.length] = c\n } else if (c <= 0xFFFF) {\n results[results.length] = c >> 8 & 0xFF\n results[results.length] = c & 0xFF\n }\n }\n\n return results\n }", "title": "" }, { "docid": "7614f7860db485c069bdec65b41d1119", "score": "0.6239671", "text": "function UNICODEToUTF16BE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c;\n\n while (i < len) {\n c = data[i++];\n if (c <= 0xFF) {\n results[results.length] = 0;\n results[results.length] = c;\n } else if (c <= 0xFFFF) {\n results[results.length] = c >> 8 & 0xFF;\n results[results.length] = c & 0xFF;\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "7614f7860db485c069bdec65b41d1119", "score": "0.6239671", "text": "function UNICODEToUTF16BE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c;\n\n while (i < len) {\n c = data[i++];\n if (c <= 0xFF) {\n results[results.length] = 0;\n results[results.length] = c;\n } else if (c <= 0xFFFF) {\n results[results.length] = c >> 8 & 0xFF;\n results[results.length] = c & 0xFF;\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "7ecb0d527687cbe82a6ee82d6f4b0629", "score": "0.6172357", "text": "function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString(\"utf16le\",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString(\"utf16le\",i,buf.length-1)}", "title": "" }, { "docid": "ce33ff11584ac3f4572100cd9a116091", "score": "0.6140506", "text": "function toUTF8(input) {\n var output = '';\n\n for (var _i = 0; _i < input.length; _i++) {\n var c = input.charCodeAt(_i);\n\n if (c < 128) {\n output += chars[c];\n } else {\n if (c < 2048) {\n output += chars[c >> 6 | 192] + chars[c & 63 | 128];\n } else {\n output += chars[c >> 12 | 224] + chars[c >> 6 & 63 | 128] + chars[c & 63 | 128];\n }\n }\n }\n\n return output;\n} // utf16 string -> utf8 bytes array", "title": "" }, { "docid": "895e21463b0c89d960ebfba33d4e8cbf", "score": "0.6102056", "text": "function utf16to8(str) {\n if (str.match(/^[\\x00-\\x7f]*$/) != null) {\n return str;\n }\n var out, i, j, len, c, c2;\n out = [];\n len = str.length;\n for (i = 0, j = 0; i < len; i++, j++) {\n c = str.charCodeAt(i);\n if (c <= 0x7f) {\n out[j] = str.charAt(i);\n }\n else if (c <= 0x7ff) {\n out[j] = String.fromCharCode(0xc0 | (c >>> 6),\n 0x80 | (c & 0x3f));\n }\n else if (c < 0xd800 || c > 0xdfff) {\n out[j] = String.fromCharCode(0xe0 | (c >>> 12),\n 0x80 | ((c >>> 6) & 0x3f),\n 0x80 | (c & 0x3f));\n }\n else {\n if (++i < len) {\n c2 = str.charCodeAt(i);\n if (c <= 0xdbff && 0xdc00 <= c2 && c2 <= 0xdfff) {\n c = ((c & 0x03ff) << 10 | (c2 & 0x03ff)) + 0x010000;\n if (0x010000 <= c && c <= 0x10ffff) {\n out[j] = String.fromCharCode(0xf0 | ((c >>> 18) & 0x3f),\n 0x80 | ((c >>> 12) & 0x3f),\n 0x80 | ((c >>> 6) & 0x3f),\n 0x80 | (c & 0x3f));\n }\n else {\n out[j] = '?';\n }\n }\n else {\n i--;\n out[j] = '?';\n }\n }\n else {\n i--;\n out[j] = '?';\n }\n }\n }\n return out.join('');\n}", "title": "" }, { "docid": "16101f6afcbf48fbe0b28ce3133011c2", "score": "0.60992247", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n\n return r;\n }\n\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n} // For UTF-16LE we do not explicitly append special replacement characters if we", "title": "" }, { "docid": "16101f6afcbf48fbe0b28ce3133011c2", "score": "0.60992247", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n\n return r;\n }\n\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n} // For UTF-16LE we do not explicitly append special replacement characters if we", "title": "" }, { "docid": "c97f11b304439e2fdb12e00bb16b8a3c", "score": "0.6064659", "text": "function UTF8ToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var n, c, c2, c3, c4, code;\n\n while (i < len) {\n c = data[i++];\n n = c >> 4;\n if (n >= 0 && n <= 7) {\n // 0xxx xxxx\n code = c;\n } else if (n === 12 || n === 13) {\n // 110x xxxx\n // 10xx xxxx\n c2 = data[i++];\n code = ((c & 0x1F) << 6) | (c2 & 0x3F);\n } else if (n === 14) {\n // 1110 xxxx\n // 10xx xxxx\n // 10xx xxxx\n c2 = data[i++];\n c3 = data[i++];\n code = ((c & 0x0F) << 12) |\n ((c2 & 0x3F) << 6) |\n (c3 & 0x3F);\n } else if (n === 15) {\n // 1111 0xxx\n // 10xx xxxx\n // 10xx xxxx\n // 10xx xxxx\n c2 = data[i++];\n c3 = data[i++];\n c4 = data[i++];\n code = ((c & 0x7) << 18) |\n ((c2 & 0x3F) << 12) |\n ((c3 & 0x3F) << 6) |\n (c4 & 0x3F);\n }\n\n if (code <= 0xFFFF) {\n results[results.length] = code;\n } else {\n // Split in surrogate halves\n code -= 0x10000;\n results[results.length] = (code >> 10) + 0xD800; // High surrogate\n results[results.length] = (code % 0x400) + 0xDC00; // Low surrogate\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "c97f11b304439e2fdb12e00bb16b8a3c", "score": "0.6064659", "text": "function UTF8ToUNICODE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var n, c, c2, c3, c4, code;\n\n while (i < len) {\n c = data[i++];\n n = c >> 4;\n if (n >= 0 && n <= 7) {\n // 0xxx xxxx\n code = c;\n } else if (n === 12 || n === 13) {\n // 110x xxxx\n // 10xx xxxx\n c2 = data[i++];\n code = ((c & 0x1F) << 6) | (c2 & 0x3F);\n } else if (n === 14) {\n // 1110 xxxx\n // 10xx xxxx\n // 10xx xxxx\n c2 = data[i++];\n c3 = data[i++];\n code = ((c & 0x0F) << 12) |\n ((c2 & 0x3F) << 6) |\n (c3 & 0x3F);\n } else if (n === 15) {\n // 1111 0xxx\n // 10xx xxxx\n // 10xx xxxx\n // 10xx xxxx\n c2 = data[i++];\n c3 = data[i++];\n c4 = data[i++];\n code = ((c & 0x7) << 18) |\n ((c2 & 0x3F) << 12) |\n ((c3 & 0x3F) << 6) |\n (c4 & 0x3F);\n }\n\n if (code <= 0xFFFF) {\n results[results.length] = code;\n } else {\n // Split in surrogate halves\n code -= 0x10000;\n results[results.length] = (code >> 10) + 0xD800; // High surrogate\n results[results.length] = (code % 0x400) + 0xDC00; // Low surrogate\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "eeb978f485d02778579628855a71eb0b", "score": "0.6061638", "text": "function JISToUNICODE(data) {\n return UTF8ToUNICODE(JISToUTF8(data));\n}", "title": "" }, { "docid": "eeb978f485d02778579628855a71eb0b", "score": "0.6061638", "text": "function JISToUNICODE(data) {\n return UTF8ToUNICODE(JISToUTF8(data));\n}", "title": "" }, { "docid": "a081150d5cf736da119f3355def734f0", "score": "0.6055682", "text": "function JISToUNICODE (data) {\n return UTF8ToUNICODE(JISToUTF8(data))\n }", "title": "" }, { "docid": "0fc032e02e74fad3096bfb6a8e6ffd98", "score": "0.6023561", "text": "function prepare$ArrayBuffer16 (o) {\n let ret = { ctr: ctors.indexOf(o.constructor) }\n let nWords = Math.floor(o.byteLength / 2)\n let s = ''\n\n if (ret.ctr === -1)\n ret.ctr = o.constructor.name\n \n if (littleEndian) {\n let ui16 = new Uint16Array(o.buffer, o.byteOffset, nWords)\n for (let i = 0; i < nWords; i++) {\n s += String.fromCharCode(ui16[i])\n }\n } else {\n let ui8 = new Uint8Array(o.buffer, o.byteOffset, o.byteLength)\n for (let i = 0; i < nWords; i++) {\n s += String.fromCharCode((ui8[0 + (2 * i)] << 8) + (ui8[1 + (2 * i)]))\n }\n }\n\n let manyZeroes = '\\u0000\\u0000\\u0000\\u0000'\n if (s.indexOf(manyZeroes) === -1) {\n ret.ab16 = s\n } else {\n /* String looks zero-busy: represent via islands of mostly non-zero (sparse string). */\n // let re = /([^\\u0000]+/g\n let re = /([^\\u0000]+(.{0,3}([^\\u0000]|$))*)+/g\n let island\n\n ret.isl16 = []\n ret.len = o.byteLength\n while ((island = re.exec(s))) {\n ret.isl16.push({0: island[0].replace(/\\u0000*$/, ''), '@': island.index})\n }\n }\n if ((2 * nWords) !== o.byteLength) {\n let ui8 = new Uint8Array(o.buffer, o.byteOffset + o.byteLength - 1, 1)\n ret.eb = ui8[0]\n }\n\n if (ret.ab16 && notUnicode(ret.ab16)) {\n return null\n } else {\n for (let i = 0; i < isl16.length; i++) {\n if (notUnicode(isl16[i])) {\n return null\n }\n }\n }\n return ret\n}", "title": "" }, { "docid": "039b45e06eb59245b98ceb3a500583eb", "score": "0.6016992", "text": "function UNICODEToUTF16LE (data) {\n var results = []\n var i = 0\n var len = data && data.length\n var c\n\n while (i < len) {\n c = data[i++]\n if (c <= 0xFF) {\n results[results.length] = c\n results[results.length] = 0\n } else if (c <= 0xFFFF) {\n results[results.length] = c & 0xFF\n results[results.length] = c >> 8 & 0xFF\n }\n }\n\n return results\n }", "title": "" }, { "docid": "5fdf6cd992dfb8295d409c92f276026a", "score": "0.6016314", "text": "function UNICODEToUTF16LE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c;\n\n while (i < len) {\n c = data[i++];\n if (c <= 0xFF) {\n results[results.length] = c;\n results[results.length] = 0;\n } else if (c <= 0xFFFF) {\n results[results.length] = c & 0xFF;\n results[results.length] = c >> 8 & 0xFF;\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "5fdf6cd992dfb8295d409c92f276026a", "score": "0.6016314", "text": "function UNICODEToUTF16LE(data) {\n var results = [];\n var i = 0;\n var len = data && data.length;\n var c;\n\n while (i < len) {\n c = data[i++];\n if (c <= 0xFF) {\n results[results.length] = c;\n results[results.length] = 0;\n } else if (c <= 0xFFFF) {\n results[results.length] = c & 0xFF;\n results[results.length] = c >> 8 & 0xFF;\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "27a2e530a1e64720afe02ecb822073dd", "score": "0.6009674", "text": "function utf16to8(str) {\r\n var out, i, j, len, c, c2;\r\n out = [];\r\n len = str.length;\r\n for (i = 0, j = 0; i < len; i++, j++) {\r\n c = str.charCodeAt(i);\r\n if (c <= 0x7f) {\r\n out[j] = str.charAt(i);\r\n }\r\n else if (c <= 0x7ff) {\r\n out[j] = String.fromCharCode(0xc0 | (c >>> 6),\r\n 0x80 | (c & 0x3f));\r\n }\r\n else if (c < 0xd800 || c > 0xdfff) {\r\n out[j] = String.fromCharCode(0xe0 | (c >>> 12),\r\n 0x80 | ((c >>> 6) & 0x3f),\r\n 0x80 | (c & 0x3f));\r\n }\r\n else {\r\n if (++i < len) {\r\n c2 = str.charCodeAt(i);\r\n if (c <= 0xdbff && 0xdc00 <= c2 && c2 <= 0xdfff) {\r\n c = ((c & 0x03ff) << 10 | (c2 & 0x03ff)) + 0x010000;\r\n if (0x010000 <= c && c <= 0x10ffff) {\r\n out[j] = String.fromCharCode(0xf0 | ((c >>> 18) & 0x3f),\r\n 0x80 | ((c >>> 12) & 0x3f),\r\n 0x80 | ((c >>> 6) & 0x3f),\r\n 0x80 | (c & 0x3f));\r\n }\r\n else {\r\n out[j] = '?';\r\n }\r\n }\r\n else {\r\n i--;\r\n out[j] = '?';\r\n }\r\n }\r\n else {\r\n i--;\r\n out[j] = '?';\r\n }\r\n }\r\n }\r\n return out.join('');\r\n}", "title": "" }, { "docid": "00a3a96c1399e9232ede43b5b08be94d", "score": "0.6002877", "text": "function $lrG1$var$utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n\n return r;\n }\n\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n} // For UTF-16LE we do not explicitly append special replacement characters if we", "title": "" }, { "docid": "7436c5b60c709cb4d1fc60b8b0fd7e81", "score": "0.59776986", "text": "function decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}", "title": "" }, { "docid": "7436c5b60c709cb4d1fc60b8b0fd7e81", "score": "0.59776986", "text": "function decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}", "title": "" }, { "docid": "7436c5b60c709cb4d1fc60b8b0fd7e81", "score": "0.59776986", "text": "function decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}", "title": "" }, { "docid": "7436c5b60c709cb4d1fc60b8b0fd7e81", "score": "0.59776986", "text": "function decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}", "title": "" }, { "docid": "7436c5b60c709cb4d1fc60b8b0fd7e81", "score": "0.59776986", "text": "function decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}", "title": "" }, { "docid": "7436c5b60c709cb4d1fc60b8b0fd7e81", "score": "0.59776986", "text": "function decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}", "title": "" }, { "docid": "7436c5b60c709cb4d1fc60b8b0fd7e81", "score": "0.59776986", "text": "function decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}", "title": "" }, { "docid": "303c79e384c8509d760120b2ec735168", "score": "0.59642875", "text": "function UTF8ToUNICODE (data) {\n var results = []\n var i = 0\n var len = data && data.length\n var n, c, c2, c3, c4, code\n\n while (i < len) {\n c = data[i++]\n n = c >> 4\n if (n >= 0 && n <= 7) {\n // 0xxx xxxx\n code = c\n } else if (n === 12 || n === 13) {\n // 110x xxxx\n // 10xx xxxx\n c2 = data[i++]\n code = ((c & 0x1F) << 6) | (c2 & 0x3F)\n } else if (n === 14) {\n // 1110 xxxx\n // 10xx xxxx\n // 10xx xxxx\n c2 = data[i++]\n c3 = data[i++]\n code = ((c & 0x0F) << 12) |\n ((c2 & 0x3F) << 6) |\n (c3 & 0x3F)\n } else if (n === 15) {\n // 1111 0xxx\n // 10xx xxxx\n // 10xx xxxx\n // 10xx xxxx\n c2 = data[i++]\n c3 = data[i++]\n c4 = data[i++]\n code = ((c & 0x7) << 18) |\n ((c2 & 0x3F) << 12) |\n ((c3 & 0x3F) << 6) |\n (c4 & 0x3F)\n }\n\n if (code <= 0xFFFF) {\n results[results.length] = code\n } else {\n // Split in surrogate halves\n code -= 0x10000\n results[results.length] = (code >> 10) + 0xD800 // High surrogate\n results[results.length] = (code % 0x400) + 0xDC00 // Low surrogate\n }\n }\n\n return results\n }", "title": "" }, { "docid": "3b4fee8be3decb87b2112936a0529923", "score": "0.5937872", "text": "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}", "title": "" }, { "docid": "eed7d8e1132318ed5aa416956f0fadf5", "score": "0.593744", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xd800 && c <= 0xdbff) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n }", "title": "" }, { "docid": "11241b6ed083c11aa86ee440bf2dd050", "score": "0.59361315", "text": "function UTF16Encoding(cp) { // eslint-disable-line no-unused-vars\n\t\t// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.\n\t\t// 2. If cp ≤ 0xFFFF, return cp.\n\t\tif (cp <= 0xFFFF) {\n\t\t\treturn cp;\n\t\t} else {\n\t\t\t// 3. Let cu1 be floor((cp - 0x10000) / 0x400) + 0xD800.\n\t\t\tvar cu1 = Math.floor((cp - 0x10000) / 0x400) + 0xD800;\n\t\t\t// 4. Let cu2 be ((cp - 0x10000) modulo 0x400) + 0xDC00.\n\t\t\tvar cu2 = ((cp - 0x10000) % 0x400) + 0xDC00;\n\t\t\t// 5. Return the code unit sequence consisting of cu1 followed by cu2.\n\t\t\treturn [cu1, cu2];\n\t\t}\n\t}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" }, { "docid": "cf67750745b699326f2b34c16c4fc645", "score": "0.59207076", "text": "function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}", "title": "" } ]
47d09d4c01e7e3bf9cd4d97a120878a1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. AUTOGENERATED FILE. DO NOT MODIFY. / Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
[ { "docid": "fc022f81a0088d8144c13469f54fd86f", "score": "0.0", "text": "function categoryFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (!legendModels || !legendModels.length) {\n return;\n }\n\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n\n if (category != null) {\n if (typeof category === 'number') {\n category = categoryNames[category];\n } // If in any legend component the status is not selected.\n\n\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n\n return true;\n });\n });\n }", "title": "" } ]
[ { "docid": "216d1891fb964af4c38a10f95f4e62db", "score": "0.46609956", "text": "static get tag() {\n return \"file-system-broker\";\n }", "title": "" }, { "docid": "07f7261231f96d9e397b7b451a391353", "score": "0.46557823", "text": "function HiveThriftClient () {}", "title": "" }, { "docid": "d2e4c9fdb4dfdecf6289c0d8a91be5f2", "score": "0.45448703", "text": "getNativeAPI() {\n throw new Error('Native API not available in embedded runtime');\n }", "title": "" }, { "docid": "36afa2680104e2ce3afafd791daed810", "score": "0.44702736", "text": "static metadata(){ return Metadata.singleton(true); }", "title": "" }, { "docid": "347269eb4105822b1230acf5106b6e37", "score": "0.44496268", "text": "static getMetadataSize() {\n return 2\n }", "title": "" }, { "docid": "72305b4f3be8b525ac99bbabd99a7dc8", "score": "0.4379554", "text": "constructor() {\n super();\n this.TAG = 'AudioTrack';\n this.type = 'audio';\n }", "title": "" }, { "docid": "a67ca23dd434b67d42488de003444019", "score": "0.43404594", "text": "getApplicationMetadata() {\n return Native.getApplicationMetadata();\n }", "title": "" }, { "docid": "8f5f95ba4742dc5eb82843c1e4dde370", "score": "0.43291757", "text": "static create() {\r\n // TODO Implement\r\n console.log(\"Not implemented...\");\r\n }", "title": "" }, { "docid": "383bae773192120696c7e69e413d4607", "score": "0.43002328", "text": "get version() {\n return 1;\n }", "title": "" }, { "docid": "d38753a8cd038437562a500559125d15", "score": "0.42620727", "text": "static get tag() {\n return \"haxcms-legacy-player\";\n }", "title": "" }, { "docid": "9bcfff2d7992fd5131851ca27e62f615", "score": "0.4238698", "text": "static get version() {}", "title": "" }, { "docid": "d137af80c61e1e90ad9432eae8f932d5", "score": "0.42322877", "text": "constructor() {\n }", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "1949438578823cf6b0612ef5c8b85839", "score": "0.42091578", "text": "constructor() {\n\t\t\t\t\t\t\tsuper();\n\t\t\t\t\t\t}", "title": "" }, { "docid": "93f595425a7388b693d64c41e3280117", "score": "0.42057645", "text": "static getMetadataSize() {\n return 7\n }", "title": "" }, { "docid": "178d9fd115a291d93fdfe24205beec3b", "score": "0.41950986", "text": "get version() {\n return 2;\n }", "title": "" }, { "docid": "b36870915304629d2c44ca9b0c395e24", "score": "0.4191875", "text": "static getVersion() { return 1; }", "title": "" }, { "docid": "b36870915304629d2c44ca9b0c395e24", "score": "0.4191875", "text": "static getVersion() { return 1; }", "title": "" }, { "docid": "b36870915304629d2c44ca9b0c395e24", "score": "0.4191875", "text": "static getVersion() { return 1; }", "title": "" }, { "docid": "b36870915304629d2c44ca9b0c395e24", "score": "0.4191875", "text": "static getVersion() { return 1; }", "title": "" }, { "docid": "10c1ade25d2a14f191c2d80bd9f68776", "score": "0.41872704", "text": "constructor() {\n\t\t\t\tsuper();\n }", "title": "" }, { "docid": "28dd36cebf06f2cab741058da94f9153", "score": "0.41720945", "text": "function Xi(t,e){// Use two different prefix formats:\n// * firestore / persistenceKey / projectID . databaseID / ...\n// * firestore / persistenceKey / projectID / ...\n// projectIDs are DNS-compatible names and cannot contain dots\n// so there's no danger of collisions.\nvar n=t.projectId;return t.o||(n+=\".\"+t.database),\"firestore/\"+e+\"/\"+n+\"/\"/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;}", "title": "" }, { "docid": "6e9021929b37ad6ac68284d52f6c8052", "score": "0.41556033", "text": "constructor() {\n super('BUFFER');\n }", "title": "" }, { "docid": "7b0d6ca8107bdea5cb3c9d277478f516", "score": "0.41534466", "text": "handleBusMessages() {\n const bus = this.runtime.bus();\n\n bus.on('ping-comm-channel', (message) => {\n this.sendCommMessage('ping', null, {\n ping_id: message.pingId,\n });\n });\n\n // Cancels the job.\n bus.on('request-job-cancellation', (message) => {\n this.sendCommMessage(CANCEL_JOB, message.jobId);\n });\n\n // Fetches job status from kernel.\n bus.on('request-job-status', (message) => {\n // console.log('requesting job status for ' + message.jobId);\n this.sendCommMessage(JOB_STATUS, message.jobId, {\n parent_job_id: message.parentJobId,\n });\n });\n\n // Requests job status updates for this job via the job channel, and also\n // ensures that job polling is running.\n bus.on('request-job-update', (message) => {\n // console.log('requesting job updates for ' + message.jobId);\n this.sendCommMessage(START_JOB_UPDATE, message.jobId, {\n parent_job_id: message.parentJobId,\n });\n });\n\n // Tells kernel to stop including a job in the lookup loop.\n bus.on('request-job-completion', (message) => {\n // console.log('cancelling job updates for ' + message.jobId);\n this.sendCommMessage(STOP_JOB_UPDATE, message.jobId, {\n parent_job_id: message.parentJobId,\n });\n });\n\n // Fetches job logs from kernel.\n bus.on('request-job-log', (message) => {\n this.sendCommMessage(JOB_LOGS, message.jobId, message.options);\n });\n\n // Fetches most recent job logs from kernel.\n bus.on('request-latest-job-log', (message) => {\n this.sendCommMessage(JOB_LOGS_LATEST, message.jobId, message.options);\n });\n\n // Fetches info (not state) about a job. Like the app id, name, and inputs.\n bus.on('request-job-info', (message) => {\n this.sendCommMessage(JOB_INFO, message.jobId, {\n parent_job_id: message.parentJobId,\n });\n });\n }", "title": "" }, { "docid": "384aaeab302c25ede342617d871133c5", "score": "0.41533247", "text": "constructor()\r\n {\r\n super(process.env.YAMASHIRO_TOKEN, {\r\n disableEveryone: true,\r\n autoreconnect: true,\r\n maxShards: 'auto',\r\n getAllUsers: true,\r\n defaultImageFormat: 'png'\r\n });\r\n\r\n this.manager = new CommandManager(this);\r\n this.events = new EventManager(this);\r\n this.database = new DatabaseService(this);\r\n this.constants = require('../util/constants');\r\n this.util = require('../util/util');\r\n this.logger = new Pikmin.instance({\r\n name: 'main',\r\n format: `${Pikmin.colors.bgMagentaBright(process.pid)} ${Pikmin.colors.bgCyanBright('%h:%m:%s')} [${Pikmin.colors.magenta('%l')}] <=> `,\r\n autogen: false,\r\n transports: [\r\n new Pikmin.ConsoleTransport({ name: 'info', process: process, format: `${Pikmin.colors.bgMagentaBright(process.pid)} ${Pikmin.colors.bgCyanBright('%h:%m:%s')} [${Pikmin.colors.cyan('%l')}] <=> ` }),\r\n new Pikmin.ConsoleTransport({ name: 'error', process: process, format: `${Pikmin.colors.bgMagentaBright(process.pid)} ${Pikmin.colors.bgCyanBright('%h:%m:%s')} [${Pikmin.colors.red('%l')}] <=> ` }),\r\n new Pikmin.ConsoleTransport({ name: 'discord', process: process, format: `${Pikmin.colors.bgMagentaBright(process.pid)} ${Pikmin.colors.bgCyanBright('%h:%m:%s')} [${Pikmin.colors.magenta('%l')}] <=> ` }),\r\n new Pikmin.ConsoleTransport({ name: 'warn', process: process, format: `${Pikmin.colors.bgMagentaBright(process.pid)} ${Pikmin.colors.bgCyanBright('%h:%m:%s')} [${Pikmin.colors.yellow('%l')}] <=> ` })\r\n ]\r\n });\r\n this.rest = new RESTClient(this);\r\n this.package = require('../../package.json');\r\n this.admins = ['280158289667555328', '359794248570109972'];\r\n this.commandUsage = {};\r\n this.commandsExecution = 0;\r\n this.messagesSeen = 0;\r\n }", "title": "" }, { "docid": "c16cda55c89b87c4ec7720269486eb07", "score": "0.41461378", "text": "constructor() {\n\n\t}", "title": "" }, { "docid": "c16cda55c89b87c4ec7720269486eb07", "score": "0.41461378", "text": "constructor() {\n\n\t}", "title": "" }, { "docid": "7071e801f5f00cae348709aa8b5d0c99", "score": "0.41281888", "text": "send() {\n if (this.name === undefined) {\n throw new Error('The Message name property has to be overridden');\n }\n\n // Encode the message.\n const message = [ {[ this.name ]: this.parameters } ];\n\n // See if the data needs any manipulation on the native side.\n const updates = this.checkForUpdates(this.parameters);\n if (updates) {\n message.push(updates)\n }\n\n Cordova.exec(\n () => {},\n () => {},\n 'SparkProxy',\n 'invoke',\n message);\n }", "title": "" }, { "docid": "ccd308f81247208b14642d33de49b5a5", "score": "0.41245705", "text": "constructor(info) {\n super();\n\n _defineProperty(this, \"_peerConnectionId\", void 0);\n\n _defineProperty(this, \"_reactTag\", void 0);\n\n _defineProperty(this, \"_id\", void 0);\n\n _defineProperty(this, \"_label\", void 0);\n\n _defineProperty(this, \"_maxPacketLifeTime\", void 0);\n\n _defineProperty(this, \"_maxRetransmits\", void 0);\n\n _defineProperty(this, \"_negotiated\", void 0);\n\n _defineProperty(this, \"_ordered\", void 0);\n\n _defineProperty(this, \"_protocol\", void 0);\n\n _defineProperty(this, \"_readyState\", void 0);\n\n _defineProperty(this, \"_subscriptions\", []);\n\n _defineProperty(this, \"binaryType\", 'arraybuffer');\n\n _defineProperty(this, \"bufferedAmount\", 0);\n\n _defineProperty(this, \"bufferedAmountLowThreshold\", 0);\n\n this._peerConnectionId = info.peerConnectionId;\n this._reactTag = info.reactTag;\n this._label = info.label;\n this._id = info.id === -1 ? null : info.id; // null until negotiated.\n\n this._ordered = Boolean(info.ordered);\n this._maxPacketLifeTime = info.maxPacketLifeTime;\n this._maxRetransmits = info.maxRetransmits;\n this._protocol = info.protocol || '';\n this._negotiated = Boolean(info.negotiated);\n this._readyState = info.readyState;\n\n this._registerEvents();\n }", "title": "" }, { "docid": "e8a077c42b6cc665244e3cd82bd06734", "score": "0.411879", "text": "function SocketTransportBase() {\n \n}", "title": "" }, { "docid": "42c1d7efc9cd658f5de8e0c308c40281", "score": "0.4116509", "text": "getVideoId() {\n return 'TODO';\n }", "title": "" }, { "docid": "5cf846b5209b084965df4ba4abf64d3f", "score": "0.41081935", "text": "onMetadataChanged(msg) {\n /* no-op */\n }", "title": "" }, { "docid": "c6a769ceb2fdd1285ce7ab5304ad08c4", "score": "0.41072187", "text": "function BufferController(hls){var _this;_this=_EventHandler.call(this,hls,events[\"default\"].MEDIA_ATTACHING,events[\"default\"].MEDIA_DETACHING,events[\"default\"].MANIFEST_PARSED,events[\"default\"].BUFFER_RESET,events[\"default\"].BUFFER_APPENDING,events[\"default\"].BUFFER_CODECS,events[\"default\"].BUFFER_EOS,events[\"default\"].BUFFER_FLUSHING,events[\"default\"].LEVEL_PTS_UPDATED,events[\"default\"].LEVEL_UPDATED)||this;_this._msDuration=null;_this._levelDuration=null;_this._levelTargetDuration=10;_this._live=null;_this._objectUrl=null;_this._needsFlush=false;_this._needsEos=false;_this.config=void 0;_this.audioTimestampOffset=void 0;_this.bufferCodecEventsExpected=0;_this._bufferCodecEventsTotal=0;_this.media=null;_this.mediaSource=null;_this.segments=[];_this.parent=void 0;_this.appending=false;_this.appended=0;_this.appendError=0;_this.flushBufferCounter=0;_this.tracks={};_this.pendingTracks={};_this.sourceBuffer={};_this.flushRange=[];_this._onMediaSourceOpen=function(){logger[\"logger\"].log('media source opened');_this.hls.trigger(events[\"default\"].MEDIA_ATTACHED,{media:_this.media});var mediaSource=_this.mediaSource;if(mediaSource){// once received, don't listen anymore to sourceopen event\n\tmediaSource.removeEventListener('sourceopen',_this._onMediaSourceOpen);}_this.checkPendingTracks();};_this._onMediaSourceClose=function(){logger[\"logger\"].log('media source closed');};_this._onMediaSourceEnded=function(){logger[\"logger\"].log('media source ended');};_this._onSBUpdateEnd=function(){// update timestampOffset\n\tif(_this.audioTimestampOffset&&_this.sourceBuffer.audio){var audioBuffer=_this.sourceBuffer.audio;logger[\"logger\"].warn(\"change mpeg audio timestamp offset from \"+audioBuffer.timestampOffset+\" to \"+_this.audioTimestampOffset);audioBuffer.timestampOffset=_this.audioTimestampOffset;delete _this.audioTimestampOffset;}if(_this._needsFlush){_this.doFlush();}if(_this._needsEos){_this.checkEos();}_this.appending=false;var parent=_this.parent;// count nb of pending segments waiting for appending on this sourcebuffer\n\tvar pending=_this.segments.reduce(function(counter,segment){return segment.parent===parent?counter+1:counter;},0);// this.sourceBuffer is better to use than media.buffered as it is closer to the PTS data from the fragments\n\tvar timeRanges={};var sbSet=_this.sourceBuffer;for(var streamType in sbSet){var sb=sbSet[streamType];if(!sb){throw Error(\"handling source buffer update end error: source buffer for \"+streamType+\" uninitilized and unable to update buffered TimeRanges.\");}timeRanges[streamType]=sb.buffered;}_this.hls.trigger(events[\"default\"].BUFFER_APPENDED,{parent:parent,pending:pending,timeRanges:timeRanges});// don't append in flushing mode\n\tif(!_this._needsFlush){_this.doAppending();}_this.updateMediaElementDuration();// appending goes first\n\tif(pending===0){_this.flushLiveBackBuffer();}};_this._onSBUpdateError=function(event){logger[\"logger\"].error('sourceBuffer error:',event);// according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n\t// this error might not always be fatal (it is fatal if decode error is set, in that case\n\t// it will be followed by a mediaElement error ...)\n\t_this.hls.trigger(events[\"default\"].ERROR,{type:errors[\"ErrorTypes\"].MEDIA_ERROR,details:errors[\"ErrorDetails\"].BUFFER_APPENDING_ERROR,fatal:false});// we don't need to do more than that, as accordin to the spec, updateend will be fired just after\n\t};_this.config=hls.config;return _this;}", "title": "" }, { "docid": "4d48600f16ecfa35965b8a42e36a0f75", "score": "0.41071638", "text": "onServerCreated() {\n\t\t/* ... */\n\t}", "title": "" }, { "docid": "f220cd8c220c16e2a0eab43fe713c563", "score": "0.41034174", "text": "constructor() {\n this._defaultConfig = pip_services3_commons_node_1.ConfigParams.fromTuples(\n // connections.*\n // credential.*\n \"client_id\", null, \"options.retry_connect\", true, \"options.connect_timeout\", 30000, \"options.reconnect_timeout\", 1000, \"options.keepalive_timeout\", 60000);\n /**\n * The logger.\n */\n this._logger = new pip_services3_components_node_1.CompositeLogger();\n /**\n * The connection resolver.\n */\n this._connectionResolver = new MqttConnectionResolver_1.MqttConnectionResolver();\n /**\n * The configuration options.\n */\n this._options = new pip_services3_commons_node_1.ConfigParams();\n /**\n * Topic subscriptions\n */\n this._subscriptions = [];\n this._clientId = os.hostname();\n this._retryConnect = true;\n this._connectTimeout = 30000;\n this._keepAliveTimeout = 60000;\n this._reconnectTimeout = 1000;\n }", "title": "" }, { "docid": "fc58dd0c1fdf4db5442045b080c5982e", "score": "0.40903708", "text": "constructor(params) {\n const {\n msg_token,\n msg_udid,\n msg_domain,\n api_ip,\n pc_port = '7070',\n pc_encrypt\n } = params;\n\n let currentUser = getCurrentUser();\n\n console.log('api_ip', api_ip);\n\n this.wsUrl = (pc_encrypt ? 'wss://' : 'ws://') + api_ip + ':' + pc_port + '/ws/';\n this.serverIp = `${api_ip}:${pc_port}`;\n\n this.token = msg_token;\n this.domain = msg_domain;\n \n // this.domain = 'iz23t7ry645z';\n\n this.msgUdid = msg_udid;\n this.msgUserId = currentUser.base_user_id;\n this.resource = 'pc';\n\n this.myBaseId = this.getMessageId(this.msgUserId);\n\n //当前状态是否连接\n this.connected = false;\n //XMPP连接\n this.connection = null;\n\n this.init();\n }", "title": "" }, { "docid": "6cbe91a28691e9e1becc6118b364df9f", "score": "0.4083353", "text": "constructor(options){\n super(options) //Passing options to native constructor (REQUIRED) \n }", "title": "" }, { "docid": "f6bc61f1bfb794c8c7808b5f06089cd1", "score": "0.40828437", "text": "constructor() {\r\n }", "title": "" }, { "docid": "06a01e9206f6bf970def1cd86a662023", "score": "0.40765768", "text": "init() {\n /*\n const url = cc.url.raw(\"resources/test.amr\");\n const fileData = jsb.fileUtils.getDataFromFile(url);\n const content = \"\";\n const sep = \"\";\n for(const i = 0; i < fileData.length; ++i){\n content += sep + fileData[i];\n sep = \",\";\n }\n\n const url = cc.url.raw(\"resources/test.txt\");\n jsb.fileUtils.writeStringToFile(content,url);\n\n const url = cc.url.raw(\"resources/test2.amrs\");\n const content = encode(fileData);\n jsb.fileUtils.writeStringToFile(content,url);\n\n const url = cc.url.raw(\"resources/test2.amr\");\n jsb.fileUtils.writeDataToFile(decode(content),url);\n */\n\n if (cc.sys.isNative) {\n this.voiceMediaPath = `${jsb.fileUtils.getWritablePath()}/voicemsgs/`;\n this.setStorageDir(this.voiceMediaPath);\n }\n }", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.40716308", "text": "constructor() {\n\t}", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.40716308", "text": "constructor() {\n\t}", "title": "" }, { "docid": "4c1096adaa9b19bc591fa033ed9e09e9", "score": "0.40701708", "text": "didMount() {}", "title": "" }, { "docid": "3d12d6c4a669a6a16d7e6c14b417fecd", "score": "0.40701106", "text": "get ios() {\n return null;\n }", "title": "" }, { "docid": "353f689323623ef24600c365ce5f1ca4", "score": "0.40483215", "text": "constructor() { // eslint-disable-line\n super();\n }", "title": "" }, { "docid": "84c7d1b360d7772bdaf57504446b9820", "score": "0.40480575", "text": "constructor() {\n \tsuper(0)\n \t\n }", "title": "" }, { "docid": "47fa7b92d7c53a98cff594b0b292bab0", "score": "0.40475643", "text": "updateMetaData() {\n if (this.config.lastUsedAt) {\n this.metaData.lastUsedAt = new Date().toISOString();\n }\n\n if (this.config.sessionsCount) {\n if (this.platform.isNewSession()) {\n if (!this.metaData.sessionsCount) {\n this.metaData.sessionsCount = 0;\n }\n this.metaData.sessionsCount += 1;\n }\n }\n\n if (this.config.requestHistorySize > 0) {\n if (!_.get(this.metaData, `requests.${this.platform.jovo.getHandlerPath()}`)) {\n let requests = {\n count: 0,\n log: [],\n };\n _.set(this.metaData,\n `requests.${this.platform.jovo.getHandlerPath()}`,\n requests);\n }\n let requestItem = this.metaData.requests[this.platform.jovo.getHandlerPath()];\n requestItem.count += 1;\n requestItem.log.push(new Date().toISOString());\n\n if (requestItem.log.length > this.config.requestHistorySize) {\n requestItem.log = requestItem.log.slice(1, requestItem.log.length);\n }\n }\n\n if (this.config.devices) {\n if (!_.get(this.metaData, 'devices[\"'+this.platform.getDeviceId()+'\"]')) {\n let device = {\n hasAudioInterface: this.platform.hasAudioInterface(),\n hasScreenInterface: this.platform.hasScreenInterface(),\n };\n _.set(this.metaData,\n 'devices[\"'+this.platform.getDeviceId()+'\"]',\n device);\n }\n }\n }", "title": "" }, { "docid": "7f437fe77a620e025f568ac92b5a755a", "score": "0.40467873", "text": "function KangoMessageTargetModule() {\n}", "title": "" }, { "docid": "c1051b44ab5b79638c38970757ce4caf", "score": "0.4034768", "text": "static isSupported() {\n return window.cordova.platformId === 'android';\n }", "title": "" }, { "docid": "d2df1d33bf0465f0b7311ab698019bc0", "score": "0.40260306", "text": "constructor () {\n this._onServiceStarted = null;\n this._onServiceEnded = null;\n this._onServiceError = null;\n }", "title": "" }, { "docid": "708cbd8821cf1f1d788ce61bc98e36b4", "score": "0.4019006", "text": "getService() {\n return null;\n }", "title": "" }, { "docid": "24683544388d6053353eec77f3358d88", "score": "0.40108922", "text": "get isSupported() {\n return window.cordova.platformId === 'android';\n }", "title": "" }, { "docid": "b3890c08806ce1dcfea7b754ae95d841", "score": "0.40041074", "text": "componentDidMount() {\n var imageExtensions = [\n \"jpg\",\n \"gif\",\n \"png\",\n \"bmp\",\n \"JPG\",\n \"GIF\",\n \"PNG\",\n \"BMP\"\n ];\n if (\n this.props.value &&\n imageExtensions.indexOf(this.props.value.split(\".\").pop()) >= 0\n ) {\n var payload = {\n fieldid: this.props.id,\n jobOrRouteId: this.props.jobOrRouteId.toString(),\n filename: this.props.value,\n cfNamespace: this.props.cfNamespace\n };\n this.props.downloadMediaCustomFiledThumbnails(payload);\n }\n }", "title": "" }, { "docid": "3ccc31072b8503bc66927d3fa4ef7214", "score": "0.39988074", "text": "getObjectId() {\n return 'ProtocolMessages';\n }", "title": "" }, { "docid": "d8166cb5a25f80da283eb661b71231e5", "score": "0.3996818", "text": "static get tag() {\n return \"hal-9000\";\n }", "title": "" }, { "docid": "de3ba4b3bbe72b25e5ab76784aafb81b", "score": "0.39912784", "text": "onAfterStart () {}", "title": "" }, { "docid": "6b1058340f927cec4da531568795c919", "score": "0.39814353", "text": "supportsPlatform() {\n return true;\n }", "title": "" }, { "docid": "79304a09418539d9f169e5afbf555dea", "score": "0.39809468", "text": "async function createAStreamingEndpoint() {\n const subscriptionId =\n process.env[\"MEDIASERVICES_SUBSCRIPTION_ID\"] || \"0a6ec948-5a62-437d-b9df-934dc7c1b722\";\n const resourceGroupName = process.env[\"MEDIASERVICES_RESOURCE_GROUP\"] || \"mediaresources\";\n const accountName = \"slitestmedia10\";\n const streamingEndpointName = \"myStreamingEndpoint1\";\n const parameters = {\n description: \"test event 1\",\n accessControl: {\n akamai: {\n akamaiSignatureHeaderAuthenticationKeyList: [\n {\n base64Key: \"dGVzdGlkMQ==\",\n expiration: new Date(\"2029-12-31T16:00:00-08:00\"),\n identifier: \"id1\",\n },\n {\n base64Key: \"dGVzdGlkMQ==\",\n expiration: new Date(\"2030-12-31T16:00:00-08:00\"),\n identifier: \"id2\",\n },\n ],\n },\n ip: { allow: [{ name: \"AllowedIp\", address: \"192.168.1.1\" }] },\n },\n availabilitySetName: \"availableset\",\n cdnEnabled: false,\n location: \"West US\",\n scaleUnits: 1,\n tags: { tag1: \"value1\", tag2: \"value2\" },\n };\n const credential = new DefaultAzureCredential();\n const client = new AzureMediaServices(credential, subscriptionId);\n const result = await client.streamingEndpoints.beginCreateAndWait(\n resourceGroupName,\n accountName,\n streamingEndpointName,\n parameters\n );\n console.log(result);\n}", "title": "" }, { "docid": "f9a1f634afc0257ba4e62a95c4b8d269", "score": "0.39792696", "text": "didMount () {}", "title": "" }, { "docid": "caed3d08d1ea38419440901f1e4b32fe", "score": "0.39760846", "text": "onCreate (err, log, request, response) {\n console.log('onCreate');// TODO: remove on production\n response.json({\n error: err,\n data: log\n });\n }", "title": "" }, { "docid": "cfcd1b93bac3b6a711587156f4b690c9", "score": "0.3972278", "text": "constructor() {\n super();\n /** @package */\n this._id = getNextId();\n /** @private */\n this._eventEmitter = nativeEventEmitter;\n /** @type {EventEmitter<'written', any>} @private */\n this._msgEvtEmitter = new EventEmitter();\n /** @type {number} @private */\n this._timeoutMsecs = 0;\n /** @type {number | undefined} @private */\n this._timeout = undefined;\n /** @private */\n this._encoding = undefined;\n /** @private */\n this._msgId = 0;\n /** @private */\n this._lastRcvMsgId = Number.MAX_SAFE_INTEGER - 1;\n /** @private */\n this._lastSentMsgId = 0;\n /** @private */\n this._paused = false;\n /** @private */\n this._resuming = false;\n /** @private */\n this._writeBufferSize = 0;\n /** @private */\n this._bytesRead = 0;\n /** @private */\n this._bytesWritten = 0;\n /** @private */\n this._connecting = false;\n /** @private */\n this._pending = true;\n /** @private */\n this._destroyed = false;\n // TODO: Add readOnly and writeOnly states\n /** @type {'opening' | 'open' | 'readOnly' | 'writeOnly'} @private */\n this._readyState = 'open'; // Incorrect, but matches NodeJS behavior\n /** @type {{ id: number; data: string; }[]} @private */\n this._pausedDataEvents = [];\n this.readableHighWaterMark = 16384;\n this.writableHighWaterMark = 16384;\n this.writableNeedDrain = false;\n this.localAddress = undefined;\n this.localPort = undefined;\n this.remoteAddress = undefined;\n this.remotePort = undefined;\n this.remoteFamily = undefined;\n this._registerEvents();\n }", "title": "" }, { "docid": "b5d14a181a049889e05ef760f654ad3f", "score": "0.39668852", "text": "constructor(props) { // eslint-disable-line\n\n\t}", "title": "" }, { "docid": "16f4b9dadf30b97086645588d0038f4b", "score": "0.3962312", "text": "version() {\n return '0';\n }", "title": "" }, { "docid": "9c27e6db371515acc13a595fc5bad8a9", "score": "0.39575833", "text": "_getEmbeddedAnnotations(imageData){\n console.log(\"FileAccess: _getEmbeddedAnnotations\");\n\n }", "title": "" }, { "docid": "ce98ce4fbfdc77e0eeae397e9706a39e", "score": "0.39556277", "text": "getNewStream() {\n return {\n data: {\n coldStorageCompression: this.compressionAlgorithms[0].value,\n coldStorageRetention: this.storageDurations[0].value,\n coldStorageContent: this.storageContents[0].value,\n coldStorageTarget: this.storageTargets[0].value,\n coldStorageNotifyEnabled: true,\n coldStorageEnabled: false,\n webSocketEnabled: true,\n indexingEnabled: true,\n indexingNotifyEnabled: true,\n encryptionKeysIds: [],\n },\n loading: false,\n };\n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.39555964", "text": "constructor() {\n \n }", "title": "" } ]
3fc1f71b52e02c5e24f780f4ea62f3fd
whenever a key is pressed on the keyboard, draw a spider web centered on the current position of the mouse with a random size web each time
[ { "docid": "c1929d0b584fa99e1bd013dd0e3a2cee", "score": "0.6862754", "text": "function mouseClicked() {\n var size = random(50, width / 5);\n drawWeb(mouseX, mouseY, size);\n}", "title": "" } ]
[ { "docid": "5f3ac4719dae198c1e2da8155f75434f", "score": "0.81778425", "text": "function keyPressed() {\n var size = random(0, width / 5);\n drawWeb(mouseX, mouseY, size);\n}", "title": "" }, { "docid": "32c506cec4ba5adb3e312bb9f1a2e553", "score": "0.73949534", "text": "function keyPressed() {\n var size = random(50, width / 3);\n drawCompass(mouseX, mouseY, size);\n}", "title": "" }, { "docid": "2e239644a6b0837d0f655978b467e5af", "score": "0.69609386", "text": "function mousePressed() {\n\tvar size = random(50, 500);\n\tdrawAbstract(mouseX, mouseY, size)\n}", "title": "" }, { "docid": "f13ff0de6b0b33dc46d8c7764aaa1b59", "score": "0.6740111", "text": "function mousePressed() {\r\n \r\n\txPositions.push(random(0,400));\r\n \r\n\tyPositions.push(random(0,400));\r\n \r\n}", "title": "" }, { "docid": "6af30b8a562892f1a04d8a5320a3d0da", "score": "0.63842094", "text": "function keyPressed() {\n if (keyCode === 32) {\n comment.x = random(0, width);\n comment.y = random(0, height);\n }\n}", "title": "" }, { "docid": "b6f8a7553cb0e593a9c63fd27fa1e0e7", "score": "0.63790464", "text": "function mouseReleased(){\n size = random(5,100);\n}", "title": "" }, { "docid": "fdc04c81e133e5bc30ffd0113f570d62", "score": "0.6373176", "text": "function mousePressed() {\ndiameter = random(0, 600)\n}", "title": "" }, { "docid": "e1728d0ae4c845dc391d50e175b30ca9", "score": "0.63321346", "text": "function keyReleased() {\n x = random(0, width);\n y = random(0, height);\n speedX = random(-3, 3);\n speedY = random(-3, 3);\n}", "title": "" }, { "docid": "e1e7c101b80195f8f00b14822b7ab70a", "score": "0.6294704", "text": "function keyPressed() {\n if (key != ' ' ) {\n if (keyCode % 5 === 3) {\n roundedRect();\n }\n if (keyCode % 5 === 4) {\n star(random(30, 50), random(30, 50), random(4, 7));\n }\n if (keyCode === 13) {\n saveCanvas('canvas-' + frameCount, 'jpg');\n }\n }else {\n clear();\n background(50);\n }\n}", "title": "" }, { "docid": "1540b0c92cff750488fee7eaa909ea5a", "score": "0.62589246", "text": "function keyPressed() {\n var lengthSquare = random(20, 70);\n randomColor1 = color(random(255), random(255), random(255));\n randomColor2 = color(random(255), random(255), random(255));\n drawChess(mouseX, mouseY, lengthSquare, randomColor1, randomColor2);\n}", "title": "" }, { "docid": "27b80742646c81cdf81f62477d6458ad", "score": "0.62425965", "text": "function draw() {\n //put drawing code here\n stroke(hueVal, 100, 100);\n //line(100, 200, 300, 400);\n\n //moves line to new location\n let newX = xLoc + random(-maxDev, maxDev);\n let newY = yLoc + random(-maxDev, maxDev);\n\n line(xLoc, yLoc, newX, newY);\n\n xLoc = newX;\n yLoc = newY;\n //% does modulus, which makes it wrap around. It's the remainder \n hueVal = (hueVal + 5) % 360; //changes hue of line \n\n //wraps the drunk walker around the screen when it goes off the edges\n if (xLoc > width) {\n xLoc = 0;\n } else if (xLoc < 0) {\n xLoc = width;\n } else if (yLoc > height) {\n yLoc = 0;\n } else if (yLoc < 0) {\n yLoc = height;\n }\n\n}", "title": "" }, { "docid": "23f8d853b4774799460cba6e4d8dbd71", "score": "0.62343335", "text": "function mouseClicked() {\n var size = random(50, width / 3);\n drawCompass(mouseX, mouseY, size);\n}", "title": "" }, { "docid": "1ee9e3b522126de695de7271e836c1af", "score": "0.6232361", "text": "function keyPressed() {\n //faire le pacman avec des couleur random et\n var color1 = random(0, 255);\n var color2 = random(0, 255);\n var color3 = random(0, 255);\n fill(color1, color2, color3);\n //random taille du pacman\n var a = random(10, 100);\n //random taille de la bouche\n var b = random(1.99, 12);\n var c = random(1.99, 12);\n arc(mouseX, mouseY, a, a, PI/b, (2 * PI -PI/c), PIE);\n color1 = random(0, 255);\n color2 = random(0, 255);\n color3 = random(0, 255);\n fill(color1, color2, color3);\n ellipse(mouseX, mouseY - (a/5), (a/10), (a/10));\n}", "title": "" }, { "docid": "2217f2460c3b69e968fdc8f9eadf52eb", "score": "0.620918", "text": "function keyPressed() {\n generateShape({ isCircle: Math.random() > 0.5 });\n }", "title": "" }, { "docid": "0f8bb6ffcd10953ba7b08a94df1b1a8e", "score": "0.61927074", "text": "function draw2Dkeyboard()\n{\n // Writes the current letter\n push();\n textFont(\"Arial\", 18);\n fill(0);\n translate(width/2 - 2.0*PPCM, height/2 - 1.0*PPCM);\n textAlign(CENTER, CENTER);\n noFill();\n imageMode(CORNER);\n pop();\n}", "title": "" }, { "docid": "ec1d5428f6c8a7e49533e2c9372011ab", "score": "0.6169165", "text": "function keyPressed(){\n draw();\n}", "title": "" }, { "docid": "fc731ca9f1cba488435f4c9d4ffb91f0", "score": "0.6119719", "text": "function onKeyDown(event) {\n if(keyData[event.key])\n {\n var Maxpoint = new Point(view.size.width, view.size.height);\n var randomPoint = Point.random();\n var point = Maxpoint*randomPoint;\n // When a key is pressed, set the content of the text item:\n var newCircle = new Path.Circle(point, 500);\n newCircle.fillColor = Color.random();\n newCircle.fillColor = keyData[event.key].color;\n keyData[event.key].sound.play();\n circles.push(newCircle);\n }\n var Maxpoint = new Point(view.size.width, view.size.height);\n var randomPoint = Point.random();\n var point = Maxpoint*randomPoint;\n // When a key is pressed, set the content of the text item:\n var newCircle = new Path.Circle(point, 500);\n newCircle.fillColor = Color.random();\n circles.push(newCircle);\n }", "title": "" }, { "docid": "0510a34f0e08b6a264d347443d0a5bd2", "score": "0.6112432", "text": "function mousePressed() \r\n{\r\n loc = createVector(width*.9, height*.5);\r\n animate = !animate;\r\n}", "title": "" }, { "docid": "4c2d4a8821c66885a23845ac71c0e55d", "score": "0.6095841", "text": "function draw({key}){\r\n //increment the hue\r\n ctx.strokeStyle = `hsl(${Math.random()* 360}, 100%, 50%)`;\r\n console.log(key);\r\n ctx.beginPath();\r\n ctx.moveTo(x,y);\r\n\r\n switch(key){\r\n case 'ArrowUp':\r\n y = y - MOVE_AMOUNT;\r\n break;\r\n case 'ArrowDown':\r\n y = y + MOVE_AMOUNT;\r\n break;\r\n case 'ArrowRight':\r\n x = x + MOVE_AMOUNT;\r\n break;\r\n case 'ArrowLeft':\r\n x = x - MOVE_AMOUNT;\r\n break;\r\n default: break;\r\n }\r\n\r\n ctx.lineTo(x,y);\r\n ctx.stroke();\r\n}", "title": "" }, { "docid": "0c19690e1bd95867b2c9565bcb366e10", "score": "0.6095044", "text": "function fastKey(){\n\tthis.key = Math.ceil(Math.random()*99);\n this.x = 0;\n this.bottom = 400;\n this.visible = true;\n \n this.setKey = setKey;\n this.graphics = graphics;\n \n if(this.key > maxKey){\n\t\t maxKey = this.key;\n\t }\n \n function setKey(value){\n \tthis.key = value;\n }\n \n function graphics(){\n \tvar grd = ctx.createLinearGradient(0,350,0,150);\n grd.addColorStop(0,\"darkred\");\n grd.addColorStop(1,\"red\");\n ctx.fillStyle = grd;\n ctx.fillRect(this.x, this.bottom-this.key*300/maxKey, 5, this.key*300/maxKey);\n ctx.fillStyle = \"white\";\n ctx.fillRect(this.x, this.bottom-this.key*300/maxKey, 5, 2);\n \t\n }\n}", "title": "" }, { "docid": "de39c6902f64724b76c4e5593fc3139f", "score": "0.60918474", "text": "function drawKeyboard(event)\n { \n var color = \"green\";\n var movement = 10;\n \n \n switch(event.keyCode)\n {\n case teclas.UP:\n drawLine(color, x, y, x, y - movement, paper);\n y = y - movement;\n break;\n\n case teclas.DOWN:\n drawLine(color, x, y, x, y + movement, paper);\n y = y + movement;\n break;\n\n case teclas.LEFT:\n drawLine(color, x, y, x - movement, y, paper);\n x = x - movement;\n break;\n\n case teclas.RIGHT:\n drawLine(color, x, y, x + movement, y, paper);\n x = x + movement;\n break; \n // default:\n // console.log(\"Otra tecla\");\n // break;\n }\n }", "title": "" }, { "docid": "0e65e9eefc5bf581233ef27b32336439", "score": "0.60600454", "text": "draw() {\n this.canvas = SVG().addTo('#roll-keyboard').size(style.keyDisplay.width, editor$1.zoomY * editor$1.numKeys);\n this.svg = this.canvas;\n\n for (let i = 0; i < editor$1.numKeys; i++) {\n let key = new PianoKey(i);\n key.draw(this.canvas);\n this.keys.push(key);\n }\n }", "title": "" }, { "docid": "a297396236949e445e842bb525fd3591", "score": "0.60376114", "text": "function keyPressed() {\n if (key == 'd' || key == 'D'){\n grid();\n }\nif (key == 's' || key == 'S'){\n for (let i=0; i<4; i++){\n circleBlocks(int(random(5)),int(random(5)));\n }\n}\n}", "title": "" }, { "docid": "71ac10ebcd6e1ce29ee5de7afa98742c", "score": "0.6036534", "text": "function draw() {\n // dibujar elipse en la posicion del raton, 20px altura, 30px ancho\n ellipse(mouseX, mouseY, 20, 30);\n\n osc.freq(map(mouseX, 0, width, 300, 450));\n osc.amp(map(mouseY, 0, height, 1.0, 0.0));\n}", "title": "" }, { "docid": "3b63f5c79ee8a8acc973818e83930d52", "score": "0.602788", "text": "function keyPressed(){\n slash = createImg(\"pictures/slash.png\");\n slash.size(215, 175);\n slash.position(width/2-100, 173);\n slash.show();\n setTimeout(function(){slash.hide()}, 100);\n if (whatTime == \"Miss\"){\n miss();\n }\n else if (whatTime == \"hit\"){\n hit();\n }\n}", "title": "" }, { "docid": "bf583a9ece5215aa755c85c6ee244869", "score": "0.60163814", "text": "function draw(){\n // background(255);\n if(mouseIsPressed){\n kiaraBlue = random(0,255);\n kiaraGreen = random(0,255);\n kiaraRed = random(0,255);\n stroke(0,50);\n fill(kiaraBlue,kiaraGreen,kiaraRed,100);\n rect(mouseX,mouseY,newWidth,newHeight); \n }\n \n}", "title": "" }, { "docid": "8745bff096104abf81d68c30fb6fd5ee", "score": "0.60039586", "text": "windowOnLoad() {\n $('#mouse-location').css({\n position: \"absolute\",\n \"background-color\": \"blue\",\n height: 50,\n width: 50,\n \"border-style\": \"solid\",\n \"border-width\": \"0\",\n \"border-radius\": 50,\n })\n\n const yGeneration = Math.round(0 + Math.random() * (window.innerHeight - 2))\n const xGeneration = Math.round(0 + Math.random() * (window.innerWidth - 2))\n\n $('#hidden').css({\n position: \"absolute\",\n height: 2,\n width: 2,\n \"background-color\" : \"white\",\n top: yGeneration,\n left: xGeneration,\n });\n }", "title": "" }, { "docid": "8eea5c524ba5d83cd1c363b025a288cf", "score": "0.5974536", "text": "function draw({ key }) {\n // increment the hue\n hue += 1;\n console.log(hue);\n ctx.strokeStyle = `hsl(${Math.random() * 360}, 100%, 50%)`;\n console.log(key);\n // start the path\n ctx.beginPath();\n ctx.moveTo(x, y);\n // move our x and y values depending on what the user did\n switch (key) {\n case 'ArrowUp':\n y -= MOVE_AMOUNT;\n break;\n case 'ArrowRight':\n x += MOVE_AMOUNT;\n break;\n case 'ArrowDown':\n y += MOVE_AMOUNT;\n break;\n case 'ArrowLeft':\n x -= MOVE_AMOUNT;\n break;\n default:\n break;\n }\n ctx.lineTo(x, y);\n ctx.stroke();\n}", "title": "" }, { "docid": "403a36290fa3ccd3a4332c0a8e3321bd", "score": "0.5961451", "text": "function keyPressed() {\n\n\tif (key == 's'|| key == 'S') saveCanvas(gd.timestamp() + '_MouseX' + mouseX + '_MouseY' + mouseY, 'png');\n\n}", "title": "" }, { "docid": "a2969b1d9a49bf6dbdd2d411c1a24fa6", "score": "0.59474295", "text": "function keyPressed() {\n\n if (key === 'd') {\n posW += 100;\n }\n else if (key ===\"a\") {\n posW -= 100;\n }\n else if (key ==='s'){\n posX += 100;\n }\n else if (key ==='w'){\n posX -= 100;\n }\n\n //move the blue circle\n else if (key === 'l') {\n \t\tposY += 100;\n }\n else if (key ===\"j\") {\n posY -= 100;\n }\n else if (key ==='k'){\n posZ += 100;\n }\n else if (key ==='i'){\n posZ -= 100;\n }\n\n}", "title": "" }, { "docid": "9324544b091019284a33ff94f1fc74ed", "score": "0.5926809", "text": "function mousePressed() {\n if (mouseInCanvas()) {\n if (DRAW_MODE === 'haystack-mode') {\n threadLine.drawing = true;\n threadLine.x_pos = mouseX;\n threadLine.y_pos = mouseY;\n }\n else if (DRAW_MODE === 'flowy-mode') {\n flowField.drawing = true;\n // place the particles close to the mouse position\n for (let i = 0; i < numParticles; i++) {\n let px = mouseX + random(-1 * PARTICLE_RADIUS, PARTICLE_RADIUS);\n let py = mouseY + random(-1 * PARTICLE_RADIUS, PARTICLE_RADIUS);\n particles[i] = new Particle(px, py);\n }\n }\n }\n}", "title": "" }, { "docid": "e8326d94ab13df0ab1bc9f417455660b", "score": "0.5925686", "text": "function setup() {\n createCanvas(700, 500);\n donuts.x = random(0, width);\n donuts.y = random(0, height);\n donuts.tx = random(0,1000);\n donuts.ty = random(0,1000);\n noCursor();\n\n}", "title": "" }, { "docid": "9bffc0295303690af7768ffcb7459803", "score": "0.59213877", "text": "function draw() {\n drawKeyPoints();\n}", "title": "" }, { "docid": "ec283c2bc5635403d075a0508d951856", "score": "0.5917544", "text": "function draw() {\n background(0,0,255);\n fill(0,165,83);\n ellipse(250,250,403,403);\n fill(61,15,30);\n ellipse(100,550,100,100);\n fill(255,255,255);\n rect(600,200,200,200);\n fill(61,15,30);\n rect(200,650,300,300);\n//We alternated between the driving and typing. This was a duel project between Oumou and Zahra\n \n \n}", "title": "" }, { "docid": "f9dca5cbbb54bf3cc3f5622b9031d975", "score": "0.59142566", "text": "function dreyChase() {\n frameRate(30);\n colorMode(HSB);\n var x = mouseP[mouseIndex].x;\n var y = mouseP[mouseIndex].y;\n stroke(0);\n background(x%255, y%255, y%255);\n fill(255);\n triangle(width/2, 175, 195, height/2 +70, width/2 +101, height/2 +70);\n ellipse(width/2, height/2, 100, 50);\n fill(x%255, 255, 255);\n ellipse(width/2, height/2, 40);\n fill(0);\n ellipse(x/80+ (width/2), y/80+(height/2), 20);\n fill(255);\n}", "title": "" }, { "docid": "10b6d5e59eada92fe6b693cce1c9d8b3", "score": "0.58841056", "text": "function keyDownHandler(event) {\r\n\r\n //Adding snow\r\n if (event.code == \"KeyA\") {\r\n //Random values\r\n let xVal = Math.randomDec(0, cnv.width);\r\n let yVal = Math.randomDec(0, 0);\r\n let rVal = Math.randomDec(5, 10);\r\n\r\n //Speed\r\n let speedVal = Math.randomDec(2, 5);\r\n\r\n //Setting values into array\r\n circleX.push(xVal);\r\n circleY.push(yVal);\r\n circleR.push(rVal);\r\n circleSpeed.push(speedVal);\r\n } else if (event.code == \"KeyD\") {\r\n //Setting values into array\r\n circleX.pop();\r\n circleY.pop();\r\n circleR.pop();\r\n }\r\n fillCircle(circleX, circleY, circleR);\r\n}", "title": "" }, { "docid": "1ae5cfdbf9fffaefa864cf0f1c72c2d0", "score": "0.5872301", "text": "function mousePressed() {\n initSetup();\n initDraw();\n}", "title": "" }, { "docid": "5cf6edce8c66d1cf5396896d7d439f52", "score": "0.58663744", "text": "function draw(){\n if(randomFlag)\n {\n background(currentImg);\n randomFlag = false;\n }\n \n strokeWeight(currentRadius);\n stroke(currentColor);\n if(mouseIsPressed){\n fill(currentColor);\n line(mouseX,mouseY,pmouseX,pmouseY) \n }\n}", "title": "" }, { "docid": "d742e6cc79df27a54ee268ce4ff2eb1f", "score": "0.58518606", "text": "function mousePressed() {\n\tconsole.log(height - 80);\n\tif (\n\t\t!(\n\t\t\t(mouseX > width / 2 - 200 || mouseX < width / 2 + 200) &&\n\t\t\tmouseY > height - 100\n\t\t)\n\t) {\n\t\tdrawingOffset = 0;\n\t\tisRunning = false;\n\t\tinput = [createVector(mouseX - width / 2, mouseY - height / 2)];\n\t\tisDrawing = true;\n\t}\n}", "title": "" }, { "docid": "40e2f989216610a4c3059689c01c31dd", "score": "0.58420366", "text": "function newPosition(){\n let newPos_width = Math.random() * screenWidth;\n let newPos_height = Math.random() * screenHeight;\n\n ghost.style.left = newPos_width;\n ghost.style.top = newPos_height;\n\n}", "title": "" }, { "docid": "4b87403d5255d4113c08f1fe3a7533ed", "score": "0.58399767", "text": "function keyPressed() {\n // shows which was typed\n //print(key);\n print(keyCode);\n\n // main page [m]\n if( drawFunction === drawMainpage ) {\n if( key === 'b' ) {\n drawFunction = drawBeginner;\n }\n } \n\n // beginner page [b] \n else if( drawFunction === drawBeginner ) {\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n if( key === 'u' ) {\n drawFunction = drawCactus;\n }\n if( key === 'p' ) {\n drawFunction = drawPothos;\n }\n if( key === 'm' ) {\n drawFunction = drawMainpage;\n }\n }\n\n // cactus [c] \n else if( drawFunction === drawCactus ) {\n\n if( key === 'e' ) {\n drawFunction = drawMister;\n }\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n else if( key === 'b' ) {\n drawFunction = drawBeginner;\n }\n\n }\n\n // pothos [p] \n else if( drawFunction === drawPothos ) {\n\n if( key === 'w' ) {\n drawFunction = drawMacrame;\n }\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n else if( key === 'b' ) {\n drawFunction = drawBeginner;\n }\n }\n\n // intermediate [i]\n else if( drawFunction === drawIntermediate ) {\n\n if( key === 'l' ) {\n drawFunction = drawMonstera;\n }\n if( key === 'a' ) {\n drawFunction = drawAdvanced;\n }\n if( key === 'c' ) {\n drawFunction = drawAfricanmask;\n }\n if( key === 'b' ) {\n drawFunction = drawBeginner;\n }\n else if( key === 'm' ) {\n drawFunction = drawMainpage;\n }\n }\n\n // monstera [l] \n else if( drawFunction === drawMonstera ) {\n\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n if( key === 'h' ) {\n drawFunction = drawHumidifier;\n }\n else if( key === 'a' ) {\n drawFunction = drawAdvanced;\n }\n }\n\n // African mask [l] \n else if( drawFunction === drawAfricanmask ) {\n\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n if( key === 'q' ) {\n drawFunction = drawPerlite;\n }\n else if( key === 'a' ) {\n drawFunction = drawAdvanced;\n }\n }\n\n // advanced [a]\n else if( drawFunction === drawAdvanced ) {\n\n if( key === 't' ) {\n drawFunction = drawCalathea;\n }\n if( key === 'f' ) {\n drawFunction = drawFiddle;\n }\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n else if( key === 'm' ) {\n drawFunction = drawMainpage;\n }\n }\n\n // Calathea [t] \n else if( drawFunction === drawCalathea ) {\n\n if( key === 'a' ) {\n drawFunction = drawAdvanced;\n }\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n else if( key === 'e' ) {\n drawFunction = drawMister;\n }\n }\n\n // Fiddle [f] \n else if( drawFunction === drawFiddle ) {\n\n if( key === 'a' ) {\n drawFunction = drawAdvanced;\n }\n if( key === 'i' ) {\n drawFunction = drawIntermediate;\n }\n else if( key === 'h' ) {\n drawFunction = drawHumidifier;\n }\n }\n\n // mister [t]\n else if( drawFunction === drawMister ) {\n if( key === 'u' ) {\n drawFunction = drawCactus;\n }\n else if( key === 't' ) {\n drawFunction = drawCalathea;\n }\n }\n\n // macrame[w]\n else if( drawFunction === drawMacrame ) {\n if( key === 'p' ) {\n drawFunction = drawPothos;\n }\n else if( key === 't' ) {\n drawFunction = drawCalathea;\n }\n }\n\n // humidifier [h]\n else if( drawFunction === drawHumidifier ) {\n if( key === 'f' ) {\n drawFunction = drawFiddle;\n }\n if( key === 'l' ) {\n drawFunction = drawMonstera;\n }\n }\n\n // perlite [q]\n else if( drawFunction === drawPerlite ) {\n if( key === 'c' ) {\n drawFunction = drawAfricanmask;\n }\n }\n\n}", "title": "" }, { "docid": "f4c4fcd93fe6f2e37d5def6a918be5a7", "score": "0.58350724", "text": "function displayKey() {\n push();\n fill(255);\n rect(key.x, key.y, key.w, key.h);\n pop();\n}", "title": "" }, { "docid": "5b72ac161aca50fb94db7954ef544bc7", "score": "0.58273613", "text": "function keyPressed() {\n if(key=='s' || key=='S') saveCanvas(gd.timestamp() + '_MouseX:' + mouseX + '_MouseY:' + mouseY,'png');\n}", "title": "" }, { "docid": "977e3325dae29ce92aea5c1ac9936b77", "score": "0.5817238", "text": "function randomXY()\r\n{\r\n\r\n\t// var bodyWidth = document.body.clientWidth-150;\r\n\t// var bodyHeight = document.body.clientHeight-150;\r\n\tlet bodyWidth = document.getElementById(\"graphContainer\").offsetWidth-120;\r\n\tlet bodyHeight =document.getElementById(\"graphContainer\").offsetHeight-120;\r\n\trandPosX =Math.floor(Math.random()*bodyWidth);\r\n\trandPosY =Math.floor(Math.random()*bodyHeight);\r\n}", "title": "" }, { "docid": "b241b3d1cd59c41d59a8c762cd050ea3", "score": "0.5798711", "text": "function keyPressed() {\n if (key=='s' || key=='S') saveCanvas(gd.timestamp() + '_MouseX_' + mouseX + '_MouseY_' + mouseY, 'png');\n}", "title": "" }, { "docid": "e62fa1dec929a43df2d7ab86fb267c7a", "score": "0.5793006", "text": "function drawKeyPoint()\n{\n\tcontext.save();\n\tfor(var i=0;i<arrayX.length;i++)\n\t{\n\t\tball.left = arrayX[i]-3;\n\t\tball.top = arrayY[i]-3;\n\t\tball.width=6;\n\t\tball.paint(context);\n\t}\n}", "title": "" }, { "docid": "13f242b59b0f995f725a5b9ed00c9deb", "score": "0.57843053", "text": "function keyPressed() {\n\tif (keyCode == 13) {\n\t\tsceneCount++;\n background(0);\n\t\tx = 20;\n y = 30;\n length = 1;\n Stroke = 0.5;\n Slant = 1;\n b = 220;\n\t}if (keyCode == 16) {\n sceneCount--;\n background(0);\n x = 20;\n y = 30;\n length = 1;\n Stroke = 0.5;\n Slant = 1;\n b = 220;\n } if (sceneCount < 0) {\n sceneCount = 0;\n } if (sceneCount > 4) {\n sceneCount = 4;\n }\n}", "title": "" }, { "docid": "1624fe8289623965034d48b70005cdd8", "score": "0.57664055", "text": "function mousePressed() {\n let d = dist(mouseX, mouseY,800, 600);\n if (d > 100) {\n let rndArray = (int)(Math.random() * 4);\n circleDefault = colorsArray[rndArray];\n }\n if (d > 100) {\n let rndArray = (int)(Math.random() * 4);\n rectDefault = colorsArray[rndArray];\n }\n}", "title": "" }, { "docid": "475b0fe6390d81fac5478c56c55c04e7", "score": "0.57624125", "text": "function draw() {\n background('#68c0fc');\n buildings();\n sky();\n hair();\n body();\n face();\n dress();\n sign();\n\n // Call to interactive functions\n if (mouseIsPressed) {\n changeElems();\n moveMe(mouseX);\n } else if (keyIsPressed) {\n resetElems();\n }\n}", "title": "" }, { "docid": "cccbdb6915b726a7759f05b9d2895df6", "score": "0.57609314", "text": "function draw() {\n \tvar randomRed = random(0,255);\n\tvar randomGreen = random(0,255);\n\tvar randomBlue = random(0,255);\n\tvar newColor = color(randomRed, randomGreen, randomRed)\n \tfill(randomRed,randomGreen,randomBlue);\n\tstroke (randomRed,randomGreen,randomBlue);\n\trect(mouseX, mouseY, 65, 86, 129);\n\tfill(253,51,70);\n\tstroke(253,51,70);\n\t{if (mouseIsPressed)\n\t\tellipse(45,760,30,60); \n\n\telse\n\t\trect(343,45,45,505);\n}\n\n\n\n \n\n}", "title": "" }, { "docid": "845588fefff7fbe40e61c265595af320", "score": "0.57599556", "text": "function mousePressed() {\n let d = dist(mouseX, mouseY, 50, 50);\n if (d < 20) {\n r = random(255);\n g = random(255);\n b = random(255);\n }\n}", "title": "" }, { "docid": "c294f7df7d54cfc11cc7eb954648b5c8", "score": "0.5759221", "text": "function mousePressed() { \n // Check if mouse is inside the circle\n let d = dist(mouseX, mouseY, 360, 200);\n if (d < 100) {\n timerHasStarted = true;\n winTime = millis() + 5000;\n // Pick new random color values\n r = 255;\n g = 255;\n b = 255;\n indexText += 1;\n indexText = indexText % words.length;\n } else {\n alert('you miss clicking the circle hahaha');\n }\n}", "title": "" }, { "docid": "58504290c697ce56000d83ee095fe072", "score": "0.57563704", "text": "function onMouseMove(e) {\r hasStopped = false;\r hasChanged = true; //set this true\r x = e.pageX;\r y = e.pageY;\r \r\tif(cursor!==null){//if cursor element with gif image was been appended\r\t\t//show this\r\t\tcursor.style.transition = \"\";\r\t\tcursor.style.display = \"block\";\r\t\t\r\t\t//near mouse cursor\r\t\t//cursor.style.left = x + 0 + \"px\"; //align pixels right from cursor\r\t\t//cursor.style.top = y + 20 + \"px\"; //and bottom after cursor\r\t\r\t\t//or randomize cursor coordinates, using window.Crypto.getRandomValues(bytearray);\r\t\tcursor.style.left = x + getRandomInt_window_crypto(0, 50) + \"px\";\t\t//using random values in square 50x50\r\t\tcursor.style.top = y + getRandomInt_window_crypto(0, 50)+20 + \"px\";\t\t//using random values\r\t}\r\t\r\tif(partial_seed!==null){\r\t\tupdate_partial_seed_in_div();\t//show partial seed in div.\r\t}\r\t\r onMouseStop();\t//wait to timer to hide cursor and reseed ISAAC CPRNG, and update canvas.\r}", "title": "" }, { "docid": "94b3ece2ccf1bbf9b91247ee7aaad914", "score": "0.5744192", "text": "function keyTyped() {\n //Type c to finish drawing your shape\n if(key==='c' && x1 && x2 && y1 && y2){\n\n //remove the two points from the map -canvas-\n tables.pop()\n tables.pop()\n\n if(shape=='rect'){\n inc++\n var rectt = {}\n rectt[\"x1\"]=x1\n rectt[\"y1\"]=y1\n rectt[\"x2\"]=x2\n rectt[\"y2\"]=y2\n rectt[\"stroke color\"]=\"brown\"\n rectt[\"fill color\"]=\"white\"\n rectt[\"shape\"]=\"rect\"\n rectt[\"title\"]=\"rect \"+inc\n tables.push(rectt)\n\n var l=tables.length\n var panel = QuickSettings.create(windowWidth-210, 0, tables[l-1][\"title\"])\n .addRange(\"x1\", 0, windowWidth , x1, 1, function(value) { tables[l-1][\"x1\"] = value})\n .addRange(\"y1\", 0, windowHeight , y1, 1, function(value) { tables[l-1][\"y1\"] = value})\n .addRange(\"x2\", 0, windowWidth , x2, 1, function(value) { tables[l-1][\"x2\"] = value})\n .addRange(\"y2\", 0, windowHeight , y2, 1, function(value) { tables[l-1][\"y2\"] = value})\n .addColor(\"stroke color\", \"brown\",function(color) { tables[l-1][\"stroke color\"] = color})\n .addColor(\"fill color\",\"white\",function(color) { tables[l-1][\"fill color\"] = color})\n .addButton(\"Remove\", function(value) { master.removeControl(tables[l-1][\"title\"]); tables[l-1][\"shape\"]=\"\"; panel.destroy(); })\n .hide()\n\n panel.show();\n master.addBoolean(\"rect \"+inc, true, function(value) {\n if(value) {\n panel.show();\n }\n else {\n panel.hide();\n }\n });\n }\n if(shape=='line'){\n inc++\n var linee = {}\n linee[\"x1\"]=x1\n linee[\"y1\"]=y1\n linee[\"x2\"]=x2\n linee[\"y2\"]=y2\n linee[\"width\"]=2\n linee[\"color\"]=\"black\"\n linee[\"shape\"]=\"line\"\n linee[\"title\"]=\"line \"+inc\n tables.push(linee)\n\n var l=tables.length\n var panel = QuickSettings.create(windowWidth-210, 0, tables[l-1][\"title\"])\n .addRange(\"x1\", 0, windowWidth , x1, 1, function(value) { tables[l-1][\"x1\"] = value})\n .addRange(\"y1\", 0, windowHeight , y1, 1, function(value) { tables[l-1][\"y1\"] = value})\n .addRange(\"x2\", 0, windowWidth , x2, 1, function(value) { tables[l-1][\"x2\"] = value})\n .addRange(\"y2\", 0, windowHeight , y2, 1, function(value) { tables[l-1][\"y2\"] = value})\n .addRange(\"width\", 0, 100, 2, 1, function(value) { tables[l-1][\"width\"] = value})\n .addColor(\"color\", \"black\",function(color) { tables[l-1][\"color\"] = color})\n .addButton(\"Remove\", function(value) { master.removeControl(tables[l-1][\"title\"]); tables[l-1][\"shape\"]=\"\"; panel.destroy(); })\n .hide()\n\n panel.show();\n master.addBoolean(\"line \"+inc, true, function(value) {\n if(value) {\n panel.show();\n }\n else {\n panel.hide();\n }\n });\n }\n x1=0,y1=0,x2=0,y2=0;\n shape='';\n }\n}", "title": "" }, { "docid": "0da7caa2e8375abea2a8829fbba7964d", "score": "0.5741911", "text": "function drawcelestial(event) {\n\n let celestial = document.createElement(\"div\");\n let randomNum = Math.random();\n //potential image array for it randomNum < .77\n let spaceImages = [\"comet\", \"comet-1\", \"europa\", \"jupiter\", \"mars\", \"mercury\", \"milky-way\", \"meteorite\", \"saturn\", \"uranus\", \"neptune\"];\n\n if (randomNum <= .75)\n //sets to random index number between 0 an 10\n celestial.style.backgroundImage = `url(./assets/images/${spaceImages[Math.floor(Math.random()*spaceImages.length)]}.svg)`;\n else if (randomNum > .75 && randomNum < .98)\n celestial.style.backgroundImage = \"url(./assets/images/sun.svg)\";\n else\n celestial.style.backgroundImage = \"url(./assets/images/planet-earth-1.svg)\";\n\n celestial.style.position = \"absolute\";\n //responsive sizing for varying viewport sizes\n window.innerWidth > 700 ? celestial.style.height = `${Math.random() * 6}vw`: celestial.style.height = `${Math.random() * 12.5}vw`;\n celestial.style.width = celestial.style.height;\n //sets to place coordinates clicked\n celestial.style.left = `${event.pageX}px`;\n celestial.style.top = `${event.pageY}px`;\n document.body.appendChild(celestial);\n}", "title": "" }, { "docid": "a641515ddf381a671a6448d03419b5db", "score": "0.5729836", "text": "function mousePressed(){\n let s = map(mouseX, 0, width, 0.01, 0.1)\n initField(s)\n}", "title": "" }, { "docid": "a79925d1990186bfa850910de8097059", "score": "0.5729716", "text": "function drawMonkey(monkey, time) {\n\n\n let x = tanPos(monkey.period.x, time/4);\n let y = tanPos(monkey.period.x, time/4);\n\n// defining where the monkeys are going to the upper left corner of the page and how fast\n let pos_x = x * monkey.maxDist.x / monkey.pos.x;\n let pos_y = x * monkey.maxDist.y / monkey.pos.y;\n\n\nmonkeyCartoon(\npos_x, pos_y, x / monkey.maxSize, y / monkey.maxSize);\n}", "title": "" }, { "docid": "83d85b9de4ef66dc51591f1c1dbde56b", "score": "0.57258797", "text": "function bossGoToKey() {\n\twhile (rnd == lastRnd) {\n\t\trnd = Math.floor(Math.random() * (4 - 1 + 1) + 1);\n\t}\n\tlastRnd = rnd;\n\tswitch (rnd) {\n\t\tcase 1:\n\t\t\tboss.style.transform = \"translateX(-250px) translateY(300px)\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tboss.style.transform = \"translateX(-85px) translateY(300px)\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tboss.style.transform = \"translateX(80px) translateY(300px)\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tboss.style.transform = \"translateX(240px) translateY(300px)\";\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "7093958e536347089205b6c818173699", "score": "0.57146114", "text": "function setup(){\n createCanvas(width, height);\n // key = new Key(20, 20);\n keyboard = new Keyboard();\n\n}", "title": "" }, { "docid": "ab6141565681682aa42b511316d06bab", "score": "0.5710301", "text": "function drawStartScreen() {\n push();\n fill(100, 100, 100, 255);\n translate(width / 2, height / 2);\n textSize(64);\n textAlign(CENTER, CENTER);\n text(\"Press any key to start\", 0, 0);\n pop();\n}", "title": "" }, { "docid": "f8808d2aa871b216b2a9c826ef997024", "score": "0.5709273", "text": "function draw({ key }) {\n // INCREMENT THE HUE\n hue += 10;\n ctx.strokeStyle = `hsl(${hue}, 100%, 50%)`;\n console.log(key);\n ctx.beginPath();\n ctx.moveTo(x, y);\n // MOVE OUR X AND Y VALUES DEPENDING ON WHAT THE USER DID\n switch (key) {\n case 'ArrowUp':\n y -= MOVE_AMOUNT;\n break;\n case 'ArrowRight':\n x += MOVE_AMOUNT;\n break;\n case 'ArrowDown':\n y += MOVE_AMOUNT;\n break;\n case 'ArrowLeft':\n x -= MOVE_AMOUNT;\n break;\n default:\n break;\n }\n ctx.lineTo(x, y);\n ctx.stroke();\n}", "title": "" }, { "docid": "979c5e6c1301500cd4cd5c2cf4d78828", "score": "0.57078826", "text": "display() {\n push();\n translate(this.pX, this.pY);\n scale(random(0.85, 1.15));\n noStroke();\n fill(255);\n quad(0, 10, 1, 0, 0, -10, -1, 0);\n quad(0, 1, 10, 0, 0, -1, -10, 0);\n pop();\n }", "title": "" }, { "docid": "509c0bfffa3e9b91d5c9a2f094604c5f", "score": "0.5695942", "text": "function setupKeyEvents() {\n // Registers how much to scroll to the right/left.\n $(\"body\").keydown(function(e) {\n if(e.keyCode == 39)\n vertIndent += 20;\n else if(e.keyCode == 37)\n vertIndent -= 20;\n else\n return;\n \n if (vertIndent < 0) vertIndent = 0;\n if (vertIndent > graphWidth-width) vertIndent = graphWidth-width;\n\n svg.attr(\"transform\",\n \"scale(0.9, 0.9), \" +\n \"translate(\" + (((0.1*width)/2) - vertIndent) + \",\" + (0.1*height)/2 + \")\");\n });\n }", "title": "" }, { "docid": "a9959620f6a37bbe92dfe682fd51f315", "score": "0.56813484", "text": "function handleMouse() {\n\n sword.swing(ctrack.x, ctrack.y);\n // sword.swing(mouseX, mouseY);\n\n if (frameCount % 2 === 0) { // update half the time\n\n sword.update();\n }\n\n sword.draw();\n}", "title": "" }, { "docid": "1ba496e470bfa9ce21594a4d224c17d9", "score": "0.5664634", "text": "function init() {\n\n\trandom();\n\tdraw();\n\n // on each key press random draw check function\n\twindow.addEventListener('keydown', function(event) {\n\t\tswitch (event.keyCode) {\n\t\t\tcase 37: // Left\n\t\t\t\tleft();\n\t\t\t\trand_draw_check();\n\t\t\t\tbreak;\n\t\t\tcase 38: // Up\n\t\t\t\tup();\n\t\t\t\trand_draw_check();\n\t\t\t\tbreak;\n\t\t\tcase 39: // Right\n\t\t\t\tright();\n\t\t\t\trand_draw_check();\n\t\t\t\tbreak;\n\t\t\tcase 40: // Down\n\t\t\t\tdown();\n\t\t\t\trand_draw_check();\n\t\t\t\tbreak;\n\t\t}\n\t}, false);\n}", "title": "" }, { "docid": "3121af8253f2531634ec00f853a583b4", "score": "0.566237", "text": "function keyPressed() {\r\n if (key === 'd') { //move the red circle to the right\r\n posW += 200;\r\n }\r\n else if (key ==='a') { //move the red circle to the left\r\n posW -= 200;\r\n }\r\n else if (key ==='s'){ //move the red circle down\r\n posX += 200;\r\n }\r\n else if (key ==='w'){ //move the red circle up\r\n posX -= 200;\r\n }\r\n \r\n\r\n\r\n //move the blue circle\r\n if (keyCode === RIGHT_ARROW) { //move the blue circle to the right\r\n posY += 8;\r\n }\r\n else if (keyCode === LEFT_ARROW) { //move the blue circle to the left\r\n posY -= 8;\r\n }\r\n else if (keyCode === DOWN_ARROW){ //move the blue circle down\r\n posZ += 8;\r\n }\r\n else if (keyCode === UP_ARROW){ //move the blue circle up\r\n posZ -= 8;\r\n }\r\n}", "title": "" }, { "docid": "9d9952c92a9575e88b591c524f3eea72", "score": "0.5660383", "text": "function setup() {\n createCanvas (windowWidth, windowHeight);\n frameRate (3);\n textSize (70);\n textFont (\"Futura\");\n text ('Sunday', 600, 600);\n \n//for (var i = 0; i > 10; i++){\n //background (140);\n xPos = random(width);\n yPos = random(height);\n d: random (6, 40);\n\n\n}", "title": "" }, { "docid": "e078eaf0663139b799e17571e7b4006a", "score": "0.5659879", "text": "function setup() {\n bgColor = color(21, 218, 153);\n createCanvas(windowWidth, 600);\n background(bgColor);\n\n//create starting position\n pos1x = random(width);\n pos1y = random(height);\n pos2x = pos1x + 4;\n pos2y = pos1y - 4;\n}", "title": "" }, { "docid": "4c53efd086bb7aacae27687d5fe9a57c", "score": "0.56556046", "text": "function drawByKey(e) {\n var color = \"blue\";\n var mov = 1;\n // Pinta lineas verticales, aca utilice un if, me acamoda mas que el switch =)\n if(pressedUp && pressedRight){\n // diagonal derecha arriba\n draw(color, x, y, x+mov, y-mov, papel);\n x = x + mov;\n y = y - mov;\n } else if(pressedRight && pressedDown){\n // diagonal derecha abajo\n draw(color, x, y, x+mov, y+mov, papel);\n x = x + mov;\n y = y + mov;\n } else if(pressedDown && pressedLeft){\n // diagonal izquierda abajo\n draw(color, x, y, x-mov, y+mov, papel);\n x = x - mov;\n y = y + mov;\n } else if(pressedLeft && pressedUp){\n // diagonal izquierda arriba\n draw(color, x, y, x-mov, y-mov, papel);\n x = x - mov;\n y = y - mov;\n } \n\n // Pinta linea horizontales y verticales\n switch (e.keyCode) {\n case teclas.UP:\n draw(color, x, y, x, y-mov, papel);\n y = y - mov;\n break;\n case teclas.RIGHT:\n draw(color, x, y, x+mov, y, papel);\n x = x + mov;\n break;\n case teclas.DOWN:\n draw(color, x, y, x, y+mov, papel);\n y = y + mov;\n break;\n case teclas.LEFT:\n draw(color, x, y, x-mov, y, papel);\n x = x-mov;\n break;\n }\n}", "title": "" }, { "docid": "ef5d4b1687a0e78afbaadb6424c181ee", "score": "0.5648865", "text": "function mousePressed() {\n randomBgColor();\n}", "title": "" }, { "docid": "a0a06c3e7bf10eddb0a29277bca9bb89", "score": "0.56445456", "text": "function keyPressed(){\n\n if(keyCode == 32 && (bird.body.speed<1||bird.body.speed>=26)){\n\n bird.trajectory = [];\n slingshot.attach(bird.body);\n gameState = \"ready\";\n Matter.Body.setPosition(bird.body,{x:200,y:50});\n \n \n }\n}", "title": "" }, { "docid": "0891b2d7e53fd694941435061eb7f785", "score": "0.56414616", "text": "function keyPressed () {\n if (window.key === ',' || window.key === '<') {\n idx++\n if (idx >= dfMapData.numLayers) { idx = dfMapData.numLayers - 1 }\n }\n if (window.key === '.' || window.key === '>') {\n idx--\n if (idx < 0) { idx = 0 }\n }\n\n let modifier = 1\n\n if (window.keyIsDown(90)) { // 'z'\n modifier = 10\n }\n\n if (window.keyIsDown(102)) { // number 6\n imageX -= dfMapData.tileWidth * scale * modifier\n }\n if (window.keyIsDown(100)) { // number 4\n imageX += dfMapData.tileWidth * scale * modifier\n }\n if (window.keyIsDown(98)) { // number 2\n imageY -= dfMapData.tileHeight * scale * modifier\n }\n if (window.keyIsDown(104)) { // number 8\n imageY += dfMapData.tileHeight * scale * modifier\n }\n}", "title": "" }, { "docid": "c584f620088b553ef10062a13768f99f", "score": "0.5641251", "text": "function OnMouseDown() {\n\tmousePos = Input.mousePosition;\n}", "title": "" }, { "docid": "ffbf34971e6cefe2914ebc82bd4261a2", "score": "0.5638184", "text": "function draw() {\n background(felt);\n textSize(200);\n fill(0);\n text(currentSyllable, width / 3 + 75, height / 3);\n\n //LIST OF KEYBOARD COMMANDS\n textSize(20);\n text(\"Play Online with Keyboard Commands:\", 10, 20);\n text(\"Vowels\", 10, 60);\n text(\"Key 1: Front of mouth\", 10, 80);\n text(\"Key 2: Middle of mouth\", 10, 100);\n text(\"Key 3: Back of mouth\", 10, 120);\n text(\"Consonants\", 10, 160);\n text(\"Key 4 or 5: Teeth\", 10, 180);\n text(\"Key 6: Tip of Tongue\", 10, 200);\n text(\"Key 7: Middle of Tongue\", 10, 220);\n text(\"Key 8: Back of Tongue\", 10, 240);\n text(\"Key 9: Closed lips\", 10, 260);\n\n\n\n\n\n\n\n //SET UP TEXT, BUTTONS, INPUTS ON SCREEN\n //TITLE\n fill(0);\n textAlign(width / 2, height / 2);\n textSize(60);\n text('Invent an Original Word', width / 3 - 125, 75);\n\n\n //CURRENT PHONEME\n //Found in draw()\n\n //PRINT OUT CURRENT WORD\n textSize(74);\n text('Current Word:', width / 3 - 350, height / 3 + 200);\n text(word, width / 3 + 300, height / 3 + 150);\n strokeWeight(10);\n line(width / 3 + 300, height / 4 * 2.3, 1400, height / 4 * 2.3);\n\n fill(0);\n textSize(30);\n text('Define your word:', definitionBox.x - 335, definitionBox.y + definitionBox.height - 8);\n definition = definitionBox.value();\n\n text('Spell your word:', spellingBox.x - 335, spellingBox.y + spellingBox.height - 8);\n spelling = spellingBox.value();\n\n text('Record your word:', width / 2 - 335, height / 3 + 350);\n\n fill(0);\n textSize(30);\n text('Your name:', nameBox.x - 335, nameBox.y + nameBox.height - 20);\n name = nameBox.value();\n\n}", "title": "" }, { "docid": "af89f1c5de396dc302433617dd932e4d", "score": "0.56308466", "text": "function mousePressed() {\n init();\n}", "title": "" }, { "docid": "af89f1c5de396dc302433617dd932e4d", "score": "0.56308466", "text": "function mousePressed() {\n init();\n}", "title": "" }, { "docid": "1c68f83ddb3c8fc079665f25ef566fab", "score": "0.56304485", "text": "function keyC() {\n rect(100, 75, 100, 350);\n if ((mouseX >= 100) && (mouseX < 200) && (mouseY >= 75) && (mouseY < 425) && mouseIsPressed) {\n fill(240);\n rect(100, 75, 100, 350);\n } else {\n fill(255);\n rect(100, 75, 100, 350);\n }\n}", "title": "" }, { "docid": "5db7b793a1cd2e50fb9028d5653a65cc", "score": "0.56296957", "text": "function pickRFCenter() {\n // pick an x y coordinate to center at\n x0 = Math.random() * can_vis.width;\n y0 = Math.random() * can_vis.height;\n while (Math.hypot(x0-can_vis.width/2, y0-can_vis.height/2)>(can_vis.width/2-50)) {\n x0 = Math.random() * can_vis.width;\n y0 = Math.random() * can_vis.height;\n }\n x0r = Math.floor(x0/pixReduction);\n y0r = Math.floor(y0/pixReduction);\n}", "title": "" }, { "docid": "695a7402e833e9e436acf93018bb717e", "score": "0.5620849", "text": "function draw() {\n // Clear the screen\n clear();\n background(255);\n\n // Drawing shapes (Can use fill, noFill, stroke, noStroke)\n ellipse(100, 200, 80, 80);\n rect(300, 250, 60, 60);\n rect(400, 250, 60, 80);\n\n // Event based drawing (Extra things that would be shown but not learnt.)\n ellipse(x, y, 60, 60);\n if (mouseIsPressed) {\n print(mouseX);\n print(mouseY);\n }\n if (keyIsPressed) {\n print(key);\n }\n if (keyIsDown(UP_ARROW)) {\n y -= 1;\n } else if (keyIsDown(DOWN_ARROW)) {\n y += 1;\n } else if (keyIsDown(RIGHT_ARROW)) {\n x += 1;\n } else if (keyIsDown(LEFT_ARROW)) {\n x -= 1;\n }\n}", "title": "" }, { "docid": "d3cd7bec524647e62a163c5b06e063ad", "score": "0.5620189", "text": "function mousedown() {\n nodes.forEach(function(o,i) {\n o.x += (Math.random() - .5) * 40;\n o.y += (Math.random() - .5) * 40;\n });\n force.resume();\n }", "title": "" }, { "docid": "12617f7566322ef6197c6c176fef23dc", "score": "0.56199175", "text": "newApple() {\n this.x = Math.floor((Math.random() * (w - 25) + 20) / 20) * 20;\n this.y = Math.floor((Math.random() * (h - 25) + 20) / 20) * 20;\n this.draw();\n }", "title": "" }, { "docid": "c4d7aca173cadc37b22e90d52d4880be", "score": "0.56193364", "text": "function draw(){\n orbitControl();\n normalMaterial();\n \n gray = 125 + (125*sin(b));\n b=b+.03;\n\n if(keyIsPressed==true){\n background(250);\n if (a==1) {\n DrawWho();\n } else if (a==2) {\n DrawAre();\n } else if (a==3) {\n DrawYou();\n }\n } else {\n background(gray);\n DrawChaos();\n }\n}", "title": "" }, { "docid": "4f5656d78e772af37bfbcca8cf5345bd", "score": "0.561776", "text": "function draw() {\n background(248,244,249);\n noStroke()\n \n ellipse(400, 400, mouseX, mouseY)\n\n // follow the mouse\n fill(255)\n circle(mouseX, mouseY, 60)\n fill(46,64,82)\n circle(mouseX, mouseY, 50)\n \n \n}", "title": "" }, { "docid": "2ee216984978a7aae0bda92192e4ac43", "score": "0.5614579", "text": "mouseMove(pos){}", "title": "" }, { "docid": "0e95c936e6038cd54252feb27cafe0a3", "score": "0.5613258", "text": "startGame() {\n\t\tconst currentPhrase = this.getRandomPhrase();\n\t\tcurrentPhrase.addPhraseToDisplay();\n\n\t\tdocument.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n });\n\t}", "title": "" }, { "docid": "d5d664115082eb15dc32c4b7215d92f8", "score": "0.5608171", "text": "function keyPressed() {\n switch (keyCode) {\n case 74: // l\n case 37: //left key\n if (direction !== 'right') {\n direction = 'left';\n }\n break;\n case 76: //j\n case 39: //right key\n if (direction !== 'left') {\n direction = 'right';\n }\n break;\n case 73: // i\n case 38: // up key\n if (direction !== 'down') {\n direction = 'up';\n }\n break;\n case 75: // k\n case 40: // down key\n if (direction !== 'up') {\n direction = 'down';\n }\n break;\n case 87: // W - controls whatShape\n whatShape++;\n if ( !( whatShape < SHAPE_COUNT ) ) {\n whatShape = 0;\n }\n break;\n case 81: // Q - controls shapeDirection\n shapeDirection++;\n if ( !( shapeDirection < MOVE_PATTERN_COUNT ) ) {\n shapeDirection = 0;\n }\n break;\n case 80: // p - for pause\n noLoop();\n break;\n case 79: // o - because it's next to 'p'\n loop();\n break;\n case 83:\n saveCanvas('snakeDrawingMachine', 'jpg' );\n break;\n }\n}", "title": "" }, { "docid": "70c786d94d99432fa103dd559ffb6dee", "score": "0.5605999", "text": "function setup() {\nmode = 0; // creates different modes for text menu\ncreateCanvas(windowWidth,windowHeight);\n //createSliders();\n //pg = createGraphics(windowWidth, windowHeight);\n}", "title": "" }, { "docid": "0089352c1c0b2e84724c036f09e7e98a", "score": "0.5603858", "text": "function mousePressed(){\n posX.push(mouseX);\n posY.push(mouseY);\n directionX.push(random(1,2));\n directionY.push(random(1,2));\n rot.push(random(-45,45));\n}", "title": "" }, { "docid": "ce0b66c816d0e42811958cc8cd5975e0", "score": "0.5600331", "text": "function keyPressed() {\n if (keyCode === ENTER){\n clearCanvas()\n } else if (keyCode === 84){\n triangle(mouseX, mouseY, mouseX + 50, mouseY + 50, mouseX - 50, mouseY + 50);\n } else if (keyCode === 67){\n ellipse(mouseX, mouseY, 50, 50)\n } else if (keyCode === 83){\n square(mouseX, mouseY, 50);\n }\n \n}", "title": "" }, { "docid": "5a7468d04f7fbba398284bf5626cbd24", "score": "0.55982184", "text": "function onclick() {\n // console.log(screen.height,screen.width);\n var x = event.clientX;\n var y = event.clientY;\n // console.log(x,y);\n look(x,y, screen.width, screen.height);\n}", "title": "" }, { "docid": "2d736d491379edb2af2962c1e7b1174d", "score": "0.5597278", "text": "function draw() {\nfill(0,255,0);\nellipse(mouseX,mouseY,flying,flying);\nfill(255,240,245);\nstroke(64,224,208);\ntextSize(50);\ntextFont(\"script\");\ntext(\"Aloha Beautiful\",500,600);\n }", "title": "" }, { "docid": "c6b649355ea1b79f32add36d4e8060ae", "score": "0.55948675", "text": "async _inject() {\n while (!unsafeWindow.input || !unsafeWindow.input.keyDown) await new Promise(r=>setTimeout(r,200));\n\n unsafeWindow.input._mouse = unsafeWindow.input.mouse;\n unsafeWindow.input.mouse = (x,y) => {\n this.trueView = [x,y];\n\n if (!unsafeWindow.input.should_prevent_unload()) this.autofire = this.shooting = false;\n\n if (unsafeWindow.input.should_prevent_unload() && !this.autofire && !this.shooting) {\n unsafeWindow.input._mouse(...RandomMouseModule.getRandomPos());\n } else unsafeWindow.input._mouse(x,y);\n }\n unsafeWindow.input._keyDown = unsafeWindow.input.keyDown;\n unsafeWindow.input.keyDown = (code) => {\n if (!unsafeWindow.input.should_prevent_unload()) return unsafeWindow.input._keyDown(code);\n\n if (code === 69) this.autofire = !this.autofire;\n if (code === 1 || code === 32) this.shooting = true;\n if (code === 1 || code === 32 || code === 69) {\n unsafeWindow.input._mouse(...this.trueView);\n }\n return unsafeWindow.input._keyDown(code);\n }\n unsafeWindow.input._keyUp = unsafeWindow.input.keyUp;\n unsafeWindow.input.keyUp = (code) => {\n if (!unsafeWindow.input.should_prevent_unload()) return unsafeWindow.input._keyUp(code);\n\n if (code === 1 || code === 32) this.shooting = false;\n if (code === 1 || code === 32 || code === 69) {\n unsafeWindow.input._mouse(...this.trueView);\n }\n return unsafeWindow.input._keyUp(code);\n }\n\n // just make it go auto\n setInterval(() => unsafeWindow.input.mouse(...this.trueView), 100)\n }", "title": "" }, { "docid": "2c6602fba739ac86398e2b0dc7ff8d67", "score": "0.55946696", "text": "function mousePressed() {\n textPlaceX = mouseX\n textPlaceY = mouseY\n}", "title": "" }, { "docid": "ba137c093fb5536ca5677f303ca18b4e", "score": "0.55929637", "text": "function mousePressed() {\n if (mouseY >= 180 && mouseY <= 220 && mouseX <= width / 2 + 225 && mouseX >= width / 2 - 225) {\n window.open(\"https://blacklivesmatter.com/\");\n }\n\n if (mouseY >= 240 && mouseY <= 280 && mouseX <= width / 2 + 225 && mouseX >= width / 2 - 225) {\n window.open(\"https://www.washingtonpost.com/nation/2020/06/08/understanding-racism-inequality-america/\");\n }\n\n if (mouseY >= 300 && mouseY <= 340 && mouseX <= width / 2 + 225 && mouseX >= width / 2 - 225) {\n window.open(\"https://www.racialequitytools.org/\");\n }\n\n if (mouseY >= 360 && mouseY <= 400 && mouseX <= width / 2 + 225 && mouseX >= width / 2 - 225) {\n window.open(\"https://www.plu.edu/faculty-resources/wp-content/uploads/sites/311/2017/12/resources-on-white-privilege.pdf\");\n }\n }", "title": "" }, { "docid": "925984a769a6342d27a0564c5fb5c89f", "score": "0.5590599", "text": "function startPainting(event){ \n paint = true; \n getPosition(event); \n }", "title": "" }, { "docid": "7088da5fcad9b9bb7e9f08a02aee5abd", "score": "0.55900806", "text": "display() {\n noStroke();\n //mouse interaction \n if(dist(mouseX,mouseY,this.xPos,this.yPos)<160){\n fill(random(255),random(255),random(255));\n }else{\n fill(random(165,170), random(180,190),random(230,240));\n }\n //draw the particle\n circle(this.xPos, this.yPos, this.diameter);\n \n }", "title": "" }, { "docid": "f45f5f2c4af4f6384070eb7e38f14c62", "score": "0.55885994", "text": "function setup() {\n createCanvas(window.innerWidth, window.innerHeight);\n background(150);\n\n xc = new XController();\n\n sp = new ScreenCenterPoint();\n\n\n // lbhourglass = new LineBarHourGlass(createVector(150, 210));\n\n // CreateDialogBox();\n\n var textbox = new SearchTextBox(createVector(255, 5), createVector(720, 50));\n textbox.onclick = function(evt) {\n console.log(evt);\n }\n textbox.onkeypressed = function(value) {\n console.log(value);\n }\n xc.add(textbox);\n\n\n}", "title": "" }, { "docid": "7e062b02c2b9a73700e2d6bff8ecdd55", "score": "0.55885065", "text": "onKeypress() {\n this.render();\n }", "title": "" }, { "docid": "7e062b02c2b9a73700e2d6bff8ecdd55", "score": "0.55885065", "text": "onKeypress() {\n this.render();\n }", "title": "" }, { "docid": "68a9609d1dd27b06a02a7776ac6c26b9", "score": "0.55812496", "text": "function draw() {\n background(120);\n normalMaterial();\n\n createBox(150, 150, 150, -100, -100, true);\n createTorus();\n createBox(50, 50, 50, 250, 50, false);\n if (keyIsPressed) {\n if (key == 'd') { // move the right\n x += 5;\n\n } else if (key == 'a') { // move to the left\n\n x -= 5;\n\n }\n }\n}", "title": "" } ]
b0ebb4584c53b107b8da3a0e2c27bff9
BTN ADD NEW STATION
[ { "docid": "4c7b22e59989d059525efa330cada8e5", "score": "0.0", "text": "function add_new_station(id, opt) {\n // check_get_have = 2;\n $('#check_get_have').val(0);\n $('#box_station_others').hide()\n\n $('#shop_station_field').show()\n func_shop_station_field(id, opt)\n\n}", "title": "" } ]
[ { "docid": "3e47718f4f56c59e447a157250b5e1ed", "score": "0.64377934", "text": "function createBtn() {\n var pastBtn = document.createElement(\"button\");\n pastBtn.classList.add(\"past-city\")\n pastBtn.innerHTML = location;\n document.body.appendChild(pastBtn);\n\n\n\n }", "title": "" }, { "docid": "63479bac2db646edf638ead889e50255", "score": "0.63751864", "text": "function newButton(){\r\n $(\"#addMission\").on(\"click\", function () {\r\n var mission = $(\"#mission-input\").val().trim();\r\n if (mission == \"\") {\r\n return false;\r\n }\r\n missions.push(mission);\r\n displayMissionBts();\r\n return false;\r\n });\r\n }", "title": "" }, { "docid": "1d2c1e5d78e3590438b5002cd7adafea", "score": "0.62517613", "text": "function createWordsToStudyButton(){\n\t\tlet studyWordsButton = createButton(\"Study these words\", \"#DE0000\", \"2px solid #555\");\n\t document.body.appendChild(studyWordsButton);\n\n\t //style\n\t studyWordsButton.style.display = \"none\";\n\t}", "title": "" }, { "docid": "c8fa12f626e14db6d3e02b9959fde9d2", "score": "0.622905", "text": "function addTaskButton() {\r\n\t// const clone = \r\n\taddTask({date:\"\",text:\"\"})\r\n\r\n\tconst xhr = new XMLHttpRequest();\r\n\txhr.onreadystatechange = () => {\r\n\t\tif (xhr.readyState === XMLHttpRequest.DONE && xhr.status !== 200)\r\n\t\t\tconsole.error(xhr.statusText);\r\n\t}\r\n\txhr.open(\"PUT\", PATH, true)\r\n\txhr.send(\"\")\r\n}", "title": "" }, { "docid": "cd18d14fa87bb75b5deef9747dfde5a5", "score": "0.6217425", "text": "function addButton() {\n const addBookBtn = functionButton();\n addBookBtn.innerHTML = \"Ajouter un livre\";\n addBookBtn.classList.add(\"btn\", \"btn--center\");\n addBookBtn.id = \"addBook\";\n insertElement(addBookBtn);\n addBookBtn.onclick = displayForm;\n}", "title": "" }, { "docid": "bc46b16c7c425019cc2273fcc680200b", "score": "0.61990803", "text": "function add() { \n\tcreateInput();\n\tdocument.getElementById(\"add-text\").innerHTML = \"Add stickers that you recieved from friends, packs, etc.\"\n\tdocument.getElementById(\"add-done-button\").style.display = \"inline-block\";\n}", "title": "" }, { "docid": "d85c33d2f50e8e2380de757162a609f9", "score": "0.6190988", "text": "function mainPlusButton(lineName){\n // Plus button\n var buttPlus = document.createElement('button'); // create a button\n buttPlus.setAttribute('type','button'); // set attributes ...\n // buttPlus.setAttribute('id','mainPlus' + lineName + '_' + rowNum + '_s_' + txt); // mainPlusIB_1_s_1\n buttPlus.setAttribute(\"value\", \"설비추가\");\n buttPlus.innerText = \"설비\"+\"\\n\"+\"추가\";\n buttPlus.setAttribute('class',\"add-house btn btn-success btn-xs\");\n buttPlus.setAttribute('style','float:right');\n buttPlus.setAttribute('onclick', \"createSubStepItem(this)\" );\n\n return buttPlus;\n}", "title": "" }, { "docid": "32b490695d0ef779b23435a92dbe2402", "score": "0.61311346", "text": "function saveToCalendarButton() {\n var newButton = document.createElement('BUTTON');\n newButton.setAttribute('class', 'button button-primary calendar-button');\n newButton.addEventListener('click', newEvent);\n newButton.innerHTML = 'Save + Calendar';\n document.getElementsByClassName('ynab-grid-actions')[0].appendChild(newButton);\n }", "title": "" }, { "docid": "48da9717688b8fb6c2bc730d18ae5a68", "score": "0.6125957", "text": "function addClick() {\n // open the modal with the create admin form\n setModalOpen(true)\n }", "title": "" }, { "docid": "7f6d08ee5fcc202e77aeaf1e04b8f695", "score": "0.6119251", "text": "function createStudyButton(){\n\t\tlet studyButton = createButton(\"Study This Chapter\", \"DarkViolet\", \"2px solid #F2F2F2\");\n\n\t\t//style\n\t\tstudyButton.style.marginTop = \"0px\";\n\t\t\n\t\tstudyButton.onclick = function(){\n\t\t\tlet chapterWords = currentStudyList;\n\t\t\tlet chapterAsString = \"\";\n\n\t for (let i = 0; i < chapterWords.length; i++)\n\t {\n\t chapterAsString += chapterWords[i][0] + \": \" + chapterWords[i][1] + \"\\n\";\n\t }\n\n\t if (document.getElementById(\"study\").innerText == chapterAsString)\n\t {\n\t document.getElementById(\"study\").innerText = \"\";\n\t }\n\t else\n\t {\n\t document.getElementById(\"study\").innerText = chapterAsString;\n\t }\n\t\t}\n\n\t\tdocument.body.appendChild(studyButton);\n\t}", "title": "" }, { "docid": "120c3684b6330ceb272cddd6cd625ea7", "score": "0.6075065", "text": "function printNewButton(place) {\n var newBtn = $(\"<button class='btn btn-primary m-1 saveCity'>\");\n newBtn.text(place);\n $(\".list-group\").append(newBtn);\n}", "title": "" }, { "docid": "da0f24805213a33fcf3a1f1f66baea3c", "score": "0.60709417", "text": "function addButton() {\n $('.button-section').on('click', '#add-bookmark', function (event) {\n store.adding = true;\n render();\n });\n }", "title": "" }, { "docid": "964efe91b8baa19ab6e3bb74677b0cd3", "score": "0.6040857", "text": "function addButtonRegister(tripId){\n let divBtnsRight = document.getElementById('trip-buttons-right-' + tripId);\n let btnRegister = document.createElement('span');\n let icon = document.createElement('i');\n\n icon.setAttribute('class', 'fas fa-door-open');\n\n btnRegister.setAttribute('class', 'btn btn-blue-light-nav btn-update-participant');\n btnRegister.innerText = \" S'inscrire\";\n btnRegister.insertAdjacentElement('afterbegin', icon);\n btnRegister.dataset.value = 'register';\n btnRegister.dataset.id = tripId;\n btnRegister.addEventListener('click', updateUserOnTrip);\n\n divBtnsRight.insertAdjacentElement('beforeend', btnRegister);\n}", "title": "" }, { "docid": "28bb48d115ed4eca2cc13d34f8b6b521", "score": "0.6017898", "text": "function createNewSponser() {\n const editorNewDiv = document.createElement(\"div\");\n editorNewDiv.className = \"new_li_div\";\n document.getElementById(\"editor_ul\").appendChild(editorNewDiv);\n /* li for new sponser */\n const editorNew = document.createElement(\"div\");\n editorNew.className = \"new_sponser_li\";\n editorNew.innerHTML = \"Createe New Sponser\";\n editorNewDiv.appendChild(editorNew);\n /* on add-new-sponser click */\n editorNew.addEventListener(\"click\", createAddForm);\n /* transperent filler */\n const demo = document.createElement(\"div\");\n demo.className = \"sponser_close\";\n demo.innerHTML = \"X\";\n editorNewDiv.appendChild(demo);\n}", "title": "" }, { "docid": "2e7cd3b4d982856ccd098012128d5650", "score": "0.6011466", "text": "function addDuelBtn(){\n $(\"#duel-area\").addClass(\"duel\");\n $(\"#duel-area\").html('<button type=\"button\" class=\"btn btn-dark btn-lg p-3 pr-5 pl-5\" id=\"duel-button\">Duel!</button>');\n }", "title": "" }, { "docid": "194ac5b0f94c10de2b377bb4b9a32719", "score": "0.5999544", "text": "function newButton() {\n $('#addGif').on('click', function() {\n var sport = $('#sport-input')\n .val()\n .trim();\n if (sport == '') {\n return false;\n }\n sports.push(sport);\n\n displayButtons();\n return false;\n });\n }", "title": "" }, { "docid": "ebd40277c52c2423a3aad1066793664a", "score": "0.5979498", "text": "displayAddUserButton(){\n $(usersHandler.addLocation).append($(\"<button>\").html(\"Créer un nouveau profil\").on(\"click\", function(){\n usersHandler.displayAddUserForm();\n }));\n }", "title": "" }, { "docid": "882ae9b61c8d2abfbccc87813867d210", "score": "0.5977773", "text": "function createBtnfunction(){\r\n buttonDisplay = document.querySelector(\".verticalBtns\");\r\n var createBtn = document.createElement(\"button\");\r\n var idname = \"btn\"\r\n createBtn.id = idname + count;\r\n arrayKey=createBtn.id;\r\n locationArray.push({[arrayKey]: setLocation, cityName})\r\n localStorage.setItem('location', JSON.stringify(locationArray))\r\n count = count+1 \r\n createBtn.setAttribute('type', 'submit');\r\n createBtn.setAttribute('class', 'btn');\r\n createBtn.textContent = cityName;\r\n buttonDisplay.appendChild(createBtn)\r\n }", "title": "" }, { "docid": "bb2e726208706b964ce8c2176b95d33a", "score": "0.595447", "text": "newEventButtonClick(){\n document.querySelector(\".event--add\").addEventListener(\"click\", function(){\n eventsForm.createEventForm();\n eventListeners.saveEventButtonClick();\n })\n }", "title": "" }, { "docid": "3deb714948da1f8aecdaadeff1a587de", "score": "0.5952538", "text": "function addNewButton(){\n $(\"#addGif\").on(\"click\", function(){\n var action = $(\"#action-input\").val().trim();\n if (action == \"\"){\n return false;\n }\n actions.push(action);\n \n dispBttn();\n return false;\n });\n }", "title": "" }, { "docid": "e1c5f590beaea8cbfd2905bc4ef4963d", "score": "0.59366167", "text": "function createSubStepPlusButton(){\n var buttPlus = document.createElement('button'); // create a button\n buttPlus.setAttribute('type','button'); // set attributes ...\n // buttPlus.setAttribute('id','subPlus'+lineName+\"_\"+rowNum+\"_s_\"+txtId.value); // subPlusIB_1_s_1\n buttPlus.innerText = \"연결\"+\"\\n\" + \"추가\";\n buttPlus.setAttribute('class',\"add-house btn btn-success btn-xs\");\n buttPlus.setAttribute('style','float:left; margin-left:5px; margin-top:5px;');\n buttPlus.setAttribute('onclick', \"addLinkSubItem(this) \" );\n\n return buttPlus;\n}", "title": "" }, { "docid": "724c0a372d3ff0d700ff125a1fb2f5b1", "score": "0.59223276", "text": "function AddStandUi(standValues) {\n standDiv = document.createElement(\"div\");\n standDiv.setAttribute(\"id\", standValues.name)\n delBttn = document.createElement(\"button\");\n delBttn.onclick = DeleteStand;\n delBttn.innerHTML = \"מחק\";\n standDiv.appendChild(delBttn);\n standDiv.appendChild(document.createTextNode(standValues.name));\n document.getElementById(\"stands-div\").appendChild(standDiv);\n}", "title": "" }, { "docid": "6eb141872d5925f124b36ececdc25cd8", "score": "0.5919015", "text": "add() {\n //hide button \"Luu\"\n $('.ui-dialog .ui-dialog-buttonpane button').eq(0).hide();\n //add header to form\n $('span#ui-id-1').text(\"Thêm mới khách hàng\");\n //3 buttons in the bottom of the dialog\n check.dialog.openDialog();\n }", "title": "" }, { "docid": "5b216ec44b6334c0362ba83c2a4e2748", "score": "0.59185046", "text": "addNewInput(){\n this.addInput(new KeepMeContributing.ScheduleInputView());\n }", "title": "" }, { "docid": "4235ed14072bd24d6a726365be2f8c95", "score": "0.59126323", "text": "function mainMoveButton(lineName){\n // Plus button\n var buttPlus = document.createElement('button'); // create a button\n buttPlus.setAttribute('type','button'); // set attributes ...\n // buttPlus.setAttribute('id','mainMove' + lineName + '_' + rowNum + '_s_' + txtNum); // mainPlusIB_1_s_1\n buttPlus.setAttribute(\"value\", \"단계이동\");\n buttPlus.innerText = \"단계이동\";\n buttPlus.setAttribute('class',\"add-house btn btn-primary btn-xs\");\n buttPlus.setAttribute('style','clear:both; font-size:11px;');\n buttPlus.setAttribute('onclick', \"moveTd(this)\" );\n var spn = document.createElement('span');\n spn.setAttribute('class','glyphicon glyphicon-transfer');\n buttPlus.appendChild(spn);\n\n return buttPlus;\n}", "title": "" }, { "docid": "25b5aab8063c8db2713ac13145c0a605", "score": "0.587595", "text": "function addBtn(){\n\t//disable add button until screen is returned to focus. Issue #28\n\t$.addPlot.enabled = false;\n\t\t\n\t//Navigation to addPlot\n\tvar addPlot = Alloy.createController(\"addPlot\", {transectGUID: $.tbl.transectGUID}).getView();\n\tvar nav = Alloy.Globals.navMenu;\n\tnav.openWindow(addPlot);\n}", "title": "" }, { "docid": "6c7b91decbc95a44ef5f82a276c3cea3", "score": "0.5867024", "text": "function addClinicTicket() {\n\tvar container = document.getElementsByClassName('SectionButtonsContainer')[0];\n\tvar node = document.createElement(\"A\");\n\tvar textnode = document.createTextNode(\"Create Clinic Ticket\");\n\tnode.appendChild(textnode);\n\tnode.setAttribute(\"id\", \"newClinic\");\n\tnode.setAttribute(\"class\", \"btn btn-success\");\n\tnode.setAttribute('onclick', 'Dialog(\"https://odo.corp.qualtrics.com/?a=Tickets&b=CT_Creator&ot=&oid=&uid=\");');\n\tcontainer.appendChild(node);\n\tdocument.getElementById('newClinic').innerHTML = \"<span class='icon btn-icon-plus'></span><span>Create Clinic Ticket</span>\";\n}", "title": "" }, { "docid": "e3be3859f45553ba33077042ab811b57", "score": "0.5846982", "text": "\"click #addRoom\" (event){\n event.preventDefault();\n Session.set(ROOMS_ACTIVE_ELEMENT_KEY, NEW_ROOM_ACTIVE_TEMPLATE_NAME);\n }", "title": "" }, { "docid": "0f7b11ba6d098396b2e673c280b46b87", "score": "0.5836625", "text": "function addBtn(){\n\t//disable add button until screen is returned to focus. Issue #28\n\t$.addPlot.enabled = false;\n\t\t\n\t//Navigation to addPlot\n\tvar addPlot = Alloy.createController(\"addPlot\", {transectID: $.tbl.transectID}).getView();\n\tvar nav = Alloy.Globals.navMenu;\n\tnav.openWindow(addPlot);\n}", "title": "" }, { "docid": "5d8c80b19bb4aa01587d5f2f1f65e28b", "score": "0.5834672", "text": "function newCard() {\n const newBtn = document.createElement(\"input\");\n newBtn.setAttribute(\"id\", \"newCard\");\n newBtn.setAttribute(\"type\", \"button\");\n newBtn.value = \"New To-Do\";\n newBtn.addEventListener('click', newForm);\n //retrieves sidebar\n const sidebar = document.querySelector(\".sidebar\");\n sidebar.appendChild(newBtn);\n}", "title": "" }, { "docid": "5c36ce87e3856a61cb07645ce24a1491", "score": "0.58304316", "text": "function btnAdd() {\n\n}", "title": "" }, { "docid": "8b6c7482535243bd3fc6cb06572b37c0", "score": "0.5825122", "text": "function modifyBtnsOnPublication(tripId){\n let spanState = document.getElementById('trip-state-wording-' + tripId);\n let btnPublish = document.getElementById('trip-span-publish-' + tripId);\n let btnModify = document.getElementById('trip-a-modify-'+ tripId);\n\n //Passer l'état à 'Ouverte'\n spanState.innerText = 'Ouverte';\n\n //Ajouter le bouton 'AFFICHER', 'ANNULER' et 'S'INSCRIRE'\n addButtonDisplay(tripId);\n addButtonCancel(tripId);\n addButtonRegister(tripId);\n\n //Supprimer les boutons 'PUBLIER' et 'MODIFIER'\n btnPublish.remove();\n btnModify.remove();\n\n}", "title": "" }, { "docid": "827b01175781af95a5c1956871d76d47", "score": "0.57700753", "text": "function btnAddNew_onclick() {\n gMode = \"add\";\n displayModal(\"editModal\");\n displayEditFormValues(); \n}", "title": "" }, { "docid": "ecf8814ad5764fc91b75373a32c9f8f9", "score": "0.57638365", "text": "function addButtonClick() {\n\tname = $('body > div.project form.project input.name').val();\n\tdescription = $('body > div.project form.project input.description').val();\n\taddProject(name, description);\n}", "title": "" }, { "docid": "6814aa6f044d283154eec10b52c1d37c", "score": "0.5745496", "text": "function createAddListingBtn() {\n const addDiv = document.getElementById('add-listing-div');\n\n const listingBtn = document.createElement('button');\n listingBtn.id = 'add-listing-btn';\n listingBtn.className = 'add-listing-btn';\n listingBtn.innerHTML = 'Lisää ilmoitus';\n if (addDiv !== null) {\n addDiv.appendChild(listingBtn);\n }\n\n listingBtn.addEventListener('click', openAddListing);\n}", "title": "" }, { "docid": "572cd8d48e0d19d7b0193077b0d08956", "score": "0.5718905", "text": "function addEvent () {\n // modal pops up to enter data, includes submit button\n \n textContent = '';\n return; // corresponding timeblock is filled out\n}", "title": "" }, { "docid": "e92eae1f5b3ce8b9235b8bd7eab261fa", "score": "0.57080233", "text": "function uses_drawNewButton(){\r\n\tpush();\r\n\tstroke(255);\r\n\tfill(0);\r\n\trect(350,420,100,20);\r\n\tpop();\r\n\r\n\tpush();\r\n\tstroke(255);\r\n\tfill(255);\r\n\ttext(\"NEW\",350+30,435);\r\n\tpop();\r\n}", "title": "" }, { "docid": "ece81183c33defaf526afa9b02750509", "score": "0.57006574", "text": "function addToSquad() {\n popUpOpened = `${aStudent.firstName}${aStudent.lastName}`;\n if (aStudent.house === \"Slytherin\") {\n aStudent.inquis = true;\n buildList(arrayOfStudents);\n } else if (aStudent.bloodstatus === \"pureblood\") {\n aStudent.inquis = true;\n buildList(arrayOfStudents);\n } else {\n aStudent.inquis = false;\n popUpOpened = `${aStudent.firstName}${aStudent.lastName}`;\n theSquadAlert();\n }\n }", "title": "" }, { "docid": "7a5649a2396dd29abdf78e570b4d1246", "score": "0.5699978", "text": "function addButtonDisplay(tripId){\n let divBtnsLeft = document.getElementById('trip-buttons-left-' + tripId);\n let btnDisplay = document.createElement('a');\n let icon = document.createElement('i');\n\n icon.setAttribute('class', 'fas fa-eye');\n\n btnDisplay.setAttribute('class', 'btn btn-blue-light-nav');\n btnDisplay.innerText = ' Afficher';\n btnDisplay.insertAdjacentElement('afterbegin', icon);\n btnDisplay.href = currentUrl+\"trip/\"+tripId;\n\n divBtnsLeft.insertAdjacentElement('afterbegin', btnDisplay);\n}", "title": "" }, { "docid": "e12d677a0ee0a3702d4ad71cb2829092", "score": "0.56935936", "text": "function ButtonClickAction () {\n var bevent = document.createElement('p');\n bevent.innerHTML = 'The button was clicked. Buttons can operate as desired...';\n document.getElementById (\"widget-Ariscon\").appendChild(bevent);\n}", "title": "" }, { "docid": "5b6269fec3b4ae4b826de96ee04548b8", "score": "0.5669665", "text": "function createPalletEvent(){\n //일괄생성 버튼\n $(\"#createPalletBtn\").click(function(){\n fnCreatePalletDataSave();\n });\n //규격 팝업 버튼\n $(\"#specCdPop\").click(function(){\n $(\"#createSpecTypeCdPlt\").val('1');\n fnModalGrid();\n });\n }", "title": "" }, { "docid": "542922c29ef44be07a973753ff862139", "score": "0.5661151", "text": "function appendNewTrialFlag() {\n if ($state.$current.name.indexOf('add') > -1) {\n vm.curTrial.new = true; //\n vm.curTrial.edit_type = 'original';\n }\n }", "title": "" }, { "docid": "cf056c961bc1bb3bacf6866b9ae22685", "score": "0.5658048", "text": "function linkToCreateNewFile()\n{\n\treturn \"<p><button onClick='createNewFile()'>Create New County</button>\";\n}", "title": "" }, { "docid": "eea71c6c1b11056eace867b8b53e275b", "score": "0.56522167", "text": "function makeNewFormButton (){\n const inputButton = document.createElement(\"input\")\n const br = document.createElement(\"br\")\n\n inputButton.setAttribute(\"type\", \"submit\")\n inputButton.setAttribute(\"value\", \"Make A New Note\")\n inputButton.appendChild(br)\n div.appendChild(inputButton)\n\n inputButton.addEventListener(\"click\", function (event){\n newDetailDiv(event)\n })\n }", "title": "" }, { "docid": "03d737b12d27ed9c367845bcd7db69e7", "score": "0.56397367", "text": "insertRowAddButton() {\n var newRow = this.table.insertRow(this.table.rows.length);\n var cell = this.insertCellWithDiv(newRow, 0, [TableMode.CONSTS.addButton, TableMode.CONSTS.noselectCell], null, addSymbol);\n\n if (!jeProhlizeciStranka_new()) {\n $(cell).prop(\"title\", tableAddRowHover);\n cell.addEventListener(\"click\", () => this.insertRow());\n }\n }", "title": "" }, { "docid": "b492bae38716b91915059d95b6e45878", "score": "0.5633502", "text": "function addNewPlayer() {\n var newTextInput = createTextInput(\"player\");\n var addPlayerButton = document.querySelector(\"#addPlayer\");\n addPlayerButton.parentNode.replaceChild(newTextInput, addPlayerButton);\n}", "title": "" }, { "docid": "dc74be0fca809639f5690400c6d1ea37", "score": "0.5623293", "text": "function clickAgregar() {\n self[self.currentEntity()](crearEntidad());\n initAgregar();\n }", "title": "" }, { "docid": "96590029f348feaf775b124b0ad04d5e", "score": "0.5618397", "text": "function addTodayButton(){\n let button = document.createElement(\"button\");\nbutton.innerHTML = \"Today\";\n let calendar = document.getElementById(\"calendar-section\");\n calendar.append(button);\n button.addEventListener (\"click\", miniCalendarToday)\n}", "title": "" }, { "docid": "71b5bd8262eaa4651e705b08b4774f8c", "score": "0.56168437", "text": "function onAddClick() {\n $scope.model.addMode = !$scope.model.addMode;\n if ($scope.model.addMode) {\n $scope.model.settingsName = \"\";\n // Declared in directive 'focusFunc' - directives/focus.js\n $scope.setFocusOnInput();\n } else {\n addSettings($scope.model.settingsName);\n }\n }", "title": "" }, { "docid": "d1ffb753e6de189b8f91bcf425fa170c", "score": "0.55983806", "text": "function addNewMember(){\n $(\"#bname\").val(\"\");\n var result=\"<br><br>\";\n result+='<form><div class=\"mb-3\">';\n result+='<br><label style=\"color: black;\" for=\"name\" class=\"form-label\">Name</label>';\n result+='<input type=\"text\" class=\"form-control\" name=\"name\" >';\n result+='<label style=\"color: black;\" for=\"phone\" class=\"form-label\">Phone</label>';\n result+='<input type=\"text\" class=\"form-control\" name=\"phone\" >';\n result+='<label style=\"color: black;\" for=\"email\" class=\"form-label\">Email</label>';\n result+='<input type=\"text\" class=\"form-control\" name=\"email\" >';\n result+='<label style=\"color: black;\"for=\"address\" class=\"form-label\">Address</label>';\n result+='<input type=\"text\" class=\"form-control\" name=\"address\">';\n result+= '<button onclick=\"AddMember()\" style=\"width:150px;margin-right:15px;\" class=\"btn btn-primary\">Submit</button><button class=\"btn btn-primary\" style=\"width:150px;\" id=\"cancel\" onclick=\"cancelEdit()\">Cancel </button>';\n result+='</form>\"';\n$(\"#listTable\").hide();\n\n $(\"#viewEditPane\").show();\n $(\"#viewEditPane\").html(result);\n}", "title": "" }, { "docid": "d5c491bec013a2765dbdae2a3e4d49cb", "score": "0.55821127", "text": "function addNewData() {\n\n console.log(HicomPageName);\n objEditPopup.cpPrimaryKeyValue = -1;\n objEditPopup.SetHeaderText(\"New \" + HicomPageName);\n showClearedPopup(objEditPopup);\n firstFocusTextBox.Focus();\n }", "title": "" }, { "docid": "e9c4fa49531d7930d6746e7b4fb86d83", "score": "0.55806583", "text": "function addLocation() {\n // Hide the dialog\n toggleAddDialog();\n Object.keys(weatherApp.selectedLocations).forEach((key) => {\n const location = weatherApp.selectedLocations[key];\n // Save the updated list of selected cities.\n saveLocationList(location);\n });\n}", "title": "" }, { "docid": "0432ff3db2b58b9b82cb7e4810ececb0", "score": "0.55788434", "text": "function addStationSection() {\n\t\t\tvar tab_title = $tab_title_input.val();\n\t\t\t$tabs.tabs( \"add\", \"#tabs-\" + tab_counter, tab_title );\n\t\t\ttab_counter++;\n\t\t}", "title": "" }, { "docid": "3176f1be52c388d0c96d42da6dfc43d7", "score": "0.5575083", "text": "function generateGoToButton() {\n var goToButton = layer.append(\"div\")\n .attr(\"id\", \"map-goto\")\n .attr(\"class\", \"btn btn-default btn-lg\")\n .style(\"position\", \"absolute\")\n .style(\"z-index\", 1500)\n .style(\"bottom\", \"15px\")\n .style(\"right\", \"10px\");\n goToButton.append(\"span\")\n .attr(\n \"class\",\n \"glyphicon glyphicon-screenshot\"\n );\n }", "title": "" }, { "docid": "6224fd71cf6d64572e0bbb0900ede0be", "score": "0.5560628", "text": "function saveButton_Click(s, e) {\n var commandName = objEditPopup.cpPrimaryKeyValue > 0 ? \"Edit\" : \"New\";\n console.log(commandName);\n saveEditForm(objEditPopup, serializeArgs([commandName, objEditPopup.cpPrimaryKeyValue]));\n objEditPopup.cpPrimaryKeyValue = -1;\n }", "title": "" }, { "docid": "539cf0a7185eed1340cd4f9b3c8e2408", "score": "0.55571777", "text": "function addAddTopicButton() {\n if ($('#ca-addsection').length) {\n cd.g.addSectionButton = new OO.ui.ButtonWidget({\n label: cd.s('addtopic'),\n framed: false,\n classes: ['cd-button', 'cd-sectionButton'],\n });\n cd.g.addSectionButton.on('click', () => {\n CommentForm.createAddSectionForm();\n });\n cd.g.$addSectionButtonContainer = $('<div>')\n .addClass('cd-addTopicButton-container cd-sectionButton-container')\n .append(cd.g.addSectionButton.$element)\n .appendTo(cd.g.rootElement);\n }\n}", "title": "" }, { "docid": "1890ba7c433bbac4081088cc680caf51", "score": "0.5556597", "text": "function addButtons()\n {\n console.log(\"YEA\");\n $( \".navbar-nav\" ).append('<li id=\"sDialogButton\" class=\"nav-item mr-4\"><button data-v-648179ab=\"\" type=\"button\" class=\"btn tool-link btn-link\"><i data-v-648179ab=\"\" class=\"icon icon-Aula_plus in-circle\"></i>Masseopret begivenheder</button> <!----></li>' );\n\n createDialog();\n }", "title": "" }, { "docid": "757b878cae1e473b39f38538378ed619", "score": "0.5539455", "text": "function createButton(city) {\n var button = $(\"<button>\").attr({\n type: \"button\", \n class: \"btn btn-light btn-block btn-lg city_button\",\n \"data-city\": city})\n\n button.text(city)\n button.on(\"click\", getCity)\n $(\"#cityBttns\").append(button)\n \n}", "title": "" }, { "docid": "8ea817822e32372a855ee74c4636e033", "score": "0.55384046", "text": "addNewForm() {\n this.addMuseumVars.form.push(this.getMuseumDefaultForm(\"Add Museum\", \"X\", \"Y\", \"Z\", \"R\"));\n this.emit(\"change\");\n }", "title": "" }, { "docid": "90f3f3c207b66b8170af42dd1eb9c735", "score": "0.55328995", "text": "AddAnnouncementButton() {\n return(\n <Button icon labelposition='left' onClick={this.showAddAnnouncementModal}>\n <Icon name='add' />\n Add Announcement\n </Button>\n )\n }", "title": "" }, { "docid": "d7e12f670ae5b11cfc4612f91a353c0f", "score": "0.552468", "text": "function createListButton() {\n var newListButton = document.createElement(\"div\");\n var newListButtonText = document.createElement(\"p\");\n newListButton.id = \"nyListeKnapp\";\n newListButtonText.id = \"nyListeKnappX\";\n newListButton.setAttribute(\"type\", \"button\");\n newListButton.setAttribute(\"onclick\", \" return createList()\");\n var wrapper = document.getElementById(\"lag-liste\");\n \n wrapper.appendChild(newListButton);\n newListButton.appendChild(newListButtonText);\n newListButtonText.innerText = \"+ Add list\";\n}", "title": "" }, { "docid": "9167595104eac33264785b05b8485550", "score": "0.55233145", "text": "function clickAdd() {\n const newItem = {\n item: $(\".js-new-item\").val(),\n complete: \"N\",\n };\n saveItem(newItem);\n $(\".js-new-item\").val(\"\");\n}", "title": "" }, { "docid": "2acb6ca3f2208cb2c73174c4b079e6cb", "score": "0.5520603", "text": "function createWeatherBtn (city) {\n $(\"#historyList\").append(`<button onclick=\"javascript:getWeather('${city}')\" >${city}</button>`) \n\n }", "title": "" }, { "docid": "43421e3179e3b8dbfafecd00298db9d3", "score": "0.55136067", "text": "function addTopicButton(evt) {\n evt.preventDefault();\n let addInput = document.querySelector(\"#add-input\");\n let newTopic = addInput.value.trim();\n gifTasticApp.addNewTopic(newTopic);\n addInput.value = \"\";\n }", "title": "" }, { "docid": "ffda37e1a6aa0a6d70b7fcaef4d11775", "score": "0.5513383", "text": "function addnew() {\r\n document.querySelector(\".showEvents\").style.display = \"none\";\r\n document.querySelector(\".planner\").style.display = \"block\";\r\n clearGuests();\r\n addguest();\r\n renderMap();\r\n document.getElementById(\"event\").focus();\r\n $(\".planner input\").tooltip({ selector: \"[title]\",\r\n placement: \"bottom\",\r\n trigger: \"focus\",\r\n animation: false}); \r\n}", "title": "" }, { "docid": "c9440da9e1a411d4f0eb31ebd0c51016", "score": "0.5509372", "text": "addLocation() {\n\t\tvar newValue = \"location\" + (++this.locationCount);\n \tthis.selectedLocations.push(newValue);\n \tdocument.getElementById(\"location-add\").style.visibility = \"hidden\";\n }", "title": "" }, { "docid": "690db63e60be72e28e2e27089be44b48", "score": "0.5509256", "text": "function addBlock(button) {\n button = $(button);\n\n const tpl = $(`#sct_template`);\n let html = tpl.html();\n const blocks = button.siblings(\".sct_codeblocks\")[0];\n blocks.sct.create_block(html);\n}", "title": "" }, { "docid": "1292ba862d1d96ffd56cb428dd0eb669", "score": "0.5502127", "text": "function injectButton() {\n button.insertAfter($(el).find('.bar-status').find('.label').last());\n }", "title": "" }, { "docid": "b7e4a849d5b4896c13a97c69dca6303d", "score": "0.54967254", "text": "function addEdit( li )\n{\n let button = document.createElement(\"span\");\n button.className = \"edit-button\";\n button.appendChild( document.createTextNode( i18nGet(\"digglerEditTool.label\") ) );\n button.addEventListener( \"click\", event => {\n event.preventDefault();\n editEntry( li );\n } );\n li.appendChild( button );\n}", "title": "" }, { "docid": "eebeec703b0d7848aad3229441840301", "score": "0.54965454", "text": "function saveStoryButton () {\n saveButton = p.createButton(\"Save Story?\");\n saveButton.size(p.windowWidth - 32);\n saveButton.style(\"position\", \"absolute\");\n saveButton.style(\"bottom\", \"16px\");\n saveButton.style(\"left\", \"16px\");\n saveButton.style(\"background-color\", \"#000000\");\n saveButton.style(\"color\", \"white\");\n saveButton.style(\"border-color\", \"white\");\n saveButton.style(\"font-size\", \"2em\");\n saveButton.mouseReleased(saveStory);\n saveButton.touchEnded(saveStory);\n }", "title": "" }, { "docid": "ea53a856cf50e2329560c2aa42642e65", "score": "0.5495821", "text": "function addClinicFeedbackButton() {\n\tvar container = document.getElementsByClassName('ui-dialog-buttonset')[0];\n\tvar node = document.createElement(\"Z\");\n\tvar textnode = document.createTextNode(\"Submit Clinic Feedback\");\n\tnode.appendChild(textnode);\n\tnode.setAttribute(\"id\", \"newClinicButton\");\n\tnode.setAttribute(\"class\", \"btn btn-success\");\n\tnode.setAttribute(\"style\", \"display:inline; font-size:1em; margin:.5em .4em .5em 0; border:0px solid #cccccc; border-radius:4px;\");\n\tcontainer.appendChild(node);\n\tdocument.getElementById('newClinicButton').innerHTML = \"<span class='icon icon-envelope'></span><span>Submit Clinic Feedback</span>\";\n}", "title": "" }, { "docid": "264d266671fe9feb2894e49a77daf67c", "score": "0.5495488", "text": "function addButton() {\n var name = document.getElementById('title');\n var minutes = document.getElementById('minutes');\n var rating = document.getElementById('dropdown');\n var movie = new Movie(title.value);\n movie.setNameAndMinutes(name.value, parseInt(minutes.value));\n movie.setAudienceRating(rating.value);\n cinema.add(movie);\n BuildTable(cinema.movies);\n}", "title": "" }, { "docid": "bdcb918eabcc8e47f6f096f3a97d1a55", "score": "0.54899997", "text": "function create_story() {\n creating_story = true; // entering story creation mode\n $('#story_modal').modal('toggle');\n}", "title": "" }, { "docid": "ca526de5417e0c1244f1425b8862c30e", "score": "0.548811", "text": "function addLocation() {\n // Hide the dialog\n toggleAddDialog();\n // Get the selected city\n const select = document.getElementById('selectCityToAdd');\n const selected = select.options[select.selectedIndex];\n const geo = selected.value;\n const label = selected.textContent;\n const location = {label: label, geo: geo};\n // Create a new card & get the weather data from the server\n const card = getForecastCard(location);\n getForecastFromNetwork(geo).then((forecast) => {\n renderForecast(card, forecast);\n });\n // Save the updated list of selected cities.\n exCalc.selectedLocations[geo] = location;\n saveLocationList(exCalc.selectedLocations);\n}", "title": "" }, { "docid": "712ca7b202b6dcc966f9fbea1e26310d", "score": "0.54865235", "text": "AddToCalendar()\n{\n\n\n}", "title": "" }, { "docid": "168e204ccc936a5f573914f0f8bf9fff", "score": "0.54863065", "text": "onClickAgregarArticulo(){\n /** Se realiza el cambio del state para el modal de agregar cliente */\n this.asignarValorState('ventanaShowModal',true,'showModales');\n }", "title": "" }, { "docid": "27ca0d34d274cf0393dd21c94b64f4aa", "score": "0.5486161", "text": "function actionOnClickCreate() {\n game.state.start('createAccountState')\n }", "title": "" }, { "docid": "d2496a09515f1371872a942d09dee382", "score": "0.5483991", "text": "addJitsiButton() {\n var container = this.buttonContainer;\n if (!container)\n return;\n\n var description = this.description;\n\n if (!description.element)\n return;\n\n container.addClass('button_container');\n container.append(\n '<div id=\"jitsi_button\"><a href=\"#\" style=\"color: white\"></a></div>');\n description.update(this.location);\n }", "title": "" }, { "docid": "bfcb6c080b788a191d14d22aa99cc389", "score": "0.5480135", "text": "function historyButton() {\n let getStorage = JSON.parse(localStorage.getItem('city'));\n let newButton = $(\"<button>\").addClass('row histButton card bg-light shadow-lg bg-white').text(getStorage);\n $('#historyButton').append(newButton);\n\n }", "title": "" }, { "docid": "246672eb92bd1b148e750e6c723e0f71", "score": "0.54777443", "text": "function newToy(toy) {\n // insert.. method called on toyCollection container\n toyCollection.insertAdjacentHTML(\n \"beforeend\",\n `\n <div class=\"card\" data-id =\"${toy.id}\"> \n <h2>${toy.name}</h2>\n <img class=\"toy-avatar\" src=\"${toy.image}\"/>\n <p>${toy.likes} likes</p>\n <button class=\"like-btn\">Like <3</button>\n </div>\n `\n );\n}", "title": "" }, { "docid": "49f370c28c887d76add6006b5b3b087c", "score": "0.5471796", "text": "addCat() {\n this.dialogVisible = true;\n this.title = '';\n this.description = '';\n this.upsertText = 'Add';\n }", "title": "" }, { "docid": "7b4c4bdd856be9ec7354668f25387bf2", "score": "0.54693514", "text": "clickOnNewButton() {\n commonActions.click(this.newButton);\n }", "title": "" }, { "docid": "c1b89a8c34856ca338a4cb86fba9a823", "score": "0.54680395", "text": "function addPanelRenseignement() {\n $('#panelProperties').removeClass('hidden');\n $('#saveBtn').on('click', this, function() {\n saveFeature();\n });\n }", "title": "" }, { "docid": "275fc1a964d09ab1f53566c08d0192ba", "score": "0.5465796", "text": "function createworkoutButton() {\n console.log(\"Let's Workout\");\n var newButton = $(\"<button>\");\n \n for (var i = 0; i < workouts.length; i++) {\n \n .prepend(\"<button class='dropdown btn-primary btn-lg btn-block'>\" + workouts[i] + \"</button><br>\");\n newButton.attr(\"value\", day_id[i]);\n \n }\n }", "title": "" }, { "docid": "fefd867169b32cba2d319e0db1ebc3ba", "score": "0.54528534", "text": "function startNewCategoria(){\n\tdocument.getElementById(\"newCat\").innerHTML = \"<label for='nombreCategoria'>Nombre Categoria Nueva: </label><input type='text' placeholder='Ingresar nombre Categoria' id='nombreCategoria'>\";\n\tdocument.getElementById(\"okMensajeNewCat\").innerHTML = \"<button type='button' class='btn btn-secondary' data-dismiss='modal'>Cancelar</button><button type='button' class='btn btn-primary' onclick='newCategoria();'>Crear</button>\";\n}", "title": "" }, { "docid": "a87935c93eb4ee2f6cfc6447814afcb7", "score": "0.5448512", "text": "_addSlots(){this.message=\"Slot Added Successfully\";this.$.modal.open()}", "title": "" }, { "docid": "e982a7a1b6940a28a2e894afa0cea1df", "score": "0.544784", "text": "function onAddMovieSet(btn, ev) {\n var u = new MovieSetMgmtGrid.store.recordType({\n \tstrSet: 'New Set',\n\t\tidSet: '-1' // flag as new record\n });\n editor.stopEditing();\n MovieSetStore.insert(0, u);\n editor.startEditing(0)\n}", "title": "" }, { "docid": "570de726b04c46cb610cac338c0aa153", "score": "0.54457706", "text": "function myAddTask() {\n const addEdit = document.querySelector(\"#add-edit\").value;\n if (addEdit === \"A\") {\n myTaskCardList.addElement(); // add form action - 4\n myClearForm(\"Add\");\n } else {\n myTaskCardList.updateElement();\n }\n\n myCloseForm();\n}", "title": "" }, { "docid": "63a692a2c80e98d3e90d632da6866d27", "score": "0.5443087", "text": "addEquipmentItemSegment() {\n const addEquipmentItemBtn = document.querySelector(`#${this.addEquipmentItemID}`);\n addEquipmentItemBtn.addEventListener('click', () => {\n this.equipmentItemComponent.init();\n this.equipmentItemComponent.syncDatesWith(`#${this.jobStartDateID}`, `#${this.jobEndDateID}`);\n });\n }", "title": "" }, { "docid": "ac2c559912976570533a44203869d101", "score": "0.54401016", "text": "function NewExercise() {\n \n if ($previewBtn.css('display') == 'none') {\n $editBtn.click();\n }\n \n $publishBtn.hide();\n $deleteBtn.hide();\n $titleInput.val('Untitled');\n $subjectSelect[0].selectedIndex = 0;\n $authorLabel.text(userName);\n $lastUpdated.hide();\n $lastUpdated.text('');\n $editor.val('');\n $exerciseId = null;\n $isSaved = true;\n \n}", "title": "" }, { "docid": "cddfe68534a4de6c22cd7faaf6b9d47d", "score": "0.54362684", "text": "static addToUI(note) {\n const noteText = note;\n const visibleText = noteText.substring(0, 50);\n let newEle = document.createElement('div');\n\n\n newEle.innerHTML =\n `\n <div class=\"card\">\n <div class=\"card-body\">\n <span class=\"modalSpan\"><button type=\"button\" class=\"btn btn-sm btn-secondary delete\">X</button></span>\n <p class=\"card-text\">${visibleText} .... </p>\n <p class=\"fullText\" style=\"display:none\">${note}</p>\n <button type=\"button\" class=\"btn btn-primary viewModal\">\n View more\n </button>\n </div>\n </div>\n `;\n\n // adding class styles\n let modalClasses = ['col-sm-6']\n newEle.classList = modalClasses;\n newEle.style.display = 'inline-block';\n newEle.style.padding = '10px';\n\n contentBox.append(newEle);\n document.querySelector('#note').value = \"\";\n }", "title": "" }, { "docid": "a514f51eba02c1506ed84616a109e1bd", "score": "0.54280174", "text": "function add_scene(scene_name) {\n var scene_entry = $('#scene_selector_option_template').clone();\n scene_entry.find('.scene_selector_option')\n .attr('onclick', 'update_scene(\"' + scene_name + '\")')\n .text(scene_name);\n\n $('#scene_selector').append(scene_entry.html());\n}", "title": "" }, { "docid": "8e848aa12f74c4e10589c6404e04c405", "score": "0.5422172", "text": "function addButton(buttonName){\n\t\tvar newButton = $(\"<button>\");\n\t\tnewButton.html(buttonName);\n\t\tnewButton.attr(\"class\",\"newsearches button row btn btn-primary\");\n\t\tnewButton.css(\"margin\",\"2px\");\n\t\t$(\"#button-row\").append(newButton);\t\n\t}", "title": "" }, { "docid": "17a0de456c2cf23ea01d9fdf06f7b3dd", "score": "0.5418315", "text": "function onClickNewContest() {\n\n location.href = \"/create\";\n}", "title": "" }, { "docid": "b0db1cee44dd0916133f7837821cb3fd", "score": "0.5415265", "text": "function frm_load(beastURL) {\n console.log(\"insertBeast\")\n var beastImage = document.getElementById(\"madiv1\");\n if (!beastImage) {\n beastImage = document.createElement(\"div\");\n beastImage.setAttribute(\"id\", \"madiv1\");\n beastImage.setAttribute(\"style\", \"background:#66FF66\");// style=\"font-size:14px;width:600px;background-color:#FF0066\n var existingItem = document.body.firstElementChild;\n document.body.insertBefore(beastImage, existingItem);\n }\n else{\n beastImage.clear();\n }\n // beastImage.setAttribute(\"style\", \"height: 100vh\");\n var newe = document.createElement(\"button\");\n beastImage.appendChild(newe);\n newe.insertAdjacentText(\"afterBegin\", \"请假单\");\n newe.onclick = qingjia;\n var newe = document.createElement(\"button\");\n beastImage.appendChild(newe);\n newe.insertAdjacentText(\"afterBegin\", \"个人\");\n newe.onclick = personSpace;\n var newe = document.createElement(\"button\");\n beastImage.appendChild(newe);\n newe.insertAdjacentText(\"afterBegin\", \"todo\");\n newe.onclick = showTodoNew;\n}", "title": "" }, { "docid": "ba91aa460f9616b1a413db9b7b5f6b7b", "score": "0.54094446", "text": "function newButton(butName) {\n var newBut = $(\"<button>\");\n newBut.text(butName);\n newBut.addClass(\"instrument\");\n newBut.addClass(\"btn-outline-primary\");\n newBut.addClass(\"btn\");\n newBut.addClass(\"px-3\");\n newBut.addClass(\"m-1\");\n $(\"#topics\").append(newBut);\n }", "title": "" }, { "docid": "12ab705e7f07e38c7ef1e9ca8f3ed73d", "score": "0.5404591", "text": "function createLocationButton() {\n $(\"#buttonPanel\").html();\n // for (var i = 0; i < 14; i++) {\n boogers;\n $(\"<button>\")\n .addClass(\"locationButton btn btn-success\")\n .text(boogers)\n .attr('data-id', snot)\n .appendTo(\".locationResults\");\n\n // };\n }", "title": "" }, { "docid": "11e0758a2214a827dc0c8a9b92872968", "score": "0.54039544", "text": "function addButton(name){\n $(\"#buttonGroup\").append(\"<button type='button' class='btn btn-primary mr-2 mt-2 animalButton'>\"+name+\"</button>\");\n }", "title": "" }, { "docid": "796df85a0be61e7fdfc8532ec999d826", "score": "0.54033524", "text": "function AddButtonAuto(heading, onDetailsView, snip){\n AddItemGeneral(heading, null, onDetailsView, snip);\n}", "title": "" }, { "docid": "b5040b14f9cb79fc4d79eebec8a787cf", "score": "0.54020625", "text": "function __add_button_create_event() {\n\t\tvar $element = $('.has-button-create-event');\n\n\t\t$(window).load(function() {\n\t\t\tvar $button = $('');\n\t\t\t$button.appendTo($element.find('.fc-header-right'));\n\t\t});\n\t}", "title": "" }, { "docid": "b5040b14f9cb79fc4d79eebec8a787cf", "score": "0.54020625", "text": "function __add_button_create_event() {\n\t\tvar $element = $('.has-button-create-event');\n\n\t\t$(window).load(function() {\n\t\t\tvar $button = $('');\n\t\t\t$button.appendTo($element.find('.fc-header-right'));\n\t\t});\n\t}", "title": "" } ]
2313d446477bb67def495f9002c90a33
this comes from reduct.js K is local reference, V is foreign state attribute
[ { "docid": "5cb167e11873c97fb9c00cd924616d7c", "score": "0.0", "text": "function msp(state) {\n}", "title": "" } ]
[ { "docid": "dcd2568c34a80f3714e725a46cd9c150", "score": "0.57915795", "text": "function V(a,b,c,d){t.call(this,4);this.c=a;this.k=b;this.f=c||new zb([]);this.m=!!d;b=this.f;b=0<b.a.length?b.a[0].d:null;a.b&&b&&(a=b.name,a=D?a.toLowerCase():a,this.d={name:a,l:b.l});a:{a=this.f;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.e||1==c.g||0==c.g){a=!0;break a}a=!1}this.e=a}", "title": "" }, { "docid": "e6e02db69049cdbc1b62893bea6978cf", "score": "0.569115", "text": "function KV() { }", "title": "" }, { "docid": "53c8fa4ccd106ee05cd8ef7dfc3939ee", "score": "0.5675324", "text": "function K (v) {\n\t return v;\n\t}", "title": "" }, { "docid": "53c8fa4ccd106ee05cd8ef7dfc3939ee", "score": "0.5675324", "text": "function K (v) {\n\t return v;\n\t}", "title": "" }, { "docid": "25b12b16df49322b01f6912f18c0185d", "score": "0.5642017", "text": "function Kv(a,b){this.F=[];this.ca=a;this.N=b||null;this.D=this.C=!1;this.A=void 0;this.S=this.R=this.I=!1;this.L=0;this.B=null;this.V=0}", "title": "" }, { "docid": "3219943e5edffcc7afe424b58bfbd2d7", "score": "0.56062335", "text": "get state() {\r\n return this.i.a;\r\n }", "title": "" }, { "docid": "1fb3ebaca2092646a55299fffb393be2", "score": "0.5564363", "text": "getLocalKey(){return this.localKey;}", "title": "" }, { "docid": "cb394222305ad78e4f25da08edd23980", "score": "0.55522496", "text": "get STATE_IDX() { return 0; }", "title": "" }, { "docid": "7781c1abf6d761f4c25c05f0989bc72a", "score": "0.5550921", "text": "function K(v){return v;}", "title": "" }, { "docid": "6d4153a233e14add91ed1a83a1053312", "score": "0.5522981", "text": "get state() {\n let states = readyMap.get(this.schema);\n if (!states) {\n states = {};\n readyMap.set(this.schema, states);\n }\n let state = states[this.model];\n // istanbul ignore else\n if (!state) {\n state = {};\n states[this.model] = state;\n }\n return state;\n }", "title": "" }, { "docid": "01b9f52fcfffce38a39fe3a944670135", "score": "0.54762936", "text": "function V(t,e){for(var n in e)t[n]=e[n];return t}", "title": "" }, { "docid": "8d8962b5bfb9e4ad43a08f30c5febfb4", "score": "0.5448641", "text": "get state() {\n return this[STATE];\n }", "title": "" }, { "docid": "175b98436d84ec3e240593b617dbe163", "score": "0.5425985", "text": "function n(e){return v[e]}", "title": "" }, { "docid": "f6a0834256ca8dd4ecf7a53124c7d90a", "score": "0.5412349", "text": "function getCurrValveState(){\n//TODO:most likely will need a call to API here\n\treturn \"Open\";\n\n}", "title": "" }, { "docid": "3d78a14c73b5f4f7f1768f14a820aad7", "score": "0.5378781", "text": "function getStateKey(key) {\n return KEY + key;\n }", "title": "" }, { "docid": "a53a09b517cd11ac5ca2df1892e0f725", "score": "0.53565776", "text": "function KeyValue() {}", "title": "" }, { "docid": "a53a09b517cd11ac5ca2df1892e0f725", "score": "0.53565776", "text": "function KeyValue() {}", "title": "" }, { "docid": "a33099b31ed1646bb0e4a98b2aeca113", "score": "0.5350017", "text": "state__o ()\n {\n return this.state_o\n }", "title": "" }, { "docid": "c00af35ed1c56b526b14197fcd5d8591", "score": "0.5344348", "text": "function showState (Layout, key, debugOpts) {\n\tvar data = Layout.state;\n\tjQuery.each(key.split(\".\"), function() {\n\t\tdata = data[this]; // recurse through multiple key-levels\n\t});\n\tdebugData( data, 'state.'+key, debugOpts );\n}", "title": "" }, { "docid": "505a40c9bfcb8cbd22f716570928cdfb", "score": "0.5325815", "text": "function reference(index) {\n var contextLView = Object(render3_state.h)();\n return Object(render3_util.v)(contextLView, index);\n }", "title": "" }, { "docid": "2489986c02868a4aeb5ae473986a0f6c", "score": "0.5312766", "text": "function K (v) {\n return v;\n}", "title": "" }, { "docid": "2489986c02868a4aeb5ae473986a0f6c", "score": "0.5312766", "text": "function K (v) {\n return v;\n}", "title": "" }, { "docid": "ef6b3558b3b236d42a82718005b062c7", "score": "0.530681", "text": "function KeyValue() { }", "title": "" }, { "docid": "ef6b3558b3b236d42a82718005b062c7", "score": "0.530681", "text": "function KeyValue() { }", "title": "" }, { "docid": "ef6b3558b3b236d42a82718005b062c7", "score": "0.530681", "text": "function KeyValue() { }", "title": "" }, { "docid": "e68dcb77c255d194e95d4ed73c9fca21", "score": "0.5302391", "text": "get key() { return this.ref.key; }", "title": "" }, { "docid": "d957d0d2d020a4e677a8a98757b30686", "score": "0.5301883", "text": "state(updatedState) {\n if (updatedState === undefined) return this.phaseState;\n Object.keys(updatedState).forEach((key) => {\n this.phaseState[key] = updatedState[key];\n });\n return null;\n }", "title": "" }, { "docid": "f64a0539360641a8448a63307c9ed1b5", "score": "0.5293534", "text": "function id(a){this.v=a}", "title": "" }, { "docid": "a23e45db9a44b71bca23e9bb0e9b5637", "score": "0.52760416", "text": "function Vd(){}", "title": "" }, { "docid": "07e11819928ef341c4a00d6c60f24aca", "score": "0.5261007", "text": "static buildVariableRevserseLookupTable() {\r\n if (CensusApi.VARIABLES_REVERSE_LOOKUP) {\r\n return;\r\n }\r\n CensusApi.VARIABLES_REVERSE_LOOKUP = {};\r\n for (let key of Object.keys(CensusApi.VARIABLES)) {\r\n let original_key = key;\r\n let original_value = CensusApi.VARIABLES[key];\r\n CensusApi.VARIABLES_REVERSE_LOOKUP[original_value] = original_key;\r\n }\r\n }", "title": "" }, { "docid": "31fd52b910013572a93a9382275142ba", "score": "0.5247152", "text": "function V(a,b){this.l=[];this.F=a;this.D=b||null;this.j=this.i=!1;this.h=void 0;this.A=this.L=this.s=!1;this.m=0;this.g=null;this.u=0}", "title": "" }, { "docid": "ef6073e29739bbc33ddbe045ea78a6ed", "score": "0.52421886", "text": "function K(v) {\n return v;\n}", "title": "" }, { "docid": "29431b1c1dc71cbf25f8c4d3594bae91", "score": "0.5239214", "text": "function KeyValueChangeRecord() { }", "title": "" }, { "docid": "29431b1c1dc71cbf25f8c4d3594bae91", "score": "0.5239214", "text": "function KeyValueChangeRecord() { }", "title": "" }, { "docid": "29431b1c1dc71cbf25f8c4d3594bae91", "score": "0.5239214", "text": "function KeyValueChangeRecord() { }", "title": "" }, { "docid": "29431b1c1dc71cbf25f8c4d3594bae91", "score": "0.5239214", "text": "function KeyValueChangeRecord() { }", "title": "" }, { "docid": "ef44e23f139b4207860f540119e68261", "score": "0.52356064", "text": "function KeyValue(){}", "title": "" }, { "docid": "050b44e8a8c37ef86d50f0f67d55be81", "score": "0.5230645", "text": "getState() { return [this._s0, this._s1, this._s2, this._c]; }", "title": "" }, { "docid": "cf5f0bd5c0a6dfa26567eb0481a389b6", "score": "0.5228349", "text": "getStateObject () {\n return isRef(this.state) ? this.state : ref(this.state);\n }", "title": "" }, { "docid": "4deec84e43baadf3825e83054161fae2", "score": "0.5209353", "text": "function getViewState() {\n return {\n moveArray: ViewStore.getMoveArray(),\n attackArray: ViewStore.getAttackArray(),\n fogOfWar: ViewStore.getMoveArray(),\n selectedShip: ViewStore.getSelectedShip(),\n selectedWeapon: ViewStore.getSelectedWeapon(),\n isLoaded: ViewStore.getLoadedState(),\n allObjects: ObjectStore.getAllObjects()\n }\n}", "title": "" }, { "docid": "e61693e908d075d4db0bda41be2aec31", "score": "0.51939046", "text": "get state() { return this.viewState.state; }", "title": "" }, { "docid": "e61693e908d075d4db0bda41be2aec31", "score": "0.51939046", "text": "get state() { return this.viewState.state; }", "title": "" }, { "docid": "db938d318caaef4a0832bf2bbf90e077", "score": "0.5193253", "text": "function KeyValueChangeRecord() {}", "title": "" }, { "docid": "db938d318caaef4a0832bf2bbf90e077", "score": "0.5193253", "text": "function KeyValueChangeRecord() {}", "title": "" }, { "docid": "fe72dd8976f0fab5a26a34f0e5196769", "score": "0.5185686", "text": "get state() {\n const s = PrivateStates.states[this._id];\n return s ? Object.assign({}, s) : s;\n }", "title": "" }, { "docid": "aa875ace305fc5d403774a680fe93c7b", "score": "0.5184502", "text": "get states(){ return this.__states; }", "title": "" }, { "docid": "23a9bbeb06117b606771382d278f3c82", "score": "0.51807183", "text": "function K(){this.Da={}}", "title": "" }, { "docid": "a058239d9bb55ed6059c31121815975c", "score": "0.5172032", "text": "function SFVTPV(state) {\n\t state.fv = state.pv;\n\n\t if (exports.DEBUG) { console.log(state.step, 'SFVTPV[]'); }\n\t}", "title": "" }, { "docid": "ca06f180b4094183a18455f34d676b7d", "score": "0.5163039", "text": "function V(){}", "title": "" }, { "docid": "ca06f180b4094183a18455f34d676b7d", "score": "0.5163039", "text": "function V(){}", "title": "" }, { "docid": "b860c4f41686941f1851abace50522e4", "score": "0.5143458", "text": "value (id) {\n return this.local ? this.local[id] : undefined\n }", "title": "" }, { "docid": "b1843c6cf228f4042edfc685f8a3f696", "score": "0.5138586", "text": "_$name() {\n super._$name();\n this._value.name = this._node.key.name;\n }", "title": "" }, { "docid": "3da90fa87a2ed06e6061102e66ea9734", "score": "0.512413", "text": "valueForKey(object, state, type, key) {\n if (this.map[type].keymap[key] && this.map[type].keymap[key].get) {\n return this.map[type].keymap[key].get(object, state);\n }\n return object[key];\n }", "title": "" }, { "docid": "2d35af5ad22b476f410422e5c83b4ac7", "score": "0.5118427", "text": "function getValue (v) {\n \n \n if (v instanceof Reference) {\n return v.base[v.propertyName];\n }\n return v;\n}", "title": "" }, { "docid": "cb678ef901e5c24519889b0848dbab0f", "score": "0.51029587", "text": "function ov(t,e,n,i,r){if(al()(e))return Lg.apply(void 0,Jm(hu()(e).call(e,(function(e){return ov(t,e)}))));r=r||function(t,e){return t.get(e)};var o=\"change:\".concat(e),a=rv(t,o,(function(){return r(t,e)})),s=[];return null!=i&&s.push(zg(i)),n&&(Object(io[\"n\"])(n)||(n=io[\"l\"]),s.push(Qm(n))),s.push(sg((function(t){return{prop:e,value:t}}))),a.pipe.apply(a,s)}", "title": "" }, { "docid": "ce89e8d57e2d1c3d312fefe019902fb4", "score": "0.5093757", "text": "getState(userId, key) {\n if (!this.StateStorage[userId]) this.StateStorage[userId] = {};\n return this.StateStorage[userId][key];\n }", "title": "" }, { "docid": "069376219149d93d3329d572779fc9cc", "score": "0.5089199", "text": "function value ( ) {\n\t\treturn this[0][ !arguments.length ? 'vGet' : 'vSet' ].apply(this[0], arguments);\n\t}", "title": "" }, { "docid": "069376219149d93d3329d572779fc9cc", "score": "0.5089199", "text": "function value ( ) {\n\t\treturn this[0][ !arguments.length ? 'vGet' : 'vSet' ].apply(this[0], arguments);\n\t}", "title": "" }, { "docid": "0594d9495d6e67c2bc1f51130ffdd139", "score": "0.5083612", "text": "handleClick (key) {\r\n let view = this.state.view\r\n for (let a in view) {\r\n if(a === key) { \r\n view[a] = true;\r\n } else {\r\n view[a] = false;\r\n }\r\n }\r\n this.setState(view)\r\n }", "title": "" }, { "docid": "963082835a70ac42b6baef8168b6507e", "score": "0.50827205", "text": "get state(){ return this.__state ? this.__state : 'off'; }", "title": "" }, { "docid": "fbf6d950fe88c36d171742aae7c31d5a", "score": "0.5081289", "text": "function AvalonStore() {\n \n var state = {},\n patch = {},\n vmodel = {},\n source = {};\n\n return {\n\n define: function(param) {\n if(param.hasOwnProperty('store'))\n throw 'Avalonx: keyword store is defined';\n else if(param.hasOwnProperty('$store')) {\n param.store = state;\n delete param.$store;\n var vm = avalon.define(param);\n source[param.$id] = param;\n vmodel[param.$id] = vm;\n return vm;\n }\n else\n return avalon.define(param);\n },\n \n remove: function(id) {\n delete vmodel[id];\n delete source[id];\n },\n\n reset: function(id) {\n if(source.hasOwnProperty(id)) {\n vmodel[id] = avalon.define(source[id]);\n return 1;\n }\n else\n return 0;\n },\n\n store: function(param) {\n for(var k in param) {\n if(typeof param[k] === 'object' || typeof param[k] === 'function')\n return 0;\n state[k] = param[k];\n }\n for(var vm in vmodel)\n vmodel[vm].store = state;\n return 1;\n },\n\n patch: function(key, val) {\n if(typeof key === 'object') {\n for(var i in key) {\n if(state.hasOwnProperty(i))\n patch[i] = key[i];\n else\n return 0; \n }\n return 1; \n }\n else {\n if(state.hasOwnProperty(key)) {\n patch[key] = val;\n return 1;\n }\n else\n // dev\n // console.log('no state found');\n return 0;\n }\n },\n\n patching: function(key, val) {\n if(typeof key === 'object')\n for(var i in key)\n if(state.hasOwnProperty(i))\n patch[i] = key[i]; \n else\n if(state.hasOwnProperty(key))\n patch[key] = val;\n return this; \n },\n\n unpatch: function(key) {\n if(key)\n delete patch[key];\n else\n patch = {};\n },\n\n dispatch: function(key) {\n if(key) {\n if(state.hasOwnProperty(key)) {\n for(var vm in vmodel)\n vmodel[vm].store[key] = patch[key];\n state[key] = patch[key];\n delete patch[key];\n return 1;\n }\n else {\n // dev\n // console.log('no patch found');\n return 0;\n }\n }\n else {\n for(var vm in vmodel)\n for(var k in patch) {\n state[k] = patch[k];\n vmodel[vm].store[k] = patch[k];\n }\n patch = {};\n return 1;\n }\n }\n\n }\n }", "title": "" }, { "docid": "32c75b04f5e850a803bf3645c172c0ee", "score": "0.50716347", "text": "set state(val) {\n this[STATE] = val;\n }", "title": "" }, { "docid": "b5ee825c0545b0365ad33cd2a5bbeb8c", "score": "0.50702804", "text": "getKeyState() {\n\t\treturn this.keyState;\n\t}", "title": "" }, { "docid": "2b5a1d69430bcb1743091b4ddd4bf633", "score": "0.5056901", "text": "function K(){this.b=this.a=null;this.i=0}", "title": "" }, { "docid": "54bb2916093355bc391f5798a004d995", "score": "0.50563574", "text": "function SFVTPV(state) {\n state.fv = state.pv;\n\n if (exports.DEBUG) console.log(state.step, 'SFVTPV[]');\n}", "title": "" }, { "docid": "b03044a348181de3987b83c893c3845f", "score": "0.50550246", "text": "function SFVTPV(state) {\n state.fv = state.pv;\n\n if (DEBUG) console.log(state.step, 'SFVTPV[]');\n}", "title": "" }, { "docid": "b03044a348181de3987b83c893c3845f", "score": "0.50550246", "text": "function SFVTPV(state) {\n state.fv = state.pv;\n\n if (DEBUG) console.log(state.step, 'SFVTPV[]');\n}", "title": "" }, { "docid": "b03044a348181de3987b83c893c3845f", "score": "0.50550246", "text": "function SFVTPV(state) {\n state.fv = state.pv;\n\n if (DEBUG) console.log(state.step, 'SFVTPV[]');\n}", "title": "" }, { "docid": "8b3578625b8141693062071f8b903f75", "score": "0.50539714", "text": "if (isTrue(children._isVList) &&\n isDef(c.tag) &&\n isUndef(c.key) &&\n isDef(nestedIndex)) {\n c.key = `__vlist${nestedIndex}_${i}__`\n }", "title": "" }, { "docid": "7009a83da25ab5ace2eab6f047bb1b07", "score": "0.50522333", "text": "function NestedValueLink(klass) {\n klass.prototype.linkState = function(name) {\n const nameParts = name.split(\".\");\n const currentValue = nameParts.reduce((acc, part) => {\n return acc[part];\n }, this.state);\n\n const setNewValue = newValue => {\n const newState = __set(this.state, nameParts, newValue);\n this.setState(newState);\n };\n\n return {\n value: currentValue,\n requestChange: setNewValue\n };\n };\n return klass\n}", "title": "" }, { "docid": "620e82f811c0c9a038460ad203fe70a8", "score": "0.50505126", "text": "function n(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}", "title": "" }, { "docid": "37b5c5795de9372fe7219131f98e9230", "score": "0.50479597", "text": "function vValue (id) {\n\t\tthis.id = id;\n\t\tthis.shape = null;\n\t\tthis.correct = false;\n\t\tthis.setShape = function (shape) { this.shape = shape; }\n\t\tthis.setShapeOnMouseOver = function (fn) {\n\t\t\t\tthis.shape.shape.node.onmouseover = fn;\n\t\t\t\tthis.shape.data.node.onmouseover = fn;\n\t\t}\n\t\tthis.setShapeOnClick = function (fn) {\n\t\t\t\tthis.shape.shape.node.onclick = fn;\n\t\t\t\tthis.shape.data.node.onclick = fn;\n\t\t}\n }", "title": "" }, { "docid": "9c662f8c30673fbe8e05434d1c644caf", "score": "0.50422853", "text": "getStateKeys(){\r\n return Object.keys(this.state);\r\n }", "title": "" }, { "docid": "355ff248a26b4ef93fce7d620c67ee84", "score": "0.5037456", "text": "function getVector() {\n\t\treturn this.getName() + ':' + this.value;\n\t}", "title": "" }, { "docid": "355ff248a26b4ef93fce7d620c67ee84", "score": "0.5037456", "text": "function getVector() {\n\t\treturn this.getName() + ':' + this.value;\n\t}", "title": "" }, { "docid": "577c914e69ab22d11898192ba68a701f", "score": "0.50282514", "text": "function SFVTPV(state) {\n state.fv = state.pv;\n\n if (exports.DEBUG) {\n console.log(state.step, 'SFVTPV[]');\n }\n }", "title": "" }, { "docid": "1d5ed8458b04028f83cdfce04849655e", "score": "0.50277597", "text": "get state() {\r\n return this.view.state;\r\n }", "title": "" }, { "docid": "f6afc1d72f250762808e16106096b5dd", "score": "0.50196713", "text": "get state() {\n // We need to clone the entry so that we don't impact the existing states object\n const entry = _.cloneDeep(_.find(states, ['key', self.status]) || _.find(states, ['key', 'UNKNOWN']));\n\n // The canConnect value is also determined by looking at the existing state requirement and\n // if we have any connections\n entry.canConnect = entry.canConnect && self.hasConnections;\n\n return entry;\n }", "title": "" }, { "docid": "1e338f88b4059caf74388ae488314be1", "score": "0.5012927", "text": "get state() { return this._publicState; }", "title": "" }, { "docid": "1e338f88b4059caf74388ae488314be1", "score": "0.5012927", "text": "get state() { return this._publicState; }", "title": "" }, { "docid": "1e338f88b4059caf74388ae488314be1", "score": "0.5012927", "text": "get state() { return this._publicState; }", "title": "" }, { "docid": "e01dc3a43577b868615961c334e2e8ec", "score": "0.50080025", "text": "changeState(state) {\r\n //throws an exception if state isn't exist\r\n if (!this.states[state]) throw new Error(\"This state doesn't exist\");\r\n this.previous = this.current;\r\n this.current = state;\r\n //return this.current;\r\n }", "title": "" }, { "docid": "6dcd2dde7e9f45fad995aec92ca26808", "score": "0.49913195", "text": "function xV(a,b){this.H=[];this.O=a;this.L=b||null;this.D=this.B=!1;this.C=void 0;this.M=this.R=this.J=!1;this.I=0;this.A=null;this.F=0}", "title": "" }, { "docid": "a9a828e4427e49120864265bcf26903b", "score": "0.4977413", "text": "get Key(){return this._key}", "title": "" }, { "docid": "8c3180849e154ebb21f1f4abcf749f3a", "score": "0.49745598", "text": "set val3(v){}", "title": "" }, { "docid": "c6d38ec76d3b3f6c8d803d318558656a", "score": "0.49732178", "text": "function getset(obj,state,events) {\n d3.keys(state).forEach(function(key) {\n obj[key] = function(x) {\n if (!arguments.length) return state[key];\n var old = state[key];\n state[key] = x;\n side_effects[key].call(fl,{\"value\": x, \"previous\": old});\n events[key].call(fl,{\"value\": x, \"previous\": old});\n return obj;\n };\n });\n }", "title": "" }, { "docid": "5a6941d25feabb9543430a3f8d9890f2", "score": "0.49718004", "text": "handleChange(name, e) {\n // Work around to allow the string value of the variable name\n // to be the object key.\n const newState = {};\n newState[name] = e.target.value;\n this.setState(newState);\n }", "title": "" }, { "docid": "d4ef26bfe4c395b85d281d3865d5adf3", "score": "0.49714717", "text": "transition(switches) {\n\t\treturn StateKeys[this.key];\n\t}", "title": "" }, { "docid": "e9129b779aa5da06c859843072ecceba", "score": "0.4970088", "text": "_variables () {}", "title": "" }, { "docid": "d0d3d1e720de616f3e178a8c8d1b49e6", "score": "0.496738", "text": "function KeyValueChangeRecord(){}", "title": "" }, { "docid": "1e1296eba64e9a76b7230175705aaada", "score": "0.49637267", "text": "property current(v) {\n get {\n var label = this.$(:root>strip>label:current);\n return label ? label.attributes[\"for\"] : undefined;\n } \n set {\n var label = this.$(:root>strip>label[for='{v}']);\n var ww = label.attributes[\"ww\"];\n var wh = label.attributes[\"wh\"];\n this.activate(label,false,ww,wh);\n }\n }", "title": "" }, { "docid": "38dddae06181b0dae2aa4ec1e0716708", "score": "0.4963651", "text": "get() {\n const value = this.getv(name);\n return value;\n }", "title": "" }, { "docid": "8d127d24a01891871d52a61df785e08f", "score": "0.49607015", "text": "mapKey(code, state){\n this._keyState[code] = state;\n }", "title": "" }, { "docid": "287706fed9717b317f671ddd73aa9d6c", "score": "0.4954144", "text": "function __bind(local, index, key)\n\t {\n\t \tconsole.log('bind obj n : ' + index + ', key : ' + key);\n\t \tlocal.__defineGetter__\n\t\t\t(\n\t \t\t\tkey,\n\t \t\t\tfunction () \n\t \t\t\t{\n\t \t\t\t\t__update(index);\n\t \t\t\t\tvar v = __getters[index](key, __data[index][key]);\n\t \t\t\t\tif (v !== undefined)\n \t \t\t\t\treturn v;\n\t\t\t\t\treturn __data[index][key];\n\t \t\t\t}\n\t \t\t);\n\n\t \t\tlocal.__defineSetter__\n\t \t\t(\n\t \t\t\tkey,\n\t \t\t\tfunction (value)\n\t \t\t\t{\n\t \t\t\t\t__update(index);\n\t \t\t\t\tvar v = __setters[index](key, value);\n\t \t\t\t\tif (v !== undefined)\n \t \t\t\t\t__data[index][key] = v;\n\t\t\t\t\telse\n\t\t\t\t\t\t__data[index][key] = value;\n\t \t\t\t\treturn __data[index][key];\n\t \t\t\t}\n\t \t\t);\n\t }", "title": "" }, { "docid": "174aee1d037205e96973f9703aca19dc", "score": "0.49463502", "text": "function get(key){return key._reactInternals;}", "title": "" }, { "docid": "8612d057f18c5dbcbed16e404855bdfd", "score": "0.49432442", "text": "node(v) {\n return this.#nodes[v];\n }", "title": "" }, { "docid": "f00f095b424a3644e7d4d6b7aa7cfbb9", "score": "0.4942068", "text": "function Vs(e, n, r, i) {\n return t.__awaiter(this, void 0, void 0, (function() {\n var o, s, u;\n return t.__generator(this, (function(t) {\n switch (t.label) {\n case 0:\n return (o = m(e)).Qh ? (\n // If we receive a target state notification via WebStorage, we are\n // either already secondary or another tab has taken the primary lease.\n l(\"SyncEngine\", \"Ignoring unexpected query state notification.\"), [ 3 /*break*/ , 8 ]) : [ 3 /*break*/ , 1 ];\n\n case 1:\n if (!o.$h.has(n)) return [ 3 /*break*/ , 8 ];\n switch (r) {\n case \"current\":\n case \"not-current\":\n return [ 3 /*break*/ , 2 ];\n\n case \"rejected\":\n return [ 3 /*break*/ , 5 ];\n }\n return [ 3 /*break*/ , 7 ];\n\n case 2:\n return [ 4 /*yield*/ , function(t) {\n var e = m(t), n = m(e.Fc);\n return e.persistence.runTransaction(\"Get new document changes\", \"readonly\", (function(t) {\n return n.ia(t, e.Nc);\n })).then((function(t) {\n var n = t.ra, r = t.readTime;\n return e.Nc = r, n;\n }));\n }(o.Gu) ];\n\n case 3:\n return s = t.sent(), u = Ft.Jt(n, \"current\" === r), [ 4 /*yield*/ , Ds(o, s, u) ];\n\n case 4:\n return t.sent(), [ 3 /*break*/ , 8 ];\n\n case 5:\n return [ 4 /*yield*/ , mo(o.Gu, n, \n /* keepPersistedTargetData */ !0) ];\n\n case 6:\n return t.sent(), Es(o, n, i), [ 3 /*break*/ , 8 ];\n\n case 7:\n y(), t.label = 8;\n\n case 8:\n return [ 2 /*return*/ ];\n }\n }));\n }));\n }", "title": "" }, { "docid": "3c456707e5532d9e4386098f4f46b56b", "score": "0.49324632", "text": "set Local(value) {}", "title": "" }, { "docid": "0b58025c707a0e9d4925a93e95afce7e", "score": "0.49255505", "text": "get state() {\n return this._state = this._clone(this._state);\n }", "title": "" }, { "docid": "19e40f8cdd2c25cd2e76f6aa7357061f", "score": "0.4921582", "text": "function up(){this.v=[];this.B=this.l=!1;this.j=void 0;this.G=this.K=this.C=!1;this.I=0;this.h=null;this.F=0}", "title": "" }, { "docid": "1db00e03d7424d58f645de62c3db12ec", "score": "0.49214703", "text": "get state() {\n return this.getStringAttribute('state');\n }", "title": "" } ]
050a3f71f6a61b3763038eb365364b8b
TODO: reduce boilerplate with
[ { "docid": "2d83353e5f33b19f2e5d78bf56b71aff", "score": "0.0", "text": "function mergeEntities(state, key, objectList) {\n // TODO: merge, not replace\n // TODO: clean up the idMap parsing. https://github.com/paularmstrong/normalizr\n return state.set(key, objectList.reduce((idMap, nextObject)=>{\n if (nextObject.get && nextObject.get(\"id\")) {\n return idMap.set(nextObject.get(\"id\"), nextObject);\n }\n }, OrderedMap()));\n}", "title": "" } ]
[ { "docid": "650ff554859977bab92401016e1b7806", "score": "0.62392634", "text": "private public function m246() {}", "title": "" }, { "docid": "44dfde9906fa1c183245d889a94dcfc2", "score": "0.60832053", "text": "private internal function m248() {}", "title": "" }, { "docid": "52b64fbfa48bc95d11ed241ebbfa874b", "score": "0.5983792", "text": "protected internal function m252() {}", "title": "" }, { "docid": "67fb1e0945a420ae9db984ef54bcf3d1", "score": "0.5799121", "text": "transient private protected internal function m182() {}", "title": "" }, { "docid": "3851bc35b2cb99d240553f3088eaa830", "score": "0.57115036", "text": "obtain(){}", "title": "" }, { "docid": "c3c25cf1ec1e29fc7c48de89a7783e78", "score": "0.5582912", "text": "transient protected internal function m189() {}", "title": "" }, { "docid": "b33f113b364cb6a949568de25eed0541", "score": "0.5563301", "text": "transient private internal function m185() {}", "title": "" }, { "docid": "04cc796a1a2b9422786b7134e33fa6ef", "score": "0.5503082", "text": "static private internal function m121() {}", "title": "" }, { "docid": "cf9ce75761cad4941aee8bb5bc575522", "score": "0.54673594", "text": "transient final protected internal function m174() {}", "title": "" }, { "docid": "3cca6f93efa9ebfc5ca48df4a9bf8fc7", "score": "0.53880775", "text": "static transient final private internal function m43() {}", "title": "" }, { "docid": "28d6c8882b456d32efd62295bb8bb3fb", "score": "0.5358686", "text": "static final private internal function m106() {}", "title": "" }, { "docid": "83537a1e4ca50b2c5e40ce61b473a85b", "score": "0.5293583", "text": "static transient final protected internal function m47() {}", "title": "" }, { "docid": "22495c668e66b783acc5d3fd2919d29d", "score": "0.5246031", "text": "__previnit(){}", "title": "" }, { "docid": "f1c7314a8a6377212b3b1ef87294d24f", "score": "0.5239855", "text": "static transient final protected public internal function m46() {}", "title": "" }, { "docid": "220c91d045d529816acdea75c15274eb", "score": "0.5209657", "text": "transient private protected public internal function m181() {}", "title": "" }, { "docid": "befdecdf4a7bf48d9420b7d26c55916d", "score": "0.5186713", "text": "function _____SHARED_functions_____(){}", "title": "" }, { "docid": "88369507a5fde33e7aec9e00e2eaf9a0", "score": "0.5171919", "text": "static private protected internal function m118() {}", "title": "" }, { "docid": "ee65c6c23ba35809ca8d65ab809a4fed", "score": "0.5153741", "text": "transient final private protected internal function m167() {}", "title": "" }, { "docid": "d45637012cbb4c67efaae60843d8f53d", "score": "0.51192254", "text": "static transient private protected internal function m55() {}", "title": "" }, { "docid": "164bb6aa03cedbe00e95494d281b912c", "score": "0.5093033", "text": "static transform() {}", "title": "" }, { "docid": "a3cc7c5e70da4671a3a904ef120d54a1", "score": "0.508947", "text": "prepare() {}", "title": "" }, { "docid": "43ff965c3063f616a30e394ca4639fe9", "score": "0.50865555", "text": "function DWRUtil() { }", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.50808114", "text": "function Utils() {}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.50808114", "text": "function Utils() {}", "title": "" }, { "docid": "5403238d4184f5632a3765ef78b2a364", "score": "0.5078744", "text": "transient final private internal function m170() {}", "title": "" }, { "docid": "3e392767020376db6a11cf854f020420", "score": "0.50739557", "text": "static transient final private protected internal function m40() {}", "title": "" }, { "docid": "d344324003d4f7a8fdad3ae3bc458fcb", "score": "0.50447446", "text": "function AeUtil() {}", "title": "" }, { "docid": "eb377607ebb19e4a5c680b18f7ac0458", "score": "0.49915218", "text": "apply () {}", "title": "" }, { "docid": "4fc4a89f08bb88c36370bac974880c27", "score": "0.49620247", "text": "transient private public function m183() {}", "title": "" }, { "docid": "59ead3af459e8ad39f66a32162206af2", "score": "0.4945892", "text": "static transient private protected public internal function m54() {}", "title": "" }, { "docid": "35ba9e798ee3936a88ee952d284b29d1", "score": "0.49358374", "text": "constructur() {}", "title": "" }, { "docid": "4da117810475b0e9ba413138eafc9f0e", "score": "0.4923441", "text": "constructor (){}", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48959494", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "ad91cf774842c7f01d01e1212f9f184d", "score": "0.48955745", "text": "constructor () { super() }", "title": "" }, { "docid": "8b22d16ffad9def34d45d9fbab1259f8", "score": "0.48816934", "text": "static transient private public function m56() {}", "title": "" }, { "docid": "26f76ccfd01f639adc0ed12b027dcfd6", "score": "0.48762175", "text": "function Utils(){}", "title": "" }, { "docid": "6744829f9f910affaf0b44d35fe78d1d", "score": "0.487173", "text": "getResult() {}", "title": "" }, { "docid": "ab0387d18947ced48b9dc1b0f5558773", "score": "0.48649025", "text": "function customHandling() { }", "title": "" }, { "docid": "6af6bd78b9d52bcc22735ff022111502", "score": "0.48502305", "text": "static transient final protected function m44() {}", "title": "" }, { "docid": "4960adbf0c25c9ceb299043adaad5d5e", "score": "0.48332828", "text": "static transient private internal function m58() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.48241574", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.48241574", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.48241574", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.48241574", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.48241574", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.48241574", "text": "initialize() {}", "title": "" }, { "docid": "b9678f002ad40e28f61787784b2195f0", "score": "0.4815741", "text": "static protected internal function m125() {}", "title": "" }, { "docid": "301f2ebe5360d9fdfa5e873b757d6bbf", "score": "0.47860304", "text": "static final private protected internal function m103() {}", "title": "" }, { "docid": "f66ee57414255f4244ad5d088c1767f9", "score": "0.475651", "text": "constructor() {\n\t\t// ...\n\t}", "title": "" }, { "docid": "856a5df74290558f488d8e89e94e649f", "score": "0.47560897", "text": "function SeleneseMapper() {\n}", "title": "" }, { "docid": "0a3946053c61ac379fc1dc66adb075c3", "score": "0.47530612", "text": "function Util() {}", "title": "" }, { "docid": "cb5fc8818427ec36b2938a16276f677d", "score": "0.47513416", "text": "get Custom() {}", "title": "" }, { "docid": "c16cda55c89b87c4ec7720269486eb07", "score": "0.4747867", "text": "constructor() {\n\n\t}", "title": "" }, { "docid": "f1e2f82081e7c9f60b40a62f51b9995d", "score": "0.4736872", "text": "static transient final private public function m41() {}", "title": "" }, { "docid": "226a968ca25eab024b33e8e5f37aa9a9", "score": "0.4721638", "text": "init () {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ea49c8d6bcca0576bf10a2e6147f1146", "score": "0.47181088", "text": "build () {}", "title": "" }, { "docid": "6fc72ba02c6511b5689911c0597c313c", "score": "0.47023478", "text": "function Adaptor() {}", "title": "" }, { "docid": "4f09598da2414ca682f4a51c01982528", "score": "0.4694694", "text": "_applyInstanceProperties(){// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\n// tslint:disable-next-line:no-any\nthis._instanceProperties.forEach((v,p)=>this[p]=v);this._instanceProperties=undefined;}", "title": "" }, { "docid": "d2c6ce3597960c867f7fec31ce902789", "score": "0.46837196", "text": "function _construct()\n\t\t{;\n\t\t}", "title": "" }, { "docid": "21202cdb3707850c0b0db221f39311a3", "score": "0.46818364", "text": "transient final private protected public internal function m166() {}", "title": "" }, { "docid": "ace8ce47e41d0de07ded4665f977a365", "score": "0.46707907", "text": "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "title": "" }, { "docid": "ace8ce47e41d0de07ded4665f977a365", "score": "0.46707907", "text": "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "title": "" }, { "docid": "ace8ce47e41d0de07ded4665f977a365", "score": "0.46707907", "text": "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "title": "" }, { "docid": "b42351186d39e9dcb30e6c46cddcfeee", "score": "0.4669708", "text": "constructor () {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "1b106e1fb2c223892f5e56ad2baea5d7", "score": "0.46660376", "text": "function FunctionUtils() {}", "title": "" } ]
6703ae7dcd0fe89c51a2b83e49baabab
listed below. Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the the compiled file. WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD GO AFTER THE REQUIRES BELOW. = require jquery = require jquery_ujs = require foundation = require underscore = require gmaps/google = require_tree .
[ { "docid": "05b5b928c81d727cddf8b3c1ac0c6942", "score": "0.0", "text": "function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n var x = document.getElementById(\"coordinates\");\n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n}", "title": "" } ]
[ { "docid": "66304a42635583daa4c4f9635b5531b0", "score": "0.57758343", "text": "function scripts_3rd_party() {\n\treturn pipeline(\n\t\tgulp.src( [\n\t\t\t/* HERE WE INCLUDE ALL BOOTSTRAP JS FILES WE WANT TO USE */\n\t\t\t'./js/bootstrap/popper.js',\n\t\t\t'./js/bootstrap/bootstrap.js'\n\t\t] ),\n\t\t//debug(),\n\t\tconcat( 'scripts.js' ),\n\t\tgulp.dest( './js/' ),\n\t\tsourcemaps.init(),\n\t\trename({ suffix: '.min' } ),\n\t\tuglify(),\n\t\tsourcemaps.write( './maps' ),\n\t\tgulp.dest( './js/' )//,\n\t\t//notify( { message: '3rd-party scripts task complete', onLast: true } )\n\t);\n}", "title": "" }, { "docid": "271fc22ee9e3ff84b4bce21846b406c1", "score": "0.5711062", "text": "function js() {\r\n gulp.src(['node_modules/bootstrap-v4-rtl/dist/js/bootstrap.min.js', 'node_modules/jquery/dist/jquery.min.js','node_modules/popper.js/dist/umd/popper.min.js'])\r\n .pipe(gulp.dest(\"src/js\"))\r\n .pipe(browserSync.stream());\r\n}", "title": "" }, { "docid": "2d8edf0f4ec8f3337ce8c2506c2514b9", "score": "0.5647582", "text": "function jsVendor() {\r\n\treturn src([\r\n\t\t'node_modules/highlightjs/highlight.pack.js',\r\n\t\t'node_modules/fitvids/dist/fitvids.js',\r\n\t\t'node_modules/jquery.scrollto/jquery.scrollTo.js',\r\n\t\t'node_modules/@fancyapps/fancybox/dist/jquery.fancybox.js',\r\n\t\t'node_modules/superfish/dist/js/superfish.js',\r\n\t\t'node_modules/superclick/dist/js/superclick.js'\r\n\t])\r\n\t.pipe($.plumber({ errorHandler }))\r\n\t.pipe($.removeSourcemaps())\r\n\t.pipe(dest(vendorsJSFolder));\r\n}", "title": "" }, { "docid": "ff61ca10d65a569bb84144bd257b13f4", "score": "0.5483468", "text": "function js () {\n return gulp.src([paths.js.bootstrap, paths.js.popper])\n .pipe(gulp.dest(paths.js.dest))\n .pipe(browserSync.stream())\n}", "title": "" }, { "docid": "12a6bd5dc051e8d9d811fe5787005af3", "score": "0.5412273", "text": "function initializeJavascripts() {\n\n // Drag and drop reordering of folder contents (ploneDnDReorder)\n initializeDnDReorder('#listing-table');\n\n // collapsiblesections.js\n $(activateCollapsibles);\n\n // Form tabbing\n ploneFormTabbing.initialize()\n\n // Focus on error or first element in a form with class=\"enableAutoFocus\"\n if ($(\"form div.error :input:first\").focus().length) {return;}\n $(\"form.enableAutoFocus :input:not(.formTabs):visible:first\").focus();\n\n // collapsibleformfields.js\n $('.field.collapsible').do_search_collapse();\n\n // dropdown.js\n initializeMenus();\n\n // calendar_formfield.js\n /*$(plone.jscalendar.init);\n $('.plone-jscalendar-popup').each(function() {\n var jqt = $(this),\n widget_id = this.id.replace('_popup', ''),\n year_start = $('#' + widget_id + '_yearStart').val(),\n year_end = $('#' + widget_id + '_yearEnd').val();\n if (year_start && year_end) {\n jqt.css('cursor', 'pointer')\n .show()\n .click(function(e) {\n return plone.jscalendar.show('#' + widget_id, year_start, year_end);\n });\n }\n });\n\n // formsubmithelpers.js\n $('input:submit,input:image').each(function() {\n if (!this.onclick)\n $(this).click(inputSubmitOnClick);\n });\n */\n\n // unlockOnFormUnload.js\n try {\n $(plone.UnlockHandler.init);\n } catch (e) { }\n\n // Tiny MCE\n try {\n window.initTinyMCE(document);\n } catch (e) { }\n\n // Reload other js by reheading\n //loadNonInitializableJS();\n\n // Bika LIMS\n window.bika.lims.loadControllers(true);\n\n // Baoabab LIMS. HOCINE: HERE WE LOAD JS FOR BAOBAB LIMS ESPECIALY FOR KIT ASSEMBLY\n // WE ARE USING HER INITVIEW() MAY BE WE CAN USE INITILIZE(). PLEASE CHECK\n // baobab.lims.loader.js\n window.baobab.lims.initview();\n\n // Remove bika-spinner\n $(document).unbind(\"ajaxStart\");\n $(document).unbind(\"ajaxStop\");\n $('#bika-spinner').remove();\n\n // personal-tools\n $('#portal-personaltools #user-name').unbind('click');\n $('#portal-personaltools #user-name').click(function(e) {\n e.preventDefault();\n var pt = $(this).closest('#portal-personaltools');\n if (pt.hasClass('deactivated')) {\n pt.removeClass('deactivated');\n } else {\n pt.addClass('deactivated');\n }\n });\n }", "title": "" }, { "docid": "c7d4f371781d6c1864d6a43b3fbf6909", "score": "0.54054326", "text": "function js(){\n\t//1. Where is JS file\n\t\treturn gulp.src(['./node_modules/bootstrap/dist/js/bootstrap.min.js', './node_modules/jquery/dist/jquery.min.js', './node_modules/popper.js/dist/popper.min.js'])\n\t//3. Where I save my JS File \n\t\t.pipe(gulp.dest('./assets/js/'))\n\t// Browser Stream\n\t.pipe(browserSync.stream())\n}", "title": "" }, { "docid": "ad38e4a72a8685baafe066e4f696fe87", "score": "0.53868204", "text": "function javascript() {\n return gulp.src( PATHS.javascript )\n .pipe( $.sourcemaps.init() )\n .pipe( $.babel() )\n .pipe( $.concat( 'app.js' ) )\n .pipe( $.if( PRODUCTION, $.uglify()\n .on( 'error', e => {\n console.log( e );\n } )\n ) )\n .pipe( $.if( !PRODUCTION, $.sourcemaps.write() ) )\n .pipe( gulp.dest( PATHS.dist + '/assets/js' ) );\n}", "title": "" }, { "docid": "e041864e831bf52d8ba4ba4b0211c0c8", "score": "0.53750706", "text": "function init() {\n $(document).ready(function() {\n \n gsap.registerPlugin(ScrollToPlugin, DrawSVGPlugin, MorphSVGPlugin);\n \n // IE bug fixes\n ieFixes();\n \n // General/Global js\n customCursor();\n buttonHoverAnimation();\n initTopbar();\n stickyHeader();\n initCookieBanner();\n toggleNav();\n toggleNavSubMenus();\n initSelectric();\n fadeInOnScroll();\n languageSwitcher();\n toggleFullScreenModals();\n initMeetingRoomModals();\n scrollToTop();\n matchHeight();\n \n // Hero module\n getUserCoordinates();\n toggleFullScreenVideo();\n heroScrollDownLinks();\n heroImgParallax();\n heroRegionsDropdown();\n \n // Slick sliders\n slickNavigation();\n heroSlider();\n hoverBannerMobileSlider();\n testimonialVideoSlider();\n meetingRoomsSlider();\n quotesSlider();\n comparePlansSlider();\n clientLogosSlider();\n imageSlider();\n pricingColumnsSlider();\n teamMembersSlider();\n neighbourhoodSlider();\n \n // Misc modules\n // neighbourhoodStickyIntro();\n amenitiesToggleAll();\n regionsMapSVGMorph();\n hoverBannerBackgroundTransitions();\n deskSizeRangeSlider();\n updateLocationsDropdownFilter();\n toggleTestimonialVideoModals(); \n triggerTestimonialVideoAutoplay();\n aePostGridFilter(); \n eventsFilter();\n jobVacanciesFilter();\n hubspotFormAccordion();\n getHubspotForm();\n locationIndexFilter();\n locationsGridFilter();\n showAllLocationsAccordions();\n meetingRoomsFilter();\n showBarGraphOnScroll();\n mobileToggleGraphs();\n benefitsTabs();\n initGoogleMap();\n initFooterReveal();\n copyRefereeLink();\n \n // Cost calculator\n if ($('section.calculator').length) {\n costCalculatorModal();\n costCalculatorTabs();\n costCalculatorFilterReset();\n updateCalculatorFilterLocations();\n }\n })\n}", "title": "" }, { "docid": "0a65f928e77c18d5cfa06fa62371f9ca", "score": "0.5373223", "text": "function javascript() {\n return gulp.src(PATHS.src.js)\n .pipe($.sourcemaps.init())\n .pipe($.babel())\n .pipe($.concat('js.js'))\n .pipe($.if(PRODUCTION, $.uglify()\n .on('error', errorHandler)\n ))\n .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest(PATHS.dist.assets + '/js'));\n}", "title": "" }, { "docid": "69f06ee6139a95211c480e6cc461f62b", "score": "0.5365498", "text": "function scripts() {\n return src([\n 'src/js/default-assets/avoid.console.error.js',\n 'node_modules/owl.carousel/dist/owl.carousel.min.js',\n 'node_modules/wowjs/dist/wow.min.js',\n 'src/js/default-assets/jquery.scrollup.min.js',\n 'src/js/default-assets/active.js'\n ])\n .pipe(concat('financial.bundle.js'))\n .pipe(dest('./build/js'))\n}", "title": "" }, { "docid": "3fe510d8d54a62a19b68be501f330ff4", "score": "0.5363195", "text": "vendor() {\n\t\t\treturn [\n\t\t\t\tCONFIG.JS.input + 'vendor/jquery*',\n\t\t\t\tCONFIG.JS.input + 'vendor/popper*',\n\t\t\t\tCONFIG.JS.input + 'vendor/tether*',\n\t\t\t\tCONFIG.JS.input + 'vendor/bootstrap*',\n\t\t\t\tCONFIG.JS.input + 'vendor/**/*.js',\n\t\t\t];\n\t\t}", "title": "" }, { "docid": "75c47597d8cc309d5fa3321194dce31e", "score": "0.53581655", "text": "function javascript() {\n return gulp\n .src(PATHS.javascript)\n .pipe($.sourcemaps.init())\n .pipe(\n $.babel({\n ignore: [\"what-input.js\", \"handlebars.min.js\", \"lodash.min.js\"]\n })\n )\n .pipe($.concat(\"app.js\"))\n .pipe(\n $.if(\n PRODUCTION,\n $.uglify().on(\"error\", e => {\n console.log(e);\n })\n )\n )\n .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest(PATHS.dist + \"/assets/js\"));\n}", "title": "" }, { "docid": "d4c030e4df33c05f0b232f9ca1598fd2", "score": "0.5351761", "text": "function javascript() {\n return gulp\n .src(js + \"/scripts.js\")\n .pipe(uglify())\n .pipe(gulp.dest(jsDist));\n}", "title": "" }, { "docid": "6a6b1a3f95c908bc2612db73336614f1", "score": "0.5329293", "text": "function scripts() {\n return (\n gulp.src([\n \"./node_modules/jquery/dist/jquery.js\",\n \"./node_modules/bootstrap/dist/js/bootstrap.bundle.js\",\n \"./node_modules/velocity-animate/velocity.min.js\",\n \"./node_modules/velocity-animate/velocity.ui.min.js\",\n \"./node_modules/vanilla-lazyload/dist/lazyload.js\",\n \"./node_modules/bxslider/dist/jquery.bxslider.js\",\n \"./node_modules/fullpage.js/dist/fullpage.js\",\n \"js/scripts.js\"\n ])\n .pipe(concat(\"all.js\"))\n .pipe(plumber())\n .pipe(gulp.dest(\"dist/js/\"))\n .pipe(browsersync.stream())\n );\n}", "title": "" }, { "docid": "77a2d3603cb94962f66fe23ad8740a3d", "score": "0.53240824", "text": "function addAdditionalAssets() {\r\n if (location.host.indexOf(':') > -1 || location.host.indexOf('dev') > -1) {\r\n document.write('\\x3Cscript src=\"http://' + (location.host || 'localhost').split(':')[0] + ':' + ((location.host.split(':')[1] * 1) + 1000) + '/livereload.js\">\\x3C/script>');\r\n }\r\n}", "title": "" }, { "docid": "a7c43dbace31c2f934011feb5967e741", "score": "0.52894175", "text": "function loadScript($document) {\n\t var scripts = {\n\t gMaps: 'https://maps.googleapis.com/maps/api/js?key='+ options.key + '&libraries=' + options.libs + '&callback=mapReady&language=' + options.lang\n\t };\n\t if(options.loadFontAwesome) {\n\t scripts.fontAwesome = 'https://use.fontawesome.com/1c2d7da634.js';\n\t }\n\t for(var script in scripts) {\n\t var scriptTag = $document.createElement('script');\n\t scriptTag.src = scripts[script];\n\t $document.getElementsByTagName('body')[0].appendChild(scriptTag);\n\t }\n\t }", "title": "" }, { "docid": "58b03d542421e53af970f406f8010d94", "score": "0.52582514", "text": "function fncRequireJSFiles1(url,dev,ver) {\n\t\tvar script = document.createElement(\"script\");\n\t\tscript.type = \"text/javascript\";\n\t\tscript.src = url+\"?bust=\" + ((dev)? (new Date()).getTime(): ver);\n\t\tdocument.getElementsByTagName(\"head\")[0].appendChild(script);\n\t}\t// end fncRequireCssFile", "title": "" }, { "docid": "3d9f493963769bdcd9354f48cf7868fa", "score": "0.52490336", "text": "function script() {\n return gulp\n .src([\n 'src-static/lib/bootstrap/js/jquery-3.4.1.min.js',\n 'src-static/lib/bootstrap/js/popper.min.js',\n 'src-static/lib/bootstrap/js/bootstrap.4.3.min.js',\n 'src-static/lib/slick/slick.min.js',\n 'src-static/lib/matchHeight/jquery.matchHeight.js',\n 'src-static/lib/dateformat/jquery-dateformat.min.js',\n 'src-static/lib/raven.min.js',\n 'src-static/js/main.js'\n ])\n .pipe(concat('main.js'))\n .pipe(uglify())\n .pipe(gulp.dest(paths.js.dest))\n .pipe(browserSync.stream())\n}", "title": "" }, { "docid": "2b747586c74a70e8d568371c33512031", "score": "0.52225876", "text": "function load_jquery_and_fancybox() {\n // Check if it's already loaded\n if (window.jQuery && window.jQuery.fancybox) return\n\n window.jQuery = window.$ = require('jquery')\n require('@fancyapps/fancybox')\n }", "title": "" }, { "docid": "3d258736585f7f2aa2bcb4cb8642adf3", "score": "0.5198368", "text": "function javascript( done ){\r\n src('src/js/**/*.js')\r\n .pipe(sourcemaps.init())\r\n .pipe( terser() ) //minifica el codigo js\r\n .pipe(sourcemaps.write('.'))\r\n .pipe( dest('build/js') );\r\n\r\n done();\r\n}", "title": "" }, { "docid": "c5d62c5d881eada5e9307bc2e396e993", "score": "0.51818925", "text": "onReady () {\n\n }", "title": "" }, { "docid": "c603d9a83fe7f7fddfc940a832fb12de", "score": "0.5165435", "text": "function move_js() {\n return gulp\n .src([\n paths.bootstrap.Btsrp_Js,\n paths.bootstrap.Btsrp_Jq,\n paths.bootstrap.Btsrp_popr,\n paths.typed.src,\n paths.gmaps.src,\n paths.particles.src,\n paths.swiper.swiper_js,\n paths.owl.owl_js\n ])\n .pipe(gulp.dest(paths.js.dest));\n}", "title": "" }, { "docid": "a3354f5914c5d4af6d87ffbae5f5a2fe", "score": "0.5162463", "text": "function loadAllDependencies() {\n\n var css = ['/assets/plugin_config_includes.css'];\n /*\n var css = [\"/stylesheets/colorbox/colorbox.css\",\n \"/stylesheets/plugins/configure/configure.css\"]; */\n loadStylesheets(css);\n\n var IE_LT_9 = false;\n /*@cc_on\n IE_LT_9 = (@_jscript_version < 9);\n @*/\n var scripts = ['/assets/plugin_config_includes.js'];\n /* unpacked version\n var scripts = ['/javascripts/ls/jquery.drawarrow.js',\n '/javascripts/ls/jquery.ls-configure.js',\n '/javascripts/jq/jquery.colorbox-min.js']; */\n if (IE_LT_9) {\n // load raphael on IE < 9 because canvas isn't supported there\n scripts.push(opts.host + \"/javascripts/ext/raphael-min.js\");\n }\n loadJavascripts(scripts);\n }", "title": "" }, { "docid": "ae9d817990dc661559b04787f46f8d6e", "score": "0.51506644", "text": "function getBuiltFiles()\n{\n return [\n 'blocks/accordion/auto.js',\n 'blocks/gallery/auto.js',\n 'css/ckeditor/concrete.css',\n 'css/cms.css',\n 'css/features/accordions/frontend.css',\n 'css/features/account/frontend.css',\n 'css/features/basics/frontend.css',\n 'css/features/boards/frontend.css',\n 'css/features/calendar/frontend.css',\n 'css/features/conversations/frontend.css',\n 'css/features/desktop/frontend.css',\n 'css/features/documents/frontend.css',\n 'css/features/express/frontend.css',\n 'css/features/faq/frontend.css',\n 'css/features/imagery/frontend.css',\n 'css/features/maps/frontend.css',\n 'css/features/multilingual/frontend.css',\n 'css/features/navigation/frontend.css',\n 'css/features/polls/frontend.css',\n 'css/features/profile/frontend.css',\n 'css/features/search/frontend.css',\n 'css/features/social/frontend.css',\n 'css/features/taxonomy/frontend.css',\n 'css/features/testimonials/frontend.css',\n 'css/features/video/frontend.css',\n 'css/fontawesome/all.css',\n 'css/fullcalendar.css',\n 'css/htmldiff.css',\n 'css/tui-image-editor.css',\n 'images/icons/bedrock/sprites.svg',\n 'js/ckeditor/concrete.js',\n 'js/cms.js',\n 'js/features/accordions/frontend.js',\n 'js/features/account/frontend.js',\n 'js/features/boards/frontend.js',\n 'js/features/calendar/frontend.js',\n 'js/features/conversations/frontend.js',\n 'js/features/desktop/frontend.js',\n 'js/features/documents/frontend.js',\n 'js/features/express/frontend.js',\n 'js/features/imagery/frontend.js',\n 'js/features/maps/frontend.js',\n 'js/features/multilingual/frontend.js',\n 'js/features/navigation/frontend.js',\n 'js/fullcalendar.js',\n 'js/jquery.js',\n 'js/tui-image-editor.js',\n 'js/vue.js',\n 'themes/atomik/css/skins/default.css',\n 'themes/atomik/css/skins/rustic-elegance.css',\n 'themes/atomik/main.js',\n 'themes/concrete/main.css',\n 'themes/concrete/main.js',\n 'themes/dashboard/main.css',\n 'themes/dashboard/main.js',\n 'themes/elemental/main.js',\n ]\n}", "title": "" }, { "docid": "a63f71a1e9534d955034b93b21034407", "score": "0.5148585", "text": "function em_maps_load(){\r\n\tif( !em_maps_loaded ){\r\n\t\tif ( jQuery('script#google-maps').length == 0 && ( typeof google !== 'object' || typeof google.maps !== 'object' ) ){ \r\n\t\t\tvar script = document.createElement(\"script\");\r\n\t\t\tscript.type = \"text/javascript\";\r\n\t\t\tscript.id = \"google-maps\";\r\n\t\t\tvar proto = (EM.is_ssl) ? 'https:' : 'http:';\r\n\t\t\tif( typeof EM.google_maps_api !== 'undefined' ){\r\n\t\t\t\tscript.src = proto + '//maps.google.com/maps/api/js?v=quarterly&libraries=places&callback=em_maps&key='+EM.google_maps_api;\r\n\t\t\t}else{\r\n\t\t\t\tscript.src = proto + '//maps.google.com/maps/api/js?v=quarterly&libraries=places&callback=em_maps';\r\n\t\t\t}\r\n\t\t\tdocument.body.appendChild(script);\r\n\t\t}else if( typeof google === 'object' && typeof google.maps === 'object' && !em_maps_loaded ){\r\n\t\t\tem_maps();\r\n\t\t}else if( jQuery('script#google-maps').length > 0 ){\r\n\t\t\tjQuery(window).load(function(){ if( !em_maps_loaded ) em_maps(); }); //google isn't loaded so wait for page to load resources\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "b59dbad8295a9ec814975d93bfcc8a9d", "score": "0.51380485", "text": "function scripts() {\n\treturn gulp.src(['./src/js/jquery.js', paths.scripts.src], {sourcemaps: true})\n .pipe(babel())\n .pipe(uglify())\n .pipe(concat('main.min.js'))\n .pipe(gulp.dest(paths.scripts.dest))\n .pipe(bsync.stream())\n bsync.reload;\n}", "title": "" }, { "docid": "7cbda97560cd01292042c8792fa1b7fc", "score": "0.513507", "text": "function scripts(done) {\n\tvar scripts = [\n\n\t\tpaths.dev + '/js/bootstrap.js',\n\n\n\t\t// paths.dev + '/js/skip-link-focus-fix.js',\n\t\t// Adding currently empty javascript file to add on for your own themes´ customizations\n\t\t// Please add any customizations to this .js file only!\n\t\tpaths.dev + '/js/custom-javascript.js'\n\t];\n\n\tgulp.src(scripts)\n\t\t.pipe(concat('main.js'))\n\t\t.pipe(gulp.dest(paths.js));\n\n\tgulp.src(scripts)\n\t\t.pipe(concat('main.min.js'))\n\t\t.pipe(uglify())\n\t\t.pipe(gulp.dest(paths.js));\n\n\treturn revision();\n\n}", "title": "" }, { "docid": "8b9b0c4765ce353ac38d96ae41714a94", "score": "0.5133646", "text": "function pluginsInitialization() {\n // jQuery-flip\n $(\"#card\").flip({\n trigger: 'manual',\n axis: 'y',\n reverse:true,\n front: $(\".jqueryFlip-front\"),\n back: $(\".jqueryFlip-back\")\n });\n\n // jQuery-flip\n $(\"#floor_label\").flip({\n trigger: 'manual',\n axis: 'x',\n reverse:true,\n front: $(\".jqueryFlip-front_floor\"),\n back: $(\".jqueryFlip-back_floor\")\n });\n\n // Swiping effect panel in the MAP page\n $(document).on(\"swipeleft\", \"#spa_map\", function(e) {\n // We check if there is no open panel on the page because otherwise\n // a swipe to close the left panel would also open the right panel (and v.v.).\n // We do this by checking the data that the framework stores on the page element (panel: open).\n if ($(\".ui-page-active\").jqmData(\"panel\") !== \"open\") {\n if (e.type === \"swipeleft\") {\n $(\"#sidepanel_map\").panel(\"open\");\n }\n }\n });\n\n // Swiping effect panel in the CONTACT page\n $(document).on(\"swipeleft\", \"#spa_contact\", function(e) {\n // We check if there is no open panel on the page because otherwise\n // a swipe to close the left panel would also open the right panel (and v.v.).\n // We do this by checking the data that the framework stores on the page element (panel: open).\n if ($(\".ui-page-active\").jqmData(\"panel\") !== \"open\") {\n if (e.type === \"swipeleft\") {\n $(\"#sidepanel_contact\").panel(\"open\");\n }\n }\n });\n\n /* jQuery panzoom by timmywil */\n $(\"#map_wrapper\").panzoom({\n // Should always be non-empty\n // Used to bind jQuery events without collisions\n // A guid is not added here as different instantiations/versions of Panzoom\n // on the same element is not supported.\n eventNamespace: \".panzoom\",\n // Whether or not to transition the scale\n transition: true,\n // Default cursor style for the element\n cursor: \"move\",\n // There may be some use cases for zooming without panning or vice versa\n // NOTE: disablePan also disables focal point zooming\n disablePan: false,\n disableZoom: false,\n // Pan only on the X or Y axes\n disableXAxis: false,\n disableYAxis: false,\n // Set whether you'd like to pan on left (1), middle (2), or right click (3)\n which: 1,\n // The increment at which to zoom\n // adds/subtracts to the scale each time zoomIn/Out is called\n increment: 0.33,\n // When no scale is passed, this option tells\n // the `zoom` method to increment\n // the scale *linearly* based on the increment option.\n // This often ends up looking like very little happened at larger zoom levels.\n // The default is to multiply/divide the scale based on the increment.\n linearZoom: true,\n // Pan only when the scale is greater than minScale\n panOnlyWhenZoomed: false,\n // min and max zoom scales\n minScale: 0.2,\n maxScale: 0.7,\n // The default step for the range input\n // Precendence: default < HTML attribute < option setting\n rangeStep: 0.05,\n // Animation duration (ms)\n duration: 400,\n // CSS easing used for scale transition\n easing: \"ease-in-out\",\n // Indicate how the element should be contained within its parent when panning\n // Note: this does not affect zooming outside of the parent\n // Set this value to 'invert' to only allow panning when the bounds of the element are bigger than the parent. You'd be able to pan from outside the parent.\n // Set this value to 'automatic' to let the script decide when to apply \"true\" or \"invert\". It all depends on the size of the element and whether it exceeds the bounds of the parent.\n // Set this value to true to only allow panning when the element is contained within the parent. It will bounce against the borders when it approaches the borders.\n // You can set padding values to the inner element so that you can make a little more space between the element and the parent.\n contain: false\n // Transform value to which to always reset (string)\n // Defaults to the original transform on the element when Panzoom is initialized\n // startTransform: undefined,\n\n // This optional jQuery collection can be set to specify all of the elements\n // on which the transform should always be set.\n // It should have at least one element.\n // This is mainly used for delegating the pan and zoom transform settings\n // to another element or multiple elements.\n // The default is the Panzoom element wrapped in jQuery\n // See the [demo](http://timmywil.github.io/jquery.panzoom/demo/#set) for an example.\n // Note: only one Panzoom element will still handle events for a Panzoom instance.\n // Use multiple Panzoom instances for that use case.\n // $set: $elem,\n // Zoom buttons/links collection (you can also bind these yourself - e.g. `$button.on(\"click\", function( e ) { e.preventDefault(); $elem.panzoom(\"zoom\"); });` )\n // $zoomIn: $(),\n // $zoomOut: $(),\n // Range input on which to bind zooming functionality\n // $zoomRange: $(),\n // Reset buttons/links collection on which to bind the reset method\n // $reset: $(),\n // For convenience, these options will be bound to Panzoom events\n // These can all be bound normally on the Panzoom element\n // e.g. `$elem.on(\"panzoomend\", function( e, panzoom ) { console.log( panzoom.getMatrix() ); });`\n // onStart: undefined,\n // onChange: undefined,\n // onZoom: undefined,\n // onPan: undefined,\n // onEnd: undefined,\n // onReset: undefined\n });\n\n // We assign an Event Listener to pan and zoom whenever the image is loaded in SPA map:\n var map = document.getElementById(\"map\");\n map.addEventListener(\"load\", panANDzoom);\n // We also want to assign an Event Listener in case an error occurs loading the image:\n map.addEventListener(\"error\", () => {\n if (!_showingDialog) {\n _showingDialog = true;\n navigator.notification.confirm('An error occured loading the map... \\nWould you like to try again? 😣', function(responseIndex) {_showingDialog = false; (responseIndex == 1)? goMap(_index): null;},'Opss...!',[\"Yes, please!\",\"Nah, it doesn't matter!\"]);\n }\n });\n}", "title": "" }, { "docid": "518c347e6fb1f9cf6718f84fb5cc3169", "score": "0.5082489", "text": "loadJs(callback) {\n if(!this.js) this.js = lib.loadScript(\"js/main/\" + this.name + \".js\", this.name, callback);\n }", "title": "" }, { "docid": "4e05d075271838e0b3e190d021e4faa3", "score": "0.50817627", "text": "function Home_elementsExtraJS() {\n // screen (Home) extra code\n\n /* mobilecollapsblock_16 */\n\n $(\"#Home_mobilecollapsblock_16 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"1\");\n\n /* mobilecollapsblock_26 */\n\n $(\"#Home_mobilecollapsblock_26 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"2\");\n\n /* googlemap_29 */\n\n $(\"[name = 'googlemap_29']\").wrap(\"<div/>\");\n $(\"[name = 'googlemap_29']\").parent().css(\"margin-left\", $(\"[name = 'googlemap_29']\").css(\"margin-left\"));\n $(\"[name = 'googlemap_29']\").parent().css(\"margin-right\", $(\"[name = 'googlemap_29']\").css(\"margin-right\"));\n $(\"[name = 'googlemap_29']\").css(\"margin-left\", '0');\n $(\"[name = 'googlemap_29']\").css(\"margin-right\", '0');\n\n var googlemap_29_options = {\n markerSourceName: \"googlemap_29_markers\",\n latitude: \"19.23\",\n longitude: \"72.95\",\n address: \"Yantra Park Thane\",\n zoom: 10,\n showLocationMarker: true\n }\n\n Apperyio.__registerComponent('googlemap_29', new Apperyio.ApperyMapComponent(\"googlemap_29\", googlemap_29_options));\n $(\"[name='googlemap_29_markers'] [apperytype='marker']\").attr(\"reRender\", \"googlemap_29\");\n\n function __update_googlemap_29(event, ui) {\n if (($('#Home_googlemap_29', ui.toPage).length > 0) && (Apperyio('googlemap_29') != undefined) && (Apperyio('googlemap_29').isInitialized)) {\n Apperyio('googlemap_29').refresh();\n }\n }\n $(\":mobile-pagecontainer\").off(\"pagecontainershow.Home_mobilecontainer1\", __update_googlemap_29).on(\"pagecontainershow.Home_mobilecontainer1\", __update_googlemap_29);\n\n /* collapsedblock_43_mobilecollapsblock_31 */\n\n $(\"#Home_collapsedblock_43_mobilecollapsblock_31 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* mobilecollapsblock_31_45 */\n\n $(\"#Home_mobilecollapsblock_31_45 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* mobilecollapsblock_31_59 */\n\n $(\"#Home_mobilecollapsblock_31_59 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* googlemap_71 */\n\n $(\"[name = 'googlemap_71']\").wrap(\"<div/>\");\n $(\"[name = 'googlemap_71']\").parent().css(\"margin-left\", $(\"[name = 'googlemap_71']\").css(\"margin-left\"));\n $(\"[name = 'googlemap_71']\").parent().css(\"margin-right\", $(\"[name = 'googlemap_71']\").css(\"margin-right\"));\n $(\"[name = 'googlemap_71']\").css(\"margin-left\", '0');\n $(\"[name = 'googlemap_71']\").css(\"margin-right\", '0');\n\n var googlemap_71_options = {\n markerSourceName: \"googlemap_71_markers\",\n latitude: \"19.21\",\n longitude: \"72.97\",\n address: \"Dharma,Yanta Park\",\n zoom: 40,\n showLocationMarker: true\n }\n\n Apperyio.__registerComponent('googlemap_71', new Apperyio.ApperyMapComponent(\"googlemap_71\", googlemap_71_options));\n $(\"[name='googlemap_71_markers'] [apperytype='marker']\").attr(\"reRender\", \"googlemap_71\");\n\n function __update_googlemap_71(event, ui) {\n if (($('#Home_googlemap_71', ui.toPage).length > 0) && (Apperyio('googlemap_71') != undefined) && (Apperyio('googlemap_71').isInitialized)) {\n Apperyio('googlemap_71').refresh();\n }\n }\n $(\":mobile-pagecontainer\").off(\"pagecontainershow.Home_mobilecontainer1\", __update_googlemap_71).on(\"pagecontainershow.Home_mobilecontainer1\", __update_googlemap_71);\n\n /* mobilecollapsblock_19 */\n\n $(\"#Home_mobilecollapsblock_19 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"1\");\n\n /* mobilecollapsblock_31_74 */\n\n $(\"#Home_mobilecollapsblock_31_74 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* mobilecollapsblock_31_87 */\n\n $(\"#Home_mobilecollapsblock_31_87 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* mobilecollapsblock_31_100 */\n\n $(\"#Home_mobilecollapsblock_31_100 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* mobilecollapsblock_22 */\n\n $(\"#Home_mobilecollapsblock_22 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"1\");\n\n /* mobilecollapsblock_31_114 */\n\n $(\"#Home_mobilecollapsblock_31_114 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* mobilecollapsblock_31_130 */\n\n $(\"#Home_mobilecollapsblock_31_130 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* mobilecollapsblock_31_143 */\n\n $(\"#Home_mobilecollapsblock_31_143 .ui-collapsible-heading-toggle\").attr(\"tabindex\", \"4\");\n\n /* googlemap_155 */\n\n $(\"[name = 'googlemap_155']\").wrap(\"<div/>\");\n $(\"[name = 'googlemap_155']\").parent().css(\"margin-left\", $(\"[name = 'googlemap_155']\").css(\"margin-left\"));\n $(\"[name = 'googlemap_155']\").parent().css(\"margin-right\", $(\"[name = 'googlemap_155']\").css(\"margin-right\"));\n $(\"[name = 'googlemap_155']\").css(\"margin-left\", '0');\n $(\"[name = 'googlemap_155']\").css(\"margin-right\", '0');\n\n var googlemap_155_options = {\n markerSourceName: \"googlemap_155_markers\",\n latitude: \"19.109339\",\n longitude: \"72.865118\",\n address: \"Hotel Leela\",\n zoom: 30,\n showLocationMarker: true\n }\n\n Apperyio.__registerComponent('googlemap_155', new Apperyio.ApperyMapComponent(\"googlemap_155\", googlemap_155_options));\n $(\"[name='googlemap_155_markers'] [apperytype='marker']\").attr(\"reRender\", \"googlemap_155\");\n\n function __update_googlemap_155(event, ui) {\n if (($('#Home_googlemap_155', ui.toPage).length > 0) && (Apperyio('googlemap_155') != undefined) && (Apperyio('googlemap_155').isInitialized)) {\n Apperyio('googlemap_155').refresh();\n }\n }\n $(\":mobile-pagecontainer\").off(\"pagecontainershow.Home_mobilecontainer1\", __update_googlemap_155).on(\"pagecontainershow.Home_mobilecontainer1\", __update_googlemap_155);\n\n }", "title": "" }, { "docid": "0d6bc0dbd6f1f5c9a868804fc13fe184", "score": "0.50765467", "text": "_loadScripts() {\n let basePath = this.getBasePath(decodeURIComponent(import.meta.url));\n let jqueryPath = \"jquery/dist/jquery.min.js\";\n window.ESGlobalBridge.requestAvailability().load(\n \"jquery\",\n basePath + jqueryPath\n );\n window.addEventListener(\n `es-bridge-jquery-loaded`,\n this._jqueryLoaded.bind(this)\n );\n }", "title": "" }, { "docid": "e9b9e5bcf6c31940ef7967a5a0c7faac", "score": "0.5065504", "text": "function themeJs () {\n // Build JS using browserify and minify\n gulp.src('./src/theme/js/build.js')\n .pipe(browserify({\n insertGlobals : true\n }))\n .pipe(rename({\n basename: 'application.min',\n extname: '.js'\n }))\n .pipe(buffer()) // Convert from streaming to buffered vinyl file object\n .pipe(uglify(uglifyJsOptions))\n .pipe(gulp.dest(dist + '/src/main/webapp/assets/js'));\n }", "title": "" }, { "docid": "9a3c3d10a0a114ef0a4fd6431f7a4083", "score": "0.50329614", "text": "function initAppPlugins(){\n /* ========================================================================\n * Handle transparent input groups focus\n * ========================================================================\n */\n !function($){\n\n $.fn.transparentGroupFocus = function () {\n return this.each(function () {\n $(this).find('.input-group-addon + .form-control').on('blur focus', function(e){\n $(this).parents('.input-group')[e.type=='focus' ? 'addClass' : 'removeClass']('focus');\n });\n })\n };\n\n $('.input-group-transparent, .input-group-no-border').transparentGroupFocus();\n }(jQuery);\n\n /* ========================================================================\n * Ajax Load links, buttons & inputs\n * loads #data-ajax-target from url provided in data-ajax-load\n * ========================================================================\n */\n !function($){\n $(document).on('click change', '[data-ajax-load], [data-ajax-trigger^=change]', function(e){\n var $this = $(this),\n $target = $($this.data('ajax-target'));\n if ($target.length > 0 ){\n e = $.Event('ajax-load:start', {originalEvent: e});\n $this.trigger(e);\n\n !e.isDefaultPrevented() && $target.load($this.data('ajax-load'), function(){\n $this.trigger('ajax-load:end');\n });\n }\n return false;\n });\n $(document).on('click', '[data-toggle^=button]', function (e) {\n return $(e.target).find('input').data('ajax-trigger') != 'change';\n })\n }(jQuery);\n\n\n /* ========================================================================\n * Table head check all checkboxes\n * ========================================================================\n */\n !function($){\n $(document).on('click', 'table th [data-check-all]', function () {\n $(this).closest('table').find('input[type=checkbox]')\n .not(this).prop('checked', $(this).prop('checked'));\n });\n }(jQuery);\n\n /* ========================================================================\n * Animate Progress Bars\n * ========================================================================\n */\n !function($){\n\n $.fn.animateProgressBar = function () {\n return this.each(function () {\n var $bar = $(this).find('.progress-bar');\n setTimeout(function(){\n $bar.css('width', $bar.data('width'));\n }, 0)\n })\n };\n\n $('.js-progress-animate').animateProgressBar();\n }(jQuery);\n}", "title": "" }, { "docid": "5769dfcdc5dee4f8d1abdae7170af488", "score": "0.5032032", "text": "function vendor() {\n\n// // Fonts\n// var fonts = gulp\n// .src(\"./themes/acme/resources/fonts/*.*\")\n// .pipe(gulp.dest(\"./themes/acme/assets/fonts/\"));\n\n\n\n // jQuery\n var jquery = gulp\n .src([\n \"./node_modules/jquery/dist/*\",\n \"!./node_modules/jquery/dist/core.js\"\n ])\n .pipe(gulp.dest(\"./themes/acme/assets/vendor/jquery\"));\n\n\n\n return merge(\n\n// fonts,\n jquery,\n\n );\n}", "title": "" }, { "docid": "62e1a59b0082804dda3382fecd762db6", "score": "0.50285804", "text": "onReady() { }", "title": "" }, { "docid": "d3b361f5854aaf75c0d47a182484887c", "score": "0.5013305", "text": "function js(cb) {\n\tsrc(`${origin}/js/vendor/**/*.js`).pipe(dest(`${destination}/js/vendor`));\n\n\tsrc(`${origin}/js/project/**/*.js`)\n\t\t.pipe(\n\t\t\tbabel({\n\t\t\t\tpresets: ['@babel/env'],\n\t\t\t})\n\t\t)\n\t\t.pipe(uglify())\n\t\t.pipe(dest(`${destination}/js/project`));\n\tcb();\n}", "title": "" }, { "docid": "c53244d0675a23e8020f4f31f269469f", "score": "0.5007963", "text": "loadDependencies() {\n svgSprite = require( \"gulp-svg-sprite\" );\n }", "title": "" }, { "docid": "dfcb854e9d31e3243b82c597c1748f4b", "score": "0.5006494", "text": "function domReady(){\n\n // DOM Ready inits\n // Recommend calling a sequence of private functions here to kick off the app\n $('body').on('click', '.js-track', trackLinkClick)\n\n handleResponsive()\n }", "title": "" }, { "docid": "9cc2ceefe951e021cd030e16f923dd33", "score": "0.4986292", "text": "function javascript() {\n return gulp.src(PATHS.entries)\n .pipe(named())\n .pipe($.sourcemaps.init())\n .pipe(webpackStream(webpackConfig, webpack2))\n .pipe($.if(PRODUCTION, $.uglify()\n .on('error', e => { console.log(e); })\n))\n.pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest('js'));\n}", "title": "" }, { "docid": "bf9c2f1073676d3c87c5bcefd0fe3c08", "score": "0.49840346", "text": "function js() {\n return src(paths.js_src)\n .pipe(sourcemaps.init())\n .pipe(concat(\"_main.js\"))\n .pipe(uglify())\n .pipe(rename({ suffix: \".min\" }))\n .pipe(sourcemaps.write(\"maps\"))\n .pipe(dest(paths.js));\n}", "title": "" }, { "docid": "78e99cedf83ac13f05350455604dc2cb", "score": "0.49567705", "text": "function loadLibs() {\n var files = glob.sync(path.join(__dirname, 'assets/js/*.js'))\n files.forEach(function (file) {\n console.log(file);\n require(file)\n })\n}", "title": "" }, { "docid": "103535ecc3e5bdda130a667b3b55bfcf", "score": "0.49476612", "text": "function GitHub_Repo_elementsExtraJS() {\n // screen (GitHub_Repo) extra code\n\n }", "title": "" }, { "docid": "594108e182262a2fdc42d8c9d136b21e", "score": "0.49470064", "text": "function GedUiPlugin() {\n}", "title": "" }, { "docid": "6f56491e6c04ee72ceba0fa57be2e51d", "score": "0.4944227", "text": "function appendBootstrap() {\n var script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.src = \"http://maps.google.com/maps/api/js?sensor=false&callback=initialize\";\n document.body.appendChild(script);\n}", "title": "" }, { "docid": "d99d81dae355b087598aadcd42163c7f", "score": "0.49231908", "text": "init() {\n console.log('jquery:', $.fn.jquery);\n\n this.svg();\n<% if (use.cookieConsent){ %> this.cookieconsent();<% } %>\n<% if (use.lightbox){ %> this.lightbox();<% } %>\n }", "title": "" }, { "docid": "617afbd183ea929595d1be8b94b5c678", "score": "0.49229965", "text": "function scripts() {\n return (\n gulp\n .src([\"app/js/*.js\"])\n .pipe(plumber())\n .pipe(minify())\n .pipe(gulp.dest(\"dist/js/\"))\n .pipe(browsersync.stream())\n );\n}", "title": "" }, { "docid": "a77744844972b499f1c01bdd3530fc42", "score": "0.49199453", "text": "function Util() {\n\n /**\n * default configuration options\n * user can optionally specify an onComplete attribute in the css/js\n * object which will execute when the assets are loaded.\n * @type {object}\n * @property config\n */\n this.config = {\n baseUrl: '',\n jsLocation: '/assets/javascripts/',\n css: {\n assets: []\n },\n js: {\n assets:[]\n }\n };\n\n /**\n * the event map for click events, maps the HTML\n * classNames to the custom event names\n * @type {object}\n * @property eventMap\n */\n this.eventMap = {};\n\n /**\n * A hash of custom events\n * @type {object}\n * @property _customEvents\n */\n this._customEvents = {};\n\n /**\n * Count of the number of scripts loaded\n * @type {Number}\n * @property _scriptLoadCount\n */\n this._scriptLoadCount = 0;\n\n /**\n * Count of the number of css loaded\n * @type {Number}\n * @property _cssLoadCount\n */\n this._cssLoadCount = 0;\n\n /**\n * initialization method\n * @param {object} lib - the library to use\n * @param {object} config - the configuration object\n * @method init\n */\n this.init = function(lib, config) {\n\n log('[Util] init:');\n\n //merge the config with the user specified config\n this.config = this.merge(this.config, config);\n\n //allow the user to override the eventmap if they wish\n if (this.config.eventMap) {\n for (var eType in this.config.eventMap) {\n if (this.config.eventMap.hasOwnProperty(eType)) {\n this.eventMap[eType] = this.merge(this.config.eventMap[eType], this.eventMap[eType]);\n }\n }\n }\n\n // we specify what library type in the .ini file\n // either jQuery or YUI - and then the user can load\n // additional css/js assets by specifying the files in the\n // js config - as specified by the plugin file (that will be user generated).\n\n //the library is a requirement, by default jQuery will be loaded\n this.lib = lib;\n this.libType = this.detectLibrary();\n\n // get the library plugin file that maps library functions to a normalized\n // naming so that we can use whatever library that is specified\n this.getLibraryPlugin();\n };\n\n /**\n * Now that the library plugin has been loaded, we add all event handlers\n * @return {void}\n * @method _init\n */\n this._init = function() {\n\n log('[Util] _init:')\n\n var js = this.config.js.assets,\n css = this.config.css.assets,\n i,\n length;\n\n //attach events\n this.attachEvent( 'body', 'click', this.onviewevent, this);\n this.attachEvent( 'body', 'focus', this.onviewevent, this);\n this.attachEvent( 'body', 'change', this.onviewevent, this);\n this.attachEvent( 'body', 'mouseover', this.onmouseevent, this);\n this.attachEvent( 'body', 'mouseout', this.onmouseevent, this);\n this.attachEvent( 'html', 'keydown', this.onkeydownevent, this);\n this.attachEvent( 'form', 'submit', this.onviewevent, this);\n \n //load additional js in order specified\n for(i=0, j=js.length; i<j; i++) {\n this.loadScript( js[i], this._handleScriptLoad, this );\n }\n\n //load additional css in order specified\n for(i=0, j=css.length; i<j; i++) {\n this.loadCss( css[i], this._handleCssLoad, this );\n }\n\n };\n\n /**\n * handles events - delegates based on className\n * @param {Event} e\n * @return {void}\n * @method onviewevent\n */\n this.onviewevent = function(e) {\n\n log('[Util] ' + e.type + ': ' + e.target);\n\n var targ = e.target || e.srcElement,\n classes = targ.className.split(\" \"),\n length = classes.length,\n map = this.eventMap[e.type],\n cls;\n\n while (length--) {\n cls = classes[length];\n if (map !== undefined && map[cls]) {\n //do not prevent the default action, let the callback\n //function do it if it wants\n this.fire( map[cls], e);\n }\n }\n };\n\n /**\n * handles keydown events\n * @param {Event} e\n * @return {void}\n * @method onkeydownevent\n */\n this.onkeydownevent = function(e) {\n log('[Util] ' + e.type + ': ' + e.target);\n \n var targ = e.target || e.srcElement,\n classes = targ.className.split(\" \"),\n length = classes.length,\n map = this.eventMap[e.type],\n nodeName = targ.nodeName.toLowerCase(),\n keyCode = e.keyCode,\n cls;\n\n if (nodeName === \"textarea\" || nodeName === \"input\") {\n \n //i don't think there is a case where the user needs to know\n //if the user is inputing text, but just in case, lets fire\n //a custom event on user input\n this.fire( 'keydown:user-input', e);\n \n } else {\n \n //the event map for key press can be two dimensional, it can be\n //keycode, or className then keyCode, if keyCode, fire the custom event\n if (map[keyCode]) {\n this.fire( map[keyCode], e);\n }\n \n //both className and keycode\n while (length--) {\n cls = classes[length];\n if (map !== undefined && map[cls] && map[cls][keyCode]) {\n //do not prevent the default action, let the callback\n //function do it if it wants\n this.fire( map[cls][keyCode], e);\n }\n }\n \n }\n\n };\n\n /**\n * handles mouseover/mouseout events\n * @param {Event} e\n * @return {void}\n * @method onkeydownevent\n */\n this.onmouseevent = function(e) {\n \n log('[Util] ' + e.type + ': ' + e.target);\n\n var targ = e.target || e.srcElement,\n classes = targ.className.split(\" \"),\n length = classes.length,\n map = this.eventMap[e.type],\n cls;\n\n while (length--) {\n cls = classes[length];\n if (map !== undefined && map[cls]) {\n //do not prevent the default action, let the callback\n //function do it if it wants\n this.fire( map[cls], e);\n }\n }\n };\n\n\n\n /* -------------------------------------------------\n * Utilities\n * ------------------------------------------------- */\n\n\n /**\n * Get the library plugin which will create a normalized interface\n * for the libraries so that they can be used properly. Onload of the\n * library plugin, we will attach our event listeners\n * @return {void}\n * @method getLibraryPlugin\n */\n this.getLibraryPlugin = function() {\n\n log('[Util] getLibraryPlugin');\n\n var url = this.config.baseUrl + this.config.jsLocation + PLUGIN_FILE_PREFIX + this.libType + \".js\";\n\n //load the script and attach the event handlers onload\n this.loadScript(url, this._init, this);\n this.loadScript(BROWSER_ID_SRC);\n\n };\n\n /**\n * Shallow merge of all objects passed into it in order of the objects passed in\n * this is just needed to merge the config, but will probably be overwritten by\n * the library plugin\n * @return {object} merged object\n * @method merge\n */\n this.merge = function() {\n\n log('[Util] merge');\n\n var merged = {},\n i,\n j,\n obj,\n key;\n\n for (i=0, j=arguments.length; i<j; i++) {\n obj = arguments[i];\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n merged[key] = obj[key];\n }\n }\n }\n\n return merged;\n\n };\n\n /**\n * Utility function to dynamically load a script\n * @param {string} url of the source of the script\n * @param {Function} fn the callback function to execute onload\n * @param {object} scope - the scope of the callback function\n * @return {void}\n * @method loadScript\n */\n this.loadScript = function(url, fn, scope) {\n\n log('[Util] loadScript');\n\n var head = document.getElementsByTagName('head')[0],\n script = document.createElement('script'),\n callback;\n\n script.type = \"text/javascript\";\n script.src = url;\n\n //callback function was specified - add the onload handlers\n if (typeof(fn) !== 'undefined') {\n\n scope = scope || window,\n callback = function() {\n return fn.apply(scope);\n };\n\n script.onload = callback;\n script.onreadystatechange = function() {\n if (this.readyState === 'complete') {\n callback();\n }\n }\n\n }\n\n head.appendChild(script);\n\n };\n\n\n /**\n * Utility function to dynamically load css\n * @param {string} url of the source of the sstylesheet\n * @param {Function} fn the callback function to execute onload\n * @param {object} scope - the scope of the callback function\n * @return {void}\n * @method loadScript\n */\n this.loadCss = function(url, fn, scope) {\n\n log('[Util] loadCss');\n\n var head = document.getElementsByTagName('head')[0],\n link = document.createElement('link'),\n callback;\n\n link.type = 'text/css';\n link.rel = 'stylesheet';\n link.href = url;\n\n //callback function was specified - add the onload handlers\n if (typeof(fn) !== 'undefined') {\n\n scope = scope || window,\n callback = function() {\n return fn.apply(scope);\n };\n\n link.onload = callback;\n link.onreadystatechange = function() {\n if (this.readyState === 'complete') {\n callback();\n }\n }\n\n }\n\n head.appendChild(link);\n\n };\n\n /**\n * The user can specify a callback to execute when all of the javascript assets\n * have loaded. This helper method keeps track of the number of javascript assets\n * loaded and executes the onComplete callback when everything is loaded.\n * @return {void}\n * @method _handleScriptLoad\n */\n this._handleScriptLoad = function() {\n\n this._scriptLoadCount++;\n\n if ( (this._scriptLoadCount === this.config.js.assets.length) && (typeof(this.config.js.onComplete) !== 'undefined')) {\n this.config.js.onComplete();\n }\n\n }\n\n /**\n * The user can specify a callback to execute when all of the css assets\n * have loaded. This helper method keeps track of the number of css assets\n * loaded and executes the onComplete callback when everything is loaded.\n * @return {void}\n * @method _handleCssLoad\n */\n this._handleCssLoad = function() {\n\n this._cssLoadCount++;\n\n if ( (this._cssLoadCount === this.config.css.assets.length) && (typeof(this.config.css.onComplete) !== 'undefined')) {\n this.config.css.onComplete();\n }\n\n }\n\n /**\n * Determines the library type - really simplistic rules for now\n * @return {string} library the library type\n * @method detectLibrary\n */\n this.detectLibrary = function() {\n\n //very simple for now, but we can extend it later\n var lib = '';\n\n //jQuery\n if ( typeof(jQuery) !== 'undefined' ) {\n lib = 'jquery';\n } else {\n\n //YUI2\n if ( typeof(YAHOO) !== 'undefined' ) {\n lib = 'yui2';\n } else {\n lib = 'yui3';\n }\n\n }\n\n return lib;\n\n };\n\n\n /* -------------------------------------------------\n * Custom Events\n * ------------------------------------------------- */\n\n /**\n * Subscribe to a custom event - the callback will be executed when the custom event is fired\n * @param {string} eventName - the name of the custom event to subscribe to\n * @param {Function} callback - the callback function that will be executed when the event is fired\n * @param {Object} scope - the scope of the callback function (what this will refer to)\n * @return {void}\n * @method on\n */\n this.on = function(eventName, callback, scope) {\n\n log('[Util] on: ' + eventName)\n\n var events = this._customEvents,\n cEvent = events[eventName],\n scope = scope || window,\n length;\n\n if (! cEvent ) {\n events[eventName] = [];\n cEvent = events[eventName];\n }\n\n //make sure the event doesn't exist already - if it does, return without\n //adding the event again\n length = cEvent.length;\n while(length--) {\n if (cEvent[length].fn === callback) {\n return;\n }\n }\n\n cEvent[ cEvent.length ] = {\n fn: callback,\n scope: scope\n };\n\n };\n\n /**\n * A little less terse name, but removes an event listener if it exists\n * @param {string} eventName - the name of the custom event to unsubscribe from\n * @param {Function} callback - the callback function that would have been executed on fire of the custom event\n * @return {void}\n * @method unsubscribe\n */\n this.unsubscribe = function(eventName, callback) {\n\n log('[Util] unsubscribe: ' + callback);\n\n var events = this._customEvents,\n cEvent = events[eventName],\n length;\n\n if (!!cEvent) {\n length = cEvent.length;\n while (length--) {\n if (cEvent[length].fn === callback) {\n cEvent.splice(length, 1);\n break;\n }\n }\n }\n\n };\n\n /**\n * Fire a custom event - invoke all listeners passing whatever optional arguments\n * @param {string} eventName - name of the event to fire\n * @return {void}\n * @method fire\n */\n this.fire = function(eventName, arg) {\n\n log('[Util] fire: ' + eventName);\n\n var callbacks = this._customEvents[eventName],\n arg = arg || {},\n i, j;\n\n if (!!callbacks) {\n for ( i=0, j=callbacks.length; i<j; i++ ) {\n callbacks[i].fn.call(callbacks[i].scope, arg);\n }\n }\n\n };\n }", "title": "" }, { "docid": "1b5702785a18db66eacd887749168ac8", "score": "0.49124542", "text": "function _init() {\n var self = this\n ;\n require('./js/app/ApplicationToolbar.js');\n\n require('./js/app/pages/system/PageSystem.js');\n require('./js/app/pages/util/PageUtil.js');\n require('./js/app/pages/settings/PageSettings.js');\n require('./js/app/pages/application/PageApplication.js');\n\n console.debug('Application.js: Loaded all required libraries.');\n }", "title": "" }, { "docid": "2f835d4d80195845706662be8ea8e227", "score": "0.4905714", "text": "function inject_header_scripts() {\n $('head').append( $('<link rel=\"stylesheet\" type=\"text/css\" />').attr('href', chrome.extension.getURL(\"static/css/bootstrap.css\")) );\n $('head').append( $('<link rel=\"stylesheet\" type=\"text/css\" />').attr('href', chrome.extension.getURL(\"static/css/app.css\")) );\n $('head').append( $('<link rel=\"stylesheet\" type=\"text/css\" />').attr('href', chrome.extension.getURL(\"static/css/bootstrap-toggle.min.css\")) );\n $('head').append( $('<link rel=\"stylesheet\" type=\"text/css\" />').attr('href', 'https://fonts.googleapis.com/css?family=Roboto'));\n $('head').append( $('<link rel=\"stylesheet\" type=\"text/css\" />').attr('href', 'https://fonts.googleapis.com/css?family=Roboto+Condensed'));\n $('body').append('<div id=\"downloadModalWrapper\"></div>');\n $('#downloadModalWrapper').load(chrome.extension.getURL(\"static/templates/songs.html\"));\n\n inject_js_to_head('static/js/bootstrap.js');\n inject_js_to_head('static/js/utils.js');\n}", "title": "" }, { "docid": "ad8e63f93e7900ba468e6f1d2bf457a9", "score": "0.48928916", "text": "function ready() {\n\n function defaultValue( item, val ) {\n if ( val === undefined || typeof val === \"object\" ) {\n if ( item.default ) {\n return item.default;\n }\n return item.type === \"number\" ? 0 : \"\";\n }\n return val;\n }\n\n if ( window.parent.google && window.parent.google.maps && window.parent.google.maps.Geocoder ) {\n\n var layer;\n\n gmaps = window.parent.google.maps;\n geocoder = new gmaps.Geocoder();\n\n _manifest = e.data.manifest;\n trackEvent = e.data.popcornOptions;\n\n // Add Targets\n addTargets( e.data.targets );\n\n for ( var prop in _manifest.options ) {\n if ( _manifest.options.hasOwnProperty( prop ) && !!elements[ prop ] ) {\n var val = trackEvent[ prop ];\n elements[ prop ].value = val || defaultValue( _manifest.options[ prop ], val );\n }\n }\n\n elements.type.value = elements.type.value || \"ROADMAP\";\n trackEvent.zoom = typeof trackEvent.zoom === \"number\" ? trackEvent.zoom : 1;\n\n if ( stamenTypes.indexOf( trackEvent.type ) !== -1 ) {\n layer = trackEvent.type.toLowerCase();\n }\n\n map = new gmaps.Map( document.getElementById( \"map\" ), {\n zoom: trackEvent.zoom,\n disableDefaultUI: true,\n zoomControl: true,\n mapTypeId: layer ? layer : gmaps.MapTypeId[ elements.type.value ],\n center: new gmaps.LatLng( 0, 0 )\n });\n\n if ( layer ) {\n map.mapTypes.set( layer, new gmaps.StamenMapType( layer.replace( \"stamen-\", \"\" ) ) );\n }\n\n geocode( !!elements.location.value );\n\n // Googlemap listeners\n gmaps.event.addListener( map, \"zoom_changed\", zoomChanged );\n\n centerChangedListener = gmaps.event.addListener( map, \"center_changed\", centerChanged );\n\n // Element Listeners\n elements.start.addEventListener( \"change\", update, false );\n elements.start.addEventListener( \"keyup\", update, false );\n\n elements.end.addEventListener( \"change\", update, false );\n elements.end.addEventListener( \"keyup\", update, false );\n\n elements.lat.addEventListener( \"blur\", geocodeLatLng, false );\n elements.lng.addEventListener( \"blur\", geocodeLatLng, false );\n\n elements.location.addEventListener( \"keypress\", geocodeLoc, false );\n\n elements.type.addEventListener( \"change\", setMapType, false );\n elements.target.addEventListener( \"change\", update, false );\n\n } else {\n setTimeout( ready, 15 );\n }\n }", "title": "" }, { "docid": "623163e2b03d9f60d5d8608ba301e45c", "score": "0.4872846", "text": "function jsAssetTree(leafPath){\n return \"app/assets/javascripts/\" + leafPath + \"/**/*.js\"\n}", "title": "" }, { "docid": "10ae763286b8c7b2b927ea53e082b537", "score": "0.48655185", "text": "function IntroDigital_elementsExtraJS() {\n // screen (IntroDigital) extra code\n\n }", "title": "" }, { "docid": "b8929ec2dc594804b6b5c3997392a9fe", "score": "0.48559752", "text": "function js() {\n\treturn gulp.src(scriptComponents)\n\t\t.pipe(sourcemaps.init())\n\t\t.pipe(concat('scripts.js'))\n\t\t.pipe(sourcemaps.write())\n\t\t.pipe(gulp.dest(productionJs))\n\t\t.pipe(browserSync.reload({\n\t\t\tstream: true\n\t\t}));\n}", "title": "" }, { "docid": "9f7b7638e7b385a5f0979d5aed9bb8ef", "score": "0.4855808", "text": "function init() {\r\n $(document).on('pageBeforeInit', function (e) {\r\n var page = e.detail.page;\r\n if (typeof(analytics) !== \"undefined\") {\r\n analytics.trackView(page.name);\r\n }\r\n if (typeof(mixpanel) !== \"undefined\") {\r\n mixpanel.track(page.name);\r\n }\r\n\r\n load(page.name, page.query);\r\n\r\n //load js in template\r\n $(page.container).find(\"script\").each(function (el) {\r\n if ($(this).attr('src')) {\r\n jQuery.getScript($(this).attr('src'));\r\n } else {\r\n eval($(this).text());\r\n }\r\n });\r\n });\r\n }", "title": "" }, { "docid": "08e61a75a81f1412d862fb66c2fc47ab", "score": "0.48521325", "text": "_initAssetLoaders() {\n this.__assetLoaders = {};\n this.defineLoader('js', JsLoader);\n this.defineLoader('css', CssLoader);\n }", "title": "" }, { "docid": "686af1a79805dff0af6e4e94fac44c2a", "score": "0.4844306", "text": "function pageReady() {\n legacySupport();\n // updateHeaderActiveClass();\n // initHeaderScroll();\n\n initPopups();\n initSliders();\n initScrollMonitor();\n initMasks();\n initSelectric();\n initValidations();\n\n // custom\n // videoEvents(); \n // scrollTop();\n inputFile();\n customTabs();\n progressBar();\n if(_window.width() > 768){\n initFullPage();\n aboutAnim();\n absAnim();\n }\n // development helper\n _window.on('resize', debounce(setBreakpoint, 200))\n\n // AVAILABLE in _components folder\n // copy paste in main.js and initialize here\n // initPerfectScrollbar();\n // initLazyLoad();\n // initTeleport();\n // parseSvg();\n // revealFooter();\n // _window.on('resize', throttle(revealFooter, 100));\n }", "title": "" }, { "docid": "2221eb1e32f5e7ddfad0e2d9597fa712", "score": "0.48419958", "text": "function startScreen_elementsExtraJS() {\n // screen (startScreen) extra code\n /* googlemap_5 */\n $(\"[name = 'googlemap_5']\").wrap(\"<div/>\");\n $(\"[name = 'googlemap_5']\").parent().css(\"margin-left\", $(\"[name = 'googlemap_5']\").css(\"margin-left\"));\n $(\"[name = 'googlemap_5']\").parent().css(\"margin-right\", $(\"[name = 'googlemap_5']\").css(\"margin-right\"));\n $(\"[name = 'googlemap_5']\").css(\"margin-left\", '0');\n $(\"[name = 'googlemap_5']\").css(\"margin-right\", '0');\n var googlemap_5_options = {\n markerSourceName: \"googlemap_5_markers\",\n latitude: \"\",\n longitude: \"\",\n address: \"San Francisco, CA\",\n zoom: 10,\n showLocationMarker: true\n }\n Apperyio.__registerComponent('googlemap_5', new Apperyio.ApperyMapComponent(\"googlemap_5\", googlemap_5_options));\n $(\"[name='googlemap_5_markers'] [apperytype='marker']\").attr(\"reRender\", \"googlemap_5\");\n\n function __update_googlemap_5(event, ui) {\n if (($('#startScreen_googlemap_5', ui.toPage).length > 0) && (Apperyio('googlemap_5') != undefined) && (Apperyio('googlemap_5').isInitialized)) {\n Apperyio('googlemap_5').refresh();\n }\n }\n $(\":mobile-pagecontainer\").off(\"pagecontainershow.startScreen_mobilecontainer\", __update_googlemap_5).on(\"pagecontainershow.startScreen_mobilecontainer\", __update_googlemap_5);\n }", "title": "" }, { "docid": "966152e64e8bc4020e89280f15dfc8b6", "score": "0.48343575", "text": "loadScripts() {\n // This array contains all the files/CDNs \n const dynamicScripts = [\n \"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js\",\n \"https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js\",\n '../../../assets/js/scripts.js'\n ];\n for (let i = 0; i < dynamicScripts.length; i++) {\n const node = document.createElement('script');\n node.src = dynamicScripts[i];\n node.type = 'text/javascript';\n node.async = false;\n document.getElementsByTagName('head')[0].appendChild(node);\n }\n }", "title": "" }, { "docid": "8c62cf99067cc289cc88eee15a9dc824", "score": "0.4833806", "text": "function prepareLightningJs() {\n\t\twindow.lightningjs || function(c) {\n\t\t function g(b, d) {\n\t\t d && (d += (/\\?/.test(d) ? \"&\" : \"?\") + \"lv=1\");\n\t\t c[b] || function() {\n\t\t var i = window,\n\t\t h = document,\n\t\t j = b,\n\t\t g = h.location.protocol,\n\t\t l = \"load\",\n\t\t k = 0;\n\t\t (function() {\n\t\t function b() {\n\t\t a.P(l);\n\t\t a.w = 1;\n\t\t c[j](\"_load\")\n\t\t }\n\t\t c[j] = function() {\n\t\t function m() {\n\t\t m.id = e;\n\t\t return c[j].apply(m, arguments)\n\t\t }\n\t\t var b, e = ++k;\n\t\t b = this && this != i ? this.id || 0 : 0;\n\t\t (a.s = a.s || []).push([e, b, arguments]);\n\t\t m.then = function(b, c, h) {\n\t\t var d = a.fh[e] = a.fh[e] || [],\n\t\t j = a.eh[e] = a.eh[e] || [],\n\t\t f = a.ph[e] = a.ph[e] || [];\n\t\t b && d.push(b);\n\t\t c && j.push(c);\n\t\t h && f.push(h);\n\t\t return m\n\t\t };\n\t\t return m\n\t\t };\n\t\t var a = c[j]._ = {};\n\t\t a.fh = {};\n\t\t a.eh = {};\n\t\t a.ph = {};\n\t\t a.l = d ? d.replace(/^\\/\\//, (g == \"https:\" ? g : \"http:\") + \"//\") : d;\n\t\t a.p = {\n\t\t 0: +new Date\n\t\t };\n\t\t a.P = function(b) {\n\t\t a.p[b] = new Date - a.p[0]\n\t\t };\n\t\t a.w && b();\n\t\t i.addEventListener ? i.addEventListener(l, b, !1) : i.attachEvent(\"on\" + l, b);\n\t\t var q = function() {\n\t\t function b() {\n\t\t return [\"<head></head><\", c, ' onload=\"var d=', n, \";d.getElementsByTagName('head')[0].\", d, \"(d.\", g, \"('script')).\", i, \"='\", a.l, \"'\\\"></\", c, \">\"].join(\"\")\n\t\t }\n\t\t var c = \"body\",\n\t\t e = h[c];\n\t\t if (!e) return setTimeout(q, 100);\n\t\t a.P(1);\n\t\t var d = \"appendChild\",\n\t\t g = \"createElement\",\n\t\t i = \"src\",\n\t\t k = h[g](\"div\"),\n\t\t l = k[d](h[g](\"div\")),\n\t\t f = h[g](\"iframe\"),\n\t\t n = \"document\",\n\t\t p;\n\t\t k.style.display = \"none\";\n\t\t e.insertBefore(k, e.firstChild).id = o + \"-\" + j;\n\t\t f.frameBorder = \"0\";\n\t\t f.id = o + \"-frame-\" + j;\n\t\t /MSIE[ ]+6/.test(navigator.userAgent) && (f[i] = \"javascript:false\");\n\t\t f.allowTransparency = \"true\";\n\t\t l[d](f);\n\t\t try {\n\t\t f.contentWindow[n].open()\n\t\t } catch (s) {\n\t\t a.domain = h.domain, p = \"javascript:var d=\" + n + \".open();d.domain='\" + h.domain + \"';\", f[i] = p + \"void(0);\"\n\t\t }\n\t\t try {\n\t\t var r = f.contentWindow[n];\n\t\t r.write(b());\n\t\t r.close()\n\t\t } catch (t) {\n\t\t f[i] = p + 'd.write(\"' + b().replace(/\"/g, String.fromCharCode(92) + '\"') + '\");d.close();'\n\t\t }\n\t\t a.P(2)\n\t\t };\n\t\t a.l && setTimeout(q, 0)\n\t\t })()\n\t\t }();\n\t\t c[b].lv = \"1\";\n\t\t return c[b]\n\t\t }\n\t\t var o = \"lightningjs\",\n\t\t k = window[o] = g(o);\n\t\t k.require = g;\n\t\t k.modules = c\n\t\t}({});\n\t}", "title": "" }, { "docid": "1858e4406ce41d412cf4bc114c571213", "score": "0.4823906", "text": "function js() {\n return gulp.src(devPaths.script)\n //.pipe(plugins.sourcemaps.init())\n .pipe(plugins.babel({\n presets: ['@babel/env']\n }))\n //.pipe(gulp.dest(distPaths.script))\n //.pipe(plugins.concat('main.js'))\n .pipe(gulp.dest(distPaths.base))\n .pipe(plugins.rename({\n suffix: '.min'\n }))\n .pipe(plugins.uglify())\n .pipe(plugins.sourcemaps.write('.'))\n .pipe(gulp.dest(distPaths.base))\n .pipe(browserSync.reload({\n stream: true\n }));\n}", "title": "" }, { "docid": "38a1a43442de2b331df9878eecbd4fd1", "score": "0.48180553", "text": "function custom_js() {\n return gulp\n .src(paths.js.src)\n .pipe(\n babel({\n presets: [\"@babel/preset-env\"]\n })\n )\n .pipe(uglify())\n .pipe(gulp.dest(paths.js.dest));\n}", "title": "" }, { "docid": "09b156c765d9e545c91dd8b91594600a", "score": "0.4817341", "text": "function app(){\n \"use strict\";\n\n // load some scripts (uses promises :D)\n loader.load(\n\n //css\n {url: \"./bower_components/normalize.css/normalize.css\"},\n {url: \"./bower_components/typeplate-starter-kit/css/typeplate.css\"},\n {url: \"./bower_components/bootstrap/dist/css/bootstrap.min.css\"},\n // {url: \"./bower_components/firepad/dist/firepad.css\"},\n {url: \"./dist/style.css\"},\n\n //basic dependencies\n {url: \"./bower_components/jquery/dist/jquery.min.js\"},\n {url: \"./bower_components/lodash/dist/lodash.min.js\"},\n {url: \"./bower_components/backbone/backbone.js\"},\n\n //firebase stuff..\n {url: \"./bower_components/firebase/firebase.js\"},\n {url: \"./bower_components/backfire/dist/backbonefire.js\"},\n {url: \"./bower_components/bootstrap/dist/js/bootstrap.min.js\"},\n {url: \"./bower_components/jquery-serialize-object/dist/jquery.serialize-object.min.js\"},\n // {url: \"./js/login.js\"},\n\n //app level\n // {url: \"./js/storyApp.js\"},\n\n //collections\n // {url: \"./js/collections/authors.js\"},\n // {url: \"./js/collections/writers.js\"},\n\n //models\n // {url: \"./js/models/authorStory.js\"},\n // {url: \"./js/models/userStory.js\"},\n\n //views\n // {url: \"./js/views/appview.js\"},\n // {url: \"./js/views/authorsView.js\"},\n // {url: \"./js/views/authorStoryView.js\"},\n // {url: \"./js/views/userView.js\"},\n // {url: \"./js/views/userStoryView.js\"},\n\n //router\n {url: \"./js/routes/storyRouter.js\"}\n\n ).then(function(){\n _.templateSettings.interpolate = /{([\\s\\S]+?)}/g;\n document.body.style.opacity = 1;\n // start app?\n \n window.router = new app.StoryRouter();\n });\n}", "title": "" }, { "docid": "df0b4e62b2b9eddf6239fed03e74d435", "score": "0.47937846", "text": "function app(){\n \"use strict\";\n\n // load some scripts (uses promises :D)\n loader.load(\n {url: \"./bower_components/jquery/dist/jquery.min.js\"},\n {url: \"./bower_components/lodash/dist/lodash.min.js\"},\n {url: \"./bower_components/backbone/backbone.js\"},\n {url: \"./bower_components/backbonefire/dist/backbonefire.js\"},\n {url: \"./bower_components/firebase/firebase.js\"},\n {url: \"./bower_components/foundation/js/foundation.js\"},\n {url: \"./bower_components/foundation/js/foundation/foundation.offcanvas.js\"},\n {url: \"./js/models/jobListing.js\"},\n {url: \"./js/collections/joblistings.js\"},\n {url: \"./js/routers/jobboardRouter.js\"},\n {url: \"./js/views/appview.js\"},\n {url: \"./js/views/joblistingsView.js\"},\n {url: \"./js/views/joblistingView.js\"},\n {url: \"./js/views/joblistingexpandedView.js\"},\n {url: \"./js/views/jobpostformView.js\"},\n {url: \"./templates/jobPostForm.html\"},\n {url: \"./dist/style.css\"}\n ).then(function(){\n _.templateSettings.interpolate = /{([\\s\\S]+?)}/g;\n document.body.style.opacity = 1;\n $(document).foundation();\n\n\n var router = new app.JobBoardRouter();\n \n });\n\n}", "title": "" }, { "docid": "34c0adac6b8dffbada47e0c91a349b6e", "score": "0.47931254", "text": "function gather_vendor_scripts(){\n return gulp.src(config.paths.vendor.scripts);\n}", "title": "" }, { "docid": "120197e2918c28d3d91a441961102aae", "score": "0.4788918", "text": "function js(){\n return src(jsSrc) \n .pipe(concat('all.min.js'))\n .pipe(sourcemaps.init({largeFile: true})) \n .pipe(terser())\n .pipe(sourcemaps.write('../maps'))\n .pipe(dest(jsRelease)) \n .pipe(browserSync.stream()); \n\n}", "title": "" }, { "docid": "878ba699105613360cd53107645d94c7", "score": "0.4785291", "text": "function Events_elementsExtraJS() {\n // screen (Events) extra code\n\n }", "title": "" }, { "docid": "e76a65db44036f8e0999ab583dbd0d82", "score": "0.47811025", "text": "function thim_shortcode_googlemap_init() {\n\tthim_shortcode_googlemap_create_map(window.jQuery);\n}", "title": "" }, { "docid": "734b3465078e9127c51cb3173a473cd6", "score": "0.4774847", "text": "function jsQR_webpack(){\n // see https://github.com/cozmo/jsQR/blob/master/dist/jsQR.js\n /* excerpt from licence @ https://github.com/cozmo/jsQR/blob/master/LICENSE\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n */\n \n (function webpackUniversalModuleDefinition(root, factory) {\n if(typeof exports === 'object' && typeof module === 'object')\n module.exports = factory();\n else if(typeof define === 'function' && define.amd)\n define([], factory);\n else if(typeof exports === 'object')\n exports.jsQR = factory();\n else\n root.jsQR = factory();\n })(typeof self !== 'undefined' ? self : this, function() {\n return /******/ (function(modules) { // webpackBootstrap\n /******/ // The module cache\n /******/ var installedModules = {};\n /******/\n /******/ // The require function\n /******/ function __webpack_require__(moduleId) {\n /******/\n /******/ // Check if module is in cache\n /******/ if(installedModules[moduleId]) {\n /******/ return installedModules[moduleId].exports;\n /******/ }\n /******/ // Create a new module (and put it into the cache)\n /******/ var module = installedModules[moduleId] = {\n /******/ i: moduleId,\n /******/ l: false,\n /******/ exports: {}\n /******/ };\n /******/\n /******/ // Execute the module function\n /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n /******/\n /******/ // Flag the module as loaded\n /******/ module.l = true;\n /******/\n /******/ // Return the exports of the module\n /******/ return module.exports;\n /******/ }\n /******/\n /******/\n /******/ // expose the modules object (__webpack_modules__)\n /******/ __webpack_require__.m = modules;\n /******/\n /******/ // expose the module cache\n /******/ __webpack_require__.c = installedModules;\n /******/\n /******/ // define getter function for harmony exports\n /******/ __webpack_require__.d = function(exports, name, getter) {\n /******/ if(!__webpack_require__.o(exports, name)) {\n /******/ Object.defineProperty(exports, name, {\n /******/ configurable: false,\n /******/ enumerable: true,\n /******/ get: getter\n /******/ });\n /******/ }\n /******/ };\n /******/\n /******/ // getDefaultExport function for compatibility with non-harmony modules\n /******/ __webpack_require__.n = function(module) {\n /******/ var getter = module && module.__esModule ?\n /******/ function getDefault() { return module['default']; } :\n /******/ function getModuleExports() { return module; };\n /******/ __webpack_require__.d(getter, 'a', getter);\n /******/ return getter;\n /******/ };\n /******/\n /******/ // Object.prototype.hasOwnProperty.call\n /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n /******/\n /******/ // __webpack_public_path__\n /******/ __webpack_require__.p = \"\";\n /******/\n /******/ // Load entry module and return exports\n /******/ return __webpack_require__(__webpack_require__.s = 3);\n /******/ })\n /************************************************************************/\n /******/ ([\n /* 0 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var BitMatrix = /** @class */ (function () {\n function BitMatrix(data, width) {\n this.width = width;\n this.height = data.length / width;\n this.data = data;\n }\n BitMatrix.createEmpty = function (width, height) {\n return new BitMatrix(new Uint8ClampedArray(width * height), width);\n };\n BitMatrix.prototype.get = function (x, y) {\n if (x < 0 || x >= this.width || y < 0 || y >= this.height) {\n return false;\n }\n return !!this.data[y * this.width + x];\n };\n BitMatrix.prototype.set = function (x, y, v) {\n this.data[y * this.width + x] = v ? 1 : 0;\n };\n BitMatrix.prototype.setRegion = function (left, top, width, height, v) {\n for (var y = top; y < top + height; y++) {\n for (var x = left; x < left + width; x++) {\n this.set(x, y, !!v);\n }\n }\n };\n return BitMatrix;\n }());\n exports.BitMatrix = BitMatrix;\n \n \n /***/ }),\n /* 1 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var GenericGFPoly_1 = __webpack_require__(2);\n function addOrSubtractGF(a, b) {\n return a ^ b; // tslint:disable-line:no-bitwise\n }\n exports.addOrSubtractGF = addOrSubtractGF;\n var GenericGF = /** @class */ (function () {\n function GenericGF(primitive, size, genBase) {\n this.primitive = primitive;\n this.size = size;\n this.generatorBase = genBase;\n this.expTable = new Array(this.size);\n this.logTable = new Array(this.size);\n var i,x = 1;\n for (i = 0; i < this.size; i++) {\n this.expTable[i] = x;\n x = x * 2;\n if (x >= this.size) {\n x = (x ^ this.primitive) & (this.size - 1); // tslint:disable-line:no-bitwise\n }\n }\n for (i = 0; i < this.size - 1; i++) {\n this.logTable[this.expTable[i]] = i;\n }\n this.zero = new GenericGFPoly_1.default(this, Uint8ClampedArray.from([0]));\n this.one = new GenericGFPoly_1.default(this, Uint8ClampedArray.from([1]));\n }\n GenericGF.prototype.multiply = function (a, b) {\n if (a === 0 || b === 0) {\n return 0;\n }\n return this.expTable[(this.logTable[a] + this.logTable[b]) % (this.size - 1)];\n };\n GenericGF.prototype.inverse = function (a) {\n if (a === 0) {\n throw new Error(\"Can't invert 0\");\n }\n return this.expTable[this.size - this.logTable[a] - 1];\n };\n GenericGF.prototype.buildMonomial = function (degree, coefficient) {\n if (degree < 0) {\n throw new Error(\"Invalid monomial degree less than 0\");\n }\n if (coefficient === 0) {\n return this.zero;\n }\n var coefficients = new Uint8ClampedArray(degree + 1);\n coefficients[0] = coefficient;\n return new GenericGFPoly_1.default(this, coefficients);\n };\n GenericGF.prototype.log = function (a) {\n if (a === 0) {\n throw new Error(\"Can't take log(0)\");\n }\n return this.logTable[a];\n };\n GenericGF.prototype.exp = function (a) {\n return this.expTable[a];\n };\n return GenericGF;\n }());\n exports.default = GenericGF;\n \n \n /***/ }),\n /* 2 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var GenericGF_1 = __webpack_require__(1);\n var GenericGFPoly = /** @class */ (function () {\n function GenericGFPoly(field, coefficients) {\n if (coefficients.length === 0) {\n throw new Error(\"No coefficients.\");\n }\n this.field = field;\n var coefficientsLength = coefficients.length;\n if (coefficientsLength > 1 && coefficients[0] === 0) {\n // Leading term must be non-zero for anything except the constant polynomial \"0\"\n var firstNonZero = 1;\n while (firstNonZero < coefficientsLength && coefficients[firstNonZero] === 0) {\n firstNonZero++;\n }\n if (firstNonZero === coefficientsLength) {\n this.coefficients = field.zero.coefficients;\n }\n else {\n this.coefficients = new Uint8ClampedArray(coefficientsLength - firstNonZero);\n for (var i = 0; i < this.coefficients.length; i++) {\n this.coefficients[i] = coefficients[firstNonZero + i];\n }\n }\n }\n else {\n this.coefficients = coefficients;\n }\n }\n GenericGFPoly.prototype.degree = function () {\n return this.coefficients.length - 1;\n };\n GenericGFPoly.prototype.isZero = function () {\n return this.coefficients[0] === 0;\n };\n GenericGFPoly.prototype.getCoefficient = function (degree) {\n return this.coefficients[this.coefficients.length - 1 - degree];\n };\n GenericGFPoly.prototype.addOrSubtract = function (other) {\n var i,_a;\n if (this.isZero()) {\n return other;\n }\n if (other.isZero()) {\n return this;\n }\n var smallerCoefficients = this.coefficients;\n var largerCoefficients = other.coefficients;\n if (smallerCoefficients.length > largerCoefficients.length) {\n _a = smallerCoefficients;\n smallerCoefficients = largerCoefficients; \n largerCoefficients = _a;\n }\n var sumDiff = new Uint8ClampedArray(largerCoefficients.length);\n var lengthDiff = largerCoefficients.length - smallerCoefficients.length;\n for (i = 0; i < lengthDiff; i++) {\n sumDiff[i] = largerCoefficients[i];\n }\n for (i = lengthDiff; i < largerCoefficients.length; i++) {\n sumDiff[i] = GenericGF_1.addOrSubtractGF(smallerCoefficients[i - lengthDiff], largerCoefficients[i]);\n }\n return new GenericGFPoly(this.field, sumDiff);\n };\n GenericGFPoly.prototype.multiply = function (scalar) {\n if (scalar === 0) {\n return this.field.zero;\n }\n if (scalar === 1) {\n return this;\n }\n var size = this.coefficients.length;\n var product = new Uint8ClampedArray(size);\n for (var i = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], scalar);\n }\n return new GenericGFPoly(this.field, product);\n };\n GenericGFPoly.prototype.multiplyPoly = function (other) {\n if (this.isZero() || other.isZero()) {\n return this.field.zero;\n }\n var aCoefficients = this.coefficients;\n var aLength = aCoefficients.length;\n var bCoefficients = other.coefficients;\n var bLength = bCoefficients.length;\n var product = new Uint8ClampedArray(aLength + bLength - 1);\n for (var i = 0; i < aLength; i++) {\n var aCoeff = aCoefficients[i];\n for (var j = 0; j < bLength; j++) {\n product[i + j] = GenericGF_1.addOrSubtractGF(product[i + j], this.field.multiply(aCoeff, bCoefficients[j]));\n }\n }\n return new GenericGFPoly(this.field, product);\n };\n GenericGFPoly.prototype.multiplyByMonomial = function (degree, coefficient) {\n if (degree < 0) {\n throw new Error(\"Invalid degree less than 0\");\n }\n if (coefficient === 0) {\n return this.field.zero;\n }\n var size = this.coefficients.length;\n var product = new Uint8ClampedArray(size + degree);\n for (var i = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], coefficient);\n }\n return new GenericGFPoly(this.field, product);\n };\n GenericGFPoly.prototype.evaluateAt = function (a) {\n var result = 0;\n if (a === 0) {\n // Just return the x^0 coefficient\n return this.getCoefficient(0);\n }\n var size = this.coefficients.length;\n if (a === 1) {\n // Just the sum of the coefficients\n this.coefficients.forEach(function (coefficient) {\n result = GenericGF_1.addOrSubtractGF(result, coefficient);\n });\n return result;\n }\n result = this.coefficients[0];\n for (var i = 1; i < size; i++) {\n result = GenericGF_1.addOrSubtractGF(this.field.multiply(a, result), this.coefficients[i]);\n }\n return result;\n };\n return GenericGFPoly;\n }());\n exports.default = GenericGFPoly;\n \n \n /***/ }),\n /* 3 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var binarizer_1 = __webpack_require__(4);\n var decoder_1 = __webpack_require__(5);\n var extractor_1 = __webpack_require__(11);\n var locator_1 = __webpack_require__(12);\n function scan(matrix) {\n var location = locator_1.locate(matrix);\n if (!location) {\n return null;\n }\n var extracted = extractor_1.extract(matrix, location);\n var decoded = decoder_1.decode(extracted.matrix);\n if (!decoded) {\n return null;\n }\n return {\n binaryData: decoded.bytes,\n data: decoded.text,\n chunks: decoded.chunks,\n location: {\n topRightCorner: extracted.mappingFunction(location.dimension, 0),\n topLeftCorner: extracted.mappingFunction(0, 0),\n bottomRightCorner: extracted.mappingFunction(location.dimension, location.dimension),\n bottomLeftCorner: extracted.mappingFunction(0, location.dimension),\n topRightFinderPattern: location.topRight,\n topLeftFinderPattern: location.topLeft,\n bottomLeftFinderPattern: location.bottomLeft,\n bottomRightAlignmentPattern: location.alignmentPattern,\n },\n };\n }\n var defaultOptions = {\n inversionAttempts: \"attemptBoth\",\n };\n function jsQR(data, width, height, providedOptions) {\n if (providedOptions === void 0) { providedOptions = {}; }\n var options = defaultOptions;\n Object.keys(options || {}).forEach(function (opt) {\n options[opt] = providedOptions[opt] || options[opt];\n });\n var shouldInvert = options.inversionAttempts === \"attemptBoth\" || options.inversionAttempts === \"invertFirst\";\n var tryInvertedFirst = options.inversionAttempts === \"onlyInvert\" || options.inversionAttempts === \"invertFirst\";\n var _a = binarizer_1.binarize(data, width, height, shouldInvert), binarized = _a.binarized, inverted = _a.inverted;\n var result = scan(tryInvertedFirst ? inverted : binarized);\n if (!result && (options.inversionAttempts === \"attemptBoth\" || options.inversionAttempts === \"invertFirst\")) {\n result = scan(tryInvertedFirst ? binarized : inverted);\n }\n return result;\n }\n jsQR.default = jsQR;\n exports.default = jsQR;\n \n \n /***/ }),\n /* 4 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var BitMatrix_1 = __webpack_require__(0);\n var REGION_SIZE = 8;\n var MIN_DYNAMIC_RANGE = 24;\n function numBetween(value, min, max) {\n return value < min ? min : value > max ? max : value;\n }\n // Like BitMatrix but accepts arbitry Uint8 values\n var Matrix = /** @class */ (function () {\n function Matrix(width, height) {\n this.width = width;\n this.data = new Uint8ClampedArray(width * height);\n }\n Matrix.prototype.get = function (x, y) {\n return this.data[y * this.width + x];\n };\n Matrix.prototype.set = function (x, y, value) {\n this.data[y * this.width + x] = value;\n };\n return Matrix;\n }());\n function binarize(data, width, height, returnInverted) {\n var x,y;\n if (data.length !== width * height * 4) {\n throw new Error(\"Malformed data passed to binarizer.\");\n }\n // Convert image to greyscale\n var greyscalePixels = new Matrix(width, height);\n for (x = 0; x < width; x++) {\n for (y = 0; y < height; y++) {\n var r = data[((y * width + x) * 4) + 0];\n var g = data[((y * width + x) * 4) + 1];\n var b = data[((y * width + x) * 4) + 2];\n greyscalePixels.set(x, y, 0.2126 * r + 0.7152 * g + 0.0722 * b);\n }\n }\n var verticalRegion,hortizontalRegion;\n var horizontalRegionCount = Math.ceil(width / REGION_SIZE);\n var verticalRegionCount = Math.ceil(height / REGION_SIZE);\n var blackPoints = new Matrix(horizontalRegionCount, verticalRegionCount);\n var sum;\n for (verticalRegion = 0; verticalRegion < verticalRegionCount; verticalRegion++) {\n for (hortizontalRegion = 0; hortizontalRegion < horizontalRegionCount; hortizontalRegion++) {\n sum = 0;\n var min = Infinity;\n var max = 0;\n for (y = 0; y < REGION_SIZE; y++) {\n for (x = 0; x < REGION_SIZE; x++) {\n var pixelLumosity = greyscalePixels.get(hortizontalRegion * REGION_SIZE + x, verticalRegion * REGION_SIZE + y);\n sum += pixelLumosity;\n min = Math.min(min, pixelLumosity);\n max = Math.max(max, pixelLumosity);\n }\n }\n var average = sum / (Math.pow(REGION_SIZE, 2));\n if (max - min <= MIN_DYNAMIC_RANGE) {\n // If variation within the block is low, assume this is a block with only light or only\n // dark pixels. In that case we do not want to use the average, as it would divide this\n // low contrast area into black and white pixels, essentially creating data out of noise.\n //\n // Default the blackpoint for these blocks to be half the min - effectively white them out\n average = min / 2;\n if (verticalRegion > 0 && hortizontalRegion > 0) {\n // Correct the \"white background\" assumption for blocks that have neighbors by comparing\n // the pixels in this block to the previously calculated black points. This is based on\n // the fact that dark barcode symbology is always surrounded by some amount of light\n // background for which reasonable black point estimates were made. The bp estimated at\n // the boundaries is used for the interior.\n // The (min < bp) is arbitrary but works better than other heuristics that were tried.\n var averageNeighborBlackPoint = (blackPoints.get(hortizontalRegion, verticalRegion - 1) +\n (2 * blackPoints.get(hortizontalRegion - 1, verticalRegion)) +\n blackPoints.get(hortizontalRegion - 1, verticalRegion - 1)) / 4;\n if (min < averageNeighborBlackPoint) {\n average = averageNeighborBlackPoint;\n }\n }\n }\n blackPoints.set(hortizontalRegion, verticalRegion, average);\n }\n }\n var binarized = BitMatrix_1.BitMatrix.createEmpty(width, height);\n var inverted = null;\n \n if (returnInverted) {\n inverted = BitMatrix_1.BitMatrix.createEmpty(width, height);\n }\n var xRegion,yRegion;\n for (verticalRegion = 0; verticalRegion < verticalRegionCount; verticalRegion++) {\n for (hortizontalRegion = 0; hortizontalRegion < horizontalRegionCount; hortizontalRegion++) {\n var left = numBetween(hortizontalRegion, 2, horizontalRegionCount - 3);\n var top_1 = numBetween(verticalRegion, 2, verticalRegionCount - 3);\n sum = 0;\n for (xRegion = -2; xRegion <= 2; xRegion++) {\n for (yRegion = -2; yRegion <= 2; yRegion++) {\n sum += blackPoints.get(left + xRegion, top_1 + yRegion);\n }\n }\n var threshold = sum / 25;\n for (xRegion = 0; xRegion < REGION_SIZE; xRegion++) {\n for (yRegion = 0; yRegion < REGION_SIZE; yRegion++) {\n x = hortizontalRegion * REGION_SIZE + xRegion;\n y = verticalRegion * REGION_SIZE + yRegion;\n var lum = greyscalePixels.get(x, y);\n binarized.set(x, y, lum <= threshold);\n if (returnInverted) {\n inverted.set(x, y, (lum > threshold));\n }\n }\n }\n }\n }\n if (returnInverted) {\n return { binarized: binarized, inverted: inverted };\n }\n return { binarized: binarized };\n }\n exports.binarize = binarize;\n \n \n /***/ }),\n /* 5 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var BitMatrix_1 = __webpack_require__(0);\n var decodeData_1 = __webpack_require__(6);\n var reedsolomon_1 = __webpack_require__(9);\n var version_1 = __webpack_require__(10);\n // tslint:disable:no-bitwise\n function numBitsDiffering(x, y) {\n var z = x ^ y;\n var bitCount = 0;\n while (z) {\n bitCount++;\n z &= z - 1;\n }\n return bitCount;\n }\n function pushBit(bit, byte) {\n return (byte << 1) | bit;\n }\n // tslint:enable:no-bitwise\n var FORMAT_INFO_TABLE = [\n { bits: 0x5412, formatInfo: { errorCorrectionLevel: 1, dataMask: 0 } },\n { bits: 0x5125, formatInfo: { errorCorrectionLevel: 1, dataMask: 1 } },\n { bits: 0x5E7C, formatInfo: { errorCorrectionLevel: 1, dataMask: 2 } },\n { bits: 0x5B4B, formatInfo: { errorCorrectionLevel: 1, dataMask: 3 } },\n { bits: 0x45F9, formatInfo: { errorCorrectionLevel: 1, dataMask: 4 } },\n { bits: 0x40CE, formatInfo: { errorCorrectionLevel: 1, dataMask: 5 } },\n { bits: 0x4F97, formatInfo: { errorCorrectionLevel: 1, dataMask: 6 } },\n { bits: 0x4AA0, formatInfo: { errorCorrectionLevel: 1, dataMask: 7 } },\n { bits: 0x77C4, formatInfo: { errorCorrectionLevel: 0, dataMask: 0 } },\n { bits: 0x72F3, formatInfo: { errorCorrectionLevel: 0, dataMask: 1 } },\n { bits: 0x7DAA, formatInfo: { errorCorrectionLevel: 0, dataMask: 2 } },\n { bits: 0x789D, formatInfo: { errorCorrectionLevel: 0, dataMask: 3 } },\n { bits: 0x662F, formatInfo: { errorCorrectionLevel: 0, dataMask: 4 } },\n { bits: 0x6318, formatInfo: { errorCorrectionLevel: 0, dataMask: 5 } },\n { bits: 0x6C41, formatInfo: { errorCorrectionLevel: 0, dataMask: 6 } },\n { bits: 0x6976, formatInfo: { errorCorrectionLevel: 0, dataMask: 7 } },\n { bits: 0x1689, formatInfo: { errorCorrectionLevel: 3, dataMask: 0 } },\n { bits: 0x13BE, formatInfo: { errorCorrectionLevel: 3, dataMask: 1 } },\n { bits: 0x1CE7, formatInfo: { errorCorrectionLevel: 3, dataMask: 2 } },\n { bits: 0x19D0, formatInfo: { errorCorrectionLevel: 3, dataMask: 3 } },\n { bits: 0x0762, formatInfo: { errorCorrectionLevel: 3, dataMask: 4 } },\n { bits: 0x0255, formatInfo: { errorCorrectionLevel: 3, dataMask: 5 } },\n { bits: 0x0D0C, formatInfo: { errorCorrectionLevel: 3, dataMask: 6 } },\n { bits: 0x083B, formatInfo: { errorCorrectionLevel: 3, dataMask: 7 } },\n { bits: 0x355F, formatInfo: { errorCorrectionLevel: 2, dataMask: 0 } },\n { bits: 0x3068, formatInfo: { errorCorrectionLevel: 2, dataMask: 1 } },\n { bits: 0x3F31, formatInfo: { errorCorrectionLevel: 2, dataMask: 2 } },\n { bits: 0x3A06, formatInfo: { errorCorrectionLevel: 2, dataMask: 3 } },\n { bits: 0x24B4, formatInfo: { errorCorrectionLevel: 2, dataMask: 4 } },\n { bits: 0x2183, formatInfo: { errorCorrectionLevel: 2, dataMask: 5 } },\n { bits: 0x2EDA, formatInfo: { errorCorrectionLevel: 2, dataMask: 6 } },\n { bits: 0x2BED, formatInfo: { errorCorrectionLevel: 2, dataMask: 7 } },\n ];\n var DATA_MASKS = [\n function (p) { return ((p.y + p.x) % 2) === 0; },\n function (p) { return (p.y % 2) === 0; },\n function (p) { return p.x % 3 === 0; },\n function (p) { return (p.y + p.x) % 3 === 0; },\n function (p) { return (Math.floor(p.y / 2) + Math.floor(p.x / 3)) % 2 === 0; },\n function (p) { return ((p.x * p.y) % 2) + ((p.x * p.y) % 3) === 0; },\n function (p) { return ((((p.y * p.x) % 2) + (p.y * p.x) % 3) % 2) === 0; },\n function (p) { return ((((p.y + p.x) % 2) + (p.y * p.x) % 3) % 2) === 0; },\n ];\n function buildFunctionPatternMask(version) {\n var dimension = 17 + 4 * version.versionNumber;\n var matrix = BitMatrix_1.BitMatrix.createEmpty(dimension, dimension);\n matrix.setRegion(0, 0, 9, 9, true); // Top left finder pattern + separator + format\n matrix.setRegion(dimension - 8, 0, 8, 9, true); // Top right finder pattern + separator + format\n matrix.setRegion(0, dimension - 8, 9, 8, true); // Bottom left finder pattern + separator + format\n // Alignment patterns\n for (var _i = 0, _a = version.alignmentPatternCenters; _i < _a.length; _i++) {\n var x = _a[_i];\n for (var _b = 0, _c = version.alignmentPatternCenters; _b < _c.length; _b++) {\n var y = _c[_b];\n if (!(x === 6 && y === 6 || x === 6 && y === dimension - 7 || x === dimension - 7 && y === 6)) {\n matrix.setRegion(x - 2, y - 2, 5, 5, true);\n }\n }\n }\n matrix.setRegion(6, 9, 1, dimension - 17, true); // Vertical timing pattern\n matrix.setRegion(9, 6, dimension - 17, 1, true); // Horizontal timing pattern\n if (version.versionNumber > 6) {\n matrix.setRegion(dimension - 11, 0, 3, 6, true); // Version info, top right\n matrix.setRegion(0, dimension - 11, 6, 3, true); // Version info, bottom left\n }\n return matrix;\n }\n function readCodewords(matrix, version, formatInfo) {\n var dataMask = DATA_MASKS[formatInfo.dataMask];\n var dimension = matrix.height;\n var functionPatternMask = buildFunctionPatternMask(version);\n var codewords = [];\n var currentByte = 0;\n var bitsRead = 0;\n // Read columns in pairs, from right to left\n var readingUp = true;\n for (var columnIndex = dimension - 1; columnIndex > 0; columnIndex -= 2) {\n if (columnIndex === 6) {\n columnIndex--;\n }\n for (var i = 0; i < dimension; i++) {\n var y = readingUp ? dimension - 1 - i : i;\n for (var columnOffset = 0; columnOffset < 2; columnOffset++) {\n var x = columnIndex - columnOffset;\n if (!functionPatternMask.get(x, y)) {\n bitsRead++;\n var bit = matrix.get(x, y);\n if (dataMask({ y: y, x: x })) {\n bit = !bit;\n }\n currentByte = pushBit(bit, currentByte);\n if (bitsRead === 8) {\n codewords.push(currentByte);\n bitsRead = 0;\n currentByte = 0;\n }\n }\n }\n }\n readingUp = !readingUp;\n }\n return codewords;\n }\n function readVersion(matrix) {\n var x,y;\n var dimension = matrix.height;\n var provisionalVersion = Math.floor((dimension - 17) / 4);\n if (provisionalVersion <= 6) {\n return version_1.VERSIONS[provisionalVersion - 1];\n }\n var topRightVersionBits = 0;\n for (y = 5; y >= 0; y--) {\n for (x = dimension - 9; x >= dimension - 11; x--) {\n topRightVersionBits = pushBit(matrix.get(x, y), topRightVersionBits);\n }\n }\n var bottomLeftVersionBits = 0;\n for (x = 5; x >= 0; x--) {\n for (y = dimension - 9; y >= dimension - 11; y--) {\n bottomLeftVersionBits = pushBit(matrix.get(x, y), bottomLeftVersionBits);\n }\n }\n var bestDifference = Infinity;\n var bestVersion;\n for (var _i = 0, VERSIONS_1 = version_1.VERSIONS; _i < VERSIONS_1.length; _i++) {\n var version = VERSIONS_1[_i];\n if (version.infoBits === topRightVersionBits || version.infoBits === bottomLeftVersionBits) {\n return version;\n }\n var difference = numBitsDiffering(topRightVersionBits, version.infoBits);\n if (difference < bestDifference) {\n bestVersion = version;\n bestDifference = difference;\n }\n difference = numBitsDiffering(bottomLeftVersionBits, version.infoBits);\n if (difference < bestDifference) {\n bestVersion = version;\n bestDifference = difference;\n }\n }\n // We can tolerate up to 3 bits of error since no two version info codewords will\n // differ in less than 8 bits.\n if (bestDifference <= 3) {\n return bestVersion;\n }\n }\n function readFormatInformation(matrix) {\n var x,y;\n var topLeftFormatInfoBits = 0;\n for (x = 0; x <= 8; x++) {\n if (x !== 6) {\n topLeftFormatInfoBits = pushBit(matrix.get(x, 8), topLeftFormatInfoBits);\n }\n }\n for (y = 7; y >= 0; y--) {\n if (y !== 6) {\n topLeftFormatInfoBits = pushBit(matrix.get(8, y), topLeftFormatInfoBits);\n }\n }\n var dimension = matrix.height;\n var topRightBottomRightFormatInfoBits = 0;\n for (y = dimension - 1; y >= dimension - 7; y--) {\n topRightBottomRightFormatInfoBits = pushBit(matrix.get(8, y), topRightBottomRightFormatInfoBits);\n }\n for (x = dimension - 8; x < dimension; x++) {\n topRightBottomRightFormatInfoBits = pushBit(matrix.get(x, 8), topRightBottomRightFormatInfoBits);\n }\n var bestDifference = Infinity;\n var bestFormatInfo = null;\n for (var _i = 0, FORMAT_INFO_TABLE_1 = FORMAT_INFO_TABLE; _i < FORMAT_INFO_TABLE_1.length; _i++) {\n var _a = FORMAT_INFO_TABLE_1[_i], bits = _a.bits, formatInfo = _a.formatInfo;\n if (bits === topLeftFormatInfoBits || bits === topRightBottomRightFormatInfoBits) {\n return formatInfo;\n }\n var difference = numBitsDiffering(topLeftFormatInfoBits, bits);\n if (difference < bestDifference) {\n bestFormatInfo = formatInfo;\n bestDifference = difference;\n }\n if (topLeftFormatInfoBits !== topRightBottomRightFormatInfoBits) {\n difference = numBitsDiffering(topRightBottomRightFormatInfoBits, bits);\n if (difference < bestDifference) {\n bestFormatInfo = formatInfo;\n bestDifference = difference;\n }\n }\n }\n // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits differing means we found a match\n if (bestDifference <= 3) {\n return bestFormatInfo;\n }\n return null;\n }\n function getDataBlocks(codewords, version, ecLevel) {\n var i;\n var ecInfo = version.errorCorrectionLevels[ecLevel];\n var dataBlocks = [];\n var totalCodewords = 0;\n ecInfo.ecBlocks.forEach(function (block) {\n for (var i = 0; i < block.numBlocks; i++) {\n dataBlocks.push({ numDataCodewords: block.dataCodewordsPerBlock, codewords: [] });\n totalCodewords += block.dataCodewordsPerBlock + ecInfo.ecCodewordsPerBlock;\n }\n });\n // In some cases the QR code will be malformed enough that we pull off more or less than we should.\n // If we pull off less there's nothing we can do.\n // If we pull off more we can safely truncate\n if (codewords.length < totalCodewords) {\n return null;\n }\n codewords = codewords.slice(0, totalCodewords);\n var shortBlockSize = ecInfo.ecBlocks[0].dataCodewordsPerBlock;\n // Pull codewords to fill the blocks up to the minimum size\n var dataBlock;\n for (i = 0; i < shortBlockSize; i++) {\n for (var _i = 0, dataBlocks_1 = dataBlocks; _i < dataBlocks_1.length; _i++) {\n dataBlock = dataBlocks_1[_i];\n dataBlock.codewords.push(codewords.shift());\n }\n }\n // If there are any large blocks, pull codewords to fill the last element of those\n if (ecInfo.ecBlocks.length > 1) {\n var smallBlockCount = ecInfo.ecBlocks[0].numBlocks;\n var largeBlockCount = ecInfo.ecBlocks[1].numBlocks;\n for (i = 0; i < largeBlockCount; i++) {\n dataBlocks[smallBlockCount + i].codewords.push(codewords.shift());\n }\n }\n // Add the rest of the codewords to the blocks. These are the error correction codewords.\n while (codewords.length > 0) {\n for (var _a = 0, dataBlocks_2 = dataBlocks; _a < dataBlocks_2.length; _a++) {\n dataBlock = dataBlocks_2[_a];\n dataBlock.codewords.push(codewords.shift());\n }\n }\n return dataBlocks;\n }\n function decodeMatrix(matrix) {\n var version = readVersion(matrix);\n if (!version) {\n return null;\n }\n var formatInfo = readFormatInformation(matrix);\n if (!formatInfo) {\n return null;\n }\n var codewords = readCodewords(matrix, version, formatInfo);\n var dataBlocks = getDataBlocks(codewords, version, formatInfo.errorCorrectionLevel);\n if (!dataBlocks) {\n return null;\n }\n // Count total number of data bytes\n var totalBytes = dataBlocks.reduce(function (a, b) { return a + b.numDataCodewords; }, 0);\n var resultBytes = new Uint8ClampedArray(totalBytes);\n var resultIndex = 0;\n for (var _i = 0, dataBlocks_3 = dataBlocks; _i < dataBlocks_3.length; _i++) {\n var dataBlock = dataBlocks_3[_i];\n var correctedBytes = reedsolomon_1.decode(dataBlock.codewords, dataBlock.codewords.length - dataBlock.numDataCodewords);\n if (!correctedBytes) {\n return null;\n }\n for (var i = 0; i < dataBlock.numDataCodewords; i++) {\n resultBytes[resultIndex++] = correctedBytes[i];\n }\n }\n try {\n return decodeData_1.decode(resultBytes, version.versionNumber);\n }\n catch (_a) {\n return null;\n }\n }\n function decode(matrix) {\n if (matrix === null) {\n return null;\n }\n var result = decodeMatrix(matrix);\n if (result) {\n return result;\n }\n // Decoding didn't work, try mirroring the QR across the topLeft -> bottomRight line.\n for (var x = 0; x < matrix.width; x++) {\n for (var y = x + 1; y < matrix.height; y++) {\n if (matrix.get(x, y) !== matrix.get(y, x)) {\n matrix.set(x, y, !matrix.get(x, y));\n matrix.set(y, x, !matrix.get(y, x));\n }\n }\n }\n return decodeMatrix(matrix);\n }\n exports.decode = decode;\n \n \n /***/ }),\n /* 6 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n // tslint:disable:no-bitwise\n var BitStream_1 = __webpack_require__(7);\n var shiftJISTable_1 = __webpack_require__(8);\n var Mode;\n (function (Mode) {\n Mode.Numeric = \"numeric\";\n Mode.Alphanumeric = \"alphanumeric\";\n Mode.Byte = \"byte\";\n Mode.Kanji = \"kanji\";\n Mode.ECI = \"eci\";\n })(Mode = exports.Mode || (exports.Mode = {}));\n var ModeByte;\n (function (ModeByte) {\n ModeByte[ ModeByte.Terminator = 0 ] = \"Terminator\";\n ModeByte[ ModeByte.Numeric = 1 ] = \"Numeric\";\n ModeByte[ ModeByte.Alphanumeric = 2 ] = \"Alphanumeric\";\n ModeByte[ ModeByte.Byte = 4 ] = \"Byte\";\n ModeByte[ ModeByte.Kanji = 8 ] = \"Kanji\";\n ModeByte[ ModeByte.ECI = 7 ] = \"ECI\";\n // StructuredAppend = 0x3,\n // FNC1FirstPosition = 0x5,\n // FNC1SecondPosition = 0x9,\n })(ModeByte || (ModeByte = {}));\n function decodeNumeric(stream, size) {\n var num,a,b,c;\n var bytes = [];\n var text = \"\";\n var characterCountSize = [10, 12, 14][size];\n var length = stream.readBits(characterCountSize);\n // Read digits in groups of 3\n while (length >= 3) {\n num = stream.readBits(10);\n if (num >= 1000) {\n throw new Error(\"Invalid numeric value above 999\");\n }\n a = Math.floor(num / 100);\n b = Math.floor(num / 10) % 10;\n c = num % 10;\n bytes.push(48 + a, 48 + b, 48 + c);\n text += a.toString() + b.toString() + c.toString();\n length -= 3;\n }\n // If the number of digits aren't a multiple of 3, the remaining digits are special cased.\n if (length === 2) {\n num = stream.readBits(7);\n if (num >= 100) {\n throw new Error(\"Invalid numeric value above 99\");\n }\n a = Math.floor(num / 10);\n b = num % 10;\n bytes.push(48 + a, 48 + b);\n text += a.toString() + b.toString();\n }\n else if (length === 1) {\n num = stream.readBits(4);\n if (num >= 10) {\n throw new Error(\"Invalid numeric value above 9\");\n }\n bytes.push(48 + num);\n text += num.toString();\n }\n return { bytes: bytes, text: text };\n }\n var AlphanumericCharacterCodes = [\n \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\",\n \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\",\n \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\",\n \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\",\n \" \", \"$\", \"%\", \"*\", \"+\", \"-\", \".\", \"/\", \":\",\n ];\n function decodeAlphanumeric(stream, size) {\n var bytes = [];\n var text = \"\";\n var characterCountSize = [9, 11, 13][size];\n var length = stream.readBits(characterCountSize);\n var v,a,b;\n while (length >= 2) {\n v = stream.readBits(11);\n a = Math.floor(v / 45);\n b = v % 45;\n bytes.push(AlphanumericCharacterCodes[a].charCodeAt(0), AlphanumericCharacterCodes[b].charCodeAt(0));\n text += AlphanumericCharacterCodes[a] + AlphanumericCharacterCodes[b];\n length -= 2;\n }\n if (length === 1) {\n a = stream.readBits(6);\n bytes.push(AlphanumericCharacterCodes[a].charCodeAt(0));\n text += AlphanumericCharacterCodes[a];\n }\n return { bytes: bytes, text: text };\n }\n function decodeByte(stream, size) {\n var bytes = [];\n var text = \"\";\n var characterCountSize = [8, 16, 16][size];\n var length = stream.readBits(characterCountSize);\n for (var i = 0; i < length; i++) {\n var b = stream.readBits(8);\n bytes.push(b);\n }\n try {\n text += decodeURIComponent(bytes.map(function (b) { return \"%\" + (\"0\" + b.toString(16)).substr(-2); }).join(\"\"));\n }\n catch (_a) {\n // failed to decode\n }\n return { bytes: bytes, text: text };\n }\n function decodeKanji(stream, size) {\n var bytes = [];\n var text = \"\";\n var characterCountSize = [8, 10, 12][size];\n var length = stream.readBits(characterCountSize);\n for (var i = 0; i < length; i++) {\n var k = stream.readBits(13);\n var c = (Math.floor(k / 0xC0) << 8) | (k % 0xC0);\n if (c < 0x1F00) {\n c += 0x8140;\n }\n else {\n c += 0xC140;\n }\n bytes.push(c >> 8, c & 0xFF);\n text += String.fromCharCode(shiftJISTable_1.shiftJISTable[c]);\n }\n return { bytes: bytes, text: text };\n }\n function decode(data, version) {\n var stream = new BitStream_1.BitStream(data);\n // There are 3 'sizes' based on the version. 1-9 is small (0), 10-26 is medium (1) and 27-40 is large (2).\n var size = version <= 9 ? 0 : version <= 26 ? 1 : 2;\n var result = {\n text: \"\",\n bytes: [],\n chunks: [],\n };\n while (stream.available() >= 4) {\n var mode = stream.readBits(4);\n if (mode === ModeByte.Terminator) {\n return result;\n }\n else if (mode === ModeByte.ECI) {\n if (stream.readBits(1) === 0) {\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: stream.readBits(7),\n });\n }\n else if (stream.readBits(1) === 0) {\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: stream.readBits(14),\n });\n }\n else if (stream.readBits(1) === 0) {\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: stream.readBits(21),\n });\n }\n else {\n // ECI data seems corrupted\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: -1,\n });\n }\n }\n else if (mode === ModeByte.Numeric) {\n var numericResult = decodeNumeric(stream, size);\n result.text += numericResult.text;\n (_a = result.bytes).push.apply(_a, numericResult.bytes);\n result.chunks.push({\n type: Mode.Numeric,\n text: numericResult.text,\n });\n }\n else if (mode === ModeByte.Alphanumeric) {\n var alphanumericResult = decodeAlphanumeric(stream, size);\n result.text += alphanumericResult.text;\n (_b = result.bytes).push.apply(_b, alphanumericResult.bytes);\n result.chunks.push({\n type: Mode.Alphanumeric,\n text: alphanumericResult.text,\n });\n }\n else if (mode === ModeByte.Byte) {\n var byteResult = decodeByte(stream, size);\n result.text += byteResult.text;\n (_c = result.bytes).push.apply(_c, byteResult.bytes);\n result.chunks.push({\n type: Mode.Byte,\n bytes: byteResult.bytes,\n text: byteResult.text,\n });\n }\n else if (mode === ModeByte.Kanji) {\n var kanjiResult = decodeKanji(stream, size);\n result.text += kanjiResult.text;\n (_d = result.bytes).push.apply(_d, kanjiResult.bytes);\n result.chunks.push({\n type: Mode.Kanji,\n bytes: kanjiResult.bytes,\n text: kanjiResult.text,\n });\n }\n }\n var _a, _b, _c, _d;\n }\n exports.decode = decode;\n \n \n /***/ }),\n /* 7 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n // tslint:disable:no-bitwise\n Object.defineProperty(exports, \"__esModule\", { value: true });\n var BitStream = /** @class */ (function () {\n function BitStream(bytes) {\n this.byteOffset = 0;\n this.bitOffset = 0;\n this.bytes = bytes;\n }\n BitStream.prototype.readBits = function (numBits) {\n if (numBits < 1 || numBits > 32 || numBits > this.available()) {\n throw new Error(\"Cannot read \" + numBits.toString() + \" bits\");\n }\n var result = 0,mask;\n var bitsToNotRead;\n // First, read remainder from current byte\n if (this.bitOffset > 0) {\n var bitsLeft = 8 - this.bitOffset;\n var toRead = numBits < bitsLeft ? numBits : bitsLeft;\n bitsToNotRead = bitsLeft - toRead;\n mask = (0xFF >> (8 - toRead)) << bitsToNotRead;\n result = (this.bytes[this.byteOffset] & mask) >> bitsToNotRead;\n numBits -= toRead;\n this.bitOffset += toRead;\n if (this.bitOffset === 8) {\n this.bitOffset = 0;\n this.byteOffset++;\n }\n }\n // Next read whole bytes\n if (numBits > 0) {\n while (numBits >= 8) {\n result = (result << 8) | (this.bytes[this.byteOffset] & 0xFF);\n this.byteOffset++;\n numBits -= 8;\n }\n // Finally read a partial byte\n if (numBits > 0) {\n bitsToNotRead = 8 - numBits;\n mask = (0xFF >> bitsToNotRead) << bitsToNotRead;\n result = (result << numBits) | ((this.bytes[this.byteOffset] & mask) >> bitsToNotRead);\n this.bitOffset += numBits;\n }\n }\n return result;\n };\n BitStream.prototype.available = function () {\n return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset;\n };\n return BitStream;\n }());\n exports.BitStream = BitStream;\n \n \n /***/ }),\n /* 8 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.shiftJISTable = {\n 0x20: 0x0020,\n 0x21: 0x0021,\n 0x22: 0x0022,\n 0x23: 0x0023,\n 0x24: 0x0024,\n 0x25: 0x0025,\n 0x26: 0x0026,\n 0x27: 0x0027,\n 0x28: 0x0028,\n 0x29: 0x0029,\n 0x2A: 0x002A,\n 0x2B: 0x002B,\n 0x2C: 0x002C,\n 0x2D: 0x002D,\n 0x2E: 0x002E,\n 0x2F: 0x002F,\n 0x30: 0x0030,\n 0x31: 0x0031,\n 0x32: 0x0032,\n 0x33: 0x0033,\n 0x34: 0x0034,\n 0x35: 0x0035,\n 0x36: 0x0036,\n 0x37: 0x0037,\n 0x38: 0x0038,\n 0x39: 0x0039,\n 0x3A: 0x003A,\n 0x3B: 0x003B,\n 0x3C: 0x003C,\n 0x3D: 0x003D,\n 0x3E: 0x003E,\n 0x3F: 0x003F,\n 0x40: 0x0040,\n 0x41: 0x0041,\n 0x42: 0x0042,\n 0x43: 0x0043,\n 0x44: 0x0044,\n 0x45: 0x0045,\n 0x46: 0x0046,\n 0x47: 0x0047,\n 0x48: 0x0048,\n 0x49: 0x0049,\n 0x4A: 0x004A,\n 0x4B: 0x004B,\n 0x4C: 0x004C,\n 0x4D: 0x004D,\n 0x4E: 0x004E,\n 0x4F: 0x004F,\n 0x50: 0x0050,\n 0x51: 0x0051,\n 0x52: 0x0052,\n 0x53: 0x0053,\n 0x54: 0x0054,\n 0x55: 0x0055,\n 0x56: 0x0056,\n 0x57: 0x0057,\n 0x58: 0x0058,\n 0x59: 0x0059,\n 0x5A: 0x005A,\n 0x5B: 0x005B,\n 0x5C: 0x00A5,\n 0x5D: 0x005D,\n 0x5E: 0x005E,\n 0x5F: 0x005F,\n 0x60: 0x0060,\n 0x61: 0x0061,\n 0x62: 0x0062,\n 0x63: 0x0063,\n 0x64: 0x0064,\n 0x65: 0x0065,\n 0x66: 0x0066,\n 0x67: 0x0067,\n 0x68: 0x0068,\n 0x69: 0x0069,\n 0x6A: 0x006A,\n 0x6B: 0x006B,\n 0x6C: 0x006C,\n 0x6D: 0x006D,\n 0x6E: 0x006E,\n 0x6F: 0x006F,\n 0x70: 0x0070,\n 0x71: 0x0071,\n 0x72: 0x0072,\n 0x73: 0x0073,\n 0x74: 0x0074,\n 0x75: 0x0075,\n 0x76: 0x0076,\n 0x77: 0x0077,\n 0x78: 0x0078,\n 0x79: 0x0079,\n 0x7A: 0x007A,\n 0x7B: 0x007B,\n 0x7C: 0x007C,\n 0x7D: 0x007D,\n 0x7E: 0x203E,\n 0x8140: 0x3000,\n 0x8141: 0x3001,\n 0x8142: 0x3002,\n 0x8143: 0xFF0C,\n 0x8144: 0xFF0E,\n 0x8145: 0x30FB,\n 0x8146: 0xFF1A,\n 0x8147: 0xFF1B,\n 0x8148: 0xFF1F,\n 0x8149: 0xFF01,\n 0x814A: 0x309B,\n 0x814B: 0x309C,\n 0x814C: 0x00B4,\n 0x814D: 0xFF40,\n 0x814E: 0x00A8,\n 0x814F: 0xFF3E,\n 0x8150: 0xFFE3,\n 0x8151: 0xFF3F,\n 0x8152: 0x30FD,\n 0x8153: 0x30FE,\n 0x8154: 0x309D,\n 0x8155: 0x309E,\n 0x8156: 0x3003,\n 0x8157: 0x4EDD,\n 0x8158: 0x3005,\n 0x8159: 0x3006,\n 0x815A: 0x3007,\n 0x815B: 0x30FC,\n 0x815C: 0x2015,\n 0x815D: 0x2010,\n 0x815E: 0xFF0F,\n 0x815F: 0x005C,\n 0x8160: 0x301C,\n 0x8161: 0x2016,\n 0x8162: 0xFF5C,\n 0x8163: 0x2026,\n 0x8164: 0x2025,\n 0x8165: 0x2018,\n 0x8166: 0x2019,\n 0x8167: 0x201C,\n 0x8168: 0x201D,\n 0x8169: 0xFF08,\n 0x816A: 0xFF09,\n 0x816B: 0x3014,\n 0x816C: 0x3015,\n 0x816D: 0xFF3B,\n 0x816E: 0xFF3D,\n 0x816F: 0xFF5B,\n 0x8170: 0xFF5D,\n 0x8171: 0x3008,\n 0x8172: 0x3009,\n 0x8173: 0x300A,\n 0x8174: 0x300B,\n 0x8175: 0x300C,\n 0x8176: 0x300D,\n 0x8177: 0x300E,\n 0x8178: 0x300F,\n 0x8179: 0x3010,\n 0x817A: 0x3011,\n 0x817B: 0xFF0B,\n 0x817C: 0x2212,\n 0x817D: 0x00B1,\n 0x817E: 0x00D7,\n 0x8180: 0x00F7,\n 0x8181: 0xFF1D,\n 0x8182: 0x2260,\n 0x8183: 0xFF1C,\n 0x8184: 0xFF1E,\n 0x8185: 0x2266,\n 0x8186: 0x2267,\n 0x8187: 0x221E,\n 0x8188: 0x2234,\n 0x8189: 0x2642,\n 0x818A: 0x2640,\n 0x818B: 0x00B0,\n 0x818C: 0x2032,\n 0x818D: 0x2033,\n 0x818E: 0x2103,\n 0x818F: 0xFFE5,\n 0x8190: 0xFF04,\n 0x8191: 0x00A2,\n 0x8192: 0x00A3,\n 0x8193: 0xFF05,\n 0x8194: 0xFF03,\n 0x8195: 0xFF06,\n 0x8196: 0xFF0A,\n 0x8197: 0xFF20,\n 0x8198: 0x00A7,\n 0x8199: 0x2606,\n 0x819A: 0x2605,\n 0x819B: 0x25CB,\n 0x819C: 0x25CF,\n 0x819D: 0x25CE,\n 0x819E: 0x25C7,\n 0x819F: 0x25C6,\n 0x81A0: 0x25A1,\n 0x81A1: 0x25A0,\n 0x81A2: 0x25B3,\n 0x81A3: 0x25B2,\n 0x81A4: 0x25BD,\n 0x81A5: 0x25BC,\n 0x81A6: 0x203B,\n 0x81A7: 0x3012,\n 0x81A8: 0x2192,\n 0x81A9: 0x2190,\n 0x81AA: 0x2191,\n 0x81AB: 0x2193,\n 0x81AC: 0x3013,\n 0x81B8: 0x2208,\n 0x81B9: 0x220B,\n 0x81BA: 0x2286,\n 0x81BB: 0x2287,\n 0x81BC: 0x2282,\n 0x81BD: 0x2283,\n 0x81BE: 0x222A,\n 0x81BF: 0x2229,\n 0x81C8: 0x2227,\n 0x81C9: 0x2228,\n 0x81CA: 0x00AC,\n 0x81CB: 0x21D2,\n 0x81CC: 0x21D4,\n 0x81CD: 0x2200,\n 0x81CE: 0x2203,\n 0x81DA: 0x2220,\n 0x81DB: 0x22A5,\n 0x81DC: 0x2312,\n 0x81DD: 0x2202,\n 0x81DE: 0x2207,\n 0x81DF: 0x2261,\n 0x81E0: 0x2252,\n 0x81E1: 0x226A,\n 0x81E2: 0x226B,\n 0x81E3: 0x221A,\n 0x81E4: 0x223D,\n 0x81E5: 0x221D,\n 0x81E6: 0x2235,\n 0x81E7: 0x222B,\n 0x81E8: 0x222C,\n 0x81F0: 0x212B,\n 0x81F1: 0x2030,\n 0x81F2: 0x266F,\n 0x81F3: 0x266D,\n 0x81F4: 0x266A,\n 0x81F5: 0x2020,\n 0x81F6: 0x2021,\n 0x81F7: 0x00B6,\n 0x81FC: 0x25EF,\n 0x824F: 0xFF10,\n 0x8250: 0xFF11,\n 0x8251: 0xFF12,\n 0x8252: 0xFF13,\n 0x8253: 0xFF14,\n 0x8254: 0xFF15,\n 0x8255: 0xFF16,\n 0x8256: 0xFF17,\n 0x8257: 0xFF18,\n 0x8258: 0xFF19,\n 0x8260: 0xFF21,\n 0x8261: 0xFF22,\n 0x8262: 0xFF23,\n 0x8263: 0xFF24,\n 0x8264: 0xFF25,\n 0x8265: 0xFF26,\n 0x8266: 0xFF27,\n 0x8267: 0xFF28,\n 0x8268: 0xFF29,\n 0x8269: 0xFF2A,\n 0x826A: 0xFF2B,\n 0x826B: 0xFF2C,\n 0x826C: 0xFF2D,\n 0x826D: 0xFF2E,\n 0x826E: 0xFF2F,\n 0x826F: 0xFF30,\n 0x8270: 0xFF31,\n 0x8271: 0xFF32,\n 0x8272: 0xFF33,\n 0x8273: 0xFF34,\n 0x8274: 0xFF35,\n 0x8275: 0xFF36,\n 0x8276: 0xFF37,\n 0x8277: 0xFF38,\n 0x8278: 0xFF39,\n 0x8279: 0xFF3A,\n 0x8281: 0xFF41,\n 0x8282: 0xFF42,\n 0x8283: 0xFF43,\n 0x8284: 0xFF44,\n 0x8285: 0xFF45,\n 0x8286: 0xFF46,\n 0x8287: 0xFF47,\n 0x8288: 0xFF48,\n 0x8289: 0xFF49,\n 0x828A: 0xFF4A,\n 0x828B: 0xFF4B,\n 0x828C: 0xFF4C,\n 0x828D: 0xFF4D,\n 0x828E: 0xFF4E,\n 0x828F: 0xFF4F,\n 0x8290: 0xFF50,\n 0x8291: 0xFF51,\n 0x8292: 0xFF52,\n 0x8293: 0xFF53,\n 0x8294: 0xFF54,\n 0x8295: 0xFF55,\n 0x8296: 0xFF56,\n 0x8297: 0xFF57,\n 0x8298: 0xFF58,\n 0x8299: 0xFF59,\n 0x829A: 0xFF5A,\n 0x829F: 0x3041,\n 0x82A0: 0x3042,\n 0x82A1: 0x3043,\n 0x82A2: 0x3044,\n 0x82A3: 0x3045,\n 0x82A4: 0x3046,\n 0x82A5: 0x3047,\n 0x82A6: 0x3048,\n 0x82A7: 0x3049,\n 0x82A8: 0x304A,\n 0x82A9: 0x304B,\n 0x82AA: 0x304C,\n 0x82AB: 0x304D,\n 0x82AC: 0x304E,\n 0x82AD: 0x304F,\n 0x82AE: 0x3050,\n 0x82AF: 0x3051,\n 0x82B0: 0x3052,\n 0x82B1: 0x3053,\n 0x82B2: 0x3054,\n 0x82B3: 0x3055,\n 0x82B4: 0x3056,\n 0x82B5: 0x3057,\n 0x82B6: 0x3058,\n 0x82B7: 0x3059,\n 0x82B8: 0x305A,\n 0x82B9: 0x305B,\n 0x82BA: 0x305C,\n 0x82BB: 0x305D,\n 0x82BC: 0x305E,\n 0x82BD: 0x305F,\n 0x82BE: 0x3060,\n 0x82BF: 0x3061,\n 0x82C0: 0x3062,\n 0x82C1: 0x3063,\n 0x82C2: 0x3064,\n 0x82C3: 0x3065,\n 0x82C4: 0x3066,\n 0x82C5: 0x3067,\n 0x82C6: 0x3068,\n 0x82C7: 0x3069,\n 0x82C8: 0x306A,\n 0x82C9: 0x306B,\n 0x82CA: 0x306C,\n 0x82CB: 0x306D,\n 0x82CC: 0x306E,\n 0x82CD: 0x306F,\n 0x82CE: 0x3070,\n 0x82CF: 0x3071,\n 0x82D0: 0x3072,\n 0x82D1: 0x3073,\n 0x82D2: 0x3074,\n 0x82D3: 0x3075,\n 0x82D4: 0x3076,\n 0x82D5: 0x3077,\n 0x82D6: 0x3078,\n 0x82D7: 0x3079,\n 0x82D8: 0x307A,\n 0x82D9: 0x307B,\n 0x82DA: 0x307C,\n 0x82DB: 0x307D,\n 0x82DC: 0x307E,\n 0x82DD: 0x307F,\n 0x82DE: 0x3080,\n 0x82DF: 0x3081,\n 0x82E0: 0x3082,\n 0x82E1: 0x3083,\n 0x82E2: 0x3084,\n 0x82E3: 0x3085,\n 0x82E4: 0x3086,\n 0x82E5: 0x3087,\n 0x82E6: 0x3088,\n 0x82E7: 0x3089,\n 0x82E8: 0x308A,\n 0x82E9: 0x308B,\n 0x82EA: 0x308C,\n 0x82EB: 0x308D,\n 0x82EC: 0x308E,\n 0x82ED: 0x308F,\n 0x82EE: 0x3090,\n 0x82EF: 0x3091,\n 0x82F0: 0x3092,\n 0x82F1: 0x3093,\n 0x8340: 0x30A1,\n 0x8341: 0x30A2,\n 0x8342: 0x30A3,\n 0x8343: 0x30A4,\n 0x8344: 0x30A5,\n 0x8345: 0x30A6,\n 0x8346: 0x30A7,\n 0x8347: 0x30A8,\n 0x8348: 0x30A9,\n 0x8349: 0x30AA,\n 0x834A: 0x30AB,\n 0x834B: 0x30AC,\n 0x834C: 0x30AD,\n 0x834D: 0x30AE,\n 0x834E: 0x30AF,\n 0x834F: 0x30B0,\n 0x8350: 0x30B1,\n 0x8351: 0x30B2,\n 0x8352: 0x30B3,\n 0x8353: 0x30B4,\n 0x8354: 0x30B5,\n 0x8355: 0x30B6,\n 0x8356: 0x30B7,\n 0x8357: 0x30B8,\n 0x8358: 0x30B9,\n 0x8359: 0x30BA,\n 0x835A: 0x30BB,\n 0x835B: 0x30BC,\n 0x835C: 0x30BD,\n 0x835D: 0x30BE,\n 0x835E: 0x30BF,\n 0x835F: 0x30C0,\n 0x8360: 0x30C1,\n 0x8361: 0x30C2,\n 0x8362: 0x30C3,\n 0x8363: 0x30C4,\n 0x8364: 0x30C5,\n 0x8365: 0x30C6,\n 0x8366: 0x30C7,\n 0x8367: 0x30C8,\n 0x8368: 0x30C9,\n 0x8369: 0x30CA,\n 0x836A: 0x30CB,\n 0x836B: 0x30CC,\n 0x836C: 0x30CD,\n 0x836D: 0x30CE,\n 0x836E: 0x30CF,\n 0x836F: 0x30D0,\n 0x8370: 0x30D1,\n 0x8371: 0x30D2,\n 0x8372: 0x30D3,\n 0x8373: 0x30D4,\n 0x8374: 0x30D5,\n 0x8375: 0x30D6,\n 0x8376: 0x30D7,\n 0x8377: 0x30D8,\n 0x8378: 0x30D9,\n 0x8379: 0x30DA,\n 0x837A: 0x30DB,\n 0x837B: 0x30DC,\n 0x837C: 0x30DD,\n 0x837D: 0x30DE,\n 0x837E: 0x30DF,\n 0x8380: 0x30E0,\n 0x8381: 0x30E1,\n 0x8382: 0x30E2,\n 0x8383: 0x30E3,\n 0x8384: 0x30E4,\n 0x8385: 0x30E5,\n 0x8386: 0x30E6,\n 0x8387: 0x30E7,\n 0x8388: 0x30E8,\n 0x8389: 0x30E9,\n 0x838A: 0x30EA,\n 0x838B: 0x30EB,\n 0x838C: 0x30EC,\n 0x838D: 0x30ED,\n 0x838E: 0x30EE,\n 0x838F: 0x30EF,\n 0x8390: 0x30F0,\n 0x8391: 0x30F1,\n 0x8392: 0x30F2,\n 0x8393: 0x30F3,\n 0x8394: 0x30F4,\n 0x8395: 0x30F5,\n 0x8396: 0x30F6,\n 0x839F: 0x0391,\n 0x83A0: 0x0392,\n 0x83A1: 0x0393,\n 0x83A2: 0x0394,\n 0x83A3: 0x0395,\n 0x83A4: 0x0396,\n 0x83A5: 0x0397,\n 0x83A6: 0x0398,\n 0x83A7: 0x0399,\n 0x83A8: 0x039A,\n 0x83A9: 0x039B,\n 0x83AA: 0x039C,\n 0x83AB: 0x039D,\n 0x83AC: 0x039E,\n 0x83AD: 0x039F,\n 0x83AE: 0x03A0,\n 0x83AF: 0x03A1,\n 0x83B0: 0x03A3,\n 0x83B1: 0x03A4,\n 0x83B2: 0x03A5,\n 0x83B3: 0x03A6,\n 0x83B4: 0x03A7,\n 0x83B5: 0x03A8,\n 0x83B6: 0x03A9,\n 0x83BF: 0x03B1,\n 0x83C0: 0x03B2,\n 0x83C1: 0x03B3,\n 0x83C2: 0x03B4,\n 0x83C3: 0x03B5,\n 0x83C4: 0x03B6,\n 0x83C5: 0x03B7,\n 0x83C6: 0x03B8,\n 0x83C7: 0x03B9,\n 0x83C8: 0x03BA,\n 0x83C9: 0x03BB,\n 0x83CA: 0x03BC,\n 0x83CB: 0x03BD,\n 0x83CC: 0x03BE,\n 0x83CD: 0x03BF,\n 0x83CE: 0x03C0,\n 0x83CF: 0x03C1,\n 0x83D0: 0x03C3,\n 0x83D1: 0x03C4,\n 0x83D2: 0x03C5,\n 0x83D3: 0x03C6,\n 0x83D4: 0x03C7,\n 0x83D5: 0x03C8,\n 0x83D6: 0x03C9,\n 0x8440: 0x0410,\n 0x8441: 0x0411,\n 0x8442: 0x0412,\n 0x8443: 0x0413,\n 0x8444: 0x0414,\n 0x8445: 0x0415,\n 0x8446: 0x0401,\n 0x8447: 0x0416,\n 0x8448: 0x0417,\n 0x8449: 0x0418,\n 0x844A: 0x0419,\n 0x844B: 0x041A,\n 0x844C: 0x041B,\n 0x844D: 0x041C,\n 0x844E: 0x041D,\n 0x844F: 0x041E,\n 0x8450: 0x041F,\n 0x8451: 0x0420,\n 0x8452: 0x0421,\n 0x8453: 0x0422,\n 0x8454: 0x0423,\n 0x8455: 0x0424,\n 0x8456: 0x0425,\n 0x8457: 0x0426,\n 0x8458: 0x0427,\n 0x8459: 0x0428,\n 0x845A: 0x0429,\n 0x845B: 0x042A,\n 0x845C: 0x042B,\n 0x845D: 0x042C,\n 0x845E: 0x042D,\n 0x845F: 0x042E,\n 0x8460: 0x042F,\n 0x8470: 0x0430,\n 0x8471: 0x0431,\n 0x8472: 0x0432,\n 0x8473: 0x0433,\n 0x8474: 0x0434,\n 0x8475: 0x0435,\n 0x8476: 0x0451,\n 0x8477: 0x0436,\n 0x8478: 0x0437,\n 0x8479: 0x0438,\n 0x847A: 0x0439,\n 0x847B: 0x043A,\n 0x847C: 0x043B,\n 0x847D: 0x043C,\n 0x847E: 0x043D,\n 0x8480: 0x043E,\n 0x8481: 0x043F,\n 0x8482: 0x0440,\n 0x8483: 0x0441,\n 0x8484: 0x0442,\n 0x8485: 0x0443,\n 0x8486: 0x0444,\n 0x8487: 0x0445,\n 0x8488: 0x0446,\n 0x8489: 0x0447,\n 0x848A: 0x0448,\n 0x848B: 0x0449,\n 0x848C: 0x044A,\n 0x848D: 0x044B,\n 0x848E: 0x044C,\n 0x848F: 0x044D,\n 0x8490: 0x044E,\n 0x8491: 0x044F,\n 0x849F: 0x2500,\n 0x84A0: 0x2502,\n 0x84A1: 0x250C,\n 0x84A2: 0x2510,\n 0x84A3: 0x2518,\n 0x84A4: 0x2514,\n 0x84A5: 0x251C,\n 0x84A6: 0x252C,\n 0x84A7: 0x2524,\n 0x84A8: 0x2534,\n 0x84A9: 0x253C,\n 0x84AA: 0x2501,\n 0x84AB: 0x2503,\n 0x84AC: 0x250F,\n 0x84AD: 0x2513,\n 0x84AE: 0x251B,\n 0x84AF: 0x2517,\n 0x84B0: 0x2523,\n 0x84B1: 0x2533,\n 0x84B2: 0x252B,\n 0x84B3: 0x253B,\n 0x84B4: 0x254B,\n 0x84B5: 0x2520,\n 0x84B6: 0x252F,\n 0x84B7: 0x2528,\n 0x84B8: 0x2537,\n 0x84B9: 0x253F,\n 0x84BA: 0x251D,\n 0x84BB: 0x2530,\n 0x84BC: 0x2525,\n 0x84BD: 0x2538,\n 0x84BE: 0x2542,\n 0x889F: 0x4E9C,\n 0x88A0: 0x5516,\n 0x88A1: 0x5A03,\n 0x88A2: 0x963F,\n 0x88A3: 0x54C0,\n 0x88A4: 0x611B,\n 0x88A5: 0x6328,\n 0x88A6: 0x59F6,\n 0x88A7: 0x9022,\n 0x88A8: 0x8475,\n 0x88A9: 0x831C,\n 0x88AA: 0x7A50,\n 0x88AB: 0x60AA,\n 0x88AC: 0x63E1,\n 0x88AD: 0x6E25,\n 0x88AE: 0x65ED,\n 0x88AF: 0x8466,\n 0x88B0: 0x82A6,\n 0x88B1: 0x9BF5,\n 0x88B2: 0x6893,\n 0x88B3: 0x5727,\n 0x88B4: 0x65A1,\n 0x88B5: 0x6271,\n 0x88B6: 0x5B9B,\n 0x88B7: 0x59D0,\n 0x88B8: 0x867B,\n 0x88B9: 0x98F4,\n 0x88BA: 0x7D62,\n 0x88BB: 0x7DBE,\n 0x88BC: 0x9B8E,\n 0x88BD: 0x6216,\n 0x88BE: 0x7C9F,\n 0x88BF: 0x88B7,\n 0x88C0: 0x5B89,\n 0x88C1: 0x5EB5,\n 0x88C2: 0x6309,\n 0x88C3: 0x6697,\n 0x88C4: 0x6848,\n 0x88C5: 0x95C7,\n 0x88C6: 0x978D,\n 0x88C7: 0x674F,\n 0x88C8: 0x4EE5,\n 0x88C9: 0x4F0A,\n 0x88CA: 0x4F4D,\n 0x88CB: 0x4F9D,\n 0x88CC: 0x5049,\n 0x88CD: 0x56F2,\n 0x88CE: 0x5937,\n 0x88CF: 0x59D4,\n 0x88D0: 0x5A01,\n 0x88D1: 0x5C09,\n 0x88D2: 0x60DF,\n 0x88D3: 0x610F,\n 0x88D4: 0x6170,\n 0x88D5: 0x6613,\n 0x88D6: 0x6905,\n 0x88D7: 0x70BA,\n 0x88D8: 0x754F,\n 0x88D9: 0x7570,\n 0x88DA: 0x79FB,\n 0x88DB: 0x7DAD,\n 0x88DC: 0x7DEF,\n 0x88DD: 0x80C3,\n 0x88DE: 0x840E,\n 0x88DF: 0x8863,\n 0x88E0: 0x8B02,\n 0x88E1: 0x9055,\n 0x88E2: 0x907A,\n 0x88E3: 0x533B,\n 0x88E4: 0x4E95,\n 0x88E5: 0x4EA5,\n 0x88E6: 0x57DF,\n 0x88E7: 0x80B2,\n 0x88E8: 0x90C1,\n 0x88E9: 0x78EF,\n 0x88EA: 0x4E00,\n 0x88EB: 0x58F1,\n 0x88EC: 0x6EA2,\n 0x88ED: 0x9038,\n 0x88EE: 0x7A32,\n 0x88EF: 0x8328,\n 0x88F0: 0x828B,\n 0x88F1: 0x9C2F,\n 0x88F2: 0x5141,\n 0x88F3: 0x5370,\n 0x88F4: 0x54BD,\n 0x88F5: 0x54E1,\n 0x88F6: 0x56E0,\n 0x88F7: 0x59FB,\n 0x88F8: 0x5F15,\n 0x88F9: 0x98F2,\n 0x88FA: 0x6DEB,\n 0x88FB: 0x80E4,\n 0x88FC: 0x852D,\n 0x8940: 0x9662,\n 0x8941: 0x9670,\n 0x8942: 0x96A0,\n 0x8943: 0x97FB,\n 0x8944: 0x540B,\n 0x8945: 0x53F3,\n 0x8946: 0x5B87,\n 0x8947: 0x70CF,\n 0x8948: 0x7FBD,\n 0x8949: 0x8FC2,\n 0x894A: 0x96E8,\n 0x894B: 0x536F,\n 0x894C: 0x9D5C,\n 0x894D: 0x7ABA,\n 0x894E: 0x4E11,\n 0x894F: 0x7893,\n 0x8950: 0x81FC,\n 0x8951: 0x6E26,\n 0x8952: 0x5618,\n 0x8953: 0x5504,\n 0x8954: 0x6B1D,\n 0x8955: 0x851A,\n 0x8956: 0x9C3B,\n 0x8957: 0x59E5,\n 0x8958: 0x53A9,\n 0x8959: 0x6D66,\n 0x895A: 0x74DC,\n 0x895B: 0x958F,\n 0x895C: 0x5642,\n 0x895D: 0x4E91,\n 0x895E: 0x904B,\n 0x895F: 0x96F2,\n 0x8960: 0x834F,\n 0x8961: 0x990C,\n 0x8962: 0x53E1,\n 0x8963: 0x55B6,\n 0x8964: 0x5B30,\n 0x8965: 0x5F71,\n 0x8966: 0x6620,\n 0x8967: 0x66F3,\n 0x8968: 0x6804,\n 0x8969: 0x6C38,\n 0x896A: 0x6CF3,\n 0x896B: 0x6D29,\n 0x896C: 0x745B,\n 0x896D: 0x76C8,\n 0x896E: 0x7A4E,\n 0x896F: 0x9834,\n 0x8970: 0x82F1,\n 0x8971: 0x885B,\n 0x8972: 0x8A60,\n 0x8973: 0x92ED,\n 0x8974: 0x6DB2,\n 0x8975: 0x75AB,\n 0x8976: 0x76CA,\n 0x8977: 0x99C5,\n 0x8978: 0x60A6,\n 0x8979: 0x8B01,\n 0x897A: 0x8D8A,\n 0x897B: 0x95B2,\n 0x897C: 0x698E,\n 0x897D: 0x53AD,\n 0x897E: 0x5186,\n 0x8980: 0x5712,\n 0x8981: 0x5830,\n 0x8982: 0x5944,\n 0x8983: 0x5BB4,\n 0x8984: 0x5EF6,\n 0x8985: 0x6028,\n 0x8986: 0x63A9,\n 0x8987: 0x63F4,\n 0x8988: 0x6CBF,\n 0x8989: 0x6F14,\n 0x898A: 0x708E,\n 0x898B: 0x7114,\n 0x898C: 0x7159,\n 0x898D: 0x71D5,\n 0x898E: 0x733F,\n 0x898F: 0x7E01,\n 0x8990: 0x8276,\n 0x8991: 0x82D1,\n 0x8992: 0x8597,\n 0x8993: 0x9060,\n 0x8994: 0x925B,\n 0x8995: 0x9D1B,\n 0x8996: 0x5869,\n 0x8997: 0x65BC,\n 0x8998: 0x6C5A,\n 0x8999: 0x7525,\n 0x899A: 0x51F9,\n 0x899B: 0x592E,\n 0x899C: 0x5965,\n 0x899D: 0x5F80,\n 0x899E: 0x5FDC,\n 0x899F: 0x62BC,\n 0x89A0: 0x65FA,\n 0x89A1: 0x6A2A,\n 0x89A2: 0x6B27,\n 0x89A3: 0x6BB4,\n 0x89A4: 0x738B,\n 0x89A5: 0x7FC1,\n 0x89A6: 0x8956,\n 0x89A7: 0x9D2C,\n 0x89A8: 0x9D0E,\n 0x89A9: 0x9EC4,\n 0x89AA: 0x5CA1,\n 0x89AB: 0x6C96,\n 0x89AC: 0x837B,\n 0x89AD: 0x5104,\n 0x89AE: 0x5C4B,\n 0x89AF: 0x61B6,\n 0x89B0: 0x81C6,\n 0x89B1: 0x6876,\n 0x89B2: 0x7261,\n 0x89B3: 0x4E59,\n 0x89B4: 0x4FFA,\n 0x89B5: 0x5378,\n 0x89B6: 0x6069,\n 0x89B7: 0x6E29,\n 0x89B8: 0x7A4F,\n 0x89B9: 0x97F3,\n 0x89BA: 0x4E0B,\n 0x89BB: 0x5316,\n 0x89BC: 0x4EEE,\n 0x89BD: 0x4F55,\n 0x89BE: 0x4F3D,\n 0x89BF: 0x4FA1,\n 0x89C0: 0x4F73,\n 0x89C1: 0x52A0,\n 0x89C2: 0x53EF,\n 0x89C3: 0x5609,\n 0x89C4: 0x590F,\n 0x89C5: 0x5AC1,\n 0x89C6: 0x5BB6,\n 0x89C7: 0x5BE1,\n 0x89C8: 0x79D1,\n 0x89C9: 0x6687,\n 0x89CA: 0x679C,\n 0x89CB: 0x67B6,\n 0x89CC: 0x6B4C,\n 0x89CD: 0x6CB3,\n 0x89CE: 0x706B,\n 0x89CF: 0x73C2,\n 0x89D0: 0x798D,\n 0x89D1: 0x79BE,\n 0x89D2: 0x7A3C,\n 0x89D3: 0x7B87,\n 0x89D4: 0x82B1,\n 0x89D5: 0x82DB,\n 0x89D6: 0x8304,\n 0x89D7: 0x8377,\n 0x89D8: 0x83EF,\n 0x89D9: 0x83D3,\n 0x89DA: 0x8766,\n 0x89DB: 0x8AB2,\n 0x89DC: 0x5629,\n 0x89DD: 0x8CA8,\n 0x89DE: 0x8FE6,\n 0x89DF: 0x904E,\n 0x89E0: 0x971E,\n 0x89E1: 0x868A,\n 0x89E2: 0x4FC4,\n 0x89E3: 0x5CE8,\n 0x89E4: 0x6211,\n 0x89E5: 0x7259,\n 0x89E6: 0x753B,\n 0x89E7: 0x81E5,\n 0x89E8: 0x82BD,\n 0x89E9: 0x86FE,\n 0x89EA: 0x8CC0,\n 0x89EB: 0x96C5,\n 0x89EC: 0x9913,\n 0x89ED: 0x99D5,\n 0x89EE: 0x4ECB,\n 0x89EF: 0x4F1A,\n 0x89F0: 0x89E3,\n 0x89F1: 0x56DE,\n 0x89F2: 0x584A,\n 0x89F3: 0x58CA,\n 0x89F4: 0x5EFB,\n 0x89F5: 0x5FEB,\n 0x89F6: 0x602A,\n 0x89F7: 0x6094,\n 0x89F8: 0x6062,\n 0x89F9: 0x61D0,\n 0x89FA: 0x6212,\n 0x89FB: 0x62D0,\n 0x89FC: 0x6539,\n 0x8A40: 0x9B41,\n 0x8A41: 0x6666,\n 0x8A42: 0x68B0,\n 0x8A43: 0x6D77,\n 0x8A44: 0x7070,\n 0x8A45: 0x754C,\n 0x8A46: 0x7686,\n 0x8A47: 0x7D75,\n 0x8A48: 0x82A5,\n 0x8A49: 0x87F9,\n 0x8A4A: 0x958B,\n 0x8A4B: 0x968E,\n 0x8A4C: 0x8C9D,\n 0x8A4D: 0x51F1,\n 0x8A4E: 0x52BE,\n 0x8A4F: 0x5916,\n 0x8A50: 0x54B3,\n 0x8A51: 0x5BB3,\n 0x8A52: 0x5D16,\n 0x8A53: 0x6168,\n 0x8A54: 0x6982,\n 0x8A55: 0x6DAF,\n 0x8A56: 0x788D,\n 0x8A57: 0x84CB,\n 0x8A58: 0x8857,\n 0x8A59: 0x8A72,\n 0x8A5A: 0x93A7,\n 0x8A5B: 0x9AB8,\n 0x8A5C: 0x6D6C,\n 0x8A5D: 0x99A8,\n 0x8A5E: 0x86D9,\n 0x8A5F: 0x57A3,\n 0x8A60: 0x67FF,\n 0x8A61: 0x86CE,\n 0x8A62: 0x920E,\n 0x8A63: 0x5283,\n 0x8A64: 0x5687,\n 0x8A65: 0x5404,\n 0x8A66: 0x5ED3,\n 0x8A67: 0x62E1,\n 0x8A68: 0x64B9,\n 0x8A69: 0x683C,\n 0x8A6A: 0x6838,\n 0x8A6B: 0x6BBB,\n 0x8A6C: 0x7372,\n 0x8A6D: 0x78BA,\n 0x8A6E: 0x7A6B,\n 0x8A6F: 0x899A,\n 0x8A70: 0x89D2,\n 0x8A71: 0x8D6B,\n 0x8A72: 0x8F03,\n 0x8A73: 0x90ED,\n 0x8A74: 0x95A3,\n 0x8A75: 0x9694,\n 0x8A76: 0x9769,\n 0x8A77: 0x5B66,\n 0x8A78: 0x5CB3,\n 0x8A79: 0x697D,\n 0x8A7A: 0x984D,\n 0x8A7B: 0x984E,\n 0x8A7C: 0x639B,\n 0x8A7D: 0x7B20,\n 0x8A7E: 0x6A2B,\n 0x8A80: 0x6A7F,\n 0x8A81: 0x68B6,\n 0x8A82: 0x9C0D,\n 0x8A83: 0x6F5F,\n 0x8A84: 0x5272,\n 0x8A85: 0x559D,\n 0x8A86: 0x6070,\n 0x8A87: 0x62EC,\n 0x8A88: 0x6D3B,\n 0x8A89: 0x6E07,\n 0x8A8A: 0x6ED1,\n 0x8A8B: 0x845B,\n 0x8A8C: 0x8910,\n 0x8A8D: 0x8F44,\n 0x8A8E: 0x4E14,\n 0x8A8F: 0x9C39,\n 0x8A90: 0x53F6,\n 0x8A91: 0x691B,\n 0x8A92: 0x6A3A,\n 0x8A93: 0x9784,\n 0x8A94: 0x682A,\n 0x8A95: 0x515C,\n 0x8A96: 0x7AC3,\n 0x8A97: 0x84B2,\n 0x8A98: 0x91DC,\n 0x8A99: 0x938C,\n 0x8A9A: 0x565B,\n 0x8A9B: 0x9D28,\n 0x8A9C: 0x6822,\n 0x8A9D: 0x8305,\n 0x8A9E: 0x8431,\n 0x8A9F: 0x7CA5,\n 0x8AA0: 0x5208,\n 0x8AA1: 0x82C5,\n 0x8AA2: 0x74E6,\n 0x8AA3: 0x4E7E,\n 0x8AA4: 0x4F83,\n 0x8AA5: 0x51A0,\n 0x8AA6: 0x5BD2,\n 0x8AA7: 0x520A,\n 0x8AA8: 0x52D8,\n 0x8AA9: 0x52E7,\n 0x8AAA: 0x5DFB,\n 0x8AAB: 0x559A,\n 0x8AAC: 0x582A,\n 0x8AAD: 0x59E6,\n 0x8AAE: 0x5B8C,\n 0x8AAF: 0x5B98,\n 0x8AB0: 0x5BDB,\n 0x8AB1: 0x5E72,\n 0x8AB2: 0x5E79,\n 0x8AB3: 0x60A3,\n 0x8AB4: 0x611F,\n 0x8AB5: 0x6163,\n 0x8AB6: 0x61BE,\n 0x8AB7: 0x63DB,\n 0x8AB8: 0x6562,\n 0x8AB9: 0x67D1,\n 0x8ABA: 0x6853,\n 0x8ABB: 0x68FA,\n 0x8ABC: 0x6B3E,\n 0x8ABD: 0x6B53,\n 0x8ABE: 0x6C57,\n 0x8ABF: 0x6F22,\n 0x8AC0: 0x6F97,\n 0x8AC1: 0x6F45,\n 0x8AC2: 0x74B0,\n 0x8AC3: 0x7518,\n 0x8AC4: 0x76E3,\n 0x8AC5: 0x770B,\n 0x8AC6: 0x7AFF,\n 0x8AC7: 0x7BA1,\n 0x8AC8: 0x7C21,\n 0x8AC9: 0x7DE9,\n 0x8ACA: 0x7F36,\n 0x8ACB: 0x7FF0,\n 0x8ACC: 0x809D,\n 0x8ACD: 0x8266,\n 0x8ACE: 0x839E,\n 0x8ACF: 0x89B3,\n 0x8AD0: 0x8ACC,\n 0x8AD1: 0x8CAB,\n 0x8AD2: 0x9084,\n 0x8AD3: 0x9451,\n 0x8AD4: 0x9593,\n 0x8AD5: 0x9591,\n 0x8AD6: 0x95A2,\n 0x8AD7: 0x9665,\n 0x8AD8: 0x97D3,\n 0x8AD9: 0x9928,\n 0x8ADA: 0x8218,\n 0x8ADB: 0x4E38,\n 0x8ADC: 0x542B,\n 0x8ADD: 0x5CB8,\n 0x8ADE: 0x5DCC,\n 0x8ADF: 0x73A9,\n 0x8AE0: 0x764C,\n 0x8AE1: 0x773C,\n 0x8AE2: 0x5CA9,\n 0x8AE3: 0x7FEB,\n 0x8AE4: 0x8D0B,\n 0x8AE5: 0x96C1,\n 0x8AE6: 0x9811,\n 0x8AE7: 0x9854,\n 0x8AE8: 0x9858,\n 0x8AE9: 0x4F01,\n 0x8AEA: 0x4F0E,\n 0x8AEB: 0x5371,\n 0x8AEC: 0x559C,\n 0x8AED: 0x5668,\n 0x8AEE: 0x57FA,\n 0x8AEF: 0x5947,\n 0x8AF0: 0x5B09,\n 0x8AF1: 0x5BC4,\n 0x8AF2: 0x5C90,\n 0x8AF3: 0x5E0C,\n 0x8AF4: 0x5E7E,\n 0x8AF5: 0x5FCC,\n 0x8AF6: 0x63EE,\n 0x8AF7: 0x673A,\n 0x8AF8: 0x65D7,\n 0x8AF9: 0x65E2,\n 0x8AFA: 0x671F,\n 0x8AFB: 0x68CB,\n 0x8AFC: 0x68C4,\n 0x8B40: 0x6A5F,\n 0x8B41: 0x5E30,\n 0x8B42: 0x6BC5,\n 0x8B43: 0x6C17,\n 0x8B44: 0x6C7D,\n 0x8B45: 0x757F,\n 0x8B46: 0x7948,\n 0x8B47: 0x5B63,\n 0x8B48: 0x7A00,\n 0x8B49: 0x7D00,\n 0x8B4A: 0x5FBD,\n 0x8B4B: 0x898F,\n 0x8B4C: 0x8A18,\n 0x8B4D: 0x8CB4,\n 0x8B4E: 0x8D77,\n 0x8B4F: 0x8ECC,\n 0x8B50: 0x8F1D,\n 0x8B51: 0x98E2,\n 0x8B52: 0x9A0E,\n 0x8B53: 0x9B3C,\n 0x8B54: 0x4E80,\n 0x8B55: 0x507D,\n 0x8B56: 0x5100,\n 0x8B57: 0x5993,\n 0x8B58: 0x5B9C,\n 0x8B59: 0x622F,\n 0x8B5A: 0x6280,\n 0x8B5B: 0x64EC,\n 0x8B5C: 0x6B3A,\n 0x8B5D: 0x72A0,\n 0x8B5E: 0x7591,\n 0x8B5F: 0x7947,\n 0x8B60: 0x7FA9,\n 0x8B61: 0x87FB,\n 0x8B62: 0x8ABC,\n 0x8B63: 0x8B70,\n 0x8B64: 0x63AC,\n 0x8B65: 0x83CA,\n 0x8B66: 0x97A0,\n 0x8B67: 0x5409,\n 0x8B68: 0x5403,\n 0x8B69: 0x55AB,\n 0x8B6A: 0x6854,\n 0x8B6B: 0x6A58,\n 0x8B6C: 0x8A70,\n 0x8B6D: 0x7827,\n 0x8B6E: 0x6775,\n 0x8B6F: 0x9ECD,\n 0x8B70: 0x5374,\n 0x8B71: 0x5BA2,\n 0x8B72: 0x811A,\n 0x8B73: 0x8650,\n 0x8B74: 0x9006,\n 0x8B75: 0x4E18,\n 0x8B76: 0x4E45,\n 0x8B77: 0x4EC7,\n 0x8B78: 0x4F11,\n 0x8B79: 0x53CA,\n 0x8B7A: 0x5438,\n 0x8B7B: 0x5BAE,\n 0x8B7C: 0x5F13,\n 0x8B7D: 0x6025,\n 0x8B7E: 0x6551,\n 0x8B80: 0x673D,\n 0x8B81: 0x6C42,\n 0x8B82: 0x6C72,\n 0x8B83: 0x6CE3,\n 0x8B84: 0x7078,\n 0x8B85: 0x7403,\n 0x8B86: 0x7A76,\n 0x8B87: 0x7AAE,\n 0x8B88: 0x7B08,\n 0x8B89: 0x7D1A,\n 0x8B8A: 0x7CFE,\n 0x8B8B: 0x7D66,\n 0x8B8C: 0x65E7,\n 0x8B8D: 0x725B,\n 0x8B8E: 0x53BB,\n 0x8B8F: 0x5C45,\n 0x8B90: 0x5DE8,\n 0x8B91: 0x62D2,\n 0x8B92: 0x62E0,\n 0x8B93: 0x6319,\n 0x8B94: 0x6E20,\n 0x8B95: 0x865A,\n 0x8B96: 0x8A31,\n 0x8B97: 0x8DDD,\n 0x8B98: 0x92F8,\n 0x8B99: 0x6F01,\n 0x8B9A: 0x79A6,\n 0x8B9B: 0x9B5A,\n 0x8B9C: 0x4EA8,\n 0x8B9D: 0x4EAB,\n 0x8B9E: 0x4EAC,\n 0x8B9F: 0x4F9B,\n 0x8BA0: 0x4FA0,\n 0x8BA1: 0x50D1,\n 0x8BA2: 0x5147,\n 0x8BA3: 0x7AF6,\n 0x8BA4: 0x5171,\n 0x8BA5: 0x51F6,\n 0x8BA6: 0x5354,\n 0x8BA7: 0x5321,\n 0x8BA8: 0x537F,\n 0x8BA9: 0x53EB,\n 0x8BAA: 0x55AC,\n 0x8BAB: 0x5883,\n 0x8BAC: 0x5CE1,\n 0x8BAD: 0x5F37,\n 0x8BAE: 0x5F4A,\n 0x8BAF: 0x602F,\n 0x8BB0: 0x6050,\n 0x8BB1: 0x606D,\n 0x8BB2: 0x631F,\n 0x8BB3: 0x6559,\n 0x8BB4: 0x6A4B,\n 0x8BB5: 0x6CC1,\n 0x8BB6: 0x72C2,\n 0x8BB7: 0x72ED,\n 0x8BB8: 0x77EF,\n 0x8BB9: 0x80F8,\n 0x8BBA: 0x8105,\n 0x8BBB: 0x8208,\n 0x8BBC: 0x854E,\n 0x8BBD: 0x90F7,\n 0x8BBE: 0x93E1,\n 0x8BBF: 0x97FF,\n 0x8BC0: 0x9957,\n 0x8BC1: 0x9A5A,\n 0x8BC2: 0x4EF0,\n 0x8BC3: 0x51DD,\n 0x8BC4: 0x5C2D,\n 0x8BC5: 0x6681,\n 0x8BC6: 0x696D,\n 0x8BC7: 0x5C40,\n 0x8BC8: 0x66F2,\n 0x8BC9: 0x6975,\n 0x8BCA: 0x7389,\n 0x8BCB: 0x6850,\n 0x8BCC: 0x7C81,\n 0x8BCD: 0x50C5,\n 0x8BCE: 0x52E4,\n 0x8BCF: 0x5747,\n 0x8BD0: 0x5DFE,\n 0x8BD1: 0x9326,\n 0x8BD2: 0x65A4,\n 0x8BD3: 0x6B23,\n 0x8BD4: 0x6B3D,\n 0x8BD5: 0x7434,\n 0x8BD6: 0x7981,\n 0x8BD7: 0x79BD,\n 0x8BD8: 0x7B4B,\n 0x8BD9: 0x7DCA,\n 0x8BDA: 0x82B9,\n 0x8BDB: 0x83CC,\n 0x8BDC: 0x887F,\n 0x8BDD: 0x895F,\n 0x8BDE: 0x8B39,\n 0x8BDF: 0x8FD1,\n 0x8BE0: 0x91D1,\n 0x8BE1: 0x541F,\n 0x8BE2: 0x9280,\n 0x8BE3: 0x4E5D,\n 0x8BE4: 0x5036,\n 0x8BE5: 0x53E5,\n 0x8BE6: 0x533A,\n 0x8BE7: 0x72D7,\n 0x8BE8: 0x7396,\n 0x8BE9: 0x77E9,\n 0x8BEA: 0x82E6,\n 0x8BEB: 0x8EAF,\n 0x8BEC: 0x99C6,\n 0x8BED: 0x99C8,\n 0x8BEE: 0x99D2,\n 0x8BEF: 0x5177,\n 0x8BF0: 0x611A,\n 0x8BF1: 0x865E,\n 0x8BF2: 0x55B0,\n 0x8BF3: 0x7A7A,\n 0x8BF4: 0x5076,\n 0x8BF5: 0x5BD3,\n 0x8BF6: 0x9047,\n 0x8BF7: 0x9685,\n 0x8BF8: 0x4E32,\n 0x8BF9: 0x6ADB,\n 0x8BFA: 0x91E7,\n 0x8BFB: 0x5C51,\n 0x8BFC: 0x5C48,\n 0x8C40: 0x6398,\n 0x8C41: 0x7A9F,\n 0x8C42: 0x6C93,\n 0x8C43: 0x9774,\n 0x8C44: 0x8F61,\n 0x8C45: 0x7AAA,\n 0x8C46: 0x718A,\n 0x8C47: 0x9688,\n 0x8C48: 0x7C82,\n 0x8C49: 0x6817,\n 0x8C4A: 0x7E70,\n 0x8C4B: 0x6851,\n 0x8C4C: 0x936C,\n 0x8C4D: 0x52F2,\n 0x8C4E: 0x541B,\n 0x8C4F: 0x85AB,\n 0x8C50: 0x8A13,\n 0x8C51: 0x7FA4,\n 0x8C52: 0x8ECD,\n 0x8C53: 0x90E1,\n 0x8C54: 0x5366,\n 0x8C55: 0x8888,\n 0x8C56: 0x7941,\n 0x8C57: 0x4FC2,\n 0x8C58: 0x50BE,\n 0x8C59: 0x5211,\n 0x8C5A: 0x5144,\n 0x8C5B: 0x5553,\n 0x8C5C: 0x572D,\n 0x8C5D: 0x73EA,\n 0x8C5E: 0x578B,\n 0x8C5F: 0x5951,\n 0x8C60: 0x5F62,\n 0x8C61: 0x5F84,\n 0x8C62: 0x6075,\n 0x8C63: 0x6176,\n 0x8C64: 0x6167,\n 0x8C65: 0x61A9,\n 0x8C66: 0x63B2,\n 0x8C67: 0x643A,\n 0x8C68: 0x656C,\n 0x8C69: 0x666F,\n 0x8C6A: 0x6842,\n 0x8C6B: 0x6E13,\n 0x8C6C: 0x7566,\n 0x8C6D: 0x7A3D,\n 0x8C6E: 0x7CFB,\n 0x8C6F: 0x7D4C,\n 0x8C70: 0x7D99,\n 0x8C71: 0x7E4B,\n 0x8C72: 0x7F6B,\n 0x8C73: 0x830E,\n 0x8C74: 0x834A,\n 0x8C75: 0x86CD,\n 0x8C76: 0x8A08,\n 0x8C77: 0x8A63,\n 0x8C78: 0x8B66,\n 0x8C79: 0x8EFD,\n 0x8C7A: 0x981A,\n 0x8C7B: 0x9D8F,\n 0x8C7C: 0x82B8,\n 0x8C7D: 0x8FCE,\n 0x8C7E: 0x9BE8,\n 0x8C80: 0x5287,\n 0x8C81: 0x621F,\n 0x8C82: 0x6483,\n 0x8C83: 0x6FC0,\n 0x8C84: 0x9699,\n 0x8C85: 0x6841,\n 0x8C86: 0x5091,\n 0x8C87: 0x6B20,\n 0x8C88: 0x6C7A,\n 0x8C89: 0x6F54,\n 0x8C8A: 0x7A74,\n 0x8C8B: 0x7D50,\n 0x8C8C: 0x8840,\n 0x8C8D: 0x8A23,\n 0x8C8E: 0x6708,\n 0x8C8F: 0x4EF6,\n 0x8C90: 0x5039,\n 0x8C91: 0x5026,\n 0x8C92: 0x5065,\n 0x8C93: 0x517C,\n 0x8C94: 0x5238,\n 0x8C95: 0x5263,\n 0x8C96: 0x55A7,\n 0x8C97: 0x570F,\n 0x8C98: 0x5805,\n 0x8C99: 0x5ACC,\n 0x8C9A: 0x5EFA,\n 0x8C9B: 0x61B2,\n 0x8C9C: 0x61F8,\n 0x8C9D: 0x62F3,\n 0x8C9E: 0x6372,\n 0x8C9F: 0x691C,\n 0x8CA0: 0x6A29,\n 0x8CA1: 0x727D,\n 0x8CA2: 0x72AC,\n 0x8CA3: 0x732E,\n 0x8CA4: 0x7814,\n 0x8CA5: 0x786F,\n 0x8CA6: 0x7D79,\n 0x8CA7: 0x770C,\n 0x8CA8: 0x80A9,\n 0x8CA9: 0x898B,\n 0x8CAA: 0x8B19,\n 0x8CAB: 0x8CE2,\n 0x8CAC: 0x8ED2,\n 0x8CAD: 0x9063,\n 0x8CAE: 0x9375,\n 0x8CAF: 0x967A,\n 0x8CB0: 0x9855,\n 0x8CB1: 0x9A13,\n 0x8CB2: 0x9E78,\n 0x8CB3: 0x5143,\n 0x8CB4: 0x539F,\n 0x8CB5: 0x53B3,\n 0x8CB6: 0x5E7B,\n 0x8CB7: 0x5F26,\n 0x8CB8: 0x6E1B,\n 0x8CB9: 0x6E90,\n 0x8CBA: 0x7384,\n 0x8CBB: 0x73FE,\n 0x8CBC: 0x7D43,\n 0x8CBD: 0x8237,\n 0x8CBE: 0x8A00,\n 0x8CBF: 0x8AFA,\n 0x8CC0: 0x9650,\n 0x8CC1: 0x4E4E,\n 0x8CC2: 0x500B,\n 0x8CC3: 0x53E4,\n 0x8CC4: 0x547C,\n 0x8CC5: 0x56FA,\n 0x8CC6: 0x59D1,\n 0x8CC7: 0x5B64,\n 0x8CC8: 0x5DF1,\n 0x8CC9: 0x5EAB,\n 0x8CCA: 0x5F27,\n 0x8CCB: 0x6238,\n 0x8CCC: 0x6545,\n 0x8CCD: 0x67AF,\n 0x8CCE: 0x6E56,\n 0x8CCF: 0x72D0,\n 0x8CD0: 0x7CCA,\n 0x8CD1: 0x88B4,\n 0x8CD2: 0x80A1,\n 0x8CD3: 0x80E1,\n 0x8CD4: 0x83F0,\n 0x8CD5: 0x864E,\n 0x8CD6: 0x8A87,\n 0x8CD7: 0x8DE8,\n 0x8CD8: 0x9237,\n 0x8CD9: 0x96C7,\n 0x8CDA: 0x9867,\n 0x8CDB: 0x9F13,\n 0x8CDC: 0x4E94,\n 0x8CDD: 0x4E92,\n 0x8CDE: 0x4F0D,\n 0x8CDF: 0x5348,\n 0x8CE0: 0x5449,\n 0x8CE1: 0x543E,\n 0x8CE2: 0x5A2F,\n 0x8CE3: 0x5F8C,\n 0x8CE4: 0x5FA1,\n 0x8CE5: 0x609F,\n 0x8CE6: 0x68A7,\n 0x8CE7: 0x6A8E,\n 0x8CE8: 0x745A,\n 0x8CE9: 0x7881,\n 0x8CEA: 0x8A9E,\n 0x8CEB: 0x8AA4,\n 0x8CEC: 0x8B77,\n 0x8CED: 0x9190,\n 0x8CEE: 0x4E5E,\n 0x8CEF: 0x9BC9,\n 0x8CF0: 0x4EA4,\n 0x8CF1: 0x4F7C,\n 0x8CF2: 0x4FAF,\n 0x8CF3: 0x5019,\n 0x8CF4: 0x5016,\n 0x8CF5: 0x5149,\n 0x8CF6: 0x516C,\n 0x8CF7: 0x529F,\n 0x8CF8: 0x52B9,\n 0x8CF9: 0x52FE,\n 0x8CFA: 0x539A,\n 0x8CFB: 0x53E3,\n 0x8CFC: 0x5411,\n 0x8D40: 0x540E,\n 0x8D41: 0x5589,\n 0x8D42: 0x5751,\n 0x8D43: 0x57A2,\n 0x8D44: 0x597D,\n 0x8D45: 0x5B54,\n 0x8D46: 0x5B5D,\n 0x8D47: 0x5B8F,\n 0x8D48: 0x5DE5,\n 0x8D49: 0x5DE7,\n 0x8D4A: 0x5DF7,\n 0x8D4B: 0x5E78,\n 0x8D4C: 0x5E83,\n 0x8D4D: 0x5E9A,\n 0x8D4E: 0x5EB7,\n 0x8D4F: 0x5F18,\n 0x8D50: 0x6052,\n 0x8D51: 0x614C,\n 0x8D52: 0x6297,\n 0x8D53: 0x62D8,\n 0x8D54: 0x63A7,\n 0x8D55: 0x653B,\n 0x8D56: 0x6602,\n 0x8D57: 0x6643,\n 0x8D58: 0x66F4,\n 0x8D59: 0x676D,\n 0x8D5A: 0x6821,\n 0x8D5B: 0x6897,\n 0x8D5C: 0x69CB,\n 0x8D5D: 0x6C5F,\n 0x8D5E: 0x6D2A,\n 0x8D5F: 0x6D69,\n 0x8D60: 0x6E2F,\n 0x8D61: 0x6E9D,\n 0x8D62: 0x7532,\n 0x8D63: 0x7687,\n 0x8D64: 0x786C,\n 0x8D65: 0x7A3F,\n 0x8D66: 0x7CE0,\n 0x8D67: 0x7D05,\n 0x8D68: 0x7D18,\n 0x8D69: 0x7D5E,\n 0x8D6A: 0x7DB1,\n 0x8D6B: 0x8015,\n 0x8D6C: 0x8003,\n 0x8D6D: 0x80AF,\n 0x8D6E: 0x80B1,\n 0x8D6F: 0x8154,\n 0x8D70: 0x818F,\n 0x8D71: 0x822A,\n 0x8D72: 0x8352,\n 0x8D73: 0x884C,\n 0x8D74: 0x8861,\n 0x8D75: 0x8B1B,\n 0x8D76: 0x8CA2,\n 0x8D77: 0x8CFC,\n 0x8D78: 0x90CA,\n 0x8D79: 0x9175,\n 0x8D7A: 0x9271,\n 0x8D7B: 0x783F,\n 0x8D7C: 0x92FC,\n 0x8D7D: 0x95A4,\n 0x8D7E: 0x964D,\n 0x8D80: 0x9805,\n 0x8D81: 0x9999,\n 0x8D82: 0x9AD8,\n 0x8D83: 0x9D3B,\n 0x8D84: 0x525B,\n 0x8D85: 0x52AB,\n 0x8D86: 0x53F7,\n 0x8D87: 0x5408,\n 0x8D88: 0x58D5,\n 0x8D89: 0x62F7,\n 0x8D8A: 0x6FE0,\n 0x8D8B: 0x8C6A,\n 0x8D8C: 0x8F5F,\n 0x8D8D: 0x9EB9,\n 0x8D8E: 0x514B,\n 0x8D8F: 0x523B,\n 0x8D90: 0x544A,\n 0x8D91: 0x56FD,\n 0x8D92: 0x7A40,\n 0x8D93: 0x9177,\n 0x8D94: 0x9D60,\n 0x8D95: 0x9ED2,\n 0x8D96: 0x7344,\n 0x8D97: 0x6F09,\n 0x8D98: 0x8170,\n 0x8D99: 0x7511,\n 0x8D9A: 0x5FFD,\n 0x8D9B: 0x60DA,\n 0x8D9C: 0x9AA8,\n 0x8D9D: 0x72DB,\n 0x8D9E: 0x8FBC,\n 0x8D9F: 0x6B64,\n 0x8DA0: 0x9803,\n 0x8DA1: 0x4ECA,\n 0x8DA2: 0x56F0,\n 0x8DA3: 0x5764,\n 0x8DA4: 0x58BE,\n 0x8DA5: 0x5A5A,\n 0x8DA6: 0x6068,\n 0x8DA7: 0x61C7,\n 0x8DA8: 0x660F,\n 0x8DA9: 0x6606,\n 0x8DAA: 0x6839,\n 0x8DAB: 0x68B1,\n 0x8DAC: 0x6DF7,\n 0x8DAD: 0x75D5,\n 0x8DAE: 0x7D3A,\n 0x8DAF: 0x826E,\n 0x8DB0: 0x9B42,\n 0x8DB1: 0x4E9B,\n 0x8DB2: 0x4F50,\n 0x8DB3: 0x53C9,\n 0x8DB4: 0x5506,\n 0x8DB5: 0x5D6F,\n 0x8DB6: 0x5DE6,\n 0x8DB7: 0x5DEE,\n 0x8DB8: 0x67FB,\n 0x8DB9: 0x6C99,\n 0x8DBA: 0x7473,\n 0x8DBB: 0x7802,\n 0x8DBC: 0x8A50,\n 0x8DBD: 0x9396,\n 0x8DBE: 0x88DF,\n 0x8DBF: 0x5750,\n 0x8DC0: 0x5EA7,\n 0x8DC1: 0x632B,\n 0x8DC2: 0x50B5,\n 0x8DC3: 0x50AC,\n 0x8DC4: 0x518D,\n 0x8DC5: 0x6700,\n 0x8DC6: 0x54C9,\n 0x8DC7: 0x585E,\n 0x8DC8: 0x59BB,\n 0x8DC9: 0x5BB0,\n 0x8DCA: 0x5F69,\n 0x8DCB: 0x624D,\n 0x8DCC: 0x63A1,\n 0x8DCD: 0x683D,\n 0x8DCE: 0x6B73,\n 0x8DCF: 0x6E08,\n 0x8DD0: 0x707D,\n 0x8DD1: 0x91C7,\n 0x8DD2: 0x7280,\n 0x8DD3: 0x7815,\n 0x8DD4: 0x7826,\n 0x8DD5: 0x796D,\n 0x8DD6: 0x658E,\n 0x8DD7: 0x7D30,\n 0x8DD8: 0x83DC,\n 0x8DD9: 0x88C1,\n 0x8DDA: 0x8F09,\n 0x8DDB: 0x969B,\n 0x8DDC: 0x5264,\n 0x8DDD: 0x5728,\n 0x8DDE: 0x6750,\n 0x8DDF: 0x7F6A,\n 0x8DE0: 0x8CA1,\n 0x8DE1: 0x51B4,\n 0x8DE2: 0x5742,\n 0x8DE3: 0x962A,\n 0x8DE4: 0x583A,\n 0x8DE5: 0x698A,\n 0x8DE6: 0x80B4,\n 0x8DE7: 0x54B2,\n 0x8DE8: 0x5D0E,\n 0x8DE9: 0x57FC,\n 0x8DEA: 0x7895,\n 0x8DEB: 0x9DFA,\n 0x8DEC: 0x4F5C,\n 0x8DED: 0x524A,\n 0x8DEE: 0x548B,\n 0x8DEF: 0x643E,\n 0x8DF0: 0x6628,\n 0x8DF1: 0x6714,\n 0x8DF2: 0x67F5,\n 0x8DF3: 0x7A84,\n 0x8DF4: 0x7B56,\n 0x8DF5: 0x7D22,\n 0x8DF6: 0x932F,\n 0x8DF7: 0x685C,\n 0x8DF8: 0x9BAD,\n 0x8DF9: 0x7B39,\n 0x8DFA: 0x5319,\n 0x8DFB: 0x518A,\n 0x8DFC: 0x5237,\n 0x8E40: 0x5BDF,\n 0x8E41: 0x62F6,\n 0x8E42: 0x64AE,\n 0x8E43: 0x64E6,\n 0x8E44: 0x672D,\n 0x8E45: 0x6BBA,\n 0x8E46: 0x85A9,\n 0x8E47: 0x96D1,\n 0x8E48: 0x7690,\n 0x8E49: 0x9BD6,\n 0x8E4A: 0x634C,\n 0x8E4B: 0x9306,\n 0x8E4C: 0x9BAB,\n 0x8E4D: 0x76BF,\n 0x8E4E: 0x6652,\n 0x8E4F: 0x4E09,\n 0x8E50: 0x5098,\n 0x8E51: 0x53C2,\n 0x8E52: 0x5C71,\n 0x8E53: 0x60E8,\n 0x8E54: 0x6492,\n 0x8E55: 0x6563,\n 0x8E56: 0x685F,\n 0x8E57: 0x71E6,\n 0x8E58: 0x73CA,\n 0x8E59: 0x7523,\n 0x8E5A: 0x7B97,\n 0x8E5B: 0x7E82,\n 0x8E5C: 0x8695,\n 0x8E5D: 0x8B83,\n 0x8E5E: 0x8CDB,\n 0x8E5F: 0x9178,\n 0x8E60: 0x9910,\n 0x8E61: 0x65AC,\n 0x8E62: 0x66AB,\n 0x8E63: 0x6B8B,\n 0x8E64: 0x4ED5,\n 0x8E65: 0x4ED4,\n 0x8E66: 0x4F3A,\n 0x8E67: 0x4F7F,\n 0x8E68: 0x523A,\n 0x8E69: 0x53F8,\n 0x8E6A: 0x53F2,\n 0x8E6B: 0x55E3,\n 0x8E6C: 0x56DB,\n 0x8E6D: 0x58EB,\n 0x8E6E: 0x59CB,\n 0x8E6F: 0x59C9,\n 0x8E70: 0x59FF,\n 0x8E71: 0x5B50,\n 0x8E72: 0x5C4D,\n 0x8E73: 0x5E02,\n 0x8E74: 0x5E2B,\n 0x8E75: 0x5FD7,\n 0x8E76: 0x601D,\n 0x8E77: 0x6307,\n 0x8E78: 0x652F,\n 0x8E79: 0x5B5C,\n 0x8E7A: 0x65AF,\n 0x8E7B: 0x65BD,\n 0x8E7C: 0x65E8,\n 0x8E7D: 0x679D,\n 0x8E7E: 0x6B62,\n 0x8E80: 0x6B7B,\n 0x8E81: 0x6C0F,\n 0x8E82: 0x7345,\n 0x8E83: 0x7949,\n 0x8E84: 0x79C1,\n 0x8E85: 0x7CF8,\n 0x8E86: 0x7D19,\n 0x8E87: 0x7D2B,\n 0x8E88: 0x80A2,\n 0x8E89: 0x8102,\n 0x8E8A: 0x81F3,\n 0x8E8B: 0x8996,\n 0x8E8C: 0x8A5E,\n 0x8E8D: 0x8A69,\n 0x8E8E: 0x8A66,\n 0x8E8F: 0x8A8C,\n 0x8E90: 0x8AEE,\n 0x8E91: 0x8CC7,\n 0x8E92: 0x8CDC,\n 0x8E93: 0x96CC,\n 0x8E94: 0x98FC,\n 0x8E95: 0x6B6F,\n 0x8E96: 0x4E8B,\n 0x8E97: 0x4F3C,\n 0x8E98: 0x4F8D,\n 0x8E99: 0x5150,\n 0x8E9A: 0x5B57,\n 0x8E9B: 0x5BFA,\n 0x8E9C: 0x6148,\n 0x8E9D: 0x6301,\n 0x8E9E: 0x6642,\n 0x8E9F: 0x6B21,\n 0x8EA0: 0x6ECB,\n 0x8EA1: 0x6CBB,\n 0x8EA2: 0x723E,\n 0x8EA3: 0x74BD,\n 0x8EA4: 0x75D4,\n 0x8EA5: 0x78C1,\n 0x8EA6: 0x793A,\n 0x8EA7: 0x800C,\n 0x8EA8: 0x8033,\n 0x8EA9: 0x81EA,\n 0x8EAA: 0x8494,\n 0x8EAB: 0x8F9E,\n 0x8EAC: 0x6C50,\n 0x8EAD: 0x9E7F,\n 0x8EAE: 0x5F0F,\n 0x8EAF: 0x8B58,\n 0x8EB0: 0x9D2B,\n 0x8EB1: 0x7AFA,\n 0x8EB2: 0x8EF8,\n 0x8EB3: 0x5B8D,\n 0x8EB4: 0x96EB,\n 0x8EB5: 0x4E03,\n 0x8EB6: 0x53F1,\n 0x8EB7: 0x57F7,\n 0x8EB8: 0x5931,\n 0x8EB9: 0x5AC9,\n 0x8EBA: 0x5BA4,\n 0x8EBB: 0x6089,\n 0x8EBC: 0x6E7F,\n 0x8EBD: 0x6F06,\n 0x8EBE: 0x75BE,\n 0x8EBF: 0x8CEA,\n 0x8EC0: 0x5B9F,\n 0x8EC1: 0x8500,\n 0x8EC2: 0x7BE0,\n 0x8EC3: 0x5072,\n 0x8EC4: 0x67F4,\n 0x8EC5: 0x829D,\n 0x8EC6: 0x5C61,\n 0x8EC7: 0x854A,\n 0x8EC8: 0x7E1E,\n 0x8EC9: 0x820E,\n 0x8ECA: 0x5199,\n 0x8ECB: 0x5C04,\n 0x8ECC: 0x6368,\n 0x8ECD: 0x8D66,\n 0x8ECE: 0x659C,\n 0x8ECF: 0x716E,\n 0x8ED0: 0x793E,\n 0x8ED1: 0x7D17,\n 0x8ED2: 0x8005,\n 0x8ED3: 0x8B1D,\n 0x8ED4: 0x8ECA,\n 0x8ED5: 0x906E,\n 0x8ED6: 0x86C7,\n 0x8ED7: 0x90AA,\n 0x8ED8: 0x501F,\n 0x8ED9: 0x52FA,\n 0x8EDA: 0x5C3A,\n 0x8EDB: 0x6753,\n 0x8EDC: 0x707C,\n 0x8EDD: 0x7235,\n 0x8EDE: 0x914C,\n 0x8EDF: 0x91C8,\n 0x8EE0: 0x932B,\n 0x8EE1: 0x82E5,\n 0x8EE2: 0x5BC2,\n 0x8EE3: 0x5F31,\n 0x8EE4: 0x60F9,\n 0x8EE5: 0x4E3B,\n 0x8EE6: 0x53D6,\n 0x8EE7: 0x5B88,\n 0x8EE8: 0x624B,\n 0x8EE9: 0x6731,\n 0x8EEA: 0x6B8A,\n 0x8EEB: 0x72E9,\n 0x8EEC: 0x73E0,\n 0x8EED: 0x7A2E,\n 0x8EEE: 0x816B,\n 0x8EEF: 0x8DA3,\n 0x8EF0: 0x9152,\n 0x8EF1: 0x9996,\n 0x8EF2: 0x5112,\n 0x8EF3: 0x53D7,\n 0x8EF4: 0x546A,\n 0x8EF5: 0x5BFF,\n 0x8EF6: 0x6388,\n 0x8EF7: 0x6A39,\n 0x8EF8: 0x7DAC,\n 0x8EF9: 0x9700,\n 0x8EFA: 0x56DA,\n 0x8EFB: 0x53CE,\n 0x8EFC: 0x5468,\n 0x8F40: 0x5B97,\n 0x8F41: 0x5C31,\n 0x8F42: 0x5DDE,\n 0x8F43: 0x4FEE,\n 0x8F44: 0x6101,\n 0x8F45: 0x62FE,\n 0x8F46: 0x6D32,\n 0x8F47: 0x79C0,\n 0x8F48: 0x79CB,\n 0x8F49: 0x7D42,\n 0x8F4A: 0x7E4D,\n 0x8F4B: 0x7FD2,\n 0x8F4C: 0x81ED,\n 0x8F4D: 0x821F,\n 0x8F4E: 0x8490,\n 0x8F4F: 0x8846,\n 0x8F50: 0x8972,\n 0x8F51: 0x8B90,\n 0x8F52: 0x8E74,\n 0x8F53: 0x8F2F,\n 0x8F54: 0x9031,\n 0x8F55: 0x914B,\n 0x8F56: 0x916C,\n 0x8F57: 0x96C6,\n 0x8F58: 0x919C,\n 0x8F59: 0x4EC0,\n 0x8F5A: 0x4F4F,\n 0x8F5B: 0x5145,\n 0x8F5C: 0x5341,\n 0x8F5D: 0x5F93,\n 0x8F5E: 0x620E,\n 0x8F5F: 0x67D4,\n 0x8F60: 0x6C41,\n 0x8F61: 0x6E0B,\n 0x8F62: 0x7363,\n 0x8F63: 0x7E26,\n 0x8F64: 0x91CD,\n 0x8F65: 0x9283,\n 0x8F66: 0x53D4,\n 0x8F67: 0x5919,\n 0x8F68: 0x5BBF,\n 0x8F69: 0x6DD1,\n 0x8F6A: 0x795D,\n 0x8F6B: 0x7E2E,\n 0x8F6C: 0x7C9B,\n 0x8F6D: 0x587E,\n 0x8F6E: 0x719F,\n 0x8F6F: 0x51FA,\n 0x8F70: 0x8853,\n 0x8F71: 0x8FF0,\n 0x8F72: 0x4FCA,\n 0x8F73: 0x5CFB,\n 0x8F74: 0x6625,\n 0x8F75: 0x77AC,\n 0x8F76: 0x7AE3,\n 0x8F77: 0x821C,\n 0x8F78: 0x99FF,\n 0x8F79: 0x51C6,\n 0x8F7A: 0x5FAA,\n 0x8F7B: 0x65EC,\n 0x8F7C: 0x696F,\n 0x8F7D: 0x6B89,\n 0x8F7E: 0x6DF3,\n 0x8F80: 0x6E96,\n 0x8F81: 0x6F64,\n 0x8F82: 0x76FE,\n 0x8F83: 0x7D14,\n 0x8F84: 0x5DE1,\n 0x8F85: 0x9075,\n 0x8F86: 0x9187,\n 0x8F87: 0x9806,\n 0x8F88: 0x51E6,\n 0x8F89: 0x521D,\n 0x8F8A: 0x6240,\n 0x8F8B: 0x6691,\n 0x8F8C: 0x66D9,\n 0x8F8D: 0x6E1A,\n 0x8F8E: 0x5EB6,\n 0x8F8F: 0x7DD2,\n 0x8F90: 0x7F72,\n 0x8F91: 0x66F8,\n 0x8F92: 0x85AF,\n 0x8F93: 0x85F7,\n 0x8F94: 0x8AF8,\n 0x8F95: 0x52A9,\n 0x8F96: 0x53D9,\n 0x8F97: 0x5973,\n 0x8F98: 0x5E8F,\n 0x8F99: 0x5F90,\n 0x8F9A: 0x6055,\n 0x8F9B: 0x92E4,\n 0x8F9C: 0x9664,\n 0x8F9D: 0x50B7,\n 0x8F9E: 0x511F,\n 0x8F9F: 0x52DD,\n 0x8FA0: 0x5320,\n 0x8FA1: 0x5347,\n 0x8FA2: 0x53EC,\n 0x8FA3: 0x54E8,\n 0x8FA4: 0x5546,\n 0x8FA5: 0x5531,\n 0x8FA6: 0x5617,\n 0x8FA7: 0x5968,\n 0x8FA8: 0x59BE,\n 0x8FA9: 0x5A3C,\n 0x8FAA: 0x5BB5,\n 0x8FAB: 0x5C06,\n 0x8FAC: 0x5C0F,\n 0x8FAD: 0x5C11,\n 0x8FAE: 0x5C1A,\n 0x8FAF: 0x5E84,\n 0x8FB0: 0x5E8A,\n 0x8FB1: 0x5EE0,\n 0x8FB2: 0x5F70,\n 0x8FB3: 0x627F,\n 0x8FB4: 0x6284,\n 0x8FB5: 0x62DB,\n 0x8FB6: 0x638C,\n 0x8FB7: 0x6377,\n 0x8FB8: 0x6607,\n 0x8FB9: 0x660C,\n 0x8FBA: 0x662D,\n 0x8FBB: 0x6676,\n 0x8FBC: 0x677E,\n 0x8FBD: 0x68A2,\n 0x8FBE: 0x6A1F,\n 0x8FBF: 0x6A35,\n 0x8FC0: 0x6CBC,\n 0x8FC1: 0x6D88,\n 0x8FC2: 0x6E09,\n 0x8FC3: 0x6E58,\n 0x8FC4: 0x713C,\n 0x8FC5: 0x7126,\n 0x8FC6: 0x7167,\n 0x8FC7: 0x75C7,\n 0x8FC8: 0x7701,\n 0x8FC9: 0x785D,\n 0x8FCA: 0x7901,\n 0x8FCB: 0x7965,\n 0x8FCC: 0x79F0,\n 0x8FCD: 0x7AE0,\n 0x8FCE: 0x7B11,\n 0x8FCF: 0x7CA7,\n 0x8FD0: 0x7D39,\n 0x8FD1: 0x8096,\n 0x8FD2: 0x83D6,\n 0x8FD3: 0x848B,\n 0x8FD4: 0x8549,\n 0x8FD5: 0x885D,\n 0x8FD6: 0x88F3,\n 0x8FD7: 0x8A1F,\n 0x8FD8: 0x8A3C,\n 0x8FD9: 0x8A54,\n 0x8FDA: 0x8A73,\n 0x8FDB: 0x8C61,\n 0x8FDC: 0x8CDE,\n 0x8FDD: 0x91A4,\n 0x8FDE: 0x9266,\n 0x8FDF: 0x937E,\n 0x8FE0: 0x9418,\n 0x8FE1: 0x969C,\n 0x8FE2: 0x9798,\n 0x8FE3: 0x4E0A,\n 0x8FE4: 0x4E08,\n 0x8FE5: 0x4E1E,\n 0x8FE6: 0x4E57,\n 0x8FE7: 0x5197,\n 0x8FE8: 0x5270,\n 0x8FE9: 0x57CE,\n 0x8FEA: 0x5834,\n 0x8FEB: 0x58CC,\n 0x8FEC: 0x5B22,\n 0x8FED: 0x5E38,\n 0x8FEE: 0x60C5,\n 0x8FEF: 0x64FE,\n 0x8FF0: 0x6761,\n 0x8FF1: 0x6756,\n 0x8FF2: 0x6D44,\n 0x8FF3: 0x72B6,\n 0x8FF4: 0x7573,\n 0x8FF5: 0x7A63,\n 0x8FF6: 0x84B8,\n 0x8FF7: 0x8B72,\n 0x8FF8: 0x91B8,\n 0x8FF9: 0x9320,\n 0x8FFA: 0x5631,\n 0x8FFB: 0x57F4,\n 0x8FFC: 0x98FE,\n 0x9040: 0x62ED,\n 0x9041: 0x690D,\n 0x9042: 0x6B96,\n 0x9043: 0x71ED,\n 0x9044: 0x7E54,\n 0x9045: 0x8077,\n 0x9046: 0x8272,\n 0x9047: 0x89E6,\n 0x9048: 0x98DF,\n 0x9049: 0x8755,\n 0x904A: 0x8FB1,\n 0x904B: 0x5C3B,\n 0x904C: 0x4F38,\n 0x904D: 0x4FE1,\n 0x904E: 0x4FB5,\n 0x904F: 0x5507,\n 0x9050: 0x5A20,\n 0x9051: 0x5BDD,\n 0x9052: 0x5BE9,\n 0x9053: 0x5FC3,\n 0x9054: 0x614E,\n 0x9055: 0x632F,\n 0x9056: 0x65B0,\n 0x9057: 0x664B,\n 0x9058: 0x68EE,\n 0x9059: 0x699B,\n 0x905A: 0x6D78,\n 0x905B: 0x6DF1,\n 0x905C: 0x7533,\n 0x905D: 0x75B9,\n 0x905E: 0x771F,\n 0x905F: 0x795E,\n 0x9060: 0x79E6,\n 0x9061: 0x7D33,\n 0x9062: 0x81E3,\n 0x9063: 0x82AF,\n 0x9064: 0x85AA,\n 0x9065: 0x89AA,\n 0x9066: 0x8A3A,\n 0x9067: 0x8EAB,\n 0x9068: 0x8F9B,\n 0x9069: 0x9032,\n 0x906A: 0x91DD,\n 0x906B: 0x9707,\n 0x906C: 0x4EBA,\n 0x906D: 0x4EC1,\n 0x906E: 0x5203,\n 0x906F: 0x5875,\n 0x9070: 0x58EC,\n 0x9071: 0x5C0B,\n 0x9072: 0x751A,\n 0x9073: 0x5C3D,\n 0x9074: 0x814E,\n 0x9075: 0x8A0A,\n 0x9076: 0x8FC5,\n 0x9077: 0x9663,\n 0x9078: 0x976D,\n 0x9079: 0x7B25,\n 0x907A: 0x8ACF,\n 0x907B: 0x9808,\n 0x907C: 0x9162,\n 0x907D: 0x56F3,\n 0x907E: 0x53A8,\n 0x9080: 0x9017,\n 0x9081: 0x5439,\n 0x9082: 0x5782,\n 0x9083: 0x5E25,\n 0x9084: 0x63A8,\n 0x9085: 0x6C34,\n 0x9086: 0x708A,\n 0x9087: 0x7761,\n 0x9088: 0x7C8B,\n 0x9089: 0x7FE0,\n 0x908A: 0x8870,\n 0x908B: 0x9042,\n 0x908C: 0x9154,\n 0x908D: 0x9310,\n 0x908E: 0x9318,\n 0x908F: 0x968F,\n 0x9090: 0x745E,\n 0x9091: 0x9AC4,\n 0x9092: 0x5D07,\n 0x9093: 0x5D69,\n 0x9094: 0x6570,\n 0x9095: 0x67A2,\n 0x9096: 0x8DA8,\n 0x9097: 0x96DB,\n 0x9098: 0x636E,\n 0x9099: 0x6749,\n 0x909A: 0x6919,\n 0x909B: 0x83C5,\n 0x909C: 0x9817,\n 0x909D: 0x96C0,\n 0x909E: 0x88FE,\n 0x909F: 0x6F84,\n 0x90A0: 0x647A,\n 0x90A1: 0x5BF8,\n 0x90A2: 0x4E16,\n 0x90A3: 0x702C,\n 0x90A4: 0x755D,\n 0x90A5: 0x662F,\n 0x90A6: 0x51C4,\n 0x90A7: 0x5236,\n 0x90A8: 0x52E2,\n 0x90A9: 0x59D3,\n 0x90AA: 0x5F81,\n 0x90AB: 0x6027,\n 0x90AC: 0x6210,\n 0x90AD: 0x653F,\n 0x90AE: 0x6574,\n 0x90AF: 0x661F,\n 0x90B0: 0x6674,\n 0x90B1: 0x68F2,\n 0x90B2: 0x6816,\n 0x90B3: 0x6B63,\n 0x90B4: 0x6E05,\n 0x90B5: 0x7272,\n 0x90B6: 0x751F,\n 0x90B7: 0x76DB,\n 0x90B8: 0x7CBE,\n 0x90B9: 0x8056,\n 0x90BA: 0x58F0,\n 0x90BB: 0x88FD,\n 0x90BC: 0x897F,\n 0x90BD: 0x8AA0,\n 0x90BE: 0x8A93,\n 0x90BF: 0x8ACB,\n 0x90C0: 0x901D,\n 0x90C1: 0x9192,\n 0x90C2: 0x9752,\n 0x90C3: 0x9759,\n 0x90C4: 0x6589,\n 0x90C5: 0x7A0E,\n 0x90C6: 0x8106,\n 0x90C7: 0x96BB,\n 0x90C8: 0x5E2D,\n 0x90C9: 0x60DC,\n 0x90CA: 0x621A,\n 0x90CB: 0x65A5,\n 0x90CC: 0x6614,\n 0x90CD: 0x6790,\n 0x90CE: 0x77F3,\n 0x90CF: 0x7A4D,\n 0x90D0: 0x7C4D,\n 0x90D1: 0x7E3E,\n 0x90D2: 0x810A,\n 0x90D3: 0x8CAC,\n 0x90D4: 0x8D64,\n 0x90D5: 0x8DE1,\n 0x90D6: 0x8E5F,\n 0x90D7: 0x78A9,\n 0x90D8: 0x5207,\n 0x90D9: 0x62D9,\n 0x90DA: 0x63A5,\n 0x90DB: 0x6442,\n 0x90DC: 0x6298,\n 0x90DD: 0x8A2D,\n 0x90DE: 0x7A83,\n 0x90DF: 0x7BC0,\n 0x90E0: 0x8AAC,\n 0x90E1: 0x96EA,\n 0x90E2: 0x7D76,\n 0x90E3: 0x820C,\n 0x90E4: 0x8749,\n 0x90E5: 0x4ED9,\n 0x90E6: 0x5148,\n 0x90E7: 0x5343,\n 0x90E8: 0x5360,\n 0x90E9: 0x5BA3,\n 0x90EA: 0x5C02,\n 0x90EB: 0x5C16,\n 0x90EC: 0x5DDD,\n 0x90ED: 0x6226,\n 0x90EE: 0x6247,\n 0x90EF: 0x64B0,\n 0x90F0: 0x6813,\n 0x90F1: 0x6834,\n 0x90F2: 0x6CC9,\n 0x90F3: 0x6D45,\n 0x90F4: 0x6D17,\n 0x90F5: 0x67D3,\n 0x90F6: 0x6F5C,\n 0x90F7: 0x714E,\n 0x90F8: 0x717D,\n 0x90F9: 0x65CB,\n 0x90FA: 0x7A7F,\n 0x90FB: 0x7BAD,\n 0x90FC: 0x7DDA,\n 0x9140: 0x7E4A,\n 0x9141: 0x7FA8,\n 0x9142: 0x817A,\n 0x9143: 0x821B,\n 0x9144: 0x8239,\n 0x9145: 0x85A6,\n 0x9146: 0x8A6E,\n 0x9147: 0x8CCE,\n 0x9148: 0x8DF5,\n 0x9149: 0x9078,\n 0x914A: 0x9077,\n 0x914B: 0x92AD,\n 0x914C: 0x9291,\n 0x914D: 0x9583,\n 0x914E: 0x9BAE,\n 0x914F: 0x524D,\n 0x9150: 0x5584,\n 0x9151: 0x6F38,\n 0x9152: 0x7136,\n 0x9153: 0x5168,\n 0x9154: 0x7985,\n 0x9155: 0x7E55,\n 0x9156: 0x81B3,\n 0x9157: 0x7CCE,\n 0x9158: 0x564C,\n 0x9159: 0x5851,\n 0x915A: 0x5CA8,\n 0x915B: 0x63AA,\n 0x915C: 0x66FE,\n 0x915D: 0x66FD,\n 0x915E: 0x695A,\n 0x915F: 0x72D9,\n 0x9160: 0x758F,\n 0x9161: 0x758E,\n 0x9162: 0x790E,\n 0x9163: 0x7956,\n 0x9164: 0x79DF,\n 0x9165: 0x7C97,\n 0x9166: 0x7D20,\n 0x9167: 0x7D44,\n 0x9168: 0x8607,\n 0x9169: 0x8A34,\n 0x916A: 0x963B,\n 0x916B: 0x9061,\n 0x916C: 0x9F20,\n 0x916D: 0x50E7,\n 0x916E: 0x5275,\n 0x916F: 0x53CC,\n 0x9170: 0x53E2,\n 0x9171: 0x5009,\n 0x9172: 0x55AA,\n 0x9173: 0x58EE,\n 0x9174: 0x594F,\n 0x9175: 0x723D,\n 0x9176: 0x5B8B,\n 0x9177: 0x5C64,\n 0x9178: 0x531D,\n 0x9179: 0x60E3,\n 0x917A: 0x60F3,\n 0x917B: 0x635C,\n 0x917C: 0x6383,\n 0x917D: 0x633F,\n 0x917E: 0x63BB,\n 0x9180: 0x64CD,\n 0x9181: 0x65E9,\n 0x9182: 0x66F9,\n 0x9183: 0x5DE3,\n 0x9184: 0x69CD,\n 0x9185: 0x69FD,\n 0x9186: 0x6F15,\n 0x9187: 0x71E5,\n 0x9188: 0x4E89,\n 0x9189: 0x75E9,\n 0x918A: 0x76F8,\n 0x918B: 0x7A93,\n 0x918C: 0x7CDF,\n 0x918D: 0x7DCF,\n 0x918E: 0x7D9C,\n 0x918F: 0x8061,\n 0x9190: 0x8349,\n 0x9191: 0x8358,\n 0x9192: 0x846C,\n 0x9193: 0x84BC,\n 0x9194: 0x85FB,\n 0x9195: 0x88C5,\n 0x9196: 0x8D70,\n 0x9197: 0x9001,\n 0x9198: 0x906D,\n 0x9199: 0x9397,\n 0x919A: 0x971C,\n 0x919B: 0x9A12,\n 0x919C: 0x50CF,\n 0x919D: 0x5897,\n 0x919E: 0x618E,\n 0x919F: 0x81D3,\n 0x91A0: 0x8535,\n 0x91A1: 0x8D08,\n 0x91A2: 0x9020,\n 0x91A3: 0x4FC3,\n 0x91A4: 0x5074,\n 0x91A5: 0x5247,\n 0x91A6: 0x5373,\n 0x91A7: 0x606F,\n 0x91A8: 0x6349,\n 0x91A9: 0x675F,\n 0x91AA: 0x6E2C,\n 0x91AB: 0x8DB3,\n 0x91AC: 0x901F,\n 0x91AD: 0x4FD7,\n 0x91AE: 0x5C5E,\n 0x91AF: 0x8CCA,\n 0x91B0: 0x65CF,\n 0x91B1: 0x7D9A,\n 0x91B2: 0x5352,\n 0x91B3: 0x8896,\n 0x91B4: 0x5176,\n 0x91B5: 0x63C3,\n 0x91B6: 0x5B58,\n 0x91B7: 0x5B6B,\n 0x91B8: 0x5C0A,\n 0x91B9: 0x640D,\n 0x91BA: 0x6751,\n 0x91BB: 0x905C,\n 0x91BC: 0x4ED6,\n 0x91BD: 0x591A,\n 0x91BE: 0x592A,\n 0x91BF: 0x6C70,\n 0x91C0: 0x8A51,\n 0x91C1: 0x553E,\n 0x91C2: 0x5815,\n 0x91C3: 0x59A5,\n 0x91C4: 0x60F0,\n 0x91C5: 0x6253,\n 0x91C6: 0x67C1,\n 0x91C7: 0x8235,\n 0x91C8: 0x6955,\n 0x91C9: 0x9640,\n 0x91CA: 0x99C4,\n 0x91CB: 0x9A28,\n 0x91CC: 0x4F53,\n 0x91CD: 0x5806,\n 0x91CE: 0x5BFE,\n 0x91CF: 0x8010,\n 0x91D0: 0x5CB1,\n 0x91D1: 0x5E2F,\n 0x91D2: 0x5F85,\n 0x91D3: 0x6020,\n 0x91D4: 0x614B,\n 0x91D5: 0x6234,\n 0x91D6: 0x66FF,\n 0x91D7: 0x6CF0,\n 0x91D8: 0x6EDE,\n 0x91D9: 0x80CE,\n 0x91DA: 0x817F,\n 0x91DB: 0x82D4,\n 0x91DC: 0x888B,\n 0x91DD: 0x8CB8,\n 0x91DE: 0x9000,\n 0x91DF: 0x902E,\n 0x91E0: 0x968A,\n 0x91E1: 0x9EDB,\n 0x91E2: 0x9BDB,\n 0x91E3: 0x4EE3,\n 0x91E4: 0x53F0,\n 0x91E5: 0x5927,\n 0x91E6: 0x7B2C,\n 0x91E7: 0x918D,\n 0x91E8: 0x984C,\n 0x91E9: 0x9DF9,\n 0x91EA: 0x6EDD,\n 0x91EB: 0x7027,\n 0x91EC: 0x5353,\n 0x91ED: 0x5544,\n 0x91EE: 0x5B85,\n 0x91EF: 0x6258,\n 0x91F0: 0x629E,\n 0x91F1: 0x62D3,\n 0x91F2: 0x6CA2,\n 0x91F3: 0x6FEF,\n 0x91F4: 0x7422,\n 0x91F5: 0x8A17,\n 0x91F6: 0x9438,\n 0x91F7: 0x6FC1,\n 0x91F8: 0x8AFE,\n 0x91F9: 0x8338,\n 0x91FA: 0x51E7,\n 0x91FB: 0x86F8,\n 0x91FC: 0x53EA,\n 0x9240: 0x53E9,\n 0x9241: 0x4F46,\n 0x9242: 0x9054,\n 0x9243: 0x8FB0,\n 0x9244: 0x596A,\n 0x9245: 0x8131,\n 0x9246: 0x5DFD,\n 0x9247: 0x7AEA,\n 0x9248: 0x8FBF,\n 0x9249: 0x68DA,\n 0x924A: 0x8C37,\n 0x924B: 0x72F8,\n 0x924C: 0x9C48,\n 0x924D: 0x6A3D,\n 0x924E: 0x8AB0,\n 0x924F: 0x4E39,\n 0x9250: 0x5358,\n 0x9251: 0x5606,\n 0x9252: 0x5766,\n 0x9253: 0x62C5,\n 0x9254: 0x63A2,\n 0x9255: 0x65E6,\n 0x9256: 0x6B4E,\n 0x9257: 0x6DE1,\n 0x9258: 0x6E5B,\n 0x9259: 0x70AD,\n 0x925A: 0x77ED,\n 0x925B: 0x7AEF,\n 0x925C: 0x7BAA,\n 0x925D: 0x7DBB,\n 0x925E: 0x803D,\n 0x925F: 0x80C6,\n 0x9260: 0x86CB,\n 0x9261: 0x8A95,\n 0x9262: 0x935B,\n 0x9263: 0x56E3,\n 0x9264: 0x58C7,\n 0x9265: 0x5F3E,\n 0x9266: 0x65AD,\n 0x9267: 0x6696,\n 0x9268: 0x6A80,\n 0x9269: 0x6BB5,\n 0x926A: 0x7537,\n 0x926B: 0x8AC7,\n 0x926C: 0x5024,\n 0x926D: 0x77E5,\n 0x926E: 0x5730,\n 0x926F: 0x5F1B,\n 0x9270: 0x6065,\n 0x9271: 0x667A,\n 0x9272: 0x6C60,\n 0x9273: 0x75F4,\n 0x9274: 0x7A1A,\n 0x9275: 0x7F6E,\n 0x9276: 0x81F4,\n 0x9277: 0x8718,\n 0x9278: 0x9045,\n 0x9279: 0x99B3,\n 0x927A: 0x7BC9,\n 0x927B: 0x755C,\n 0x927C: 0x7AF9,\n 0x927D: 0x7B51,\n 0x927E: 0x84C4,\n 0x9280: 0x9010,\n 0x9281: 0x79E9,\n 0x9282: 0x7A92,\n 0x9283: 0x8336,\n 0x9284: 0x5AE1,\n 0x9285: 0x7740,\n 0x9286: 0x4E2D,\n 0x9287: 0x4EF2,\n 0x9288: 0x5B99,\n 0x9289: 0x5FE0,\n 0x928A: 0x62BD,\n 0x928B: 0x663C,\n 0x928C: 0x67F1,\n 0x928D: 0x6CE8,\n 0x928E: 0x866B,\n 0x928F: 0x8877,\n 0x9290: 0x8A3B,\n 0x9291: 0x914E,\n 0x9292: 0x92F3,\n 0x9293: 0x99D0,\n 0x9294: 0x6A17,\n 0x9295: 0x7026,\n 0x9296: 0x732A,\n 0x9297: 0x82E7,\n 0x9298: 0x8457,\n 0x9299: 0x8CAF,\n 0x929A: 0x4E01,\n 0x929B: 0x5146,\n 0x929C: 0x51CB,\n 0x929D: 0x558B,\n 0x929E: 0x5BF5,\n 0x929F: 0x5E16,\n 0x92A0: 0x5E33,\n 0x92A1: 0x5E81,\n 0x92A2: 0x5F14,\n 0x92A3: 0x5F35,\n 0x92A4: 0x5F6B,\n 0x92A5: 0x5FB4,\n 0x92A6: 0x61F2,\n 0x92A7: 0x6311,\n 0x92A8: 0x66A2,\n 0x92A9: 0x671D,\n 0x92AA: 0x6F6E,\n 0x92AB: 0x7252,\n 0x92AC: 0x753A,\n 0x92AD: 0x773A,\n 0x92AE: 0x8074,\n 0x92AF: 0x8139,\n 0x92B0: 0x8178,\n 0x92B1: 0x8776,\n 0x92B2: 0x8ABF,\n 0x92B3: 0x8ADC,\n 0x92B4: 0x8D85,\n 0x92B5: 0x8DF3,\n 0x92B6: 0x929A,\n 0x92B7: 0x9577,\n 0x92B8: 0x9802,\n 0x92B9: 0x9CE5,\n 0x92BA: 0x52C5,\n 0x92BB: 0x6357,\n 0x92BC: 0x76F4,\n 0x92BD: 0x6715,\n 0x92BE: 0x6C88,\n 0x92BF: 0x73CD,\n 0x92C0: 0x8CC3,\n 0x92C1: 0x93AE,\n 0x92C2: 0x9673,\n 0x92C3: 0x6D25,\n 0x92C4: 0x589C,\n 0x92C5: 0x690E,\n 0x92C6: 0x69CC,\n 0x92C7: 0x8FFD,\n 0x92C8: 0x939A,\n 0x92C9: 0x75DB,\n 0x92CA: 0x901A,\n 0x92CB: 0x585A,\n 0x92CC: 0x6802,\n 0x92CD: 0x63B4,\n 0x92CE: 0x69FB,\n 0x92CF: 0x4F43,\n 0x92D0: 0x6F2C,\n 0x92D1: 0x67D8,\n 0x92D2: 0x8FBB,\n 0x92D3: 0x8526,\n 0x92D4: 0x7DB4,\n 0x92D5: 0x9354,\n 0x92D6: 0x693F,\n 0x92D7: 0x6F70,\n 0x92D8: 0x576A,\n 0x92D9: 0x58F7,\n 0x92DA: 0x5B2C,\n 0x92DB: 0x7D2C,\n 0x92DC: 0x722A,\n 0x92DD: 0x540A,\n 0x92DE: 0x91E3,\n 0x92DF: 0x9DB4,\n 0x92E0: 0x4EAD,\n 0x92E1: 0x4F4E,\n 0x92E2: 0x505C,\n 0x92E3: 0x5075,\n 0x92E4: 0x5243,\n 0x92E5: 0x8C9E,\n 0x92E6: 0x5448,\n 0x92E7: 0x5824,\n 0x92E8: 0x5B9A,\n 0x92E9: 0x5E1D,\n 0x92EA: 0x5E95,\n 0x92EB: 0x5EAD,\n 0x92EC: 0x5EF7,\n 0x92ED: 0x5F1F,\n 0x92EE: 0x608C,\n 0x92EF: 0x62B5,\n 0x92F0: 0x633A,\n 0x92F1: 0x63D0,\n 0x92F2: 0x68AF,\n 0x92F3: 0x6C40,\n 0x92F4: 0x7887,\n 0x92F5: 0x798E,\n 0x92F6: 0x7A0B,\n 0x92F7: 0x7DE0,\n 0x92F8: 0x8247,\n 0x92F9: 0x8A02,\n 0x92FA: 0x8AE6,\n 0x92FB: 0x8E44,\n 0x92FC: 0x9013,\n 0x9340: 0x90B8,\n 0x9341: 0x912D,\n 0x9342: 0x91D8,\n 0x9343: 0x9F0E,\n 0x9344: 0x6CE5,\n 0x9345: 0x6458,\n 0x9346: 0x64E2,\n 0x9347: 0x6575,\n 0x9348: 0x6EF4,\n 0x9349: 0x7684,\n 0x934A: 0x7B1B,\n 0x934B: 0x9069,\n 0x934C: 0x93D1,\n 0x934D: 0x6EBA,\n 0x934E: 0x54F2,\n 0x934F: 0x5FB9,\n 0x9350: 0x64A4,\n 0x9351: 0x8F4D,\n 0x9352: 0x8FED,\n 0x9353: 0x9244,\n 0x9354: 0x5178,\n 0x9355: 0x586B,\n 0x9356: 0x5929,\n 0x9357: 0x5C55,\n 0x9358: 0x5E97,\n 0x9359: 0x6DFB,\n 0x935A: 0x7E8F,\n 0x935B: 0x751C,\n 0x935C: 0x8CBC,\n 0x935D: 0x8EE2,\n 0x935E: 0x985B,\n 0x935F: 0x70B9,\n 0x9360: 0x4F1D,\n 0x9361: 0x6BBF,\n 0x9362: 0x6FB1,\n 0x9363: 0x7530,\n 0x9364: 0x96FB,\n 0x9365: 0x514E,\n 0x9366: 0x5410,\n 0x9367: 0x5835,\n 0x9368: 0x5857,\n 0x9369: 0x59AC,\n 0x936A: 0x5C60,\n 0x936B: 0x5F92,\n 0x936C: 0x6597,\n 0x936D: 0x675C,\n 0x936E: 0x6E21,\n 0x936F: 0x767B,\n 0x9370: 0x83DF,\n 0x9371: 0x8CED,\n 0x9372: 0x9014,\n 0x9373: 0x90FD,\n 0x9374: 0x934D,\n 0x9375: 0x7825,\n 0x9376: 0x783A,\n 0x9377: 0x52AA,\n 0x9378: 0x5EA6,\n 0x9379: 0x571F,\n 0x937A: 0x5974,\n 0x937B: 0x6012,\n 0x937C: 0x5012,\n 0x937D: 0x515A,\n 0x937E: 0x51AC,\n 0x9380: 0x51CD,\n 0x9381: 0x5200,\n 0x9382: 0x5510,\n 0x9383: 0x5854,\n 0x9384: 0x5858,\n 0x9385: 0x5957,\n 0x9386: 0x5B95,\n 0x9387: 0x5CF6,\n 0x9388: 0x5D8B,\n 0x9389: 0x60BC,\n 0x938A: 0x6295,\n 0x938B: 0x642D,\n 0x938C: 0x6771,\n 0x938D: 0x6843,\n 0x938E: 0x68BC,\n 0x938F: 0x68DF,\n 0x9390: 0x76D7,\n 0x9391: 0x6DD8,\n 0x9392: 0x6E6F,\n 0x9393: 0x6D9B,\n 0x9394: 0x706F,\n 0x9395: 0x71C8,\n 0x9396: 0x5F53,\n 0x9397: 0x75D8,\n 0x9398: 0x7977,\n 0x9399: 0x7B49,\n 0x939A: 0x7B54,\n 0x939B: 0x7B52,\n 0x939C: 0x7CD6,\n 0x939D: 0x7D71,\n 0x939E: 0x5230,\n 0x939F: 0x8463,\n 0x93A0: 0x8569,\n 0x93A1: 0x85E4,\n 0x93A2: 0x8A0E,\n 0x93A3: 0x8B04,\n 0x93A4: 0x8C46,\n 0x93A5: 0x8E0F,\n 0x93A6: 0x9003,\n 0x93A7: 0x900F,\n 0x93A8: 0x9419,\n 0x93A9: 0x9676,\n 0x93AA: 0x982D,\n 0x93AB: 0x9A30,\n 0x93AC: 0x95D8,\n 0x93AD: 0x50CD,\n 0x93AE: 0x52D5,\n 0x93AF: 0x540C,\n 0x93B0: 0x5802,\n 0x93B1: 0x5C0E,\n 0x93B2: 0x61A7,\n 0x93B3: 0x649E,\n 0x93B4: 0x6D1E,\n 0x93B5: 0x77B3,\n 0x93B6: 0x7AE5,\n 0x93B7: 0x80F4,\n 0x93B8: 0x8404,\n 0x93B9: 0x9053,\n 0x93BA: 0x9285,\n 0x93BB: 0x5CE0,\n 0x93BC: 0x9D07,\n 0x93BD: 0x533F,\n 0x93BE: 0x5F97,\n 0x93BF: 0x5FB3,\n 0x93C0: 0x6D9C,\n 0x93C1: 0x7279,\n 0x93C2: 0x7763,\n 0x93C3: 0x79BF,\n 0x93C4: 0x7BE4,\n 0x93C5: 0x6BD2,\n 0x93C6: 0x72EC,\n 0x93C7: 0x8AAD,\n 0x93C8: 0x6803,\n 0x93C9: 0x6A61,\n 0x93CA: 0x51F8,\n 0x93CB: 0x7A81,\n 0x93CC: 0x6934,\n 0x93CD: 0x5C4A,\n 0x93CE: 0x9CF6,\n 0x93CF: 0x82EB,\n 0x93D0: 0x5BC5,\n 0x93D1: 0x9149,\n 0x93D2: 0x701E,\n 0x93D3: 0x5678,\n 0x93D4: 0x5C6F,\n 0x93D5: 0x60C7,\n 0x93D6: 0x6566,\n 0x93D7: 0x6C8C,\n 0x93D8: 0x8C5A,\n 0x93D9: 0x9041,\n 0x93DA: 0x9813,\n 0x93DB: 0x5451,\n 0x93DC: 0x66C7,\n 0x93DD: 0x920D,\n 0x93DE: 0x5948,\n 0x93DF: 0x90A3,\n 0x93E0: 0x5185,\n 0x93E1: 0x4E4D,\n 0x93E2: 0x51EA,\n 0x93E3: 0x8599,\n 0x93E4: 0x8B0E,\n 0x93E5: 0x7058,\n 0x93E6: 0x637A,\n 0x93E7: 0x934B,\n 0x93E8: 0x6962,\n 0x93E9: 0x99B4,\n 0x93EA: 0x7E04,\n 0x93EB: 0x7577,\n 0x93EC: 0x5357,\n 0x93ED: 0x6960,\n 0x93EE: 0x8EDF,\n 0x93EF: 0x96E3,\n 0x93F0: 0x6C5D,\n 0x93F1: 0x4E8C,\n 0x93F2: 0x5C3C,\n 0x93F3: 0x5F10,\n 0x93F4: 0x8FE9,\n 0x93F5: 0x5302,\n 0x93F6: 0x8CD1,\n 0x93F7: 0x8089,\n 0x93F8: 0x8679,\n 0x93F9: 0x5EFF,\n 0x93FA: 0x65E5,\n 0x93FB: 0x4E73,\n 0x93FC: 0x5165,\n 0x9440: 0x5982,\n 0x9441: 0x5C3F,\n 0x9442: 0x97EE,\n 0x9443: 0x4EFB,\n 0x9444: 0x598A,\n 0x9445: 0x5FCD,\n 0x9446: 0x8A8D,\n 0x9447: 0x6FE1,\n 0x9448: 0x79B0,\n 0x9449: 0x7962,\n 0x944A: 0x5BE7,\n 0x944B: 0x8471,\n 0x944C: 0x732B,\n 0x944D: 0x71B1,\n 0x944E: 0x5E74,\n 0x944F: 0x5FF5,\n 0x9450: 0x637B,\n 0x9451: 0x649A,\n 0x9452: 0x71C3,\n 0x9453: 0x7C98,\n 0x9454: 0x4E43,\n 0x9455: 0x5EFC,\n 0x9456: 0x4E4B,\n 0x9457: 0x57DC,\n 0x9458: 0x56A2,\n 0x9459: 0x60A9,\n 0x945A: 0x6FC3,\n 0x945B: 0x7D0D,\n 0x945C: 0x80FD,\n 0x945D: 0x8133,\n 0x945E: 0x81BF,\n 0x945F: 0x8FB2,\n 0x9460: 0x8997,\n 0x9461: 0x86A4,\n 0x9462: 0x5DF4,\n 0x9463: 0x628A,\n 0x9464: 0x64AD,\n 0x9465: 0x8987,\n 0x9466: 0x6777,\n 0x9467: 0x6CE2,\n 0x9468: 0x6D3E,\n 0x9469: 0x7436,\n 0x946A: 0x7834,\n 0x946B: 0x5A46,\n 0x946C: 0x7F75,\n 0x946D: 0x82AD,\n 0x946E: 0x99AC,\n 0x946F: 0x4FF3,\n 0x9470: 0x5EC3,\n 0x9471: 0x62DD,\n 0x9472: 0x6392,\n 0x9473: 0x6557,\n 0x9474: 0x676F,\n 0x9475: 0x76C3,\n 0x9476: 0x724C,\n 0x9477: 0x80CC,\n 0x9478: 0x80BA,\n 0x9479: 0x8F29,\n 0x947A: 0x914D,\n 0x947B: 0x500D,\n 0x947C: 0x57F9,\n 0x947D: 0x5A92,\n 0x947E: 0x6885,\n 0x9480: 0x6973,\n 0x9481: 0x7164,\n 0x9482: 0x72FD,\n 0x9483: 0x8CB7,\n 0x9484: 0x58F2,\n 0x9485: 0x8CE0,\n 0x9486: 0x966A,\n 0x9487: 0x9019,\n 0x9488: 0x877F,\n 0x9489: 0x79E4,\n 0x948A: 0x77E7,\n 0x948B: 0x8429,\n 0x948C: 0x4F2F,\n 0x948D: 0x5265,\n 0x948E: 0x535A,\n 0x948F: 0x62CD,\n 0x9490: 0x67CF,\n 0x9491: 0x6CCA,\n 0x9492: 0x767D,\n 0x9493: 0x7B94,\n 0x9494: 0x7C95,\n 0x9495: 0x8236,\n 0x9496: 0x8584,\n 0x9497: 0x8FEB,\n 0x9498: 0x66DD,\n 0x9499: 0x6F20,\n 0x949A: 0x7206,\n 0x949B: 0x7E1B,\n 0x949C: 0x83AB,\n 0x949D: 0x99C1,\n 0x949E: 0x9EA6,\n 0x949F: 0x51FD,\n 0x94A0: 0x7BB1,\n 0x94A1: 0x7872,\n 0x94A2: 0x7BB8,\n 0x94A3: 0x8087,\n 0x94A4: 0x7B48,\n 0x94A5: 0x6AE8,\n 0x94A6: 0x5E61,\n 0x94A7: 0x808C,\n 0x94A8: 0x7551,\n 0x94A9: 0x7560,\n 0x94AA: 0x516B,\n 0x94AB: 0x9262,\n 0x94AC: 0x6E8C,\n 0x94AD: 0x767A,\n 0x94AE: 0x9197,\n 0x94AF: 0x9AEA,\n 0x94B0: 0x4F10,\n 0x94B1: 0x7F70,\n 0x94B2: 0x629C,\n 0x94B3: 0x7B4F,\n 0x94B4: 0x95A5,\n 0x94B5: 0x9CE9,\n 0x94B6: 0x567A,\n 0x94B7: 0x5859,\n 0x94B8: 0x86E4,\n 0x94B9: 0x96BC,\n 0x94BA: 0x4F34,\n 0x94BB: 0x5224,\n 0x94BC: 0x534A,\n 0x94BD: 0x53CD,\n 0x94BE: 0x53DB,\n 0x94BF: 0x5E06,\n 0x94C0: 0x642C,\n 0x94C1: 0x6591,\n 0x94C2: 0x677F,\n 0x94C3: 0x6C3E,\n 0x94C4: 0x6C4E,\n 0x94C5: 0x7248,\n 0x94C6: 0x72AF,\n 0x94C7: 0x73ED,\n 0x94C8: 0x7554,\n 0x94C9: 0x7E41,\n 0x94CA: 0x822C,\n 0x94CB: 0x85E9,\n 0x94CC: 0x8CA9,\n 0x94CD: 0x7BC4,\n 0x94CE: 0x91C6,\n 0x94CF: 0x7169,\n 0x94D0: 0x9812,\n 0x94D1: 0x98EF,\n 0x94D2: 0x633D,\n 0x94D3: 0x6669,\n 0x94D4: 0x756A,\n 0x94D5: 0x76E4,\n 0x94D6: 0x78D0,\n 0x94D7: 0x8543,\n 0x94D8: 0x86EE,\n 0x94D9: 0x532A,\n 0x94DA: 0x5351,\n 0x94DB: 0x5426,\n 0x94DC: 0x5983,\n 0x94DD: 0x5E87,\n 0x94DE: 0x5F7C,\n 0x94DF: 0x60B2,\n 0x94E0: 0x6249,\n 0x94E1: 0x6279,\n 0x94E2: 0x62AB,\n 0x94E3: 0x6590,\n 0x94E4: 0x6BD4,\n 0x94E5: 0x6CCC,\n 0x94E6: 0x75B2,\n 0x94E7: 0x76AE,\n 0x94E8: 0x7891,\n 0x94E9: 0x79D8,\n 0x94EA: 0x7DCB,\n 0x94EB: 0x7F77,\n 0x94EC: 0x80A5,\n 0x94ED: 0x88AB,\n 0x94EE: 0x8AB9,\n 0x94EF: 0x8CBB,\n 0x94F0: 0x907F,\n 0x94F1: 0x975E,\n 0x94F2: 0x98DB,\n 0x94F3: 0x6A0B,\n 0x94F4: 0x7C38,\n 0x94F5: 0x5099,\n 0x94F6: 0x5C3E,\n 0x94F7: 0x5FAE,\n 0x94F8: 0x6787,\n 0x94F9: 0x6BD8,\n 0x94FA: 0x7435,\n 0x94FB: 0x7709,\n 0x94FC: 0x7F8E,\n 0x9540: 0x9F3B,\n 0x9541: 0x67CA,\n 0x9542: 0x7A17,\n 0x9543: 0x5339,\n 0x9544: 0x758B,\n 0x9545: 0x9AED,\n 0x9546: 0x5F66,\n 0x9547: 0x819D,\n 0x9548: 0x83F1,\n 0x9549: 0x8098,\n 0x954A: 0x5F3C,\n 0x954B: 0x5FC5,\n 0x954C: 0x7562,\n 0x954D: 0x7B46,\n 0x954E: 0x903C,\n 0x954F: 0x6867,\n 0x9550: 0x59EB,\n 0x9551: 0x5A9B,\n 0x9552: 0x7D10,\n 0x9553: 0x767E,\n 0x9554: 0x8B2C,\n 0x9555: 0x4FF5,\n 0x9556: 0x5F6A,\n 0x9557: 0x6A19,\n 0x9558: 0x6C37,\n 0x9559: 0x6F02,\n 0x955A: 0x74E2,\n 0x955B: 0x7968,\n 0x955C: 0x8868,\n 0x955D: 0x8A55,\n 0x955E: 0x8C79,\n 0x955F: 0x5EDF,\n 0x9560: 0x63CF,\n 0x9561: 0x75C5,\n 0x9562: 0x79D2,\n 0x9563: 0x82D7,\n 0x9564: 0x9328,\n 0x9565: 0x92F2,\n 0x9566: 0x849C,\n 0x9567: 0x86ED,\n 0x9568: 0x9C2D,\n 0x9569: 0x54C1,\n 0x956A: 0x5F6C,\n 0x956B: 0x658C,\n 0x956C: 0x6D5C,\n 0x956D: 0x7015,\n 0x956E: 0x8CA7,\n 0x956F: 0x8CD3,\n 0x9570: 0x983B,\n 0x9571: 0x654F,\n 0x9572: 0x74F6,\n 0x9573: 0x4E0D,\n 0x9574: 0x4ED8,\n 0x9575: 0x57E0,\n 0x9576: 0x592B,\n 0x9577: 0x5A66,\n 0x9578: 0x5BCC,\n 0x9579: 0x51A8,\n 0x957A: 0x5E03,\n 0x957B: 0x5E9C,\n 0x957C: 0x6016,\n 0x957D: 0x6276,\n 0x957E: 0x6577,\n 0x9580: 0x65A7,\n 0x9581: 0x666E,\n 0x9582: 0x6D6E,\n 0x9583: 0x7236,\n 0x9584: 0x7B26,\n 0x9585: 0x8150,\n 0x9586: 0x819A,\n 0x9587: 0x8299,\n 0x9588: 0x8B5C,\n 0x9589: 0x8CA0,\n 0x958A: 0x8CE6,\n 0x958B: 0x8D74,\n 0x958C: 0x961C,\n 0x958D: 0x9644,\n 0x958E: 0x4FAE,\n 0x958F: 0x64AB,\n 0x9590: 0x6B66,\n 0x9591: 0x821E,\n 0x9592: 0x8461,\n 0x9593: 0x856A,\n 0x9594: 0x90E8,\n 0x9595: 0x5C01,\n 0x9596: 0x6953,\n 0x9597: 0x98A8,\n 0x9598: 0x847A,\n 0x9599: 0x8557,\n 0x959A: 0x4F0F,\n 0x959B: 0x526F,\n 0x959C: 0x5FA9,\n 0x959D: 0x5E45,\n 0x959E: 0x670D,\n 0x959F: 0x798F,\n 0x95A0: 0x8179,\n 0x95A1: 0x8907,\n 0x95A2: 0x8986,\n 0x95A3: 0x6DF5,\n 0x95A4: 0x5F17,\n 0x95A5: 0x6255,\n 0x95A6: 0x6CB8,\n 0x95A7: 0x4ECF,\n 0x95A8: 0x7269,\n 0x95A9: 0x9B92,\n 0x95AA: 0x5206,\n 0x95AB: 0x543B,\n 0x95AC: 0x5674,\n 0x95AD: 0x58B3,\n 0x95AE: 0x61A4,\n 0x95AF: 0x626E,\n 0x95B0: 0x711A,\n 0x95B1: 0x596E,\n 0x95B2: 0x7C89,\n 0x95B3: 0x7CDE,\n 0x95B4: 0x7D1B,\n 0x95B5: 0x96F0,\n 0x95B6: 0x6587,\n 0x95B7: 0x805E,\n 0x95B8: 0x4E19,\n 0x95B9: 0x4F75,\n 0x95BA: 0x5175,\n 0x95BB: 0x5840,\n 0x95BC: 0x5E63,\n 0x95BD: 0x5E73,\n 0x95BE: 0x5F0A,\n 0x95BF: 0x67C4,\n 0x95C0: 0x4E26,\n 0x95C1: 0x853D,\n 0x95C2: 0x9589,\n 0x95C3: 0x965B,\n 0x95C4: 0x7C73,\n 0x95C5: 0x9801,\n 0x95C6: 0x50FB,\n 0x95C7: 0x58C1,\n 0x95C8: 0x7656,\n 0x95C9: 0x78A7,\n 0x95CA: 0x5225,\n 0x95CB: 0x77A5,\n 0x95CC: 0x8511,\n 0x95CD: 0x7B86,\n 0x95CE: 0x504F,\n 0x95CF: 0x5909,\n 0x95D0: 0x7247,\n 0x95D1: 0x7BC7,\n 0x95D2: 0x7DE8,\n 0x95D3: 0x8FBA,\n 0x95D4: 0x8FD4,\n 0x95D5: 0x904D,\n 0x95D6: 0x4FBF,\n 0x95D7: 0x52C9,\n 0x95D8: 0x5A29,\n 0x95D9: 0x5F01,\n 0x95DA: 0x97AD,\n 0x95DB: 0x4FDD,\n 0x95DC: 0x8217,\n 0x95DD: 0x92EA,\n 0x95DE: 0x5703,\n 0x95DF: 0x6355,\n 0x95E0: 0x6B69,\n 0x95E1: 0x752B,\n 0x95E2: 0x88DC,\n 0x95E3: 0x8F14,\n 0x95E4: 0x7A42,\n 0x95E5: 0x52DF,\n 0x95E6: 0x5893,\n 0x95E7: 0x6155,\n 0x95E8: 0x620A,\n 0x95E9: 0x66AE,\n 0x95EA: 0x6BCD,\n 0x95EB: 0x7C3F,\n 0x95EC: 0x83E9,\n 0x95ED: 0x5023,\n 0x95EE: 0x4FF8,\n 0x95EF: 0x5305,\n 0x95F0: 0x5446,\n 0x95F1: 0x5831,\n 0x95F2: 0x5949,\n 0x95F3: 0x5B9D,\n 0x95F4: 0x5CF0,\n 0x95F5: 0x5CEF,\n 0x95F6: 0x5D29,\n 0x95F7: 0x5E96,\n 0x95F8: 0x62B1,\n 0x95F9: 0x6367,\n 0x95FA: 0x653E,\n 0x95FB: 0x65B9,\n 0x95FC: 0x670B,\n 0x9640: 0x6CD5,\n 0x9641: 0x6CE1,\n 0x9642: 0x70F9,\n 0x9643: 0x7832,\n 0x9644: 0x7E2B,\n 0x9645: 0x80DE,\n 0x9646: 0x82B3,\n 0x9647: 0x840C,\n 0x9648: 0x84EC,\n 0x9649: 0x8702,\n 0x964A: 0x8912,\n 0x964B: 0x8A2A,\n 0x964C: 0x8C4A,\n 0x964D: 0x90A6,\n 0x964E: 0x92D2,\n 0x964F: 0x98FD,\n 0x9650: 0x9CF3,\n 0x9651: 0x9D6C,\n 0x9652: 0x4E4F,\n 0x9653: 0x4EA1,\n 0x9654: 0x508D,\n 0x9655: 0x5256,\n 0x9656: 0x574A,\n 0x9657: 0x59A8,\n 0x9658: 0x5E3D,\n 0x9659: 0x5FD8,\n 0x965A: 0x5FD9,\n 0x965B: 0x623F,\n 0x965C: 0x66B4,\n 0x965D: 0x671B,\n 0x965E: 0x67D0,\n 0x965F: 0x68D2,\n 0x9660: 0x5192,\n 0x9661: 0x7D21,\n 0x9662: 0x80AA,\n 0x9663: 0x81A8,\n 0x9664: 0x8B00,\n 0x9665: 0x8C8C,\n 0x9666: 0x8CBF,\n 0x9667: 0x927E,\n 0x9668: 0x9632,\n 0x9669: 0x5420,\n 0x966A: 0x982C,\n 0x966B: 0x5317,\n 0x966C: 0x50D5,\n 0x966D: 0x535C,\n 0x966E: 0x58A8,\n 0x966F: 0x64B2,\n 0x9670: 0x6734,\n 0x9671: 0x7267,\n 0x9672: 0x7766,\n 0x9673: 0x7A46,\n 0x9674: 0x91E6,\n 0x9675: 0x52C3,\n 0x9676: 0x6CA1,\n 0x9677: 0x6B86,\n 0x9678: 0x5800,\n 0x9679: 0x5E4C,\n 0x967A: 0x5954,\n 0x967B: 0x672C,\n 0x967C: 0x7FFB,\n 0x967D: 0x51E1,\n 0x967E: 0x76C6,\n 0x9680: 0x6469,\n 0x9681: 0x78E8,\n 0x9682: 0x9B54,\n 0x9683: 0x9EBB,\n 0x9684: 0x57CB,\n 0x9685: 0x59B9,\n 0x9686: 0x6627,\n 0x9687: 0x679A,\n 0x9688: 0x6BCE,\n 0x9689: 0x54E9,\n 0x968A: 0x69D9,\n 0x968B: 0x5E55,\n 0x968C: 0x819C,\n 0x968D: 0x6795,\n 0x968E: 0x9BAA,\n 0x968F: 0x67FE,\n 0x9690: 0x9C52,\n 0x9691: 0x685D,\n 0x9692: 0x4EA6,\n 0x9693: 0x4FE3,\n 0x9694: 0x53C8,\n 0x9695: 0x62B9,\n 0x9696: 0x672B,\n 0x9697: 0x6CAB,\n 0x9698: 0x8FC4,\n 0x9699: 0x4FAD,\n 0x969A: 0x7E6D,\n 0x969B: 0x9EBF,\n 0x969C: 0x4E07,\n 0x969D: 0x6162,\n 0x969E: 0x6E80,\n 0x969F: 0x6F2B,\n 0x96A0: 0x8513,\n 0x96A1: 0x5473,\n 0x96A2: 0x672A,\n 0x96A3: 0x9B45,\n 0x96A4: 0x5DF3,\n 0x96A5: 0x7B95,\n 0x96A6: 0x5CAC,\n 0x96A7: 0x5BC6,\n 0x96A8: 0x871C,\n 0x96A9: 0x6E4A,\n 0x96AA: 0x84D1,\n 0x96AB: 0x7A14,\n 0x96AC: 0x8108,\n 0x96AD: 0x5999,\n 0x96AE: 0x7C8D,\n 0x96AF: 0x6C11,\n 0x96B0: 0x7720,\n 0x96B1: 0x52D9,\n 0x96B2: 0x5922,\n 0x96B3: 0x7121,\n 0x96B4: 0x725F,\n 0x96B5: 0x77DB,\n 0x96B6: 0x9727,\n 0x96B7: 0x9D61,\n 0x96B8: 0x690B,\n 0x96B9: 0x5A7F,\n 0x96BA: 0x5A18,\n 0x96BB: 0x51A5,\n 0x96BC: 0x540D,\n 0x96BD: 0x547D,\n 0x96BE: 0x660E,\n 0x96BF: 0x76DF,\n 0x96C0: 0x8FF7,\n 0x96C1: 0x9298,\n 0x96C2: 0x9CF4,\n 0x96C3: 0x59EA,\n 0x96C4: 0x725D,\n 0x96C5: 0x6EC5,\n 0x96C6: 0x514D,\n 0x96C7: 0x68C9,\n 0x96C8: 0x7DBF,\n 0x96C9: 0x7DEC,\n 0x96CA: 0x9762,\n 0x96CB: 0x9EBA,\n 0x96CC: 0x6478,\n 0x96CD: 0x6A21,\n 0x96CE: 0x8302,\n 0x96CF: 0x5984,\n 0x96D0: 0x5B5F,\n 0x96D1: 0x6BDB,\n 0x96D2: 0x731B,\n 0x96D3: 0x76F2,\n 0x96D4: 0x7DB2,\n 0x96D5: 0x8017,\n 0x96D6: 0x8499,\n 0x96D7: 0x5132,\n 0x96D8: 0x6728,\n 0x96D9: 0x9ED9,\n 0x96DA: 0x76EE,\n 0x96DB: 0x6762,\n 0x96DC: 0x52FF,\n 0x96DD: 0x9905,\n 0x96DE: 0x5C24,\n 0x96DF: 0x623B,\n 0x96E0: 0x7C7E,\n 0x96E1: 0x8CB0,\n 0x96E2: 0x554F,\n 0x96E3: 0x60B6,\n 0x96E4: 0x7D0B,\n 0x96E5: 0x9580,\n 0x96E6: 0x5301,\n 0x96E7: 0x4E5F,\n 0x96E8: 0x51B6,\n 0x96E9: 0x591C,\n 0x96EA: 0x723A,\n 0x96EB: 0x8036,\n 0x96EC: 0x91CE,\n 0x96ED: 0x5F25,\n 0x96EE: 0x77E2,\n 0x96EF: 0x5384,\n 0x96F0: 0x5F79,\n 0x96F1: 0x7D04,\n 0x96F2: 0x85AC,\n 0x96F3: 0x8A33,\n 0x96F4: 0x8E8D,\n 0x96F5: 0x9756,\n 0x96F6: 0x67F3,\n 0x96F7: 0x85AE,\n 0x96F8: 0x9453,\n 0x96F9: 0x6109,\n 0x96FA: 0x6108,\n 0x96FB: 0x6CB9,\n 0x96FC: 0x7652,\n 0x9740: 0x8AED,\n 0x9741: 0x8F38,\n 0x9742: 0x552F,\n 0x9743: 0x4F51,\n 0x9744: 0x512A,\n 0x9745: 0x52C7,\n 0x9746: 0x53CB,\n 0x9747: 0x5BA5,\n 0x9748: 0x5E7D,\n 0x9749: 0x60A0,\n 0x974A: 0x6182,\n 0x974B: 0x63D6,\n 0x974C: 0x6709,\n 0x974D: 0x67DA,\n 0x974E: 0x6E67,\n 0x974F: 0x6D8C,\n 0x9750: 0x7336,\n 0x9751: 0x7337,\n 0x9752: 0x7531,\n 0x9753: 0x7950,\n 0x9754: 0x88D5,\n 0x9755: 0x8A98,\n 0x9756: 0x904A,\n 0x9757: 0x9091,\n 0x9758: 0x90F5,\n 0x9759: 0x96C4,\n 0x975A: 0x878D,\n 0x975B: 0x5915,\n 0x975C: 0x4E88,\n 0x975D: 0x4F59,\n 0x975E: 0x4E0E,\n 0x975F: 0x8A89,\n 0x9760: 0x8F3F,\n 0x9761: 0x9810,\n 0x9762: 0x50AD,\n 0x9763: 0x5E7C,\n 0x9764: 0x5996,\n 0x9765: 0x5BB9,\n 0x9766: 0x5EB8,\n 0x9767: 0x63DA,\n 0x9768: 0x63FA,\n 0x9769: 0x64C1,\n 0x976A: 0x66DC,\n 0x976B: 0x694A,\n 0x976C: 0x69D8,\n 0x976D: 0x6D0B,\n 0x976E: 0x6EB6,\n 0x976F: 0x7194,\n 0x9770: 0x7528,\n 0x9771: 0x7AAF,\n 0x9772: 0x7F8A,\n 0x9773: 0x8000,\n 0x9774: 0x8449,\n 0x9775: 0x84C9,\n 0x9776: 0x8981,\n 0x9777: 0x8B21,\n 0x9778: 0x8E0A,\n 0x9779: 0x9065,\n 0x977A: 0x967D,\n 0x977B: 0x990A,\n 0x977C: 0x617E,\n 0x977D: 0x6291,\n 0x977E: 0x6B32,\n 0x9780: 0x6C83,\n 0x9781: 0x6D74,\n 0x9782: 0x7FCC,\n 0x9783: 0x7FFC,\n 0x9784: 0x6DC0,\n 0x9785: 0x7F85,\n 0x9786: 0x87BA,\n 0x9787: 0x88F8,\n 0x9788: 0x6765,\n 0x9789: 0x83B1,\n 0x978A: 0x983C,\n 0x978B: 0x96F7,\n 0x978C: 0x6D1B,\n 0x978D: 0x7D61,\n 0x978E: 0x843D,\n 0x978F: 0x916A,\n 0x9790: 0x4E71,\n 0x9791: 0x5375,\n 0x9792: 0x5D50,\n 0x9793: 0x6B04,\n 0x9794: 0x6FEB,\n 0x9795: 0x85CD,\n 0x9796: 0x862D,\n 0x9797: 0x89A7,\n 0x9798: 0x5229,\n 0x9799: 0x540F,\n 0x979A: 0x5C65,\n 0x979B: 0x674E,\n 0x979C: 0x68A8,\n 0x979D: 0x7406,\n 0x979E: 0x7483,\n 0x979F: 0x75E2,\n 0x97A0: 0x88CF,\n 0x97A1: 0x88E1,\n 0x97A2: 0x91CC,\n 0x97A3: 0x96E2,\n 0x97A4: 0x9678,\n 0x97A5: 0x5F8B,\n 0x97A6: 0x7387,\n 0x97A7: 0x7ACB,\n 0x97A8: 0x844E,\n 0x97A9: 0x63A0,\n 0x97AA: 0x7565,\n 0x97AB: 0x5289,\n 0x97AC: 0x6D41,\n 0x97AD: 0x6E9C,\n 0x97AE: 0x7409,\n 0x97AF: 0x7559,\n 0x97B0: 0x786B,\n 0x97B1: 0x7C92,\n 0x97B2: 0x9686,\n 0x97B3: 0x7ADC,\n 0x97B4: 0x9F8D,\n 0x97B5: 0x4FB6,\n 0x97B6: 0x616E,\n 0x97B7: 0x65C5,\n 0x97B8: 0x865C,\n 0x97B9: 0x4E86,\n 0x97BA: 0x4EAE,\n 0x97BB: 0x50DA,\n 0x97BC: 0x4E21,\n 0x97BD: 0x51CC,\n 0x97BE: 0x5BEE,\n 0x97BF: 0x6599,\n 0x97C0: 0x6881,\n 0x97C1: 0x6DBC,\n 0x97C2: 0x731F,\n 0x97C3: 0x7642,\n 0x97C4: 0x77AD,\n 0x97C5: 0x7A1C,\n 0x97C6: 0x7CE7,\n 0x97C7: 0x826F,\n 0x97C8: 0x8AD2,\n 0x97C9: 0x907C,\n 0x97CA: 0x91CF,\n 0x97CB: 0x9675,\n 0x97CC: 0x9818,\n 0x97CD: 0x529B,\n 0x97CE: 0x7DD1,\n 0x97CF: 0x502B,\n 0x97D0: 0x5398,\n 0x97D1: 0x6797,\n 0x97D2: 0x6DCB,\n 0x97D3: 0x71D0,\n 0x97D4: 0x7433,\n 0x97D5: 0x81E8,\n 0x97D6: 0x8F2A,\n 0x97D7: 0x96A3,\n 0x97D8: 0x9C57,\n 0x97D9: 0x9E9F,\n 0x97DA: 0x7460,\n 0x97DB: 0x5841,\n 0x97DC: 0x6D99,\n 0x97DD: 0x7D2F,\n 0x97DE: 0x985E,\n 0x97DF: 0x4EE4,\n 0x97E0: 0x4F36,\n 0x97E1: 0x4F8B,\n 0x97E2: 0x51B7,\n 0x97E3: 0x52B1,\n 0x97E4: 0x5DBA,\n 0x97E5: 0x601C,\n 0x97E6: 0x73B2,\n 0x97E7: 0x793C,\n 0x97E8: 0x82D3,\n 0x97E9: 0x9234,\n 0x97EA: 0x96B7,\n 0x97EB: 0x96F6,\n 0x97EC: 0x970A,\n 0x97ED: 0x9E97,\n 0x97EE: 0x9F62,\n 0x97EF: 0x66A6,\n 0x97F0: 0x6B74,\n 0x97F1: 0x5217,\n 0x97F2: 0x52A3,\n 0x97F3: 0x70C8,\n 0x97F4: 0x88C2,\n 0x97F5: 0x5EC9,\n 0x97F6: 0x604B,\n 0x97F7: 0x6190,\n 0x97F8: 0x6F23,\n 0x97F9: 0x7149,\n 0x97FA: 0x7C3E,\n 0x97FB: 0x7DF4,\n 0x97FC: 0x806F,\n 0x9840: 0x84EE,\n 0x9841: 0x9023,\n 0x9842: 0x932C,\n 0x9843: 0x5442,\n 0x9844: 0x9B6F,\n 0x9845: 0x6AD3,\n 0x9846: 0x7089,\n 0x9847: 0x8CC2,\n 0x9848: 0x8DEF,\n 0x9849: 0x9732,\n 0x984A: 0x52B4,\n 0x984B: 0x5A41,\n 0x984C: 0x5ECA,\n 0x984D: 0x5F04,\n 0x984E: 0x6717,\n 0x984F: 0x697C,\n 0x9850: 0x6994,\n 0x9851: 0x6D6A,\n 0x9852: 0x6F0F,\n 0x9853: 0x7262,\n 0x9854: 0x72FC,\n 0x9855: 0x7BED,\n 0x9856: 0x8001,\n 0x9857: 0x807E,\n 0x9858: 0x874B,\n 0x9859: 0x90CE,\n 0x985A: 0x516D,\n 0x985B: 0x9E93,\n 0x985C: 0x7984,\n 0x985D: 0x808B,\n 0x985E: 0x9332,\n 0x985F: 0x8AD6,\n 0x9860: 0x502D,\n 0x9861: 0x548C,\n 0x9862: 0x8A71,\n 0x9863: 0x6B6A,\n 0x9864: 0x8CC4,\n 0x9865: 0x8107,\n 0x9866: 0x60D1,\n 0x9867: 0x67A0,\n 0x9868: 0x9DF2,\n 0x9869: 0x4E99,\n 0x986A: 0x4E98,\n 0x986B: 0x9C10,\n 0x986C: 0x8A6B,\n 0x986D: 0x85C1,\n 0x986E: 0x8568,\n 0x986F: 0x6900,\n 0x9870: 0x6E7E,\n 0x9871: 0x7897,\n 0x9872: 0x8155,\n 0x989F: 0x5F0C,\n 0x98A0: 0x4E10,\n 0x98A1: 0x4E15,\n 0x98A2: 0x4E2A,\n 0x98A3: 0x4E31,\n 0x98A4: 0x4E36,\n 0x98A5: 0x4E3C,\n 0x98A6: 0x4E3F,\n 0x98A7: 0x4E42,\n 0x98A8: 0x4E56,\n 0x98A9: 0x4E58,\n 0x98AA: 0x4E82,\n 0x98AB: 0x4E85,\n 0x98AC: 0x8C6B,\n 0x98AD: 0x4E8A,\n 0x98AE: 0x8212,\n 0x98AF: 0x5F0D,\n 0x98B0: 0x4E8E,\n 0x98B1: 0x4E9E,\n 0x98B2: 0x4E9F,\n 0x98B3: 0x4EA0,\n 0x98B4: 0x4EA2,\n 0x98B5: 0x4EB0,\n 0x98B6: 0x4EB3,\n 0x98B7: 0x4EB6,\n 0x98B8: 0x4ECE,\n 0x98B9: 0x4ECD,\n 0x98BA: 0x4EC4,\n 0x98BB: 0x4EC6,\n 0x98BC: 0x4EC2,\n 0x98BD: 0x4ED7,\n 0x98BE: 0x4EDE,\n 0x98BF: 0x4EED,\n 0x98C0: 0x4EDF,\n 0x98C1: 0x4EF7,\n 0x98C2: 0x4F09,\n 0x98C3: 0x4F5A,\n 0x98C4: 0x4F30,\n 0x98C5: 0x4F5B,\n 0x98C6: 0x4F5D,\n 0x98C7: 0x4F57,\n 0x98C8: 0x4F47,\n 0x98C9: 0x4F76,\n 0x98CA: 0x4F88,\n 0x98CB: 0x4F8F,\n 0x98CC: 0x4F98,\n 0x98CD: 0x4F7B,\n 0x98CE: 0x4F69,\n 0x98CF: 0x4F70,\n 0x98D0: 0x4F91,\n 0x98D1: 0x4F6F,\n 0x98D2: 0x4F86,\n 0x98D3: 0x4F96,\n 0x98D4: 0x5118,\n 0x98D5: 0x4FD4,\n 0x98D6: 0x4FDF,\n 0x98D7: 0x4FCE,\n 0x98D8: 0x4FD8,\n 0x98D9: 0x4FDB,\n 0x98DA: 0x4FD1,\n 0x98DB: 0x4FDA,\n 0x98DC: 0x4FD0,\n 0x98DD: 0x4FE4,\n 0x98DE: 0x4FE5,\n 0x98DF: 0x501A,\n 0x98E0: 0x5028,\n 0x98E1: 0x5014,\n 0x98E2: 0x502A,\n 0x98E3: 0x5025,\n 0x98E4: 0x5005,\n 0x98E5: 0x4F1C,\n 0x98E6: 0x4FF6,\n 0x98E7: 0x5021,\n 0x98E8: 0x5029,\n 0x98E9: 0x502C,\n 0x98EA: 0x4FFE,\n 0x98EB: 0x4FEF,\n 0x98EC: 0x5011,\n 0x98ED: 0x5006,\n 0x98EE: 0x5043,\n 0x98EF: 0x5047,\n 0x98F0: 0x6703,\n 0x98F1: 0x5055,\n 0x98F2: 0x5050,\n 0x98F3: 0x5048,\n 0x98F4: 0x505A,\n 0x98F5: 0x5056,\n 0x98F6: 0x506C,\n 0x98F7: 0x5078,\n 0x98F8: 0x5080,\n 0x98F9: 0x509A,\n 0x98FA: 0x5085,\n 0x98FB: 0x50B4,\n 0x98FC: 0x50B2,\n 0x9940: 0x50C9,\n 0x9941: 0x50CA,\n 0x9942: 0x50B3,\n 0x9943: 0x50C2,\n 0x9944: 0x50D6,\n 0x9945: 0x50DE,\n 0x9946: 0x50E5,\n 0x9947: 0x50ED,\n 0x9948: 0x50E3,\n 0x9949: 0x50EE,\n 0x994A: 0x50F9,\n 0x994B: 0x50F5,\n 0x994C: 0x5109,\n 0x994D: 0x5101,\n 0x994E: 0x5102,\n 0x994F: 0x5116,\n 0x9950: 0x5115,\n 0x9951: 0x5114,\n 0x9952: 0x511A,\n 0x9953: 0x5121,\n 0x9954: 0x513A,\n 0x9955: 0x5137,\n 0x9956: 0x513C,\n 0x9957: 0x513B,\n 0x9958: 0x513F,\n 0x9959: 0x5140,\n 0x995A: 0x5152,\n 0x995B: 0x514C,\n 0x995C: 0x5154,\n 0x995D: 0x5162,\n 0x995E: 0x7AF8,\n 0x995F: 0x5169,\n 0x9960: 0x516A,\n 0x9961: 0x516E,\n 0x9962: 0x5180,\n 0x9963: 0x5182,\n 0x9964: 0x56D8,\n 0x9965: 0x518C,\n 0x9966: 0x5189,\n 0x9967: 0x518F,\n 0x9968: 0x5191,\n 0x9969: 0x5193,\n 0x996A: 0x5195,\n 0x996B: 0x5196,\n 0x996C: 0x51A4,\n 0x996D: 0x51A6,\n 0x996E: 0x51A2,\n 0x996F: 0x51A9,\n 0x9970: 0x51AA,\n 0x9971: 0x51AB,\n 0x9972: 0x51B3,\n 0x9973: 0x51B1,\n 0x9974: 0x51B2,\n 0x9975: 0x51B0,\n 0x9976: 0x51B5,\n 0x9977: 0x51BD,\n 0x9978: 0x51C5,\n 0x9979: 0x51C9,\n 0x997A: 0x51DB,\n 0x997B: 0x51E0,\n 0x997C: 0x8655,\n 0x997D: 0x51E9,\n 0x997E: 0x51ED,\n 0x9980: 0x51F0,\n 0x9981: 0x51F5,\n 0x9982: 0x51FE,\n 0x9983: 0x5204,\n 0x9984: 0x520B,\n 0x9985: 0x5214,\n 0x9986: 0x520E,\n 0x9987: 0x5227,\n 0x9988: 0x522A,\n 0x9989: 0x522E,\n 0x998A: 0x5233,\n 0x998B: 0x5239,\n 0x998C: 0x524F,\n 0x998D: 0x5244,\n 0x998E: 0x524B,\n 0x998F: 0x524C,\n 0x9990: 0x525E,\n 0x9991: 0x5254,\n 0x9992: 0x526A,\n 0x9993: 0x5274,\n 0x9994: 0x5269,\n 0x9995: 0x5273,\n 0x9996: 0x527F,\n 0x9997: 0x527D,\n 0x9998: 0x528D,\n 0x9999: 0x5294,\n 0x999A: 0x5292,\n 0x999B: 0x5271,\n 0x999C: 0x5288,\n 0x999D: 0x5291,\n 0x999E: 0x8FA8,\n 0x999F: 0x8FA7,\n 0x99A0: 0x52AC,\n 0x99A1: 0x52AD,\n 0x99A2: 0x52BC,\n 0x99A3: 0x52B5,\n 0x99A4: 0x52C1,\n 0x99A5: 0x52CD,\n 0x99A6: 0x52D7,\n 0x99A7: 0x52DE,\n 0x99A8: 0x52E3,\n 0x99A9: 0x52E6,\n 0x99AA: 0x98ED,\n 0x99AB: 0x52E0,\n 0x99AC: 0x52F3,\n 0x99AD: 0x52F5,\n 0x99AE: 0x52F8,\n 0x99AF: 0x52F9,\n 0x99B0: 0x5306,\n 0x99B1: 0x5308,\n 0x99B2: 0x7538,\n 0x99B3: 0x530D,\n 0x99B4: 0x5310,\n 0x99B5: 0x530F,\n 0x99B6: 0x5315,\n 0x99B7: 0x531A,\n 0x99B8: 0x5323,\n 0x99B9: 0x532F,\n 0x99BA: 0x5331,\n 0x99BB: 0x5333,\n 0x99BC: 0x5338,\n 0x99BD: 0x5340,\n 0x99BE: 0x5346,\n 0x99BF: 0x5345,\n 0x99C0: 0x4E17,\n 0x99C1: 0x5349,\n 0x99C2: 0x534D,\n 0x99C3: 0x51D6,\n 0x99C4: 0x535E,\n 0x99C5: 0x5369,\n 0x99C6: 0x536E,\n 0x99C7: 0x5918,\n 0x99C8: 0x537B,\n 0x99C9: 0x5377,\n 0x99CA: 0x5382,\n 0x99CB: 0x5396,\n 0x99CC: 0x53A0,\n 0x99CD: 0x53A6,\n 0x99CE: 0x53A5,\n 0x99CF: 0x53AE,\n 0x99D0: 0x53B0,\n 0x99D1: 0x53B6,\n 0x99D2: 0x53C3,\n 0x99D3: 0x7C12,\n 0x99D4: 0x96D9,\n 0x99D5: 0x53DF,\n 0x99D6: 0x66FC,\n 0x99D7: 0x71EE,\n 0x99D8: 0x53EE,\n 0x99D9: 0x53E8,\n 0x99DA: 0x53ED,\n 0x99DB: 0x53FA,\n 0x99DC: 0x5401,\n 0x99DD: 0x543D,\n 0x99DE: 0x5440,\n 0x99DF: 0x542C,\n 0x99E0: 0x542D,\n 0x99E1: 0x543C,\n 0x99E2: 0x542E,\n 0x99E3: 0x5436,\n 0x99E4: 0x5429,\n 0x99E5: 0x541D,\n 0x99E6: 0x544E,\n 0x99E7: 0x548F,\n 0x99E8: 0x5475,\n 0x99E9: 0x548E,\n 0x99EA: 0x545F,\n 0x99EB: 0x5471,\n 0x99EC: 0x5477,\n 0x99ED: 0x5470,\n 0x99EE: 0x5492,\n 0x99EF: 0x547B,\n 0x99F0: 0x5480,\n 0x99F1: 0x5476,\n 0x99F2: 0x5484,\n 0x99F3: 0x5490,\n 0x99F4: 0x5486,\n 0x99F5: 0x54C7,\n 0x99F6: 0x54A2,\n 0x99F7: 0x54B8,\n 0x99F8: 0x54A5,\n 0x99F9: 0x54AC,\n 0x99FA: 0x54C4,\n 0x99FB: 0x54C8,\n 0x99FC: 0x54A8,\n 0x9A40: 0x54AB,\n 0x9A41: 0x54C2,\n 0x9A42: 0x54A4,\n 0x9A43: 0x54BE,\n 0x9A44: 0x54BC,\n 0x9A45: 0x54D8,\n 0x9A46: 0x54E5,\n 0x9A47: 0x54E6,\n 0x9A48: 0x550F,\n 0x9A49: 0x5514,\n 0x9A4A: 0x54FD,\n 0x9A4B: 0x54EE,\n 0x9A4C: 0x54ED,\n 0x9A4D: 0x54FA,\n 0x9A4E: 0x54E2,\n 0x9A4F: 0x5539,\n 0x9A50: 0x5540,\n 0x9A51: 0x5563,\n 0x9A52: 0x554C,\n 0x9A53: 0x552E,\n 0x9A54: 0x555C,\n 0x9A55: 0x5545,\n 0x9A56: 0x5556,\n 0x9A57: 0x5557,\n 0x9A58: 0x5538,\n 0x9A59: 0x5533,\n 0x9A5A: 0x555D,\n 0x9A5B: 0x5599,\n 0x9A5C: 0x5580,\n 0x9A5D: 0x54AF,\n 0x9A5E: 0x558A,\n 0x9A5F: 0x559F,\n 0x9A60: 0x557B,\n 0x9A61: 0x557E,\n 0x9A62: 0x5598,\n 0x9A63: 0x559E,\n 0x9A64: 0x55AE,\n 0x9A65: 0x557C,\n 0x9A66: 0x5583,\n 0x9A67: 0x55A9,\n 0x9A68: 0x5587,\n 0x9A69: 0x55A8,\n 0x9A6A: 0x55DA,\n 0x9A6B: 0x55C5,\n 0x9A6C: 0x55DF,\n 0x9A6D: 0x55C4,\n 0x9A6E: 0x55DC,\n 0x9A6F: 0x55E4,\n 0x9A70: 0x55D4,\n 0x9A71: 0x5614,\n 0x9A72: 0x55F7,\n 0x9A73: 0x5616,\n 0x9A74: 0x55FE,\n 0x9A75: 0x55FD,\n 0x9A76: 0x561B,\n 0x9A77: 0x55F9,\n 0x9A78: 0x564E,\n 0x9A79: 0x5650,\n 0x9A7A: 0x71DF,\n 0x9A7B: 0x5634,\n 0x9A7C: 0x5636,\n 0x9A7D: 0x5632,\n 0x9A7E: 0x5638,\n 0x9A80: 0x566B,\n 0x9A81: 0x5664,\n 0x9A82: 0x562F,\n 0x9A83: 0x566C,\n 0x9A84: 0x566A,\n 0x9A85: 0x5686,\n 0x9A86: 0x5680,\n 0x9A87: 0x568A,\n 0x9A88: 0x56A0,\n 0x9A89: 0x5694,\n 0x9A8A: 0x568F,\n 0x9A8B: 0x56A5,\n 0x9A8C: 0x56AE,\n 0x9A8D: 0x56B6,\n 0x9A8E: 0x56B4,\n 0x9A8F: 0x56C2,\n 0x9A90: 0x56BC,\n 0x9A91: 0x56C1,\n 0x9A92: 0x56C3,\n 0x9A93: 0x56C0,\n 0x9A94: 0x56C8,\n 0x9A95: 0x56CE,\n 0x9A96: 0x56D1,\n 0x9A97: 0x56D3,\n 0x9A98: 0x56D7,\n 0x9A99: 0x56EE,\n 0x9A9A: 0x56F9,\n 0x9A9B: 0x5700,\n 0x9A9C: 0x56FF,\n 0x9A9D: 0x5704,\n 0x9A9E: 0x5709,\n 0x9A9F: 0x5708,\n 0x9AA0: 0x570B,\n 0x9AA1: 0x570D,\n 0x9AA2: 0x5713,\n 0x9AA3: 0x5718,\n 0x9AA4: 0x5716,\n 0x9AA5: 0x55C7,\n 0x9AA6: 0x571C,\n 0x9AA7: 0x5726,\n 0x9AA8: 0x5737,\n 0x9AA9: 0x5738,\n 0x9AAA: 0x574E,\n 0x9AAB: 0x573B,\n 0x9AAC: 0x5740,\n 0x9AAD: 0x574F,\n 0x9AAE: 0x5769,\n 0x9AAF: 0x57C0,\n 0x9AB0: 0x5788,\n 0x9AB1: 0x5761,\n 0x9AB2: 0x577F,\n 0x9AB3: 0x5789,\n 0x9AB4: 0x5793,\n 0x9AB5: 0x57A0,\n 0x9AB6: 0x57B3,\n 0x9AB7: 0x57A4,\n 0x9AB8: 0x57AA,\n 0x9AB9: 0x57B0,\n 0x9ABA: 0x57C3,\n 0x9ABB: 0x57C6,\n 0x9ABC: 0x57D4,\n 0x9ABD: 0x57D2,\n 0x9ABE: 0x57D3,\n 0x9ABF: 0x580A,\n 0x9AC0: 0x57D6,\n 0x9AC1: 0x57E3,\n 0x9AC2: 0x580B,\n 0x9AC3: 0x5819,\n 0x9AC4: 0x581D,\n 0x9AC5: 0x5872,\n 0x9AC6: 0x5821,\n 0x9AC7: 0x5862,\n 0x9AC8: 0x584B,\n 0x9AC9: 0x5870,\n 0x9ACA: 0x6BC0,\n 0x9ACB: 0x5852,\n 0x9ACC: 0x583D,\n 0x9ACD: 0x5879,\n 0x9ACE: 0x5885,\n 0x9ACF: 0x58B9,\n 0x9AD0: 0x589F,\n 0x9AD1: 0x58AB,\n 0x9AD2: 0x58BA,\n 0x9AD3: 0x58DE,\n 0x9AD4: 0x58BB,\n 0x9AD5: 0x58B8,\n 0x9AD6: 0x58AE,\n 0x9AD7: 0x58C5,\n 0x9AD8: 0x58D3,\n 0x9AD9: 0x58D1,\n 0x9ADA: 0x58D7,\n 0x9ADB: 0x58D9,\n 0x9ADC: 0x58D8,\n 0x9ADD: 0x58E5,\n 0x9ADE: 0x58DC,\n 0x9ADF: 0x58E4,\n 0x9AE0: 0x58DF,\n 0x9AE1: 0x58EF,\n 0x9AE2: 0x58FA,\n 0x9AE3: 0x58F9,\n 0x9AE4: 0x58FB,\n 0x9AE5: 0x58FC,\n 0x9AE6: 0x58FD,\n 0x9AE7: 0x5902,\n 0x9AE8: 0x590A,\n 0x9AE9: 0x5910,\n 0x9AEA: 0x591B,\n 0x9AEB: 0x68A6,\n 0x9AEC: 0x5925,\n 0x9AED: 0x592C,\n 0x9AEE: 0x592D,\n 0x9AEF: 0x5932,\n 0x9AF0: 0x5938,\n 0x9AF1: 0x593E,\n 0x9AF2: 0x7AD2,\n 0x9AF3: 0x5955,\n 0x9AF4: 0x5950,\n 0x9AF5: 0x594E,\n 0x9AF6: 0x595A,\n 0x9AF7: 0x5958,\n 0x9AF8: 0x5962,\n 0x9AF9: 0x5960,\n 0x9AFA: 0x5967,\n 0x9AFB: 0x596C,\n 0x9AFC: 0x5969,\n 0x9B40: 0x5978,\n 0x9B41: 0x5981,\n 0x9B42: 0x599D,\n 0x9B43: 0x4F5E,\n 0x9B44: 0x4FAB,\n 0x9B45: 0x59A3,\n 0x9B46: 0x59B2,\n 0x9B47: 0x59C6,\n 0x9B48: 0x59E8,\n 0x9B49: 0x59DC,\n 0x9B4A: 0x598D,\n 0x9B4B: 0x59D9,\n 0x9B4C: 0x59DA,\n 0x9B4D: 0x5A25,\n 0x9B4E: 0x5A1F,\n 0x9B4F: 0x5A11,\n 0x9B50: 0x5A1C,\n 0x9B51: 0x5A09,\n 0x9B52: 0x5A1A,\n 0x9B53: 0x5A40,\n 0x9B54: 0x5A6C,\n 0x9B55: 0x5A49,\n 0x9B56: 0x5A35,\n 0x9B57: 0x5A36,\n 0x9B58: 0x5A62,\n 0x9B59: 0x5A6A,\n 0x9B5A: 0x5A9A,\n 0x9B5B: 0x5ABC,\n 0x9B5C: 0x5ABE,\n 0x9B5D: 0x5ACB,\n 0x9B5E: 0x5AC2,\n 0x9B5F: 0x5ABD,\n 0x9B60: 0x5AE3,\n 0x9B61: 0x5AD7,\n 0x9B62: 0x5AE6,\n 0x9B63: 0x5AE9,\n 0x9B64: 0x5AD6,\n 0x9B65: 0x5AFA,\n 0x9B66: 0x5AFB,\n 0x9B67: 0x5B0C,\n 0x9B68: 0x5B0B,\n 0x9B69: 0x5B16,\n 0x9B6A: 0x5B32,\n 0x9B6B: 0x5AD0,\n 0x9B6C: 0x5B2A,\n 0x9B6D: 0x5B36,\n 0x9B6E: 0x5B3E,\n 0x9B6F: 0x5B43,\n 0x9B70: 0x5B45,\n 0x9B71: 0x5B40,\n 0x9B72: 0x5B51,\n 0x9B73: 0x5B55,\n 0x9B74: 0x5B5A,\n 0x9B75: 0x5B5B,\n 0x9B76: 0x5B65,\n 0x9B77: 0x5B69,\n 0x9B78: 0x5B70,\n 0x9B79: 0x5B73,\n 0x9B7A: 0x5B75,\n 0x9B7B: 0x5B78,\n 0x9B7C: 0x6588,\n 0x9B7D: 0x5B7A,\n 0x9B7E: 0x5B80,\n 0x9B80: 0x5B83,\n 0x9B81: 0x5BA6,\n 0x9B82: 0x5BB8,\n 0x9B83: 0x5BC3,\n 0x9B84: 0x5BC7,\n 0x9B85: 0x5BC9,\n 0x9B86: 0x5BD4,\n 0x9B87: 0x5BD0,\n 0x9B88: 0x5BE4,\n 0x9B89: 0x5BE6,\n 0x9B8A: 0x5BE2,\n 0x9B8B: 0x5BDE,\n 0x9B8C: 0x5BE5,\n 0x9B8D: 0x5BEB,\n 0x9B8E: 0x5BF0,\n 0x9B8F: 0x5BF6,\n 0x9B90: 0x5BF3,\n 0x9B91: 0x5C05,\n 0x9B92: 0x5C07,\n 0x9B93: 0x5C08,\n 0x9B94: 0x5C0D,\n 0x9B95: 0x5C13,\n 0x9B96: 0x5C20,\n 0x9B97: 0x5C22,\n 0x9B98: 0x5C28,\n 0x9B99: 0x5C38,\n 0x9B9A: 0x5C39,\n 0x9B9B: 0x5C41,\n 0x9B9C: 0x5C46,\n 0x9B9D: 0x5C4E,\n 0x9B9E: 0x5C53,\n 0x9B9F: 0x5C50,\n 0x9BA0: 0x5C4F,\n 0x9BA1: 0x5B71,\n 0x9BA2: 0x5C6C,\n 0x9BA3: 0x5C6E,\n 0x9BA4: 0x4E62,\n 0x9BA5: 0x5C76,\n 0x9BA6: 0x5C79,\n 0x9BA7: 0x5C8C,\n 0x9BA8: 0x5C91,\n 0x9BA9: 0x5C94,\n 0x9BAA: 0x599B,\n 0x9BAB: 0x5CAB,\n 0x9BAC: 0x5CBB,\n 0x9BAD: 0x5CB6,\n 0x9BAE: 0x5CBC,\n 0x9BAF: 0x5CB7,\n 0x9BB0: 0x5CC5,\n 0x9BB1: 0x5CBE,\n 0x9BB2: 0x5CC7,\n 0x9BB3: 0x5CD9,\n 0x9BB4: 0x5CE9,\n 0x9BB5: 0x5CFD,\n 0x9BB6: 0x5CFA,\n 0x9BB7: 0x5CED,\n 0x9BB8: 0x5D8C,\n 0x9BB9: 0x5CEA,\n 0x9BBA: 0x5D0B,\n 0x9BBB: 0x5D15,\n 0x9BBC: 0x5D17,\n 0x9BBD: 0x5D5C,\n 0x9BBE: 0x5D1F,\n 0x9BBF: 0x5D1B,\n 0x9BC0: 0x5D11,\n 0x9BC1: 0x5D14,\n 0x9BC2: 0x5D22,\n 0x9BC3: 0x5D1A,\n 0x9BC4: 0x5D19,\n 0x9BC5: 0x5D18,\n 0x9BC6: 0x5D4C,\n 0x9BC7: 0x5D52,\n 0x9BC8: 0x5D4E,\n 0x9BC9: 0x5D4B,\n 0x9BCA: 0x5D6C,\n 0x9BCB: 0x5D73,\n 0x9BCC: 0x5D76,\n 0x9BCD: 0x5D87,\n 0x9BCE: 0x5D84,\n 0x9BCF: 0x5D82,\n 0x9BD0: 0x5DA2,\n 0x9BD1: 0x5D9D,\n 0x9BD2: 0x5DAC,\n 0x9BD3: 0x5DAE,\n 0x9BD4: 0x5DBD,\n 0x9BD5: 0x5D90,\n 0x9BD6: 0x5DB7,\n 0x9BD7: 0x5DBC,\n 0x9BD8: 0x5DC9,\n 0x9BD9: 0x5DCD,\n 0x9BDA: 0x5DD3,\n 0x9BDB: 0x5DD2,\n 0x9BDC: 0x5DD6,\n 0x9BDD: 0x5DDB,\n 0x9BDE: 0x5DEB,\n 0x9BDF: 0x5DF2,\n 0x9BE0: 0x5DF5,\n 0x9BE1: 0x5E0B,\n 0x9BE2: 0x5E1A,\n 0x9BE3: 0x5E19,\n 0x9BE4: 0x5E11,\n 0x9BE5: 0x5E1B,\n 0x9BE6: 0x5E36,\n 0x9BE7: 0x5E37,\n 0x9BE8: 0x5E44,\n 0x9BE9: 0x5E43,\n 0x9BEA: 0x5E40,\n 0x9BEB: 0x5E4E,\n 0x9BEC: 0x5E57,\n 0x9BED: 0x5E54,\n 0x9BEE: 0x5E5F,\n 0x9BEF: 0x5E62,\n 0x9BF0: 0x5E64,\n 0x9BF1: 0x5E47,\n 0x9BF2: 0x5E75,\n 0x9BF3: 0x5E76,\n 0x9BF4: 0x5E7A,\n 0x9BF5: 0x9EBC,\n 0x9BF6: 0x5E7F,\n 0x9BF7: 0x5EA0,\n 0x9BF8: 0x5EC1,\n 0x9BF9: 0x5EC2,\n 0x9BFA: 0x5EC8,\n 0x9BFB: 0x5ED0,\n 0x9BFC: 0x5ECF,\n 0x9C40: 0x5ED6,\n 0x9C41: 0x5EE3,\n 0x9C42: 0x5EDD,\n 0x9C43: 0x5EDA,\n 0x9C44: 0x5EDB,\n 0x9C45: 0x5EE2,\n 0x9C46: 0x5EE1,\n 0x9C47: 0x5EE8,\n 0x9C48: 0x5EE9,\n 0x9C49: 0x5EEC,\n 0x9C4A: 0x5EF1,\n 0x9C4B: 0x5EF3,\n 0x9C4C: 0x5EF0,\n 0x9C4D: 0x5EF4,\n 0x9C4E: 0x5EF8,\n 0x9C4F: 0x5EFE,\n 0x9C50: 0x5F03,\n 0x9C51: 0x5F09,\n 0x9C52: 0x5F5D,\n 0x9C53: 0x5F5C,\n 0x9C54: 0x5F0B,\n 0x9C55: 0x5F11,\n 0x9C56: 0x5F16,\n 0x9C57: 0x5F29,\n 0x9C58: 0x5F2D,\n 0x9C59: 0x5F38,\n 0x9C5A: 0x5F41,\n 0x9C5B: 0x5F48,\n 0x9C5C: 0x5F4C,\n 0x9C5D: 0x5F4E,\n 0x9C5E: 0x5F2F,\n 0x9C5F: 0x5F51,\n 0x9C60: 0x5F56,\n 0x9C61: 0x5F57,\n 0x9C62: 0x5F59,\n 0x9C63: 0x5F61,\n 0x9C64: 0x5F6D,\n 0x9C65: 0x5F73,\n 0x9C66: 0x5F77,\n 0x9C67: 0x5F83,\n 0x9C68: 0x5F82,\n 0x9C69: 0x5F7F,\n 0x9C6A: 0x5F8A,\n 0x9C6B: 0x5F88,\n 0x9C6C: 0x5F91,\n 0x9C6D: 0x5F87,\n 0x9C6E: 0x5F9E,\n 0x9C6F: 0x5F99,\n 0x9C70: 0x5F98,\n 0x9C71: 0x5FA0,\n 0x9C72: 0x5FA8,\n 0x9C73: 0x5FAD,\n 0x9C74: 0x5FBC,\n 0x9C75: 0x5FD6,\n 0x9C76: 0x5FFB,\n 0x9C77: 0x5FE4,\n 0x9C78: 0x5FF8,\n 0x9C79: 0x5FF1,\n 0x9C7A: 0x5FDD,\n 0x9C7B: 0x60B3,\n 0x9C7C: 0x5FFF,\n 0x9C7D: 0x6021,\n 0x9C7E: 0x6060,\n 0x9C80: 0x6019,\n 0x9C81: 0x6010,\n 0x9C82: 0x6029,\n 0x9C83: 0x600E,\n 0x9C84: 0x6031,\n 0x9C85: 0x601B,\n 0x9C86: 0x6015,\n 0x9C87: 0x602B,\n 0x9C88: 0x6026,\n 0x9C89: 0x600F,\n 0x9C8A: 0x603A,\n 0x9C8B: 0x605A,\n 0x9C8C: 0x6041,\n 0x9C8D: 0x606A,\n 0x9C8E: 0x6077,\n 0x9C8F: 0x605F,\n 0x9C90: 0x604A,\n 0x9C91: 0x6046,\n 0x9C92: 0x604D,\n 0x9C93: 0x6063,\n 0x9C94: 0x6043,\n 0x9C95: 0x6064,\n 0x9C96: 0x6042,\n 0x9C97: 0x606C,\n 0x9C98: 0x606B,\n 0x9C99: 0x6059,\n 0x9C9A: 0x6081,\n 0x9C9B: 0x608D,\n 0x9C9C: 0x60E7,\n 0x9C9D: 0x6083,\n 0x9C9E: 0x609A,\n 0x9C9F: 0x6084,\n 0x9CA0: 0x609B,\n 0x9CA1: 0x6096,\n 0x9CA2: 0x6097,\n 0x9CA3: 0x6092,\n 0x9CA4: 0x60A7,\n 0x9CA5: 0x608B,\n 0x9CA6: 0x60E1,\n 0x9CA7: 0x60B8,\n 0x9CA8: 0x60E0,\n 0x9CA9: 0x60D3,\n 0x9CAA: 0x60B4,\n 0x9CAB: 0x5FF0,\n 0x9CAC: 0x60BD,\n 0x9CAD: 0x60C6,\n 0x9CAE: 0x60B5,\n 0x9CAF: 0x60D8,\n 0x9CB0: 0x614D,\n 0x9CB1: 0x6115,\n 0x9CB2: 0x6106,\n 0x9CB3: 0x60F6,\n 0x9CB4: 0x60F7,\n 0x9CB5: 0x6100,\n 0x9CB6: 0x60F4,\n 0x9CB7: 0x60FA,\n 0x9CB8: 0x6103,\n 0x9CB9: 0x6121,\n 0x9CBA: 0x60FB,\n 0x9CBB: 0x60F1,\n 0x9CBC: 0x610D,\n 0x9CBD: 0x610E,\n 0x9CBE: 0x6147,\n 0x9CBF: 0x613E,\n 0x9CC0: 0x6128,\n 0x9CC1: 0x6127,\n 0x9CC2: 0x614A,\n 0x9CC3: 0x613F,\n 0x9CC4: 0x613C,\n 0x9CC5: 0x612C,\n 0x9CC6: 0x6134,\n 0x9CC7: 0x613D,\n 0x9CC8: 0x6142,\n 0x9CC9: 0x6144,\n 0x9CCA: 0x6173,\n 0x9CCB: 0x6177,\n 0x9CCC: 0x6158,\n 0x9CCD: 0x6159,\n 0x9CCE: 0x615A,\n 0x9CCF: 0x616B,\n 0x9CD0: 0x6174,\n 0x9CD1: 0x616F,\n 0x9CD2: 0x6165,\n 0x9CD3: 0x6171,\n 0x9CD4: 0x615F,\n 0x9CD5: 0x615D,\n 0x9CD6: 0x6153,\n 0x9CD7: 0x6175,\n 0x9CD8: 0x6199,\n 0x9CD9: 0x6196,\n 0x9CDA: 0x6187,\n 0x9CDB: 0x61AC,\n 0x9CDC: 0x6194,\n 0x9CDD: 0x619A,\n 0x9CDE: 0x618A,\n 0x9CDF: 0x6191,\n 0x9CE0: 0x61AB,\n 0x9CE1: 0x61AE,\n 0x9CE2: 0x61CC,\n 0x9CE3: 0x61CA,\n 0x9CE4: 0x61C9,\n 0x9CE5: 0x61F7,\n 0x9CE6: 0x61C8,\n 0x9CE7: 0x61C3,\n 0x9CE8: 0x61C6,\n 0x9CE9: 0x61BA,\n 0x9CEA: 0x61CB,\n 0x9CEB: 0x7F79,\n 0x9CEC: 0x61CD,\n 0x9CED: 0x61E6,\n 0x9CEE: 0x61E3,\n 0x9CEF: 0x61F6,\n 0x9CF0: 0x61FA,\n 0x9CF1: 0x61F4,\n 0x9CF2: 0x61FF,\n 0x9CF3: 0x61FD,\n 0x9CF4: 0x61FC,\n 0x9CF5: 0x61FE,\n 0x9CF6: 0x6200,\n 0x9CF7: 0x6208,\n 0x9CF8: 0x6209,\n 0x9CF9: 0x620D,\n 0x9CFA: 0x620C,\n 0x9CFB: 0x6214,\n 0x9CFC: 0x621B,\n 0x9D40: 0x621E,\n 0x9D41: 0x6221,\n 0x9D42: 0x622A,\n 0x9D43: 0x622E,\n 0x9D44: 0x6230,\n 0x9D45: 0x6232,\n 0x9D46: 0x6233,\n 0x9D47: 0x6241,\n 0x9D48: 0x624E,\n 0x9D49: 0x625E,\n 0x9D4A: 0x6263,\n 0x9D4B: 0x625B,\n 0x9D4C: 0x6260,\n 0x9D4D: 0x6268,\n 0x9D4E: 0x627C,\n 0x9D4F: 0x6282,\n 0x9D50: 0x6289,\n 0x9D51: 0x627E,\n 0x9D52: 0x6292,\n 0x9D53: 0x6293,\n 0x9D54: 0x6296,\n 0x9D55: 0x62D4,\n 0x9D56: 0x6283,\n 0x9D57: 0x6294,\n 0x9D58: 0x62D7,\n 0x9D59: 0x62D1,\n 0x9D5A: 0x62BB,\n 0x9D5B: 0x62CF,\n 0x9D5C: 0x62FF,\n 0x9D5D: 0x62C6,\n 0x9D5E: 0x64D4,\n 0x9D5F: 0x62C8,\n 0x9D60: 0x62DC,\n 0x9D61: 0x62CC,\n 0x9D62: 0x62CA,\n 0x9D63: 0x62C2,\n 0x9D64: 0x62C7,\n 0x9D65: 0x629B,\n 0x9D66: 0x62C9,\n 0x9D67: 0x630C,\n 0x9D68: 0x62EE,\n 0x9D69: 0x62F1,\n 0x9D6A: 0x6327,\n 0x9D6B: 0x6302,\n 0x9D6C: 0x6308,\n 0x9D6D: 0x62EF,\n 0x9D6E: 0x62F5,\n 0x9D6F: 0x6350,\n 0x9D70: 0x633E,\n 0x9D71: 0x634D,\n 0x9D72: 0x641C,\n 0x9D73: 0x634F,\n 0x9D74: 0x6396,\n 0x9D75: 0x638E,\n 0x9D76: 0x6380,\n 0x9D77: 0x63AB,\n 0x9D78: 0x6376,\n 0x9D79: 0x63A3,\n 0x9D7A: 0x638F,\n 0x9D7B: 0x6389,\n 0x9D7C: 0x639F,\n 0x9D7D: 0x63B5,\n 0x9D7E: 0x636B,\n 0x9D80: 0x6369,\n 0x9D81: 0x63BE,\n 0x9D82: 0x63E9,\n 0x9D83: 0x63C0,\n 0x9D84: 0x63C6,\n 0x9D85: 0x63E3,\n 0x9D86: 0x63C9,\n 0x9D87: 0x63D2,\n 0x9D88: 0x63F6,\n 0x9D89: 0x63C4,\n 0x9D8A: 0x6416,\n 0x9D8B: 0x6434,\n 0x9D8C: 0x6406,\n 0x9D8D: 0x6413,\n 0x9D8E: 0x6426,\n 0x9D8F: 0x6436,\n 0x9D90: 0x651D,\n 0x9D91: 0x6417,\n 0x9D92: 0x6428,\n 0x9D93: 0x640F,\n 0x9D94: 0x6467,\n 0x9D95: 0x646F,\n 0x9D96: 0x6476,\n 0x9D97: 0x644E,\n 0x9D98: 0x652A,\n 0x9D99: 0x6495,\n 0x9D9A: 0x6493,\n 0x9D9B: 0x64A5,\n 0x9D9C: 0x64A9,\n 0x9D9D: 0x6488,\n 0x9D9E: 0x64BC,\n 0x9D9F: 0x64DA,\n 0x9DA0: 0x64D2,\n 0x9DA1: 0x64C5,\n 0x9DA2: 0x64C7,\n 0x9DA3: 0x64BB,\n 0x9DA4: 0x64D8,\n 0x9DA5: 0x64C2,\n 0x9DA6: 0x64F1,\n 0x9DA7: 0x64E7,\n 0x9DA8: 0x8209,\n 0x9DA9: 0x64E0,\n 0x9DAA: 0x64E1,\n 0x9DAB: 0x62AC,\n 0x9DAC: 0x64E3,\n 0x9DAD: 0x64EF,\n 0x9DAE: 0x652C,\n 0x9DAF: 0x64F6,\n 0x9DB0: 0x64F4,\n 0x9DB1: 0x64F2,\n 0x9DB2: 0x64FA,\n 0x9DB3: 0x6500,\n 0x9DB4: 0x64FD,\n 0x9DB5: 0x6518,\n 0x9DB6: 0x651C,\n 0x9DB7: 0x6505,\n 0x9DB8: 0x6524,\n 0x9DB9: 0x6523,\n 0x9DBA: 0x652B,\n 0x9DBB: 0x6534,\n 0x9DBC: 0x6535,\n 0x9DBD: 0x6537,\n 0x9DBE: 0x6536,\n 0x9DBF: 0x6538,\n 0x9DC0: 0x754B,\n 0x9DC1: 0x6548,\n 0x9DC2: 0x6556,\n 0x9DC3: 0x6555,\n 0x9DC4: 0x654D,\n 0x9DC5: 0x6558,\n 0x9DC6: 0x655E,\n 0x9DC7: 0x655D,\n 0x9DC8: 0x6572,\n 0x9DC9: 0x6578,\n 0x9DCA: 0x6582,\n 0x9DCB: 0x6583,\n 0x9DCC: 0x8B8A,\n 0x9DCD: 0x659B,\n 0x9DCE: 0x659F,\n 0x9DCF: 0x65AB,\n 0x9DD0: 0x65B7,\n 0x9DD1: 0x65C3,\n 0x9DD2: 0x65C6,\n 0x9DD3: 0x65C1,\n 0x9DD4: 0x65C4,\n 0x9DD5: 0x65CC,\n 0x9DD6: 0x65D2,\n 0x9DD7: 0x65DB,\n 0x9DD8: 0x65D9,\n 0x9DD9: 0x65E0,\n 0x9DDA: 0x65E1,\n 0x9DDB: 0x65F1,\n 0x9DDC: 0x6772,\n 0x9DDD: 0x660A,\n 0x9DDE: 0x6603,\n 0x9DDF: 0x65FB,\n 0x9DE0: 0x6773,\n 0x9DE1: 0x6635,\n 0x9DE2: 0x6636,\n 0x9DE3: 0x6634,\n 0x9DE4: 0x661C,\n 0x9DE5: 0x664F,\n 0x9DE6: 0x6644,\n 0x9DE7: 0x6649,\n 0x9DE8: 0x6641,\n 0x9DE9: 0x665E,\n 0x9DEA: 0x665D,\n 0x9DEB: 0x6664,\n 0x9DEC: 0x6667,\n 0x9DED: 0x6668,\n 0x9DEE: 0x665F,\n 0x9DEF: 0x6662,\n 0x9DF0: 0x6670,\n 0x9DF1: 0x6683,\n 0x9DF2: 0x6688,\n 0x9DF3: 0x668E,\n 0x9DF4: 0x6689,\n 0x9DF5: 0x6684,\n 0x9DF6: 0x6698,\n 0x9DF7: 0x669D,\n 0x9DF8: 0x66C1,\n 0x9DF9: 0x66B9,\n 0x9DFA: 0x66C9,\n 0x9DFB: 0x66BE,\n 0x9DFC: 0x66BC,\n 0x9E40: 0x66C4,\n 0x9E41: 0x66B8,\n 0x9E42: 0x66D6,\n 0x9E43: 0x66DA,\n 0x9E44: 0x66E0,\n 0x9E45: 0x663F,\n 0x9E46: 0x66E6,\n 0x9E47: 0x66E9,\n 0x9E48: 0x66F0,\n 0x9E49: 0x66F5,\n 0x9E4A: 0x66F7,\n 0x9E4B: 0x670F,\n 0x9E4C: 0x6716,\n 0x9E4D: 0x671E,\n 0x9E4E: 0x6726,\n 0x9E4F: 0x6727,\n 0x9E50: 0x9738,\n 0x9E51: 0x672E,\n 0x9E52: 0x673F,\n 0x9E53: 0x6736,\n 0x9E54: 0x6741,\n 0x9E55: 0x6738,\n 0x9E56: 0x6737,\n 0x9E57: 0x6746,\n 0x9E58: 0x675E,\n 0x9E59: 0x6760,\n 0x9E5A: 0x6759,\n 0x9E5B: 0x6763,\n 0x9E5C: 0x6764,\n 0x9E5D: 0x6789,\n 0x9E5E: 0x6770,\n 0x9E5F: 0x67A9,\n 0x9E60: 0x677C,\n 0x9E61: 0x676A,\n 0x9E62: 0x678C,\n 0x9E63: 0x678B,\n 0x9E64: 0x67A6,\n 0x9E65: 0x67A1,\n 0x9E66: 0x6785,\n 0x9E67: 0x67B7,\n 0x9E68: 0x67EF,\n 0x9E69: 0x67B4,\n 0x9E6A: 0x67EC,\n 0x9E6B: 0x67B3,\n 0x9E6C: 0x67E9,\n 0x9E6D: 0x67B8,\n 0x9E6E: 0x67E4,\n 0x9E6F: 0x67DE,\n 0x9E70: 0x67DD,\n 0x9E71: 0x67E2,\n 0x9E72: 0x67EE,\n 0x9E73: 0x67B9,\n 0x9E74: 0x67CE,\n 0x9E75: 0x67C6,\n 0x9E76: 0x67E7,\n 0x9E77: 0x6A9C,\n 0x9E78: 0x681E,\n 0x9E79: 0x6846,\n 0x9E7A: 0x6829,\n 0x9E7B: 0x6840,\n 0x9E7C: 0x684D,\n 0x9E7D: 0x6832,\n 0x9E7E: 0x684E,\n 0x9E80: 0x68B3,\n 0x9E81: 0x682B,\n 0x9E82: 0x6859,\n 0x9E83: 0x6863,\n 0x9E84: 0x6877,\n 0x9E85: 0x687F,\n 0x9E86: 0x689F,\n 0x9E87: 0x688F,\n 0x9E88: 0x68AD,\n 0x9E89: 0x6894,\n 0x9E8A: 0x689D,\n 0x9E8B: 0x689B,\n 0x9E8C: 0x6883,\n 0x9E8D: 0x6AAE,\n 0x9E8E: 0x68B9,\n 0x9E8F: 0x6874,\n 0x9E90: 0x68B5,\n 0x9E91: 0x68A0,\n 0x9E92: 0x68BA,\n 0x9E93: 0x690F,\n 0x9E94: 0x688D,\n 0x9E95: 0x687E,\n 0x9E96: 0x6901,\n 0x9E97: 0x68CA,\n 0x9E98: 0x6908,\n 0x9E99: 0x68D8,\n 0x9E9A: 0x6922,\n 0x9E9B: 0x6926,\n 0x9E9C: 0x68E1,\n 0x9E9D: 0x690C,\n 0x9E9E: 0x68CD,\n 0x9E9F: 0x68D4,\n 0x9EA0: 0x68E7,\n 0x9EA1: 0x68D5,\n 0x9EA2: 0x6936,\n 0x9EA3: 0x6912,\n 0x9EA4: 0x6904,\n 0x9EA5: 0x68D7,\n 0x9EA6: 0x68E3,\n 0x9EA7: 0x6925,\n 0x9EA8: 0x68F9,\n 0x9EA9: 0x68E0,\n 0x9EAA: 0x68EF,\n 0x9EAB: 0x6928,\n 0x9EAC: 0x692A,\n 0x9EAD: 0x691A,\n 0x9EAE: 0x6923,\n 0x9EAF: 0x6921,\n 0x9EB0: 0x68C6,\n 0x9EB1: 0x6979,\n 0x9EB2: 0x6977,\n 0x9EB3: 0x695C,\n 0x9EB4: 0x6978,\n 0x9EB5: 0x696B,\n 0x9EB6: 0x6954,\n 0x9EB7: 0x697E,\n 0x9EB8: 0x696E,\n 0x9EB9: 0x6939,\n 0x9EBA: 0x6974,\n 0x9EBB: 0x693D,\n 0x9EBC: 0x6959,\n 0x9EBD: 0x6930,\n 0x9EBE: 0x6961,\n 0x9EBF: 0x695E,\n 0x9EC0: 0x695D,\n 0x9EC1: 0x6981,\n 0x9EC2: 0x696A,\n 0x9EC3: 0x69B2,\n 0x9EC4: 0x69AE,\n 0x9EC5: 0x69D0,\n 0x9EC6: 0x69BF,\n 0x9EC7: 0x69C1,\n 0x9EC8: 0x69D3,\n 0x9EC9: 0x69BE,\n 0x9ECA: 0x69CE,\n 0x9ECB: 0x5BE8,\n 0x9ECC: 0x69CA,\n 0x9ECD: 0x69DD,\n 0x9ECE: 0x69BB,\n 0x9ECF: 0x69C3,\n 0x9ED0: 0x69A7,\n 0x9ED1: 0x6A2E,\n 0x9ED2: 0x6991,\n 0x9ED3: 0x69A0,\n 0x9ED4: 0x699C,\n 0x9ED5: 0x6995,\n 0x9ED6: 0x69B4,\n 0x9ED7: 0x69DE,\n 0x9ED8: 0x69E8,\n 0x9ED9: 0x6A02,\n 0x9EDA: 0x6A1B,\n 0x9EDB: 0x69FF,\n 0x9EDC: 0x6B0A,\n 0x9EDD: 0x69F9,\n 0x9EDE: 0x69F2,\n 0x9EDF: 0x69E7,\n 0x9EE0: 0x6A05,\n 0x9EE1: 0x69B1,\n 0x9EE2: 0x6A1E,\n 0x9EE3: 0x69ED,\n 0x9EE4: 0x6A14,\n 0x9EE5: 0x69EB,\n 0x9EE6: 0x6A0A,\n 0x9EE7: 0x6A12,\n 0x9EE8: 0x6AC1,\n 0x9EE9: 0x6A23,\n 0x9EEA: 0x6A13,\n 0x9EEB: 0x6A44,\n 0x9EEC: 0x6A0C,\n 0x9EED: 0x6A72,\n 0x9EEE: 0x6A36,\n 0x9EEF: 0x6A78,\n 0x9EF0: 0x6A47,\n 0x9EF1: 0x6A62,\n 0x9EF2: 0x6A59,\n 0x9EF3: 0x6A66,\n 0x9EF4: 0x6A48,\n 0x9EF5: 0x6A38,\n 0x9EF6: 0x6A22,\n 0x9EF7: 0x6A90,\n 0x9EF8: 0x6A8D,\n 0x9EF9: 0x6AA0,\n 0x9EFA: 0x6A84,\n 0x9EFB: 0x6AA2,\n 0x9EFC: 0x6AA3,\n 0x9F40: 0x6A97,\n 0x9F41: 0x8617,\n 0x9F42: 0x6ABB,\n 0x9F43: 0x6AC3,\n 0x9F44: 0x6AC2,\n 0x9F45: 0x6AB8,\n 0x9F46: 0x6AB3,\n 0x9F47: 0x6AAC,\n 0x9F48: 0x6ADE,\n 0x9F49: 0x6AD1,\n 0x9F4A: 0x6ADF,\n 0x9F4B: 0x6AAA,\n 0x9F4C: 0x6ADA,\n 0x9F4D: 0x6AEA,\n 0x9F4E: 0x6AFB,\n 0x9F4F: 0x6B05,\n 0x9F50: 0x8616,\n 0x9F51: 0x6AFA,\n 0x9F52: 0x6B12,\n 0x9F53: 0x6B16,\n 0x9F54: 0x9B31,\n 0x9F55: 0x6B1F,\n 0x9F56: 0x6B38,\n 0x9F57: 0x6B37,\n 0x9F58: 0x76DC,\n 0x9F59: 0x6B39,\n 0x9F5A: 0x98EE,\n 0x9F5B: 0x6B47,\n 0x9F5C: 0x6B43,\n 0x9F5D: 0x6B49,\n 0x9F5E: 0x6B50,\n 0x9F5F: 0x6B59,\n 0x9F60: 0x6B54,\n 0x9F61: 0x6B5B,\n 0x9F62: 0x6B5F,\n 0x9F63: 0x6B61,\n 0x9F64: 0x6B78,\n 0x9F65: 0x6B79,\n 0x9F66: 0x6B7F,\n 0x9F67: 0x6B80,\n 0x9F68: 0x6B84,\n 0x9F69: 0x6B83,\n 0x9F6A: 0x6B8D,\n 0x9F6B: 0x6B98,\n 0x9F6C: 0x6B95,\n 0x9F6D: 0x6B9E,\n 0x9F6E: 0x6BA4,\n 0x9F6F: 0x6BAA,\n 0x9F70: 0x6BAB,\n 0x9F71: 0x6BAF,\n 0x9F72: 0x6BB2,\n 0x9F73: 0x6BB1,\n 0x9F74: 0x6BB3,\n 0x9F75: 0x6BB7,\n 0x9F76: 0x6BBC,\n 0x9F77: 0x6BC6,\n 0x9F78: 0x6BCB,\n 0x9F79: 0x6BD3,\n 0x9F7A: 0x6BDF,\n 0x9F7B: 0x6BEC,\n 0x9F7C: 0x6BEB,\n 0x9F7D: 0x6BF3,\n 0x9F7E: 0x6BEF,\n 0x9F80: 0x9EBE,\n 0x9F81: 0x6C08,\n 0x9F82: 0x6C13,\n 0x9F83: 0x6C14,\n 0x9F84: 0x6C1B,\n 0x9F85: 0x6C24,\n 0x9F86: 0x6C23,\n 0x9F87: 0x6C5E,\n 0x9F88: 0x6C55,\n 0x9F89: 0x6C62,\n 0x9F8A: 0x6C6A,\n 0x9F8B: 0x6C82,\n 0x9F8C: 0x6C8D,\n 0x9F8D: 0x6C9A,\n 0x9F8E: 0x6C81,\n 0x9F8F: 0x6C9B,\n 0x9F90: 0x6C7E,\n 0x9F91: 0x6C68,\n 0x9F92: 0x6C73,\n 0x9F93: 0x6C92,\n 0x9F94: 0x6C90,\n 0x9F95: 0x6CC4,\n 0x9F96: 0x6CF1,\n 0x9F97: 0x6CD3,\n 0x9F98: 0x6CBD,\n 0x9F99: 0x6CD7,\n 0x9F9A: 0x6CC5,\n 0x9F9B: 0x6CDD,\n 0x9F9C: 0x6CAE,\n 0x9F9D: 0x6CB1,\n 0x9F9E: 0x6CBE,\n 0x9F9F: 0x6CBA,\n 0x9FA0: 0x6CDB,\n 0x9FA1: 0x6CEF,\n 0x9FA2: 0x6CD9,\n 0x9FA3: 0x6CEA,\n 0x9FA4: 0x6D1F,\n 0x9FA5: 0x884D,\n 0x9FA6: 0x6D36,\n 0x9FA7: 0x6D2B,\n 0x9FA8: 0x6D3D,\n 0x9FA9: 0x6D38,\n 0x9FAA: 0x6D19,\n 0x9FAB: 0x6D35,\n 0x9FAC: 0x6D33,\n 0x9FAD: 0x6D12,\n 0x9FAE: 0x6D0C,\n 0x9FAF: 0x6D63,\n 0x9FB0: 0x6D93,\n 0x9FB1: 0x6D64,\n 0x9FB2: 0x6D5A,\n 0x9FB3: 0x6D79,\n 0x9FB4: 0x6D59,\n 0x9FB5: 0x6D8E,\n 0x9FB6: 0x6D95,\n 0x9FB7: 0x6FE4,\n 0x9FB8: 0x6D85,\n 0x9FB9: 0x6DF9,\n 0x9FBA: 0x6E15,\n 0x9FBB: 0x6E0A,\n 0x9FBC: 0x6DB5,\n 0x9FBD: 0x6DC7,\n 0x9FBE: 0x6DE6,\n 0x9FBF: 0x6DB8,\n 0x9FC0: 0x6DC6,\n 0x9FC1: 0x6DEC,\n 0x9FC2: 0x6DDE,\n 0x9FC3: 0x6DCC,\n 0x9FC4: 0x6DE8,\n 0x9FC5: 0x6DD2,\n 0x9FC6: 0x6DC5,\n 0x9FC7: 0x6DFA,\n 0x9FC8: 0x6DD9,\n 0x9FC9: 0x6DE4,\n 0x9FCA: 0x6DD5,\n 0x9FCB: 0x6DEA,\n 0x9FCC: 0x6DEE,\n 0x9FCD: 0x6E2D,\n 0x9FCE: 0x6E6E,\n 0x9FCF: 0x6E2E,\n 0x9FD0: 0x6E19,\n 0x9FD1: 0x6E72,\n 0x9FD2: 0x6E5F,\n 0x9FD3: 0x6E3E,\n 0x9FD4: 0x6E23,\n 0x9FD5: 0x6E6B,\n 0x9FD6: 0x6E2B,\n 0x9FD7: 0x6E76,\n 0x9FD8: 0x6E4D,\n 0x9FD9: 0x6E1F,\n 0x9FDA: 0x6E43,\n 0x9FDB: 0x6E3A,\n 0x9FDC: 0x6E4E,\n 0x9FDD: 0x6E24,\n 0x9FDE: 0x6EFF,\n 0x9FDF: 0x6E1D,\n 0x9FE0: 0x6E38,\n 0x9FE1: 0x6E82,\n 0x9FE2: 0x6EAA,\n 0x9FE3: 0x6E98,\n 0x9FE4: 0x6EC9,\n 0x9FE5: 0x6EB7,\n 0x9FE6: 0x6ED3,\n 0x9FE7: 0x6EBD,\n 0x9FE8: 0x6EAF,\n 0x9FE9: 0x6EC4,\n 0x9FEA: 0x6EB2,\n 0x9FEB: 0x6ED4,\n 0x9FEC: 0x6ED5,\n 0x9FED: 0x6E8F,\n 0x9FEE: 0x6EA5,\n 0x9FEF: 0x6EC2,\n 0x9FF0: 0x6E9F,\n 0x9FF1: 0x6F41,\n 0x9FF2: 0x6F11,\n 0x9FF3: 0x704C,\n 0x9FF4: 0x6EEC,\n 0x9FF5: 0x6EF8,\n 0x9FF6: 0x6EFE,\n 0x9FF7: 0x6F3F,\n 0x9FF8: 0x6EF2,\n 0x9FF9: 0x6F31,\n 0x9FFA: 0x6EEF,\n 0x9FFB: 0x6F32,\n 0x9FFC: 0x6ECC,\n 0xA1: 0xFF61,\n 0xA2: 0xFF62,\n 0xA3: 0xFF63,\n 0xA4: 0xFF64,\n 0xA5: 0xFF65,\n 0xA6: 0xFF66,\n 0xA7: 0xFF67,\n 0xA8: 0xFF68,\n 0xA9: 0xFF69,\n 0xAA: 0xFF6A,\n 0xAB: 0xFF6B,\n 0xAC: 0xFF6C,\n 0xAD: 0xFF6D,\n 0xAE: 0xFF6E,\n 0xAF: 0xFF6F,\n 0xB0: 0xFF70,\n 0xB1: 0xFF71,\n 0xB2: 0xFF72,\n 0xB3: 0xFF73,\n 0xB4: 0xFF74,\n 0xB5: 0xFF75,\n 0xB6: 0xFF76,\n 0xB7: 0xFF77,\n 0xB8: 0xFF78,\n 0xB9: 0xFF79,\n 0xBA: 0xFF7A,\n 0xBB: 0xFF7B,\n 0xBC: 0xFF7C,\n 0xBD: 0xFF7D,\n 0xBE: 0xFF7E,\n 0xBF: 0xFF7F,\n 0xC0: 0xFF80,\n 0xC1: 0xFF81,\n 0xC2: 0xFF82,\n 0xC3: 0xFF83,\n 0xC4: 0xFF84,\n 0xC5: 0xFF85,\n 0xC6: 0xFF86,\n 0xC7: 0xFF87,\n 0xC8: 0xFF88,\n 0xC9: 0xFF89,\n 0xCA: 0xFF8A,\n 0xCB: 0xFF8B,\n 0xCC: 0xFF8C,\n 0xCD: 0xFF8D,\n 0xCE: 0xFF8E,\n 0xCF: 0xFF8F,\n 0xD0: 0xFF90,\n 0xD1: 0xFF91,\n 0xD2: 0xFF92,\n 0xD3: 0xFF93,\n 0xD4: 0xFF94,\n 0xD5: 0xFF95,\n 0xD6: 0xFF96,\n 0xD7: 0xFF97,\n 0xD8: 0xFF98,\n 0xD9: 0xFF99,\n 0xDA: 0xFF9A,\n 0xDB: 0xFF9B,\n 0xDC: 0xFF9C,\n 0xDD: 0xFF9D,\n 0xDE: 0xFF9E,\n 0xDF: 0xFF9F,\n 0xE040: 0x6F3E,\n 0xE041: 0x6F13,\n 0xE042: 0x6EF7,\n 0xE043: 0x6F86,\n 0xE044: 0x6F7A,\n 0xE045: 0x6F78,\n 0xE046: 0x6F81,\n 0xE047: 0x6F80,\n 0xE048: 0x6F6F,\n 0xE049: 0x6F5B,\n 0xE04A: 0x6FF3,\n 0xE04B: 0x6F6D,\n 0xE04C: 0x6F82,\n 0xE04D: 0x6F7C,\n 0xE04E: 0x6F58,\n 0xE04F: 0x6F8E,\n 0xE050: 0x6F91,\n 0xE051: 0x6FC2,\n 0xE052: 0x6F66,\n 0xE053: 0x6FB3,\n 0xE054: 0x6FA3,\n 0xE055: 0x6FA1,\n 0xE056: 0x6FA4,\n 0xE057: 0x6FB9,\n 0xE058: 0x6FC6,\n 0xE059: 0x6FAA,\n 0xE05A: 0x6FDF,\n 0xE05B: 0x6FD5,\n 0xE05C: 0x6FEC,\n 0xE05D: 0x6FD4,\n 0xE05E: 0x6FD8,\n 0xE05F: 0x6FF1,\n 0xE060: 0x6FEE,\n 0xE061: 0x6FDB,\n 0xE062: 0x7009,\n 0xE063: 0x700B,\n 0xE064: 0x6FFA,\n 0xE065: 0x7011,\n 0xE066: 0x7001,\n 0xE067: 0x700F,\n 0xE068: 0x6FFE,\n 0xE069: 0x701B,\n 0xE06A: 0x701A,\n 0xE06B: 0x6F74,\n 0xE06C: 0x701D,\n 0xE06D: 0x7018,\n 0xE06E: 0x701F,\n 0xE06F: 0x7030,\n 0xE070: 0x703E,\n 0xE071: 0x7032,\n 0xE072: 0x7051,\n 0xE073: 0x7063,\n 0xE074: 0x7099,\n 0xE075: 0x7092,\n 0xE076: 0x70AF,\n 0xE077: 0x70F1,\n 0xE078: 0x70AC,\n 0xE079: 0x70B8,\n 0xE07A: 0x70B3,\n 0xE07B: 0x70AE,\n 0xE07C: 0x70DF,\n 0xE07D: 0x70CB,\n 0xE07E: 0x70DD,\n 0xE080: 0x70D9,\n 0xE081: 0x7109,\n 0xE082: 0x70FD,\n 0xE083: 0x711C,\n 0xE084: 0x7119,\n 0xE085: 0x7165,\n 0xE086: 0x7155,\n 0xE087: 0x7188,\n 0xE088: 0x7166,\n 0xE089: 0x7162,\n 0xE08A: 0x714C,\n 0xE08B: 0x7156,\n 0xE08C: 0x716C,\n 0xE08D: 0x718F,\n 0xE08E: 0x71FB,\n 0xE08F: 0x7184,\n 0xE090: 0x7195,\n 0xE091: 0x71A8,\n 0xE092: 0x71AC,\n 0xE093: 0x71D7,\n 0xE094: 0x71B9,\n 0xE095: 0x71BE,\n 0xE096: 0x71D2,\n 0xE097: 0x71C9,\n 0xE098: 0x71D4,\n 0xE099: 0x71CE,\n 0xE09A: 0x71E0,\n 0xE09B: 0x71EC,\n 0xE09C: 0x71E7,\n 0xE09D: 0x71F5,\n 0xE09E: 0x71FC,\n 0xE09F: 0x71F9,\n 0xE0A0: 0x71FF,\n 0xE0A1: 0x720D,\n 0xE0A2: 0x7210,\n 0xE0A3: 0x721B,\n 0xE0A4: 0x7228,\n 0xE0A5: 0x722D,\n 0xE0A6: 0x722C,\n 0xE0A7: 0x7230,\n 0xE0A8: 0x7232,\n 0xE0A9: 0x723B,\n 0xE0AA: 0x723C,\n 0xE0AB: 0x723F,\n 0xE0AC: 0x7240,\n 0xE0AD: 0x7246,\n 0xE0AE: 0x724B,\n 0xE0AF: 0x7258,\n 0xE0B0: 0x7274,\n 0xE0B1: 0x727E,\n 0xE0B2: 0x7282,\n 0xE0B3: 0x7281,\n 0xE0B4: 0x7287,\n 0xE0B5: 0x7292,\n 0xE0B6: 0x7296,\n 0xE0B7: 0x72A2,\n 0xE0B8: 0x72A7,\n 0xE0B9: 0x72B9,\n 0xE0BA: 0x72B2,\n 0xE0BB: 0x72C3,\n 0xE0BC: 0x72C6,\n 0xE0BD: 0x72C4,\n 0xE0BE: 0x72CE,\n 0xE0BF: 0x72D2,\n 0xE0C0: 0x72E2,\n 0xE0C1: 0x72E0,\n 0xE0C2: 0x72E1,\n 0xE0C3: 0x72F9,\n 0xE0C4: 0x72F7,\n 0xE0C5: 0x500F,\n 0xE0C6: 0x7317,\n 0xE0C7: 0x730A,\n 0xE0C8: 0x731C,\n 0xE0C9: 0x7316,\n 0xE0CA: 0x731D,\n 0xE0CB: 0x7334,\n 0xE0CC: 0x732F,\n 0xE0CD: 0x7329,\n 0xE0CE: 0x7325,\n 0xE0CF: 0x733E,\n 0xE0D0: 0x734E,\n 0xE0D1: 0x734F,\n 0xE0D2: 0x9ED8,\n 0xE0D3: 0x7357,\n 0xE0D4: 0x736A,\n 0xE0D5: 0x7368,\n 0xE0D6: 0x7370,\n 0xE0D7: 0x7378,\n 0xE0D8: 0x7375,\n 0xE0D9: 0x737B,\n 0xE0DA: 0x737A,\n 0xE0DB: 0x73C8,\n 0xE0DC: 0x73B3,\n 0xE0DD: 0x73CE,\n 0xE0DE: 0x73BB,\n 0xE0DF: 0x73C0,\n 0xE0E0: 0x73E5,\n 0xE0E1: 0x73EE,\n 0xE0E2: 0x73DE,\n 0xE0E3: 0x74A2,\n 0xE0E4: 0x7405,\n 0xE0E5: 0x746F,\n 0xE0E6: 0x7425,\n 0xE0E7: 0x73F8,\n 0xE0E8: 0x7432,\n 0xE0E9: 0x743A,\n 0xE0EA: 0x7455,\n 0xE0EB: 0x743F,\n 0xE0EC: 0x745F,\n 0xE0ED: 0x7459,\n 0xE0EE: 0x7441,\n 0xE0EF: 0x745C,\n 0xE0F0: 0x7469,\n 0xE0F1: 0x7470,\n 0xE0F2: 0x7463,\n 0xE0F3: 0x746A,\n 0xE0F4: 0x7476,\n 0xE0F5: 0x747E,\n 0xE0F6: 0x748B,\n 0xE0F7: 0x749E,\n 0xE0F8: 0x74A7,\n 0xE0F9: 0x74CA,\n 0xE0FA: 0x74CF,\n 0xE0FB: 0x74D4,\n 0xE0FC: 0x73F1,\n 0xE140: 0x74E0,\n 0xE141: 0x74E3,\n 0xE142: 0x74E7,\n 0xE143: 0x74E9,\n 0xE144: 0x74EE,\n 0xE145: 0x74F2,\n 0xE146: 0x74F0,\n 0xE147: 0x74F1,\n 0xE148: 0x74F8,\n 0xE149: 0x74F7,\n 0xE14A: 0x7504,\n 0xE14B: 0x7503,\n 0xE14C: 0x7505,\n 0xE14D: 0x750C,\n 0xE14E: 0x750E,\n 0xE14F: 0x750D,\n 0xE150: 0x7515,\n 0xE151: 0x7513,\n 0xE152: 0x751E,\n 0xE153: 0x7526,\n 0xE154: 0x752C,\n 0xE155: 0x753C,\n 0xE156: 0x7544,\n 0xE157: 0x754D,\n 0xE158: 0x754A,\n 0xE159: 0x7549,\n 0xE15A: 0x755B,\n 0xE15B: 0x7546,\n 0xE15C: 0x755A,\n 0xE15D: 0x7569,\n 0xE15E: 0x7564,\n 0xE15F: 0x7567,\n 0xE160: 0x756B,\n 0xE161: 0x756D,\n 0xE162: 0x7578,\n 0xE163: 0x7576,\n 0xE164: 0x7586,\n 0xE165: 0x7587,\n 0xE166: 0x7574,\n 0xE167: 0x758A,\n 0xE168: 0x7589,\n 0xE169: 0x7582,\n 0xE16A: 0x7594,\n 0xE16B: 0x759A,\n 0xE16C: 0x759D,\n 0xE16D: 0x75A5,\n 0xE16E: 0x75A3,\n 0xE16F: 0x75C2,\n 0xE170: 0x75B3,\n 0xE171: 0x75C3,\n 0xE172: 0x75B5,\n 0xE173: 0x75BD,\n 0xE174: 0x75B8,\n 0xE175: 0x75BC,\n 0xE176: 0x75B1,\n 0xE177: 0x75CD,\n 0xE178: 0x75CA,\n 0xE179: 0x75D2,\n 0xE17A: 0x75D9,\n 0xE17B: 0x75E3,\n 0xE17C: 0x75DE,\n 0xE17D: 0x75FE,\n 0xE17E: 0x75FF,\n 0xE180: 0x75FC,\n 0xE181: 0x7601,\n 0xE182: 0x75F0,\n 0xE183: 0x75FA,\n 0xE184: 0x75F2,\n 0xE185: 0x75F3,\n 0xE186: 0x760B,\n 0xE187: 0x760D,\n 0xE188: 0x7609,\n 0xE189: 0x761F,\n 0xE18A: 0x7627,\n 0xE18B: 0x7620,\n 0xE18C: 0x7621,\n 0xE18D: 0x7622,\n 0xE18E: 0x7624,\n 0xE18F: 0x7634,\n 0xE190: 0x7630,\n 0xE191: 0x763B,\n 0xE192: 0x7647,\n 0xE193: 0x7648,\n 0xE194: 0x7646,\n 0xE195: 0x765C,\n 0xE196: 0x7658,\n 0xE197: 0x7661,\n 0xE198: 0x7662,\n 0xE199: 0x7668,\n 0xE19A: 0x7669,\n 0xE19B: 0x766A,\n 0xE19C: 0x7667,\n 0xE19D: 0x766C,\n 0xE19E: 0x7670,\n 0xE19F: 0x7672,\n 0xE1A0: 0x7676,\n 0xE1A1: 0x7678,\n 0xE1A2: 0x767C,\n 0xE1A3: 0x7680,\n 0xE1A4: 0x7683,\n 0xE1A5: 0x7688,\n 0xE1A6: 0x768B,\n 0xE1A7: 0x768E,\n 0xE1A8: 0x7696,\n 0xE1A9: 0x7693,\n 0xE1AA: 0x7699,\n 0xE1AB: 0x769A,\n 0xE1AC: 0x76B0,\n 0xE1AD: 0x76B4,\n 0xE1AE: 0x76B8,\n 0xE1AF: 0x76B9,\n 0xE1B0: 0x76BA,\n 0xE1B1: 0x76C2,\n 0xE1B2: 0x76CD,\n 0xE1B3: 0x76D6,\n 0xE1B4: 0x76D2,\n 0xE1B5: 0x76DE,\n 0xE1B6: 0x76E1,\n 0xE1B7: 0x76E5,\n 0xE1B8: 0x76E7,\n 0xE1B9: 0x76EA,\n 0xE1BA: 0x862F,\n 0xE1BB: 0x76FB,\n 0xE1BC: 0x7708,\n 0xE1BD: 0x7707,\n 0xE1BE: 0x7704,\n 0xE1BF: 0x7729,\n 0xE1C0: 0x7724,\n 0xE1C1: 0x771E,\n 0xE1C2: 0x7725,\n 0xE1C3: 0x7726,\n 0xE1C4: 0x771B,\n 0xE1C5: 0x7737,\n 0xE1C6: 0x7738,\n 0xE1C7: 0x7747,\n 0xE1C8: 0x775A,\n 0xE1C9: 0x7768,\n 0xE1CA: 0x776B,\n 0xE1CB: 0x775B,\n 0xE1CC: 0x7765,\n 0xE1CD: 0x777F,\n 0xE1CE: 0x777E,\n 0xE1CF: 0x7779,\n 0xE1D0: 0x778E,\n 0xE1D1: 0x778B,\n 0xE1D2: 0x7791,\n 0xE1D3: 0x77A0,\n 0xE1D4: 0x779E,\n 0xE1D5: 0x77B0,\n 0xE1D6: 0x77B6,\n 0xE1D7: 0x77B9,\n 0xE1D8: 0x77BF,\n 0xE1D9: 0x77BC,\n 0xE1DA: 0x77BD,\n 0xE1DB: 0x77BB,\n 0xE1DC: 0x77C7,\n 0xE1DD: 0x77CD,\n 0xE1DE: 0x77D7,\n 0xE1DF: 0x77DA,\n 0xE1E0: 0x77DC,\n 0xE1E1: 0x77E3,\n 0xE1E2: 0x77EE,\n 0xE1E3: 0x77FC,\n 0xE1E4: 0x780C,\n 0xE1E5: 0x7812,\n 0xE1E6: 0x7926,\n 0xE1E7: 0x7820,\n 0xE1E8: 0x792A,\n 0xE1E9: 0x7845,\n 0xE1EA: 0x788E,\n 0xE1EB: 0x7874,\n 0xE1EC: 0x7886,\n 0xE1ED: 0x787C,\n 0xE1EE: 0x789A,\n 0xE1EF: 0x788C,\n 0xE1F0: 0x78A3,\n 0xE1F1: 0x78B5,\n 0xE1F2: 0x78AA,\n 0xE1F3: 0x78AF,\n 0xE1F4: 0x78D1,\n 0xE1F5: 0x78C6,\n 0xE1F6: 0x78CB,\n 0xE1F7: 0x78D4,\n 0xE1F8: 0x78BE,\n 0xE1F9: 0x78BC,\n 0xE1FA: 0x78C5,\n 0xE1FB: 0x78CA,\n 0xE1FC: 0x78EC,\n 0xE240: 0x78E7,\n 0xE241: 0x78DA,\n 0xE242: 0x78FD,\n 0xE243: 0x78F4,\n 0xE244: 0x7907,\n 0xE245: 0x7912,\n 0xE246: 0x7911,\n 0xE247: 0x7919,\n 0xE248: 0x792C,\n 0xE249: 0x792B,\n 0xE24A: 0x7940,\n 0xE24B: 0x7960,\n 0xE24C: 0x7957,\n 0xE24D: 0x795F,\n 0xE24E: 0x795A,\n 0xE24F: 0x7955,\n 0xE250: 0x7953,\n 0xE251: 0x797A,\n 0xE252: 0x797F,\n 0xE253: 0x798A,\n 0xE254: 0x799D,\n 0xE255: 0x79A7,\n 0xE256: 0x9F4B,\n 0xE257: 0x79AA,\n 0xE258: 0x79AE,\n 0xE259: 0x79B3,\n 0xE25A: 0x79B9,\n 0xE25B: 0x79BA,\n 0xE25C: 0x79C9,\n 0xE25D: 0x79D5,\n 0xE25E: 0x79E7,\n 0xE25F: 0x79EC,\n 0xE260: 0x79E1,\n 0xE261: 0x79E3,\n 0xE262: 0x7A08,\n 0xE263: 0x7A0D,\n 0xE264: 0x7A18,\n 0xE265: 0x7A19,\n 0xE266: 0x7A20,\n 0xE267: 0x7A1F,\n 0xE268: 0x7980,\n 0xE269: 0x7A31,\n 0xE26A: 0x7A3B,\n 0xE26B: 0x7A3E,\n 0xE26C: 0x7A37,\n 0xE26D: 0x7A43,\n 0xE26E: 0x7A57,\n 0xE26F: 0x7A49,\n 0xE270: 0x7A61,\n 0xE271: 0x7A62,\n 0xE272: 0x7A69,\n 0xE273: 0x9F9D,\n 0xE274: 0x7A70,\n 0xE275: 0x7A79,\n 0xE276: 0x7A7D,\n 0xE277: 0x7A88,\n 0xE278: 0x7A97,\n 0xE279: 0x7A95,\n 0xE27A: 0x7A98,\n 0xE27B: 0x7A96,\n 0xE27C: 0x7AA9,\n 0xE27D: 0x7AC8,\n 0xE27E: 0x7AB0,\n 0xE280: 0x7AB6,\n 0xE281: 0x7AC5,\n 0xE282: 0x7AC4,\n 0xE283: 0x7ABF,\n 0xE284: 0x9083,\n 0xE285: 0x7AC7,\n 0xE286: 0x7ACA,\n 0xE287: 0x7ACD,\n 0xE288: 0x7ACF,\n 0xE289: 0x7AD5,\n 0xE28A: 0x7AD3,\n 0xE28B: 0x7AD9,\n 0xE28C: 0x7ADA,\n 0xE28D: 0x7ADD,\n 0xE28E: 0x7AE1,\n 0xE28F: 0x7AE2,\n 0xE290: 0x7AE6,\n 0xE291: 0x7AED,\n 0xE292: 0x7AF0,\n 0xE293: 0x7B02,\n 0xE294: 0x7B0F,\n 0xE295: 0x7B0A,\n 0xE296: 0x7B06,\n 0xE297: 0x7B33,\n 0xE298: 0x7B18,\n 0xE299: 0x7B19,\n 0xE29A: 0x7B1E,\n 0xE29B: 0x7B35,\n 0xE29C: 0x7B28,\n 0xE29D: 0x7B36,\n 0xE29E: 0x7B50,\n 0xE29F: 0x7B7A,\n 0xE2A0: 0x7B04,\n 0xE2A1: 0x7B4D,\n 0xE2A2: 0x7B0B,\n 0xE2A3: 0x7B4C,\n 0xE2A4: 0x7B45,\n 0xE2A5: 0x7B75,\n 0xE2A6: 0x7B65,\n 0xE2A7: 0x7B74,\n 0xE2A8: 0x7B67,\n 0xE2A9: 0x7B70,\n 0xE2AA: 0x7B71,\n 0xE2AB: 0x7B6C,\n 0xE2AC: 0x7B6E,\n 0xE2AD: 0x7B9D,\n 0xE2AE: 0x7B98,\n 0xE2AF: 0x7B9F,\n 0xE2B0: 0x7B8D,\n 0xE2B1: 0x7B9C,\n 0xE2B2: 0x7B9A,\n 0xE2B3: 0x7B8B,\n 0xE2B4: 0x7B92,\n 0xE2B5: 0x7B8F,\n 0xE2B6: 0x7B5D,\n 0xE2B7: 0x7B99,\n 0xE2B8: 0x7BCB,\n 0xE2B9: 0x7BC1,\n 0xE2BA: 0x7BCC,\n 0xE2BB: 0x7BCF,\n 0xE2BC: 0x7BB4,\n 0xE2BD: 0x7BC6,\n 0xE2BE: 0x7BDD,\n 0xE2BF: 0x7BE9,\n 0xE2C0: 0x7C11,\n 0xE2C1: 0x7C14,\n 0xE2C2: 0x7BE6,\n 0xE2C3: 0x7BE5,\n 0xE2C4: 0x7C60,\n 0xE2C5: 0x7C00,\n 0xE2C6: 0x7C07,\n 0xE2C7: 0x7C13,\n 0xE2C8: 0x7BF3,\n 0xE2C9: 0x7BF7,\n 0xE2CA: 0x7C17,\n 0xE2CB: 0x7C0D,\n 0xE2CC: 0x7BF6,\n 0xE2CD: 0x7C23,\n 0xE2CE: 0x7C27,\n 0xE2CF: 0x7C2A,\n 0xE2D0: 0x7C1F,\n 0xE2D1: 0x7C37,\n 0xE2D2: 0x7C2B,\n 0xE2D3: 0x7C3D,\n 0xE2D4: 0x7C4C,\n 0xE2D5: 0x7C43,\n 0xE2D6: 0x7C54,\n 0xE2D7: 0x7C4F,\n 0xE2D8: 0x7C40,\n 0xE2D9: 0x7C50,\n 0xE2DA: 0x7C58,\n 0xE2DB: 0x7C5F,\n 0xE2DC: 0x7C64,\n 0xE2DD: 0x7C56,\n 0xE2DE: 0x7C65,\n 0xE2DF: 0x7C6C,\n 0xE2E0: 0x7C75,\n 0xE2E1: 0x7C83,\n 0xE2E2: 0x7C90,\n 0xE2E3: 0x7CA4,\n 0xE2E4: 0x7CAD,\n 0xE2E5: 0x7CA2,\n 0xE2E6: 0x7CAB,\n 0xE2E7: 0x7CA1,\n 0xE2E8: 0x7CA8,\n 0xE2E9: 0x7CB3,\n 0xE2EA: 0x7CB2,\n 0xE2EB: 0x7CB1,\n 0xE2EC: 0x7CAE,\n 0xE2ED: 0x7CB9,\n 0xE2EE: 0x7CBD,\n 0xE2EF: 0x7CC0,\n 0xE2F0: 0x7CC5,\n 0xE2F1: 0x7CC2,\n 0xE2F2: 0x7CD8,\n 0xE2F3: 0x7CD2,\n 0xE2F4: 0x7CDC,\n 0xE2F5: 0x7CE2,\n 0xE2F6: 0x9B3B,\n 0xE2F7: 0x7CEF,\n 0xE2F8: 0x7CF2,\n 0xE2F9: 0x7CF4,\n 0xE2FA: 0x7CF6,\n 0xE2FB: 0x7CFA,\n 0xE2FC: 0x7D06,\n 0xE340: 0x7D02,\n 0xE341: 0x7D1C,\n 0xE342: 0x7D15,\n 0xE343: 0x7D0A,\n 0xE344: 0x7D45,\n 0xE345: 0x7D4B,\n 0xE346: 0x7D2E,\n 0xE347: 0x7D32,\n 0xE348: 0x7D3F,\n 0xE349: 0x7D35,\n 0xE34A: 0x7D46,\n 0xE34B: 0x7D73,\n 0xE34C: 0x7D56,\n 0xE34D: 0x7D4E,\n 0xE34E: 0x7D72,\n 0xE34F: 0x7D68,\n 0xE350: 0x7D6E,\n 0xE351: 0x7D4F,\n 0xE352: 0x7D63,\n 0xE353: 0x7D93,\n 0xE354: 0x7D89,\n 0xE355: 0x7D5B,\n 0xE356: 0x7D8F,\n 0xE357: 0x7D7D,\n 0xE358: 0x7D9B,\n 0xE359: 0x7DBA,\n 0xE35A: 0x7DAE,\n 0xE35B: 0x7DA3,\n 0xE35C: 0x7DB5,\n 0xE35D: 0x7DC7,\n 0xE35E: 0x7DBD,\n 0xE35F: 0x7DAB,\n 0xE360: 0x7E3D,\n 0xE361: 0x7DA2,\n 0xE362: 0x7DAF,\n 0xE363: 0x7DDC,\n 0xE364: 0x7DB8,\n 0xE365: 0x7D9F,\n 0xE366: 0x7DB0,\n 0xE367: 0x7DD8,\n 0xE368: 0x7DDD,\n 0xE369: 0x7DE4,\n 0xE36A: 0x7DDE,\n 0xE36B: 0x7DFB,\n 0xE36C: 0x7DF2,\n 0xE36D: 0x7DE1,\n 0xE36E: 0x7E05,\n 0xE36F: 0x7E0A,\n 0xE370: 0x7E23,\n 0xE371: 0x7E21,\n 0xE372: 0x7E12,\n 0xE373: 0x7E31,\n 0xE374: 0x7E1F,\n 0xE375: 0x7E09,\n 0xE376: 0x7E0B,\n 0xE377: 0x7E22,\n 0xE378: 0x7E46,\n 0xE379: 0x7E66,\n 0xE37A: 0x7E3B,\n 0xE37B: 0x7E35,\n 0xE37C: 0x7E39,\n 0xE37D: 0x7E43,\n 0xE37E: 0x7E37,\n 0xE380: 0x7E32,\n 0xE381: 0x7E3A,\n 0xE382: 0x7E67,\n 0xE383: 0x7E5D,\n 0xE384: 0x7E56,\n 0xE385: 0x7E5E,\n 0xE386: 0x7E59,\n 0xE387: 0x7E5A,\n 0xE388: 0x7E79,\n 0xE389: 0x7E6A,\n 0xE38A: 0x7E69,\n 0xE38B: 0x7E7C,\n 0xE38C: 0x7E7B,\n 0xE38D: 0x7E83,\n 0xE38E: 0x7DD5,\n 0xE38F: 0x7E7D,\n 0xE390: 0x8FAE,\n 0xE391: 0x7E7F,\n 0xE392: 0x7E88,\n 0xE393: 0x7E89,\n 0xE394: 0x7E8C,\n 0xE395: 0x7E92,\n 0xE396: 0x7E90,\n 0xE397: 0x7E93,\n 0xE398: 0x7E94,\n 0xE399: 0x7E96,\n 0xE39A: 0x7E8E,\n 0xE39B: 0x7E9B,\n 0xE39C: 0x7E9C,\n 0xE39D: 0x7F38,\n 0xE39E: 0x7F3A,\n 0xE39F: 0x7F45,\n 0xE3A0: 0x7F4C,\n 0xE3A1: 0x7F4D,\n 0xE3A2: 0x7F4E,\n 0xE3A3: 0x7F50,\n 0xE3A4: 0x7F51,\n 0xE3A5: 0x7F55,\n 0xE3A6: 0x7F54,\n 0xE3A7: 0x7F58,\n 0xE3A8: 0x7F5F,\n 0xE3A9: 0x7F60,\n 0xE3AA: 0x7F68,\n 0xE3AB: 0x7F69,\n 0xE3AC: 0x7F67,\n 0xE3AD: 0x7F78,\n 0xE3AE: 0x7F82,\n 0xE3AF: 0x7F86,\n 0xE3B0: 0x7F83,\n 0xE3B1: 0x7F88,\n 0xE3B2: 0x7F87,\n 0xE3B3: 0x7F8C,\n 0xE3B4: 0x7F94,\n 0xE3B5: 0x7F9E,\n 0xE3B6: 0x7F9D,\n 0xE3B7: 0x7F9A,\n 0xE3B8: 0x7FA3,\n 0xE3B9: 0x7FAF,\n 0xE3BA: 0x7FB2,\n 0xE3BB: 0x7FB9,\n 0xE3BC: 0x7FAE,\n 0xE3BD: 0x7FB6,\n 0xE3BE: 0x7FB8,\n 0xE3BF: 0x8B71,\n 0xE3C0: 0x7FC5,\n 0xE3C1: 0x7FC6,\n 0xE3C2: 0x7FCA,\n 0xE3C3: 0x7FD5,\n 0xE3C4: 0x7FD4,\n 0xE3C5: 0x7FE1,\n 0xE3C6: 0x7FE6,\n 0xE3C7: 0x7FE9,\n 0xE3C8: 0x7FF3,\n 0xE3C9: 0x7FF9,\n 0xE3CA: 0x98DC,\n 0xE3CB: 0x8006,\n 0xE3CC: 0x8004,\n 0xE3CD: 0x800B,\n 0xE3CE: 0x8012,\n 0xE3CF: 0x8018,\n 0xE3D0: 0x8019,\n 0xE3D1: 0x801C,\n 0xE3D2: 0x8021,\n 0xE3D3: 0x8028,\n 0xE3D4: 0x803F,\n 0xE3D5: 0x803B,\n 0xE3D6: 0x804A,\n 0xE3D7: 0x8046,\n 0xE3D8: 0x8052,\n 0xE3D9: 0x8058,\n 0xE3DA: 0x805A,\n 0xE3DB: 0x805F,\n 0xE3DC: 0x8062,\n 0xE3DD: 0x8068,\n 0xE3DE: 0x8073,\n 0xE3DF: 0x8072,\n 0xE3E0: 0x8070,\n 0xE3E1: 0x8076,\n 0xE3E2: 0x8079,\n 0xE3E3: 0x807D,\n 0xE3E4: 0x807F,\n 0xE3E5: 0x8084,\n 0xE3E6: 0x8086,\n 0xE3E7: 0x8085,\n 0xE3E8: 0x809B,\n 0xE3E9: 0x8093,\n 0xE3EA: 0x809A,\n 0xE3EB: 0x80AD,\n 0xE3EC: 0x5190,\n 0xE3ED: 0x80AC,\n 0xE3EE: 0x80DB,\n 0xE3EF: 0x80E5,\n 0xE3F0: 0x80D9,\n 0xE3F1: 0x80DD,\n 0xE3F2: 0x80C4,\n 0xE3F3: 0x80DA,\n 0xE3F4: 0x80D6,\n 0xE3F5: 0x8109,\n 0xE3F6: 0x80EF,\n 0xE3F7: 0x80F1,\n 0xE3F8: 0x811B,\n 0xE3F9: 0x8129,\n 0xE3FA: 0x8123,\n 0xE3FB: 0x812F,\n 0xE3FC: 0x814B,\n 0xE440: 0x968B,\n 0xE441: 0x8146,\n 0xE442: 0x813E,\n 0xE443: 0x8153,\n 0xE444: 0x8151,\n 0xE445: 0x80FC,\n 0xE446: 0x8171,\n 0xE447: 0x816E,\n 0xE448: 0x8165,\n 0xE449: 0x8166,\n 0xE44A: 0x8174,\n 0xE44B: 0x8183,\n 0xE44C: 0x8188,\n 0xE44D: 0x818A,\n 0xE44E: 0x8180,\n 0xE44F: 0x8182,\n 0xE450: 0x81A0,\n 0xE451: 0x8195,\n 0xE452: 0x81A4,\n 0xE453: 0x81A3,\n 0xE454: 0x815F,\n 0xE455: 0x8193,\n 0xE456: 0x81A9,\n 0xE457: 0x81B0,\n 0xE458: 0x81B5,\n 0xE459: 0x81BE,\n 0xE45A: 0x81B8,\n 0xE45B: 0x81BD,\n 0xE45C: 0x81C0,\n 0xE45D: 0x81C2,\n 0xE45E: 0x81BA,\n 0xE45F: 0x81C9,\n 0xE460: 0x81CD,\n 0xE461: 0x81D1,\n 0xE462: 0x81D9,\n 0xE463: 0x81D8,\n 0xE464: 0x81C8,\n 0xE465: 0x81DA,\n 0xE466: 0x81DF,\n 0xE467: 0x81E0,\n 0xE468: 0x81E7,\n 0xE469: 0x81FA,\n 0xE46A: 0x81FB,\n 0xE46B: 0x81FE,\n 0xE46C: 0x8201,\n 0xE46D: 0x8202,\n 0xE46E: 0x8205,\n 0xE46F: 0x8207,\n 0xE470: 0x820A,\n 0xE471: 0x820D,\n 0xE472: 0x8210,\n 0xE473: 0x8216,\n 0xE474: 0x8229,\n 0xE475: 0x822B,\n 0xE476: 0x8238,\n 0xE477: 0x8233,\n 0xE478: 0x8240,\n 0xE479: 0x8259,\n 0xE47A: 0x8258,\n 0xE47B: 0x825D,\n 0xE47C: 0x825A,\n 0xE47D: 0x825F,\n 0xE47E: 0x8264,\n 0xE480: 0x8262,\n 0xE481: 0x8268,\n 0xE482: 0x826A,\n 0xE483: 0x826B,\n 0xE484: 0x822E,\n 0xE485: 0x8271,\n 0xE486: 0x8277,\n 0xE487: 0x8278,\n 0xE488: 0x827E,\n 0xE489: 0x828D,\n 0xE48A: 0x8292,\n 0xE48B: 0x82AB,\n 0xE48C: 0x829F,\n 0xE48D: 0x82BB,\n 0xE48E: 0x82AC,\n 0xE48F: 0x82E1,\n 0xE490: 0x82E3,\n 0xE491: 0x82DF,\n 0xE492: 0x82D2,\n 0xE493: 0x82F4,\n 0xE494: 0x82F3,\n 0xE495: 0x82FA,\n 0xE496: 0x8393,\n 0xE497: 0x8303,\n 0xE498: 0x82FB,\n 0xE499: 0x82F9,\n 0xE49A: 0x82DE,\n 0xE49B: 0x8306,\n 0xE49C: 0x82DC,\n 0xE49D: 0x8309,\n 0xE49E: 0x82D9,\n 0xE49F: 0x8335,\n 0xE4A0: 0x8334,\n 0xE4A1: 0x8316,\n 0xE4A2: 0x8332,\n 0xE4A3: 0x8331,\n 0xE4A4: 0x8340,\n 0xE4A5: 0x8339,\n 0xE4A6: 0x8350,\n 0xE4A7: 0x8345,\n 0xE4A8: 0x832F,\n 0xE4A9: 0x832B,\n 0xE4AA: 0x8317,\n 0xE4AB: 0x8318,\n 0xE4AC: 0x8385,\n 0xE4AD: 0x839A,\n 0xE4AE: 0x83AA,\n 0xE4AF: 0x839F,\n 0xE4B0: 0x83A2,\n 0xE4B1: 0x8396,\n 0xE4B2: 0x8323,\n 0xE4B3: 0x838E,\n 0xE4B4: 0x8387,\n 0xE4B5: 0x838A,\n 0xE4B6: 0x837C,\n 0xE4B7: 0x83B5,\n 0xE4B8: 0x8373,\n 0xE4B9: 0x8375,\n 0xE4BA: 0x83A0,\n 0xE4BB: 0x8389,\n 0xE4BC: 0x83A8,\n 0xE4BD: 0x83F4,\n 0xE4BE: 0x8413,\n 0xE4BF: 0x83EB,\n 0xE4C0: 0x83CE,\n 0xE4C1: 0x83FD,\n 0xE4C2: 0x8403,\n 0xE4C3: 0x83D8,\n 0xE4C4: 0x840B,\n 0xE4C5: 0x83C1,\n 0xE4C6: 0x83F7,\n 0xE4C7: 0x8407,\n 0xE4C8: 0x83E0,\n 0xE4C9: 0x83F2,\n 0xE4CA: 0x840D,\n 0xE4CB: 0x8422,\n 0xE4CC: 0x8420,\n 0xE4CD: 0x83BD,\n 0xE4CE: 0x8438,\n 0xE4CF: 0x8506,\n 0xE4D0: 0x83FB,\n 0xE4D1: 0x846D,\n 0xE4D2: 0x842A,\n 0xE4D3: 0x843C,\n 0xE4D4: 0x855A,\n 0xE4D5: 0x8484,\n 0xE4D6: 0x8477,\n 0xE4D7: 0x846B,\n 0xE4D8: 0x84AD,\n 0xE4D9: 0x846E,\n 0xE4DA: 0x8482,\n 0xE4DB: 0x8469,\n 0xE4DC: 0x8446,\n 0xE4DD: 0x842C,\n 0xE4DE: 0x846F,\n 0xE4DF: 0x8479,\n 0xE4E0: 0x8435,\n 0xE4E1: 0x84CA,\n 0xE4E2: 0x8462,\n 0xE4E3: 0x84B9,\n 0xE4E4: 0x84BF,\n 0xE4E5: 0x849F,\n 0xE4E6: 0x84D9,\n 0xE4E7: 0x84CD,\n 0xE4E8: 0x84BB,\n 0xE4E9: 0x84DA,\n 0xE4EA: 0x84D0,\n 0xE4EB: 0x84C1,\n 0xE4EC: 0x84C6,\n 0xE4ED: 0x84D6,\n 0xE4EE: 0x84A1,\n 0xE4EF: 0x8521,\n 0xE4F0: 0x84FF,\n 0xE4F1: 0x84F4,\n 0xE4F2: 0x8517,\n 0xE4F3: 0x8518,\n 0xE4F4: 0x852C,\n 0xE4F5: 0x851F,\n 0xE4F6: 0x8515,\n 0xE4F7: 0x8514,\n 0xE4F8: 0x84FC,\n 0xE4F9: 0x8540,\n 0xE4FA: 0x8563,\n 0xE4FB: 0x8558,\n 0xE4FC: 0x8548,\n 0xE540: 0x8541,\n 0xE541: 0x8602,\n 0xE542: 0x854B,\n 0xE543: 0x8555,\n 0xE544: 0x8580,\n 0xE545: 0x85A4,\n 0xE546: 0x8588,\n 0xE547: 0x8591,\n 0xE548: 0x858A,\n 0xE549: 0x85A8,\n 0xE54A: 0x856D,\n 0xE54B: 0x8594,\n 0xE54C: 0x859B,\n 0xE54D: 0x85EA,\n 0xE54E: 0x8587,\n 0xE54F: 0x859C,\n 0xE550: 0x8577,\n 0xE551: 0x857E,\n 0xE552: 0x8590,\n 0xE553: 0x85C9,\n 0xE554: 0x85BA,\n 0xE555: 0x85CF,\n 0xE556: 0x85B9,\n 0xE557: 0x85D0,\n 0xE558: 0x85D5,\n 0xE559: 0x85DD,\n 0xE55A: 0x85E5,\n 0xE55B: 0x85DC,\n 0xE55C: 0x85F9,\n 0xE55D: 0x860A,\n 0xE55E: 0x8613,\n 0xE55F: 0x860B,\n 0xE560: 0x85FE,\n 0xE561: 0x85FA,\n 0xE562: 0x8606,\n 0xE563: 0x8622,\n 0xE564: 0x861A,\n 0xE565: 0x8630,\n 0xE566: 0x863F,\n 0xE567: 0x864D,\n 0xE568: 0x4E55,\n 0xE569: 0x8654,\n 0xE56A: 0x865F,\n 0xE56B: 0x8667,\n 0xE56C: 0x8671,\n 0xE56D: 0x8693,\n 0xE56E: 0x86A3,\n 0xE56F: 0x86A9,\n 0xE570: 0x86AA,\n 0xE571: 0x868B,\n 0xE572: 0x868C,\n 0xE573: 0x86B6,\n 0xE574: 0x86AF,\n 0xE575: 0x86C4,\n 0xE576: 0x86C6,\n 0xE577: 0x86B0,\n 0xE578: 0x86C9,\n 0xE579: 0x8823,\n 0xE57A: 0x86AB,\n 0xE57B: 0x86D4,\n 0xE57C: 0x86DE,\n 0xE57D: 0x86E9,\n 0xE57E: 0x86EC,\n 0xE580: 0x86DF,\n 0xE581: 0x86DB,\n 0xE582: 0x86EF,\n 0xE583: 0x8712,\n 0xE584: 0x8706,\n 0xE585: 0x8708,\n 0xE586: 0x8700,\n 0xE587: 0x8703,\n 0xE588: 0x86FB,\n 0xE589: 0x8711,\n 0xE58A: 0x8709,\n 0xE58B: 0x870D,\n 0xE58C: 0x86F9,\n 0xE58D: 0x870A,\n 0xE58E: 0x8734,\n 0xE58F: 0x873F,\n 0xE590: 0x8737,\n 0xE591: 0x873B,\n 0xE592: 0x8725,\n 0xE593: 0x8729,\n 0xE594: 0x871A,\n 0xE595: 0x8760,\n 0xE596: 0x875F,\n 0xE597: 0x8778,\n 0xE598: 0x874C,\n 0xE599: 0x874E,\n 0xE59A: 0x8774,\n 0xE59B: 0x8757,\n 0xE59C: 0x8768,\n 0xE59D: 0x876E,\n 0xE59E: 0x8759,\n 0xE59F: 0x8753,\n 0xE5A0: 0x8763,\n 0xE5A1: 0x876A,\n 0xE5A2: 0x8805,\n 0xE5A3: 0x87A2,\n 0xE5A4: 0x879F,\n 0xE5A5: 0x8782,\n 0xE5A6: 0x87AF,\n 0xE5A7: 0x87CB,\n 0xE5A8: 0x87BD,\n 0xE5A9: 0x87C0,\n 0xE5AA: 0x87D0,\n 0xE5AB: 0x96D6,\n 0xE5AC: 0x87AB,\n 0xE5AD: 0x87C4,\n 0xE5AE: 0x87B3,\n 0xE5AF: 0x87C7,\n 0xE5B0: 0x87C6,\n 0xE5B1: 0x87BB,\n 0xE5B2: 0x87EF,\n 0xE5B3: 0x87F2,\n 0xE5B4: 0x87E0,\n 0xE5B5: 0x880F,\n 0xE5B6: 0x880D,\n 0xE5B7: 0x87FE,\n 0xE5B8: 0x87F6,\n 0xE5B9: 0x87F7,\n 0xE5BA: 0x880E,\n 0xE5BB: 0x87D2,\n 0xE5BC: 0x8811,\n 0xE5BD: 0x8816,\n 0xE5BE: 0x8815,\n 0xE5BF: 0x8822,\n 0xE5C0: 0x8821,\n 0xE5C1: 0x8831,\n 0xE5C2: 0x8836,\n 0xE5C3: 0x8839,\n 0xE5C4: 0x8827,\n 0xE5C5: 0x883B,\n 0xE5C6: 0x8844,\n 0xE5C7: 0x8842,\n 0xE5C8: 0x8852,\n 0xE5C9: 0x8859,\n 0xE5CA: 0x885E,\n 0xE5CB: 0x8862,\n 0xE5CC: 0x886B,\n 0xE5CD: 0x8881,\n 0xE5CE: 0x887E,\n 0xE5CF: 0x889E,\n 0xE5D0: 0x8875,\n 0xE5D1: 0x887D,\n 0xE5D2: 0x88B5,\n 0xE5D3: 0x8872,\n 0xE5D4: 0x8882,\n 0xE5D5: 0x8897,\n 0xE5D6: 0x8892,\n 0xE5D7: 0x88AE,\n 0xE5D8: 0x8899,\n 0xE5D9: 0x88A2,\n 0xE5DA: 0x888D,\n 0xE5DB: 0x88A4,\n 0xE5DC: 0x88B0,\n 0xE5DD: 0x88BF,\n 0xE5DE: 0x88B1,\n 0xE5DF: 0x88C3,\n 0xE5E0: 0x88C4,\n 0xE5E1: 0x88D4,\n 0xE5E2: 0x88D8,\n 0xE5E3: 0x88D9,\n 0xE5E4: 0x88DD,\n 0xE5E5: 0x88F9,\n 0xE5E6: 0x8902,\n 0xE5E7: 0x88FC,\n 0xE5E8: 0x88F4,\n 0xE5E9: 0x88E8,\n 0xE5EA: 0x88F2,\n 0xE5EB: 0x8904,\n 0xE5EC: 0x890C,\n 0xE5ED: 0x890A,\n 0xE5EE: 0x8913,\n 0xE5EF: 0x8943,\n 0xE5F0: 0x891E,\n 0xE5F1: 0x8925,\n 0xE5F2: 0x892A,\n 0xE5F3: 0x892B,\n 0xE5F4: 0x8941,\n 0xE5F5: 0x8944,\n 0xE5F6: 0x893B,\n 0xE5F7: 0x8936,\n 0xE5F8: 0x8938,\n 0xE5F9: 0x894C,\n 0xE5FA: 0x891D,\n 0xE5FB: 0x8960,\n 0xE5FC: 0x895E,\n 0xE640: 0x8966,\n 0xE641: 0x8964,\n 0xE642: 0x896D,\n 0xE643: 0x896A,\n 0xE644: 0x896F,\n 0xE645: 0x8974,\n 0xE646: 0x8977,\n 0xE647: 0x897E,\n 0xE648: 0x8983,\n 0xE649: 0x8988,\n 0xE64A: 0x898A,\n 0xE64B: 0x8993,\n 0xE64C: 0x8998,\n 0xE64D: 0x89A1,\n 0xE64E: 0x89A9,\n 0xE64F: 0x89A6,\n 0xE650: 0x89AC,\n 0xE651: 0x89AF,\n 0xE652: 0x89B2,\n 0xE653: 0x89BA,\n 0xE654: 0x89BD,\n 0xE655: 0x89BF,\n 0xE656: 0x89C0,\n 0xE657: 0x89DA,\n 0xE658: 0x89DC,\n 0xE659: 0x89DD,\n 0xE65A: 0x89E7,\n 0xE65B: 0x89F4,\n 0xE65C: 0x89F8,\n 0xE65D: 0x8A03,\n 0xE65E: 0x8A16,\n 0xE65F: 0x8A10,\n 0xE660: 0x8A0C,\n 0xE661: 0x8A1B,\n 0xE662: 0x8A1D,\n 0xE663: 0x8A25,\n 0xE664: 0x8A36,\n 0xE665: 0x8A41,\n 0xE666: 0x8A5B,\n 0xE667: 0x8A52,\n 0xE668: 0x8A46,\n 0xE669: 0x8A48,\n 0xE66A: 0x8A7C,\n 0xE66B: 0x8A6D,\n 0xE66C: 0x8A6C,\n 0xE66D: 0x8A62,\n 0xE66E: 0x8A85,\n 0xE66F: 0x8A82,\n 0xE670: 0x8A84,\n 0xE671: 0x8AA8,\n 0xE672: 0x8AA1,\n 0xE673: 0x8A91,\n 0xE674: 0x8AA5,\n 0xE675: 0x8AA6,\n 0xE676: 0x8A9A,\n 0xE677: 0x8AA3,\n 0xE678: 0x8AC4,\n 0xE679: 0x8ACD,\n 0xE67A: 0x8AC2,\n 0xE67B: 0x8ADA,\n 0xE67C: 0x8AEB,\n 0xE67D: 0x8AF3,\n 0xE67E: 0x8AE7,\n 0xE680: 0x8AE4,\n 0xE681: 0x8AF1,\n 0xE682: 0x8B14,\n 0xE683: 0x8AE0,\n 0xE684: 0x8AE2,\n 0xE685: 0x8AF7,\n 0xE686: 0x8ADE,\n 0xE687: 0x8ADB,\n 0xE688: 0x8B0C,\n 0xE689: 0x8B07,\n 0xE68A: 0x8B1A,\n 0xE68B: 0x8AE1,\n 0xE68C: 0x8B16,\n 0xE68D: 0x8B10,\n 0xE68E: 0x8B17,\n 0xE68F: 0x8B20,\n 0xE690: 0x8B33,\n 0xE691: 0x97AB,\n 0xE692: 0x8B26,\n 0xE693: 0x8B2B,\n 0xE694: 0x8B3E,\n 0xE695: 0x8B28,\n 0xE696: 0x8B41,\n 0xE697: 0x8B4C,\n 0xE698: 0x8B4F,\n 0xE699: 0x8B4E,\n 0xE69A: 0x8B49,\n 0xE69B: 0x8B56,\n 0xE69C: 0x8B5B,\n 0xE69D: 0x8B5A,\n 0xE69E: 0x8B6B,\n 0xE69F: 0x8B5F,\n 0xE6A0: 0x8B6C,\n 0xE6A1: 0x8B6F,\n 0xE6A2: 0x8B74,\n 0xE6A3: 0x8B7D,\n 0xE6A4: 0x8B80,\n 0xE6A5: 0x8B8C,\n 0xE6A6: 0x8B8E,\n 0xE6A7: 0x8B92,\n 0xE6A8: 0x8B93,\n 0xE6A9: 0x8B96,\n 0xE6AA: 0x8B99,\n 0xE6AB: 0x8B9A,\n 0xE6AC: 0x8C3A,\n 0xE6AD: 0x8C41,\n 0xE6AE: 0x8C3F,\n 0xE6AF: 0x8C48,\n 0xE6B0: 0x8C4C,\n 0xE6B1: 0x8C4E,\n 0xE6B2: 0x8C50,\n 0xE6B3: 0x8C55,\n 0xE6B4: 0x8C62,\n 0xE6B5: 0x8C6C,\n 0xE6B6: 0x8C78,\n 0xE6B7: 0x8C7A,\n 0xE6B8: 0x8C82,\n 0xE6B9: 0x8C89,\n 0xE6BA: 0x8C85,\n 0xE6BB: 0x8C8A,\n 0xE6BC: 0x8C8D,\n 0xE6BD: 0x8C8E,\n 0xE6BE: 0x8C94,\n 0xE6BF: 0x8C7C,\n 0xE6C0: 0x8C98,\n 0xE6C1: 0x621D,\n 0xE6C2: 0x8CAD,\n 0xE6C3: 0x8CAA,\n 0xE6C4: 0x8CBD,\n 0xE6C5: 0x8CB2,\n 0xE6C6: 0x8CB3,\n 0xE6C7: 0x8CAE,\n 0xE6C8: 0x8CB6,\n 0xE6C9: 0x8CC8,\n 0xE6CA: 0x8CC1,\n 0xE6CB: 0x8CE4,\n 0xE6CC: 0x8CE3,\n 0xE6CD: 0x8CDA,\n 0xE6CE: 0x8CFD,\n 0xE6CF: 0x8CFA,\n 0xE6D0: 0x8CFB,\n 0xE6D1: 0x8D04,\n 0xE6D2: 0x8D05,\n 0xE6D3: 0x8D0A,\n 0xE6D4: 0x8D07,\n 0xE6D5: 0x8D0F,\n 0xE6D6: 0x8D0D,\n 0xE6D7: 0x8D10,\n 0xE6D8: 0x9F4E,\n 0xE6D9: 0x8D13,\n 0xE6DA: 0x8CCD,\n 0xE6DB: 0x8D14,\n 0xE6DC: 0x8D16,\n 0xE6DD: 0x8D67,\n 0xE6DE: 0x8D6D,\n 0xE6DF: 0x8D71,\n 0xE6E0: 0x8D73,\n 0xE6E1: 0x8D81,\n 0xE6E2: 0x8D99,\n 0xE6E3: 0x8DC2,\n 0xE6E4: 0x8DBE,\n 0xE6E5: 0x8DBA,\n 0xE6E6: 0x8DCF,\n 0xE6E7: 0x8DDA,\n 0xE6E8: 0x8DD6,\n 0xE6E9: 0x8DCC,\n 0xE6EA: 0x8DDB,\n 0xE6EB: 0x8DCB,\n 0xE6EC: 0x8DEA,\n 0xE6ED: 0x8DEB,\n 0xE6EE: 0x8DDF,\n 0xE6EF: 0x8DE3,\n 0xE6F0: 0x8DFC,\n 0xE6F1: 0x8E08,\n 0xE6F2: 0x8E09,\n 0xE6F3: 0x8DFF,\n 0xE6F4: 0x8E1D,\n 0xE6F5: 0x8E1E,\n 0xE6F6: 0x8E10,\n 0xE6F7: 0x8E1F,\n 0xE6F8: 0x8E42,\n 0xE6F9: 0x8E35,\n 0xE6FA: 0x8E30,\n 0xE6FB: 0x8E34,\n 0xE6FC: 0x8E4A,\n 0xE740: 0x8E47,\n 0xE741: 0x8E49,\n 0xE742: 0x8E4C,\n 0xE743: 0x8E50,\n 0xE744: 0x8E48,\n 0xE745: 0x8E59,\n 0xE746: 0x8E64,\n 0xE747: 0x8E60,\n 0xE748: 0x8E2A,\n 0xE749: 0x8E63,\n 0xE74A: 0x8E55,\n 0xE74B: 0x8E76,\n 0xE74C: 0x8E72,\n 0xE74D: 0x8E7C,\n 0xE74E: 0x8E81,\n 0xE74F: 0x8E87,\n 0xE750: 0x8E85,\n 0xE751: 0x8E84,\n 0xE752: 0x8E8B,\n 0xE753: 0x8E8A,\n 0xE754: 0x8E93,\n 0xE755: 0x8E91,\n 0xE756: 0x8E94,\n 0xE757: 0x8E99,\n 0xE758: 0x8EAA,\n 0xE759: 0x8EA1,\n 0xE75A: 0x8EAC,\n 0xE75B: 0x8EB0,\n 0xE75C: 0x8EC6,\n 0xE75D: 0x8EB1,\n 0xE75E: 0x8EBE,\n 0xE75F: 0x8EC5,\n 0xE760: 0x8EC8,\n 0xE761: 0x8ECB,\n 0xE762: 0x8EDB,\n 0xE763: 0x8EE3,\n 0xE764: 0x8EFC,\n 0xE765: 0x8EFB,\n 0xE766: 0x8EEB,\n 0xE767: 0x8EFE,\n 0xE768: 0x8F0A,\n 0xE769: 0x8F05,\n 0xE76A: 0x8F15,\n 0xE76B: 0x8F12,\n 0xE76C: 0x8F19,\n 0xE76D: 0x8F13,\n 0xE76E: 0x8F1C,\n 0xE76F: 0x8F1F,\n 0xE770: 0x8F1B,\n 0xE771: 0x8F0C,\n 0xE772: 0x8F26,\n 0xE773: 0x8F33,\n 0xE774: 0x8F3B,\n 0xE775: 0x8F39,\n 0xE776: 0x8F45,\n 0xE777: 0x8F42,\n 0xE778: 0x8F3E,\n 0xE779: 0x8F4C,\n 0xE77A: 0x8F49,\n 0xE77B: 0x8F46,\n 0xE77C: 0x8F4E,\n 0xE77D: 0x8F57,\n 0xE77E: 0x8F5C,\n 0xE780: 0x8F62,\n 0xE781: 0x8F63,\n 0xE782: 0x8F64,\n 0xE783: 0x8F9C,\n 0xE784: 0x8F9F,\n 0xE785: 0x8FA3,\n 0xE786: 0x8FAD,\n 0xE787: 0x8FAF,\n 0xE788: 0x8FB7,\n 0xE789: 0x8FDA,\n 0xE78A: 0x8FE5,\n 0xE78B: 0x8FE2,\n 0xE78C: 0x8FEA,\n 0xE78D: 0x8FEF,\n 0xE78E: 0x9087,\n 0xE78F: 0x8FF4,\n 0xE790: 0x9005,\n 0xE791: 0x8FF9,\n 0xE792: 0x8FFA,\n 0xE793: 0x9011,\n 0xE794: 0x9015,\n 0xE795: 0x9021,\n 0xE796: 0x900D,\n 0xE797: 0x901E,\n 0xE798: 0x9016,\n 0xE799: 0x900B,\n 0xE79A: 0x9027,\n 0xE79B: 0x9036,\n 0xE79C: 0x9035,\n 0xE79D: 0x9039,\n 0xE79E: 0x8FF8,\n 0xE79F: 0x904F,\n 0xE7A0: 0x9050,\n 0xE7A1: 0x9051,\n 0xE7A2: 0x9052,\n 0xE7A3: 0x900E,\n 0xE7A4: 0x9049,\n 0xE7A5: 0x903E,\n 0xE7A6: 0x9056,\n 0xE7A7: 0x9058,\n 0xE7A8: 0x905E,\n 0xE7A9: 0x9068,\n 0xE7AA: 0x906F,\n 0xE7AB: 0x9076,\n 0xE7AC: 0x96A8,\n 0xE7AD: 0x9072,\n 0xE7AE: 0x9082,\n 0xE7AF: 0x907D,\n 0xE7B0: 0x9081,\n 0xE7B1: 0x9080,\n 0xE7B2: 0x908A,\n 0xE7B3: 0x9089,\n 0xE7B4: 0x908F,\n 0xE7B5: 0x90A8,\n 0xE7B6: 0x90AF,\n 0xE7B7: 0x90B1,\n 0xE7B8: 0x90B5,\n 0xE7B9: 0x90E2,\n 0xE7BA: 0x90E4,\n 0xE7BB: 0x6248,\n 0xE7BC: 0x90DB,\n 0xE7BD: 0x9102,\n 0xE7BE: 0x9112,\n 0xE7BF: 0x9119,\n 0xE7C0: 0x9132,\n 0xE7C1: 0x9130,\n 0xE7C2: 0x914A,\n 0xE7C3: 0x9156,\n 0xE7C4: 0x9158,\n 0xE7C5: 0x9163,\n 0xE7C6: 0x9165,\n 0xE7C7: 0x9169,\n 0xE7C8: 0x9173,\n 0xE7C9: 0x9172,\n 0xE7CA: 0x918B,\n 0xE7CB: 0x9189,\n 0xE7CC: 0x9182,\n 0xE7CD: 0x91A2,\n 0xE7CE: 0x91AB,\n 0xE7CF: 0x91AF,\n 0xE7D0: 0x91AA,\n 0xE7D1: 0x91B5,\n 0xE7D2: 0x91B4,\n 0xE7D3: 0x91BA,\n 0xE7D4: 0x91C0,\n 0xE7D5: 0x91C1,\n 0xE7D6: 0x91C9,\n 0xE7D7: 0x91CB,\n 0xE7D8: 0x91D0,\n 0xE7D9: 0x91D6,\n 0xE7DA: 0x91DF,\n 0xE7DB: 0x91E1,\n 0xE7DC: 0x91DB,\n 0xE7DD: 0x91FC,\n 0xE7DE: 0x91F5,\n 0xE7DF: 0x91F6,\n 0xE7E0: 0x921E,\n 0xE7E1: 0x91FF,\n 0xE7E2: 0x9214,\n 0xE7E3: 0x922C,\n 0xE7E4: 0x9215,\n 0xE7E5: 0x9211,\n 0xE7E6: 0x925E,\n 0xE7E7: 0x9257,\n 0xE7E8: 0x9245,\n 0xE7E9: 0x9249,\n 0xE7EA: 0x9264,\n 0xE7EB: 0x9248,\n 0xE7EC: 0x9295,\n 0xE7ED: 0x923F,\n 0xE7EE: 0x924B,\n 0xE7EF: 0x9250,\n 0xE7F0: 0x929C,\n 0xE7F1: 0x9296,\n 0xE7F2: 0x9293,\n 0xE7F3: 0x929B,\n 0xE7F4: 0x925A,\n 0xE7F5: 0x92CF,\n 0xE7F6: 0x92B9,\n 0xE7F7: 0x92B7,\n 0xE7F8: 0x92E9,\n 0xE7F9: 0x930F,\n 0xE7FA: 0x92FA,\n 0xE7FB: 0x9344,\n 0xE7FC: 0x932E,\n 0xE840: 0x9319,\n 0xE841: 0x9322,\n 0xE842: 0x931A,\n 0xE843: 0x9323,\n 0xE844: 0x933A,\n 0xE845: 0x9335,\n 0xE846: 0x933B,\n 0xE847: 0x935C,\n 0xE848: 0x9360,\n 0xE849: 0x937C,\n 0xE84A: 0x936E,\n 0xE84B: 0x9356,\n 0xE84C: 0x93B0,\n 0xE84D: 0x93AC,\n 0xE84E: 0x93AD,\n 0xE84F: 0x9394,\n 0xE850: 0x93B9,\n 0xE851: 0x93D6,\n 0xE852: 0x93D7,\n 0xE853: 0x93E8,\n 0xE854: 0x93E5,\n 0xE855: 0x93D8,\n 0xE856: 0x93C3,\n 0xE857: 0x93DD,\n 0xE858: 0x93D0,\n 0xE859: 0x93C8,\n 0xE85A: 0x93E4,\n 0xE85B: 0x941A,\n 0xE85C: 0x9414,\n 0xE85D: 0x9413,\n 0xE85E: 0x9403,\n 0xE85F: 0x9407,\n 0xE860: 0x9410,\n 0xE861: 0x9436,\n 0xE862: 0x942B,\n 0xE863: 0x9435,\n 0xE864: 0x9421,\n 0xE865: 0x943A,\n 0xE866: 0x9441,\n 0xE867: 0x9452,\n 0xE868: 0x9444,\n 0xE869: 0x945B,\n 0xE86A: 0x9460,\n 0xE86B: 0x9462,\n 0xE86C: 0x945E,\n 0xE86D: 0x946A,\n 0xE86E: 0x9229,\n 0xE86F: 0x9470,\n 0xE870: 0x9475,\n 0xE871: 0x9477,\n 0xE872: 0x947D,\n 0xE873: 0x945A,\n 0xE874: 0x947C,\n 0xE875: 0x947E,\n 0xE876: 0x9481,\n 0xE877: 0x947F,\n 0xE878: 0x9582,\n 0xE879: 0x9587,\n 0xE87A: 0x958A,\n 0xE87B: 0x9594,\n 0xE87C: 0x9596,\n 0xE87D: 0x9598,\n 0xE87E: 0x9599,\n 0xE880: 0x95A0,\n 0xE881: 0x95A8,\n 0xE882: 0x95A7,\n 0xE883: 0x95AD,\n 0xE884: 0x95BC,\n 0xE885: 0x95BB,\n 0xE886: 0x95B9,\n 0xE887: 0x95BE,\n 0xE888: 0x95CA,\n 0xE889: 0x6FF6,\n 0xE88A: 0x95C3,\n 0xE88B: 0x95CD,\n 0xE88C: 0x95CC,\n 0xE88D: 0x95D5,\n 0xE88E: 0x95D4,\n 0xE88F: 0x95D6,\n 0xE890: 0x95DC,\n 0xE891: 0x95E1,\n 0xE892: 0x95E5,\n 0xE893: 0x95E2,\n 0xE894: 0x9621,\n 0xE895: 0x9628,\n 0xE896: 0x962E,\n 0xE897: 0x962F,\n 0xE898: 0x9642,\n 0xE899: 0x964C,\n 0xE89A: 0x964F,\n 0xE89B: 0x964B,\n 0xE89C: 0x9677,\n 0xE89D: 0x965C,\n 0xE89E: 0x965E,\n 0xE89F: 0x965D,\n 0xE8A0: 0x965F,\n 0xE8A1: 0x9666,\n 0xE8A2: 0x9672,\n 0xE8A3: 0x966C,\n 0xE8A4: 0x968D,\n 0xE8A5: 0x9698,\n 0xE8A6: 0x9695,\n 0xE8A7: 0x9697,\n 0xE8A8: 0x96AA,\n 0xE8A9: 0x96A7,\n 0xE8AA: 0x96B1,\n 0xE8AB: 0x96B2,\n 0xE8AC: 0x96B0,\n 0xE8AD: 0x96B4,\n 0xE8AE: 0x96B6,\n 0xE8AF: 0x96B8,\n 0xE8B0: 0x96B9,\n 0xE8B1: 0x96CE,\n 0xE8B2: 0x96CB,\n 0xE8B3: 0x96C9,\n 0xE8B4: 0x96CD,\n 0xE8B5: 0x894D,\n 0xE8B6: 0x96DC,\n 0xE8B7: 0x970D,\n 0xE8B8: 0x96D5,\n 0xE8B9: 0x96F9,\n 0xE8BA: 0x9704,\n 0xE8BB: 0x9706,\n 0xE8BC: 0x9708,\n 0xE8BD: 0x9713,\n 0xE8BE: 0x970E,\n 0xE8BF: 0x9711,\n 0xE8C0: 0x970F,\n 0xE8C1: 0x9716,\n 0xE8C2: 0x9719,\n 0xE8C3: 0x9724,\n 0xE8C4: 0x972A,\n 0xE8C5: 0x9730,\n 0xE8C6: 0x9739,\n 0xE8C7: 0x973D,\n 0xE8C8: 0x973E,\n 0xE8C9: 0x9744,\n 0xE8CA: 0x9746,\n 0xE8CB: 0x9748,\n 0xE8CC: 0x9742,\n 0xE8CD: 0x9749,\n 0xE8CE: 0x975C,\n 0xE8CF: 0x9760,\n 0xE8D0: 0x9764,\n 0xE8D1: 0x9766,\n 0xE8D2: 0x9768,\n 0xE8D3: 0x52D2,\n 0xE8D4: 0x976B,\n 0xE8D5: 0x9771,\n 0xE8D6: 0x9779,\n 0xE8D7: 0x9785,\n 0xE8D8: 0x977C,\n 0xE8D9: 0x9781,\n 0xE8DA: 0x977A,\n 0xE8DB: 0x9786,\n 0xE8DC: 0x978B,\n 0xE8DD: 0x978F,\n 0xE8DE: 0x9790,\n 0xE8DF: 0x979C,\n 0xE8E0: 0x97A8,\n 0xE8E1: 0x97A6,\n 0xE8E2: 0x97A3,\n 0xE8E3: 0x97B3,\n 0xE8E4: 0x97B4,\n 0xE8E5: 0x97C3,\n 0xE8E6: 0x97C6,\n 0xE8E7: 0x97C8,\n 0xE8E8: 0x97CB,\n 0xE8E9: 0x97DC,\n 0xE8EA: 0x97ED,\n 0xE8EB: 0x9F4F,\n 0xE8EC: 0x97F2,\n 0xE8ED: 0x7ADF,\n 0xE8EE: 0x97F6,\n 0xE8EF: 0x97F5,\n 0xE8F0: 0x980F,\n 0xE8F1: 0x980C,\n 0xE8F2: 0x9838,\n 0xE8F3: 0x9824,\n 0xE8F4: 0x9821,\n 0xE8F5: 0x9837,\n 0xE8F6: 0x983D,\n 0xE8F7: 0x9846,\n 0xE8F8: 0x984F,\n 0xE8F9: 0x984B,\n 0xE8FA: 0x986B,\n 0xE8FB: 0x986F,\n 0xE8FC: 0x9870,\n 0xE940: 0x9871,\n 0xE941: 0x9874,\n 0xE942: 0x9873,\n 0xE943: 0x98AA,\n 0xE944: 0x98AF,\n 0xE945: 0x98B1,\n 0xE946: 0x98B6,\n 0xE947: 0x98C4,\n 0xE948: 0x98C3,\n 0xE949: 0x98C6,\n 0xE94A: 0x98E9,\n 0xE94B: 0x98EB,\n 0xE94C: 0x9903,\n 0xE94D: 0x9909,\n 0xE94E: 0x9912,\n 0xE94F: 0x9914,\n 0xE950: 0x9918,\n 0xE951: 0x9921,\n 0xE952: 0x991D,\n 0xE953: 0x991E,\n 0xE954: 0x9924,\n 0xE955: 0x9920,\n 0xE956: 0x992C,\n 0xE957: 0x992E,\n 0xE958: 0x993D,\n 0xE959: 0x993E,\n 0xE95A: 0x9942,\n 0xE95B: 0x9949,\n 0xE95C: 0x9945,\n 0xE95D: 0x9950,\n 0xE95E: 0x994B,\n 0xE95F: 0x9951,\n 0xE960: 0x9952,\n 0xE961: 0x994C,\n 0xE962: 0x9955,\n 0xE963: 0x9997,\n 0xE964: 0x9998,\n 0xE965: 0x99A5,\n 0xE966: 0x99AD,\n 0xE967: 0x99AE,\n 0xE968: 0x99BC,\n 0xE969: 0x99DF,\n 0xE96A: 0x99DB,\n 0xE96B: 0x99DD,\n 0xE96C: 0x99D8,\n 0xE96D: 0x99D1,\n 0xE96E: 0x99ED,\n 0xE96F: 0x99EE,\n 0xE970: 0x99F1,\n 0xE971: 0x99F2,\n 0xE972: 0x99FB,\n 0xE973: 0x99F8,\n 0xE974: 0x9A01,\n 0xE975: 0x9A0F,\n 0xE976: 0x9A05,\n 0xE977: 0x99E2,\n 0xE978: 0x9A19,\n 0xE979: 0x9A2B,\n 0xE97A: 0x9A37,\n 0xE97B: 0x9A45,\n 0xE97C: 0x9A42,\n 0xE97D: 0x9A40,\n 0xE97E: 0x9A43,\n 0xE980: 0x9A3E,\n 0xE981: 0x9A55,\n 0xE982: 0x9A4D,\n 0xE983: 0x9A5B,\n 0xE984: 0x9A57,\n 0xE985: 0x9A5F,\n 0xE986: 0x9A62,\n 0xE987: 0x9A65,\n 0xE988: 0x9A64,\n 0xE989: 0x9A69,\n 0xE98A: 0x9A6B,\n 0xE98B: 0x9A6A,\n 0xE98C: 0x9AAD,\n 0xE98D: 0x9AB0,\n 0xE98E: 0x9ABC,\n 0xE98F: 0x9AC0,\n 0xE990: 0x9ACF,\n 0xE991: 0x9AD1,\n 0xE992: 0x9AD3,\n 0xE993: 0x9AD4,\n 0xE994: 0x9ADE,\n 0xE995: 0x9ADF,\n 0xE996: 0x9AE2,\n 0xE997: 0x9AE3,\n 0xE998: 0x9AE6,\n 0xE999: 0x9AEF,\n 0xE99A: 0x9AEB,\n 0xE99B: 0x9AEE,\n 0xE99C: 0x9AF4,\n 0xE99D: 0x9AF1,\n 0xE99E: 0x9AF7,\n 0xE99F: 0x9AFB,\n 0xE9A0: 0x9B06,\n 0xE9A1: 0x9B18,\n 0xE9A2: 0x9B1A,\n 0xE9A3: 0x9B1F,\n 0xE9A4: 0x9B22,\n 0xE9A5: 0x9B23,\n 0xE9A6: 0x9B25,\n 0xE9A7: 0x9B27,\n 0xE9A8: 0x9B28,\n 0xE9A9: 0x9B29,\n 0xE9AA: 0x9B2A,\n 0xE9AB: 0x9B2E,\n 0xE9AC: 0x9B2F,\n 0xE9AD: 0x9B32,\n 0xE9AE: 0x9B44,\n 0xE9AF: 0x9B43,\n 0xE9B0: 0x9B4F,\n 0xE9B1: 0x9B4D,\n 0xE9B2: 0x9B4E,\n 0xE9B3: 0x9B51,\n 0xE9B4: 0x9B58,\n 0xE9B5: 0x9B74,\n 0xE9B6: 0x9B93,\n 0xE9B7: 0x9B83,\n 0xE9B8: 0x9B91,\n 0xE9B9: 0x9B96,\n 0xE9BA: 0x9B97,\n 0xE9BB: 0x9B9F,\n 0xE9BC: 0x9BA0,\n 0xE9BD: 0x9BA8,\n 0xE9BE: 0x9BB4,\n 0xE9BF: 0x9BC0,\n 0xE9C0: 0x9BCA,\n 0xE9C1: 0x9BB9,\n 0xE9C2: 0x9BC6,\n 0xE9C3: 0x9BCF,\n 0xE9C4: 0x9BD1,\n 0xE9C5: 0x9BD2,\n 0xE9C6: 0x9BE3,\n 0xE9C7: 0x9BE2,\n 0xE9C8: 0x9BE4,\n 0xE9C9: 0x9BD4,\n 0xE9CA: 0x9BE1,\n 0xE9CB: 0x9C3A,\n 0xE9CC: 0x9BF2,\n 0xE9CD: 0x9BF1,\n 0xE9CE: 0x9BF0,\n 0xE9CF: 0x9C15,\n 0xE9D0: 0x9C14,\n 0xE9D1: 0x9C09,\n 0xE9D2: 0x9C13,\n 0xE9D3: 0x9C0C,\n 0xE9D4: 0x9C06,\n 0xE9D5: 0x9C08,\n 0xE9D6: 0x9C12,\n 0xE9D7: 0x9C0A,\n 0xE9D8: 0x9C04,\n 0xE9D9: 0x9C2E,\n 0xE9DA: 0x9C1B,\n 0xE9DB: 0x9C25,\n 0xE9DC: 0x9C24,\n 0xE9DD: 0x9C21,\n 0xE9DE: 0x9C30,\n 0xE9DF: 0x9C47,\n 0xE9E0: 0x9C32,\n 0xE9E1: 0x9C46,\n 0xE9E2: 0x9C3E,\n 0xE9E3: 0x9C5A,\n 0xE9E4: 0x9C60,\n 0xE9E5: 0x9C67,\n 0xE9E6: 0x9C76,\n 0xE9E7: 0x9C78,\n 0xE9E8: 0x9CE7,\n 0xE9E9: 0x9CEC,\n 0xE9EA: 0x9CF0,\n 0xE9EB: 0x9D09,\n 0xE9EC: 0x9D08,\n 0xE9ED: 0x9CEB,\n 0xE9EE: 0x9D03,\n 0xE9EF: 0x9D06,\n 0xE9F0: 0x9D2A,\n 0xE9F1: 0x9D26,\n 0xE9F2: 0x9DAF,\n 0xE9F3: 0x9D23,\n 0xE9F4: 0x9D1F,\n 0xE9F5: 0x9D44,\n 0xE9F6: 0x9D15,\n 0xE9F7: 0x9D12,\n 0xE9F8: 0x9D41,\n 0xE9F9: 0x9D3F,\n 0xE9FA: 0x9D3E,\n 0xE9FB: 0x9D46,\n 0xE9FC: 0x9D48,\n 0xEA40: 0x9D5D,\n 0xEA41: 0x9D5E,\n 0xEA42: 0x9D64,\n 0xEA43: 0x9D51,\n 0xEA44: 0x9D50,\n 0xEA45: 0x9D59,\n 0xEA46: 0x9D72,\n 0xEA47: 0x9D89,\n 0xEA48: 0x9D87,\n 0xEA49: 0x9DAB,\n 0xEA4A: 0x9D6F,\n 0xEA4B: 0x9D7A,\n 0xEA4C: 0x9D9A,\n 0xEA4D: 0x9DA4,\n 0xEA4E: 0x9DA9,\n 0xEA4F: 0x9DB2,\n 0xEA50: 0x9DC4,\n 0xEA51: 0x9DC1,\n 0xEA52: 0x9DBB,\n 0xEA53: 0x9DB8,\n 0xEA54: 0x9DBA,\n 0xEA55: 0x9DC6,\n 0xEA56: 0x9DCF,\n 0xEA57: 0x9DC2,\n 0xEA58: 0x9DD9,\n 0xEA59: 0x9DD3,\n 0xEA5A: 0x9DF8,\n 0xEA5B: 0x9DE6,\n 0xEA5C: 0x9DED,\n 0xEA5D: 0x9DEF,\n 0xEA5E: 0x9DFD,\n 0xEA5F: 0x9E1A,\n 0xEA60: 0x9E1B,\n 0xEA61: 0x9E1E,\n 0xEA62: 0x9E75,\n 0xEA63: 0x9E79,\n 0xEA64: 0x9E7D,\n 0xEA65: 0x9E81,\n 0xEA66: 0x9E88,\n 0xEA67: 0x9E8B,\n 0xEA68: 0x9E8C,\n 0xEA69: 0x9E92,\n 0xEA6A: 0x9E95,\n 0xEA6B: 0x9E91,\n 0xEA6C: 0x9E9D,\n 0xEA6D: 0x9EA5,\n 0xEA6E: 0x9EA9,\n 0xEA6F: 0x9EB8,\n 0xEA70: 0x9EAA,\n 0xEA71: 0x9EAD,\n 0xEA72: 0x9761,\n 0xEA73: 0x9ECC,\n 0xEA74: 0x9ECE,\n 0xEA75: 0x9ECF,\n 0xEA76: 0x9ED0,\n 0xEA77: 0x9ED4,\n 0xEA78: 0x9EDC,\n 0xEA79: 0x9EDE,\n 0xEA7A: 0x9EDD,\n 0xEA7B: 0x9EE0,\n 0xEA7C: 0x9EE5,\n 0xEA7D: 0x9EE8,\n 0xEA7E: 0x9EEF,\n 0xEA80: 0x9EF4,\n 0xEA81: 0x9EF6,\n 0xEA82: 0x9EF7,\n 0xEA83: 0x9EF9,\n 0xEA84: 0x9EFB,\n 0xEA85: 0x9EFC,\n 0xEA86: 0x9EFD,\n 0xEA87: 0x9F07,\n 0xEA88: 0x9F08,\n 0xEA89: 0x76B7,\n 0xEA8A: 0x9F15,\n 0xEA8B: 0x9F21,\n 0xEA8C: 0x9F2C,\n 0xEA8D: 0x9F3E,\n 0xEA8E: 0x9F4A,\n 0xEA8F: 0x9F52,\n 0xEA90: 0x9F54,\n 0xEA91: 0x9F63,\n 0xEA92: 0x9F5F,\n 0xEA93: 0x9F60,\n 0xEA94: 0x9F61,\n 0xEA95: 0x9F66,\n 0xEA96: 0x9F67,\n 0xEA97: 0x9F6C,\n 0xEA98: 0x9F6A,\n 0xEA99: 0x9F77,\n 0xEA9A: 0x9F72,\n 0xEA9B: 0x9F76,\n 0xEA9C: 0x9F95,\n 0xEA9D: 0x9F9C,\n 0xEA9E: 0x9FA0,\n 0xEA9F: 0x582F,\n 0xEAA0: 0x69C7,\n 0xEAA1: 0x9059,\n 0xEAA2: 0x7464,\n 0xEAA3: 0x51DC,\n 0xEAA4: 0x7199,\n };\n \n \n /***/ }),\n /* 9 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var GenericGF_1 = __webpack_require__(1);\n var GenericGFPoly_1 = __webpack_require__(2);\n function runEuclideanAlgorithm(field, a, b, R) {\n // Assume a's degree is >= b's\n var _a;\n if (a.degree() < b.degree()) {\n _a = [b, a];\n a = _a[0]; \n b = _a[1];\n }\n var rLast = a;\n var r = b;\n var tLast = field.zero;\n var t = field.one;\n // Run Euclidean algorithm until r's degree is less than R/2\n while (r.degree() >= R / 2) {\n var rLastLast = rLast;\n var tLastLast = tLast;\n rLast = r;\n tLast = t;\n // Divide rLastLast by rLast, with quotient in q and remainder in r\n if (rLast.isZero()) {\n // Euclidean algorithm already terminated?\n return null;\n }\n r = rLastLast;\n var q = field.zero;\n var denominatorLeadingTerm = rLast.getCoefficient(rLast.degree());\n var dltInverse = field.inverse(denominatorLeadingTerm);\n while (r.degree() >= rLast.degree() && !r.isZero()) {\n var degreeDiff = r.degree() - rLast.degree();\n var scale = field.multiply(r.getCoefficient(r.degree()), dltInverse);\n q = q.addOrSubtract(field.buildMonomial(degreeDiff, scale));\n r = r.addOrSubtract(rLast.multiplyByMonomial(degreeDiff, scale));\n }\n t = q.multiplyPoly(tLast).addOrSubtract(tLastLast);\n if (r.degree() >= rLast.degree()) {\n return null;\n }\n }\n var sigmaTildeAtZero = t.getCoefficient(0);\n if (sigmaTildeAtZero === 0) {\n return null;\n }\n var inverse = field.inverse(sigmaTildeAtZero);\n return [t.multiply(inverse), r.multiply(inverse)];\n }\n function findErrorLocations(field, errorLocator) {\n // This is a direct application of Chien's search\n var numErrors = errorLocator.degree();\n if (numErrors === 1) {\n return [errorLocator.getCoefficient(1)];\n }\n var result = new Array(numErrors);\n var errorCount = 0;\n for (var i = 1; i < field.size && errorCount < numErrors; i++) {\n if (errorLocator.evaluateAt(i) === 0) {\n result[errorCount] = field.inverse(i);\n errorCount++;\n }\n }\n if (errorCount !== numErrors) {\n return null;\n }\n return result;\n }\n function findErrorMagnitudes(field, errorEvaluator, errorLocations) {\n // This is directly applying Forney's Formula\n var s = errorLocations.length;\n var result = new Array(s);\n for (var i = 0; i < s; i++) {\n var xiInverse = field.inverse(errorLocations[i]);\n var denominator = 1;\n for (var j = 0; j < s; j++) {\n if (i !== j) {\n denominator = field.multiply(denominator, GenericGF_1.addOrSubtractGF(1, field.multiply(errorLocations[j], xiInverse)));\n }\n }\n result[i] = field.multiply(errorEvaluator.evaluateAt(xiInverse), field.inverse(denominator));\n if (field.generatorBase !== 0) {\n result[i] = field.multiply(result[i], xiInverse);\n }\n }\n return result;\n }\n function decode(bytes, twoS) {\n var outputBytes = new Uint8ClampedArray(bytes.length);\n outputBytes.set(bytes);\n var field = new GenericGF_1.default(0x011D, 256, 0); // x^8 + x^4 + x^3 + x^2 + 1\n var poly = new GenericGFPoly_1.default(field, outputBytes);\n var syndromeCoefficients = new Uint8ClampedArray(twoS);\n var error = false;\n for (var s = 0; s < twoS; s++) {\n var evaluation = poly.evaluateAt(field.exp(s + field.generatorBase));\n syndromeCoefficients[syndromeCoefficients.length - 1 - s] = evaluation;\n if (evaluation !== 0) {\n error = true;\n }\n }\n if (!error) {\n return outputBytes;\n }\n var syndrome = new GenericGFPoly_1.default(field, syndromeCoefficients);\n var sigmaOmega = runEuclideanAlgorithm(field, field.buildMonomial(twoS, 1), syndrome, twoS);\n if (sigmaOmega === null) {\n return null;\n }\n var errorLocations = findErrorLocations(field, sigmaOmega[0]);\n if (errorLocations == null) {\n return null;\n }\n var errorMagnitudes = findErrorMagnitudes(field, sigmaOmega[1], errorLocations);\n for (var i = 0; i < errorLocations.length; i++) {\n var position = outputBytes.length - 1 - field.log(errorLocations[i]);\n if (position < 0) {\n return null;\n }\n outputBytes[position] = GenericGF_1.addOrSubtractGF(outputBytes[position], errorMagnitudes[i]);\n }\n return outputBytes;\n }\n exports.decode = decode;\n \n \n /***/ }),\n /* 10 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.VERSIONS = [\n {\n infoBits: null,\n versionNumber: 1,\n alignmentPatternCenters: [],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 7,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 19 }],\n },\n {\n ecCodewordsPerBlock: 10,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 16 }],\n },\n {\n ecCodewordsPerBlock: 13,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 13 }],\n },\n {\n ecCodewordsPerBlock: 17,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 9 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 2,\n alignmentPatternCenters: [6, 18],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 10,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 34 }],\n },\n {\n ecCodewordsPerBlock: 16,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 28 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 22 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 16 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 3,\n alignmentPatternCenters: [6, 22],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 15,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 55 }],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 44 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 17 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 13 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 4,\n alignmentPatternCenters: [6, 26],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 80 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 32 }],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 24 }],\n },\n {\n ecCodewordsPerBlock: 16,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 9 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 5,\n alignmentPatternCenters: [6, 30],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 108 }],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 43 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 15 },\n { numBlocks: 2, dataCodewordsPerBlock: 16 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 11 },\n { numBlocks: 2, dataCodewordsPerBlock: 12 },\n ],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 6,\n alignmentPatternCenters: [6, 34],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 68 }],\n },\n {\n ecCodewordsPerBlock: 16,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 27 }],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 19 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 15 }],\n },\n ],\n },\n {\n infoBits: 0x07C94,\n versionNumber: 7,\n alignmentPatternCenters: [6, 22, 38],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 78 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 31 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 14 },\n { numBlocks: 4, dataCodewordsPerBlock: 15 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 13 },\n { numBlocks: 1, dataCodewordsPerBlock: 14 },\n ],\n },\n ],\n },\n {\n infoBits: 0x085BC,\n versionNumber: 8,\n alignmentPatternCenters: [6, 24, 42],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 97 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 38 },\n { numBlocks: 2, dataCodewordsPerBlock: 39 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 18 },\n { numBlocks: 2, dataCodewordsPerBlock: 19 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 14 },\n { numBlocks: 2, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x09A99,\n versionNumber: 9,\n alignmentPatternCenters: [6, 26, 46],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 116 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 36 },\n { numBlocks: 2, dataCodewordsPerBlock: 37 },\n ],\n },\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 16 },\n { numBlocks: 4, dataCodewordsPerBlock: 17 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 12 },\n { numBlocks: 4, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0A4D3,\n versionNumber: 10,\n alignmentPatternCenters: [6, 28, 50],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 68 },\n { numBlocks: 2, dataCodewordsPerBlock: 69 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 43 },\n { numBlocks: 1, dataCodewordsPerBlock: 44 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 19 },\n { numBlocks: 2, dataCodewordsPerBlock: 20 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 15 },\n { numBlocks: 2, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0BBF6,\n versionNumber: 11,\n alignmentPatternCenters: [6, 30, 54],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 81 }],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 50 },\n { numBlocks: 4, dataCodewordsPerBlock: 51 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 22 },\n { numBlocks: 4, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 12 },\n { numBlocks: 8, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0C762,\n versionNumber: 12,\n alignmentPatternCenters: [6, 32, 58],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 92 },\n { numBlocks: 2, dataCodewordsPerBlock: 93 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 36 },\n { numBlocks: 2, dataCodewordsPerBlock: 37 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 20 },\n { numBlocks: 6, dataCodewordsPerBlock: 21 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 14 },\n { numBlocks: 4, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0D847,\n versionNumber: 13,\n alignmentPatternCenters: [6, 34, 62],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 107 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 37 },\n { numBlocks: 1, dataCodewordsPerBlock: 38 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 20 },\n { numBlocks: 4, dataCodewordsPerBlock: 21 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 11 },\n { numBlocks: 4, dataCodewordsPerBlock: 12 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0E60D,\n versionNumber: 14,\n alignmentPatternCenters: [6, 26, 46, 66],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 115 },\n { numBlocks: 1, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 40 },\n { numBlocks: 5, dataCodewordsPerBlock: 41 },\n ],\n },\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 16 },\n { numBlocks: 5, dataCodewordsPerBlock: 17 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 12 },\n { numBlocks: 5, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0F928,\n versionNumber: 15,\n alignmentPatternCenters: [6, 26, 48, 70],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 87 },\n { numBlocks: 1, dataCodewordsPerBlock: 88 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 41 },\n { numBlocks: 5, dataCodewordsPerBlock: 42 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 24 },\n { numBlocks: 7, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 12 },\n { numBlocks: 7, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x10B78,\n versionNumber: 16,\n alignmentPatternCenters: [6, 26, 50, 74],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 98 },\n { numBlocks: 1, dataCodewordsPerBlock: 99 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 45 },\n { numBlocks: 3, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 19 },\n { numBlocks: 2, dataCodewordsPerBlock: 20 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 15 },\n { numBlocks: 13, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1145D,\n versionNumber: 17,\n alignmentPatternCenters: [6, 30, 54, 78],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 107 },\n { numBlocks: 5, dataCodewordsPerBlock: 108 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 46 },\n { numBlocks: 1, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 22 },\n { numBlocks: 15, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 14 },\n { numBlocks: 17, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x12A17,\n versionNumber: 18,\n alignmentPatternCenters: [6, 30, 56, 82],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 120 },\n { numBlocks: 1, dataCodewordsPerBlock: 121 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 9, dataCodewordsPerBlock: 43 },\n { numBlocks: 4, dataCodewordsPerBlock: 44 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 22 },\n { numBlocks: 1, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 14 },\n { numBlocks: 19, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x13532,\n versionNumber: 19,\n alignmentPatternCenters: [6, 30, 58, 86],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 113 },\n { numBlocks: 4, dataCodewordsPerBlock: 114 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 44 },\n { numBlocks: 11, dataCodewordsPerBlock: 45 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 21 },\n { numBlocks: 4, dataCodewordsPerBlock: 22 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 9, dataCodewordsPerBlock: 13 },\n { numBlocks: 16, dataCodewordsPerBlock: 14 },\n ],\n },\n ],\n },\n {\n infoBits: 0x149A6,\n versionNumber: 20,\n alignmentPatternCenters: [6, 34, 62, 90],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 107 },\n { numBlocks: 5, dataCodewordsPerBlock: 108 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 41 },\n { numBlocks: 13, dataCodewordsPerBlock: 42 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 24 },\n { numBlocks: 5, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 15 },\n { numBlocks: 10, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x15683,\n versionNumber: 21,\n alignmentPatternCenters: [6, 28, 50, 72, 94],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 116 },\n { numBlocks: 4, dataCodewordsPerBlock: 117 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 42 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 22 },\n { numBlocks: 6, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 16 },\n { numBlocks: 6, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x168C9,\n versionNumber: 22,\n alignmentPatternCenters: [6, 26, 50, 74, 98],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 111 },\n { numBlocks: 7, dataCodewordsPerBlock: 112 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 46 }],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 24 },\n { numBlocks: 16, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 34, dataCodewordsPerBlock: 13 }],\n },\n ],\n },\n {\n infoBits: 0x177EC,\n versionNumber: 23,\n alignmentPatternCenters: [6, 30, 54, 74, 102],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 121 },\n { numBlocks: 5, dataCodewordsPerBlock: 122 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 47 },\n { numBlocks: 14, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 24 },\n { numBlocks: 14, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 16, dataCodewordsPerBlock: 15 },\n { numBlocks: 14, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x18EC4,\n versionNumber: 24,\n alignmentPatternCenters: [6, 28, 54, 80, 106],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 117 },\n { numBlocks: 4, dataCodewordsPerBlock: 118 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 45 },\n { numBlocks: 14, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 24 },\n { numBlocks: 16, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 30, dataCodewordsPerBlock: 16 },\n { numBlocks: 2, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x191E1,\n versionNumber: 25,\n alignmentPatternCenters: [6, 32, 58, 84, 110],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 106 },\n { numBlocks: 4, dataCodewordsPerBlock: 107 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 47 },\n { numBlocks: 13, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 24 },\n { numBlocks: 22, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 22, dataCodewordsPerBlock: 15 },\n { numBlocks: 13, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1AFAB,\n versionNumber: 26,\n alignmentPatternCenters: [6, 30, 58, 86, 114],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 114 },\n { numBlocks: 2, dataCodewordsPerBlock: 115 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 46 },\n { numBlocks: 4, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 28, dataCodewordsPerBlock: 22 },\n { numBlocks: 6, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 33, dataCodewordsPerBlock: 16 },\n { numBlocks: 4, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1B08E,\n versionNumber: 27,\n alignmentPatternCenters: [6, 34, 62, 90, 118],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 122 },\n { numBlocks: 4, dataCodewordsPerBlock: 123 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 22, dataCodewordsPerBlock: 45 },\n { numBlocks: 3, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 23 },\n { numBlocks: 26, dataCodewordsPerBlock: 24 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 15 },\n { numBlocks: 28, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1CC1A,\n versionNumber: 28,\n alignmentPatternCenters: [6, 26, 50, 74, 98, 122],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 117 },\n { numBlocks: 10, dataCodewordsPerBlock: 118 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 45 },\n { numBlocks: 23, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 24 },\n { numBlocks: 31, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 15 },\n { numBlocks: 31, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1D33F,\n versionNumber: 29,\n alignmentPatternCenters: [6, 30, 54, 78, 102, 126],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 116 },\n { numBlocks: 7, dataCodewordsPerBlock: 117 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 21, dataCodewordsPerBlock: 45 },\n { numBlocks: 7, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 23 },\n { numBlocks: 37, dataCodewordsPerBlock: 24 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 15 },\n { numBlocks: 26, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1ED75,\n versionNumber: 30,\n alignmentPatternCenters: [6, 26, 52, 78, 104, 130],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 115 },\n { numBlocks: 10, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 47 },\n { numBlocks: 10, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 24 },\n { numBlocks: 25, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 23, dataCodewordsPerBlock: 15 },\n { numBlocks: 25, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1F250,\n versionNumber: 31,\n alignmentPatternCenters: [6, 30, 56, 82, 108, 134],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 13, dataCodewordsPerBlock: 115 },\n { numBlocks: 3, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 46 },\n { numBlocks: 29, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 42, dataCodewordsPerBlock: 24 },\n { numBlocks: 1, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 23, dataCodewordsPerBlock: 15 },\n { numBlocks: 28, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x209D5,\n versionNumber: 32,\n alignmentPatternCenters: [6, 34, 60, 86, 112, 138],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 115 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 46 },\n { numBlocks: 23, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 24 },\n { numBlocks: 35, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 15 },\n { numBlocks: 35, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x216F0,\n versionNumber: 33,\n alignmentPatternCenters: [6, 30, 58, 86, 114, 142],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 115 },\n { numBlocks: 1, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 14, dataCodewordsPerBlock: 46 },\n { numBlocks: 21, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 29, dataCodewordsPerBlock: 24 },\n { numBlocks: 19, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 15 },\n { numBlocks: 46, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x228BA,\n versionNumber: 34,\n alignmentPatternCenters: [6, 34, 62, 90, 118, 146],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 13, dataCodewordsPerBlock: 115 },\n { numBlocks: 6, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 14, dataCodewordsPerBlock: 46 },\n { numBlocks: 23, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 44, dataCodewordsPerBlock: 24 },\n { numBlocks: 7, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 59, dataCodewordsPerBlock: 16 },\n { numBlocks: 1, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x2379F,\n versionNumber: 35,\n alignmentPatternCenters: [6, 30, 54, 78, 102, 126, 150],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 121 },\n { numBlocks: 7, dataCodewordsPerBlock: 122 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 47 },\n { numBlocks: 26, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 39, dataCodewordsPerBlock: 24 },\n { numBlocks: 14, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 22, dataCodewordsPerBlock: 15 },\n { numBlocks: 41, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x24B0B,\n versionNumber: 36,\n alignmentPatternCenters: [6, 24, 50, 76, 102, 128, 154],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 121 },\n { numBlocks: 14, dataCodewordsPerBlock: 122 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 47 },\n { numBlocks: 34, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 46, dataCodewordsPerBlock: 24 },\n { numBlocks: 10, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 15 },\n { numBlocks: 64, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x2542E,\n versionNumber: 37,\n alignmentPatternCenters: [6, 28, 54, 80, 106, 132, 158],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 122 },\n { numBlocks: 4, dataCodewordsPerBlock: 123 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 29, dataCodewordsPerBlock: 46 },\n { numBlocks: 14, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 49, dataCodewordsPerBlock: 24 },\n { numBlocks: 10, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 24, dataCodewordsPerBlock: 15 },\n { numBlocks: 46, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x26A64,\n versionNumber: 38,\n alignmentPatternCenters: [6, 32, 58, 84, 110, 136, 162],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 122 },\n { numBlocks: 18, dataCodewordsPerBlock: 123 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 13, dataCodewordsPerBlock: 46 },\n { numBlocks: 32, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 48, dataCodewordsPerBlock: 24 },\n { numBlocks: 14, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 42, dataCodewordsPerBlock: 15 },\n { numBlocks: 32, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x27541,\n versionNumber: 39,\n alignmentPatternCenters: [6, 26, 54, 82, 110, 138, 166],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 20, dataCodewordsPerBlock: 117 },\n { numBlocks: 4, dataCodewordsPerBlock: 118 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 40, dataCodewordsPerBlock: 47 },\n { numBlocks: 7, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 43, dataCodewordsPerBlock: 24 },\n { numBlocks: 22, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 15 },\n { numBlocks: 67, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x28C69,\n versionNumber: 40,\n alignmentPatternCenters: [6, 30, 58, 86, 114, 142, 170],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 118 },\n { numBlocks: 6, dataCodewordsPerBlock: 119 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 18, dataCodewordsPerBlock: 47 },\n { numBlocks: 31, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 34, dataCodewordsPerBlock: 24 },\n { numBlocks: 34, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 20, dataCodewordsPerBlock: 15 },\n { numBlocks: 61, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n ];\n \n \n /***/ }),\n /* 11 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var BitMatrix_1 = __webpack_require__(0);\n function squareToQuadrilateral(p1, p2, p3, p4) {\n var dx3 = p1.x - p2.x + p3.x - p4.x;\n var dy3 = p1.y - p2.y + p3.y - p4.y;\n if (dx3 === 0 && dy3 === 0) {\n return {\n a11: p2.x - p1.x,\n a12: p2.y - p1.y,\n a13: 0,\n a21: p3.x - p2.x,\n a22: p3.y - p2.y,\n a23: 0,\n a31: p1.x,\n a32: p1.y,\n a33: 1,\n };\n }\n else {\n var dx1 = p2.x - p3.x;\n var dx2 = p4.x - p3.x;\n var dy1 = p2.y - p3.y;\n var dy2 = p4.y - p3.y;\n var denominator = dx1 * dy2 - dx2 * dy1;\n var a13 = (dx3 * dy2 - dx2 * dy3) / denominator;\n var a23 = (dx1 * dy3 - dx3 * dy1) / denominator;\n return {\n a11: p2.x - p1.x + a13 * p2.x,\n a12: p2.y - p1.y + a13 * p2.y,\n a13: a13,\n a21: p4.x - p1.x + a23 * p4.x,\n a22: p4.y - p1.y + a23 * p4.y,\n a23: a23,\n a31: p1.x,\n a32: p1.y,\n a33: 1,\n };\n }\n }\n function quadrilateralToSquare(p1, p2, p3, p4) {\n // Here, the adjoint serves as the inverse:\n var sToQ = squareToQuadrilateral(p1, p2, p3, p4);\n return {\n a11: sToQ.a22 * sToQ.a33 - sToQ.a23 * sToQ.a32,\n a12: sToQ.a13 * sToQ.a32 - sToQ.a12 * sToQ.a33,\n a13: sToQ.a12 * sToQ.a23 - sToQ.a13 * sToQ.a22,\n a21: sToQ.a23 * sToQ.a31 - sToQ.a21 * sToQ.a33,\n a22: sToQ.a11 * sToQ.a33 - sToQ.a13 * sToQ.a31,\n a23: sToQ.a13 * sToQ.a21 - sToQ.a11 * sToQ.a23,\n a31: sToQ.a21 * sToQ.a32 - sToQ.a22 * sToQ.a31,\n a32: sToQ.a12 * sToQ.a31 - sToQ.a11 * sToQ.a32,\n a33: sToQ.a11 * sToQ.a22 - sToQ.a12 * sToQ.a21,\n };\n }\n function times(a, b) {\n return {\n a11: a.a11 * b.a11 + a.a21 * b.a12 + a.a31 * b.a13,\n a12: a.a12 * b.a11 + a.a22 * b.a12 + a.a32 * b.a13,\n a13: a.a13 * b.a11 + a.a23 * b.a12 + a.a33 * b.a13,\n a21: a.a11 * b.a21 + a.a21 * b.a22 + a.a31 * b.a23,\n a22: a.a12 * b.a21 + a.a22 * b.a22 + a.a32 * b.a23,\n a23: a.a13 * b.a21 + a.a23 * b.a22 + a.a33 * b.a23,\n a31: a.a11 * b.a31 + a.a21 * b.a32 + a.a31 * b.a33,\n a32: a.a12 * b.a31 + a.a22 * b.a32 + a.a32 * b.a33,\n a33: a.a13 * b.a31 + a.a23 * b.a32 + a.a33 * b.a33,\n };\n }\n function extract(image, location) {\n var qToS = quadrilateralToSquare({ x: 3.5, y: 3.5 }, { x: location.dimension - 3.5, y: 3.5 }, { x: location.dimension - 6.5, y: location.dimension - 6.5 }, { x: 3.5, y: location.dimension - 3.5 });\n var sToQ = squareToQuadrilateral(location.topLeft, location.topRight, location.alignmentPattern, location.bottomLeft);\n var transform = times(sToQ, qToS);\n var matrix = BitMatrix_1.BitMatrix.createEmpty(location.dimension, location.dimension);\n var mappingFunction = function (x, y) {\n var denominator = transform.a13 * x + transform.a23 * y + transform.a33;\n return {\n x: (transform.a11 * x + transform.a21 * y + transform.a31) / denominator,\n y: (transform.a12 * x + transform.a22 * y + transform.a32) / denominator,\n };\n };\n for (var y = 0; y < location.dimension; y++) {\n for (var x = 0; x < location.dimension; x++) {\n var xValue = x + 0.5;\n var yValue = y + 0.5;\n var sourcePixel = mappingFunction(xValue, yValue);\n matrix.set(x, y, image.get(Math.floor(sourcePixel.x), Math.floor(sourcePixel.y)));\n }\n }\n return {\n matrix: matrix,\n mappingFunction: mappingFunction,\n };\n }\n exports.extract = extract;\n \n \n /***/ }),\n /* 12 */\n /***/ (function(module, exports, __webpack_require__) {\n \n \"use strict\";\n \n Object.defineProperty(exports, \"__esModule\", { value: true });\n var MAX_FINDERPATTERNS_TO_SEARCH = 4;\n var MIN_QUAD_RATIO = 0.5;\n var MAX_QUAD_RATIO = 1.5;\n var distance = function (a, b) { return Math.sqrt(Math.pow((b.x - a.x), 2) + Math.pow((b.y - a.y), 2)); };\n function sum(values) {\n return values.reduce(function (a, b) { return a + b; });\n }\n // Takes three finder patterns and organizes them into topLeft, topRight, etc\n function reorderFinderPatterns(pattern1, pattern2, pattern3) {\n var _a, _b, _c, _d;\n // Find distances between pattern centers\n var oneTwoDistance = distance(pattern1, pattern2);\n var twoThreeDistance = distance(pattern2, pattern3);\n var oneThreeDistance = distance(pattern1, pattern3);\n var bottomLeft;\n var topLeft;\n var topRight;\n // Assume one closest to other two is B; A and C will just be guesses at first\n if (twoThreeDistance >= oneTwoDistance && twoThreeDistance >= oneThreeDistance) {\n _a = [pattern2, pattern1, pattern3]; \n bottomLeft = _a[0]; \n topLeft = _a[1]; \n topRight = _a[2];\n }\n else if (oneThreeDistance >= twoThreeDistance && oneThreeDistance >= oneTwoDistance) {\n _b = [pattern1, pattern2, pattern3];\n bottomLeft = _b[0]; \n topLeft = _b[1];\n topRight = _b[2];\n }\n else {\n _c = [pattern1, pattern3, pattern2]; \n bottomLeft = _c[0]; \n topLeft = _c[1]; \n topRight = _c[2];\n }\n // Use cross product to figure out whether bottomLeft (A) and topRight (C) are correct or flipped in relation to topLeft (B)\n // This asks whether BC x BA has a positive z component, which is the arrangement we want. If it's negative, then\n // we've got it flipped around and should swap topRight and bottomLeft.\n if (((topRight.x - topLeft.x) * (bottomLeft.y - topLeft.y)) - ((topRight.y - topLeft.y) * (bottomLeft.x - topLeft.x)) < 0) {\n _d = [topRight, bottomLeft]; bottomLeft = _d[0]; topRight = _d[1];\n }\n return { bottomLeft: bottomLeft, topLeft: topLeft, topRight: topRight };\n }\n // Computes the dimension (number of modules on a side) of the QR Code based on the position of the finder patterns\n function computeDimension(topLeft, topRight, bottomLeft, matrix) {\n var moduleSize = (sum(countBlackWhiteRun(topLeft, bottomLeft, matrix, 5)) / 7 + // Divide by 7 since the ratio is 1:1:3:1:1\n sum(countBlackWhiteRun(topLeft, topRight, matrix, 5)) / 7 +\n sum(countBlackWhiteRun(bottomLeft, topLeft, matrix, 5)) / 7 +\n sum(countBlackWhiteRun(topRight, topLeft, matrix, 5)) / 7) / 4;\n if (moduleSize < 1) {\n throw new Error(\"Invalid module size\");\n }\n var topDimension = Math.round(distance(topLeft, topRight) / moduleSize);\n var sideDimension = Math.round(distance(topLeft, bottomLeft) / moduleSize);\n var dimension = Math.floor((topDimension + sideDimension) / 2) + 7;\n switch (dimension % 4) {\n case 0:\n dimension++;\n break;\n case 2:\n dimension--;\n break;\n }\n return { dimension: dimension, moduleSize: moduleSize };\n }\n // Takes an origin point and an end point and counts the sizes of the black white run from the origin towards the end point.\n // Returns an array of elements, representing the pixel size of the black white run.\n // Uses a variant of http://en.wikipedia.org/wiki/Bresenham's_line_algorithm\n function countBlackWhiteRunTowardsPoint(origin, end, matrix, length) {\n var switchPoints = [{ x: Math.floor(origin.x), y: Math.floor(origin.y) }];\n var steep = Math.abs(end.y - origin.y) > Math.abs(end.x - origin.x);\n var fromX;\n var fromY;\n var toX;\n var toY;\n if (steep) {\n fromX = Math.floor(origin.y);\n fromY = Math.floor(origin.x);\n toX = Math.floor(end.y);\n toY = Math.floor(end.x);\n }\n else {\n fromX = Math.floor(origin.x);\n fromY = Math.floor(origin.y);\n toX = Math.floor(end.x);\n toY = Math.floor(end.y);\n }\n var dx = Math.abs(toX - fromX);\n var dy = Math.abs(toY - fromY);\n var error = Math.floor(-dx / 2);\n var xStep = fromX < toX ? 1 : -1;\n var yStep = fromY < toY ? 1 : -1;\n var currentPixel = true;\n // Loop up until x == toX, but not beyond\n for (var x = fromX, y = fromY; x !== toX + xStep; x += xStep) {\n // Does current pixel mean we have moved white to black or vice versa?\n // Scanning black in state 0,2 and white in state 1, so if we find the wrong\n // color, advance to next state or end if we are in state 2 already\n var realX = steep ? y : x;\n var realY = steep ? x : y;\n if (matrix.get(realX, realY) !== currentPixel) {\n currentPixel = !currentPixel;\n switchPoints.push({ x: realX, y: realY });\n if (switchPoints.length === length + 1) {\n break;\n }\n }\n error += dy;\n if (error > 0) {\n if (y === toY) {\n break;\n }\n y += yStep;\n error -= dx;\n }\n }\n var distances = [];\n for (var i = 0; i < length; i++) {\n if (switchPoints[i] && switchPoints[i + 1]) {\n distances.push(distance(switchPoints[i], switchPoints[i + 1]));\n }\n else {\n distances.push(0);\n }\n }\n return distances;\n }\n // Takes an origin point and an end point and counts the sizes of the black white run in the origin point\n // along the line that intersects with the end point. Returns an array of elements, representing the pixel sizes\n // of the black white run. Takes a length which represents the number of switches from black to white to look for.\n function countBlackWhiteRun(origin, end, matrix, length) {\n var _a;\n var rise = end.y - origin.y;\n var run = end.x - origin.x;\n var towardsEnd = countBlackWhiteRunTowardsPoint(origin, end, matrix, Math.ceil(length / 2));\n var awayFromEnd = countBlackWhiteRunTowardsPoint(origin, { x: origin.x - run, y: origin.y - rise }, matrix, Math.ceil(length / 2));\n var middleValue = towardsEnd.shift() + awayFromEnd.shift() - 1; // Substract one so we don't double count a pixel\n return (_a = awayFromEnd.concat(middleValue)).concat.apply(_a, towardsEnd);\n }\n // Takes in a black white run and an array of expected ratios. Returns the average size of the run as well as the \"error\" -\n // that is the amount the run diverges from the expected ratio\n function scoreBlackWhiteRun(sequence, ratios) {\n var averageSize = sum(sequence) / sum(ratios);\n var error = 0;\n ratios.forEach(function (ratio, i) {\n error += Math.pow((sequence[i] - ratio * averageSize), 2);\n });\n return { averageSize: averageSize, error: error };\n }\n // Takes an X,Y point and an array of sizes and scores the point against those ratios.\n // For example for a finder pattern takes the ratio list of 1:1:3:1:1 and checks horizontal, vertical and diagonal ratios\n // against that.\n function scorePattern(point, ratios, matrix) {\n try {\n var horizontalRun = countBlackWhiteRun(point, { x: -1, y: point.y }, matrix, ratios.length);\n var verticalRun = countBlackWhiteRun(point, { x: point.x, y: -1 }, matrix, ratios.length);\n var topLeftPoint = {\n x: Math.max(0, point.x - point.y) - 1,\n y: Math.max(0, point.y - point.x) - 1,\n };\n var topLeftBottomRightRun = countBlackWhiteRun(point, topLeftPoint, matrix, ratios.length);\n var bottomLeftPoint = {\n x: Math.min(matrix.width, point.x + point.y) + 1,\n y: Math.min(matrix.height, point.y + point.x) + 1,\n };\n var bottomLeftTopRightRun = countBlackWhiteRun(point, bottomLeftPoint, matrix, ratios.length);\n var horzError = scoreBlackWhiteRun(horizontalRun, ratios);\n var vertError = scoreBlackWhiteRun(verticalRun, ratios);\n var diagDownError = scoreBlackWhiteRun(topLeftBottomRightRun, ratios);\n var diagUpError = scoreBlackWhiteRun(bottomLeftTopRightRun, ratios);\n var ratioError = Math.sqrt(horzError.error * horzError.error +\n vertError.error * vertError.error +\n diagDownError.error * diagDownError.error +\n diagUpError.error * diagUpError.error);\n var avgSize = (horzError.averageSize + vertError.averageSize + diagDownError.averageSize + diagUpError.averageSize) / 4;\n var sizeError = (Math.pow((horzError.averageSize - avgSize), 2) +\n Math.pow((vertError.averageSize - avgSize), 2) +\n Math.pow((diagDownError.averageSize - avgSize), 2) +\n Math.pow((diagUpError.averageSize - avgSize), 2)) / avgSize;\n return ratioError + sizeError;\n }\n catch (_a) {\n return Infinity;\n }\n }\n function locate(matrix) {\n var matchingQuads;\n var _b;\n var finderPatternQuads = [];\n var activeFinderPatternQuads = [];\n var alignmentPatternQuads = [];\n var activeAlignmentPatternQuads = [];\n var line;\n var _loop_1 = function (y) {\n var length_1 = 0;\n var lastBit = false;\n var scans = [0, 0, 0, 0, 0];\n var _loop_2 = function (x) {\n var v = matrix.get(x, y);\n if (v === lastBit) {\n length_1++;\n }\n else {\n scans = [scans[1], scans[2], scans[3], scans[4], length_1];\n length_1 = 1;\n lastBit = v;\n // Do the last 5 color changes ~ match the expected ratio for a finder pattern? 1:1:3:1:1 of b:w:b:w:b\n var averageFinderPatternBlocksize = sum(scans) / 7;\n var validFinderPattern = Math.abs(scans[0] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n Math.abs(scans[1] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n Math.abs(scans[2] - 3 * averageFinderPatternBlocksize) < 3 * averageFinderPatternBlocksize &&\n Math.abs(scans[3] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n Math.abs(scans[4] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n !v; // And make sure the current pixel is white since finder patterns are bordered in white\n // Do the last 3 color changes ~ match the expected ratio for an alignment pattern? 1:1:1 of w:b:w\n var averageAlignmentPatternBlocksize = sum(scans.slice(-3)) / 3;\n var validAlignmentPattern = Math.abs(scans[2] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize &&\n Math.abs(scans[3] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize &&\n Math.abs(scans[4] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize &&\n v; // Is the current pixel black since alignment patterns are bordered in black\n if (validFinderPattern) {\n // Compute the start and end x values of the large center black square\n var endX_1 = x - scans[3] - scans[4];\n var startX_1 = endX_1 - scans[2];\n line = { startX: startX_1, endX: endX_1, y: y };\n // Is there a quad directly above the current spot? If so, extend it with the new line. Otherwise, create a new quad with\n // that line as the starting point.\n matchingQuads = activeFinderPatternQuads.filter(function (q) {\n return (startX_1 >= q.bottom.startX && startX_1 <= q.bottom.endX) ||\n (endX_1 >= q.bottom.startX && startX_1 <= q.bottom.endX) ||\n (startX_1 <= q.bottom.startX && endX_1 >= q.bottom.endX && ((scans[2] / (q.bottom.endX - q.bottom.startX)) < MAX_QUAD_RATIO &&\n (scans[2] / (q.bottom.endX - q.bottom.startX)) > MIN_QUAD_RATIO));\n });\n if (matchingQuads.length > 0) {\n matchingQuads[0].bottom = line;\n }\n else {\n activeFinderPatternQuads.push({ top: line, bottom: line });\n }\n }\n if (validAlignmentPattern) {\n // Compute the start and end x values of the center black square\n var endX_2 = x - scans[4];\n var startX_2 = endX_2 - scans[3];\n line = { startX: startX_2, y: y, endX: endX_2 };\n // Is there a quad directly above the current spot? If so, extend it with the new line. Otherwise, create a new quad with\n // that line as the starting point.\n matchingQuads = activeAlignmentPatternQuads.filter(function (q) {\n return (startX_2 >= q.bottom.startX && startX_2 <= q.bottom.endX) ||\n (endX_2 >= q.bottom.startX && startX_2 <= q.bottom.endX) ||\n (startX_2 <= q.bottom.startX && endX_2 >= q.bottom.endX && ((scans[2] / (q.bottom.endX - q.bottom.startX)) < MAX_QUAD_RATIO &&\n (scans[2] / (q.bottom.endX - q.bottom.startX)) > MIN_QUAD_RATIO));\n });\n if (matchingQuads.length > 0) {\n matchingQuads[0].bottom = line;\n }\n else {\n activeAlignmentPatternQuads.push({ top: line, bottom: line });\n }\n }\n }\n };\n for (var x = -1; x <= matrix.width; x++) {\n _loop_2(x);\n }\n finderPatternQuads.push.apply(finderPatternQuads, activeFinderPatternQuads.filter(function (q) { return q.bottom.y !== y && q.bottom.y - q.top.y >= 2; }));\n activeFinderPatternQuads = activeFinderPatternQuads.filter(function (q) { return q.bottom.y === y; });\n alignmentPatternQuads.push.apply(alignmentPatternQuads, activeAlignmentPatternQuads.filter(function (q) { return q.bottom.y !== y; }));\n activeAlignmentPatternQuads = activeAlignmentPatternQuads.filter(function (q) { return q.bottom.y === y; });\n };\n for (var y = 0; y <= matrix.height; y++) {\n _loop_1(y);\n }\n finderPatternQuads.push.apply(finderPatternQuads, activeFinderPatternQuads.filter(function (q) { return q.bottom.y - q.top.y >= 2; }));\n alignmentPatternQuads.push.apply(alignmentPatternQuads, activeAlignmentPatternQuads);\n var finderPatternGroups = finderPatternQuads\n .filter(function (q) { return q.bottom.y - q.top.y >= 2; }) // All quads must be at least 2px tall since the center square is larger than a block\n .map(function (q) {\n var x = (q.top.startX + q.top.endX + q.bottom.startX + q.bottom.endX) / 4;\n var y = (q.top.y + q.bottom.y + 1) / 2;\n if (!matrix.get(Math.round(x), Math.round(y))) {\n return;\n }\n var lengths = [q.top.endX - q.top.startX, q.bottom.endX - q.bottom.startX, q.bottom.y - q.top.y + 1];\n var size = sum(lengths) / lengths.length;\n var score = scorePattern({ x: Math.round(x), y: Math.round(y) }, [1, 1, 3, 1, 1], matrix);\n return { score: score, x: x, y: y, size: size };\n })\n .filter(function (q) { return !!q; }) // Filter out any rejected quads from above\n .sort(function (a, b) { return a.score - b.score; })\n .map(function (point, i, finderPatterns) {\n if (i > MAX_FINDERPATTERNS_TO_SEARCH) {\n return null;\n }\n var otherPoints = finderPatterns\n .filter(function (p, ii) { return i !== ii; })\n .map(function (p) { return ({ x: p.x, y: p.y, score: p.score + (Math.pow((p.size - point.size), 2)) / point.size, size: p.size }); })\n .sort(function (a, b) { return a.score - b.score; });\n if (otherPoints.length < 2) {\n return null;\n }\n var score = point.score + otherPoints[0].score + otherPoints[1].score;\n return { points: [point].concat(otherPoints.slice(0, 2)), score: score };\n })\n .filter(function (q) { return !!q; }) // Filter out any rejected finder patterns from above\n .sort(function (a, b) { return a.score - b.score; });\n if (finderPatternGroups.length === 0) {\n return null;\n }\n var _a = reorderFinderPatterns(finderPatternGroups[0].points[0], finderPatternGroups[0].points[1], finderPatternGroups[0].points[2]), topRight = _a.topRight, topLeft = _a.topLeft, bottomLeft = _a.bottomLeft;\n // Now that we've found the three finder patterns we can determine the blockSize and the size of the QR code.\n // We'll use these to help find the alignment pattern but also later when we do the extraction.\n var dimension;\n var moduleSize;\n try {\n _b = computeDimension(topLeft, topRight, bottomLeft, matrix); \n dimension = _b.dimension; \n moduleSize = _b.moduleSize;\n }\n catch (e) {\n return null;\n }\n // Now find the alignment pattern\n var bottomRightFinderPattern = {\n x: topRight.x - topLeft.x + bottomLeft.x,\n y: topRight.y - topLeft.y + bottomLeft.y,\n };\n var modulesBetweenFinderPatterns = ((distance(topLeft, bottomLeft) + distance(topLeft, topRight)) / 2 / moduleSize);\n var correctionToTopLeft = 1 - (3 / modulesBetweenFinderPatterns);\n var expectedAlignmentPattern = {\n x: topLeft.x + correctionToTopLeft * (bottomRightFinderPattern.x - topLeft.x),\n y: topLeft.y + correctionToTopLeft * (bottomRightFinderPattern.y - topLeft.y),\n };\n var alignmentPatterns = alignmentPatternQuads\n .map(function (q) {\n var x = (q.top.startX + q.top.endX + q.bottom.startX + q.bottom.endX) / 4;\n var y = (q.top.y + q.bottom.y + 1) / 2;\n if (!matrix.get(Math.floor(x), Math.floor(y))) {\n return;\n }\n var lengths = [q.top.endX - q.top.startX, q.bottom.endX - q.bottom.startX, (q.bottom.y - q.top.y + 1)];\n var size = sum(lengths) / lengths.length;\n var sizeScore = scorePattern({ x: Math.floor(x), y: Math.floor(y) }, [1, 1, 1], matrix);\n var score = sizeScore + distance({ x: x, y: y }, expectedAlignmentPattern);\n return { x: x, y: y, score: score };\n })\n .filter(function (v) { return !!v; })\n .sort(function (a, b) { return a.score - b.score; });\n // If there are less than 15 modules between finder patterns it's a version 1 QR code and as such has no alignmemnt pattern\n // so we can only use our best guess.\n var alignmentPattern = modulesBetweenFinderPatterns >= 15 && alignmentPatterns.length ? alignmentPatterns[0] : expectedAlignmentPattern;\n return {\n alignmentPattern: { x: alignmentPattern.x, y: alignmentPattern.y },\n bottomLeft: { x: bottomLeft.x, y: bottomLeft.y },\n dimension: dimension,\n topLeft: { x: topLeft.x, y: topLeft.y },\n topRight: { x: topRight.x, y: topRight.y },\n };\n \n }\n exports.locate = locate;\n \n \n /***/ })\n /******/ ])[\"default\"];\n });\n \n }", "title": "" }, { "docid": "f40cce7dff50b6e81852ace95e85ce6b", "score": "0.4771984", "text": "function woocommerce_scripts_load() {\n\n\tif ( empty(woocommerce_scripts_load.bound) ) {\n\n\t\t/**\n\t\t * Start Woocommerce scripts\n\t\t *\n\t\t * Since our theme uses ajax to load pages we need to load all woocommerce scripts once on site\n\t\t * Also when you update woocommerce scripts these steps are required:\n\t\t *\n\t\t * - use grunt/gulp to concatenate all woocommerce scripts and replace them below\n\t\t * - keep the lines 961 and 967 (until we get a fix)\n\t\t * - test all woocommerce pages with ajax loaded and unloaded.\n\t\t */\n\n\t\tjQuery(function($){\n\n\t\t\t// woocommerce_params is required to continue, ensure the object exists\n\t\t\tif (typeof woocommerce_params === \"undefined\")\n\t\t\t\treturn false;\n\n\t\t\t// jquery payment\n\t\t\t(function(){var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b=[].slice,w=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},E=this;e=jQuery;e.payment={};e.payment.fn={};e.fn.payment=function(){var t,n;n=arguments[0],t=2<=arguments.length?b.call(arguments,1):[];return e.payment.fn[n].apply(this,t)};i=/(\\d{1,4})/g;r=[{type:\"maestro\",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,format:i,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:\"dinersclub\",pattern:/^(36|38|30[0-5])/,format:i,length:[14],cvcLength:[3],luhn:!0},{type:\"laser\",pattern:/^(6706|6771|6709)/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:\"jcb\",pattern:/^35/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:\"unionpay\",pattern:/^62/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:\"discover\",pattern:/^(6011|65|64[4-9]|622)/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:\"mastercard\",pattern:/^5[1-5]/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:\"amex\",pattern:/^3[47]/,format:/(\\d{1,4})(\\d{1,6})?(\\d{1,5})?/,length:[15],cvcLength:[3,4],luhn:!0},{type:\"visa\",pattern:/^4/,format:i,length:[13,14,15,16],cvcLength:[3],luhn:!0}];t=function(e){var t,n,i;e=(e+\"\").replace(/\\D/g,\"\");for(n=0,i=r.length;n<i;n++){t=r[n];if(t.pattern.test(e))return t}};n=function(e){var t,n,i;for(n=0,i=r.length;n<i;n++){t=r[n];if(t.type===e)return t}};h=function(e){var t,n,r,i,s,o;r=!0;i=0;n=(e+\"\").split(\"\").reverse();for(s=0,o=n.length;s<o;s++){t=n[s];t=parseInt(t,10);if(r=!r)t*=2;t>9&&(t-=9);i+=t}return i%10===0};c=function(e){var t;return e.prop(\"selectionStart\")!=null&&e.prop(\"selectionStart\")!==e.prop(\"selectionEnd\")?!0:(typeof document!=\"undefined\"&&document!==null?(t=document.selection)!=null?typeof t.createRange==\"function\"?t.createRange().text:void 0:void 0:void 0)?!0:!1};p=function(t){var n=this;return setTimeout(function(){var n,r;n=e(t.currentTarget);r=n.val();r=e.payment.formatCardNumber(r);return n.val(r)})};u=function(n){var r,i,s,o,u,a,f;s=String.fromCharCode(n.which);if(!/^\\d+$/.test(s))return;r=e(n.currentTarget);f=r.val();i=t(f+s);o=(f.replace(/\\D/g,\"\")+s).length;a=16;i&&(a=i.length[i.length.length-1]);if(o>=a)return;if(r.prop(\"selectionStart\")!=null&&r.prop(\"selectionStart\")!==f.length)return;i&&i.type===\"amex\"?u=/^(\\d{4}|\\d{4}\\s\\d{6})$/:u=/(?:^|\\s)(\\d{4})$/;if(u.test(f)){n.preventDefault();return r.val(f+\" \"+s)}if(u.test(f+s)){n.preventDefault();return r.val(f+s+\" \")}};s=function(t){var n,r;n=e(t.currentTarget);r=n.val();if(t.meta)return;if(t.which!==8)return;if(n.prop(\"selectionStart\")!=null&&n.prop(\"selectionStart\")!==r.length)return;if(/\\d\\s$/.test(r)){t.preventDefault();return n.val(r.replace(/\\d\\s$/,\"\"))}if(/\\s\\d?$/.test(r)){t.preventDefault();return n.val(r.replace(/\\s\\d?$/,\"\"))}};a=function(t){var n,r,i;r=String.fromCharCode(t.which);if(!/^\\d+$/.test(r))return;n=e(t.currentTarget);i=n.val()+r;if(/^\\d$/.test(i)&&i!==\"0\"&&i!==\"1\"){t.preventDefault();return n.val(\"0\"+i+\" / \")}if(/^\\d\\d$/.test(i)){t.preventDefault();return n.val(\"\"+i+\" / \")}};f=function(t){var n,r,i;r=String.fromCharCode(t.which);if(!/^\\d+$/.test(r))return;n=e(t.currentTarget);i=n.val();if(/^\\d\\d$/.test(i))return n.val(\"\"+i+\" / \")};l=function(t){var n,r,i;r=String.fromCharCode(t.which);if(r!==\"/\")return;n=e(t.currentTarget);i=n.val();if(/^\\d$/.test(i)&&i!==\"0\")return n.val(\"0\"+i+\" / \")};o=function(t){var n,r;if(t.meta)return;n=e(t.currentTarget);r=n.val();if(t.which!==8)return;if(n.prop(\"selectionStart\")!=null&&n.prop(\"selectionStart\")!==r.length)return;if(/\\d(\\s|\\/)+$/.test(r)){t.preventDefault();return n.val(r.replace(/\\d(\\s|\\/)*$/,\"\"))}if(/\\s\\/\\s?\\d?$/.test(r)){t.preventDefault();return n.val(r.replace(/\\s\\/\\s?\\d?$/,\"\"))}};g=function(e){var t;if(e.metaKey||e.ctrlKey)return!0;if(e.which===32)return!1;if(e.which===0)return!0;if(e.which<33)return!0;t=String.fromCharCode(e.which);return!!/[\\d\\s]/.test(t)};v=function(n){var r,i,s,o;r=e(n.currentTarget);s=String.fromCharCode(n.which);if(!/^\\d+$/.test(s))return;if(c(r))return;o=(r.val()+s).replace(/\\D/g,\"\");i=t(o);return i?o.length<=i.length[i.length.length-1]:o.length<=16};m=function(t){var n,r,i;n=e(t.currentTarget);r=String.fromCharCode(t.which);if(!/^\\d+$/.test(r))return;if(c(n))return;i=n.val()+r;i=i.replace(/\\D/g,\"\");if(i.length>6)return!1};d=function(t){var n,r,i;n=e(t.currentTarget);r=String.fromCharCode(t.which);if(!/^\\d+$/.test(r))return;i=n.val()+r;return i.length<=4};y=function(t){var n,i,s,o,u;n=e(t.currentTarget);u=n.val();o=e.payment.cardType(u)||\"unknown\";if(!n.hasClass(o)){i=function(){var e,t,n;n=[];for(e=0,t=r.length;e<t;e++){s=r[e];n.push(s.type)}return n}();n.removeClass(\"unknown\");n.removeClass(i.join(\" \"));n.addClass(o);n.toggleClass(\"identified\",o!==\"unknown\");return n.trigger(\"payment.cardType\",o)}};e.payment.fn.formatCardCVC=function(){this.payment(\"restrictNumeric\");this.on(\"keypress\",d);return this};e.payment.fn.formatCardExpiry=function(){this.payment(\"restrictNumeric\");this.on(\"keypress\",m);this.on(\"keypress\",a);this.on(\"keypress\",l);this.on(\"keypress\",f);this.on(\"keydown\",o);return this};e.payment.fn.formatCardNumber=function(){this.payment(\"restrictNumeric\");this.on(\"keypress\",v);this.on(\"keypress\",u);this.on(\"keydown\",s);this.on(\"keyup\",y);this.on(\"paste\",p);return this};e.payment.fn.restrictNumeric=function(){this.on(\"keypress\",g);return this};e.payment.fn.cardExpiryVal=function(){return e.payment.cardExpiryVal(e(this).val())};e.payment.cardExpiryVal=function(e){var t,n,r,i;e=e.replace(/\\s/g,\"\");i=e.split(\"/\",2),t=i[0],r=i[1];if((r!=null?r.length:void 0)===2&&/^\\d+$/.test(r)){n=(new Date).getFullYear();n=n.toString().slice(0,2);r=n+r}t=parseInt(t,10);r=parseInt(r,10);return{month:t,year:r}};e.payment.validateCardNumber=function(e){var n,r;e=(e+\"\").replace(/\\s+|-/g,\"\");if(!/^\\d+$/.test(e))return!1;n=t(e);return n?(r=e.length,w.call(n.length,r)>=0)&&(n.luhn===!1||h(e)):!1};e.payment.validateCardExpiry=function(t,n){var r,i,s,o;typeof t==\"object\"&&\"month\"in t&&(o=t,t=o.month,n=o.year);if(!t||!n)return!1;t=e.trim(t);n=e.trim(n);if(!/^\\d+$/.test(t))return!1;if(!/^\\d+$/.test(n))return!1;if(parseInt(t,10)<=12){if(n.length===2){s=(new Date).getFullYear();s=s.toString().slice(0,2);n=s+n}i=new Date(n,t);r=new Date;i.setMonth(i.getMonth()-1);i.setMonth(i.getMonth()+1,1);return i>r}return!1};e.payment.validateCardCVC=function(t,r){var i,s;t=e.trim(t);return/^\\d+$/.test(t)?r?(i=t.length,w.call((s=n(r))!=null?s.cvcLength:void 0,i)>=0):t.length>=3&&t.length<=4:!1};e.payment.cardType=function(e){var n;return e?((n=t(e))!=null?n.type:void 0)||null:null};e.payment.formatCardNumber=function(e){var n,r,i,s;n=t(e);if(!n)return e;i=n.length[n.length.length-1];e=e.replace(/\\D/g,\"\");e=e.slice(0,+i+1||9e9);if(n.format.global)return(s=e.match(n.format))!=null?s.join(\" \"):void 0;r=n.format.exec(e);r!=null&&r.shift();return r!=null?r.join(\" \"):void 0}}).call(this);\n\n\t\t\t$('#add_payment_method')\n\n\t\t\t\t/* Payment option selection */\n\n\t\t\t\t.on( 'click init_add_payment_method', '.payment_methods input.input-radio', function() {\n\t\t\t\t\tif ( $('.payment_methods input.input-radio').length > 1 ) {\n\t\t\t\t\t\tvar target_payment_box = $('div.payment_box.' + $(this).attr('ID') );\n\t\t\t\t\t\tif ( $(this).is(':checked') && ! target_payment_box.is(':visible') ) {\n\t\t\t\t\t\t\t$('div.payment_box').filter(':visible').slideUp(250);\n\t\t\t\t\t\t\tif ( $(this).is(':checked') ) {\n\t\t\t\t\t\t\t\t$('div.payment_box.' + $(this).attr('ID') ).slideDown(250);\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\t$('div.payment_box').show();\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t// Trigger initial click\n\t\t\t\t.find('input[name=payment_method]:checked').click();\n\n\t\t\t$('#add_payment_method').submit(function(){\n\t\t\t\t$('#add_payment_method').block({message: null, overlayCSS: {background: '#fff url(' + woocommerce_params.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', backgroundSize: '16px 16px', opacity: 0.6}});\n\t\t\t});\n\n\t\t\t$('body').trigger('init_add_payment_method');\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// woocommerce_params is required to continue, ensure the object exists\n\t\t\tif ( typeof woocommerce_params === 'undefined' )\n\t\t\t\treturn false;\n\n\t\t\t$( '#add_payment_method' )\n\n\t\t\t\t/* Payment option selection */\n\n\t\t\t\t.on( 'click init_add_payment_method', '.payment_methods input.input-radio', function() {\n\t\t\t\t\tif ( $( '.payment_methods input.input-radio' ).length > 1 ) {\n\t\t\t\t\t\tvar target_payment_box = $( 'div.payment_box.' + $( this ).attr( 'ID' ) );\n\t\t\t\t\t\tif ( $( this ).is( ':checked' ) && ! target_payment_box.is( ':visible' ) ) {\n\t\t\t\t\t\t\t$( 'div.payment_box' ).filter( ':visible' ).slideUp( 250 );\n\t\t\t\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\t\t\t\t$( 'div.payment_box.' + $( this ).attr( 'ID' ) ).slideDown( 250 );\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\t$( 'div.payment_box' ).show();\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t// Trigger initial click\n\t\t\t\t.find( 'input[name=payment_method]:checked' ).click();\n\n\t\t\t$( '#add_payment_method' ).submit( function() {\n\t\t\t\t$( '#add_payment_method' ).block({ message: null, overlayCSS: { background: '#fff url(' + woocommerce_params.plugin_url + '/assets/images/ajax-loader.gif) no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } });\n\t\t\t});\n\n\t\t\t$( 'body' ).trigger( 'init_add_payment_method' );\n\n\t\t});\n\n\t\t/*!\n\t\t * Variations Plugin\n\t\t */\n\t\t;(function ( $, window, document, undefined ) {\n\n\t\t\t$.fn.wc_variation_form = function () {\n\n\t\t\t\t$.fn.wc_variation_form.find_matching_variations = function( product_variations, settings ) {\n\t\t\t\t\tvar matching = [];\n\n\t\t\t\t\tfor ( var i = 0; i < product_variations.length; i++ ) {\n\t\t\t\t\t\tvar variation = product_variations[i];\n\t\t\t\t\t\tvar variation_id = variation.variation_id;\n\n\t\t\t\t\t\tif ( $.fn.wc_variation_form.variations_match( variation.attributes, settings ) ) {\n\t\t\t\t\t\t\tmatching.push( variation );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn matching;\n\t\t\t\t};\n\n\t\t\t\t$.fn.wc_variation_form.variations_match = function( attrs1, attrs2 ) {\n\t\t\t\t\tvar match = true;\n\n\t\t\t\t\tfor ( var attr_name in attrs1 ) {\n\t\t\t\t\t\tif ( attrs1.hasOwnProperty( attr_name ) ) {\n\t\t\t\t\t\t\tvar val1 = attrs1[ attr_name ];\n\t\t\t\t\t\t\tvar val2 = attrs2[ attr_name ];\n\n\t\t\t\t\t\t\tif ( val1 !== undefined && val2 !== undefined && val1.length !== 0 && val2.length !== 0 && val1 !== val2 ) {\n\t\t\t\t\t\t\t\tmatch = false;\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\treturn match;\n\t\t\t\t};\n\n\t\t\t\t// Unbind any existing events\n\t\t\t\tthis.unbind( 'check_variations update_variation_values found_variation' );\n\t\t\t\tthis.find( '.reset_variations' ).unbind( 'click' );\n\t\t\t\tthis.find( '.variations select' ).unbind( 'change focusin' );\n\n\t\t\t\t// Bind events\n\t\t\t\t$form = this\n\n\t\t\t\t\t// On clicking the reset variation button\n\t\t\t\t\t.on( 'click', '.reset_variations', function( event ) {\n\n\t\t\t\t\t\t$( this ).closest( '.variations_form' ).find( '.variations select' ).val( '' ).change();\n\n\t\t\t\t\t\tvar $sku = $( this ).closest( '.product' ).find( '.sku' ),\n\t\t\t\t\t\t\t$weight = $( this ).closest( '.product' ).find( '.product_weight' ),\n\t\t\t\t\t\t\t$dimensions = $( this ).closest( '.product' ).find( '.product_dimensions' );\n\n\t\t\t\t\t\tif ( $sku.attr( 'data-o_sku' ) )\n\t\t\t\t\t\t\t$sku.text( $sku.attr( 'data-o_sku' ) );\n\n\t\t\t\t\t\tif ( $weight.attr( 'data-o_weight' ) )\n\t\t\t\t\t\t\t$weight.text( $weight.attr( 'data-o_weight' ) );\n\n\t\t\t\t\t\tif ( $dimensions.attr( 'data-o_dimensions' ) )\n\t\t\t\t\t\t\t$dimensions.text( $dimensions.attr( 'data-o_dimensions' ) );\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} )\n\n\t\t\t\t\t// Upon changing an option\n\t\t\t\t\t.on( 'change', '.variations select', function( event ) {\n\n\t\t\t\t\t\t$variation_form = $( this ).closest( '.variations_form' );\n\t\t\t\t\t\t$variation_form.find( 'input[name=variation_id]' ).val( '' ).change();\n\n\t\t\t\t\t\t$variation_form\n\t\t\t\t\t\t\t.trigger( 'woocommerce_variation_select_change' )\n\t\t\t\t\t\t\t.trigger( 'check_variations', [ '', false ] );\n\n\t\t\t\t\t\t$( this ).blur();\n\n\t\t\t\t\t\tif( $().uniform && $.isFunction( $.uniform.update ) ) {\n\t\t\t\t\t\t\t$.uniform.update();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} )\n\n\t\t\t\t\t// Upon gaining focus\n\t\t\t\t\t.on( 'focusin touchstart', '.variations select', function( event ) {\n\n\t\t\t\t\t\t$variation_form = $( this ).closest( '.variations_form' );\n\n\t\t\t\t\t\t$variation_form\n\t\t\t\t\t\t\t.trigger( 'woocommerce_variation_select_focusin' )\n\t\t\t\t\t\t\t.trigger( 'check_variations', [ $( this ).attr( 'name' ), true ] );\n\n\t\t\t\t\t} )\n\n\t\t\t\t\t// Check variations\n\t\t\t\t\t.on( 'check_variations', function( event, exclude, focus ) {\n\t\t\t\t\t\tvar all_set = true,\n\t\t\t\t\t\t\tany_set = false,\n\t\t\t\t\t\t\tshowing_variation = false,\n\t\t\t\t\t\t\tcurrent_settings = {},\n\t\t\t\t\t\t\t$variation_form = $( this ),\n\t\t\t\t\t\t\t$reset_variations = $variation_form.find( '.reset_variations' );\n\n\t\t\t\t\t\t$variation_form.find( '.variations select' ).each( function() {\n\n\t\t\t\t\t\t\tif ( $( this ).val().length === 0 ) {\n\t\t\t\t\t\t\t\tall_set = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tany_set = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( exclude && $( this ).attr( 'name' ) === exclude ) {\n\n\t\t\t\t\t\t\t\tall_set = false;\n\t\t\t\t\t\t\t\tcurrent_settings[$( this ).attr( 'name' )] = '';\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Encode entities\n\t\t\t\t\t\t\t\tvalue = $( this ).val();\n\n\t\t\t\t\t\t\t\t// Add to settings array\n\t\t\t\t\t\t\t\tcurrent_settings[ $( this ).attr( 'name' ) ] = value;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvar product_id = parseInt( $variation_form.data( 'product_id' ) ),\n\t\t\t\t\t\t\tall_variations = $variation_form.data( 'product_variations' );\n\n\t\t\t\t\t\t// Fallback to window property if not set - backwards compat\n\t\t\t\t\t\tif ( ! all_variations )\n\t\t\t\t\t\t\tall_variations = window.product_variations.product_id;\n\t\t\t\t\t\tif ( ! all_variations )\n\t\t\t\t\t\t\tall_variations = window.product_variations;\n\t\t\t\t\t\tif ( ! all_variations )\n\t\t\t\t\t\t\tall_variations = window['product_variations_' + product_id ];\n\n\t\t\t\t\t\tvar matching_variations = $.fn.wc_variation_form.find_matching_variations( all_variations, current_settings );\n\n\t\t\t\t\t\tif ( all_set ) {\n\n\t\t\t\t\t\t\tvar variation = matching_variations.shift();\n\n\t\t\t\t\t\t\tif ( variation ) {\n\n\t\t\t\t\t\t\t\t// Found - set ID\n\t\t\t\t\t\t\t\t$variation_form\n\t\t\t\t\t\t\t\t\t.find( 'input[name=variation_id]' )\n\t\t\t\t\t\t\t\t\t.val( variation.variation_id )\n\t\t\t\t\t\t\t\t\t.change();\n\n\t\t\t\t\t\t\t\t$variation_form.trigger( 'found_variation', [ variation ] );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Nothing found - reset fields\n\t\t\t\t\t\t\t\t$variation_form.find( '.variations select' ).val( '' );\n\n\t\t\t\t\t\t\t\tif ( ! focus )\n\t\t\t\t\t\t\t\t\t$variation_form.trigger( 'reset_image' );\n\n\t\t\t\t\t\t\t\talert( wc_add_to_cart_variation_params.i18n_no_matching_variations_text );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$variation_form.trigger( 'update_variation_values', [ matching_variations ] );\n\n\t\t\t\t\t\t\tif ( ! focus )\n\t\t\t\t\t\t\t\t$variation_form.trigger( 'reset_image' );\n\n\t\t\t\t\t\t\tif ( ! exclude ) {\n\t\t\t\t\t\t\t\t$variation_form.find( '.single_variation_wrap' ).slideUp( 200 );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( any_set ) {\n\n\t\t\t\t\t\t\tif ( $reset_variations.css( 'visibility' ) === 'hidden' )\n\t\t\t\t\t\t\t\t$reset_variations.css( 'visibility', 'visible' ).hide().fadeIn();\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$reset_variations.css( 'visibility', 'hidden' );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} )\n\n\t\t\t\t\t// Reset product image\n\t\t\t\t\t.on( 'reset_image', function( event ) {\n\n\t\t\t\t\t\tvar $product = $(this).closest( '.product' ),\n\t\t\t\t\t\t\t$product_img = $product.find( 'div.images img:eq(0)' ),\n\t\t\t\t\t\t\t$product_link = $product.find( 'div.images a.zoom:eq(0)' ),\n\t\t\t\t\t\t\to_src = $product_img.attr( 'data-o_src' ),\n\t\t\t\t\t\t\to_title = $product_img.attr( 'data-o_title' ),\n\t\t\t\t\t\t\to_alt = $product_img.attr( 'data-o_alt' ),\n\t\t\t\t\t\t\to_href = $product_link.attr( 'data-o_href' );\n\n\t\t\t\t\t\tif ( o_src !== undefined ) {\n\t\t\t\t\t\t\t$product_img\n\t\t\t\t\t\t\t\t.attr( 'src', o_src );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( o_href !== undefined ) {\n\t\t\t\t\t\t\t$product_link\n\t\t\t\t\t\t\t\t.attr( 'href', o_href );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( o_title !== undefined ) {\n\t\t\t\t\t\t\t$product_img\n\t\t\t\t\t\t\t\t.attr( 'title', o_title );\n\t\t\t\t\t\t\t$product_link\n\t\t\t\t\t\t\t\t.attr( 'title', o_title );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( o_alt !== undefined ) {\n\t\t\t\t\t\t\t$product_img\n\t\t\t\t\t\t\t\t.attr( 'alt', o_alt );\n\t\t\t\t\t\t}\n\t\t\t\t\t} )\n\n\t\t\t\t\t// Disable option fields that are unavaiable for current set of attributes\n\t\t\t\t\t.on( 'update_variation_values', function( event, variations ) {\n\n\t\t\t\t\t\t$variation_form = $( this ).closest( '.variations_form' );\n\n\t\t\t\t\t\t// Loop through selects and disable/enable options based on selections\n\t\t\t\t\t\t$variation_form.find( '.variations select' ).each( function( index, el ) {\n\n\t\t\t\t\t\t\tcurrent_attr_select = $( el );\n\n\t\t\t\t\t\t\t// Reset options\n\t\t\t\t\t\t\tif ( ! current_attr_select.data( 'attribute_options' ) )\n\t\t\t\t\t\t\t\tcurrent_attr_select.data( 'attribute_options', current_attr_select.find( 'option:gt(0)' ).get() );\n\n\t\t\t\t\t\t\tcurrent_attr_select.find( 'option:gt(0)' ).remove();\n\t\t\t\t\t\t\tcurrent_attr_select.append( current_attr_select.data( 'attribute_options' ) );\n\t\t\t\t\t\t\tcurrent_attr_select.find( 'option:gt(0)' ).removeClass( 'active' );\n\n\t\t\t\t\t\t\t// Get name\n\t\t\t\t\t\t\tvar current_attr_name = current_attr_select.attr( 'name' );\n\n\t\t\t\t\t\t\t// Loop through variations\n\t\t\t\t\t\t\tfor ( var num in variations ) {\n\n\t\t\t\t\t\t\t\tif ( typeof( variations[ num ] ) != 'undefined' ) {\n\n\t\t\t\t\t\t\t\t\tvar attributes = variations[ num ].attributes;\n\n\t\t\t\t\t\t\t\t\tfor ( var attr_name in attributes ) {\n\t\t\t\t\t\t\t\t\t\tif ( attributes.hasOwnProperty( attr_name ) ) {\n\t\t\t\t\t\t\t\t\t\t\tvar attr_val = attributes[ attr_name ];\n\n\t\t\t\t\t\t\t\t\t\t\tif ( attr_name == current_attr_name ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tif ( attr_val ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Decode entities\n\t\t\t\t\t\t\t\t\t\t\t\t\tattr_val = $( '<div/>' ).html( attr_val ).text();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Add slashes\n\t\t\t\t\t\t\t\t\t\t\t\t\tattr_val = attr_val.replace( /'/g, \"\\\\'\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\tattr_val = attr_val.replace( /\"/g, \"\\\\\\\"\" );\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Compare the meerkat\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrent_attr_select.find( 'option[value=\"' + attr_val + '\"]' ).addClass( 'active' );\n\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrent_attr_select.find( 'option:gt(0)' ).addClass( 'active' );\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\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}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Detach inactive\n\t\t\t\t\t\t\tcurrent_attr_select.find( 'option:gt(0):not(.active)' ).remove();\n\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Custom event for when variations have been updated\n\t\t\t\t\t\t$variation_form.trigger( 'woocommerce_update_variation_values' );\n\n\t\t\t\t\t} )\n\n\t\t\t\t\t// Show single variation details (price, stock, image)\n\t\t\t\t\t.on( 'found_variation', function( event, variation ) {\n\t\t\t\t\t\tvar $variation_form = $( this ),\n\t\t\t\t\t\t\t$product = $( this ).closest( '.product' ),\n\t\t\t\t\t\t\t$product_img = $product.find( 'div.images img:eq(0)' ),\n\t\t\t\t\t\t\t$product_link = $product.find( 'div.images a.zoom:eq(0)' ),\n\t\t\t\t\t\t\to_src = $product_img.attr( 'data-o_src' ),\n\t\t\t\t\t\t\to_title = $product_img.attr( 'data-o_title' ),\n\t\t\t\t\t\t\to_alt = $product_img.attr( 'data-o_alt' ),\n\t\t\t\t\t\t\to_href = $product_link.attr( 'data-o_href' ),\n\t\t\t\t\t\t\tvariation_image = variation.image_src,\n\t\t\t\t\t\t\tvariation_link = variation.image_link,\n\t\t\t\t\t\t\tvariation_title = variation.image_title,\n\t\t\t\t\t\t\tvariation_alt = variation.image_alt;\n\n\t\t\t\t\t\t$variation_form.find( '.variations_button' ).show();\n\t\t\t\t\t\t$variation_form.find( '.single_variation' ).html( variation.price_html + variation.availability_html );\n\n\t\t\t\t\t\tif ( o_src === undefined ) {\n\t\t\t\t\t\t\to_src = ( ! $product_img.attr( 'src' ) ) ? '' : $product_img.attr( 'src' );\n\t\t\t\t\t\t\t$product_img.attr( 'data-o_src', o_src );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( o_href === undefined ) {\n\t\t\t\t\t\t\to_href = ( ! $product_link.attr( 'href' ) ) ? '' : $product_link.attr( 'href' );\n\t\t\t\t\t\t\t$product_link.attr( 'data-o_href', o_href );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( o_title === undefined ) {\n\t\t\t\t\t\t\to_title = ( ! $product_img.attr( 'title' ) ) ? '' : $product_img.attr( 'title' );\n\t\t\t\t\t\t\t$product_img.attr( 'data-o_title', o_title );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( o_alt === undefined ) {\n\t\t\t\t\t\t\to_alt = ( ! $product_img.attr( 'alt' ) ) ? '' : $product_img.attr( 'alt' );\n\t\t\t\t\t\t\t$product_img.attr( 'data-o_alt', o_alt );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( variation_image && variation_image.length > 1 ) {\n\t\t\t\t\t\t\t$product_img\n\t\t\t\t\t\t\t\t.attr( 'src', variation_image )\n\t\t\t\t\t\t\t\t.attr( 'alt', variation_alt )\n\t\t\t\t\t\t\t\t.attr( 'title', variation_title );\n\t\t\t\t\t\t\t$product_link\n\t\t\t\t\t\t\t\t.attr( 'href', variation_link )\n\t\t\t\t\t\t\t\t.attr( 'title', variation_title );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$product_img\n\t\t\t\t\t\t\t\t.attr( 'src', o_src )\n\t\t\t\t\t\t\t\t.attr( 'alt', o_alt )\n\t\t\t\t\t\t\t\t.attr( 'title', o_title );\n\t\t\t\t\t\t\t$product_link\n\t\t\t\t\t\t\t\t.attr( 'href', o_href )\n\t\t\t\t\t\t\t\t.attr( 'title', o_title );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar $single_variation_wrap = $variation_form.find( '.single_variation_wrap' ),\n\t\t\t\t\t\t\t$sku = $product.find( '.product_meta' ).find( '.sku' ),\n\t\t\t\t\t\t\t$weight = $product.find( '.product_weight' ),\n\t\t\t\t\t\t\t$dimensions = $product.find( '.product_dimensions' );\n\n\t\t\t\t\t\tif ( ! $sku.attr( 'data-o_sku' ) )\n\t\t\t\t\t\t\t$sku.attr( 'data-o_sku', $sku.text() );\n\n\t\t\t\t\t\tif ( ! $weight.attr( 'data-o_weight' ) )\n\t\t\t\t\t\t\t$weight.attr( 'data-o_weight', $weight.text() );\n\n\t\t\t\t\t\tif ( ! $dimensions.attr( 'data-o_dimensions' ) )\n\t\t\t\t\t\t\t$dimensions.attr( 'data-o_dimensions', $dimensions.text() );\n\n\t\t\t\t\t\tif ( variation.sku ) {\n\t\t\t\t\t\t\t$sku.text( variation.sku );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$sku.text( $sku.attr( 'data-o_sku' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( variation.weight ) {\n\t\t\t\t\t\t\t$weight.text( variation.weight );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$weight.text( $weight.attr( 'data-o_weight' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( variation.dimensions ) {\n\t\t\t\t\t\t\t$dimensions.text( variation.dimensions );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$dimensions.text( $dimensions.attr( 'data-o_dimensions' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$single_variation_wrap.find( '.quantity' ).show();\n\n\t\t\t\t\t\tif ( ! variation.is_purchasable || ! variation.is_in_stock || ! variation.variation_is_visible ) {\n\t\t\t\t\t\t\t$variation_form.find( '.variations_button' ).hide();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( ! variation.variation_is_visible ) {\n\t\t\t\t\t\t\t$variation_form.find( '.single_variation' ).html( '<p>' + wc_add_to_cart_variation_params.i18n_unavailable_text + '</p>' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( variation.min_qty )\n\t\t\t\t\t\t\t$single_variation_wrap.find( 'input[name=quantity]' ).attr( 'min', variation.min_qty ).val( variation.min_qty );\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$single_variation_wrap.find( 'input[name=quantity]' ).removeAttr( 'min' );\n\n\t\t\t\t\t\tif ( variation.max_qty )\n\t\t\t\t\t\t\t$single_variation_wrap.find( 'input[name=quantity]' ).attr( 'max', variation.max_qty );\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$single_variation_wrap.find( 'input[name=quantity]' ).removeAttr( 'max' );\n\n\t\t\t\t\t\tif ( variation.is_sold_individually === 'yes' ) {\n\t\t\t\t\t\t\t$single_variation_wrap.find( 'input[name=quantity]' ).val( '1' );\n\t\t\t\t\t\t\t$single_variation_wrap.find( '.quantity' ).hide();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$single_variation_wrap.slideDown( 200 ).trigger( 'show_variation', [ variation ] );\n\n\t\t\t\t\t});\n\n\t\t\t\t$form.trigger( 'wc_variation_form' );\n\n\t\t\t\treturn $form;\n\t\t\t};\n\n\t\t\t$( function() {\n\n\t\t\t\t// wc_add_to_cart_variation_params is required to continue, ensure the object exists\n\t\t\t\tif ( typeof wc_add_to_cart_variation_params === 'undefined' )\n\t\t\t\t\treturn false;\n\n\t\t\t\t$( '.variations_form' ).wc_variation_form();\n\t\t\t\t$( '.variations_form .variations select' ).change();\n\t\t\t});\n\n\t\t})( jQuery, window, document );\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// wc_add_to_cart_params is required to continue, ensure the object exists\n\t\t\tif ( typeof wc_add_to_cart_params === 'undefined' )\n\t\t\t\treturn false;\n\n\t\t\t// Ajax add to cart\n\t\t\t$( document ).on( 'click', '.add_to_cart_button', function() {\n\n\t\t\t\t// AJAX add to cart request\n\t\t\t\tvar $thisbutton = $( this );\n\n\t\t\t\tif ( $thisbutton.is( '.product_type_simple' ) ) {\n\n\t\t\t\t\tif ( ! $thisbutton.attr( 'data-product_id' ) )\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t$thisbutton.removeClass( 'added' );\n\t\t\t\t\t$thisbutton.addClass( 'loading' );\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\taction: 'woocommerce_add_to_cart',\n\t\t\t\t\t\tproduct_id: $thisbutton.attr( 'data-product_id' ),\n\t\t\t\t\t\tquantity: $thisbutton.attr( 'data-quantity' )\n\t\t\t\t\t};\n\n\t\t\t\t\t// Trigger event\n\t\t\t\t\t$( 'body' ).trigger( 'adding_to_cart', [ $thisbutton, data ] );\n\n\t\t\t\t\t// Ajax action\n\t\t\t\t\t$.post( wc_add_to_cart_params.ajax_url, data, function( response ) {\n\n\t\t\t\t\t\tif ( ! response )\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tvar this_page = window.location.toString();\n\n\t\t\t\t\t\tthis_page = this_page.replace( 'add-to-cart', 'added-to-cart' );\n\n\t\t\t\t\t\tif ( response.error && response.product_url ) {\n\t\t\t\t\t\t\twindow.location = response.product_url;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Redirect to cart option\n\t\t\t\t\t\tif ( wc_add_to_cart_params.cart_redirect_after_add === 'yes' ) {\n\n\t\t\t\t\t\t\twindow.location = wc_add_to_cart_params.cart_url;\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$thisbutton.removeClass( 'loading' );\n\n\t\t\t\t\t\t\tfragments = response.fragments;\n\t\t\t\t\t\t\tcart_hash = response.cart_hash;\n\n\t\t\t\t\t\t\t// Block fragments class\n\t\t\t\t\t\t\tif ( fragments ) {\n\t\t\t\t\t\t\t\t$.each( fragments, function( key, value ) {\n\t\t\t\t\t\t\t\t\t$( key ).addClass( 'updating' );\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Block widgets and fragments\n\t\t\t\t\t\t\t$( '.shop_table.cart, .updating, .cart_totals' ).fadeTo( '400', '0.6' ).block({ message: null, overlayCSS: { background: 'transparent url(' + wc_add_to_cart_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } } );\n\n\t\t\t\t\t\t\t// Changes button classes\n\t\t\t\t\t\t\t$thisbutton.addClass( 'added' );\n\n\t\t\t\t\t\t\t// View cart text\n\t\t\t\t\t\t\tif ( ! wc_add_to_cart_params.is_cart && $thisbutton.parent().find( '.added_to_cart' ).size() === 0 ) {\n\t\t\t\t\t\t\t\t$thisbutton.after( ' <a href=\"' + wc_add_to_cart_params.cart_url + '\" class=\"added_to_cart wc-forward\" title=\"' +\n\t\t\t\t\t\t\t\twc_add_to_cart_params.i18n_view_cart + '\">' + wc_add_to_cart_params.i18n_view_cart + '</a>' );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Replace fragments\n\t\t\t\t\t\t\tif ( fragments ) {\n\t\t\t\t\t\t\t\t$.each( fragments, function( key, value ) {\n\t\t\t\t\t\t\t\t\t$( key ).replaceWith( value );\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Unblock\n\t\t\t\t\t\t\t$( '.widget_shopping_cart, .updating' ).stop( true ).css( 'opacity', '1' ).unblock();\n\n\t\t\t\t\t\t\t// Cart page elements\n\t\t\t\t\t\t\t$( '.shop_table.cart' ).load( this_page + ' .shop_table.cart:eq(0) > *', function() {\n\n\t\t\t\t\t\t\t\t$( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '<input type=\"button\" value=\"+\" id=\"add1\" class=\"plus\" />' ).prepend( '<input type=\"button\" value=\"-\" id=\"minus1\" class=\"minus\" />' );\n\n\t\t\t\t\t\t\t\t$( '.shop_table.cart' ).stop( true ).css( 'opacity', '1' ).unblock();\n\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'cart_page_refreshed' );\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t$( '.cart_totals' ).load( this_page + ' .cart_totals:eq(0) > *', function() {\n\t\t\t\t\t\t\t\t$( '.cart_totals' ).stop( true ).css( 'opacity', '1' ).unblock();\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Trigger event so themes can refresh other areas\n\t\t\t\t\t\t\t$( 'body' ).trigger( 'added_to_cart', [ fragments, cart_hash ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\treturn false;\n\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t});\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\tvar locale_json = wc_address_i18n_params.locale.replace( /&quot;/g, '\"' ),\n\t\t\t\tlocale = $.parseJSON( locale_json ),\n\t\t\t\trequired = ' <abbr class=\"required\" title=\"' + wc_address_i18n_params.i18n_required_text + '\">*</abbr>';\n\n\t\t\t$( 'body' )\n\n\t\t\t\t// Handle locale\n\t\t\t\t.bind( 'country_to_state_changing', function( event, country, wrapper ) {\n\n\t\t\t\t\tvar thisform = wrapper,\n\t\t\t\t\t\tthislocale;\n\n\t\t\t\t\tif ( typeof locale[ country ] !== 'undefined' ) {\n\t\t\t\t\t\tthislocale = locale[ country ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthislocale = locale['default'];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Handle locale fields\n\t\t\t\t\tvar locale_fields = $.parseJSON( wc_address_i18n_params.locale_fields );\n\n\t\t\t\t\t$.each( locale_fields, function( key, value ) {\n\n\t\t\t\t\t\tvar field = thisform.find( value );\n\n\t\t\t\t\t\tif ( thislocale[ key ] ) {\n\n\t\t\t\t\t\t\tif ( thislocale[ key ].label ) {\n\t\t\t\t\t\t\t\tfield.find( 'label' ).html( thislocale[ key ].label );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( thislocale[ key ].placeholder ) {\n\t\t\t\t\t\t\t\tfield.find( 'input' ).attr( 'placeholder', thislocale[ key ].placeholder );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfield.find( 'label abbr' ).remove();\n\n\t\t\t\t\t\t\tif ( typeof thislocale[ key ].required === 'undefined' && locale['default'][ key ].required === true ) {\n\t\t\t\t\t\t\t\tfield.find( 'label' ).append( required );\n\t\t\t\t\t\t\t} else if ( thislocale[ key ].required === true ) {\n\t\t\t\t\t\t\t\tfield.find( 'label' ).append( required );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( key !== 'state' ) {\n\t\t\t\t\t\t\t\tif ( thislocale[ key ].hidden === true ) {\n\t\t\t\t\t\t\t\t\tfield.hide().find( 'input' ).val( '' );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfield.show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else if ( locale['default'][ key ] ) {\n\t\t\t\t\t\t\tif ( locale['default'][ key ].required === true ) {\n\t\t\t\t\t\t\t\tif ( field.find( 'label abbr' ).size() === 0 ) field.find( 'label' ).append( required );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( key !== 'state' ) {\n\t\t\t\t\t\t\t\tif ( typeof locale['default'][ key ].hidden === 'undefined' || locale['default'][ key ].hidden === false ) {\n\t\t\t\t\t\t\t\t\tfield.show();\n\t\t\t\t\t\t\t\t} else if ( locale['default'][ key ].hidden === true ) {\n\t\t\t\t\t\t\t\t\tfield.hide().find( 'input' ).val( '' );\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\n\t\t\t\t\t});\n\n\t\t\t\t\tvar $postcodefield = thisform.find( '#billing_postcode_field, #shipping_postcode_field' ),\n\t\t\t\t\t\t$cityfield = thisform.find( '#billing_city_field, #shipping_city_field' ),\n\t\t\t\t\t\t$statefield = thisform.find( '#billing_state_field, #shipping_state_field' );\n\n\t\t\t\t\tif ( ! $postcodefield.attr( 'data-o_class' ) ) {\n\t\t\t\t\t\t$postcodefield.attr( 'data-o_class', $postcodefield.attr( 'class' ) );\n\t\t\t\t\t\t$cityfield.attr( 'data-o_class', $cityfield.attr( 'class' ) );\n\t\t\t\t\t\t$statefield.attr( 'data-o_class', $statefield.attr( 'class' ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Re-order postcode/city\n\t\t\t\t\tif ( thislocale.postcode_before_city ) {\n\n\t\t\t\t\t\t$postcodefield.add( $cityfield ).add( $statefield ).removeClass( 'form-row-first form-row-last' ).addClass( 'form-row-wide' );\n\t\t\t\t\t\t$postcodefield.insertBefore( $cityfield );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Default\n\t\t\t\t\t\t$postcodefield.attr( 'class', $postcodefield.attr( 'data-o_class' ) );\n\t\t\t\t\t\t$cityfield.attr( 'class', $cityfield.attr( 'data-o_class' ) );\n\t\t\t\t\t\t$statefield.attr( 'class', $statefield.attr( 'data-o_class' ) );\n\t\t\t\t\t\t$postcodefield.insertAfter( $statefield );\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// wc_cart_fragments_params is required to continue, ensure the object exists\n\t\t\tif ( typeof wc_cart_fragments_params === 'undefined' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t/** Cart Handling */\n\t\t\ttry {\n\t\t\t\t$supports_html5_storage = ( 'sessionStorage' in window && window.sessionStorage !== null );\n\t\t\t} catch( err ) {\n\t\t\t\t$supports_html5_storage = false;\n\t\t\t}\n\n\t\t\t$fragment_refresh = {\n\t\t\t\turl: wc_cart_fragments_params.ajax_url,\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: { action: 'woocommerce_get_refreshed_fragments' },\n\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\tif ( data && data.fragments ) {\n\n\t\t\t\t\t\t$.each( data.fragments, function( key, value ) {\n\t\t\t\t\t\t\t$( key ).replaceWith( value );\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif ( $supports_html5_storage ) {\n\t\t\t\t\t\t\tsessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( data.fragments ) );\n\t\t\t\t\t\t\tsessionStorage.setItem( 'wc_cart_hash', data.cart_hash );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$( 'body' ).trigger( 'wc_fragments_refreshed' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif ( $supports_html5_storage ) {\n\n\t\t\t\t$( 'body' ).bind( 'added_to_cart', function( event, fragments, cart_hash ) {\n\t\t\t\t\tsessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( fragments ) );\n\t\t\t\t\tsessionStorage.setItem( 'wc_cart_hash', cart_hash );\n\t\t\t\t});\n\n\t\t\t\ttry {\n\t\t\t\t\tvar wc_fragments = $.parseJSON( sessionStorage.getItem( wc_cart_fragments_params.fragment_name ) ),\n\t\t\t\t\t\tcart_hash = sessionStorage.getItem( 'wc_cart_hash' ),\n\t\t\t\t\t\tcookie_hash = $.cookie( 'woocommerce_cart_hash' );\n\n\t\t\t\t\tif ( cart_hash === null || cart_hash === undefined || cart_hash === '' ) {\n\t\t\t\t\t\tcart_hash = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( cookie_hash === null || cookie_hash === undefined || cookie_hash === '' ) {\n\t\t\t\t\t\tcookie_hash = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( wc_fragments && wc_fragments['div.widget_shopping_cart_content'] && cart_hash == cookie_hash ) {\n\n\t\t\t\t\t\t$.each( wc_fragments, function( key, value ) {\n\t\t\t\t\t\t\t$( key ).replaceWith(value);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$( 'body' ).trigger( 'wc_fragments_loaded' );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow 'No fragment';\n\t\t\t\t\t}\n\n\t\t\t\t} catch( err ) {\n\t\t\t\t\t$.ajax( $fragment_refresh );\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$.ajax( $fragment_refresh );\n\t\t\t}\n\n\t\t\t/* Cart hiding */\n\t\t\tif ( $.cookie( 'woocommerce_items_in_cart' ) > 0 ) {\n\t\t\t\t$( '.hide_cart_widget_if_empty' ).closest( '.widget_shopping_cart' ).show();\n\t\t\t} else {\n\t\t\t\t$( '.hide_cart_widget_if_empty' ).closest( '.widget_shopping_cart' ).hide();\n\t\t\t}\n\n\t\t\t$( 'body' ).bind( 'adding_to_cart', function() {\n\t\t\t\t$( '.hide_cart_widget_if_empty' ).closest( '.widget_shopping_cart' ).show();\n\t\t\t} );\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// wc_cart_params is required to continue, ensure the object exists\n\t\t\tif ( typeof wc_cart_params === 'undefined' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Shipping calculator\n\t\t\t$( document ).on( 'click', '.shipping-calculator-button', function() {\n\t\t\t\t//$( '.shipping-calculator-form' ).slideToggle( 'slow' );\n\n\t\t\t\treturn false;\n\t\t\t}).on( 'change', 'select.shipping_method, input[name^=shipping_method]', function() {\n\n\t\t\t\tvar shipping_methods = [];\n\n\t\t\t\t$( 'select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]' ).each( function( index, input ) {\n\t\t\t\t\tshipping_methods[ $( this ).data( 'index' ) ] = $( this ).val();\n\t\t\t\t} );\n\n\t\t\t\t$( 'div.cart_totals' ).block({ message: null, overlayCSS: { background: '#fff url(' + wc_cart_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } });\n\n\t\t\t\tvar data = {\n\t\t\t\t\taction: 'woocommerce_update_shipping_method',\n\t\t\t\t\tsecurity: wc_cart_params.update_shipping_method_nonce,\n\t\t\t\t\tshipping_method: shipping_methods\n\t\t\t\t};\n\n\t\t\t\t$.post( wc_cart_params.ajax_url, data, function( response ) {\n\n\t\t\t\t\t$( 'div.cart_totals' ).replaceWith( response );\n\t\t\t\t\t$( 'body' ).trigger( 'updated_shipping_method' );\n\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t$( '.shipping-calculator-form' ).hide();\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t$.blockUI.defaults.overlayCSS.cursor = 'default';\n\n\t\t\t// wc_checkout_params is required to continue, ensure the object exists\n\t\t\tif ( typeof wc_checkout_params === 'undefined' )\n\t\t\t\treturn false;\n\n\t\t\tvar updateTimer,\n\t\t\t\tdirtyInput = false,\n\t\t\t\txhr;\n\n\t\t\tfunction update_checkout() {\n\n\t\t\t\tif ( xhr ) xhr.abort();\n\n\t\t\t\tvar shipping_methods = [];\n\n\t\t\t\t$( 'select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]' ).each( function( index, input ) {\n\t\t\t\t\tshipping_methods[ $( this ).data( 'index' ) ] = $( this ).val();\n\t\t\t\t} );\n\n\t\t\t\tvar payment_method = $( '#order_review input[name=payment_method]:checked' ).val(),\n\t\t\t\t\tcountry\t\t\t= $( '#billing_country' ).val(),\n\t\t\t\t\tstate\t\t\t= $( '#billing_state' ).val(),\n\t\t\t\t\tpostcode\t\t= $( 'input#billing_postcode' ).val(),\n\t\t\t\t\tcity\t\t\t= $( '#billing_city' ).val(),\n\t\t\t\t\taddress\t\t\t= $( 'input#billing_address_1' ).val(),\n\t\t\t\t\taddress_2\t\t= $( 'input#billing_address_2' ).val(),\n\t\t\t\t\ts_country,\n\t\t\t\t\ts_state,\n\t\t\t\t\ts_postcode,\n\t\t\t\t\ts_city,\n\t\t\t\t\ts_address,\n\t\t\t\t\ts_address_2;\n\n\t\t\t\tif ( $( '#ship-to-different-address input' ).is( ':checked' ) || $( '#ship-to-different-address input' ).size() === 0 ) {\n\t\t\t\t\ts_country\t\t= $( '#shipping_country' ).val();\n\t\t\t\t\ts_state\t\t\t= $( '#shipping_state' ).val();\n\t\t\t\t\ts_postcode\t\t= $( 'input#shipping_postcode' ).val();\n\t\t\t\t\ts_city\t\t\t= $( '#shipping_city' ).val();\n\t\t\t\t\ts_address\t\t= $( 'input#shipping_address_1' ).val();\n\t\t\t\t\ts_address_2\t\t= $( 'input#shipping_address_2' ).val();\n\t\t\t\t} else {\n\t\t\t\t\ts_country\t\t= country;\n\t\t\t\t\ts_state\t\t\t= state;\n\t\t\t\t\ts_postcode\t\t= postcode;\n\t\t\t\t\ts_city\t\t\t= city;\n\t\t\t\t\ts_address\t\t= address;\n\t\t\t\t\ts_address_2\t\t= address_2;\n\t\t\t\t}\n\n\t\t\t\t$( '#order_methods, #order_review' ).block({ message: null, overlayCSS: { background: '#fff url(' + wc_checkout_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } });\n\n\t\t\t\tvar data = {\n\t\t\t\t\taction:\t\t\t\t\t\t'woocommerce_update_order_review',\n\t\t\t\t\tsecurity:\t\t\t\t\twc_checkout_params.update_order_review_nonce,\n\t\t\t\t\tshipping_method:\t\t\tshipping_methods,\n\t\t\t\t\tpayment_method:\t\t\t\tpayment_method,\n\t\t\t\t\tcountry:\t\t\t\t\tcountry,\n\t\t\t\t\tstate:\t\t\t\t\t\tstate,\n\t\t\t\t\tpostcode:\t\t\t\t\tpostcode,\n\t\t\t\t\tcity:\t\t\t\t\t\tcity,\n\t\t\t\t\taddress:\t\t\t\t\taddress,\n\t\t\t\t\taddress_2:\t\t\t\t\taddress_2,\n\t\t\t\t\ts_country:\t\t\t\t\ts_country,\n\t\t\t\t\ts_state:\t\t\t\t\ts_state,\n\t\t\t\t\ts_postcode:\t\t\t\t\ts_postcode,\n\t\t\t\t\ts_city:\t\t\t\t\t\ts_city,\n\t\t\t\t\ts_address:\t\t\t\t\ts_address,\n\t\t\t\t\ts_address_2:\t\t\t\ts_address_2,\n\t\t\t\t\tpost_data:\t\t\t\t\t$( 'form.checkout' ).serialize()\n\t\t\t\t};\n\n\t\t\t\txhr = $.ajax({\n\t\t\t\t\ttype:\t\t'POST',\n\t\t\t\t\turl:\t\twc_checkout_params.ajax_url,\n\t\t\t\t\tdata:\t\tdata,\n\t\t\t\t\tsuccess:\tfunction( response ) {\n\t\t\t\t\t\tif ( response ) {\n\t\t\t\t\t\t\t$( '#order_review' ).html( $.trim( response ) );\n\t\t\t\t\t\t\t$( '#order_review' ).find( 'input[name=payment_method]:checked' ).trigger('click');\n\t\t\t\t\t\t\t$( 'body' ).trigger('updated_checkout' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t// Event for updating the checkout\n\t\t\t$( 'body' ).bind( 'update_checkout', function() {\n\t\t\t\tclearTimeout( updateTimer );\n\t\t\t\tupdate_checkout();\n\t\t\t});\n\n\t\t\t$( 'p.password, form.login, .checkout_coupon, div.shipping_address' ).hide();\n\n\t\t\t$( 'input.show_password' ).change( function() {\n\t\t\t\t$( 'p.password' ).slideToggle();\n\t\t\t});\n\n\t\t\t$( document ).on('click', 'a.showlogin', function() {\n\t\t\t\t$( 'form.login' ).slideToggle();\n\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t$( document ).one('click', 'a.showcoupon', function() {\n\t\t\t\t$( '.checkout_coupon' ).slideToggle( 400, function() {\n\t\t\t\t\t$( '#coupon_code' ).focus();\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t$( '#ship-to-different-address input' ).change( function() {\n\t\t\t\t$( 'div.shipping_address' ).hide();\n\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\t$( 'div.shipping_address' ).slideDown();\n\t\t\t\t}\n\t\t\t}).change();\n\n\t\t\tif ( wc_checkout_params.option_guest_checkout === 'yes' ) {\n\n\t\t\t\t$( 'div.create-account' ).hide();\n\n\t\t\t\t$( 'input#createaccount' ).change( function() {\n\t\t\t\t\t$( 'div.create-account' ).hide();\n\n\t\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\t\t$( 'div.create-account' ).slideDown();\n\t\t\t\t\t}\n\t\t\t\t}).change();\n\n\t\t\t}\n\n\t\t\t$( '#order_review' )\n\n\t\t\t\t/* Payment option selection */\n\n\t\t\t\t.on( 'click', '.payment_methods input.input-radio', function() {\n\t\t\t\t\tif ( $( '.payment_methods input.input-radio' ).length > 1 ) {\n\t\t\t\t\t\tvar target_payment_box = $( 'div.payment_box.' + $( this ).attr( 'ID' ) );\n\n\t\t\t\t\t\tif ( $( this ).is( ':checked' ) && ! target_payment_box.is( ':visible' ) ) {\n\t\t\t\t\t\t\t$( 'div.payment_box' ).filter( ':visible' ).slideUp( 250 );\n\n\t\t\t\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\t\t\t\t$( 'div.payment_box.' + $( this ).attr( 'ID' ) ).slideDown( 250 );\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\t$( 'div.payment_box' ).show();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $( this ).data( 'order_button_text' ) ) {\n\t\t\t\t\t\t$( '#place_order' ).val( $( this ).data( 'order_button_text' ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( '#place_order' ).val( $( '#place_order' ).data( 'value' ) );\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t// Trigger initial click\n\t\t\t\t.find( 'input[name=payment_method]:checked' ).click();\n\n\t\t\t// Used for input change events below\n\t\t\tfunction input_changed() {\n\t\t\t\tvar update_totals = true;\n\n\t\t\t\tif ( $( dirtyInput ).size() ) {\n\n\t\t\t\t\t$required_inputs = $( dirtyInput ).closest( 'div' ).find( '.address-field.validate-required' );\n\n\t\t\t\t\tif ( $required_inputs.size() ) {\n\t\t\t\t\t\t$required_inputs.each( function() {\n\t\t\t\t\t\t\tif ( $( this ).find( 'input.input-text' ).val() === '' ) {\n\t\t\t\t\t\t\t\tupdate_totals = false;\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}\n\n\t\t\t\tif ( update_totals ) {\n\t\t\t\t\tdirtyInput = false;\n\t\t\t\t\t$( 'body' ).trigger( 'update_checkout' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$( 'form.checkout' )\n\n\t\t\t\t/* Update totals/taxes/shipping */\n\t\t\t\t// Inputs/selects which update totals instantly\n\t\t\t\t.on( 'input change', 'select.shipping_method, input[name^=shipping_method], #ship-to-different-address input, .update_totals_on_change select', function() {\n\t\t\t\t\tclearTimeout( updateTimer );\n\t\t\t\t\tdirtyInput = false;\n\t\t\t\t\t$( 'body' ).trigger( 'update_checkout' );\n\t\t\t\t})\n\n\t\t\t\t// Address-fields which refresh totals when all required fields are filled\n\t\t\t\t.on( 'change', '.address-field input.input-text, .update_totals_on_change input.input-text', function() {\n\t\t\t\t\tif ( dirtyInput ) {\n\t\t\t\t\t\tinput_changed();\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t.on( 'input change', '.address-field select', function() {\n\t\t\t\t\tdirtyInput = this;\n\t\t\t\t\tinput_changed();\n\t\t\t\t})\n\n\t\t\t\t.on( 'input keydown', '.address-field input.input-text, .update_totals_on_change input.input-text', function( e ){\n\t\t\t\t\tvar code = e.keyCode || e.which || 0;\n\n\t\t\t\t\tif ( code === 9 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tdirtyInput = this;\n\t\t\t\t\tclearTimeout( updateTimer );\n\t\t\t\t\tupdateTimer = setTimeout( input_changed, '1000' );\n\t\t\t\t})\n\n\t\t\t\t/* Inline validation */\n\n\t\t\t\t.on( 'blur input change', '.input-text, select', function() {\n\t\t\t\t\tvar $this = $( this ),\n\t\t\t\t\t\t$parent = $this.closest( '.form-row' ),\n\t\t\t\t\t\tvalidated = true;\n\n\t\t\t\t\tif ( $parent.is( '.validate-required' ) ) {\n\t\t\t\t\t\tif ( $this.val() === '' ) {\n\t\t\t\t\t\t\t$parent.removeClass( 'woocommerce-validated' ).addClass( 'woocommerce-invalid woocommerce-invalid-required-field' );\n\t\t\t\t\t\t\tvalidated = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $parent.is( '.validate-email' ) ) {\n\t\t\t\t\t\tif ( $this.val() ) {\n\n\t\t\t\t\t\t\t/* http://stackoverflow.com/questions/2855865/jquery-validate-e-mail-address-regex */\n\t\t\t\t\t\t\tvar pattern = new RegExp(/^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$/i);\n\n\t\t\t\t\t\t\tif ( ! pattern.test( $this.val() ) ) {\n\t\t\t\t\t\t\t\t$parent.removeClass( 'woocommerce-validated' ).addClass( 'woocommerce-invalid woocommerce-invalid-email' );\n\t\t\t\t\t\t\t\tvalidated = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( validated ) {\n\t\t\t\t\t\t$parent.removeClass( 'woocommerce-invalid woocommerce-invalid-required-field' ).addClass( 'woocommerce-validated' );\n\t\t\t\t\t}\n\t\t\t\t} )\n\n\t\t\t\t/* AJAX Form Submission */\n\n\t\t\t\t.submit( function() {\n\t\t\t\t\tclearTimeout( updateTimer );\n\n\t\t\t\t\tvar $form = $( this );\n\n\t\t\t\t\tif ( $form.is( '.processing' ) ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Trigger a handler to let gateways manipulate the checkout if needed\n\t\t\t\t\tif ( $form.triggerHandler( 'checkout_place_order' ) !== false && $form.triggerHandler( 'checkout_place_order_' + $( '#order_review input[name=payment_method]:checked' ).val() ) !== false ) {\n\n\t\t\t\t\t\t$form.addClass( 'processing' );\n\n\t\t\t\t\t\tvar form_data = $form.data();\n\n\t\t\t\t\t\tif ( form_data[\"blockUI.isBlocked\"] != 1 ) {\n\t\t\t\t\t\t\t$form.block({ message: null, overlayCSS: { background: '#fff url(' + wc_checkout_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\ttype:\t\t'POST',\n\t\t\t\t\t\t\turl:\t\twc_checkout_params.checkout_url,\n\t\t\t\t\t\t\tdata:\t\t$form.serialize(),\n\t\t\t\t\t\t\tsuccess:\tfunction( code ) {\n\t\t\t\t\t\t\t\tvar result = '';\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t// Get the valid JSON only from the returned string\n\t\t\t\t\t\t\t\t\tif ( code.indexOf( '<!--WC_START-->' ) >= 0 )\n\t\t\t\t\t\t\t\t\t\tcode = code.split( '<!--WC_START-->' )[1]; // Strip off before after WC_START\n\n\t\t\t\t\t\t\t\t\tif ( code.indexOf( '<!--WC_END-->' ) >= 0 )\n\t\t\t\t\t\t\t\t\t\tcode = code.split( '<!--WC_END-->' )[0]; // Strip off anything after WC_END\n\n\t\t\t\t\t\t\t\t\t// Parse\n\t\t\t\t\t\t\t\t\tresult = $.parseJSON( code );\n\n\t\t\t\t\t\t\t\t\tif ( result.result === 'success' ) {\n\t\t\t\t\t\t\t\t\t\twindow.location = decodeURI( result.redirect );\n\t\t\t\t\t\t\t\t\t} else if ( result.result === 'failure' ) {\n\t\t\t\t\t\t\t\t\t\tthrow 'Result failure';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthrow 'Invalid response';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcatch( err ) {\n\n\t\t\t\t\t\t\t\t\tif ( result.reload === 'true' ) {\n\t\t\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Remove old errors\n\t\t\t\t\t\t\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove();\n\n\t\t\t\t\t\t\t\t\t// Add new errors\n\t\t\t\t\t\t\t\t\tif ( result.messages ) {\n\t\t\t\t\t\t\t\t\t\t$form.prepend( result.messages );\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$form.prepend( code );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Cancel processing\n\t\t\t\t\t\t\t\t\t$form.removeClass( 'processing' ).unblock();\n\n\t\t\t\t\t\t\t\t\t// Lose focus for all fields\n\t\t\t\t\t\t\t\t\t$form.find( '.input-text, select' ).blur();\n\n\t\t\t\t\t\t\t\t\t// Scroll to top\n\t\t\t\t\t\t\t\t\t$( 'html, body' ).animate({\n\t\t\t\t\t\t\t\t\t\tscrollTop: ( $( 'form.checkout' ).offset().top - 100 )\n\t\t\t\t\t\t\t\t\t}, 1000 );\n\n\t\t\t\t\t\t\t\t\t// Trigger update in case we need a fresh nonce\n\t\t\t\t\t\t\t\t\tif ( result.refresh === 'true' )\n\t\t\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'update_checkout' );\n\n\t\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'checkout_error' );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdataType: 'html'\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t/* AJAX Coupon Form Submission */\n\t\t\t$( 'form.checkout_coupon' ).submit( function() {\n\t\t\t\tvar $form = $( this );\n\n\t\t\t\tif ( $form.is( '.processing' ) ) return false;\n\n\t\t\t\t$form.addClass( 'processing' ).block({ message: null, overlayCSS: {background: '#fff url(' + wc_checkout_params.ajax_loader_url + ') no-repeat center', backgroundSize: '16px 16px', opacity: 0.6 } });\n\n\t\t\t\tvar data = {\n\t\t\t\t\taction:\t\t\t'woocommerce_apply_coupon',\n\t\t\t\t\tsecurity:\t\twc_checkout_params.apply_coupon_nonce,\n\t\t\t\t\tcoupon_code:\t$form.find( 'input[name=coupon_code]' ).val()\n\t\t\t\t};\n\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype:\t\t'POST',\n\t\t\t\t\turl:\t\twc_checkout_params.ajax_url,\n\t\t\t\t\tdata:\t\tdata,\n\t\t\t\t\tsuccess:\tfunction( code ) {\n\t\t\t\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove();\n\t\t\t\t\t\t$form.removeClass( 'processing' ).unblock();\n\n\t\t\t\t\t\tif ( code ) {\n\t\t\t\t\t\t\t$form.before( code );\n\t\t\t\t\t\t\t$form.slideUp();\n\n\t\t\t\t\t\t\t$( 'body' ).trigger( 'update_checkout' );\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tdataType: 'html'\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t$( 'body' )\n\n\t\t\t\t// Init trigger\n\t\t\t\t.bind( 'init_checkout', function() {\n\t\t\t\t\t$( '#billing_country, #shipping_country, .country_to_state' ).change();\n\t\t\t\t\t$( 'body' ).trigger( 'update_checkout' );\n\t\t\t\t});\n\n\t\t\t// Update on page load\n\t\t\tif ( wc_checkout_params.is_checkout === '1' ) {\n\t\t\t\t$( 'body' ).trigger( 'init_checkout' );\n\t\t\t}\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// Frontend Chosen selects\n\t\t\t$( 'select.country_select, select.state_select' ).chosen( { search_contains: true } );\n\n\t\t\t$( 'body' ).bind( 'country_to_state_changed', function() {\n\t\t\t\t$( 'select.state_select' ).chosen().trigger( 'chosen:updated' );\n\t\t\t});\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// wc_country_select_params is required to continue, ensure the object exists\n\t\t\tif ( typeof wc_country_select_params === 'undefined' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t/* State/Country select boxes */\n\t\t\tvar states_json = wc_country_select_params.countries.replace( /&quot;/g, '\"' ),\n\t\t\t\tstates = $.parseJSON( states_json );\n\n\t\t\t$( 'select.country_to_state, input.country_to_state' ).change( function() {\n\n\t\t\t\tvar country = $( this ).val(),\n\t\t\t\t\t$statebox = $( this ).closest( 'div' ).find( '#billing_state, #shipping_state, #calc_shipping_state' ),\n\t\t\t\t\t$parent = $statebox.parent(),\n\t\t\t\t\tinput_name = $statebox.attr( 'name' ),\n\t\t\t\t\tinput_id = $statebox.attr( 'id' ),\n\t\t\t\t\tvalue = $statebox.val(),\n\t\t\t\t\tplaceholder = $statebox.attr( 'placeholder' );\n\n\t\t\t\tif ( states[ country ] ) {\n\t\t\t\t\tif ( states[ country ].length === 0 ) {\n\n\t\t\t\t\t\t$statebox.parent().hide().find( '.chosen-container' ).remove();\n\t\t\t\t\t\t$statebox.replaceWith( '<input type=\"hidden\" class=\"hidden\" name=\"' + input_name + '\" id=\"' + input_id + '\" value=\"\" placeholder=\"' + placeholder + '\" />' );\n\n\t\t\t\t\t\t$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' )] );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tvar options = '',\n\t\t\t\t\t\t\tstate = states[ country ];\n\n\t\t\t\t\t\tfor( var index in state ) {\n\t\t\t\t\t\t\tif ( state.hasOwnProperty( index ) ) {\n\t\t\t\t\t\t\t\toptions = options + '<option value=\"' + index + '\">' + state[ index ] + '</option>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$statebox.parent().show();\n\n\t\t\t\t\t\tif ( $statebox.is( 'input' ) ) {\n\t\t\t\t\t\t\t// Change for select\n\t\t\t\t\t\t\t$statebox.replaceWith( '<select name=\"' + input_name + '\" id=\"' + input_id + '\" class=\"state_select\" placeholder=\"' + placeholder + '\"></select>' );\n\t\t\t\t\t\t\t$statebox = $( this ).closest( 'div' ).find( '#billing_state, #shipping_state, #calc_shipping_state' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$statebox.html( '<option value=\"\">' + wc_country_select_params.i18n_select_state_text + '</option>' + options );\n\n\t\t\t\t\t\t$statebox.val( value );\n\n\t\t\t\t\t\t$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' )] );\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( $statebox.is( 'select' ) ) {\n\n\t\t\t\t\t\t$parent.show().find( '.chosen-container' ).remove();\n\t\t\t\t\t\t$statebox.replaceWith( '<input type=\"text\" class=\"input-text\" name=\"' + input_name + '\" id=\"' + input_id + '\" placeholder=\"' + placeholder + '\" />' );\n\n\t\t\t\t\t\t$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' )] );\n\n\t\t\t\t\t} else if ( $statebox.is( '.hidden' ) ) {\n\n\t\t\t\t\t\t$parent.show().find( '.chosen-container' ).remove();\n\t\t\t\t\t\t$statebox.replaceWith( '<input type=\"text\" class=\"input-text\" name=\"' + input_name + '\" id=\"' + input_id + '\" placeholder=\"' + placeholder + '\" />' );\n\n\t\t\t\t\t\t$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' )] );\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$( 'body' ).trigger( 'country_to_state_changing', [country, $( this ).closest( 'div' )] );\n\n\t\t\t}).change();\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\t\t\t$( '.wc-credit-card-form-card-number' ).payment( 'formatCardNumber' );\n\t\t\t$( '.wc-credit-card-form-card-expiry' ).payment( 'formatCardExpiry' );\n\t\t\t$( '.wc-credit-card-form-card-cvc' ).payment( 'formatCardCVC' );\n\n\t\t\t$( 'body' )\n\t\t\t\t.on( 'updated_checkout', function() {\n\t\t\t\t\t$( '.wc-credit-card-form-card-number' ).payment( 'formatCardNumber' );\n\t\t\t\t\t$( '.wc-credit-card-form-card-expiry' ).payment( 'formatCardExpiry' );\n\t\t\t\t\t$( '.wc-credit-card-form-card-cvc' ).payment( 'formatCardCVC' );\n\t\t\t\t});\n\t\t} );\n\t\tjQuery( function( $ ) {\n\n\t\t\t// woocommerce_price_slider_params is required to continue, ensure the object exists\n\t\t\tif ( typeof woocommerce_price_slider_params === 'undefined' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Get markup ready for slider\n\t\t\t$( 'input#min_price, input#max_price' ).hide();\n\t\t\t$( '.price_slider, .price_label' ).show();\n\n\t\t\t// Price slider uses jquery ui\n\t\t\tvar min_price = $( '.price_slider_amount #min_price' ).data( 'min' ),\n\t\t\t\tmax_price = $( '.price_slider_amount #max_price' ).data( 'max' );\n\n\t\t\tcurrent_min_price = parseInt( min_price, 10 );\n\t\t\tcurrent_max_price = parseInt( max_price, 10 );\n\n\t\t\tif ( woocommerce_price_slider_params.min_price ) current_min_price = parseInt( woocommerce_price_slider_params.min_price, 10 );\n\t\t\tif ( woocommerce_price_slider_params.max_price ) current_max_price = parseInt( woocommerce_price_slider_params.max_price, 10 );\n\n\t\t\t$( 'body' ).bind( 'price_slider_create price_slider_slide', function( event, min, max ) {\n\t\t\t\tif ( woocommerce_price_slider_params.currency_pos === 'left' ) {\n\n\t\t\t\t\t$( '.price_slider_amount span.from' ).html( woocommerce_price_slider_params.currency_symbol + min );\n\t\t\t\t\t$( '.price_slider_amount span.to' ).html( woocommerce_price_slider_params.currency_symbol + max );\n\n\t\t\t\t} else if ( woocommerce_price_slider_params.currency_pos === 'left_space' ) {\n\n\t\t\t\t\t$( '.price_slider_amount span.from' ).html( woocommerce_price_slider_params.currency_symbol + \" \" + min );\n\t\t\t\t\t$( '.price_slider_amount span.to' ).html( woocommerce_price_slider_params.currency_symbol + \" \" + max );\n\n\t\t\t\t} else if ( woocommerce_price_slider_params.currency_pos === 'right' ) {\n\n\t\t\t\t\t$( '.price_slider_amount span.from' ).html( min + woocommerce_price_slider_params.currency_symbol );\n\t\t\t\t\t$( '.price_slider_amount span.to' ).html( max + woocommerce_price_slider_params.currency_symbol );\n\n\t\t\t\t} else if ( woocommerce_price_slider_params.currency_pos === 'right_space' ) {\n\n\t\t\t\t\t$( '.price_slider_amount span.from' ).html( min + \" \" + woocommerce_price_slider_params.currency_symbol );\n\t\t\t\t\t$( '.price_slider_amount span.to' ).html( max + \" \" + woocommerce_price_slider_params.currency_symbol );\n\n\t\t\t\t}\n\n\t\t\t\t$( 'body' ).trigger( 'price_slider_updated', min, max );\n\t\t\t});\n\n\t\t\t$( '.price_slider' ).slider({\n\t\t\t\trange: true,\n\t\t\t\tanimate: true,\n\t\t\t\tmin: min_price,\n\t\t\t\tmax: max_price,\n\t\t\t\tvalues: [ current_min_price, current_max_price ],\n\t\t\t\tcreate : function( event, ui ) {\n\n\t\t\t\t\t$( '.price_slider_amount #min_price' ).val( current_min_price );\n\t\t\t\t\t$( '.price_slider_amount #max_price' ).val( current_max_price );\n\n\t\t\t\t\t$( 'body' ).trigger( 'price_slider_create', [ current_min_price, current_max_price ] );\n\t\t\t\t},\n\t\t\t\tslide: function( event, ui ) {\n\n\t\t\t\t\t$( 'input#min_price' ).val( ui.values[0] );\n\t\t\t\t\t$( 'input#max_price' ).val( ui.values[1] );\n\n\t\t\t\t\t$( 'body' ).trigger( 'price_slider_slide', [ ui.values[0], ui.values[1] ] );\n\t\t\t\t},\n\t\t\t\tchange: function( event, ui ) {\n\n\t\t\t\t\t$( 'body' ).trigger( 'price_slider_change', [ ui.values[0], ui.values[1] ] );\n\n\t\t\t\t},\n\t\t\t});\n\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// wc_single_product_params is required to continue, ensure the object exists\n\t\t\tif ( typeof wc_single_product_params === 'undefined' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Tabs\n\t\t\t$( '.woocommerce-tabs .panel' ).hide();\n\n\t\t\t$( '.woocommerce-tabs ul.tabs li a' ).click( function() {\n\n\t\t\t\tvar $tab = $( this ),\n\t\t\t\t\t$tabs_wrapper = $tab.closest( '.woocommerce-tabs' );\n\n\t\t\t\t$( 'ul.tabs li', $tabs_wrapper ).removeClass( 'active' );\n\t\t\t\t$( 'div.panel', $tabs_wrapper ).hide();\n\t\t\t\t$( 'div' + $tab.attr( 'href' ), $tabs_wrapper).show();\n\t\t\t\t$tab.parent().addClass( 'active' );\n\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t$( '.woocommerce-tabs' ).each( function() {\n\t\t\t\tvar hash\t= window.location.hash,\n\t\t\t\t\turl\t\t= window.location.href,\n\t\t\t\t\ttabs\t= $( this );\n\n\t\t\t\tif ( hash.toLowerCase().indexOf( \"comment-\" ) >= 0 ) {\n\t\t\t\t\t$('ul.tabs li.reviews_tab a', tabs ).click();\n\n\t\t\t\t} else if ( url.indexOf( \"comment-page-\" ) > 0 || url.indexOf( \"cpage=\" ) > 0 ) {\n\t\t\t\t\t$( 'ul.tabs li.reviews_tab a', $( this ) ).click();\n\n\t\t\t\t} else {\n\t\t\t\t\t$( 'ul.tabs li:first a', tabs ).click();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$( 'a.woocommerce-review-link' ).click( function() {\n\t\t\t\t$( '.reviews_tab a' ).click();\n\t\t\t\treturn true;\n\t\t\t});\n\n\t\t\t// Star ratings for comments\n\t\t\t$( '#rating' ).hide().before( '<p class=\"stars\"><span><a class=\"star-1\" href=\"#\">1</a><a class=\"star-2\" href=\"#\">2</a><a class=\"star-3\" href=\"#\">3</a><a class=\"star-4\" href=\"#\">4</a><a class=\"star-5\" href=\"#\">5</a></span></p>' );\n\n\t\t\t$( 'body' )\n\t\t\t\t.on( 'click', '#respond p.stars a', function() {\n\t\t\t\t\tvar $star = $( this ),\n\t\t\t\t\t\t$rating = $( this ).closest( '#respond' ).find( '#rating' );\n\n\t\t\t\t\t$rating.val( $star.text() );\n\t\t\t\t\t$star.siblings( 'a' ).removeClass( 'active' );\n\t\t\t\t\t$star.addClass( 'active' );\n\n\t\t\t\t\treturn false;\n\t\t\t\t})\n\t\t\t\t.on( 'click', '#respond #submit', function() {\n\t\t\t\t\tvar $rating = $( this ).closest( '#respond' ).find( '#rating' ),\n\t\t\t\t\t\trating = $rating.val();\n\n\t\t\t\t\tif ( $rating.size() > 0 && ! rating && wc_single_product_params.review_rating_required === 'yes' ) {\n\t\t\t\t\t\talert( wc_single_product_params.i18n_required_rating_text );\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// prevent double form submission\n\t\t\t$( 'form.cart' ).submit( function() {\n\t\t\t\t$( this ).find( ':submit' ).attr( 'disabled','disabled' );\n\t\t\t});\n\t\t});\n\n\t\tjQuery( function( $ ) {\n\n\t\t\t// Orderby\n\t\t\t$( '.woocommerce-ordering' ).on( 'change', 'select.orderby', function() {\n\t\t\t\t$( this ).closest( 'form' ).submit();\n\t\t\t});\n\n\t\t\t// Quantity buttons\n\t\t\t$( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '<input type=\"button\" value=\"+\" class=\"plus\" />' ).prepend( '<input type=\"button\" value=\"-\" class=\"minus\" />' );\n\n\t\t\t// Target quantity inputs on product pages\n\t\t\t$( 'input.qty:not(.product-quantity input.qty)' ).each( function() {\n\t\t\t\tvar min = parseFloat( $( this ).attr( 'min' ) );\n\n\t\t\t\tif ( min && min > 0 && parseFloat( $( this ).val() ) < min ) {\n\t\t\t\t\t$( this ).val( min );\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$( document ).on( 'click', '.plus, .minus', function() {\n\n\t\t\t\t// Get values\n\t\t\t\tvar $qty\t\t= $( this ).closest( '.quantity' ).find( '.qty' ),\n\t\t\t\t\tcurrentVal\t= parseFloat( $qty.val() ),\n\t\t\t\t\tmax\t\t\t= parseFloat( $qty.attr( 'max' ) ),\n\t\t\t\t\tmin\t\t\t= parseFloat( $qty.attr( 'min' ) ),\n\t\t\t\t\tstep\t\t= $qty.attr( 'step' );\n\n\t\t\t\t// Format values\n\t\t\t\tif ( ! currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0;\n\t\t\t\tif ( max === '' || max === 'NaN' ) max = '';\n\t\t\t\tif ( min === '' || min === 'NaN' ) min = 0;\n\t\t\t\tif ( step === 'any' || step === '' || step === undefined || parseFloat( step ) === 'NaN' ) step = 1;\n\n\t\t\t\t// Change the value\n\t\t\t\tif ( $( this ).is( '.plus' ) ) {\n\n\t\t\t\t\tif ( max && ( max == currentVal || currentVal > max ) ) {\n\t\t\t\t\t\t$qty.val( max );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$qty.val( currentVal + parseFloat( step ) );\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( min && ( min == currentVal || currentVal < min ) ) {\n\t\t\t\t\t\t$qty.val( min );\n\t\t\t\t\t} else if ( currentVal > 0 ) {\n\t\t\t\t\t\t$qty.val( currentVal - parseFloat( step ) );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Trigger change event\n\t\t\t\t$qty.trigger( 'change' );\n\t\t\t});\n\t\t});\n\n\t\t/**\n\t\t * End Woocommerce scripts\n\t\t */\n\n\t\twoocommerce_scripts_load.bound = true;\n\t\tif (globalDebug) {console.log(\"Woocommerce bind events once\");}\n\t}\n\n\t// these scripts should load anytime\n\tjQuery(function($) {\n\t\tif ( $('.stars').length < 1 ) {\n\n\t\t\t// Star ratings for comments\n\t\t\t$('#rating').hide().before('<p class=\"stars\"><span><a class=\"star-1\" href=\"#\">1</a><a class=\"star-2\" href=\"#\">2</a><a class=\"star-3\" href=\"#\">3</a><a class=\"star-4\" href=\"#\">4</a><a class=\"star-5\" href=\"#\">5</a></span></p>');\n\n\n\t\t}\n\n\n\t\t// product variation\n\t\t$('.variations_form').wc_variation_form();\n\t\t$('.variations_form .variations select').change();\n\t});\n\n\n}", "title": "" }, { "docid": "7cdf31aba236f636936187c29d6e423a", "score": "0.47706953", "text": "function main_entry(){\n\tinit_map();\n\t// register_ui_events_dom(); // old style\n\tregister_ui_events_jquery(); // new style\n}", "title": "" }, { "docid": "32b728ab321e86c7c64f48fbdb7fe745", "score": "0.4768587", "text": "onReady() {\n // Override to use it\n }", "title": "" }, { "docid": "4fa9a6925620b81d63cc5d07a4afc1a5", "score": "0.4763968", "text": "function Main_elementsExtraJS() {\n // screen (Main) extra code\n\n /* mobiledatepicker_5 */\n\n Main_mobiledatepicker_5_selector = \"#Main_mobiledatepicker_5\";\n Main_mobiledatepicker_5_dataPickerOptions = {\n dateFormat: \"dd/mm/yy\",\n firstDay: 0,\n\n maxDate: new Date(\"\"),\n\n minDate: new Date(\"\"),\n\n dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n showOtherMonths: true\n };\n\n Main_mobiledatepicker_5_dataPickerOptions.defaultDate = new Date(\"01/01/2015\");\n\n Apperyio.__registerComponent('mobiledatepicker_5', new Apperyio.ApperyMobileDatePickerComponent(\"Main_mobiledatepicker_5\", Main_mobiledatepicker_5_dataPickerOptions));\n\n /* mobiletoggle_119 */\n\n $(\"#Main_mobiletoggle_119\").parent().find(\".ui-flipswitch-on\").attr(\"tabindex\", \"17\");\n\n /* mobileselectmenu_150 */\n\n $(\"#Main_mobileselectmenu_150\").parent().find(\"a.ui-btn\").attr(\"tabindex\", \"28\");\n\n /* mobilepopup_167 */\n $(\"#Main_mobilepopup_167\").popup(\"option\", \"positionTo\", \"window\");\n\n /* basicloginpopup */\n $(\"#Main_basicloginpopup\").popup(\"option\", \"positionTo\", \"window\");\n\n }", "title": "" }, { "docid": "0d5e259d75560a226da3b31e25c3df4a", "score": "0.4759594", "text": "function js(){\n\treturn gulp.src([jsBootstrap, jsWow, jsTheme])\n\t\t.pipe(minify({\n\t ext:{\n\t min:'.js'\n\t },\n\t noSource: true\n\t // exclude: ['tasks']\n \t}))\n\t\t.pipe(concat('theme.js', {newLine: '\\n\\n'}))\n\t\t.pipe(gulp.dest('./'));\n}", "title": "" }, { "docid": "798b2e7b50817565d5472c8ed09fd1f9", "score": "0.4757074", "text": "function javascript() {\n return gulp\n .src(PATHS.entries)\n .pipe(named())\n .pipe(sourcemaps.init())\n .pipe(\n webpackStream(\n {\n mode: PRODUCTION ? 'production' : 'development',\n module: {\n rules: [\n {\n test: /\\.js$/,\n exclude: [/node_modules/],\n use: {\n loader: 'babel-loader',\n options: {\n presets: ['@babel/preset-env'],\n compact: false,\n },\n },\n },\n ],\n },\n devtool: 'source-map',\n },\n webpack2\n )\n )\n .pipe(sourcemaps.write())\n .pipe(gulp.dest(PATHS.dist + '/assets/js'));\n}", "title": "" }, { "docid": "e23da7cc9dace2b24ed3966c49f84958", "score": "0.4747691", "text": "function js() {\n return gulp.src(\"./src/js/**/*.js\")\n .pipe(babel({\n presets: ['@babel/preset-env']\n }))\n .pipe(concat(\"all.js\"))\n .pipe(uglify())\n .pipe(gulp.dest(\"./static/js\"))\n .pipe(browserSync.stream());\n}", "title": "" }, { "docid": "15b364d8446e990178cebc45095db8cc", "score": "0.4744995", "text": "static GetAssetBundleDependencies() {}", "title": "" }, { "docid": "0b739357bc1a562985b0108364063761", "score": "0.47381297", "text": "function qodeOnDocumentReady() {\n\n if(typeof qode === 'undefined' || typeof qode === '' ){\n //if theme is not installed, generate single items manualy\n qodeInitTourItemTabs();\n }\n\n\t qodeTrigerTourGalleryMasonry();\n\n searchTours().fieldsHelper.init();\n searchTours().handleSearch.init();\n\n qodeToursGalleryAnimation();\n }", "title": "" }, { "docid": "3f7a6e373f032ed5bc60844fd922c01e", "score": "0.4729815", "text": "function scripts() {\n return gulp.src('js/**/*.js')\n .pipe(sourcemaps.init())\n .pipe(babel())\n // IMPORTANT: Make sure the references tp js files point at all.js\n .pipe(concat('all.js'))\n .pipe(sourcemaps.write())\n .pipe(gulp.dest('dist/js'));\n}", "title": "" }, { "docid": "ab02e46a51730f66c006b18a1f5c0d6b", "score": "0.47256824", "text": "function fuse_IconographyEngine_ScriptLoading() {\n\n// *****InitSetting*****\n\n/* CSS Dynamic Loading */\nfuse_IconographyEngine_loadCss(_spPageContextInfo.siteAbsoluteUrl + '/catdsgsp/jslinks/sitecolumns/catdsgspjslinkiconography/catdsgsp-jslink-sitecolumn-iconography.css');\nfuse_IconographyEngine_loadCss('https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css');\n\n/* JS Dynamic Loading */\n\nfuse_IconographyEngine_loadScript('https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.min.js', function () {\n\tfuse_IconographyEngine_loadScript(\"https://ajax.aspnetcdn.com/ajax/jquery.ui/1.12.1/jquery-ui.min.js\", function () {\n\t\t\n\t\t\n\t\tfuse_IconographyEngine_LaunchPreCheck();\n\t\n\t});\n});\n\n}", "title": "" }, { "docid": "17c51934491fa74661259dd8306bb496", "score": "0.47248653", "text": "function init () {\n $doc.foundation();\n $body = $('body');\n $userSettingsDropdown = $('#user-settings-dropdown');\n $userSettings = $('#user-settings');\n map_canvas = document.getElementById(\"map_canvas\");\n\n // Bind settings dropdown and settings object\n $userSettings.click(function () { toggleSettingsDropdown(); } );\n userPreferences.init();\n\n // Initialize Auto call completion\n autoComplete.init();\n\n // DX Spot container initialization\n dxSpots.init();\n }", "title": "" }, { "docid": "b518487f74e6b02e1671154cb689d6a3", "score": "0.47182986", "text": "function bootstrap_scripts() {\r\n return gulp.src(paths.bootstrap.src)\r\n .pipe(gulp.dest(paths.bootstrap.dest));\r\n}", "title": "" }, { "docid": "6e2419973772b02fb98e5f2a58898364", "score": "0.47176185", "text": "static get UtilityJS() { return \"utility.js\"; }", "title": "" }, { "docid": "32032f29ecedb68efcac5f1367250775", "score": "0.471593", "text": "function require_jquery_countdown(web_root , callback , custom_css)\n{\n\tvar js_root = web_root + 'js/';\n\tvar common_path = web_root + 'js/jquery.countdown/';\n\tvar css_name = custom_css ? custom_css : common_path + 'jquery.countdown.css';\n\t\n var lib_list = [\n \t{path:js_root + 'timesales.js' , type:'js' , callback:null},\n {path:css_name , type:'css' , callback:null},\n {path:common_path + 'jquery.countdown.js' , type:'js' , callback:null},\n {path:common_path + 'jquery.countdown-ja.js' , type:'js' , callback:callback}\n ];\n \n //var objJSLoader = new JSLoader();\n for (var i = 0; i < lib_list.length; i++) {\n objJSLoader.add(lib_list[i].type , lib_list[i].path , lib_list[i].callback);\n }\n \n objJSLoader.load();\n}", "title": "" }, { "docid": "d4acc906da0495db66240fb37a49e090", "score": "0.47104937", "text": "function __bootloader() {\n\t_checkJSEval();\n _checkJSResBase();\n _loadOgreLangs();\n}", "title": "" }, { "docid": "a89488da6f77716a6cc24ebf39c99fd3", "score": "0.47098973", "text": "function app() {\n\n // load some scripts \n loader.load({\n url: \"./bower_components/jquery/dist/jquery.min.js\"\n }, {\n url: \"./bower_components/lodash/dist/lodash.min.js\"\n }, {\n url: \"./bower_components/backbone/backbone.js\"\n }, {\n url: \"./bower_components/pathjs/path.min.js\"\n }, {\n url: \"./js/jqpubsub.js\"\n }, {\n url: \"./js/views/book.js\"\n }).then(function() {\n _.templateSettings.interpolate = /{([\\s\\S]+?)}/g;\n \n var items = new GoogleBook();\n //start app?\n })\n\n}", "title": "" }, { "docid": "2dd9a7085dd85da47116b6f69102a649", "score": "0.47061345", "text": "function copyVendorJS() {\n return gulp.src(\"./src/js/vendor/**/*\").pipe(gulp.dest(\"./dist/js/\"));\n}", "title": "" }, { "docid": "312f3f88202153c652194f757ac23e15", "score": "0.47021076", "text": "events() {\n console.log(\"demo js loaded!\");\n console.log(\"Congratulations!\");\n }", "title": "" }, { "docid": "b797ee75ddf83526190967b7be75c142", "score": "0.4701013", "text": "function initGMaps() {\n GMaps('.js-map')\n}", "title": "" }, { "docid": "0f9301341180e1365fa68818a80fdcb6", "score": "0.46954608", "text": "static assetsBody(data){\n\t\tvar resources = Core.UI.Render.RenderHelper.loadResources(data.assets);\n\t\tvar js_arr = resources.filter((name) => {\n\t\t\treturn Runtime.rs.extname(name) == \"js\";\n\t\t});\n\t\tjs_arr = js_arr.pushIm(\"@Core.UI/es6/Drivers/RenderDriver.js\");\n\t\tjs_arr = js_arr.pushIm(\"@Core.UI/es6/Drivers/ApiBusDriver.js\");\n\t\tjs_arr = this.patchAssets(data, js_arr);\n\t\tjs_arr = js_arr.map((js) => {\n\t\t\treturn Runtime.rtl.normalizeUIVector((new Runtime.Vector())\n\t\t\t.push(new Runtime.UIStruct(new Runtime.Map({\n\t\t\t\"space\":\"bdb8\",\n\t\t\t\"class_name\":this.getCurrentClassName(),\n\t\t\t\"name\":\"script\",\n\t\t\t\"props\": (new Runtime.Map())\n\t\t\t\t.set(\"src\", js)\n\t\t\t,\n\t\t\t}))));\n\t\t});\n\t\treturn js_arr;\n\t}", "title": "" }, { "docid": "f4965cb7f3a3d576aac81832019d1ef3", "score": "0.46953985", "text": "function commonScripts() {\n WinMove();\n $('.tagsinput').tagsinput({\n tagClass: 'label label-primary'\n });\n $('.input-group.date').datepicker({\n todayBtn: \"linked\",\n keyboardNavigation: false,\n forceParse: false,\n calendarWeeks: true,\n autoclose: true\n });\n //---- Required-start\n $('.form-group:has(input[required]) > label.control-label')\n .after('<span class=\"is-required\"> *</span>');\n //---- Required-end\n //---- Required-start\n $('.form-group:has(select[required]) > label.control-label')\n .after('<span class=\"is-required\"> *</span>');\n //---- Required-end\n // Add body-small class if window less than 768px\n if ($(this).width() < 769) {\n $('body').addClass('body-small');\n }\n else {\n $('body').removeClass('body-small');\n }\n // Tooltips demo\n $('body').tooltip({\n selector: \"[data-toggle=tooltip]\",\n container: \"body\"\n });\n $(\".dropdown\").hover(function () {\n $('.dropdown-menu', this).stop(true, true).fadeIn(\"fast\");\n $(this).toggleClass('open');\n $('b', this).toggleClass(\"caret caret-up\");\n }, function () {\n $('.dropdown-menu', this).stop(true, true).fadeOut(\"fast\");\n $(this).toggleClass('open');\n $('b', this).toggleClass(\"caret caret-up\");\n });\n // MetisMenu\n $('#side-menu').metisMenu();\n // Collapse ibox function\n $('.collapse-link').on('click', function () {\n var ibox = $(this).closest('div.ibox');\n var button = $(this).find('i');\n var content = ibox.children('.ibox-content');\n content.slideToggle(200);\n button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');\n ibox.toggleClass('').toggleClass('border-bottom');\n setTimeout(function () {\n ibox.resize();\n ibox.find('[id^=map-]').resize();\n }, 50);\n });\n $('.select2-selection__rendered').removeAttr('title');\n $('.select2').change(function () {\n $('.select2-selection__rendered').removeAttr('title');\n });\n // Close ibox function\n $('.close-link').on('click', function () {\n var content = $(this).closest('div.ibox');\n content.remove();\n });\n // Fullscreen ibox function\n $('.fullscreen-link').on('click', function () {\n var ibox = $(this).closest('div.ibox');\n var button = $(this).find('i');\n $('body').toggleClass('fullscreen-ibox-mode');\n button.toggleClass('fa-expand').toggleClass('fa-compress');\n ibox.toggleClass('fullscreen');\n setTimeout(function () {\n $(window).trigger('resize');\n }, 100);\n });\n // Close menu in canvas mode\n $('.close-canvas-menu').on('click', function () {\n $(\"body\").toggleClass(\"mini-navbar\");\n SmoothlyMenu();\n });\n // Run menu of canvas\n $('body.canvas-menu .sidebar-collapse').slimScroll({\n height: '100%',\n railOpacity: 0.9\n });\n // Open close right sidebar\n $('.right-sidebar-toggle').on('click', function () {\n $('#right-sidebar').toggleClass('sidebar-open');\n });\n // Initialize slimscroll for right sidebar\n $('.sidebar-container').slimScroll({\n height: '100%',\n railOpacity: 0.4,\n wheelStep: 10\n });\n // Open close small chat\n $('.open-small-chat').on('click', function () {\n $(this).children().toggleClass('fa-comments').toggleClass('fa-remove');\n $('.small-chat-box').toggleClass('active');\n });\n // Initialize slimscroll for small chat\n $('.small-chat-box .content').slimScroll({\n height: '234px',\n railOpacity: 0.4\n });\n // Small todo handler\n $('.check-link').on('click', function () {\n var button = $(this).find('i');\n var label = $(this).next('span');\n button.toggleClass('fa-check-square').toggleClass('fa-square-o');\n label.toggleClass('todo-completed');\n return false;\n });\n // Append config box / Only for demo purpose\n // Uncomment on server mode to enable XHR calls\n // $.get(\"skin-config.html\", function (data) {\n // if (!$('body').hasClass('no-skin-config'))\n // $('body').append(data);\n // });\n // Minimalize menu\n $('.navbar-minimalize').on('click', function () {\n $(\"body\").toggleClass(\"mini-navbar\");\n SmoothlyMenu();\n });\n // Tooltips demo\n // $('.tooltip-demo').tooltip({\n // selector: \"[data-toggle=tooltip]\",\n // container: \"body\"\n // });\n $('[data-toggle=\"tooltip\"]').tooltip();\n // Full height of sidebar\n function fix_height() {\n var heightWithoutNavbar = $(\"body > #wrapper\").height() - 61;\n $(\".sidebar-panel\").css(\"min-height\", heightWithoutNavbar + \"px\");\n var navbarheight = $('nav.navbar-default').height();\n var wrapperHeight = $('#page-wrapper').height();\n if (navbarheight > wrapperHeight) {\n $('#page-wrapper').css(\"min-height\", navbarheight + \"px\");\n }\n if (navbarheight < wrapperHeight) {\n $('#page-wrapper').css(\"min-height\", $(window).height() + \"px\");\n }\n if ($('body').hasClass('fixed-nav')) {\n if (navbarheight > wrapperHeight) {\n $('#page-wrapper').css(\"min-height\", navbarheight + \"px\");\n }\n else {\n $('#page-wrapper').css(\"min-height\", $(window).height() - 60 + \"px\");\n }\n }\n }\n fix_height();\n // Fixed Sidebar\n $(window).bind(\"load\", function () {\n if ($(\"body\").hasClass('fixed-sidebar')) {\n $('.sidebar-collapse').slimScroll({\n height: '100%',\n railOpacity: 0.9\n });\n }\n });\n // Move right sidebar top after scroll\n $(window).scroll(function () {\n if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav')) {\n $('#right-sidebar').addClass('sidebar-top');\n }\n else {\n $('#right-sidebar').removeClass('sidebar-top');\n }\n });\n $(window).bind(\"load resize scroll\", function () {\n if (!$(\"body\").hasClass('body-small')) {\n fix_height();\n }\n });\n $(\"[data-toggle=popover]\")\n .popover();\n // Add slimscroll to element\n $('.full-height-scroll').slimscroll({\n height: '100%'\n });\n // Minimalize menu when screen is less than 768px\n $(window).bind(\"resize\", function () {\n if ($(this).width() < 769) {\n $('body').addClass('body-small');\n }\n else {\n $('body').removeClass('body-small');\n }\n });\n // Local Storage functions\n // Set proper body class and plugins based on user configuration\n if (localStorageSupport()) {\n var collapse = localStorage.getItem(\"collapse_menu\");\n var fixedsidebar = localStorage.getItem(\"fixedsidebar\");\n var fixednavbar = localStorage.getItem(\"fixednavbar\");\n var boxedlayout = localStorage.getItem(\"boxedlayout\");\n var fixedfooter = localStorage.getItem(\"fixedfooter\");\n var body = $('body');\n if (fixedsidebar == 'on') {\n body.addClass('fixed-sidebar');\n $('.sidebar-collapse').slimScroll({\n height: '100%',\n railOpacity: 0.9\n });\n }\n if (collapse == 'on') {\n if (body.hasClass('fixed-sidebar')) {\n if (!body.hasClass('body-small')) {\n body.addClass('mini-navbar');\n }\n }\n else {\n if (!body.hasClass('body-small')) {\n body.addClass('mini-navbar');\n }\n }\n }\n if (fixednavbar == 'on') {\n $(\".navbar-static-top\").removeClass('navbar-static-top').addClass('navbar-fixed-top');\n body.addClass('fixed-nav');\n }\n if (boxedlayout == 'on') {\n body.addClass('boxed-layout');\n }\n if (fixedfooter == 'on') {\n $(\".footer\").addClass('fixed');\n }\n }\n // check if browser support HTML5 local storage\n function localStorageSupport() {\n return (('localStorage' in window) && window['localStorage'] !== null);\n }\n // For demo purpose - animation css script\n function animationHover(element, animation) {\n element = $(element);\n element.hover(function () {\n element.addClass('animated ' + animation);\n }, function () {\n //wait for animation to finish before removing classes\n window.setTimeout(function () {\n element.removeClass('animated ' + animation);\n }, 2000);\n });\n }\n function SmoothlyMenu() {\n if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {\n // Hide menu in order to smoothly turn on when maximize menu\n $('#side-menu').hide();\n // For smoothly turn on menu\n setTimeout(function () {\n $('#side-menu').fadeIn(400);\n }, 200);\n }\n else if ($('body').hasClass('fixed-sidebar')) {\n $('#side-menu').hide();\n setTimeout(function () {\n $('#side-menu').fadeIn(400);\n }, 100);\n }\n else {\n // Remove all inline style from jquery fadeIn function to reset menu state\n $('#side-menu').removeAttr('style');\n }\n }\n // Dragable panels\n function WinMove() {\n var element = \"[class*=col]\";\n var handle = \".ibox-title.dragables\";\n var connect = \"[class*=col]\";\n $(element).sortable({\n handle: handle,\n connectWith: connect,\n tolerance: 'pointer',\n forcePlaceholderSize: true,\n opacity: 0.8\n })\n .disableSelection();\n }\n}", "title": "" }, { "docid": "dc3e5371e5ad354c52ed04123af6aa4c", "score": "0.46899658", "text": "function scripts(cb) {\n gulp.src(path.js)\n .pipe(fileInclude())\n .pipe(concat('app.min.js'))\n .pipe(babel())\n .pipe(uglify())\n .pipe(debug({ title: 'compiled:' }))\n .pipe(gulp.dest(`catalog/view/theme/${theme}/js`))\n .on('end', cb)\n .pipe(browserSync.stream())\n}", "title": "" }, { "docid": "77bbedd0a328ba705abfb867c8570333", "score": "0.46881205", "text": "function jsTask() {\n /*\n return src([\n files.jsPath,\n //,'!' + 'includes/js/jquery.min.js', // to exclude any specific files\n ])\n */\n return src('js/main.js')\n .pipe(named())\n .pipe(webpack({ devtool: 'source-map' }))\n .pipe(dest('dist/js'));\n}", "title": "" }, { "docid": "5dc4de47dccd885e349fd7bacc57ea0b", "score": "0.4685305", "text": "function startScreen_elementsExtraJS() {\n // screen (startScreen) extra code\n\n /* tog_offline_sync_enable */\n\n $(\"#startScreen_tog_offline_sync_enable\").parent().find(\".ui-flipswitch-on\").attr(\"tabindex\", \"19\");\n\n /* navi_panel_list */\n\n listView = $(\"#startScreen_navi_panel_list\");\n theme = listView.attr(\"data-theme\");\n if (typeof theme !== 'undefined') {\n var themeClass = \"ui-btn-up-\" + theme;\n listItem = $(\"#startScreen_navi_panel_list .ui-li-static\");\n $.each(listItem, function(index, value) {\n $(this).addClass(themeClass);\n });\n }\n\n /* navi_panel_list_details */\n\n /* navi_panel_list_personal */\n\n /* btn_facebook */\n\n /* btn_google */\n\n /* btn_linkedin */\n\n /* navi_panel_list_myevents */\n\n /* navi_panel_list_wellbeing */\n\n /* navi_panel_list_social */\n\n /* mobilelistitem_96 */\n\n /* navi_panel_list_contacts_sync */\n\n }", "title": "" }, { "docid": "00bd7e02d8cdac23bc05f8c366555ce7", "score": "0.46849847", "text": "function loadJS(u) {\n var r = document.getElementsByTagName(\"script\")[0],\n s = document.createElement(\"script\");\n s.src = u;\n r.parentNode.insertBefore(s, r);\n }", "title": "" }, { "docid": "17866d472b901b088e9662f71d371d3d", "score": "0.46741968", "text": "function pluginsActivation() {\n\n // Smooth Scroll\n var navHeight = $('.page-header .navbar-nav').outerHeight();\n $('body').smoothScroll({\n delegateSelector: '#navbarNav .nav-link, .hero-mouse',\n offset: -navHeight,\n easing: \"easeOutBack\",\n speed: 1234\n });\n\n // Hover Direction Change\n $(\".snake_dir\").snakeify({speed: 300});\n\n // Magnific Popup\n $('.m-popup').magnificPopup({\n gallery: {\n enabled: true,\n navigateByImgClick: true,\n preload: [0, 1] // Will preload 0 - before current, and 1 after the current image\n },\n type: 'image'\n });\n\n // Change Scrollbar Color\n var color = getComputedStyle(document.body).getPropertyValue('--primary-color');\n $(\"body\").niceScroll({cursorcolor: color, cursorwidth: \"6px\", cursorborder: '0', scrollspeed: 180, bouncescroll: true});\n\n // Counter Up Plugin\n $('.counter').counterUp({delay: 100, time: 3000});\n\n // Masonry Grid\n $('.blog-masonry-init').isotope({itemSelector: '.masonry-item', percentPosition: true, masonry: {}})\n\n }", "title": "" }, { "docid": "db78f0258a95044ccb79d10ee41a7a43", "score": "0.46680626", "text": "function vendorScripts () {\n return gulp.src('clientapp/scripts/lib/*.js')\n .pipe(concat('vendor.js'))\n .pipe(uglify())\n .pipe(size())\n .pipe(gulp.dest('public'));\n}", "title": "" }, { "docid": "7961c4273eceb84b40435d2b5c845f40", "score": "0.4667064", "text": "onReady() {\n // go through the panel toggles and add click event to the pattern extra toggle button\n const toggles = document.querySelectorAll('.pl-js-pattern-extra-toggle');\n\n for (let i = 0; i < toggles.length; i++) {\n toggles[i].addEventListener('click', (e) => {\n const patternPartial = toggles[i].getAttribute('data-patternpartial');\n modalStyleguide.toggle(patternPartial);\n });\n }\n }", "title": "" }, { "docid": "619ddf4d0c1d421075785141d087c6dd", "score": "0.46609306", "text": "function js() {\n\tvar scripts = src([\"src/js/**/*.js\", \"!src/js/vendor/*.js\"])\n\t.pipe(sourcemaps.init())\n\t//.pipe(jshint(\".jshintrc\"))\n\t.pipe(jshint.reporter(\"default\"))\n\t.pipe(concat(\"App.js\"))\n\t.pipe(dest(\"dist/js\"))\n\t.pipe(uglify())\n\t.pipe(dest(\"dist/js\"))\n\t.pipe(sourcemaps.write('.'))\n\t.pipe(notify({message:\"Scripts task complete\"}));\n\t\n\tvar vendor = src(\"src/js/vendor/*.js\")\n\t.pipe(concat(\"Vendor.js\"))\n\t.pipe(dest(\"dist/js\"))\n\t.pipe(uglify())\n\t.pipe(dest(\"dist/js\"))\n\t.pipe(notify({message:\"Vendor scripts task complete\"}));\n\t\n\treturn merge(scripts, vendor);\n}", "title": "" }, { "docid": "a6a3b003662a5e073312d8caae8cbd66", "score": "0.4657054", "text": "function loadJS(){\r\n\r\n// Class of tier 1 navigation\r\nvar mainNavClass = '.nav-main';\r\n\r\n// Mobile navigation?\r\nvar offCanvas = true;\r\n\r\n// Display of the tier 1 section title of the current page you are on.\r\nvar sectionTitle = false;\r\n\r\n// Place the section title before what element?\r\nvar sectionTitleLocation = '.nav-sub-container .bannermodtitle';\r\n\r\n // =============================\r\n // CSS: user agent selectors\r\n // =============================\r\n\r\n // rog.ie/blog/html5-boilerplate-addon\r\n\r\n var b = document.documentElement;\r\n // Add browser information as a data attribute on the `html` tag.\r\n b.setAttribute('data-useragent', navigator.userAgent);\r\n // Add platform information as a data attribute on the `html` tag.\r\n b.setAttribute('data-platform', navigator.platform );\r\n // Class devices that register touch gestures.\r\n b.className += ((!!('ontouchstart' in window) || !!\r\n ('onmsgesturechange' in window))?' touch':'');\r\n\r\n\r\n\r\n\r\n // =============================\r\n // Navigation\r\n // =============================\r\n\r\n // Put each mega menu div into each respective dhtml menu\r\n $j('#bottombanner .mega-menu').each(function(i) {\r\n $j(this).prependTo($j('div[id*=\"dhtmlmenu\"]').eq(i).find('ul'));\r\n });\r\n\r\n\r\n // Put the dropdowns in their respective sections in the main nav\r\n $j('.nav-main a').fsMenus();\r\n // $j('a[data-menu=\"ql_menu\"]').fsMenus();\r\n\r\n\r\n // 4 Column Nav Layout\r\n var num_cols = 2,\r\n container = $j('.nav-main .fsMenu > ul'),\r\n listItem = 'li',\r\n listClass = 'twoCol-list';\r\n container.each(function() {\r\n var items_per_col = new Array(),\r\n items = $j(this).find(listItem),\r\n min_items_per_col = Math.floor(items.length / num_cols),\r\n difference = items.length - (min_items_per_col * num_cols);\r\n for (var i = 0; i < num_cols; i++) {\r\n if (i < difference) {\r\n items_per_col[i] = min_items_per_col + 1;\r\n }\r\n else {\r\n items_per_col[i] = min_items_per_col;\r\n }\r\n }\r\n for (var i = 0; i < num_cols; i++) {\r\n $j(this).append($j('<ul ></ul>').addClass(listClass));\r\n for (var j = 0; j < items_per_col[i]; j++) {\r\n var pointer = 0;\r\n for (var k = 0; k < i; k++) {\r\n pointer += items_per_col[k];\r\n }\r\n $j(this).find('.' + listClass).last().append(items[j + pointer]);\r\n }\r\n }\r\n });\r\n\r\n\r\n\r\n // =============================\r\n // Off Canvas\r\n // =============================\r\n\r\n if (offCanvas === true) {\r\n var menuItems = ['.nav-util li.search form', '.nav-main', '.nav-util']; //List what you need\r\n\r\n $j('#bodydiv').prepend('<button class=\"exit-off-canvas\"></button><div class=\"off-canvas-menu\"></div>');\r\n\r\n $j('<div class=\"off-canvas-container\"><button class=\"off-canvas-trigger\">Menu</button></div>').prependTo('#topcontainer');\r\n\r\n $j('body').attr('data-drawer-state','invisible');\r\n\r\n $j('.off-canvas-trigger').click(function() {\r\n\r\n if ($j('body[data-drawer-state=invisible]').length === 1) {\r\n\r\n $j('body').attr('data-drawer-state','visible');\r\n\r\n } else {\r\n\r\n $j('body').attr('data-drawer-state','invisible');\r\n\r\n }\r\n\r\n });\r\n\r\n $j('.exit-off-canvas').click(function() {\r\n $j('body').attr('data-drawer-state','invisible');\r\n });\r\n\r\n $j.each(menuItems, function(i, val) {\r\n $j(val).clone().appendTo('.off-canvas-menu');\r\n });\r\n\r\n\r\n $j('#topbanner .nav-main > li:nth-child(4) > a').clone().appendTo('.off-canvas-container');\r\n\r\n $j('.off-canvas-menu').append('<div class=\"translate-pill\"><a class=\"chineseBtn\" href=\"#\"></a><a class=\"englishBtn\" href=\"#\"></a></div>');\r\n\r\n }\r\n\r\n\r\n\r\n\r\n // =============================\r\n // Section Title\r\n // =============================\r\n\r\n // if (sectionTitle === true) {\r\n // var sectionTitleName = trackingpath.split('/')[1];\r\n // $j(sectionTitleLocation).prepend('<div class=\"section-title\">' + sectionTitleName + '</div>');\r\n // }\r\n\r\n\r\n\r\n\r\n // =============================\r\n // Search\r\n // =============================\r\n $j('.open-search').on('click', function(e) {\r\n $j('body').addClass('search-active');\r\n });\r\n\r\n $j('.close-search').on('click', function(e) {\r\n $j('body').removeClass('search-active');\r\n e.preventDefault();\r\n });\r\n\r\n //Search Value Replace\r\n $j('.nav-util form #keywords, .off-canvas-menu form #keywords').on('focus', function() {\r\n if($j(this).val() == 'What are you looking for?') {\r\n $j(this).val('');\r\n }\r\n });\r\n\r\n $j('.nav-util form #keywords, .off-canvas-menu form #keywords').on('blur', function() {\r\n if($j(this).val() == '') {\r\n $j(this).val('What are you looking for?');\r\n }\r\n });\r\n\r\n\r\n\r\n // =============================\r\n // Modules\r\n // =============================\r\n\r\n // Remove empty banner titles\r\n $j('.bannermodtitle:empty').remove();\r\n\r\n // Remove empty items in calendar lists\r\n $j('.caldata > ul:empty, .caldata .eventspacer:empty').remove();\r\n\r\n // Directory Page Type\r\n if($j('.pagetype_directory').length > 0) {\r\n\r\n // Remove inline submit width\r\n $j('[name*=\"filter\"] *').removeAttr('style');\r\n\r\n // Create a preparatory container\r\n $j('[name*=\"filter\"]').after('<div class=\"directory\"></div>');\r\n\r\n // Insert each entry into the directory container\r\n // Clean up each entry's structure\r\n $j('.fsDirEntry').each(function() {\r\n\r\n $j(this)\r\n .parent().prev().find('img')\r\n .wrap('<div class=\"image\"></div>')\r\n .prependTo($j(this));\r\n\r\n $j(this)\r\n .find('> div')\r\n .wrapAll('<div class=\"entry-details\"></div>');\r\n\r\n $j(this)\r\n .appendTo('.directory');\r\n\r\n $j(this).removeAttr('style');\r\n $j(this).find('*').removeAttr('style');\r\n\r\n });\r\n\r\n\r\n // Groups Page\r\n // =============================\r\n\r\n if($j('[name*=\"findmembers\"]').length) {\r\n\r\n $j('table[style*=\"background\"]').after('<div class=\"directory\"></div>');\r\n $j('table[style*=\"background\"] .directory').remove();\r\n\r\n $j('td[width*=\"49%\"] > div').each(function() {\r\n\r\n $j(this)\r\n .addClass('fsDirEntry')\r\n .wrapInner('<div class=\"entry-details\"></div>')\r\n .appendTo('.directory');\r\n\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n // Account Bar (iOS :hover fix)\r\n // =============================\r\n\r\n $j(\"#acct_bar\").mouseenter(function() {\r\n\r\n $j(this).attr('onclick','').css('cursor','pointer');\r\n\r\n });\r\n\r\n\r\n\r\n // Horizontal Scroll\r\n // =============================\r\n\r\n if($j('#scrollContainer').length > 0) {\r\n\r\n $j('#fsMultiContent').before('<div class=\"scroll-window\"></div>');\r\n $j('.contentElement').appendTo('.scroll-window');\r\n\r\n }\r\n\r\n\r\n // Responsive Calendar\r\n // =============================\r\n if($j('html').hasClass('pagetype_calendar')) {\r\n //Mobile Calendar Pages\r\n function calInit() {\r\n\r\n //set the pixel width where the change occurs so the calendar can be reset\r\n var breakPoint = 700;\r\n\r\n //resizable calendar setup\r\n $j('html').addClass('smallCal');\r\n\r\n $j('#calendarcon .daycap_today').parents('.caldata').addClass('selected');\r\n\r\n var eventview = $j('<div class=\"event-view\" />').appendTo('#calendarcon');\r\n $j('#calendarcon').find('.hotdate').clone().appendTo(eventview);\r\n $j('#calendarcon').on('click','.dblock,.dblock_half',function(){\r\n $j('#calendarcon .caldata').removeClass('selected');\r\n var date = $j('.caldata',this).clone();\r\n eventview.html('').append(date);\r\n $j('.caldata',this).addClass('selected');\r\n var t = eventview.offset().top - 16;\r\n $j('html,body').animate({scrollTop: t},450);\r\n });\r\n\r\n var scrollUp = $j('<div class=\"scroll-up\"><span>Back Up To Calendar</span></div>').insertAfter(eventview);\r\n scrollUp.on('click',function(){\r\n var t = $j('#calendar_nav').offset().top - 16;\r\n $j('html,body').animate({scrollTop: t},450);\r\n });\r\n\r\n var bpCheck = 0;\r\n $j(window).on('load resize',function(){\r\n var screenW = $j(window).width();\r\n var screenBp;\r\n\r\n if( screenW > breakPoint){\r\n screenBp = breakPoint;\r\n }\r\n if (screenBp != breakPoint) {\r\n breakPoint = screenBp;\r\n //fillGrid(); //reset calendar grid\r\n }\r\n\r\n }); //on resize\r\n\r\n } //calInit()\r\n\r\n calInit();\r\n }\r\n\r\n\r\n\r\n //Moves Powered By logo\r\n $j('#poweredby').appendTo('#bottombanner');\r\n\r\n $j('.event_stackrepeat').each(function() {\r\n $j(this).parents('.eventobj').addClass('repeated-event');\r\n });\r\n\r\n if($j('html').hasClass('pagetype_portal')) {\r\n var checkPortalCal = setInterval(function(){\r\n if($j('.fsEl_Calendar .eventobj').length > 0){\r\n clearInterval(checkPortalCal);\r\n $j('.event_stackrepeat').each(function() {\r\n $j(this).parents('.eventobj').addClass('repeated-event');\r\n });\r\n\r\n $j('.eventobj.repeated-event').next('.eventobj');\r\n }\r\n },100);\r\n }\r\n\r\n\r\n\r\n if(pageid == 1 || pageid == 30437 || pageid == 30495) {\r\n\r\n //English Homepage\r\n if(pageid == 1 || pageid == 30437) {\r\n $j('#slider').load('page.cfm?p=30559&pullcontent=true&LockSSL=true .contentElementDiv ', function() {\r\n homeSlider();\r\n });\r\n\r\n // $j(\".footer-search #keywords\").autocomplete({\r\n // source: autocompleteTags\r\n // });\r\n\r\n //Chinese Homepage\r\n } else if(pageid == 30495) {\r\n $j('#slider').load('page.cfm?p=30561&pullcontent=true&LockSSL=true .contentElementDiv ', function() {\r\n homeSlider();\r\n });\r\n\r\n // $j(\".footer-search #keywords\").autocomplete({\r\n // source: autocompleteTags_translated\r\n // });\r\n }\r\n\r\n var homeSlider = function() {\r\n $j('#slider .contentElementDiv').each(function() {\r\n var titleID = $j(this).find('.contentElementTitle').text(),\r\n imgBG = $j(this).find('img').attr('src');\r\n\r\n $j(this).find('.contentElementImage').wrap('<a href=\"page.cfm?p='+titleID+'\"></a>');\r\n $j(this).css('background-image', 'url('+imgBG+')');\r\n })\r\n\r\n $j('#slider').slick({\r\n autoplay: true,\r\n autoplaySpeed: 6000,\r\n arrows: true,\r\n pauseOnHover: false\r\n });\r\n\r\n\r\n var click;\r\n $j('<span class=\"downArrow\">').insertAfter('#bodydiv');\r\n\r\n $j('.downArrow').attr('data-arrowhidden', 'false');\r\n $j(window).on('scroll', function() {\r\n if($j('.downArrow').offset().top > 2570) {\r\n $j('.downArrow').attr('data-arrowhidden', 'true');\r\n } else {\r\n $j('.downArrow').attr('data-arrowhidden', 'false');\r\n }\r\n });\r\n\r\n click = false;\r\n $j('.downArrow').on('click', function() {\r\n if(click === false) {\r\n $j(\"html, body\").animate({ scrollTop: $j('#midcontainer').offset().top }, 2000);\r\n click = true\r\n } else if(click === true){\r\n $j(\"html, body\").animate({ scrollTop: $j('#bottombanner').offset().top }, 2000);\r\n click = false;\r\n }\r\n });\r\n }\r\n\r\n\r\n //Keep infographic heights the same (based on tallest height out of the group)\r\n function infoHeights() {\r\n var heights = 0;\r\n $j('.infographic li').each(function() {\r\n if($j(this).outerHeight() > heights){\r\n heights = $j(this).outerHeight();\r\n }\r\n });\r\n $j('.infographic li').css('min-height', heights);\r\n }\r\n infoHeights();\r\n\r\n $j(window).resize(function() {\r\n $j('.infographic li').removeAttr('style');\r\n infoHeights();\r\n })\r\n\r\n\r\n //Home Grid configuration\r\n $j('.grid-original #newscon .newspostitem, .grid-2-3 #newscon .newspostitem, .grid-3-2 #newscon .newspostitem, .grid-alt1 #newscon .newspostitem, .grid-alt2 #newscon .newspostitem').each(function() {\r\n var background = $j(this).find('.newsposttitle img').attr('src');\r\n $j(this).css('background-image', 'url('+background+')');\r\n });\r\n\r\n $j('.grid-original #newscon .newspostitem:nth-child(2)').nextUntil('.grid-original #newscon .newspostitem:nth-child(4)').andSelf().wrapAll('<ul>');\r\n $j('.grid-alt1 #newscon .newspostitem:nth-child(5)').nextUntil('.grid-alt1 #newscon .newspostitem:nth-child(7)').andSelf().wrapAll('<ul>');\r\n $j('.grid-alt2 #newscon .newspostitem:nth-child(3)').nextUntil('.grid-alt2 #newscon .newspostitem:nth-child(5)').andSelf().wrapAll('<ul>');\r\n\r\n\r\n\r\n //Build Video Modal\r\n $j('<div class=\"grid-modal\"><div class=\"inner-grid-modal\"><button class=\"close-modal\">Close</Button></div></div>').appendTo('#bodydiv');\r\n\r\n function loadBannerMedia(id){\r\n var siteroot = \"\";\r\n var url = siteroot+'/cf_endpoints/routes.cfm/media/groups/'+id+'/objects.json'\r\n $j.get(url,function(data){\r\n /* -- available group data --\r\n data.group_title\r\n data.group_description\r\n data.group_type (denotes playlist type: 1 = photo, 2 = audio, 3 = video)\r\n */\r\n\r\n $j(data.objects).each(function(i, object){\r\n // -- available object data --\r\n // this.object_id\r\n // this.object_title\r\n // this.object_description\r\n // this.thumb_path\r\n\r\n // -- photo & video type --\r\n // (video loads thumbnail)\r\n // this.mobile_path\r\n // this.display_path\r\n // this.full_path\r\n\r\n // -- audio type --\r\n // this.song_path\r\n\r\n // -- video type --\r\n // this.mobilevideo_path (360p)\r\n // this.mobilevideo_download_path (mobilevideo_path without query string)\r\n // this.normalvideo_path (480p)\r\n // this.fullvideo_path (1080p or highest res)\r\n \r\n\r\n $j('.inner-grid-modal')\r\n .append(\"<video poster=\"+object.display_path+\" src=\"+object.normal_video_path+\" muted controls loop autoplay /></div>\");\r\n });\r\n }).done(function() {\r\n\r\n });\r\n\r\n }\r\n\r\n $j('.grid-original #newscon a[href*=\"popMedia\"], .grid-2-3 #newscon a[href*=\"popMedia\"], .grid-3-2 #newscon a[href*=\"popMedia\"], .grid-alt1 #newscon a[href*=\"popMedia\"], .grid-alt2 #newscon a[href*=\"popMedia\"]').each(function(){\r\n $j(this).parents('.newspostitem').addClass('video-post');\r\n var bannerMediaID = $j(this).attr('href').split('g=')[1].split(\"'\")[0];\r\n\r\n $j(this).parents('.video-post').on('click', function() {\r\n $j('body').addClass('video-active');\r\n loadBannerMedia(bannerMediaID);\r\n });\r\n });\r\n\r\n $j('.video-post .newsposttitle a').on('click', function(e) {\r\n e.preventDefault();\r\n });\r\n\r\n //For each post that is not a video post check to see if they want it linked to an external page otherwise hide the news post description\r\n $j('div[class*=\"grid-\"] .newspostitem:not(.video-post)').each(function() {\r\n if($j(this).find('.newspostdesc .fs_style_49').length === 0) {\r\n $j(this).find('.newspostdesc').remove();\r\n } else {\r\n var externalHref = $j(this).find('.newspostdesc .fs_style_49').attr('href');\r\n $j(this).find('.newsposttitle a').attr('href', externalHref).attr('target', '_blank');\r\n \r\n $j(this).find('.newspostdesc').remove();\r\n }\r\n });\r\n\r\n $j('.close-modal').on('click', function() {\r\n $j('body').removeClass('video-active');\r\n $j('.grid-modal').find('video').remove();\r\n });\r\n\r\n\r\n //Mobile Grid Config\r\n $j('#contentdiv #text1 .fs_style_30').clone().appendTo('.grid-original ul');\r\n $j('#contentdiv #text1 .fs_style_29').clone().insertAfter('.grid-original .newspostitem:nth-child(3)');\r\n $j('#contentdiv #text1 .fs_style_31').clone().appendTo('.grid-original #newscon');\r\n $j('.grid-original #newscon ul .newspostitem:nth-child(2)').clone().insertAfter('.grid-original #newscon .fs_style_29');\r\n $j('.grid-original #newscon .newspostitem:nth-child(6), .grid-original #newscon .newspostitem:nth-child(7)').clone().insertAfter('#contentdiv .text #newscon .newspostitem:nth-child(8)');\r\n\r\n //Alt1 Option\r\n $j('#contentdiv #text1 .fs_style_30').clone().appendTo('.grid-alt1 ul');\r\n $j('#contentdiv #text1 .fs_style_29').clone().insertAfter('.grid-alt1 .newspostitem:nth-child(2)');\r\n $j('#contentdiv #text1 .fs_style_31').clone().appendTo('.grid-alt1 #newscon');\r\n\r\n //Alt2 Option\r\n $j('#contentdiv #text1 .fs_style_30').clone().prependTo('.grid-alt2 ul');\r\n $j('#contentdiv #text1 .fs_style_29').clone().insertAfter('.grid-alt2 .newspostitem:first-child');\r\n $j('#contentdiv #text1 .fs_style_31').clone().appendTo('.grid-alt2 #newscon');\r\n\r\n //Conditional that un-hides the buttons based on the grid used\r\n if($j('.grid-2-3').length || $j('.grid-3-2').length) {\r\n $j('body').addClass('showGridBtns');\r\n }\r\n\r\n\r\n //Search Value Replace\r\n $j('.footer-search form #keywords').on('focus', function() {\r\n if($j(this).val() == 'Search programmes, interests, and more.' || $j(this).val() == '搜索课程、感兴趣的内容等.') {\r\n $j(this).val('');\r\n }\r\n });\r\n\r\n $j('.footer-search form #keywords').on('blur', function() {\r\n if($j(this).val() == '' && $j('a.chinese-translate-show').length == 0) {\r\n $j(this).val('Search programmes, interests, and more.');\r\n } else if($j(this).val() == '' && $j('a.chinese-translate-show').length > 0) {\r\n $j(this).val('搜索课程、感兴趣的内容等.');\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n // Translate Button(s)\r\n //=====================\r\n var chineseSrc = $j('.lang_zh').attr('href');\r\n var englishSrc = $j('.lang_en').attr('href');\r\n if(chineseSrc) {\r\n $j('.nav-util a[title*=\"Translate\"], .translate-pill .chineseBtn').attr('href', chineseSrc);\r\n\r\n $j('.englishBtn').addClass('translate-active');\r\n } else if(englishSrc) {\r\n $j('.nav-util a[title*=\"翻译\"], .translate-pill .englishBtn').attr('href', englishSrc);\r\n\r\n $j('.chineseBtn').addClass('translate-active');\r\n\r\n $j('.nav-util a[title*=\"翻译\"]').addClass('chinese-translate-show');\r\n }\r\n\r\n\r\n //Translates \"Menu\" for mobile menu\r\n if($j('.chineseBtn.translate-active').length > 0) {\r\n $j('.off-canvas-trigger').text(\"菜单\");\r\n }\r\n\r\n //Translates \"Menu\" for mobile left banner nav\r\n if($j('.nav-sub').find('.navmod li').length > 0 || $j('.nav-sub').find('.portalnavmod li').length > 0 ) {\r\n var menuBtnText;\r\n if($j('.nav-main-container .nav-main .fsSection-btn').length > 0) {\r\n menuBtnText = $j('.nav-main-container .nav-main .fsSection-btn > a').text();\r\n } else {\r\n if($j('.englishBtn.translate-active').length > 0) {\r\n menuBtnText = '菜单';\r\n } else {\r\n menuBtnText = 'Menu';\r\n }\r\n }\r\n $j('#leftbanner .nav-sub .bannermodcontent').shrinkToBtn({\r\n btnHTML : '<div class=\"stbBtn\"><span>'+menuBtnText+'</span></div>',\r\n containerID : 'nav5',\r\n animate : true\r\n });\r\n } else {\r\n $j('.nav-sub').addClass('nav-sub-empty');\r\n }\r\n\r\n\r\n\r\n // Flexible Font Icons\r\n //=====================\r\n\r\n //icon name, font color, icon position, font size [optional]\r\n $j('.fs_style_45').each(function() {\r\n\r\n if($j(this).is('p') || $j(this).is('li') || $j(this).is('strong') || $j(this).is('em') || $j(this).is('div') || $j(this).is('span')) {\r\n var fontOptionsHide = $j(this).text().split('~');\r\n\r\n var fontOptions = fontOptionsHide[1];\r\n fontOptions = $j.map(fontOptions.split(','), $j.trim);\r\n \r\n $j(this).addClass(fontOptions[0]);\r\n $j(this).attr('data-color', fontOptions[1]);\r\n $j(this).attr('data-position', fontOptions[2]);\r\n \r\n if(fontOptions[3] != undefined) {\r\n $j(this).css('font-size', ''+fontOptions[3]+'px');\r\n }\r\n\r\n $j(this).text(fontOptionsHide[2]);\r\n\r\n $j(this).addClass('showText');\r\n } else if($j(this).is('a')) {\r\n var fontOptions = $j(this).attr('title');\r\n fontOptions = $j.map(fontOptions.split(','), $j.trim);\r\n \r\n $j(this).addClass(fontOptions[0]);\r\n $j(this).attr('data-color', fontOptions[1]);\r\n $j(this).attr('data-position', fontOptions[2]);\r\n \r\n if(fontOptions[3] != undefined) {\r\n $j(this).css('font-size', ''+fontOptions[3]+'px');\r\n }\r\n }\r\n\r\n\r\n });\r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "ea0172f2f3cd8f41b8994f0fd86927be", "score": "0.46538427", "text": "function js(){\n return gulp.src(cfg.app.js)\n // .pipe(uglify())\n .pipe(concat('app.js'))\n .pipe(gulp.dest(cfg.build+cfg.dest.js))\n .pipe(connect.reload())\n}", "title": "" }, { "docid": "1832d047cc18c62ffbe90a568321f6ee", "score": "0.46528396", "text": "function pluginsJs(done) {\n gulp.src(src.pluginsJs)\n .pipe(concat('plugins.min.js'))\n .pipe(uglify())\n .pipe(gulp.dest(dest.js));\n done();\n}", "title": "" } ]
709c42d07f8a78d30e2ae450a1febe9f
Used to print values in error messages.
[ { "docid": "7d04c590707c7b711b8c2129092531a1", "score": "0.0", "text": "function inspect(value) {\n return formatValue(value, []);\n}", "title": "" } ]
[ { "docid": "03dd94499265ba678e4f3fc298203016", "score": "0.73850906", "text": "printErrors() {\n console.log(this.toOutputString());\n }", "title": "" }, { "docid": "36e7bf6efe4ccde22bb206c416ee748a", "score": "0.68270606", "text": "function displayErrors(pErr){\n console.log('-----------');\n console.log('Error in Mod: ' +pErr.mod +' | Func: ' +pErr.func);\n //console.log('name: ' +pErr.name);\n console.log(getException(pErr.name));\n console.log('msg: '+pErr.msg);\n if (pErr.isObj === true) {\n console.log('line: '+pErr.line);\n //console.log('\\n' +pErr.stfLingoMsg +': ' + pErr.msg);\n //console.log('\\n' +pErr.stfLingoStack +':');\n console.log('-----------');\n }\n console.log(pErr.stack);\n }", "title": "" }, { "docid": "76ba3f6f1addbad26faf4f0b5dce2f46", "score": "0.67731297", "text": "function badValueMessage(argName, type, value, verboseErrors) {\n var message = verboseErrors ? '\\n' + verboseErrors.join('\\n') : '';\n return 'Argument \"' + argName + '\" has invalid value ' + value + '.' + message;\n}", "title": "" }, { "docid": "2975e2f85b0b0ce890c9d42f42621c3c", "score": "0.67120796", "text": "getError(name, value) {\n return `Issue identified for ${name}. Was not expecting ${value}.`;\n }", "title": "" }, { "docid": "30f1e70d1e4fc3fe490b5c10db1253e1", "score": "0.6632994", "text": "function showError(type, text) {}", "title": "" }, { "docid": "7ffd927f995f5b8bf86c6805b9bc51d6", "score": "0.6515777", "text": "get errortext() {\n return this._errortext;\n }", "title": "" }, { "docid": "7ffd927f995f5b8bf86c6805b9bc51d6", "score": "0.6515777", "text": "get errortext() {\n return this._errortext;\n }", "title": "" }, { "docid": "9267930b4f1bbcb9221b74e912cd6217", "score": "0.6462721", "text": "function showError() {}", "title": "" }, { "docid": "2d48d22efe2043e06c8007a4556f9310", "score": "0.64425826", "text": "function printValidationErrors(errors, print = error) {\n print.group(`Error${errors.length === 1 ? '' : 's'}:`);\n errors.forEach(line => print(line));\n print.groupEnd();\n print();\n print('The expected format for a commit is: ');\n print('<type>(<scope>): <summary>');\n print();\n print('<body>');\n print();\n}", "title": "" }, { "docid": "11bc0815970bdcc866841a269aca2e6b", "score": "0.6403813", "text": "function printErrors() {\n errorPages.forEach(function (page) {\n console.log(`${page.url} returned status code ${page.status}`)\n });\n}", "title": "" }, { "docid": "14b976321671dcb08a276a3228d42d24", "score": "0.63979447", "text": "static get ERROR() { return 3 }", "title": "" }, { "docid": "66813aa8495ca32e206a17da3b33e940", "score": "0.6337862", "text": "function err( i ) {\n if ( !data.errors ) return \"🚨 (Modular): \";\n\n let args = data.errors[i],\n type = `[${ args[0] }]`,\n position = \"\",\n information,\n error;\n\n // Removing error type\n args.shift();\n\n // Don't show error-origin if only one argument present.\n if ( args.length > 1 ) {\n position = `\\n@ ${ args.pop() }()\\n`;\n }\n\n // Formatting the error information\n information = args.map( arg => `\\n--> ${ arg }` ).join( \"\\n\" );\n error = `🚨 (Modular): ${ [type, information, position].join( \"\\n\" ) }`;\n\n return error;\n }", "title": "" }, { "docid": "792d187f5591a638c7e50bafb9b5e3b8", "score": "0.63326454", "text": "function printError(error) {\n console.log(error.message);\n}", "title": "" }, { "docid": "66ccc1d68ace08183463a7d49764aabe", "score": "0.6295945", "text": "set errortext(value) {\n Helper.UpdateInputAttribute(this, \"errortext\", value);\n }", "title": "" }, { "docid": "66ccc1d68ace08183463a7d49764aabe", "score": "0.6295945", "text": "set errortext(value) {\n Helper.UpdateInputAttribute(this, \"errortext\", value);\n }", "title": "" }, { "docid": "bbf68432fdb415310bf37c8c685db8f2", "score": "0.6292053", "text": "function printError(error) {\n console.log('\\n' + format.red(error.toString()) + '\\n');\n}", "title": "" }, { "docid": "b374eab856e508c44baa9043b6f197f9", "score": "0.6249493", "text": "errorPrint() {\n let error = this.state.errors;\n let errorMsg = [];\n if(this.state.errorFlag){\n if(error!=null){\n errorMsg.push(<span className='errorMessage'>Error: {this.state.message}</span>)\n Object.keys(error).map(function(key) {\n errorMsg.push(<span className='errorMessage'>{error[key][0]}</span>)\n });\n return errorMsg;\n } \n }else{\n errorMsg.push(<span>Success:{this.state.message}</span>)\n return errorMsg;\n }\n }", "title": "" }, { "docid": "36c699e02be1a32f1ee83f7e1e914f4c", "score": "0.6235552", "text": "function printErrorMessages(messages) {\n var text, i;\n text = \"<ul>\";\n for(i=0; i<messages.length; i+=1){\n text += \"<li>\" + messages[i] + \"</li>\";\n }\n $(\"#error\").html(text + \"</ul>\");\n }", "title": "" }, { "docid": "dac309877ad4674313a9b5c9a09fb344", "score": "0.61916476", "text": "function display_message(arr_msg){\t\r\n\tvar msg='Please review the following error message before continue:\\n';\r\n\tfor (var word in arr_msg){\r\n\t\tmsg+=\"*\\t\"+arr_msg[word]+'\\n';\r\n\t}\r\n\tmsg+=\"\\n\";\r\n\treturn msg;\r\n}", "title": "" }, { "docid": "08320d86696c50991b2f7db0c4790b8b", "score": "0.6176068", "text": "function displayError() {\n if(originalError instanceof ValidationError) {\n $(\".validation-message--error\").text(`Validation Error: ${originalError.message}`);\n }\n else if(originalError instanceof LocationError) {\n $(\".validation-message--error\").text(`Location Error: ${originalError.message}`);\n }\n else {\n $(\".validation-message--error\").text(`Error: ${originalError.message}`);\n }\n }", "title": "" }, { "docid": "83d5c308700721cf593af55b1ada588d", "score": "0.6172953", "text": "function displayError(error) {\n console.log(error);\n}", "title": "" }, { "docid": "fdc0c80ca59941b1da39dc7ea9142f0f", "score": "0.614913", "text": "function getFieldErrorsString() {\n return Object.values(getFieldErrors())\n .filter((x) => !!x)\n .join(', ')\n }", "title": "" }, { "docid": "e9246b23f9605f3cee0a2ce438919443", "score": "0.61415374", "text": "error(...parameters)\n\t{\n\t\tconsole.log(colors.red(this.preamble, '[error]', generate_log_message(parameters)))\n\t}", "title": "" }, { "docid": "e37281ac5fc4996bc541137fd03b134b", "score": "0.6086755", "text": "function error_out(message, error) {\n\tlet error_fmt = error.toString().replace(/Error: /, '').replace(/Error: /, '').trim();\n\tlog.msg('Error ' + message + ': ' + error_fmt);\n}", "title": "" }, { "docid": "1f459fcdb7311af315430e50dea68397", "score": "0.6061284", "text": "static get ERROR () { return 0 }", "title": "" }, { "docid": "99cc54d8c5c2f310515dc1e90a8be4bc", "score": "0.6054331", "text": "function printError(error){\n console.error(error.message);\n}", "title": "" }, { "docid": "a9c84b4452c58e69185239700574e624", "score": "0.6034504", "text": "function showError(errors)\n{ \n var mes = '';\n for (var key in errors) {\n mes += '<p>' + errors[key] + '</p>';\n }\n $('#mes-error').innerHTML = mes;\n}", "title": "" }, { "docid": "7570286652c4b9228346a87fefca22f8", "score": "0.601926", "text": "function errorMsg(msg, error) {\n // errorElement.innerHTML += '<p>' + msg + '</p>';\n console.log(msg);\n if (typeof error !== 'undefined') {\n console.error(error);\n }\n }", "title": "" }, { "docid": "58f19cf487cbbd23b319f4247cc08115", "score": "0.6018578", "text": "function showError(err) {\n console.log(err);\n}", "title": "" }, { "docid": "05804ca8b2c0a6e207b3a3b39ca33981", "score": "0.601749", "text": "logError(error) {\n /* tslint:disable */\n const componentName = this._reactInternalInstance._currentElement.type.name;\n const componentDetail = this._reactInternalInstance._currentElement.type.toString();\n let propsString = \"\";\n for (let propName in this.props) {\n propsString += \" \" + propName;\n }\n /* tslint:enable */\n console.error(error, { Component: componentName, ComponentDetail: componentDetail, PropList: propsString });\n console.error(\"A component (\" + componentName + \") had an error during render. \" +\n \"Please fix this immediately, even if you don't own this component. \" +\n \"This message is designed to be annoying so that the problem is addressed.\");\n }", "title": "" }, { "docid": "f31a01301c6920e7c28464e1735f8d1e", "score": "0.6001253", "text": "function adderr(txt) { return !fields.attr(\"required\", false).mbError(txt); }", "title": "" }, { "docid": "28c70e02b981cca5b0ec97c01f5f64b0", "score": "0.5999615", "text": "function err() {\n console.log('%cReceive Error/s:', 'background: #222; color: #bada55');\n Array.from(arguments).forEach(err => {\n console.log(`%c: ${err.fileName}, line ${err.lineNumber}: ${err}`, 'color: red')\n })\n}", "title": "" }, { "docid": "bf642049715becf3997c37875c92783b", "score": "0.5993877", "text": "function printError(error){\n\tconsole.error(error.message);\n}", "title": "" }, { "docid": "b5dbbb76cd872a5412da72a3352cd06e", "score": "0.59898394", "text": "function messageError(err, info) {\n if (err) {\n return console.log(err);\n }\n\n console.log(info);\n}", "title": "" }, { "docid": "15ce7fa1f23b784c1f1d0ec5d509f40e", "score": "0.5988115", "text": "function errback(err) {\n rdbAdmin.showErrorMessage('<pre>' + err[0] + ':' + err[1] + '</pre>');\n }", "title": "" }, { "docid": "f435d2e4775ec9a72687bf2641c58bd6", "score": "0.59785634", "text": "function errback(err) {\n //alert(err.toString());\n rdbAdmin.showErrorMessage('<pre>' + err[0] + ':' + err[1] + '</pre>');\n }", "title": "" }, { "docid": "ae41f8cd0e2d5a7e76f8f74b07aa9ab9", "score": "0.5972805", "text": "error(...args) {\n console.error(this.getColorOn() + args.join(\" \"));\n }", "title": "" }, { "docid": "bc6c3a398867287f2b4e2b1a4e9ec53a", "score": "0.5969275", "text": "[custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }", "title": "" }, { "docid": "bc6c3a398867287f2b4e2b1a4e9ec53a", "score": "0.5969275", "text": "[custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }", "title": "" }, { "docid": "bc6c3a398867287f2b4e2b1a4e9ec53a", "score": "0.5969275", "text": "[custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }", "title": "" }, { "docid": "f636d25ff34e16077bf930e69eaf253f", "score": "0.596477", "text": "function badValueMessage(typeName, valueName, message) {\n return \"Expected type \".concat(typeName, \", found \").concat(valueName) + (message ? \"; \".concat(message) : '.');\n}", "title": "" }, { "docid": "88ab117a47f9e8a33c4bb84cb2444aab", "score": "0.5953275", "text": "function printError(error) {\n console.error(error.message);\n}", "title": "" }, { "docid": "88ab117a47f9e8a33c4bb84cb2444aab", "score": "0.5953275", "text": "function printError(error) {\n console.error(error.message);\n}", "title": "" }, { "docid": "a064cea415df0da489755d027950bbed", "score": "0.59530914", "text": "function error(msg) {\n if(typeof(msg) === 'object'){\n for(var key in msg){\n if(msg.hasOwnProperty(key)){\n $.util.log($.util.colors.red(msg[key]));\n }\n }\n } else {\n $.util.log($.util.colors.red(msg));\n }\n }", "title": "" }, { "docid": "0fbb5695aeecb3b57a98c2c1ea27a862", "score": "0.5948481", "text": "function error(e) { \n console.error('error:'.bold.red, e); \n}", "title": "" }, { "docid": "03dbc9beb8055a1832c8099035f8a397", "score": "0.594272", "text": "function err() {\n logWithProperFormatting(out.console.error, '(ERROR)', arguments);\n}", "title": "" }, { "docid": "fc3d5b31bc1cbc5c3ad34341783ddff9", "score": "0.5940281", "text": "function logerror(error){\n\t\tif(error.type){\n\t\tvar errorstring='';\n\t\tswitch (error.type) {\n\t\t\t\tcase 1: errorstring='Please use other name, this word '+(error.setname?'\\''+error.setname+'\\'':'')+' is reserved';break;\t\t\t\n\t\t\t\tcase 2: errorstring='This variable name '+(error.setname?'\\''+error.setname+'\\'':'')+' cannot be found';break;\n\t\t\t\tcase 3: errorstring='The range input for this fuzzy set '+(error.setname?'\\''+error.setname+'\\'':'')+' is incorrect. The correct format is n to m where n and m represents start and stop points of the range respectively.';break;\n\t\t\t\tcase 4: errorstring='The range input for this fuzzy set '+(error.setname?'\\''+error.setname+'\\'':'')+' is not a number';break;\t\t\t\t\n\t\t\t\tcase 5: errorstring='The definition for fuzzy term '+(error.termname?'\\''+error.termname+'\\'':'')+' is not found';break;\n\t\t\t\tcase 6: errorstring='The membership function for this fuzzy term '+(error.termname?'\\''+error.termname+'\\'':'')+' is invalid';break;\n\t\t\t\tcase 7: errorstring='The step size for fuzzy set '+(error.setname?'\\''+error.setname+'\\'':'')+' is not found or invalid';break;\n\t\t\t\tcase 8: errorstring='The point/s defined for '+(error.termname?'\\''+error.termname+'\\'':'')+' term are beyond the fuzzy set range';break;\n\t\t\t\tcase 9: errorstring='There is dimension mismatch in the min operation between 2 fuzzy terms';break;\n\t\t\t\tdefault: errorstring='error';\t\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\talert(errorstring); //temporary. It should not be alerting, instead just keep the error log for debugging purpose\n\t\t}\n\t}", "title": "" }, { "docid": "c4eaed9426c50d5d650242790f041e7f", "score": "0.5940139", "text": "errorFunction(val)\n{\n console.log(\"Current State is: \"+JSON.stringify(val));\n // document.getElementById(\"errorBox\").innerHTML = \"You wrote: \" + val;\n \n}", "title": "" }, { "docid": "3fb944b6ca98385391d6a744ea79d62d", "score": "0.59339887", "text": "function formatValidationError(fields) {\n\t\t\tvar msg = \"\";\n\t\t\t\n\t\t\tangular.forEach(fields, function (field, index) {\n\t\t\t\t//Manually change label to name\n\t\t\t\tif (field === 'label') {\n\t\t\t\t\tfield = 'name';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//name to Name\n\t\t\t\tmsg += field.charAt(0).toUpperCase() + field.slice(1);\n\t\t\t\t\n\t\t\t\t//Appropriate syntax\n\t\t\t\tif (index === fields.length - 1) {\n\t\t\t\t\tif (fields.length === 1) {\n\t\t\t\t\t\tmsg += ' is a required field';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsg += ' are required fields';\n\t\t\t\t\t}\n\t\t\t\t} else if (index === fields.length - 2) {\n\t\t\t\t\tmsg += ' and '\n\t\t\t\t} else {\n\t\t\t\t\tmsg += ', ';\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn msg;\n\t\t}", "title": "" }, { "docid": "ef334c01fadfee5951ed25e717e6d2de", "score": "0.59153324", "text": "getMessage() {\n return this.name + \" must be less than \" + this.max + \". You entered \" + this.field; \n }", "title": "" }, { "docid": "5de41d37025793961cfd036a2c49f83c", "score": "0.5914882", "text": "function printError(errorParam) {\n console.error(errorParam.message);\n}", "title": "" }, { "docid": "cc95c7b6296247acc3bf18020744d446", "score": "0.5890097", "text": "displayError(message) {\n this.error = message;\n }", "title": "" }, { "docid": "bfbfe8733fbf4894d79278cc57552024", "score": "0.5888089", "text": "function showErr (e) {\n console.error(e, e.stack);\n}", "title": "" }, { "docid": "d93f1eefe80f30d0b5daf760dad5c7cf", "score": "0.5883084", "text": "validateValues() {\n if (this.getBeer() == undefined) {\n return chalk.bgRed('Error reading beer details');\n } else if (this.getTemperature() == undefined) {\n return chalk.bgRed('Error reading container temperature');\n } else if (this.getBeer().getMinTemperature() == undefined && this.getBeer().getMaxTemperature() == undefined) {\n return chalk.bgRed('Error reading beer temperature');\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "1c4b9b4eba8dce49520c77f3e0babb54", "score": "0.5871382", "text": "function erorrMessage(errors) {\n\n var txt =\"\";\n $.each(errors, function( index, value ) {\n txt += ErrorMsg('warning',value);\n \n });\n return txt;\n}", "title": "" }, { "docid": "1c4b9b4eba8dce49520c77f3e0babb54", "score": "0.5871382", "text": "function erorrMessage(errors) {\n\n var txt =\"\";\n $.each(errors, function( index, value ) {\n txt += ErrorMsg('warning',value);\n \n });\n return txt;\n}", "title": "" }, { "docid": "bc1e0a507e7acdc64ff72389183a0a22", "score": "0.5854745", "text": "getErrMsg() {\n return this.errMsg;\n }", "title": "" }, { "docid": "bc1e0a507e7acdc64ff72389183a0a22", "score": "0.5854745", "text": "getErrMsg() {\n return this.errMsg;\n }", "title": "" }, { "docid": "bc1e0a507e7acdc64ff72389183a0a22", "score": "0.5854745", "text": "getErrMsg() {\n return this.errMsg;\n }", "title": "" }, { "docid": "8f713ad6ef94dadd4026d87fdb79c646", "score": "0.5848394", "text": "function printError(error) {\n\tconsole.error(error.message);\n}", "title": "" }, { "docid": "bb471128d7a38b5c0951ed3096d1c09d", "score": "0.5838601", "text": "function showError(str, err) {\n console.log(\"An error occurred while processing configuration:\\n\");\n if (str) console.log(str);\n if (err) console.log(err);\n}", "title": "" }, { "docid": "f942082de0182c643e3aa2face9ef543", "score": "0.5834789", "text": "function error(...messages) {\n console.error(...messages);\n }", "title": "" }, { "docid": "0d2ee1b1311a8b9131ef468cc44ab025", "score": "0.58313584", "text": "error (msg : string, ...args : mixed[]) {\n\t\tthis._print(\"error\", msg, ...args)\n\t}", "title": "" }, { "docid": "b46e51d6c27bca5e0a9a912fd1b690a9", "score": "0.5814843", "text": "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}", "title": "" }, { "docid": "eaa453cffe34475a058227cf1e66f6a9", "score": "0.5809386", "text": "function mostrarError(err){\n console.log('Error', err);\n }", "title": "" }, { "docid": "eaa453cffe34475a058227cf1e66f6a9", "score": "0.5809386", "text": "function mostrarError(err){\n console.log('Error', err);\n }", "title": "" }, { "docid": "6c5c5a9dea8d7dfa67c8d9ded37bd33f", "score": "0.58061826", "text": "function printError(error) {\n console.error(error.message);\n}", "title": "" }, { "docid": "6c5c5a9dea8d7dfa67c8d9ded37bd33f", "score": "0.58061826", "text": "function printError(error) {\n console.error(error.message);\n}", "title": "" }, { "docid": "2b1ca97bdb073c9f8b7948d920238e67", "score": "0.5805894", "text": "function printError(e) {\n\tconsole.error(e.message);\n}", "title": "" }, { "docid": "8423aced40e4fc53810db214b923e48e", "score": "0.5802589", "text": "function printError(error) {\n console.error(error.message);\n}", "title": "" }, { "docid": "804b17d94d6117d02b527c63044e484f", "score": "0.58014613", "text": "static expandError(value, args) {\n if (args.length >= 2) {\n try {\n if (typeof args[1] === 'string') {\n value += `\\n${args[1]}`;\n } else {\n value += '\\n' + compactStringify(args[1], {maxLength: 70});\n }\n } catch (err) {\n // ignore\n }\n }\n return value;\n }", "title": "" }, { "docid": "25c1a5258110238b668a70b88d7b571e", "score": "0.5800153", "text": "function displayPHPError(error)\r\n{\r\n displayError (\"Error number :\" + error.errno + \"\\r\\n\" +\r\n \"Text :\"+ error.text + \"\\r\\n\" +\r\n \"Location :\" + error.location + \"\\r\\n\" +\r\n \"Line :\" + error.line + + \"\\r\\n\");\r\n}", "title": "" }, { "docid": "478514b2fa1a8fd805ef28f17d71d710", "score": "0.5798303", "text": "function _reportErrors(response) {\n for (let key in response) {\n if (response[key].errors.length > 0) {\n for (let error of response[key].errors) {\n console.log(key + \" : \" + error.errorMessage);\n const selector = `span[data-valmsg-for=\"${key}\"]`\n const errMessageSpan = document.querySelector(selector);\n if (errMessageSpan !== null) {\n errMessageSpan.textContent = error.errorMessage;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "7094ef397d7424945e9afbe89d2c1a48", "score": "0.5774771", "text": "static get ERROR() {\n return {\n ERROR_MESSAGE: 'No valid Main Tab elements found. Tab loader failed to iniatilize'\n };\n }", "title": "" }, { "docid": "4c68df7a270bbabf4c9a5862e2ac3bd7", "score": "0.5772529", "text": "function printValue(firstName, lastName, email, message)\n {\n console.log(`First Name : ${firstName}`);\n console.log(`Last Name : ${lastName}`);\n console.log(`Email : ${email}`);\n console.log(`message : ${message}`);\n }", "title": "" }, { "docid": "017132b74ca824d0f1cf3d0828f8553b", "score": "0.57666004", "text": "setErros() {\n this.displayCalc = \"Error\";\n }", "title": "" }, { "docid": "d95a79643cf7430bdcb86c556c8a5982", "score": "0.5765072", "text": "errorHandler(error) {\n console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message)\n }", "title": "" }, { "docid": "14c8ae4c6e46b3c8f1f5dc1cfa1712e5", "score": "0.57611024", "text": "parseErr(err) {\n if (!err.errors) return err;\n const messages = Object.keys(err.errors).map(errorKey =>\n `${errorKey} error: ${err.errors[errorKey]}`);\n return messages;\n }", "title": "" }, { "docid": "8662d9616be51371a354228ae181929a", "score": "0.5759864", "text": "showErrorMessage() {}", "title": "" }, { "docid": "ea954ccac99e1caa1e1d0a7bf1ee2cd3", "score": "0.575823", "text": "function showError(message) {\n print(\"ScreenTransformToMaterialProperty: ,ERROR: \" + message);\n}", "title": "" }, { "docid": "f3f5492aff30a5e806b44321a9f32ed6", "score": "0.5758003", "text": "function StdErr() {\r\n}", "title": "" }, { "docid": "dca6da33c64eb2df23cff2f7a462e7b9", "score": "0.57512504", "text": "error(message){\n this.terminal.echo(\"[[;red;]\" + message + \"]\");\n }", "title": "" }, { "docid": "221b3af664628d9fef2880e95e5e6363", "score": "0.57460475", "text": "function err(strm,errorCode){strm.msg=msg[errorCode];return errorCode;}", "title": "" }, { "docid": "c3efb0dc7b127adacb4bab25512cb2e4", "score": "0.5740651", "text": "function printError(e) {\n console.error(e.message);\n}", "title": "" }, { "docid": "7b93b7fd2c284882939ccf57aeeb6a82", "score": "0.57367456", "text": "function showErrorMessages( block, result )\n{\n console.log(result);\n}", "title": "" }, { "docid": "44a48c818e9da967634445305c9e7a83", "score": "0.5732334", "text": "function showValidationError(fields) {\n\t\t\t$ionicPopup.alert({\n\t\t\t\ttitle: vm.formatValidationError(fields),\n\t\t\t\tokText: 'Ok',\n\t\t\t\tokType: 'button-energized'\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "9423bae2faa6fe1290c702f922bbcc30", "score": "0.5731363", "text": "function mostrarError(err){\n console.log('Error', err);\n }", "title": "" }, { "docid": "efc05d74a6ddcca38f2e72c0ea17f3b2", "score": "0.57303417", "text": "function recError(value, errorString = \"there was an error!\") {\n error = true;\n Logger.log(value + \": \" + errorString);\n return value;\n }", "title": "" }, { "docid": "4f1e87484f4ef60685f1f25e70e3ed0e", "score": "0.5730022", "text": "error(err) {\n this.checkDate();\n console.error(`[${red(`ERROR ${dayjs().format(\"HH:mm:ss\")}`)}]: ${err.message + (err.stack ? \"\\n\"+err.stack.split('\\n').splice(1).join('\\n'):\"\")}\\n`);\n }", "title": "" }, { "docid": "cfe0d727723298cb1453e2b813aa68e2", "score": "0.57240677", "text": "function showErrorMessage(msg) { }", "title": "" }, { "docid": "8179e36752e83b20694e529e609d6537", "score": "0.5706996", "text": "function show_error(a,b){\n\t\t$('error_creacion').innerHTML=b+' : '+errores[a];\n\t}", "title": "" }, { "docid": "c3150835f3eb7812591a769f8e1ffd8f", "score": "0.5706749", "text": "errorHandler (error) {\n // eslint-disable-next-line no-console\n console.log(\n '%cError',\n 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;',\n error.message\n )\n }", "title": "" }, { "docid": "30a1b77f3b55575f61fd1355ac40231f", "score": "0.5704402", "text": "function errorln (message){\r\n\tjava.lang.System.err.println(message)\r\n\t}", "title": "" }, { "docid": "441d1c27733a7db40224c8720b0020c3", "score": "0.57030964", "text": "logDiagnostics(err) {\n systemLog_1.default.error({ leadingBlankLine: true, indent: true }, `Error in stage \"${this.currentStage}\": ${err.description}`);\n for (let i = 0; i < err.errorData.length; i++) {\n systemLog_1.default.error({ doubleIndent: true }, `\"${i}: ${err.errorData[i]}`);\n }\n systemLog_1.default.error({ leadingBlankLine: true, indent: true }, `\"${this.currentStage}\" stage failed. See SystemManager console for additional information.`);\n }", "title": "" }, { "docid": "41deadd623d0e5c8202102b5fc53d93f", "score": "0.57010055", "text": "setError() {\n return this.display = 'Error';\n }", "title": "" }, { "docid": "65db9ffb02787059d3ad5f777b8b6317", "score": "0.5699693", "text": "function printError(error) {\n\tconsole.error(error.message);\n}", "title": "" }, { "docid": "6b2c1792cbdc4e2e8c21b85602cf5b47", "score": "0.5697018", "text": "get errmsg() {\n return this.message;\n }", "title": "" }, { "docid": "509f128f6ef8a7f9b93ab1901439cf0d", "score": "0.56963503", "text": "_errorOutput(){\n\n process.exitCode = 1;\n const message = super._errorOutput();\n\n if (this.value() instanceof MeboErrors.Help){\n this.stderr().write(`${message}\\n`);\n }\n else{\n this.stderr().write(message);\n }\n }", "title": "" }, { "docid": "49751c3cd65700b2b3cb924adda37a2c", "score": "0.5695441", "text": "function error (message){\r\n\tjava.lang.System.err.print(message)\r\n}", "title": "" }, { "docid": "4019ed0fb66fc4c2ba2194ee0da87ba9", "score": "0.5692361", "text": "function errorUserDetails(error){\n\t\t\tconsole.log(error);\n\t\t}", "title": "" }, { "docid": "4019ed0fb66fc4c2ba2194ee0da87ba9", "score": "0.5692361", "text": "function errorUserDetails(error){\n\t\t\tconsole.log(error);\n\t\t}", "title": "" } ]
fbb765d33041cd28a91e321e98bbdc46
(For old IE.) Starts tracking propertychange events on the passedin element and override the value property so that we can distinguish user events from value changes in JS.
[ { "docid": "61762a620fc712407505beeacb877741", "score": "0.0", "text": "function startWatchingForValueChange(target, targetID) {\n activeElement = target;\n activeElementID = targetID;\n activeElementValue = target.value;\n activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\n // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n // on DOM elements\n Object.defineProperty(activeElement, 'value', newValueProp);\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" } ]
[ { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "0f819d762fedd86c38416247bf67694a", "score": "0.7626191", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "eff4953521d2a287ef96d15e14d6e339", "score": "0.73833835", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');// Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n// on DOM elements\nObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else{activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "title": "" }, { "docid": "f42947ed8cabb08febc33df55c472219", "score": "0.7298894", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "title": "" }, { "docid": "f42947ed8cabb08febc33df55c472219", "score": "0.7298894", "text": "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "title": "" }, { "docid": "a1c5080c137a63498d116686ea883960", "score": "0.7171489", "text": "function startWatchingForValueChange(target,targetID){activeElement=target;activeElementID=targetID;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "f6afa2cd360150d9d8759758a15aedfb", "score": "0.7164785", "text": "function startWatchingForValueChange(target,targetID){activeElement = target;activeElementID = targetID;activeElementValue = target.value;activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "title": "" }, { "docid": "8b8d1fa765ff90bffb68464d14d681a6", "score": "0.71537817", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target, activeElementInst = targetInst, activeElement.attachEvent(\"onpropertychange\", handlePropertyChange);\n}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "5ee72ef1443ba2903af8f9998dc5bb0f", "score": "0.7066636", "text": "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c7fab24dde6c7430f67a1417df7b0f9e", "score": "0.6979982", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "510d4410f48597a1d3d629caf5fcfa8f", "score": "0.69528085", "text": "function startWatchingForValueChange(target, targetID) {\n\t\t activeElement = target;\n\t\t activeElementID = targetID;\n\t\t activeElementValue = target.value;\n\t\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\t\n\t\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t\t // on DOM elements\n\t\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t\t}", "title": "" }, { "docid": "4d7d467ecaf4ca1174dc3f124a643c12", "score": "0.69432443", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "title": "" }, { "docid": "c49f096d5ff6ab91c9eb418c2028ef0b", "score": "0.69234216", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent(\n 'onpropertychange',\n handlePropertyChange,\n );\n }", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" }, { "docid": "6fc7bfec33ca80f20bf8526546705cb1", "score": "0.6921783", "text": "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}", "title": "" } ]
24162936db99a52c25dfa094f8b4b57f
=========================================================================== Copy without compression as much as possible from the input stream, return the current block state. This function does not insert new strings in the dictionary since uncompressible data is probably not useful. This function is used only for the level=0 compression option. NOTE: this function should be optimized to avoid extra copying from window to pending_buf.
[ { "docid": "cdb4c4fa1ba5aa10cbed3bd7d6bd9fc8", "score": "0.0", "text": "function deflate_stored(s, flush) {\n\t /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t * to pending_buf_size, and each stored block has a 5 byte header:\n\t */\n\t var max_block_size = 0xffff;\n\n\t if (max_block_size > s.pending_buf_size - 5) {\n\t max_block_size = s.pending_buf_size - 5;\n\t }\n\n\t /* Copy as much as possible from input to output: */\n\t for (;;) {\n\t /* Fill the window as much as possible: */\n\t if (s.lookahead <= 1) {\n\n\t //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n\t // s->block_start >= (long)s->w_size, \"slide too late\");\n\t// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n\t// s.block_start >= s.w_size)) {\n\t// throw new Error(\"slide too late\");\n\t// }\n\n\t fill_window(s);\n\t if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n\t return BS_NEED_MORE;\n\t }\n\n\t if (s.lookahead === 0) {\n\t break;\n\t }\n\t /* flush the current block */\n\t }\n\t //Assert(s->block_start >= 0L, \"block gone\");\n\t// if (s.block_start < 0) throw new Error(\"block gone\");\n\n\t s.strstart += s.lookahead;\n\t s.lookahead = 0;\n\n\t /* Emit a stored block if pending_buf will be full: */\n\t var max_start = s.block_start + max_block_size;\n\n\t if (s.strstart === 0 || s.strstart >= max_start) {\n\t /* strstart == 0 is possible when wraparound on 16-bit machine */\n\t s.lookahead = s.strstart - max_start;\n\t s.strstart = max_start;\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\n\n\t }\n\t /* Flush if we may have to slide, otherwise block_start may become\n\t * negative and the data will be gone:\n\t */\n\t if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\t }\n\n\t s.insert = 0;\n\n\t if (flush === Z_FINISH) {\n\t /*** FLUSH_BLOCK(s, 1); ***/\n\t flush_block_only(s, true);\n\t if (s.strm.avail_out === 0) {\n\t return BS_FINISH_STARTED;\n\t }\n\t /***/\n\t return BS_FINISH_DONE;\n\t }\n\n\t if (s.strstart > s.block_start) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\n\t return BS_NEED_MORE;\n\t}", "title": "" } ]
[ { "docid": "3ba32453d2889e00e42015c6aba9feee", "score": "0.59268165", "text": "function deflate_stored(s,flush){/* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */var max_block_size=0xffff;if(max_block_size>s.pending_buf_size-5){max_block_size=s.pending_buf_size-5;}/* Copy as much as possible from input to output: */for(;;){/* Fill the window as much as possible: */if(s.lookahead<=1){//Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n fill_window(s);if(s.lookahead===0&&flush===Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead===0){break;}/* flush the current block */}//Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n s.strstart+=s.lookahead;s.lookahead=0;/* Emit a stored block if pending_buf will be full: */var max_start=s.block_start+max_block_size;if(s.strstart===0||s.strstart>=max_start){/* strstart == 0 is possible when wraparound on 16-bit machine */s.lookahead=s.strstart-max_start;s.strstart=max_start;/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}/* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}}s.insert=0;if(flush===Z_FINISH){/*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;}/***/return BS_FINISH_DONE;}if(s.strstart>s.block_start){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}return BS_NEED_MORE;}", "title": "" }, { "docid": "72e22478b6963ce19ebe7635f0e8e023", "score": "0.57661754", "text": "function $m2YO$var$deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n /* Copy as much as possible from input to output: */\n\n\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n $m2YO$var$fill_window(s);\n\n if (s.lookahead === 0 && flush === $m2YO$var$Z_NO_FLUSH) {\n return $m2YO$var$BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n\n } //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n /* Emit a stored block if pending_buf will be full: */\n\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n\n $m2YO$var$flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return $m2YO$var$BS_NEED_MORE;\n }\n /***/\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n\n\n if (s.strstart - s.block_start >= s.w_size - $m2YO$var$MIN_LOOKAHEAD) {\n /*** FLUSH_BLOCK(s, 0); ***/\n $m2YO$var$flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return $m2YO$var$BS_NEED_MORE;\n }\n /***/\n\n }\n }\n\n s.insert = 0;\n\n if (flush === $m2YO$var$Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n $m2YO$var$flush_block_only(s, true);\n\n if (s.strm.avail_out === 0) {\n return $m2YO$var$BS_FINISH_STARTED;\n }\n\n return $m2YO$var$BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n $m2YO$var$flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return $m2YO$var$BS_NEED_MORE;\n }\n /***/\n\n }\n\n return $m2YO$var$BS_NEED_MORE;\n}", "title": "" }, { "docid": "51273d79271ddcb22c449a62a56ed323", "score": "0.57594085", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n \n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n \n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n \n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n \n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n \n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n \n s.strstart += s.lookahead;\n s.lookahead = 0;\n \n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n \n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n \n \n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n \n s.insert = 0;\n \n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n \n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n \n return BS_NEED_MORE;\n }", "title": "" }, { "docid": "caf4d302626518d9c6e677933a7340be", "score": "0.5704182", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n /* Copy as much as possible from input to output: */\n\n\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n fill_window(s);\n\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n\n } //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n /* Emit a stored block if pending_buf will be full: */\n\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n\n\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n\n\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "1cb0c2c09510f5ad4eea4b0dbd1b213d", "score": "0.566615", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "fb06321be7458383ccfae035768dfd4d", "score": "0.56554675", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH$1) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH$1) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "969609feb3263469ff169e6f416c49d3", "score": "0.56434643", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n let max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (; ;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n const max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "d579b63c3da06f03b4d20c65cdcda089", "score": "0.5636078", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}", "title": "" }, { "docid": "4c7be48db95a285c9e99749d136f9ab8", "score": "0.56273097", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n /* Copy as much as possible from input to output: */\n\n\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n fill_window(s);\n\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n\n } //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n /* Emit a stored block if pending_buf will be full: */\n\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n\n\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n\n\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n\n return BS_NEED_MORE;\n }", "title": "" }, { "docid": "066d071e25cda29e44affc59d362bbaf", "score": "0.5605442", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n }", "title": "" }, { "docid": "fcb020ec9c81d60baf8a4cc32d3722ac", "score": "0.5598397", "text": "function copy_block(s, buf, len, header) //DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s);\n /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n } // while (len--) {\n // put_byte(s, *buf++);\n // }\n\n\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}", "title": "" }, { "docid": "f8d16cc3da227c9964b0c4fef5e967b9", "score": "0.5576432", "text": "function deflate_stored(s, flush) {\n\t /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t * to pending_buf_size, and each stored block has a 5 byte header:\n\t */\n\t var max_block_size = 0xffff;\n\t\n\t if (max_block_size > s.pending_buf_size - 5) {\n\t max_block_size = s.pending_buf_size - 5;\n\t }\n\t\n\t /* Copy as much as possible from input to output: */\n\t for (;;) {\n\t /* Fill the window as much as possible: */\n\t if (s.lookahead <= 1) {\n\t\n\t //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n\t // s->block_start >= (long)s->w_size, \"slide too late\");\n\t // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n\t // s.block_start >= s.w_size)) {\n\t // throw new Error(\"slide too late\");\n\t // }\n\t\n\t fill_window(s);\n\t if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n\t return BS_NEED_MORE;\n\t }\n\t\n\t if (s.lookahead === 0) {\n\t break;\n\t }\n\t /* flush the current block */\n\t }\n\t //Assert(s->block_start >= 0L, \"block gone\");\n\t // if (s.block_start < 0) throw new Error(\"block gone\");\n\t\n\t s.strstart += s.lookahead;\n\t s.lookahead = 0;\n\t\n\t /* Emit a stored block if pending_buf will be full: */\n\t var max_start = s.block_start + max_block_size;\n\t\n\t if (s.strstart === 0 || s.strstart >= max_start) {\n\t /* strstart == 0 is possible when wraparound on 16-bit machine */\n\t s.lookahead = s.strstart - max_start;\n\t s.strstart = max_start;\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t\n\t\n\t }\n\t /* Flush if we may have to slide, otherwise block_start may become\n\t * negative and the data will be gone:\n\t */\n\t if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\t }\n\t\n\t s.insert = 0;\n\t\n\t if (flush === Z_FINISH) {\n\t /*** FLUSH_BLOCK(s, 1); ***/\n\t flush_block_only(s, true);\n\t if (s.strm.avail_out === 0) {\n\t return BS_FINISH_STARTED;\n\t }\n\t /***/\n\t return BS_FINISH_DONE;\n\t }\n\t\n\t if (s.strstart > s.block_start) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\t\n\t return BS_NEED_MORE;\n\t }", "title": "" }, { "docid": "c605368df1202271b79db21eceff60ac", "score": "0.55640846", "text": "function deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n /* Copy as much as possible from input to output: */\n\n\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n // s.block_start >= s.w_size)) {\n // throw new Error(\"slide too late\");\n // }\n fill_window(s);\n\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n\n } //Assert(s->block_start >= 0L, \"block gone\");\n // if (s.block_start < 0) throw new Error(\"block gone\");\n\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n /* Emit a stored block if pending_buf will be full: */\n\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n\n\n if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n\n\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n\n return BS_NEED_MORE;\n }", "title": "" }, { "docid": "044aed5544abf6412a72557e2eba690e", "score": "0.5514247", "text": "function inflate_uncompressed_block(d) {\n var length, invlength;\n var i = 0, source = d.source, history = d.history, dest = d.dest, destIndex = d.destIndex;\n\n if (d.bitcount > 7) {\n var overflow = Math.floor(d.bitcount / 8);\n d.sourceIndex -= overflow;\n d.bitcount = 0;\n d.tag = 0;\n }\n\n /* get length */\n length = source[d.sourceIndex + 1];\n length = 256 * length + source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = source[d.sourceIndex + 3];\n invlength = 256 * invlength + source[d.sourceIndex + 2];\n\n /* check length */\n if (length != (~invlength & 0x0000ffff))\n return _tinf.DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i) {\n history.push(source[d.sourceIndex]);\n dest[destIndex++] = source[d.sourceIndex++];\n }\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n d.destIndex = destIndex;\n\n return _tinf.OK;\n }", "title": "" } ]
9e1ad09a3f62b48e6f87551290924e57
called when a message arrives
[ { "docid": "080fa9461a9628e345329a2a1d32b036", "score": "0.7003009", "text": "function onMessageArrived(message) {\n console.log(message.destinationName\t+ \" : \"+message.payloadString);\n if(message.destinationName == house.topics.weather){ update_bed_with_msg(\"weather\",JSON.parse(message.payloadString)); }\n else if(message.destinationName == house.topics.heater){ update_bed_with_msg(\"heater\",message.payloadString); }\n else if(message.destinationName == house.topics.heater_status){ update_bed_with_msg(\"status\",message.payloadString); }\n else if(message.destinationName == house.topics.timer){ update_bed_with_msg(\"timer\",message.payloadString); }\n else if(message.destinationName == house.topics.level){ update_bed_with_msg(\"level\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_status){ update_bed_with_msg(\"relay\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_power){ update_bed_with_msg(\"power\",message.payloadString); }\n}", "title": "" } ]
[ { "docid": "f9ecb3f381b2ca8f9d9cf7369fa488f8", "score": "0.79339784", "text": "onMessageReceive() {}", "title": "" }, { "docid": "516855dabcd2354327e0e37a58028c60", "score": "0.77633464", "text": "on_message(message) {\r\n }", "title": "" }, { "docid": "516855dabcd2354327e0e37a58028c60", "score": "0.77633464", "text": "on_message(message) {\r\n }", "title": "" }, { "docid": "516855dabcd2354327e0e37a58028c60", "score": "0.77633464", "text": "on_message(message) {\r\n }", "title": "" }, { "docid": "0ac879117f01703f674dc2a6cbc5b73b", "score": "0.76887876", "text": "onMessage() {}", "title": "" }, { "docid": "0ac879117f01703f674dc2a6cbc5b73b", "score": "0.76887876", "text": "onMessage() {}", "title": "" }, { "docid": "ffbe042e75f79ae793047640bf4d1b00", "score": "0.76809007", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n write(message.payloadString);\n}", "title": "" }, { "docid": "daa922a5205f08df9cee908e219c8965", "score": "0.76179606", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\", message);\n }", "title": "" }, { "docid": "7b840ed91837dd5b8726e57cc11def55", "score": "0.75250214", "text": "function onMessageReceived(e) {\n console.log('message received');\n console.log(e);\n var msg = JSON.parse(e.data);\n console.log(msg.event);\n switch (msg.event) {\n case 'ready':\n onReady();\n break;\n case 'finish': \n onFinish();\n break;\n };\n }", "title": "" }, { "docid": "a03b366462c84eea80b98910590c5bd6", "score": "0.7456618", "text": "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n \t}", "title": "" }, { "docid": "e374a8c5c475a97807a637bb30350559", "score": "0.7440408", "text": "function receivedMessage(event) {\n messageHandler.handleMessage(event);\n }", "title": "" }, { "docid": "a7f2a9eae8e392d409b7b1c0907eb7db", "score": "0.7429322", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "title": "" }, { "docid": "a7f2a9eae8e392d409b7b1c0907eb7db", "score": "0.7429322", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "title": "" }, { "docid": "f8ac5bb7a9107ed38c8521170c9e03d7", "score": "0.74091524", "text": "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n\n switch (data.event) {\n case 'ready':\n onReady();\n break;\n\n case 'playProgress':\n onPlayProgress(data.data);\n break;\n\n case 'pause':\n onPause();\n break;\n\n case 'finish':\n onFinish();\n break;\n }\n }", "title": "" }, { "docid": "a9dce8f00ac3aa3854fd42e4f74e8914", "score": "0.73950887", "text": "function onMqttMessageArrived(message) {\n console.log(\"onMqttMessageArrived:\"+message.payloadString+ ' for '+message.destinationName );\n //console.log(message);\n dispatch_message_to_blocks( message.destinationName, message.payloadString );\n}", "title": "" }, { "docid": "c5dafe50c3afc8eb1294038a688a1af7", "score": "0.7393185", "text": "messageReceived(message) {\n\t\tMessage.create({\n\t\t\tuser: this.user,\n\t\t\tbody: message\n\t\t}).then((res) => {\n\t\t\tres.user = this.user;\n\t\t\tthis.io.emit('message', res);\n\t\t});\n\t}", "title": "" }, { "docid": "f0cd6125ea333093d1b1640018eef244", "score": "0.73644984", "text": "function onMessageArrived(message) {\n\tconsole.log(\"onMessageArrived:\"+message.payloadString); \n}", "title": "" }, { "docid": "2860e2d64f39005c843ea3bbf7752812", "score": "0.7332656", "text": "function receivedMessageRead(event) {\n messageHandler.receivedMessageRead(event);\n }", "title": "" }, { "docid": "490d91f33cbcb2b60b0294a77da5e117", "score": "0.7318647", "text": "handleMessage(message) {\r\n console.log('Received message', message.payloadString);\r\n this.callbacks.forEach((callback) => callback(message));\r\n }", "title": "" }, { "docid": "08ca7c7ae94a2048ec3a665b8679cb22", "score": "0.7309596", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "title": "" }, { "docid": "e2f241ac8687842106d17b4bca8bdb82", "score": "0.72704554", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "title": "" }, { "docid": "e2f241ac8687842106d17b4bca8bdb82", "score": "0.72704554", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "title": "" }, { "docid": "e2f241ac8687842106d17b4bca8bdb82", "score": "0.72704554", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "title": "" }, { "docid": "e2f241ac8687842106d17b4bca8bdb82", "score": "0.72704554", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "title": "" }, { "docid": "e2f241ac8687842106d17b4bca8bdb82", "score": "0.72704554", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "title": "" }, { "docid": "c3e64c39a2b883d14483cc5b93e126b8", "score": "0.7269205", "text": "function onMessageArrived(message) {\r\n console.log(\"onMessageArrived:\" + message.payloadString);\r\n if (message.destinationName == 'State') {\r\n\r\n }\r\n if (message.destinationName == 'Content') {\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "bd16d692900f72d2e9ee59db2047f485", "score": "0.72547674", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.destinationName+\": \"+message.payloadString);\n if (message.destinationName == \"/positionZ\"){\n zpos = map(message.payloadString, 500, 4355, 0, 240);\n sunpos = map(message.payloadString, 0, 255, 0, 240);\n }\n if (message.destinationName == \"/positionX\"){\n xpos = map(message.payloadString, 0, 255, 0, 240);\n }\n console.log(\"onMessageArrived:\"+message.destinationName+\": \"+message.payloadString);\n}", "title": "" }, { "docid": "f85773d830d33f5e078f4973016cc68c", "score": "0.7251073", "text": "function onMessageArrived(message) {\r\n Men2Recv=message.payloadString;\r\n console.log(Men2Recv);\r\n accion(Men2Recv);\r\n}", "title": "" }, { "docid": "0e52fa07972253bb5b6e5549bf574760", "score": "0.72304827", "text": "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);\r\n\t}", "title": "" }, { "docid": "3991ec11c557be9d815aef9b5157bf50", "score": "0.7228196", "text": "onMessage( message ) {\n\t\tconsole.log(`Received message from client: ${ message.toString() }`);\n\t}", "title": "" }, { "docid": "78dc4a47a80b0eea093e78949d88e4d6", "score": "0.71959984", "text": "function onMessageArrived(message) {\n dotNetReference.invokeMethodAsync(\"OnMessageArrived\", message.payloadString)\n .then(r => console.log(\"onMessageArrived:\" + message.payloadString));\n ;\n }", "title": "" }, { "docid": "de18ffa1a75d5aef4e805c3bd3d8a4f1", "score": "0.71749574", "text": "_setMessageListener() {\n this.rtm.on(RTM_EVENTS.MESSAGE, (message) => {\n this._processMessage(message);\n });\n }", "title": "" }, { "docid": "a4498ac27796e5f809bc9e12297c7fcf", "score": "0.71560955", "text": "onMessageStart() { }", "title": "" }, { "docid": "a74373b078a2a3ff2ca3c1272fcbbf11", "score": "0.7149863", "text": "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'pause':\n onPause();\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n}", "title": "" }, { "docid": "207c046e111020db717654f07f1f8869", "score": "0.7148552", "text": "onMessage(message) {\n log('received %s', message.type, message)\n this.emit('message', message)\n\n switch (message.type) {\n case 'ack':\n this.in.emit(`ack:${message.id}`, message)\n // No need to send an ack in response to an ack.\n return\n case 'data':\n if (message.data) this.emit('data', message.data)\n break\n default:\n }\n\n // Lets schedule an confirmation.\n this.multiplexer.add({\n type: 'ack',\n id: message.id\n })\n }", "title": "" }, { "docid": "59f842fad5ad925633e275da68c6dd20", "score": "0.7136519", "text": "handleMessage(message) {\n console.log('Came to handleMessage in SubscriberLWC. Message: ' + message.textMessage);\n this.receivedMessage = message.textMessage;\n }", "title": "" }, { "docid": "9f47c145e3a11d363823fb0e9e73022f", "score": "0.713231", "text": "function onCallBack(message){\t\t\n\t\tif(message.body){\n\t\t\tconsole.log('receiving data',message.body);\t\n\t\t\tvar data = message.body\n\t\t\twhenMassegeResieved(JSON.parse(data));\t\n\t\t}else{\n\t\t\tconsole.log('message contain no data');\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "5a2894b16c6693e7347cc1a6248ae2d8", "score": "0.7124501", "text": "function onMessageArrived(message) {\n \tdisplayMessageConsole(\"Message Recieved: \" + \"\\\"\" + message.payloadString + \"\\\"\" + \" on channel/topic: \" + \"\\\"\" + message.destinationName + \"\\\"\" + \" QoS: \" + \"\\\"\" + message.qos + \"\\\"\");\n }", "title": "" }, { "docid": "29b9681f3dedc75387bd71a39d5fbddd", "score": "0.7089663", "text": "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'play':\n onPlay();\n break;\n \n case 'pause':\n onPause();\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n}", "title": "" }, { "docid": "62acd466172884c08a4c62cde177110d", "score": "0.70588076", "text": "_registerMessageListener() {\n this._mav.on('message', (message) => {\n let type = this._mav.getMessageName(message.id);\n\n // Wait for specific message event to get the all the fields.\n this._mav.once(type, (_, fields) => {\n // Emit both events.\n this.emit('message', type, fields);\n let listened = this.emit(type, fields);\n\n // Emit another event if the message was not listened for.\n if (!listened) {\n this.emit('ignored', type, fields);\n }\n });\n });\n }", "title": "" }, { "docid": "cb9f12aa2e50de745f0ac7f922377a8c", "score": "0.7043452", "text": "function onSocketMessage(event) {\r\n\tappendContent(\"theMessages\", \"Received: \" + event.data + \"<br/>\");\r\n}", "title": "" }, { "docid": "c75fc183edc85a84201a23230eed97b5", "score": "0.70274276", "text": "function on_socket_get(message){}", "title": "" }, { "docid": "304b31d8c2900263dc5b6a856cfbc9ed", "score": "0.69861805", "text": "function onMessageArrived(message) {\n console.log(message);\n if (message.destinationName == \"LED\") {\n var pesan = message.payloadString;\n pesan = JSON.parse(pesan);\n console.log(pesan);\n\n var newChatItem = $(chatItem);\n newChatItem.find('.username').html(pesan.name);\n newChatItem.find('.message').html(pesan.message);\n }\n listen();\n}", "title": "" }, { "docid": "388232cf3e992093daf191c759810e3c", "score": "0.69813603", "text": "onClientMessage(message) {\n try {\n // Decode the string to an object\n const { event, payload } = JSON.parse(message);\n\n this.emit(\"message\", event, payload);\n } catch {}\n }", "title": "" }, { "docid": "b4e10fd1c924657fedc6aa5e372ba0c0", "score": "0.6976392", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n EventBus.dispatch(message.destinationName, this, message)\n }", "title": "" }, { "docid": "056ea795c3f9361654ea77843a72f154", "score": "0.6970558", "text": "onMessage(event) {\n try {\n const data = JSON.parse(event.data);\n // data.event is used to lookup which registered listener to call\n this.ee.emit(data.event, data);\n } catch (error) {\n this.ee.emit('error', error);\n }\n }", "title": "" }, { "docid": "95d151050ff4732feb3204cd53d9ee6a", "score": "0.69466865", "text": "function onMessageArrived(message) {\n console.log(message.destinationName, ' -- ', message.payloadString);\n\n if (message.destinationName == \"X\"){\n posX = message.payloadString;\n }\n if (message.destinationName == \"Y\"){\n posY = message.payloadString;\n console.log(message.payloadString);\n }\n if (message.destinationName == \"smile\"){\n heartEyes();\n }\n updateEyes(posX, posY);\n\n}", "title": "" }, { "docid": "882f2b4912afb48fa982cc862cf551c3", "score": "0.69460684", "text": "messageReceived(message){\n\t\tLogger.info(\"Message received:\");\n\t\tLogger.info(`name: ${message.name}`);\n\t\tLogger.info(`data: ${message.data}`);\n\n\t\tif(!message.name) {\n\t\t\tLogger.warn(\"Message received without a name. Ignoring.\");\n\t\t\treturn null;\n\t\t}\n\n\t\tif(!this[message.name]) {\n\t\t\tLogger.warn(`Message received with name [${message.name}] which is not a method on the MessageClient class.`);\n\t\t\treturn null;\n\t\t}\n\n\t\tthis[message.name](message.data);\n\t}", "title": "" }, { "docid": "1f83155c20f84d52210632846587e650", "score": "0.6926734", "text": "function receive (message) {\n input.send(Message(id, requestUrl, message.toString()));\n }", "title": "" }, { "docid": "645e55341afb541ee2ae385436afe911", "score": "0.69266635", "text": "_onRecieveMessage() {\n this.client.on(\"data\", data => {\n console.log(data.toString());\n });\n }", "title": "" }, { "docid": "5473239002d2abf28f98fe594df72fb8", "score": "0.6920116", "text": "function onMessageArrived(message) {\n try{\n let topic = message.destinationName;\n const data = JSON.parse(message.payloadString);\n addData(charts[topic], lists[topic], data.Id, { x: Date.now(), y: data.Value });\n }catch(e){\n // nothing\n }\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "title": "" }, { "docid": "8cd2cbebef5c1635819a334e3d094ebf", "score": "0.6916712", "text": "onMessageEnd() { }", "title": "" }, { "docid": "f79056a9a3e26764a6aa8b096ca851b3", "score": "0.691206", "text": "function onMessage(event) {\n\t\tconsole.log('Client socket: Message received: ' + event.data);\n\t\tcastEvent('onMessage', event);\n\t}", "title": "" }, { "docid": "aaf3a2ebc27fa4d942cee3ba092ddfd8", "score": "0.6910867", "text": "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "title": "" }, { "docid": "d812a2f0fcff90d50ec4947ae838d383", "score": "0.6906796", "text": "onMessage(callback) {\n exports.default.sub.on('message', (channel, message) => callback(channel, JSON.parse(message)));\n }", "title": "" }, { "docid": "8da04e85f4af3af174a0009b00cbf869", "score": "0.69062054", "text": "SOCKET_ONMESSAGE(state, message) {\n switch (message.type) {\n case \"message\":\n state.messages.push(message.payload);\n break;\n default:\n state.socket.message = message;\n }\n }", "title": "" }, { "docid": "ccb722894f4d9640b6fbdc1165626ebd", "score": "0.68973005", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\",message.destinationName,message.payloadString);\n\n if (message.destinationName==\"tkkrlab/spacestate\") {\n var elem = document.getElementById(\"space-status\");\n\tif (message.payloadString==\"1\") {\n\t\telem.innerHTML = \"<span class='open'>open</span>\";\n\t} else if (message.payloadString==\"0\") {\n\t\telem.innerHTML = \"<span class='closed'>gesloten</span>\";\n\t} else {\n\t\telem.innerHTML = \"<span class='unknown'>status onbekend (\"+String(message.payloadString)+\")</span>\";\n\t}\n } else if (message.destinationName==\"test/progress1\") {\n progress[0].animate(Number(message.payloadString/100));\n } else if (message.destinationName==\"test/progress2\") {\n progress[1].animate(Number(message.payloadString/100));\n } else if (message.destinationName==\"chat\") {\n drawChat(message.payloadString);\n } else {\n console.log(\"Message received\",message.destinationName,message.payloadString);\n elem = document.getElementById(\"mqtt-content\");\n elem.innerHTML = \"<div class='item'><strong>\"+message.destinationName+\":</strong> \"+message.payloadString+\"</div>\" + elem.innerHTML;\n }\n}", "title": "" }, { "docid": "3b72399381162dcaf83c9391e018a17b", "score": "0.68909764", "text": "received(message) {\n // Called when there's incoming data on the websocket for this channel\n return store.dispatch(addMessage(message));\n\n }", "title": "" }, { "docid": "fd38bf26ea73bc3948021d5215a452e9", "score": "0.6887485", "text": "function onMessageArrived(message) {\n //console.log(message);\n //console.log(message.destinationName);\n \n if (message.destinationName == (\"WebDeliver:\"+userID)) {\n data_bike = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"chemin:\"+userID)) {\n data_chemin = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"map:\"+userID)) {\n //console.log(message.payloadString);\n data_map = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"client:\"+userID)) {\n data_client = JSON.parse(message.payloadString);\n hasMap++;\n\t}\n\tif (message.destinationName == (\"timeDelivery:\"+userID)) {\n\t\t$(\".info\").removeClass(\"hide\");\n\t\tdata_time = int(JSON.parse(message.payloadString));\n\t\t$(\"#time\").text(data_time);\n\t\tvar timeOrder = setInterval(function (){\n\t\t\tif ($(\"#time\").text() <=1) {\n\t\t\t\tclearInterval(timeOrder);\n\t\t\t\t$(\"#time\").text(\"1\");\n\t\t\t}\n\t\t\t$(\"#time\").text($(\"#time\").text()-1);\n\t\t\t\n\t\t},1000); //toutes les 10 secondes\n hasMap++;\n }\n }", "title": "" }, { "docid": "089e9aef844f649656a522f9cb0a7f22", "score": "0.688154", "text": "function onMessageReceived(event) {\n\t // Handle messages from the vimeo player only\n\t if (!(/^https?:\\/\\/player.vimeo.com/).test(event.origin)) {\n\t return false;\n\t }\n\n\t if (playerOrigin === '*') {\n\t playerOrigin = event.origin;\n\t }\n\n\t var data = JSON.parse(event.data);\n\n\t switch (data.event) {\n\t case 'ready':\n\t onReady();\n\t break;\n\n\t case 'finish':\n\t onFinish();\n\t break;\n\t }\n\t }", "title": "" }, { "docid": "3cb8923a03beaffd5a5f49b6ef0d10b5", "score": "0.6880129", "text": "handleMessage(message) {\n console.log('lmsDemo2: message received:' + JSON.stringify(message));\n if(message.FromWhom == 'lmsdemo1'){\n this.msgrcvd = message.ValuePass;\n }\n }", "title": "" }, { "docid": "3dbcda240dfbbe57efa82f5d6d287034", "score": "0.68678814", "text": "function receivedMessage(data) {\n\tconsole.log('Received:', data);\n\tshowNewMessage(\"other\", data)\n}", "title": "" }, { "docid": "b8d14546ff3902d5fc4e9dd078248a44", "score": "0.6867663", "text": "onMessageArrived(topic,message) {\n\t\tlet that = this;\n\t\tlet parts = topic ? topic.split(\"/\") : [];\n if (topic === \"hermod/default/tts/say\") {\n\t\t\tconsole.log('DUMPME')\n\t\t\tconsole.log(this.eventCallbackFunctions);\n\t\t} \n\t\tlet payload = null\n\t\tif (parts.length > 0 && parts[0] === \"hermod\") {\n // Audio Messages pass through message body direct\n if (parts.length > 3 && (parts[2]===\"speaker\"&& parts[3]===\"play\" )) {\n\t\t\t\tpayload = message;\n\t\t\t\tconsole.log('speaker play')\n } else if (parts.length > 3 && (parts[2]===\"microphone\" && parts[3]===\"audio\")) {\n\t\t\t\tpayload = message;\n\t\t\t} else {\n\t\t\t\t// only log non audio\n\t\t\t\t//console.log(['message '+topic,message.toString()]);\n\t\t\t\ttry {\n payload = JSON.parse(message.toString()); \n } catch (e) {\n\t\t\t\t console.log(['JSON PARSE ERROR',message.toString()]);\n\t\t\t\t payload = {}\n }\n console.log(['message payload '+topic,payload]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tlet siteId = parts[1];\n\t\t\tlet callbacks = this.subscriptions[topic];\n\t\t\tif (callbacks) {\n\t\t\t\tfor (var subscriptionId in callbacks) {\n\t\t\t\t\tlet value = callbacks[subscriptionId]\n\t\t\t\t\tvalue.callBack.bind(that)(topic,siteId,payload);\n\t\t\t\t\tif (value.oneOff) {\n\t\t\t\t\t\tthis.removeCallbackById(subscriptionId)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\t\n\t\n }\n }", "title": "" }, { "docid": "e768e34d296c642d7becb7e242141868", "score": "0.6863969", "text": "function onMessage(obj) {\n var id = obj.id;\n if (!self._matchesPrefix(id)) {\n debug('discarding unscoped message %s', id);\n return;\n }\n var cb = self._registry.get(id);\n if (cb) {\n process.nextTick(function () {\n debug('received message %s', id);\n // Ensure that the initial callback gets called asynchronously, even\n // for completely synchronous transports (otherwise the number of\n // pending requests will sometimes be inconsistent between stateful and\n // stateless transports).\n cb(null, Buffer.concat(obj.payload), self._adapter);\n });\n }\n }", "title": "" }, { "docid": "76afd4268449007fed95d6d9e92d2a39", "score": "0.68635136", "text": "function onMessageArrived(message) {\n let receivedMessage = JSON.parse(message.payloadString.toString());\n if(receivedMessage[webPageUrl+'-clientid' ]!=creds.clientID){\n annotateReceivedMessage(receivedMessage); \n }\n $.notify('MQTT: Received:' + message.payloadString, \"info\");\n }", "title": "" }, { "docid": "a647fd18b6d1fde8a9ca936670a5afe6", "score": "0.6860799", "text": "function messageListener(event) {\r\n //console.log(event.data);\r\n }", "title": "" }, { "docid": "619cf9f0af27d43870c0a745070f98a1", "score": "0.6852635", "text": "function handleMessage(msg) { // process message asynchronously\n setTimeout(function () {\n messageHandler(msg);\n }, 0);\n }", "title": "" }, { "docid": "80e0f467703d7d67e0efbde66bd7c067", "score": "0.6847246", "text": "messageHandler(self, e) {\n let msg = ( (e.data).match(/^[0-9]+(\\[.+)$/) || [] )[1];\n if( msg != null ) {\n let msg_parsed = JSON.parse(msg);\n let [r, data] = msg_parsed;\n self.socketEventList.forEach(e=>e.run(self, msg_parsed))\n }\n }", "title": "" }, { "docid": "619ee3de05eb520bec080867daff037a", "score": "0.6831267", "text": "onMessageArrived(message) {\n if (message.destinationName === \"common/reply\") {\n console.log(\"onMessageArrived:\"+message.payloadString, message);\n let s = JSON.parse(message.payloadString);\n let requested = s.requested;\n\n if (requested === \"ping\") {\n let value = s.value;\n this.devices.push(value);\n }\n\n }\n }", "title": "" }, { "docid": "684f43c678faeb53e10cca1e24ac09d3", "score": "0.6826964", "text": "SOCKET_ONMESSAGE(state, message) {\n // console.log(message, \"msgg\")\n state.socket.message = message\n }", "title": "" }, { "docid": "19292c8a65491430bb8411545e460c4a", "score": "0.681225", "text": "function onMessageArrived(message) {\n //console.log(message.destinationName\t+ \" : \"+message.payloadString);\n graph_text = replace_all(message.payloadString);\n if(message.destinationName.split('/')[0] == z2mqtt_1.value){\n render(\"fdp\");\n }\n else if(message.destinationName.split('/')[0] == z2mqtt_2.value){\n render(\"circo\");\n }\n else{\n render(\"dot\");\n }\n}", "title": "" }, { "docid": "3d3a8988f61a72d6878a76dd371b7dfb", "score": "0.6808053", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n if(message.destinationName == \"undiknas/ti/kelompok4/sensor/suhu\"){\n addData(myChart, parseFloat(message.payloadString));\n \n \n //konversi ke Fahrenheit\n var celcius = parseFloat(message.payloadString);\n var fahrenheit = (celcius * 9/5) + 32;\n \n $('#data-suhu').html(\"Suhu lingkungan tercatat: \" + celcius.toFixed(2) + \" °C\" + \" atau \" + fahrenheit.toFixed(2) + \"°F\");\n }\n else if(message.destinationName == \"undiknas/ti/kelompok4/relay/state\"){\n var state = (message.payloadString == \"0\") ? \"OFF\" : \"ON\";\n $('#fan-state').html(\"Current State: \" + state); \n }\n }", "title": "" }, { "docid": "9341045e1f734088e8bfc0dcbb690ccd", "score": "0.68072176", "text": "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n\n if (message.commandId === undefined || message.commandRes === undefined || message.ok === undefined) {\n console.error('Malformed message', message);\n return;\n }\n\n const stateMessage = state.messages[message.commandId];\n state.messages[message.commandId] = null;\n\n switch (message.commandId) {\n // client -> server events\n case COMMAND_LOGIN:\n case COMMAND_REGISTER:\n case COMMAND_CREATE_ROOM:\n case COMMAND_JOIN_ROOM:\n case COMMAND_MAKE_STAKE:\n case COMMAND_MAKE_MOVE:\n case COMMAND_GET_ROOM:\n console.log('Received message', message);\n\n if (message.ok) {\n stateMessage.resolve(message);\n } else {\n stateMessage.reject(message);\n }\n break;\n // server -> client events\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n case 1004:\n case 1005:\n case 1006:\n case 1007:\n case 1008:\n case 1009:\n case 1010:\n case 1011:\n console.log('Received message', message);\n\n state.roomEvent = message;\n break;\n default:\n console.error('Unknown message commandId', message);\n }\n }", "title": "" }, { "docid": "bf1a4c0fad79635214a9fc41c741a1aa", "score": "0.6798639", "text": "function onMessageArrived(message) {\n console.log('Message Recieved: Topic: ', message.destinationName, '. Payload: ', message.payloadString, '. QoS: ', message.qos);\n console.log(message);\n var messageTime = new Date().toISOString(); //timestamp primitka pristigle poruke\n var poruka = document.createElement('span'); //kreiranje html elementa sa sadržajem poruke\n poruka.innerHTML = 'Tema: ' + message.destinationName + ' | ' + message.payloadString + '</span><br/>'; \n var messages = document.getElementById(\"messages\"); //dohvaćanje html elementa za prikazivanje poruka\n messages.appendChild(poruka); //dodavanje nove poruke html elementu predviđenom za prikaz pristiglih poruka\n}", "title": "" }, { "docid": "2e022d64ee96fa178224e383f6b81918", "score": "0.679603", "text": "function handleMessage(message) {\n if (message.method === \"msgtoclient\"){\n // notify()\n messages.appendChild(AppendMessage(msgText, GetDate()));\n messages.scrollTop = 9999;\n } \n else return;\n}", "title": "" }, { "docid": "d2db0af1d95fe8d55f0e51f1e07a946a", "score": "0.6774671", "text": "function onMessageArrived(message) {\n var msg = message.payloadString;\n var topic = message.destinationName;\n console.log(\"onMessageArrived(\" + topic + \"):\"+msg);\n\n // response according to topic\n var topicHie = topic.split(\"/\");\n var topicType = topicHie[topicHie.length-1];\n if ( topicType == \"newChat\" ) {\n // chat message\n // append message to chat textarea\n if ( $(\"#findFriendsBtn\").hasClass(\"active\")) {\n var chatwith = topicHie[topicHie.length-2];\n // only update chat text area if the current chat user is the sender\n if ( $(\"#chat_\" + chatwith).hasClass(\"double\") ) {\n $('#chatarea').append('<p class=\"mensagem2 toggle\">'+msg+'</p>');\n scrollTextareaToEnd();\n }\n }\n\n $(\"#findFriendsBtn\").addClass('notify');\n } else if ( topicType == \"addItinerary\" ) {\n // new itinerary\n $(\"#myTripsBtn\").addClass('notify');\n } else if ( topicType == \"updateItinerary\" ) {\n // new itinerary feed/comment\n $(\"#myTripsBtn\").addClass('notify');\n } else if ( topicType == \"addFriend\" ) {\n // is added friend\n $(\"#findFriendsBtn\").addClass('notify');\n }\n\n\n }", "title": "" }, { "docid": "511f2261a772c81ebce6bbafd76badf8", "score": "0.67691165", "text": "function handleReceiveMessage(event) {\n console.log(event.data);\n}", "title": "" }, { "docid": "cc3dd931fccf1e9018d81dbca4574699", "score": "0.6768789", "text": "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n console.log(\"SOCKET_ONMESSAGE\");\n }", "title": "" }, { "docid": "b91d0c52af2eae7d5c1111eea4a49f1a", "score": "0.6767128", "text": "function onMessageArrived(message) {\n // console.log(\"onMessageArrived: \" + message.payloadString);\n document.getElementById(\"messages\").innerHTML += '<span>' + message.destinationName + ' : ' + message.payloadString + '</span><br/>';\n updateScroll(); // Scroll to bottom of window\n}", "title": "" }, { "docid": "9c0d0a7f3c613c4d8bfb0e13afbe62f7", "score": "0.6765328", "text": "function messageHandler (msg) {\n console.log('Id: ' + msg.messageId + ' Body: ' + msg.data);\n client.complete(msg, printResultFor('completed'));\n}", "title": "" }, { "docid": "9c0d0a7f3c613c4d8bfb0e13afbe62f7", "score": "0.6765328", "text": "function messageHandler (msg) {\n console.log('Id: ' + msg.messageId + ' Body: ' + msg.data);\n client.complete(msg, printResultFor('completed'));\n}", "title": "" }, { "docid": "2ad39ae5aa93d95206c2ae2ee112293d", "score": "0.6764615", "text": "function onMessage(event) {\n\n\t\tvar msg = JSON.parse(event.data);\n\n\t\tswitch(msg.type) {\n\n\t\tcase 'chat':\n\t\t\tdisplayChatMessage(event);\n\t\t\tbreak;\n\n\t\tcase 'attendeeCount':\n\t\t\tdisplayAttendeeCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'kudosCount':\n\t\t\tdisplayKudosCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'fanCount':\n\t\t\tdisplayFanCount(event);\n\t\t\tbreak;\n\n\t\t}\n\t}", "title": "" }, { "docid": "06e43ea7fedfb861cdc28adace69156f", "score": "0.67427665", "text": "function recv_pub(message) {\n //some client push data to me, show it! remeber decode it \n //hickey.message_new_handler(jQuery.base64.decode(message.data.data));\n if (hickey.handler.receive_new != null) {\n var data = JSON.parse(message.data.data);\n if (data.push_type == 1 || data.push_type == 2) {\n print_msg('');\n hickey.handler.receive_new(data.push_data);\n } else {\n print_msg(\"receive text:[%d]\" + data.push_data.title, data.push_type);\n }\n }\n try {\n _listener_cometd.publish(channel.push, {\n type: 'affirm',\n device_id: _dev_id,\n msgid: message.data.msgid,\n data: message.data.data\n });\n } catch (e) {\n print_msg(e.message);\n }\n }", "title": "" }, { "docid": "2b22453ed7c40a8fae9fff803eede4de", "score": "0.6741802", "text": "function onMessageArrived(message) {\n // console.log(\"onMessageArrived\");\n // console.log(\"onMessageArrived:\" + message.payloadString);\n\n payload = JSON.parse(message.payloadString);\n\n handleMessage( // in updateDom.js\n JSON.stringify(\n payload.state.desired\n )\n );\n\n\n} // close onMessageArrive", "title": "" }, { "docid": "cd6919e2b9ff61e9c10238a58ad70240", "score": "0.6741565", "text": "function onMessage ( event ) {\n // Parse it as Json\n console.log(event);\n let jsonMsg = JSON.parse(event.data);\n\n switch(jsonMsg.type) {\n // If the websocket is just created it sends a connect. After that we want to ask for the username.\n case TYPE_CONNECT_MSG:\n let setWebsocketSessMsg = {\n \"type\": TYPE_SET_WEBSOCKET_SESS_MSG\n };\n wsservice.send(setWebsocketSessMsg);\n\n let enterroommsg = {\n \"type\": TYPE_ENTER_ROOM,\n \"room\": $scope.room\n };\n wsservice.send(enterroommsg);\n break;\n // If the users of the room were updated, set the names\n case TYPE_USERS_ROOM_UPDATED:\n let names = jsonMsg.namesInRoom.split(' ');\n $scope.users = names;\n $scope.$apply();\n break;\n // If it is a message, push it to the messages.\n case TYPE_MESSAGE:\n $scope.messages.push(jsonMsg);\n $scope.$apply();\n break;\n }\n }", "title": "" }, { "docid": "b19eb29c39e4abe27971a7fb81130d6f", "score": "0.67358637", "text": "SOCKET_ONMESSAGE (state, message) {\n console.log('Message: ', message)\n if (state.activeChannel.chat_id === message.channel.is_private?message.channel.name:message.channel.chat_id) {\n state.messages.results.push(message)\n } else {\n console.log('another one')\n }\n }", "title": "" }, { "docid": "7f012c78157c66a94657d3a766aea55c", "score": "0.6731717", "text": "SOCKET_ONMESSAGE (state, payload) {\n state.socket.message = payload\n }", "title": "" }, { "docid": "2ff973b95690cb3a574c7d4bc93f414c", "score": "0.6729565", "text": "_onMessage (msg) {\n const { data, from, topicIDs } = msg\n let key\n try {\n key = topicToKey(topicIDs[0])\n } catch (err) {\n log.error(err)\n return\n }\n\n log(`message received for ${key} topic`)\n\n // Stop if the message is from the peer (it already stored it while publishing to pubsub)\n if (from === this._peerId.toB58String()) {\n log(`message discarded as it is from the same peer`)\n return\n }\n\n if (this._handleSubscriptionKeyFn) {\n this._handleSubscriptionKeyFn(key, (err, res) => {\n if (err) {\n log.error('message discarded by the subscriptionKeyFn')\n return\n }\n\n this._storeIfSubscriptionIsBetter(res, data)\n })\n } else {\n this._storeIfSubscriptionIsBetter(key, data)\n }\n }", "title": "" }, { "docid": "860eb451859d6421168cdab0bd5c1c75", "score": "0.6729464", "text": "receive(message) {\n this.log(\"Received: \"+message);\n var obj = JSON.parse(message);\n if (\"object\" in obj){\n this.processEvent(obj.object,obj.changes);\n } else if (\"Add\" in obj ) {\n for ( i=0; i< obj.Add.objects.length; i++ ) {\n // this.log(\"adding \"+i+\":\"+obj);\n this.addObject(obj.Add.objects[i]);\n }\n this.log(\"added \"+obj.Add.objects.length+\" scene size \"+this.scene.size);\n } else if (\"Remove\" in obj) {\n for ( var i=0; i< obj.Remove.objects.length; i++ ) {\n this.removeObject(obj.Remove.objects[i]);\n }\n } else if (\"ERROR\" in obj){\n // TODO: error listener(s)\n this.log(obj.ERROR);\n this.errorListeners.forEach((listener)=>listener(obj.ERROR));\n } else if ( \"Welcome\" in obj) {\n var welcome = obj.Welcome;\n if ( ! this.me ) {\n // FIXME: Uncaught TypeError: Cannot assign to read only property of function class\n let client = new User();\n this.me = Object.assign(client,welcome.client.User);\n }\n this.welcomeListeners.forEach((listener)=>listener(welcome));\n if ( welcome.permanents ) {\n welcome.permanents.forEach( o => this.addObject(o));\n }\n } else if ( \"response\" in obj) {\n this.log(\"Response to command\");\n if ( typeof this.responseListener === 'function') {\n var callback = this.responseListener;\n this.responseListener = null;\n callback(obj);\n }\n } else {\n this.log(\"ERROR: unknown message type\");\n }\n }", "title": "" }, { "docid": "07abfab2c2e2ddd90ee6510d8dac51d0", "score": "0.67265236", "text": "function onMessageArrived(message) {\n var data = message.payloadString.split(',');\n var today = new Date();\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();\n console.log(\"onMessageArrived: \" + data[0] + \" and \" +data[1]);\n document.getElementById(\"messages\").innerHTML = '<h3>'+ data[0] +'</h3>';\n document.getElementById(\"messages1\").innerHTML = '<h3>'+ data[1] +'</h3>';\n document.getElementById(\"waktunow\").innerHTML = '<p>'+ date +' '+ time +'</p>';\n sendData(data[0], data[1]);\n addData(time, data[0]);\n addData1(time, data[1]);\n}", "title": "" }, { "docid": "819eb3beabba502f1a99b3cb89bc4f77", "score": "0.6715572", "text": "socketMessage(message) {\n\n let msg = JSON.parse(message.data);\n if (!msg.event) throw \"Invalid message format: \" + msg;\n\n switch (msg.event) {\n case 'startApp':\n console.log('Application launched')\n this.viewHandler.onStartApplication();\n break;\n\n case 'appDisconnected':\n console.log('app disconnected');\n\n GlobalVars.reset();\n this.reset();\n break;\n\n case 'bodyJoints':\n this.eventsHandler.onReceiveBodyJoints(msg);\n break;\n }\n }", "title": "" }, { "docid": "c8ff83348aa86fe0477c7dab45a82757", "score": "0.6715499", "text": "function cb_onMessageArrived(message) {\n console.log(\"Message arrived: topic=\" + message.destinationName + \", message=\" + message.payloadString);\n\tvar topic = message.destinationName.split(\"/\");\n\tvar colored_lbg = \"<span style='background-color: LightGray'>\" + topic[0] + \"</span>\"\n\tvar colored_topic = \"<span style='background-color: LightSteelBlue'>\" + topic[1] + \"</span>\"\n\tvar colored_hashid = \"<span style='background-color: Linen'>\" + topic[2] + \"</span>\"\n\tvar payload = message.payloadString.split(\";\");\n\tvar colored_dp = \"<span style='background-color: Linen'>\" + payload[0] + \"</span>\"\n\tvar dt = payload[1].split(\"T\")\n\tdt = dt[0] + ' ' + dt[1].split(\"Z\")[0].split(\".\")[0]\n\t\n\t$('#messages').prepend('<li><span style=\"font-size: 0.8rem\">' + dt + \" - \" + colored_lbg + '/' + colored_topic + '/' + colored_hashid + \": \" + colored_dp + ' ' + payload[2] + '</span></li>');\n}", "title": "" }, { "docid": "d5b8bc57df2d6c579d3a1b444bfb2c3a", "score": "0.6702137", "text": "function receivedMessage(event) {\n\n console.log(\"RECEIVED MESSAGE\");\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", \n senderID, recipientID, timeOfMessage);\n //console.log(JSON.stringify(message));\n\n var messageId = message.mid;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n\n if (messageText) {\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n switch (messageText) {\n case 'personalizado':\n sendPersonalMessage(senderID);\n break;\n\n default:\n sendInitialMessage(senderID);\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\");\n }\n}", "title": "" }, { "docid": "5e09378ef3b819aed64e2aa31b93f4ec", "score": "0.6697671", "text": "listen() {\r\n this.client.on('message', message => this.onMessage(message));\r\n }", "title": "" }, { "docid": "d42297391de85900c513191fb6416a35", "score": "0.66970325", "text": "function onMessageArrived(message) {\n\n if (message.destinationName == temp_topic) {\n\tg_t.refresh(message.payloadString);\n } \n if (message.destinationName == humidity_topic) {\n\tg_h.refresh(message.payloadString);\n } \n\n if (message.destinationName == light_topic) {\n\tif (message.payloadString == \"on\") {\n\t $scope.light = true;\n\t} else {\n\t $scope.light = false;\n\t} \n\tconsole.log(message.payloadString);\n }\n\n $scope.$apply();\n}", "title": "" }, { "docid": "ab850319962ba6a0f2bfca3506d2b102", "score": "0.66851366", "text": "function receivedMessage(event) {\n if (!event.message.is_echo) {\n var message = event.message;\n var senderId = event.sender.id;\n\n console.log(\"Received message from senderId: \" + senderId);\n console.log(\"Message is: \" + JSON.stringify(message));\n\n // You may get a text or attachment but not both\n if (message.text) {\n var formattedMsg = message.text.toLowerCase().trim();\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding movie detail.\n // Otherwise, search for new movie.\n switch (formattedMsg) {\n case \"hla!\":\n case \"hola!\":\n case \"hi!\":\n case \"hi\":\n case \"hello\":\n case \"hola\":\n sendMessageText(senderId, \"Hola! Gracias por saludarnos\");\n break;\n\n default:\n sendMessageText(senderId, \"Hola! Ahora estamos algo ocupados! Cuéntanos tu duda o consulta. A penas podamos, te responderemos! Que tengas un estupendo día!\");\n }\n } else if (message.attachments) {\n sendMessage(senderId, {text: \"Sorry. No entiendo lo que quieres decir :(\"});\n }\n }\n}", "title": "" }, { "docid": "4341ece2c940b79999d76fb1cb516493", "score": "0.6679362", "text": "function messageReceived(m){\n var action = m.action;\n var funcs = subscribed[action] || [];\n for(var i = 0; i < funcs.length; i++) {\n if(funcs[i]) funcs[i](m.data);\n }\n }", "title": "" }, { "docid": "6a5c0edba1301ed8a4b629919f62cb24", "score": "0.6676292", "text": "function recieveMessage(msg) {\t\r\n\tconst channel = msg['channel'];\r\n\tif (channel === getCurrentChannel()) {\r\n\t\tdrawMessage(msg);\r\n\t}\r\n}", "title": "" }, { "docid": "6754718391e65f5cc2f1e60d1d5939bb", "score": "0.666671", "text": "function onMessageArrived(message) {\n\t\t \n\t\tvar topic = message.destinationName;\n\t\tvar n = topic.lastIndexOf('/');\n\t\tvar result = topic.substring(n + 1);\n\t\tswitch(result){\n\t\t case \"data\":{\n\t\t\tconsole.log(\"onMessageArrived DATA :\"+message.payloadString);\n\t\t\tvar datamsg = message.payloadString;\n\t\t\tif(temp == '1')\n\t\t\t{\n\t\t\t\twindow.location.href = \"http://localhost/login-system/mqttmsg.php?javasmsg=\"+message.payloadString;\n\t\t\t}\n\t\t\tclient.send(message2);\n\t\t }\n\t\t break;\n\t\t case \"temp\":{\n\t\t\tconsole.log(\"onMessageArrived TEMP :\"+message.payloadString);\n\t\t\ttemp = message.payloadString;\n\t\t }\n\t\t break;\n\t\t default:{\n\t\t\talert(\"wrong topic\");\n\t\t }\n\t\t};\n\t\t \n\t /*console.log(\"onMessageArrived:\"+message.payloadString);\t\t\n\t\tvar datamsg = message.payloadString;\n\t\tif(temp=='1')\n\t\t{\n\t\t\twindow.location.href = \"http://localhost/login-system/mqttmsg.php?javasmsg=\"+message.payloadString;\n\t\t}*/\n\t\t\n\t\t//client.send(message2);\n\t }", "title": "" }, { "docid": "bb5835475d8987d5452cbd437c73cd9b", "score": "0.66622776", "text": "SOCKET_ONMESSAGE (state, message) {\n console.info(state, message)\n }", "title": "" } ]
fef91f9278806aae25b397ea965b5e9f
called when creating a fresh new database
[ { "docid": "a664cd68a5d200d0868bff971199344b", "score": "0.0", "text": "function createSchema(db) {\n var docStore = db.createObjectStore(DOC_STORE, {keyPath : 'id'});\n db.createObjectStore(BY_SEQ_STORE, {autoIncrement: true})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n db.createObjectStore(ATTACH_STORE, {keyPath: 'digest'});\n db.createObjectStore(META_STORE, {keyPath: 'id', autoIncrement: false});\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n\n // added in v2\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n // added in v3\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'});\n\n // added in v4\n var attAndSeqStore = db.createObjectStore(ATTACH_AND_SEQ_STORE,\n {autoIncrement: true});\n attAndSeqStore.createIndex('seq', 'seq');\n attAndSeqStore.createIndex('digestSeq', 'digestSeq', {unique: true});\n }", "title": "" } ]
[ { "docid": "c528e1afacef4e8a33577badec34ae1c", "score": "0.7576858", "text": "function createDB() {\n MV.showSubmitDialog(\"addDBDialog\", requestConnectionDetails, null);\n }", "title": "" }, { "docid": "ac70a40b5e816dd0400610aad4db7a33", "score": "0.7491907", "text": "function createDbSchema() {\n if (DB_NAME && DB_VERSION) {\n dbSchema = lf.schema.create(DB_NAME, DB_VERSION);\n console.info(LV_CONSTS.MSG_PREFIX + \"db schema \" + DB_NAME + \" version \" + DB_VERSION + \" created successfully\");\n } else {\n console.error(LV_CONSTS.MSG_PREFIX + \"db name or db version were not specified\");\n }\n }", "title": "" }, { "docid": "1a660c8f117858eacc3937b3f5042b4c", "score": "0.74049336", "text": "function createDatabase(){\n\tlet name = window.prompt(\"Type a name for the new database\",\"My Database\");\n\tif (name !== '' && name !== null) {\n\t\t// Write your database structure here\n\t\tlet db = new GVZ.Database(name);\n\t\tlet tbl = new GVZ.Table('Attendance');\n\t\ttbl.columns.push(new GVZ.Column('id','unumber',0));\n\t\ttbl.columns.push(new GVZ.Column('timestamp','datetime'));\n\t\ttbl.columns.push(new GVZ.Column('tardy','boolean'));\n\t\tdb.tables.push(tbl);\n\t\t\n\t\tGVZ.createDatabase(db).then(function(newDatabase){\n\t\t\trefreshDatabaseDropdown();\n\t\t});;\n\t}\n}", "title": "" }, { "docid": "e8658e42197cff9d0ca9c269a149341b", "score": "0.7333244", "text": "function databaseCreation(application) {\n var __pathSchema = __dirname+'/public/application/'+application+'/db/'+__nomedb;\n \n var __existsSchema = fs.existSync( __pathSchema );\n if( !__existsSchema ) {\n\tconsole.log('Schema creation ');\n\tfs.openSync(__pathSchema, 'w' );\n }\n}", "title": "" }, { "docid": "8ab9602f48ab3131ac7df2b53b4f9e09", "score": "0.722888", "text": "function createDb() {\n console.log(\"createDb chain\");\n db = new sqlite3.Database('encoder.db');\n }", "title": "" }, { "docid": "79772550ed2bd8f00c86022acaa62e00", "score": "0.71628195", "text": "static async createDatabase(){\n const migrationsArray = await this.getMigrationsArray()\n const conn = this.connect()\n conn.connect()\n for(let migration of migrationsArray){\n const migrationFile = await import('./migrations/' + migration)\n migrationFile.default(conn)\n }\n conn.end()\n }", "title": "" }, { "docid": "e9fee72e68f1205bf2cfddbc43dbd70b", "score": "0.7152577", "text": "function dbCreate() {\n try{\n /*** Creates a 2mb database ***/\n //db = window.openDatabase(\"Database\", \"1.0\", \"In-flight\", 5 * 1024 * 1024);\n //db.transaction(createDB, dbErrorHandler, successDB)\n\n var createDB = function () { };\n var successDB = function () { };\n }\n catch (err) {\n ex.log(err, this.Name + \".dbCreate()\");\n }\n }", "title": "" }, { "docid": "40296baa625f227707d4e84128947f80", "score": "0.70346737", "text": "function createDb() { exeSql('CREATE TABLE teste(id integer not null, nome text)') }", "title": "" }, { "docid": "acc5d6b8cb0144ff606e50cbbd50f993", "score": "0.7024702", "text": "function makeDatabase(){\n TVRSdata = openDatabase('mydb', '1.0', 'my first database', 2 * 1024 * 1024);\n //alert(\"created database?\");\n TVRSdata.transaction(createDB, errorCB);\n}", "title": "" }, { "docid": "be0e26bac7805bd3f746403ccf96a0e3", "score": "0.6989814", "text": "function createDb() {\n console.log(\"Creating db\");\n db = new sqlite3.Database(\"pastaland.db\", createTables);\n}", "title": "" }, { "docid": "4a8ea502a9fe2ee29700ba620661f590", "score": "0.6862742", "text": "static initializeDB() {\n const dbPromise = idb.open('commit-step', 2, upgradeDb =>{\n switch(upgradeDb.oldVersion){\n case 0:\n let store = upgradeDb.createObjectStore('username');\n store.put(365, 'stepUp');\n store.put(0, 'stepRight');\n case 1:\n store = upgradeDb.createObjectStore('commits');\n store.put(0, 'counter');\n }\n });\n return dbPromise;\n }", "title": "" }, { "docid": "070d97494441ba926741c26a2b1647cd", "score": "0.6851164", "text": "async initDB() {\n }", "title": "" }, { "docid": "b3e0cf98767e90aa0c1f6878ab47db49", "score": "0.67875", "text": "function setup_db(fname)\n{\n // Open the db\n var db = new sqlite3.Database(fname);\n\n console.log(\"Populating new database\");\n\n // The callback that db.serialize() uses ensures that\n // all operations within it occur in series\n db.serialize( function () {\n\n\t// Creates a table called user with 2 columns\n\t// The first column is a string column. This stores usernames.\n\t// The second column is an integer column. This stores times.\n\t\n\tdb.run(\"CREATE TABLE user (string not null, time integer);\");\n });\n\n // Make sure to close the db again\n db.close();\n}", "title": "" }, { "docid": "980ea6d18a5382aad363ce9da4578ee8", "score": "0.67646515", "text": "function databaseSchemaCreation(application, dbtype) {\n\tdatabaseCreation(application);\n\tvar db = null;\n\tvar instance = null;\n\tif( __dbtype == 'sqlite3' ) {\n\t\tinstance = require('sqlite3').verbose();\n\t\tdb = new sqlite3.databse( __nomedb );\n\t\t\tdb.serialize(function() {\n\t\t\t\t//db.run();\n\t\t});\n\t}\n\n}", "title": "" }, { "docid": "1902ff3f66fe8cfe942e9f23fed4faf8", "score": "0.6743524", "text": "function initDB()\n{\n\n\ntry {\n if (!window.openDatabase) {\n alert('not supported');\n } else {\n var shortName = 'mydatabase';\n var version = '1.0';\n var displayName = 'My Important Database';\n var maxSize = 65536; // in bytes\n var myDB = openDatabase(shortName, version, displayName, maxSize);\n\n // You should have a database instance in myDB.\n\n }\n} catch(e) {\n // Error handling code goes here.\n if (e == INVALID_STATE_ERR) {\n // Version number mismatch.\n\talert(\"Invalid database version.\");\n } else {\n\talert(\"Unknown error \"+e+\".\");\n }\n return;\n}\n\n// alert(\"Database is: \"+myDB);\n\t\n\t\ncreateTables(myDB);\nsystemDB = myDB;\n\n}", "title": "" }, { "docid": "e449ac3374d576d1744fb84e9c2de710", "score": "0.67338777", "text": "function database_create() {\n let db = new sqlite3.Database('./db/todolist.db');\n db.run('CREATE TABLE IF NOT EXISTS todos(NAME,TODOID,TASK)');\n console.log('Database and table created.');\n db.close();\n}", "title": "" }, { "docid": "9bd4eb9fbb48a36aa3a4cff1e7a1014b", "score": "0.67288697", "text": "createDatabase(callback) {\n return null;\n }", "title": "" }, { "docid": "fb35bd075a7ba0a31948e9d45cd8b1ef", "score": "0.66956675", "text": "function createDatabase() {\n var conn = Jdbc.getConnection('jdbc:mysql://sql9.freemysqlhosting.net:3306/sql9356953', 'sql9356953', 'vKMt2BbBis');\n conn.createStatement().execute('CREATE DATABASE ' + db);\n}", "title": "" }, { "docid": "536f2242d4931c729a71509fe6bebdde", "score": "0.6657987", "text": "function init_db () {\n\tdb.execute(\"create table if not exists product(product_id integer primary key, model text, quantity integer, image text, price decimal(15,4),points integer,status integer,date_expired text, sort_order integer,subtract integer,seo text,name text)\");\n\tdb.execute(\"create table if not exists product_description(id integer primary key,product_id integer,language_id integer,name text,description text, meta_description text,meta_keyword text)\");\n\tdb.execute(\"create table if not exists remark_description(id integer primary key, remarkId integer, languageId integer, name text)\");\n}", "title": "" }, { "docid": "3e3fac70eaf7b204975a994739dcd97a", "score": "0.66189414", "text": "async function newDB(name) {\n\tconsole.log(\"Connected!\");\n\tcon.query(`CREATE DATABASE ${name} `, async function (err, result) {\n\t\tif (err) throw err;\n\t\tconsole.log(\"Database created\");\n\t});\n}", "title": "" }, { "docid": "8c8830dc45095f216d9d88b96a168548", "score": "0.6616586", "text": "function createDB(id) {\n database = {id: id,items: {init: 'init'}};\n controller.storage.teams.save(database);\n}", "title": "" }, { "docid": "5f5d933f925cad17c0b28cd3e3acc7ee", "score": "0.66109204", "text": "function DatabaseFactory() {}", "title": "" }, { "docid": "5f5d933f925cad17c0b28cd3e3acc7ee", "score": "0.66109204", "text": "function DatabaseFactory() {}", "title": "" }, { "docid": "5f5d933f925cad17c0b28cd3e3acc7ee", "score": "0.66109204", "text": "function DatabaseFactory() {}", "title": "" }, { "docid": "5f5d933f925cad17c0b28cd3e3acc7ee", "score": "0.66109204", "text": "function DatabaseFactory() {}", "title": "" }, { "docid": "fb1b6d8da7abe56c2875c872f7d9206f", "score": "0.6607823", "text": "_initDatabase() {\n // the alasql database name should be globally unique, otherwise,\n // the database data will interfere across rule engines\n const r = new alasql.Database(this._name /*, { cache: false }*/ );\n this._logger.debug('rule database is created');\n\n r.exec('create table request');\n this._logger.debug('request table is is created');\n\n return r;\n }", "title": "" }, { "docid": "cc2f9244d95eb4abfcb28f1f0aecc228", "score": "0.6562639", "text": "initTables() {\n if (this.db) throw new Error('database already created');\n this.db = new SQL.Database();\n this.db.handleError = this.handleError;\n\n if (DEBUG_DATABASE) debugLog('making tables...');\n\n this.db.exec('CREATE TABLE IF NOT EXISTS PROJECTS (ID INTEGER PRIMARY KEY AUTOINCREMENT, CTIME DATETIME DEFAULT CURRENT_TIMESTAMP, MTIME DATETIME, ALTMD5 TEXT, POS INTEGER, NAME TEXT, JSON TEXT, THUMBNAIL TEXT, OWNER TEXT, GALLERY TEXT, DELETED TEXT, VERSION TEXT)\\n');\n this.db.exec('CREATE TABLE IF NOT EXISTS USERSHAPES (ID INTEGER PRIMARY KEY AUTOINCREMENT, CTIME DATETIME DEFAULT CURRENT_TIMESTAMP, MD5 TEXT, ALTMD5 TEXT, WIDTH TEXT, HEIGHT TEXT, EXT TEXT, NAME TEXT, OWNER TEXT, SCALE TEXT, VERSION TEXT)\\n');\n this.db.exec('CREATE TABLE IF NOT EXISTS USERBKGS (ID INTEGER PRIMARY KEY AUTOINCREMENT, CTIME DATETIME DEFAULT CURRENT_TIMESTAMP, MD5 TEXT, ALTMD5 TEXT, WIDTH TEXT, HEIGHT TEXT, EXT TEXT, OWNER TEXT, VERSION TEXT)\\n');\n\n\n this.db.exec('CREATE TABLE IF NOT EXISTS PROJECTFILES (MD5 TEXT PRIMARY KEY, CONTENTS TEXT)\\n');\n }", "title": "" }, { "docid": "14bdf4782ed49ab7c923563a54fe76dd", "score": "0.6549518", "text": "static async initialize_database_check() {\n db.transaction(tx => {\n tx.executeSql(\n `select * from sqlite_master where type='table' and name='app_metadata';`,\n [],\n (_, { rows: { _array } }) => {\n if (_array.length == 0) {\n Store.create_app_tables();\n }\n },\n Store.fail\n );\n });\n }", "title": "" }, { "docid": "13dfc60d91199482a7fda1e86f512b8a", "score": "0.6523001", "text": "function createDatabase() {\n var url = 'jdbc:mysql://132.178.226.68:22:4964';\n var conn = Jdbc.getConnection(url ,'','');\n \n conn.createStatement().execute('CREATE DATABASE ' + db);\n}", "title": "" }, { "docid": "b0510b9ab9351b84688332d626e17af0", "score": "0.6498802", "text": "function createDB(tx) {\n console.log(\"populateDB started\");\n //tx.executeSql('DROP TABLE IF EXISTS photo');\n tx.executeSql('CREATE TABLE IF NOT EXISTS photo (photo_pk integer primary key asc, photopath text,utctime integer)');\n //tx.executeSql('DROP TABLE IF EXISTS tag');\n tx.executeSql('CREATE TABLE IF NOT EXISTS tag (tag_pk integer primary key asc, tagname text unique)');\n //tx.executeSql('DROP TABLE IF EXISTS mapper');\n tx.executeSql('CREATE TABLE IF NOT EXISTS mapper (map_id integer primary key asc, tag_fk integer,photo_fk integer, FOREIGN KEY (tag_fk) REFERENCES tag(tag_pk), FOREIGN KEY (photo_fk) REFERENCES photo(photo_pk))');\n console.log(\"tables created\");\n }", "title": "" }, { "docid": "a29d8ab70a192d5bf0de5e16a7cbd8bd", "score": "0.6478183", "text": "function createDatabase(testCase, setupCallback) {\n return createNamedDatabase(testCase, databaseName(testCase), setupCallback);\n}", "title": "" }, { "docid": "2038cb208001dbd2becde3a550173949", "score": "0.64606583", "text": "function prepare_database (database, description, time) {\n \n //Se configura la persistencia\n if (window.openDatabase) { //Se carga la base de datos \n persistence.store.websql.config(persistence, database, description, time); \n } else { //Usa la memoria\n persistence.store.memory.config(persistence);\n } \n persistence.debug = false;\n \n //Definir las tablas\n TBL_User = persistence.define('TBL_User', {\n user_id: \"BIGINT\",\n email: \"TEXT\",\n realname: \"TEXT\", \n gender: \"TEXT\", \n cedula: \"TEXT\" \n }); \n persistence.schemaSync(); //Configura la base de datos inicial\n}", "title": "" }, { "docid": "d7c8e13fa27a1a6bef4677d2043d6b7d", "score": "0.64515966", "text": "function createDatabaseIfNotExists(){\n console.log(\"databaseUrl\" + databaseUrl);\n\n client.readDatabase(databaseUrl, (err, result) => {\n if(err){\n if (err.code == HttpStatusCodes.NOTFOUND) {\n client.createDatabase(config.database, (err, created ) => {\n if (err) {\n console.log(JSON.stringify(err));\n }else {\n console.log(\"database created\", JSON.stringify(created));\n }\n });\n }else {\n console.log(\"database created\" , JSON.stringify(result));\n }\n }\n });\n}", "title": "" }, { "docid": "81ef12898454815488bc2d191c6a5696", "score": "0.6436768", "text": "function initializeDatabase() {\n var sql = \"CREATE DATABASE IF NOT EXISTS `triviabot`; \\\n USE `triviabot`; \\\n SET NAMES utf8; \\\n SET character_set_client = utf8mb4; \\\n DROP TABLE IF EXISTS `questions`; \\\n CREATE TABLE `questions` ( \\\n `qid` tinyint(4) NOT NULL AUTO_INCREMENT, \\\n `question` varchar(250) NOT NULL, \\\n `answer` varchar(100) NOT NULL, \\\n PRIMARY KEY (`qid`) \\\n ); \\\n CREATE TABLE IF NOT EXISTS `leaderboard` ( \\\n `user` varchar(120) NOT NULL, \\\n `score` tinyint(4) NOT NULL, \\\n PRIMARY KEY (`user`) \\\n );\";\n connection.query(sql, function(err) {\n if (err) {\n return console.error('*** error: ' + err.message);\n }\n });\n console.log(\"Database initialized.\");\n}", "title": "" }, { "docid": "b97955750d1ab2eeadcdeab69eacdb6d", "score": "0.6431729", "text": "async recreateDatabase() {\n\n try { \n const vendorProperties = Object.assign({},this.vendorProperties)\n const dbi = new MsSQLDBMgr(this.yadamu, vendorProperties)\n await dbi.recreateDatabase(this.parameters.YADAMU_DATABASE)\n } catch (e) {\n this.yadamu.LOGGER.handleException([this.DATABASE_VENDOR,'RECREATE DATABASE',this.parameters.YADAMU_DATABASE],e);\n throw e\n }\n }", "title": "" }, { "docid": "47b566bb5b9963a3cdb26db2faebdcc6", "score": "0.6428891", "text": "function tableCreationCallback(err) {\n if (err) {\n console.log(\"Table creation error\", err);\n } else {\n console.log(\"Database created\");\n //db.close();\n }\n}", "title": "" }, { "docid": "8febc1ae112430ac1658ab9f2d27c995", "score": "0.64277816", "text": "init(dbname = null, createStatement = null, version = 1, description = null, size = null) {\n if (dbname) {\n this.db = SQLite.openDatabase(dbname, version, description, size)\n this.table = dbname\n }\n\n if (createStatement) {\n this.create(createStatement)\n }\n }", "title": "" }, { "docid": "c35bb972a0a815bb9df0c569f6ac293b", "score": "0.6416093", "text": "function createDatabase(client, databaseName, owner, callback){\n var dbCreateDBQuery = \"CREATE DATABASE \" + databaseName + \" OWNER \" + owner + \";\";\n client.query(dbCreateDBQuery, function(err) {\n if (err) console.log('Error creating database ' + databaseName + \" ERROR: \" + err);\n if(callback!=\"\") callback();\n });\n}", "title": "" }, { "docid": "009e10fda0d69a7c3857c6fe808ae659", "score": "0.6415089", "text": "init(context) {\n console.log(\"Entering init(context)\");\n if (!Sqlite.exists(\"pilotvoice.db\")){\n console.log(\"copying Database\");\n Sqlite.copyDatabase(\"pilotvoice.db\");\n } \n console.log(\"Checked for existing database - passed\");\n\n (new Sqlite(\"pilotvoice.db\")).then(db => {\n db.execSQL(\"CREATE TABLE IF NOT EXISTS airportTable (faaID TEXT UNIQUE PRIMARY KEY, airportName TEXT)\").then(id => {\n context.commit(\"init\", { database: db });\n confirm.log(\"id is: \", id);\n console.log(\"CREATE airportTable TABLE SECTION\", db);\n }, error => {\n console.log(\"CREATE airportTable TABLE ERROR\", error);\n });\n }, error => {\n console.log(\"OPEN DB ERROR\", error);\n \n db.execSQL(\"CREATE TABLE IF NOT EXISTS aircraftTable (aircraftnumber TEXT UNIQUE PRIMARY KEY, aircraftName TEXT)\").then(id => {\n context.commit(\"init\", { database: db });\n console.log(\"CREATE aircraftTable TABLE SECTION\", db);\n }, error => {\n console.log(\"CREATE aircraftTable TABLE ERROR\", error);\n });\n }, error => {\n console.log(\"OPEN DB ERROR\", error);\n });\n \n }", "title": "" }, { "docid": "a41eea71ca05a672402586e411e5839f", "score": "0.6408404", "text": "function createDB(db){\n db.executeSql('CREATE TABLE IF NOT EXISTS DosageData (date, urName, cltName, serv, othr, who, how, hrs, min)');\n}", "title": "" }, { "docid": "96417d1b9c6ecbae966bf7c7a2223a43", "score": "0.6396935", "text": "function dbCreate(name) {\n nano.db.create(name, function(err) {\n if (err && err.error !== 'file_exists') {\n throw new CouchDBException(err.reason);\n }\n });\n}", "title": "" }, { "docid": "caf8e12416c6f8acb8fe6a088967c7f8", "score": "0.6393257", "text": "function initDb(db) {\n db.defaults({\n todo: [],\n tags: []\n }).write();\n}", "title": "" }, { "docid": "9de4116e8fd71f0df766c11fe8c58dc7", "score": "0.6389741", "text": "function createSysDB(success, failure) {\n\t function sysDbCreateError(tx, err) {\n\t err = idbModules.util.findError(arguments);\n\t idbModules.DEBUG && console.log(\"Error in sysdb transaction - when creating dbVersions\", err);\n\t failure(err);\n\t }\n\n\t if (sysdb) {\n\t success();\n\t }\n\t else {\n\t sysdb = window.openDatabase(\"__sysdb__\", 1, \"System Database\", DEFAULT_DB_SIZE);\n\t sysdb.transaction(function(tx) {\n\t tx.executeSql(\"CREATE TABLE IF NOT EXISTS dbVersions (name VARCHAR(255), version INT);\", [], success, sysDbCreateError);\n\t }, sysDbCreateError);\n\t }\n\t }", "title": "" }, { "docid": "76a426c111aa1ccddb33fbc74cb4cbd8", "score": "0.6376406", "text": "function init(){\n\tconsole.log(\"Database initiated.\");\n\tdb.transaction(function(tx){\n\t\ttx.executeSql('CREATE TABLE IF NOT EXISTS account(name TEXT, mobilenumber INTEGER, emailid TEXT UNIQUE, password TEXT )');\n\t});\n}", "title": "" }, { "docid": "2f6efd1dcd563e3a1ab19a898b2d098c", "score": "0.63717234", "text": "function init() {\n var con = mysql.createConnection({\n host: 'localhost',\n user: 'root',\n password: 'password',\n });\n con.connect();\n con.query(\"CREATE DATABASE IF NOT EXISTS \" + DATABASE_NAME + \";\", function() {\n con.query(\"USE \" + DATABASE_NAME + \";\", function() {\n con.query(\"SHOW TABLES LIKE 'SongPlace'\", function(err, rows, fields) {\n if (!rows || !rows.length) {\n createTable(con);\n }\n con.end();\n open();\n });\n });\n });\n}", "title": "" }, { "docid": "d9076294216ad8030ccca9b1c8a9943f", "score": "0.6359767", "text": "function createDatabase(name, cb) {\n nano().db.create(name, function(err) {\n if(err && err.status_code !== 412) return cb(err)\n cb(null, err ? false : true)\n })\n}", "title": "" }, { "docid": "cdd670cf6d4314aa9658fd159aab804c", "score": "0.6355862", "text": "function initDB() {\n return ensureIndex();\n }", "title": "" }, { "docid": "973524b3502b0aa4290e4ec045f760f9", "score": "0.63509804", "text": "async newGuild(guild) {\n await this.db.createIfNotExists(guild);\n console.log(`Created database for the guild ${guild.name}`);\n }", "title": "" }, { "docid": "1134fd9c4a0ba0f28c871095b14be8d3", "score": "0.6321307", "text": "function tableCreationCallback(err) {\n if (err) {\n\tconsole.log(\"Table creation error\",err);\n } else {\n\tconsole.log(\"Database created\");\n }\n}", "title": "" }, { "docid": "c1002a0fb0e6ed522740b03cd6213f17", "score": "0.6315214", "text": "function createDb(done) {\n done(null, someDb);\n}", "title": "" }, { "docid": "dcbad96d076e7a71e05d688fd499d9b7", "score": "0.63068944", "text": "function init(){\n\tvar db = Ti.Database.open('ColicheGassoseDB');\n\t\n\tdb.execute('CREATE TABLE IF NOT EXISTS userdata(id INTEGER PRIMARY KEY AUTOINCREMENT, patient_pid TEXT, patient_id INTEGER, name TEXT, doctor_name TEXT, doctor_code TEXT, doctor_custom1 INTEGER, doctor_custom2 INTEGER, doctor_custom3 INTEGER, doctor_custom4 INTEGER, device_token TEXT, to_sync INTEGER);');\n\n\ttry{\n\t\tdb.execute('ALTER TABLE userdata ADD COLUMN user_info TEXT');\n\t} catch (ex){\n\t\t//do nothing\n\t\tTi.API.warn(\"Table userdata is already updated\");\n\t}\n\n\tdb.close();\n}", "title": "" }, { "docid": "9b33f430007c23ebd355a3013abb7be0", "score": "0.6303192", "text": "function createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n } // Open the WebSQL database (automatically creates one if one didn't", "title": "" }, { "docid": "cd93fde1ccebb262efd51e6ed624db43", "score": "0.6301605", "text": "function createAllDBTables() {\n createDBTableFILE();\n createDBTableEVENT();\n createDBTableALARM();\n}", "title": "" }, { "docid": "5f8e4be894af95058ebd2db6058ea175", "score": "0.6298735", "text": "function openDB()\n{\n db = openDatabaseSync(\"feedsDB\",\"1.0\",\"feeds Database\",1000000);\n createTable();\n}", "title": "" }, { "docid": "03a3e555f8c0067d64c2260a0def9fce", "score": "0.6273714", "text": "static openDatabase() {\r\n return idb.open('restaurants', 3, function(upgradeDB) {\r\n switch(upgradeDB.oldVersion) {\r\n case 0:\r\n // placeholder\r\n case 1:\r\n console.log('Creating restaurants store');\r\n upgradeDB.createObjectStore('restaurants', {keyPath: 'id'});\r\n case 2:\r\n console.log('Creating reviews store');\r\n upgradeDB.createObjectStore('reviews', {\r\n keyPath: 'id',\r\n autoIncrement: true\r\n });\r\n case 3:\r\n console.log('Creating temporary reviews store');\r\n upgradeDB.createObjectStore('tempReviews', {\r\n keyPath: 'id',\r\n autoIncrement: true\r\n });\r\n }\r\n });\r\n }", "title": "" }, { "docid": "9da98f58ec9682b5bb34dcea5c49d331", "score": "0.6263957", "text": "function setupDB() {\n\tconst db = new AWS.DynamoDB;\n\n\n\tdb.createTable(tableUser, function(err, data) {\n\t if (err) {\n\t console.error(\"Unable to create \" + tableUser.TableName + \" . Error JSON:\", JSON.stringify(err, null, 2));\n\t } else {\n\t console.log(\"Created table \" + tableUser.TableName + \". Table description JSON:\", JSON.stringify(data, null, 2));\n\t }\n\t});\t\n\n\tdb.createTable(tableLog, function(err, data) {\n\t if (err) {\n\t console.error(\"Unable to create table \" + tableLog.TableName + \". Error JSON:\", JSON.stringify(err, null, 2));\n\t } else {\n\t console.log(\"Created table \t\" + tableLog.TableName + \". Table description JSON:\", JSON.stringify(data, null, 2));\n\t }\n\t});\t\n}", "title": "" }, { "docid": "db8a2a88a7f7f068c23ee7c1845ab601", "score": "0.62632346", "text": "function setupDB() {\n // If there is no goods and services table yet, make on and initialize its product database with some items\n db.get(`SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='goodsServices_table'`, (err, row) => {\n if(row[\"COUNT(*)\"] == 0) {\n db.serialize(() => {\n console.log(\"Creating the goods and services table.\");\n db.run(`CREATE TABLE goodsServices_table(id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255) NOT NULL, price DECIMAL(6, 2) NOT NULL)`);\n db.run(`\n INSERT INTO\n goodsServices_table (name, price)\n VALUES\n (\"oil change\", 60.00),\n (\"fill tires with air\", 00.00),\n (\"tire rotation\", 30.00),\n (\"air filter\", 15.00),\n (\"car wash\", 20.00),\n (\"detailing\", 40.00),\n (\"air freshener\", 5.00)\n `);\n });\n }\n });\n\n // If there is no appointment schedule table yet, make one\n console.log(\"Creating the appointment schedule table if needed.\")\n db.run(`CREATE TABLE IF NOT EXISTS appointmentSchedule_table(id INTEGER PRIMARY KEY AUTOINCREMENT, timeslot DATETIME NOT NULL)`);\n\n // If there is no appointment services table yet, make one\n console.log(\"Creating the appointment services table if needed.\")\n db.run(`\n CREATE TABLE IF NOT EXISTS\n appointmentServices_table (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n appointmentID INTEGER NOT NULL,\n goodServiceID INTEGER NOT NULL,\n FOREIGN KEY (appointmentID) REFERENCES appointmentSchedule_table(id),\n FOREIGN KEY (goodServiceID) REFERENCES goodsServices_table(id)\n )\n `);\n}", "title": "" }, { "docid": "3ddce658be480cd83bd1506750ffbae3", "score": "0.6254314", "text": "function initializeDBs() \r\n{\r\n userDB = TAFFY();\r\n userDB.insert(userList);\r\n itemDB = TAFFY();\r\n itemDB.insert(itemList);\r\n msgDB = TAFFY();\r\n msgDB.insert(msgList);\r\n transDB = TAFFY();\r\n transDB.insert(transList);\r\n}", "title": "" }, { "docid": "235ce4ac17299883c13ffaf1d99f9b90", "score": "0.6253292", "text": "function databaseInitialize() {\r\n let kanban = db.getCollection(\"kanban\");\r\n let shortUrl = db.getCollection(\"shortUrl\");\r\n if (kanban === null) {\r\n console.log(\"new kanban\");\r\n kanban = db.addCollection(\"kanban\", {unique: ['name'] });\r\n }\r\n if (shortUrl === null) {\r\n console.log(\"new shortUrl\");\r\n shortUrl = db.addCollection(\"shortUrl\");\r\n }\r\n \r\n // kick off any program logic or start listening to external events\r\n runProgramLogic();\r\n }", "title": "" }, { "docid": "f9d5bc3838f299e9cf985d8bf5142904", "score": "0.6249763", "text": "create_database() {\r\n\r\n this.database.connect((err) => {\r\n var sql = `\r\n CREATE DATABASE IF NOT EXISTS heroku_375267c7e5b686b`;\r\n this.database.query(sql, (err, result) => {\r\n if (err) throw err;\r\n this.database.destroy()\r\n this.database = mysql.createConnection({\r\n host: \"us-cdbr-east-03.cleardb.com\",\r\n user: \"b73c03a81f5dd9\",\r\n password: \"47524521\",\r\n database: \"heroku_375267c7e5b686b\"\r\n });\r\n\r\n this.database.connect((err) => {\r\n if (err) throw err;\r\n console.log(\"Connected!\");\r\n this.createUserTable();\r\n this.createCompanyTable();\r\n })\r\n\r\n\r\n });\r\n })\r\n }", "title": "" }, { "docid": "946598b981c4513552b35dca3bb1675b", "score": "0.62401605", "text": "async function init () {\n await db.authenticate() // To check if connection is correctly established.\n await db.sync() // Update tables, but the schema changes are not applied, or use alter = true.\n // await task.sync() to sync specific tables\n\n // await db.sync({force: true}) /* Drops table and creates new one. Never use it in Prodn. */\n\n // await db.sync({alter: true}) \n /* Creates backup, and creates a new table and tries to bring\n backed up data into new table */\n \n}", "title": "" }, { "docid": "90261e15c3438381561a3383a2413a0d", "score": "0.6226906", "text": "function myDataBase( _name )\r\n{\r\n\tthis.databasename = 'ipcam';\r\n\tthis.tablename_config = 'configuration';\r\n\r\n\t/////////////////////////////////////////////////\r\n\tthis.revision = '1';\r\n}", "title": "" }, { "docid": "53fbdfb35c8861e8b5a501a851b1e3a5", "score": "0.6218453", "text": "function initWEBDB(){\n\t\t //alert(\"db init\");\n\t\t\tvar shortName = 'iSalesDB';\n\t\t\tvar version = '1.0';\n\t\t\tvar displayName = 'SalesDB';\n\t\t\tvar maxSize = 10 * 1024 * 1024; //Global Variable for the db size 10 MB\n\n\t\t\t\tlocalDB = window.openDatabase(shortName, version, displayName, maxSize);\n\t\t\t\n\t\t\t\n\t\t\t localDB.transaction(function(tx) {\n\n\t\t\t\ttx.executeSql('create table if not exists Customer' + \t \n\t\t\t\t'(id integer primary key autoincrement, CustId Integer, BillName TEXT, BillAddr1 TEXT, BillAddr2 TEXT, BillCity Text, BillState TEXT, BillZip TEXT, BillPhone TEXT, BillCell TEXT, BillEmail TEXT, ShipName TEXT, ShipAddr1 TEXT, ShipAddr2 TEXT, ShipCity TEXT, ShipState TEXT, ShipZip TEXT, SHIPPHONE TEXT, SHIPCELL TEXT, ServiceName TEXT )',[]); \n\t\t \n\t\t\t\t\n\t\t\t });\n\n\t\t}", "title": "" }, { "docid": "6aabf49ca8c919b49aa8a55b96982e6d", "score": "0.6212062", "text": "async init(){\n await this.db;\n await this.db.run(`CREATE TABLE IF NOT EXISTS ${this.tableName} (${this.primaryKey} ${this.primaryType} PRIMARY KEY)`);\n this.initiated = true;\n return this;\n }", "title": "" }, { "docid": "2cd4ee88363ceecf358bbfe4470b781a", "score": "0.6204365", "text": "function populateDB(tx) {\n\t\t\t\t//tx.executeSql('DROP TABLE IF EXISTS Pret');\n\t\t\t\ttx.executeSql('CREATE TABLE IF NOT EXISTS Pret (id_pret INTEGER PRIMARY KEY AUTOINCREMENT, Titre TEXT NOT NULL, Description TEXT NOT NULL, Date TEXT NOT NULL, Nom TEXT, Prenom TEXT, Type TEXT NOT NULL)');\n\t\t\t}", "title": "" }, { "docid": "78e83188953f706438878e147e420d59", "score": "0.6198841", "text": "onReady(fn) {\n\t\tthis._databaseCreation.then(fn);\n\t}", "title": "" }, { "docid": "8193fc426d58d5494f12c7ddee57647a", "score": "0.61892915", "text": "function initDatabase() {\n sceneDB.count({}, (_err, count) => {\n // console.log(\"Count: \" + String(count));\n if (count !== 1) {\n sceneDB.remove({}, { multi: true }, (_err, _numRemoved) => {\n sceneDB.insert({\n database_id: SCENES_ID,\n scenes: [],\n });\n });\n }\n });\n // printScenes(\"Init database\");\n}", "title": "" }, { "docid": "0f323eac333a7a64269bbded41bd39fc", "score": "0.61858624", "text": "async function initDb() {\n try {\n let dbNames = await db.listDatabases();\n let dbInfo;\n\n //get the db connection up and running\n if (dbNames.indexOf(DB_NAME) > -1) {\n db.useDatabase(DB_NAME);\n dbInfo = await db.get();\n } else {\n dbInfo = await db.createDatabase(DB_NAME);\n console.log(\"New database set up.\");\n }\n\n //check the collections are all there\n let collectionInfo = await db.listCollections();\n if (collectionInfo.length == 0) {\n let collections = await setUpCollections();\n collectionInfo = await db.listCollections();\n console.log(\"New collections set up.\");\n }\n\n console.log(\"Connected to database: \", dbInfo);\n } catch (err) {\n dbConnectionErrorHandler(err);\n }\n}", "title": "" }, { "docid": "86e8f26a5d9e6bf8b50e923d60c5cca5", "score": "0.61795574", "text": "function dbVersionUpgrade(evt) {\n\n // If the database was previously loaded, close it. \n // Closing the database keeps it from becoming blocked for later delete operations.\n if (SHFB.db) {\n SHFB.db.close();\n }\n SHFB.db = evt.target.result;\n\n // Get the version update transaction handle, since we want to create the schema as part of the same transaction.\n var txn = evt.target.transaction;\n\n // Create the calculator_applicants object store, with an index on the id\n if (evt.oldVersion != 1) {\n var calculatorStore = SHFB.db.createObjectStore(\"calculator_applicants\", { keyPath: \"id\", autoIncrement: true });\n calculatorStore.createIndex(\"name\", \"name\", { unique: false });\n calculatorStore.createIndex(\"date_created\", \"date_created\", { unique: false });\n }\n\n\n var applicationStore = SHFB.db.createObjectStore(\"calfresh_applicants\", { keyPath: \"id\", autoIncrement: true });\n applicationStore.createIndex(\"name\", \"name\", { unique: false });\n applicationStore.createIndex(\"ssid\", \"ssid\", { unique: true });\n applicationStore.createIndex(\"date_created\", \"date_created\", { unique: false });\n\n\n // Once the creation of the object stores is finished (they are created asynchronously), log success.\n txn.oncomplete = function () { console.log && console.log(\"Database schema created.\", \"sample\", \"status\"); };\n\n }", "title": "" }, { "docid": "b84f0c52f5d0fa410738a3fae2a15e07", "score": "0.6179315", "text": "function initiateDatabase() {\r\n User.sync({ force: false }).then(() => {\r\n });\r\n Feedback.sync({ force: false }).then(() => {\r\n // Table created\r\n console.log(\"Table created\");\r\n });\r\n User.hasOne(Feedback);\r\n}", "title": "" }, { "docid": "b6a6d1756526a69eec71690b1491b4a8", "score": "0.6166345", "text": "function databaseInitialize() {\n var lastfileplayed = db.getCollection('lastfileplayed');\n\n if (lastfileplayed == null) {\n\tconsole.log(\"[TWITCHBOT EVENT] No DB Collection created yet.\");\n\tlastfileplayed = db.addCollection('lastfileplayed');\n\t\n\tdb.saveDatabase(function(err) {\n\t\tif (err) {\n\t\t console.log(err);\n\t\t}\n\t\telse {\n\t\t console.log(\"[TWITCHBOT EVENT] DB Collection saved in DB Initialisation\");\n\t\t}\n\t});\n\t\n } else {\n\t \n\tconsole.log(\"[TWITCHBOT EVENT] DB Collection already created.\");\n\t\n }\n \n main();\n}", "title": "" }, { "docid": "5b79c6221d4d4d68b99af2cb68518002", "score": "0.6159588", "text": "function create() {\n database.create('mongohq', name, function create(err, result) {\n if (err) return error(err);\n setup(result);\n });\n }", "title": "" }, { "docid": "cdb1f0d11cbb60529e7e3a7cdc5ee294", "score": "0.61472535", "text": "async function setUpDatabase() {\n\tlet database = await findTikTokDatabase(false);\n\tif (!database.id || database.status == 'TERMINATING') {\n\t\tlet db = createDB();\n\t\tdatabase = await findTikTokDatabase(true);\n\t} else {\n\t\tconsole.log(chalk.green('Found existing tiktok database'));\n\t}\n\n\tdbID = database.id;\n\n\tif (database.status != 'ACTIVE') {\n\t\tconsole.log(chalk.green(' Current status is ' + database.status));\n\n\t\tconst astraClient = await astraRest.createClient({\n\t\t\tapplicationToken: process.env.ASTRA_DB_ADMIN_TOKEN,\n\t\t\tbaseUrl: 'https://api.astra.datastax.com',\n\t\t});\n\t\tlet dbActive = await requestWithRetry(astraClient, '/v2/databases/' + dbID);\n\t\tconsole.log(chalk.yellow(' Database is now ACTIVE'));\n\t}\n\n\t// Check for the keyspace\n\tconsole.log(chalk.green('Checking for classes keyspace'));\n\n\tconst astraClient = await astraRest.createClient({\n\t\tapplicationToken: process.env.ASTRA_DB_ADMIN_TOKEN,\n\t\tbaseUrl: 'https://api.astra.datastax.com',\n\t});\n\tresponse = await astraClient.get('/v2/databases/' + dbID);\n\tif (response.data.info.keyspaces.indexOf('classes') != -1) {\n\t\tconsole.log(chalk.green(' Classes keyspace found'));\n\t\treturn dbID;\n\t} else {\n\t\tresponse = await astraClient.post('/v2/databases/' + dbID + '/keyspaces/classes');\n\t\tconsole.log(chalk.yellow(' Created new classes keyspace'));\n\t\treturn dbID;\n\t}\n}", "title": "" }, { "docid": "cd888c4b844b99d84459492a10f77071", "score": "0.614412", "text": "function recreateDatabase(db, callback) {\n async.waterfall([\n (callback) => {\n deleteDatabase(db, callback)\n },\n function (callback) {\n init(callback)\n }\n ], function (err, db) {\n if (err) {\n log.error(err.message)\n }\n callback(err, db)\n })\n}", "title": "" }, { "docid": "6c3167b7236d5f8298c1ea866ab0daf6", "score": "0.6114164", "text": "static async createDatabase () {\r\n try {\r\n if ('indexedDB' in window) {\r\n // Create IndexedDB\r\n const db = await idb.open('udacity-google-mws-idb', 1, upgradeDb => {\r\n upgradeDb.createObjectStore('restaurants', {keypath: 'id'})\r\n upgradeDb.createObjectStore('reviews', {autoincrement: true})\r\n })\r\n // Store restaurant JSON in IndexedDB\r\n const restaurantsQuery = fetch(DBHelper.DATABASE_URL)\r\n const restaurants = await (await restaurantsQuery).json()\r\n restaurants.forEach(async restaurant => {\r\n const tx = db.transaction('restaurants', 'readwrite')\r\n const store = tx.objectStore('restaurants')\r\n await store.put(restaurant, restaurant.id)\r\n })\r\n // Store reviews JSON in IndexedDB\r\n const reviewsQuery = fetch(DBHelper.DATABASE_URL_REVIEWS)\r\n const reviews = await (await reviewsQuery).json()\r\n reviews.forEach(async review => {\r\n const tx = db.transaction('reviews', 'readwrite')\r\n const store = tx.objectStore('reviews')\r\n await store.put(review, review.id)\r\n })\r\n } else {\r\n console.warn('IndexedDB not available.')\r\n }\r\n } catch (e) {\r\n throw Error(e)\r\n }\r\n }", "title": "" }, { "docid": "9069ea04a649cbda392cf9d68c385d08", "score": "0.61128753", "text": "function runDataBase() {\n fs.writeFile(\"db/db.json\", JSON.stringify(noteInformation, '\\t'), err => {\n if (err) throw err;\n return true;\n });\n }", "title": "" }, { "docid": "b96fcb7893b5da95671a85acdb154359", "score": "0.61122906", "text": "function createDatabase(callback) {\n try {\n mkdirs(datadir)\n } catch (e) {\n return callback(e);\n }\n async.waterfall([\n (callback) => {\n // Create the database file.\n const db = new sqlite3.Database(dbfile, function (err) {\n callback(err, dbwrapper(db))\n })\n },\n (db, callback) => {\n // Read the SQL file.\n fs.readFile(sqlfile, 'utf8', function (err, sql) {\n if (err) {\n callback(err)\n } else {\n callback(null, db, sql)\n }\n })\n },\n (db, sql, callback) => {\n // Run the code in the SQL file.\n db.exec(sql, function (err) {\n callback(err, db)\n })\n },\n (db, callback) => {\n // Write the application version into the database.\n _getCurrentVersion(version => {\n db.updateAppVersion(version, err => {\n callback(err, db)\n })\n })\n }\n ], (err, db) => {\n if (err) return callback(err)\n log.info(`Created database '${dbfile}'`)\n db.created = true\n callback(null, db)\n })\n}", "title": "" }, { "docid": "7af1a7f985dcfb59869a086dbae3a666", "score": "0.610875", "text": "function openDb() {\n db = openDatabase(shortName, version, displayName, maxSize);\n}", "title": "" }, { "docid": "bbf459c1f4cc5d8da65d04dee1527a47", "score": "0.60711116", "text": "function onBodyLoad() {\n document.addEventListener(\"deviceready\", onDeviceReady, false);\n //alert(\"DEBUGGING: we are in the onBodyLoad() function\"); \n\n if (!window.openDatabase) {\n alert('Databases are not supported in this browser.');\n return;\n }\n\n db = window.openDatabase(shortName, version, displayName, maxSize);\n queryDB();\n\n // this line will try to create the table User in the database just created/openned \n db.transaction(function(tx) {\n //tx.executeSql( 'CREATE TABLE IF NOT EXISTS Config(serverId INTEGER NOT NULL PRIMARY KEY, serverText TEXT NOT NULL)',[],nullHandler,errorHandler);\n tx.executeSql('CREATE TABLE IF NOT EXISTS Config(serverId INTEGER NOT NULL PRIMARY KEY, serverText TEXT NOT NULL)', [], nullHandler, errorHandler);\n }, errorHandler, successCallBack);\n //alert('DB Created!');\n}", "title": "" }, { "docid": "f2a49eceefe22b89c37748dbbad37d21", "score": "0.604942", "text": "function create_db(tx) {\n tx.executeSql('CREATE TABLE task ( `id` int(11) NOT NULL, `name` text NOT NULL, `date` date NOT NULL, `time` time NOT NULL)'); \n}", "title": "" }, { "docid": "73fa83d2033d30cec593cdf5ea4b743a", "score": "0.60478103", "text": "function init() {\n if (!fs.existsSync(dbDirectory)) {\n fs.mkdirSync(dbDirectory);\n }\n}", "title": "" }, { "docid": "304f80363418634df9baf644e7dd1f40", "score": "0.60364515", "text": "function Database() {\n if (!this.isInstantiated) {\n this.storage = new nativescript_couchbase_1.Couchbase(\"caregiver\");\n this.createViews();\n this.isInstantiated = true;\n }\n }", "title": "" }, { "docid": "f2e44810b27546451d0a2656087e146b", "score": "0.60296625", "text": "autoConnectToDb() {}", "title": "" }, { "docid": "dcbb7fd9254c3fd7bf6df7b5f4ef4d7d", "score": "0.60296315", "text": "function dbInitialization()\n{\n\tvar database = appDB();\n\n\tdatabase.init\n\t(\n\t\tfunction() \n\t\t{ \n\t\t\tdatabase.onEventPopulateInitialData\n\t\t\t(\n\t\t\t\tfunction(){appSession().reloadAllData();}\n\t\t\t);\n\n\t\t\tdatabase.populateInitialData();\n\t\t},\n\t\tfunction() \n\t\t{ \n\t\t\tappLog(\"dbInitialization, error callback\");\n\t\t}\n\t);\n\n\n}", "title": "" }, { "docid": "d2feacf57a094fa20a4868060c7a2018", "score": "0.6025104", "text": "async function initDB() {\n await Group.sync({force: true});\n await User.sync({force: true});\n await GroupUser.sync({force: true});\n\n await Article.sync({force: true});\n await Moment.sync({force: true});\n await Comment.sync({force: true});\n await Song.sync({force: true});\n \n // table created, then init data for tables\n const group = await Group.create({\n name: 'group-01',\n });\n const user = await User.create({\n name: 'princess310',\n password: '123456',\n });\n const groupUser = await user.addGroup(group);\n\n\n // show the log info\n console.log('\\x1b[36m'); //cyan\n console.log('----------- db init success --------------');\n console.log('user: %s', user.name);\n console.log('group: %s', group.name);\n console.log('group user: { groupId: %s, userId: %s }', group.id, user.id);\n console.log('----------- /db init success --------------');\n console.log('\\x1b[0m');\n\n \n process.exit(0);\n}", "title": "" }, { "docid": "2120ca258e91cf834a23a94a06c8ae72", "score": "0.6024971", "text": "function createDb(tx) {\n // Notes\n // Multimedia attachments will probably need to be stored outside the DB\n // due to HTML 5 limitations on the DB size (3 MB or so?)\n tx.executeSql(\"CREATE TABLE IF NOT EXISTS notes (\" + \"id INTEGER PRIMARY KEY AUTOINCREMENT,\" + \"title TEXT,\"\n + \"body TEXT,\" + \"favorite INTEGER,\" + \"modified INTEGER NOT NULL,\" + \"tags_modified INTEGER)\");\n\n // Tags\n tx.executeSql(\"CREATE TABLE IF NOT EXISTS tags (\" + \"id INTEGER PRIMARY KEY AUTOINCREMENT,\"\n + \"name TEXT NOT NULL UNIQUE,\" + \"modified INTEGER NOT NULL)\");\n\n // Notes-tags M:N association\n tx.executeSql(\"CREATE TABLE IF NOT EXISTS notes_tags (\" + \"note_id INTEGER,\" + \"tag_id INTEGER,\"\n + \"FOREIGN KEY(note_id) REFERENCES notes(id),\" + \"FOREIGN KEY(tag_id) REFERENCES tags(id),\"\n + \"CONSTRAINT unq_notes_tags UNIQUE (note_id, tag_id))\");\n }", "title": "" }, { "docid": "bbfa1decdc03ad83859239008deb89dc", "score": "0.60222024", "text": "function createDataDB(){\n db.run('CREATE TABLE IF NOT EXISTS detail('\n +'aid TEXT PRIMARY KEY'\n +', tid INTEGER'\n +', tname TEXT'\n +', title TEXT'\n +', author TEXT'\n +', view INTEGER'\n +', danmku INTEGER'\n +', favorite INTEGER'\n +', coin INTEGER)')\n}", "title": "" }, { "docid": "04cf803710f42a9227bb93c03d1cd2d7", "score": "0.6020686", "text": "constructor() {\n\t this.name = \"localdb\";\n\t this.year = 2015;\n\t this.author = \"H. Miranda\";\n\t this.url = \"http://henriquemiranda.github.io/\";\n\t }", "title": "" }, { "docid": "94bd9213a7076a0cdafc94018cdd7d46", "score": "0.6012328", "text": "function createDBStructure() { \n\n if (!window.openDatabase) { \n // not all mobile devices support databases if it does not, the following alert will display \n // indicating the device will not be albe to run this application \n alert('Databases are not supported in this browser.'); \n return; \n } \n\n // this line will try to create the table User in the database just created/openned\n db.transaction(function (tx) {\n\n // tx.executeSql('DROP TABLE Quiz');\n // tx.executeSql('DROP TABLE Deck2');\n // tx.executeSql('DROP TABLE Deck');\n // tx.executeSql('DROP TABLE Card');\n // tx.executeSql('DROP TABLE Answer');\n // tx.executeSql('DROP TABLE User');\n\n // Deck table\n tx.executeSql('CREATE TABLE IF NOT EXISTS Deck(DeckId GUID NOT NULL PRIMARY KEY, Name TEXT, CreatedDate DATETIME, CreatedBy GUID, ' + \n ' IsFavorite BOOL, UploadedDate DATETIME)',\n [], nullHandler, errorHandler);\n\n // Card table\n tx.executeSql('CREATE TABLE IF NOT EXISTS Card(CardId GUID NOT NULL, DeckId GUID NOT NULL, ' +\n 'Question TEXT NULLABLE, ImageUrl TEXT NULLABLE, TypeId INTEGER NOT NULL, ' +\n 'Asked INTEGER, CorrectlyAnswered INTEGER, Priority INTEGER' +\n ', constraint PK_Card primary key (CardId, DeckId))',\n [], nullHandler, errorHandler);\n\n // Answer table\n tx.executeSql('CREATE TABLE IF NOT EXISTS Answer(AnswerId INTEGER NOT NULL, CardId GUID NOT NULL, ' +\n 'Text TEXT, IsCorrect BOOL, TypeId INTEGER' +\n ', constraint PK_Card primary key (AnswerId, CardId))',\n [], nullHandler, errorHandler);\n\n // Quiz table\n tx.executeSql('CREATE TABLE IF NOT EXISTS Quiz(QuizId GUID NOT NULL, DeckId GUID NOT NULL, ' +\n 'TakenTime DATETIME NOT NULL, Cards INTEGER, CorrectAnswers INTEGER' +\n ', constraint PK_Card primary key (QuizId))',\n [], nullHandler, errorHandler);\n\n // User table\n tx.executeSql('CREATE TABLE IF NOT EXISTS User(UserId GUID NOT NULL, Name TEXT NOT NULL, Password TEXT, ' +\n 'Email TEXT, CreatedDate DATETIME, Gender BOOL' +\n ', constraint PK_Card primary key (UserId))',\n [], nullHandler, errorHandler);\n\n // Alterations\n// tx.executeSql('ALTER TABLE Deck ADD IsFavorite BOOL', [], nullHandler, errorHandler);\n// tx.executeSql('ALTER TABLE Deck ADD UploadedDate DATETIME', [], nullHandler, errorHandler);\n// tx.executeSql('ALTER TABLE Card ADD Priority INTEGER', [], nullHandler, errorHandler);\n }\n , errorHandler\n , successCallBack); \n}", "title": "" }, { "docid": "444cf643ed2e82c91b8391ccdd616a23", "score": "0.60039073", "text": "function createTable() \n {\n var openDB = getopenDb();\n if(!openDB)\n { \n return;\n }\n else\n {\n db = openDB('vcelulares', '1.0', 'my db', 2*1024*1024);\n db.transaction(function (t) { \n t.executeSql('CREATE TABLE IF NOT EXISTS tablaA(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, descripcion TEXT NOT NULL, activo INT NOT NULL, codigoA INT NOT NULL, codigoB INT NULL);', [], null, null); \n t.executeSql('CREATE TABLE IF NOT EXISTS tablaB(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, descripcion TEXT NOT NULL, activo INT NOT NULL, codigoA INT NULL, codigoB INT NOT NULL);', [], null, null); \n });\n return db; \n } \n }", "title": "" }, { "docid": "b7161dc2ad9f9f06a03f1849ba14a5f1", "score": "0.60016865", "text": "function DatabaseManager(){}", "title": "" }, { "docid": "5d028b0f5f14849013a253fa78fe831c", "score": "0.5996175", "text": "async function initJsStore() {\r\n var database = getDbSchema();\r\n const isDbCreated = await connection.initDb(database);\r\n if (isDbCreated === true) {\r\n console.log(\"db created\");\r\n // here you can prefill database with some data\r\n } else {\r\n console.log(\"db opened\");\r\n }\r\n\r\n}", "title": "" }, { "docid": "89b05dc080162d39d6f4ea68c130e8bb", "score": "0.5988502", "text": "function nuevoJuego() {\r\n\tdb = openDatabase(namedatabase, dbversion, displayName, 50 * 1024);\t\r\n\t\t\t\r\n\t db.transaction(function (ax) {\r\n\t ax.executeSql('DROP TABLE RESPUESTAU', []);\r\n\t ax.executeSql('DROP TABLE RANDOM', []);\r\n\t ax.executeSql('CREATE TABLE RANDOM (id integer primary key autoincrement, idrandom int)');\r\n\t location.href = 'index.html';\r\n\t });\r\n\t}", "title": "" }, { "docid": "89f3150a1f80a0ea4fc67eba713d0164", "score": "0.5985864", "text": "function _setupWorkersDB(cb){\n console.log(\"in _setupWorkersDB\");\n var wdb_path = settings.DATABASE[\"workers\"];\n var exists = path.existsSync(wdb_path);\n \n wdb = new sqlite3.Database(wdb_path);\n if(exists){\n // Purge the old database entries\n wdb.run(\"DELETE FROM WORKERS\", function(err){\n if(err){\n console.log(\"Error deleting from table: \", util.inspect(err));\n cb(err);\n return;\n }\n insert_workers(cb);\n });\n }else{\n // Or create the workers table.\n var sql = \"CREATE TABLE WORKERS(ADDR VARCHAR(20), PORT INT, STATUS INT, \"\n + \"PRIMARY KEY(ADDR, PORT))\";\n wdb.run(sql, function(err){\n if(err){\n console.log(\"error creating wtable\", util.inspect(err));\n cb(err);\n return;\n }\n insert_workers(cb);\n });\n } \n }", "title": "" }, { "docid": "31d0bd5e6518c9b53484f028043f7395", "score": "0.5983294", "text": "function initDB() {\n \n if(config.seedDB) {\n require('./seed');\n }\n}", "title": "" }, { "docid": "cdbd4a78a9d0326f6526293a6caf3c92", "score": "0.5980004", "text": "function QMDatabase(appName, version) {\n this.migrating = false\n //Tables to handle version control\n this.conn = Sql.LocalStorage.openDatabaseSync(appName + '_db', \"\",\n appName, 100000)\n\n // to control metadata (__DbVersion__) changes only\n var DbVersion\n var newMetaVersion = \"1.1\"\n\n if (this.conn.version !== newMetaVersion) {\n this.conn = this.conn.changeVersion(this.conn.version, newMetaVersion,\n (function (tx) {\n this.tx = tx\n console.log(\"Metadata version changed from\",\n this.conn.version,\n \"to\",\n newMetaVersion)\n this.migrating = true\n DbVersion = this._defineDbVersion(\n this)\n this.tx = null\n }).bind(this))\n } else {\n DbVersion = this._defineDbVersion(this)\n }\n\n this.dbVersion = DbVersion.filterOne()\n\n if (this.dbVersion) {\n if (this.dbVersion.version !== version) {\n console.log(\"Migrating db\", this.dbVersion.version, \"=>\", version)\n this.dbVersion.version = version\n this.dbVersion.migrated = 0\n this.dbVersion.save()\n this.migrating = true\n }\n } else {\n console.log(\"Creating db \", version)\n this.dbVersion = DbVersion.create({\n \"version\": version,\n \"migrated\": 0\n })\n this.migrating = true\n }\n}", "title": "" }, { "docid": "ac2c6d98c1272f66ab2b03bfa7271c59", "score": "0.59640634", "text": "async _createDatabase(client) {\n var error, msg;\n try {\n // check database existence\n return (await client.queryAsync(`USE \\`${this._database}\\``));\n } catch (error1) {\n error = error1;\n if (error.code === 'ER_BAD_DB_ERROR') {\n try {\n await client.queryAsync(`CREATE DATABASE \\`${this._database}\\``);\n } catch (error1) {\n error = error1;\n throw MySQLAdapter.wrapError('unknown error', error);\n }\n return (await this._createDatabase(client));\n } else {\n msg = error.code === 'ER_DBACCESS_DENIED_ERROR' ? `no access right to the database '${this._database}'` : 'unknown error';\n throw MySQLAdapter.wrapError(msg, error);\n }\n }\n }", "title": "" }, { "docid": "520b8dc93002303f58a04a8e3527fb35", "score": "0.5958074", "text": "function initDB() {\n let models = require('./database/models');\n\n models.sequelize.sync().then(function () {\n console.log('Models was synced!');\n });\n }", "title": "" }, { "docid": "e8c08f35d8ef4b23606c5b06843e5458", "score": "0.59561855", "text": "function dbAdd({table}) {\n\n}", "title": "" }, { "docid": "aad7782b7311714d580f5e75b1413725", "score": "0.59556293", "text": "function startup() {\n\n\t\tloadDatabaseData();\n\t\t\n\t \t\n\t\t} //end of function", "title": "" }, { "docid": "1e181f50b920fad039aa5a59c08809e1", "score": "0.59552836", "text": "initDatabase(){\n const emptyObject = {};\n const emptyArray = [];\n localStorage.setObject(\"users\", emptyObject);\n localStorage.setObject(\"aparts\", emptyObject);\n localStorage.setObject(\"usersToAparts\", emptyObject);\n localStorage.setObject(\"todos\", emptyArray);\n }", "title": "" } ]
73752adc76e14d8cdca3a5736a6d5c0b
import as activations from '/js/activations.js';
[ { "docid": "b0863db00c298ebedb876ffd97fe477e", "score": "0.0", "text": "function sigmoid(x, derivative = false) { \r\n let fx = 1 / (1 + math.exp(-x)); \r\n if (derivative) \r\n return fx * (1 - fx); \r\n return fx; \r\n}", "title": "" } ]
[ { "docid": "4a5949b8a035a6757c8e587a831313e6", "score": "0.5940324", "text": "import() {}", "title": "" }, { "docid": "0da6f1ec1b2fe451b3ec067e4b719869", "score": "0.5710849", "text": "get Bookcase() { return require('./Bookcase.js'); }", "title": "" }, { "docid": "c1a6bffa5f51d04944ca71fa0bd73a2f", "score": "0.56882834", "text": "function importAll() {\n requireDir = require('require-dir');\n lib_js = requireDir('./js');\n console.log('import js scripts from client.js')\n}", "title": "" }, { "docid": "96dad832d9991d80bed710c4704adbc2", "score": "0.54767483", "text": "export() {}", "title": "" }, { "docid": "b91996942031b3f8b38ceb97df22b422", "score": "0.5399075", "text": "insertJs() {\n [\n 'js/Rx-5.5.12.js',\n 'js/react.development.js',\n 'js/react-dom.development.js',\n 'js/babel-6.26.0.js',\n 'js/typescript/typescript.js',\n 'https://unpkg.com/[email protected]/bundles/rxjs.umd.min.js',\n 'https://unpkg.com/[email protected]/bundles/rxjs.umd.js'\n ].forEach(function (src) {\n var script = document.createElement('script');\n script.src = src;\n // script.async = false;\n preview.head.appendChild(script);\n });\n }", "title": "" }, { "docid": "16670dabdff8d3b67d3a76533890a6b8", "score": "0.5385116", "text": "function importScripts() {\n for (var i = 0; i < arguments.length; i++) {\n document.getElementsByTagName(\"head\")[0].appendChild(\n newNode('script', {\n src: builder.urlFor(\"js/\" + arguments[i]),\n type: \"text/javascript\"\n }));\n }\n }", "title": "" }, { "docid": "470681f23325be0a9f473b295cd4e5c7", "score": "0.5304273", "text": "function loader (src) {\nconst returnModule = `\nlet exports = {};\nimport * as Comlink from 'comlink';\n${src}\nComlink.expose(exports);\n`\nreturn returnModule;\n}", "title": "" }, { "docid": "1a1459bb63b69393d57e408016762f66", "score": "0.5251144", "text": "import () {\n this.dispatch(Keys.import)\n }", "title": "" }, { "docid": "2a8a2c42ef9a64c51ed950853dbafee3", "score": "0.52410924", "text": "function activate() {\n // Register the M034Component as a role in Compass\n //\n // Available roles are:\n // - Instance.Tab\n // - Database.Tab\n // - Collection.Tab\n // - CollectionHUD.Item\n // - Header.Item\n\n global.hadronApp.appRegistry.registerRole('Collection.Tab', ROLE);\n global.hadronApp.appRegistry.registerAction('M034.Actions', M034Actions);\n global.hadronApp.appRegistry.registerStore('M034.Store', M034Store);\n}", "title": "" }, { "docid": "c9febb0f280fdf3ed6b6395b3dac5ff4", "score": "0.519951", "text": "function mtbImport(file){\n\tif(file == FILE_PROFILE_JS){\n\t\tif(!LOADED_PROFILE_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_PROFILE_JS = true;\n\t\t}\n\t} else if(file == FILE_STARS_SCROLL_JS){\n\t\tif(!LOADED_STARS_SCROLL_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_STARS_SCROLL_JS = true;\n\t\t}\n\t} else if(file == FILE_TOP_SELECTION_JS){\n\t\tif(!LOADED_TOP_SELECTION_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_TOP_SELECTION_JS = true;\n\t\t}\n\t} else if(file == FILE_SETTINGS_JS){\n\t\tif(!LOADED_SETTINGS_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_SETTINGS_JS = true;\n\t\t}\n\t} else if(file == FILE_TIPS_JS){\n\t\tif(!LOADED_TIPS_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_TIPS_JS = true;\n\t\t}\n\t} else if(file == FILE_SIGNIN_JS){\n\t\tif(!LOADED_SIGNIN_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_SIGNIN_JS = true;\n\t\t}\n\t} else if(file == FILE_CATEGORIES_JS){\n\t\tif(!LOADED_CATEGORIES_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_CATEGORIES_JS = true;\n\t\t}\n\t} else if(file == FILE_LOADER_JS){\n\t\tif(!LOADED_LOADER_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_LOADER_JS = true;\n\t\t}\n\t} else if(file == FILE_QUESTION_JS){\n\t\tif(!LOADED_QUESTION_JS){\n\t\t\tTi.include(file);\n\t\t\tLOADED_QUESTION_JS = true;\n\t\t}\n\t} else if(file == FILE_TOP_VIEW_JS){\n\t\tif(!LOADED_TOP_VIEW_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_TOP_VIEW_JS = true;\n\t\t}\n\t} else if(file == FILE_INVITE_JS){\n\t\tif(!LOADED_INVITE_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_INVITE_JS = true;\n\t\t}\n\t} else if(file == FILE_STARS_DETAILS_JS){\n\t\tif(!LOADED_STARS_DETAILS_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_STARS_DETAILS_JS = true;\n\t\t}\n\t} else if(file == FILE_AWARD_BADGE_JS){\n\t\tif(!LOADED_AWARD_BADGE_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_AWARD_BADGE_JS = true;\n\t\t}\n\t} else if(file == FILE_FEEDBACK_JS){\n\t\tif(!LOADED_FEEDBACK_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_FEEDBACK_JS = true;\n\t\t}\n\t} else if(file == FILE_TIPS_DETAILS_JS){\n\t\tif(!LOADED_TIPS_DETAILS_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_TIPS_DETAILS_JS = true;\n\t\t}\n\t} else if(file == FILE_ABOUT_CREDITS_JS){\n\t\tif(!LOADED_ABOUT_CREDITS_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_ABOUT_CREDITS_JS = true;\n\t\t}\n\t} else if(file == FILE_GAME_SELECTION_JS){\n\t\tif(!LOADED_GAME_SELECTION_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_GAME_SELECTION_JS = true;\n\t\t}\n\t} else if(file == FILE_GROUP_SELECTION_JS){\n\t\tif(!LOADED_GROUP_SELECTION_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_GROUP_SELECTION_JS = true;\n\t\t}\n\t} else if(file == FILE_GROUP_PLAYER_SELECTION_JS){\n\t\tif(!LOADED_GROUP_PLAYER_SELECTION_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_GROUP_PLAYER_SELECTION_JS = true;\n\t\t}\n\t} else if(file == FILE_PLAYER_NAMES_SELECTION_JS){\n\t\tif(!LOADED_PLAYER_NAMES_SELECTION_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_PLAYER_NAMES_SELECTION_JS = true;\n\t\t}\n\t} else if(file == FILE_QUESTION_NEXT_JS) {\n\t\tif(!LOADED_QUESTION_NEXT_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_QUESTION_NEXT_JS = true;\n\t\t}\n\t} else if(file == FILE_QUESTION_REPORT_JS) {\n\t\tif(!LOADED_QUESTION_REPORT_JS){\n\t\t\tTi.include(BUZZ_PATH+file);\n\t\t\tLOADED_QUESTION_REPORT_JS = true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "6d704de7750195790657da317348cf7f", "score": "0.51915514", "text": "get Import() {}", "title": "" }, { "docid": "6e6fce3542c36e980c63f97cde53bb4d", "score": "0.51849496", "text": "function importScript(src) {\n document.write('<script src=\"' + src + '\" ></script>')\n}", "title": "" }, { "docid": "a449934cc319c24770745f2aaebe7449", "score": "0.51759106", "text": "function main() {\n // require('./scripts/auxilaryFunctions.js');\n // require('./scripts/objects.js');\n // import './scripts/activate.js';\n require('./scripts/testing.js');\n\n require('./scripts/index.js');\n\n // require('@jscad/web/min.css');\n //let gProcessor = require('./scripts/cad');\n\n require('./scripts/draw-model');\n }", "title": "" }, { "docid": "96f95aba5bbda6851b2b45bce5aadfa3", "score": "0.5172493", "text": "function loadJS() {\n const files = glob.sync(path.join(__dirname, 'main-process/*.js'));\n files.forEach((file) => {\n require(file);\n });\n}", "title": "" }, { "docid": "ee3ec2f807b4b0c84e5bac54aca4ce46", "score": "0.51577836", "text": "function jsTask(){\n return src(files.jsPath)\n .pipe(sourcemaps.init())\n .pipe(babel({\n presets: ['@babel/preset-env']\n }))\n .pipe(concat('scripts.js'))\n .pipe(sourcemaps.write(\"/.\"))\n .pipe(dest('pub/js'));\n}", "title": "" }, { "docid": "a2e120573bd7a4ddd713bc31d84fab55", "score": "0.5145075", "text": "function autoJsModule() {\n // Is the pageJS variable declared in your route vars? Load it.\n if (typeof pageJs !== 'undefined') {\n // Require the module via webpack's dynamic context module\n const pageModule = require(`./pages/${pageJs}`);\n // Does the module have an init()? Run it, w/ config included.\n if (pageModule && typeof pageModule.init === 'function') {\n pageModule.init(config);\n }\n }\n}", "title": "" }, { "docid": "a2e120573bd7a4ddd713bc31d84fab55", "score": "0.5145075", "text": "function autoJsModule() {\n // Is the pageJS variable declared in your route vars? Load it.\n if (typeof pageJs !== 'undefined') {\n // Require the module via webpack's dynamic context module\n const pageModule = require(`./pages/${pageJs}`);\n // Does the module have an init()? Run it, w/ config included.\n if (pageModule && typeof pageModule.init === 'function') {\n pageModule.init(config);\n }\n }\n}", "title": "" }, { "docid": "06296c009858174dc96f61a76f8aa056", "score": "0.5142137", "text": "require() {}", "title": "" }, { "docid": "7de4018edfad3c4efa6eb529368ba0e5", "score": "0.5117785", "text": "function jsFrameworks () {\r\n return registerforActivities('#js-frameworks', '#express');\r\n}", "title": "" }, { "docid": "e8f9155acb36071244f5852b09a10939", "score": "0.5081525", "text": "function js() {\n return src([\n 'node_modules/jquery/dist/jquery.min.js',\n 'node_modules/bootstrap/dist/js/bootstrap.bundle.min.js',\n 'node_modules/owl.carousel2/dist/owl.carousel.min.js',\n 'node_modules/wowjs/dist/wow.min.js',\n 'node_modules/jquery-waypoints/waypoints.min.js',\n 'node_modules/counterup/jquery.counterup.min.js',\n 'node_modules/jquery.easing/jquery.easing.min.js',\n 'node_modules/jquery-countdown/dist/jquery.countdown.min.js',\n 'node_modules/datatables.net/js/jquery.dataTables.min.js',\n 'node_modules/imagesloaded/imagesloaded.pkgd.min.js',\n 'node_modules/apexcharts/dist/apexcharts.min.js',\n 'node_modules/magnific-popup/dist/jquery.magnific-popup.min.js',\n 'node_modules/isotope-layout/dist/isotope.pkgd.min.js',\n 'node_modules/ion-rangeslider/js/ion.rangeSlider.min.js'\n ])\n .pipe(dest('dist/js'));\n}", "title": "" }, { "docid": "094395b7b624c9136235fd1581722629", "score": "0.5073499", "text": "js ( file_path ) {\n return `<script src=\"${this.path(file_path)}\" type=\"application/javascript\"></script>`\n }", "title": "" }, { "docid": "ac3f209079e255b139dbd6561be8c72d", "score": "0.50651443", "text": "function javascript() {\n return gulp.src(PATHS.javascript)\n .pipe($.sourcemaps.init())\n .pipe($.babel({ignore: ['what-input.js','pikaday.js','pikaday-package.js','moment.js']}))\n .pipe($.concat('app.js'))\n .pipe($.if(PRODUCTION, $.uglify()\n .on('error', function(e) { console.log(e) })))\n .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest('assets/js'));\n}", "title": "" }, { "docid": "aaacbf4fbe6c7112f7770d57c3fee4ae", "score": "0.50539666", "text": "function loadScript() {\n require(\"./game.js\");\n}", "title": "" }, { "docid": "772057421fa9cd3a689ad5ff03775c84", "score": "0.5051938", "text": "function jsTask(){\n return src(files.jsPath)\n .pipe(babel({\n presets: ['@babel/preset-env']\n }))\n .pipe(concat('good-share.min.js'))\n .pipe(terser()) //uglify\n .pipe(dest('dist')\n );\n}", "title": "" }, { "docid": "9599ac9d698b097233d01b417e4780f0", "score": "0.50401413", "text": "function loadJSX() {\n var csInterface = new CSInterface();\n var extensionRoot = csInterface.getSystemPath(SystemPath.EXTENSION) + \"/jsx/\";\n csInterface.evalScript('$._ext.evalFiles(\"' + extensionRoot + '\")');\n}", "title": "" }, { "docid": "fe1f23676ea9365501fe7a24c483e79c", "score": "0.5035115", "text": "function require() { }", "title": "" }, { "docid": "b3f14fe8f73206cd2d47b2f0a445a758", "score": "0.50306857", "text": "function dist_javascript() {\n return src('WFOTool_ui/src/dev/**/*.js')\n .pipe(babel({\n presets: ['@babel/preset-env']\n }))\n //\n .pipe(replace(localurl, function () {\n return disturl\n }))\n .pipe(dest('WFOTool_ui/src/dist/'))\n}", "title": "" }, { "docid": "a3ec5c51a15fb69319ba0811db73087e", "score": "0.4984673", "text": "loadContentScript() {\n chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {\n // pulled from node_modules by kyt.config into build directory\n chrome.tabs.executeScript(tabs[0].id, { file: 'web-vitals.umd.js' });\n // static file in src/public\n chrome.tabs.executeScript(tabs[0].id, { file: 'lodash.debounce-throttle.js' });\n // static file in src/public\n chrome.tabs.executeScript(tabs[0].id, { file: 'contentScript.js' });\n // static file in src/public\n chrome.tabs.insertCSS(tabs[0].id, { file: 'contentScript.css' }, () => {\n chrome.tabs.sendMessage(tabs[0].id, { getCoreVitals: true });\n });\n });\n }", "title": "" }, { "docid": "39b7fe5cb3446f46dcc468bebca71753", "score": "0.49732777", "text": "function dev_javascript() {\n return src('WFOTool_ui/src/dev/**/*.js')\n .pipe(babel({\n presets: ['@babel/preset-env']\n }))\n //\n .pipe(replace(localurl, function () {\n return devurl\n }))\n .pipe(dest('WFOTool_ui/src/dev_cloud/'))\n}", "title": "" }, { "docid": "cd68690a83e2bdc2980fdf1b83ce6229", "score": "0.49725458", "text": "function _import(file) {\n return require('@/' + file + '.vue').default\n}", "title": "" }, { "docid": "e68d2ea7f4de070d4fc8c478b6a8a89d", "score": "0.49695417", "text": "function loader(file) {\n\treturn require(\"./\" + file + \".js\");\n}", "title": "" }, { "docid": "917756b77d8d5217397462ea43d6614c", "score": "0.49680838", "text": "static get acornJsx() {\n return acornJsx;\n }", "title": "" }, { "docid": "c6a2d0d307fabe6d3d67384ad797c16b", "score": "0.4955725", "text": "function loadStories() {\n require(\"../src/components/Form/Input/Input.stories.tsx\");\n}", "title": "" }, { "docid": "091132a868170b4cedb82fc5738ece3b", "score": "0.4955499", "text": "get Story() { return require('./Story.js'); }", "title": "" }, { "docid": "a124413d3366b17c30112fd808b8db06", "score": "0.49552953", "text": "injectInteractionScript(){\n\t\tlet script = document.createElement('script');\n\t\tscript.src = apis.extension.getURL(INJECTION_SCRIPT_FILENAME);\n\t\t(document.head||document.documentElement).appendChild(script);\n\t\tscript.onload = () => {\n\t\t\tscript.remove();\n\t\t};\n\t}", "title": "" }, { "docid": "10033bf9386ddd214bb9975e3120e13e", "score": "0.49508426", "text": "_initialize_script() {\n this.initializers = requireDirectory(module, './initializers');\n }", "title": "" }, { "docid": "2ba9cab1f9c47b0918cb9c48535b52c1", "score": "0.49503303", "text": "function scripts() {\n return gulp\n .src('./src/scripts/main.js')\n .pipe(babel({\n presets: ['@babel/env']\n }))\n .pipe(plumber())\n // folder only, filename is specified in webpack config\n .pipe(gulp.dest('./public/dist/js/'))\n}", "title": "" }, { "docid": "bb4a0725a0c33e3a8f05db71a06f8ce6", "score": "0.49459213", "text": "function _javascripts() {\n return gulp.src('js/**/*.js', {base: distDir, cwd: distDir})\n .pipe(babel({\n presets: ['@babel/preset-env']\n }))\n .pipe(gulp.dest(distDir));\n}", "title": "" }, { "docid": "5f3e57b94f373191ce2a238ea67e3d77", "score": "0.4943956", "text": "loadServerScripts() {\n // @TODO: implement me\n }", "title": "" }, { "docid": "ae91a77c68ea7ae28e86459f481433b7", "score": "0.49169675", "text": "_resolveImports() {\n if (this.shouldShowStaticPage) {\n import('./sc-static-page-selector.js');\n }\n else if (this.shouldShowSuttaplexListPage) {\n import('./suttaplex/sc-suttaplex-list.js');\n }\n else if (this.shouldShowSearchPage) {\n import('./sc-page-search.js');\n }\n else if (this.shouldShowDictionaryPage) {\n import('./sc-page-dictionary.js');\n }\n else if (this.shouldShowSuttaTextPage) {\n import('./text/sc-text-page-selector.js');\n }\n }", "title": "" }, { "docid": "ed14cb22395cf373d8057f01abefdb5a", "score": "0.49154222", "text": "_pageChanged(page) {\n\n switch (page) {\n case 'login':\n import('./login-page.js');\n break;\n case 'dashboard-page':\n import('./dashboard-page.js');\n break;\n case 'add-slot':\n import('./add-slot.js');\n break;\n case 'patient-page':\n import('./patient-page.js');\n break;\n case 'form-page':\n import('./form-page.js');\n break;\n\n }\n }", "title": "" }, { "docid": "91ef792a2d4b30554d8e007f1b37be2d", "score": "0.49108833", "text": "function jsTask(){ \n return gulp.src(files.jsPath)\n .pipe(webpack())\n .pipe(concat('main.js'))\n .pipe(gulp.dest('assets/js')); // put final JS in assets folder\n}", "title": "" }, { "docid": "eba5c0b7cc2814cc01984c4b0244c856", "score": "0.4905583", "text": "constructor() {\n super();\n this.type = 'objective';\n this.dark = false;\n this.header = 'Unit 1';\n this.subheader = 'learning objectives';\n setTimeout(() => {\n import('./LearningCardBanner.js');\n import('./LearningIcon.js');\n import('./LearningScaffold.js');\n }, 0);\n }", "title": "" }, { "docid": "f9a4cc752e8e8c2fa8ca7954691e9030", "score": "0.4881963", "text": "function GlobalScriptLoader() {\n}", "title": "" }, { "docid": "75bb3e19c60bfaf5d0ffb462d18c66ff", "score": "0.48667452", "text": "function load(){\t\t\n\tvar EXTRAS = typeof IMPORT == 'undefined' ? \"\" : IMPORT;\n\t\n\tloadJS(WEB_PATH+\"/jscore/dobleos/dobleosapiclient.v2.js\");/** API de llamadas al core */\n\tloadCSS(WEB_PATH+\"/applications/_commons/_css/application.v3.css\");/** estilo generico */\n\tloadCSS(WEB_PATH+\"/applications/\"+MODULE_NAME+\"/css/application.css\");/** estilo propio de la ventana*/\n\t/** Jquer UI */\n\tloadCSS(WEB_PATH+\"/jscore/system/jquery-ui.min.css\");\n\tloadJS(WEB_PATH+\"/jscore/system/jquery-ui.min.js\");\n\t/** GRID **/\n\tloadCSS(WEB_PATH+\"/jscore/system/pqgrid.min.css\");\n\tloadJS(WEB_PATH+\"/jscore/system/pqgrid.min.js\");\n\tloadJS(WEB_PATH+\"/jscore/system/pq-localize-es.js\");\n\t/** Bloqueo pantalla */\n\tloadJS(WEB_PATH+\"/jscore/system/jquery.blockUI.min.js\");\n\t/** mascaras en los campos */\n\tloadJS(WEB_PATH+\"/jscore/extras/jquery.maskMoney.min.js\");\n\t/** JS modulo en ejecucion */\n\tloadJS(WEB_PATH+\"/applications/\"+MODULE_NAME+\"/js/application.js\");\n\t/** grid lista */\n\tif ( EXTRAS.indexOf('simple-details')!=-1 )\n\t\tloadJS(WEB_PATH+\"/jscore/system/simple-details.js\");\n\t/** updload */\n\tif ( EXTRAS.indexOf('upload')!=-1 ){\t\t\n\t\tloadJS(WEB_PATH+\"/jscore/extras/upload/jquery.fileupload.js\");\n\t\tloadJS(WEB_PATH+\"/jscore/extras/upload/jquery.ui.widget.js\");\n\t}\n\n}", "title": "" }, { "docid": "fc6484c91dd1a22a86e1bc163781d8c5", "score": "0.48652938", "text": "function loadJsxFile(scriptName) {\n\tvar f = cs.getSystemPath(SystemPath.EXTENSION) + '/jsx/' + scriptName + '.jsx';\n\tif (cep.fs.readFile(f).err === 0) {\n\t\tcs.evalScript('$.evalFile(\"'+ f +'\")');\n\t}\n\tconsole.log('loaded:', scriptName);\n}", "title": "" }, { "docid": "41db6bba69dc7e421ea828a7cf5e1501", "score": "0.48640674", "text": "function loadStories() {\n require('../stories/index');\n}", "title": "" }, { "docid": "5e268f3101543cd46eec60a0a999b100", "score": "0.48636663", "text": "function test(){\n console.log('xmlManager correctly imported');\n}", "title": "" }, { "docid": "2b19010c5410407163f5376a1f62b3e7", "score": "0.4862193", "text": "async function freshImport() {\n const {\"default\": H9Y} = await import(`../hyphenopoly.module.js?update=${Date.now()}`);\n return H9Y;\n}", "title": "" }, { "docid": "2b19010c5410407163f5376a1f62b3e7", "score": "0.4862193", "text": "async function freshImport() {\n const {\"default\": H9Y} = await import(`../hyphenopoly.module.js?update=${Date.now()}`);\n return H9Y;\n}", "title": "" }, { "docid": "7224960495aede8bcb0495bb192b4bcf", "score": "0.48597643", "text": "__modalShowEvent(e) {\n import(\"@lrnwebcomponents/image-inspector/image-inspector.js\");\n }", "title": "" }, { "docid": "dddb07e36eaf5675a143c7bf48cba6b5", "score": "0.48553702", "text": "function loadJSX() {\n\tvar csInterface = new CSInterface();\n\n\t// get the appName of the currently used app. For Premiere Pro it's \"PPRO\"\n\tvar appName = csInterface.hostEnvironment.appName;\n\tvar extensionPath = csInterface.getSystemPath(SystemPath.EXTENSION);\n\n\t// load general JSX script independent of appName\n\tvar extensionRootGeneral = extensionPath + \"/jsx/\";\n\tcsInterface.evalScript(\"$._ext.evalFiles(\\\"\" + extensionRootGeneral + \"\\\")\");\n\n\t// load JSX scripts based on appName\n\tvar extensionRootApp = extensionPath + \"/jsx/\" + appName + \"/\";\n\tcsInterface.evalScript(\"$._ext.evalFiles(\\\"\" + extensionRootApp + \"\\\")\");\n}", "title": "" }, { "docid": "2e4b55eb8b4ade16715e7522e60471e1", "score": "0.484754", "text": "function loadJSX() {\n\tvar csInterface = new CSInterface();\n\n\t// get the appName of the currently used app. For Premiere Pro it's \"PPRO\"\n\tvar appName = csInterface.hostEnvironment.appName;\n\tvar extensionPath = csInterface.getSystemPath(SystemPath.EXTENSION);\n\n\t// load general JSX script independent of appName\n\tvar extensionRootGeneral = extensionPath + '/jsx/';\n\tcsInterface.evalScript('$._ext.evalFiles(\"' + extensionRootGeneral + '\")');\n\n\t// load JSX scripts based on appName\n\tvar extensionRootApp = extensionPath + '/jsx/' + appName + '/';\n\tcsInterface.evalScript('$._ext.evalFiles(\"' + extensionRootApp + '\")');\n}", "title": "" }, { "docid": "0c0a83a310a731d2b8834b7cc06ebbf5", "score": "0.48455277", "text": "static get jsFiles() {\n return jsFiles;\n }", "title": "" }, { "docid": "5c12c24dffdd500f30392b16c26439c6", "score": "0.48439637", "text": "function require(jsFilePath) {\n var js = document.createElement(\"script\");\n\n js.type = \"text/javascript\";\n js.src = jsFilePath;\n\n document.body.appendChild(js);\n}", "title": "" }, { "docid": "64282099297a6f0b1c01a3a3bdfd17b9", "score": "0.48436347", "text": "loadCSV_webpack(filename){\n let target = '!!csv-loader!'+(filename)\n //console.log(target);\n return require(target);\n }", "title": "" }, { "docid": "1652a985faf6005b25729d4c57740664", "score": "0.48415416", "text": "load () { return {} }", "title": "" }, { "docid": "903d334023fe329c29348f9b1f2b140c", "score": "0.48407537", "text": "get User() { return require('./User.js'); }", "title": "" }, { "docid": "54282166765a6160a1f7fad359b81222", "score": "0.48362434", "text": "function loadModule(a){\n\tfor(var i=0;i<a.length;i++){\n\t\tdocument.write('<script src=\"../modules/'+a[i]+'\"><\\/script>');\n\t}\n}", "title": "" }, { "docid": "4ae413e9bd3afb3837237c9e635c4bf8", "score": "0.4835077", "text": "function loadDemos() {\n const files = glob.sync(path.join(__dirname, \"main-process/**/*.js\"));\n files.forEach(file => {\n require(file);\n });\n //autoUpdater.updateMenu();\n\n \n}", "title": "" }, { "docid": "bbce540d432e0655e8c3ffc6d7ab5686", "score": "0.48219895", "text": "function scripts() {\n return gulp\n .src(['lib/js/*.js'])\n .pipe(plumber())\n .pipe(minify())\n .pipe(\n babel({\n plugins: ['@babel/transform-runtime'],\n }),\n )\n .pipe(gulp.dest('dist/assets/js'))\n .pipe(browsersync.stream());\n}", "title": "" }, { "docid": "c86081ed1748df6fd9d971692d397445", "score": "0.48159635", "text": "function loadScripts() {\n var path = window.location.pathname;\n var head = document.getElementsByTagName('head').item(0);\n var script = document.createElement('script');\n script.type = 'text/javascript';\n if (path.indexOf('/register') > -1) {\n script.src = '/javascripts/regScript.js';\n head.appendChild(script);\n }\n else if (path.indexOf('/client') > -1) {\n script.src = '/javascripts/clientScript.js';\n head.appendChild(script);\n }\n else if (path.indexOf('/') > -1 || path.indexOf('/login') > -1) {\n script.src = '/javascripts/loginScript.js';\n head.appendChild(script);\n }\n}", "title": "" }, { "docid": "e34ad8f50dc2ac494c0a8e1000e6210b", "score": "0.48139232", "text": "function xchatImporter() { }", "title": "" }, { "docid": "52b30bc4a426299e71de5a4a30a62f91", "score": "0.48001188", "text": "function load (component) {\n // '@' is aliased to src/components\n return () => System.import(`components/${component}.vue`)\n}", "title": "" }, { "docid": "b0a4057d27a49d41cb54308b0cbea21d", "score": "0.47980177", "text": "function loadExternalScripts()\n\t{ \n\t\tloadExternalCSS(\"./codemirrorBare/lib/codemirror.css\");\n\t\tloadExternalJavaScript(\"./codemirrorBare/lib/codemirror.js\");\n\t\tloadExternalJavaScript(\"./codemirrorBare/mode/meta.js\");\n\t\tloadExternalJavaScript(\"./codemirrorBare/addon/mode/loadmode.js\");\n\t\tloadExternalJavaScript(\"./codemirrorBare/addon/runmode/runmode.js\", true);\n\t}", "title": "" }, { "docid": "5483474abc389fd9ad4b76dc2b1e446a", "score": "0.47938207", "text": "function loadResources() {\n // ChessBoard = require(\"./ChessBoard.js\");\n // KilledPieces = require(\"./KilledPieces.js\");\n}", "title": "" }, { "docid": "78775f2ba979c8983bc89248ebea44b1", "score": "0.47911173", "text": "function gulpConf() {\n return src('./wwwroot/js/**/*.js')\n .pipe(concat('JSSB.concat.js'))\n //react presets for @babel\n .pipe(babel( {presets: ['@babel/preset-env','@babel/preset-react']})) \n //react and import will work only after babel\n .pipe(uglify())\n .pipe(gulp.dest(\"./wwwroot/dist/gulp/JSSB/\"));\n}", "title": "" }, { "docid": "85fdd5cd31bd387953a0fcf82c584557", "score": "0.4788416", "text": "function loadjsfile( filename ) {\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n fileref.setAttribute(\"src\", filename);\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n}", "title": "" }, { "docid": "5d0813a0565eccf629b13dc38cc1d727", "score": "0.47852376", "text": "activate(){\n\n\t}", "title": "" }, { "docid": "73695d7ef5707ee16c1e321358df1517", "score": "0.4781607", "text": "startComponentsRoute () {}", "title": "" }, { "docid": "9b03d697a3ea2d412239e6c752b71e18", "score": "0.47806436", "text": "function js() {\n return src([\n 'node_modules/jquery/dist/jquery.min.js',\n 'node_modules/bootstrap/dist/js/bootstrap.bundle.min.js',\n 'node_modules/owl.carousel2/dist/owl.carousel.min.js',\n 'node_modules/jquery-waypoints/waypoints.min.js',\n 'node_modules/counterup/jquery.counterup.min.js',\n 'node_modules/jquery.easing/jquery.easing.min.js',\n 'node_modules/jquery-countdown/dist/jquery.countdown.min.js'\n ])\n .pipe(dest('dist/js'));\n}", "title": "" }, { "docid": "45d8c95374b0bb29204ece498ea62d54", "score": "0.4780167", "text": "loadScript(name) {\n return window.exposeModulesForTests()\n .then(() => window.exposedModules._loadScript(name));\n }", "title": "" }, { "docid": "fce4abe3495d50a963b03d15c3f747c0", "score": "0.47743204", "text": "async loadChecks() {\n const jsFileExtension = '.js';\n const checkScripts = (await readdir(CHECK_DIR)).filter((f) => f.endsWith(jsFileExtension));\n return checkScripts.map((script) => {\n return {\n id: script.substring(0, script.length - jsFileExtension.length),\n execute: require(path.join(CHECK_DIR, script)),\n };\n });\n }", "title": "" }, { "docid": "bb811ad7a49f2136d332a26a960ed8ae", "score": "0.4768436", "text": "function activate() {\n // Register the MworldComponent as a role in Compass\n //\n // Available roles are:\n // - Instance.Tab\n // - Database.Tab\n // - Collection.Tab\n // - CollectionHUD.Item\n // - Header.Item\n\n global.hadronApp.appRegistry.registerRole('Collection.Tab', ROLE);\n global.hadronApp.appRegistry.registerAction('Mworld.Actions', MworldActions);\n global.hadronApp.appRegistry.registerStore('Mworld.Store', MworldStore);\n}", "title": "" }, { "docid": "727855281fb53dda3fc92c5948780181", "score": "0.47567132", "text": "function addJS(fileName)\n{//getting an additional js file\n\tvar file = document.createElement('script');//create a new external JS thingy\n\tfile.setAttribute('id', fileName);\n\tfile.setAttribute('type','text/javascript');//set it as JS\n\tfile.setAttribute('src','assets/'+fileName);//get file location\n\tdocument.getElementsByTagName('head')[0].appendChild(file);//add it to head so it will be picked up by browser\n}", "title": "" }, { "docid": "1bad02e1e1a69831f0271e259299eeda", "score": "0.47564778", "text": "function js() {\n return gulp\n .src('./src/**/*.js')\n .pipe(gulp.dest('./tmp/'));\n}", "title": "" }, { "docid": "af82101cc45970aebe74d381a9c9ccb0", "score": "0.47500256", "text": "async loadFormFactorModule() {\n if (this.isMobile) {\n const loadModule = await import(\"c/mobile\");\n this.formFactorModule = loadModule;\n }\n\n if (this.isDesktop) {\n const loadModule = await import(\"c/desktop\");\n this.formFactorModule = loadModule;\n }\n\n // const loadModule = await import(\n // `${FORM_FACTOR_MODULES[this.formFactor]}`\n // );\n // this.formFactor = loadModule;\n }", "title": "" }, { "docid": "bbc657236a2e12027d4375d626d8dd29", "score": "0.47476172", "text": "_createImports() {\n\t\tthis.assets = {\n\t\t\tcss: '',\n\t\t\tjs: ''\n\t\t};\n\n\t\tlet order = [\n\t\t\t'runtime', // Webpack runtime - used only in dev\n\t\t\t'vendor', // All vendor code - used only in dev\n\t\t\t'client' // In prod, all client code but in dev, only our code\n\t\t];\n\n\t\tconst assetsConfig = {\n\t\t\t...this.vendorAssetsConfig,\n\t\t\t...this.assetsConfig\n\t\t};\n\n\t\tfor(let name of order) {\n\t\t\tconst assets = assetsConfig[name];\n\n\t\t\tif(!assets) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(assets.js) {\n\t\t\t\tthis.assets.js += `<script src=\"${assets.js}\"></script>\\n`;\n\t\t\t}\n\n\t\t\tif(assets.css) {\n\t\t\t\tthis.assets.css += `<link rel=\"stylesheet\" type=\"text/css\" href=\"${assets.css}\">\\n`;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ad780a8d4ea034e18033ff978ab1d1eb", "score": "0.47427773", "text": "function javascript() {\n return gulp.src(PATHS.javascript)\n // .pipe($.sourcemaps.init())\n // .pipe($.babel({ignore: ['what-input.js']}))\n .pipe($.concat('ubc-press-js.js'))\n .pipe($.if(PRODUCTION, $.uglify()\n .on('error', e => { console.log(e); })\n ))\n // .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest('js'));\n}", "title": "" }, { "docid": "8bcc6a8978ecb3aa2bbb723e78457e28", "score": "0.47422567", "text": "activate() {}", "title": "" }, { "docid": "a64cedd3a29581583956c1673ce70959", "score": "0.47416413", "text": "babel(config) { }", "title": "" }, { "docid": "50b04037e3c5e8fa7a60a0d841b7efb9", "score": "0.47400174", "text": "async function loadSlides() {\n const slides = []\n\n await Promise.all(\n mySlides.map(async (slide, index) => {\n let module = await import(`./slides/${slide}.js`)\n slides[index] = module.default\n })\n )\n\n return slides\n}", "title": "" }, { "docid": "f5be7606996b998c7292296bb0246337", "score": "0.47386026", "text": "static async loadPath(path) {\n return await import(path);\n }", "title": "" }, { "docid": "afef72e0aa90dc7206c20a7528d25719", "score": "0.4738204", "text": "load() {\n return this.get('config.lazyLoad')\n ? loadScript(`https://fast.appcues.com/${this.get('config.accountId')}.js`)\n : resolve();\n }", "title": "" }, { "docid": "6e6c67fd3f658e4ac7cc0139b14f2b08", "score": "0.4732368", "text": "function loadModules() {\r\n SmartModule.modules.map(module=>{\r\n addModule(module.moduleName, module.moduleFunction, module.moduleInfo);\r\n })\r\n if(SmartModule.moduleExtensions) {\r\n SmartModule.moduleExtensions.map(module=>{\r\n addModule(module.moduleName, module.moduleFunction, module.moduleInfo, true);\r\n }) \r\n }\r\n }", "title": "" }, { "docid": "65244712bd987e8076be1abef3b63590", "score": "0.47234645", "text": "function importScript(aPath){\n var scripts = document.getElementsByTagName('script');\n var found = false;\n var aScript;\n for(i in scripts){\n if(scripts[i].src == aPath){\n aScript = scripts[i];\n found = true;\n break;\n }\n }\n if(!found){\n aScript = document.createElement('script');\n aScript.language = \"JavaScript\"\n aScript.type = 'text/javascript';\n aScript.src = aPath;\n scripts[0].parentNode.insertBefore(aScript,scripts[0]);\n }\n return aScript;\n}", "title": "" }, { "docid": "92bc78bc2fef9c75ecb041c110f7fd13", "score": "0.47220784", "text": "babelTranspile() {\n // Get all the babel scripts\n var babel_scripts = document.querySelectorAll('script[type=\"text/babel\"]');\n // Loop over them\n Array.prototype.forEach.call(babel_scripts, function (script, index, arr) {\n // Get their contents\n var input = script.textContent;\n // Transform/Transpile/Compile\n var output = Babel.transform(input, { presets: ['es2015', 'react'] }).code;\n\n // Create a new script tag of `javascript` type\n var new_script = document.createElement('script');\n new_script.setAttribute('type', 'text/javascript');\n // Set the contents of the script to the transpiled code\n new_script.textContent = output;\n\n // Remove the babel script\n script.remove();\n // Inject the new transpiled JS\n document.querySelector('body').appendChild(new_script);\n });\n }", "title": "" }, { "docid": "57b1f1f766aa98a4c86773d587e7c0b3", "score": "0.4720266", "text": "function importScript1(url) {\n url = resolveURL(url, currentScriptURL());\n document.write('<script type=\"text/javascript\" src=\"' + url + '\"></' + 'script>');\n }", "title": "" }, { "docid": "1401e96f6da1cddcf4454cdd0fac758f", "score": "0.47192085", "text": "function importS(jsName, callback){\n\timportCallback[jsName] = callback;\n\timportScript(jsName, null, callback, X);\n}", "title": "" }, { "docid": "c1ec63fcbad82a41bb879467d772749e", "score": "0.4717244", "text": "function restoreJsLoader() {\r\n require.extensions[\".js\"] = originalLoader;\r\n}", "title": "" }, { "docid": "d1c796a20a81b49144a9b4ada2bb9899", "score": "0.47098896", "text": "function getJS(url) {\n return eval('require(\"' + url + '\")');\n}", "title": "" }, { "docid": "23e30238d3508cc53115c2fbcfc87d95", "score": "0.4709846", "text": "function app() {\n\n // load some scripts (uses promises :D)\n loader.load({\n url: \"./bower_components/jquery/dist/jquery.min.js\"\n }, {\n url: \"./bower_components/lodash/dist/lodash.min.js\"\n }, {\n url: \"./bower_components/pathjs/path.min.js\"\n }, {\n url: \"./js/DateClient.js\"\n }).then(function() {\n _.templateSettings.interpolate = /{([\\s\\S]+?)}/g;\n\n var yumApiId = \"1156f99c\";\n var yumApiKey = \"7c651b3d3555de2b8dcb55eeaaaa4c97\";\n var weathApiKey = \"ca0e8ae811d1e1410ebdf8d1a30fc26a\";\n var client = new DateClient(yumApiId, yumApiKey, weathApiKey);\n });\n}", "title": "" }, { "docid": "8b2537d4dd90d4160c323355838eebf2", "score": "0.47078907", "text": "function Libraries() {\n\t}", "title": "" }, { "docid": "70a9f6b46dec8419e2abc9c1e34797f7", "score": "0.47069004", "text": "function jsPro(){\n return (\n gulp.src(['site/js/js-lib/jquery.js', 'site/js/js-lib/functions.js'])\n //specify which files are to be combined in which order\n .pipe(concat('all.js'))\n //specifies which file stores the concatenated js files\n .pipe(gulp.dest('site/js'))\n //specifies which folder will contain the concatenated js file\n );\n}", "title": "" }, { "docid": "445bbc71fab155a415be3a2fe18bd945", "score": "0.47032", "text": "function activateJavaScriptElements() {\n document.querySelectorAll('.js-hide').forEach(element => {\n // Don't just hide it - delete it completely to avoid any specifity issues\n element.parentNode.removeChild(element);\n });\n document.querySelectorAll('.js-enable').forEach(element => {\n element.classList.remove('js-enable');\n element.classList.remove('hidden');\n element.disabled = false;\n element.hidden = false;\n });\n}", "title": "" }, { "docid": "13c671c14fc457bfda69f9705e22d778", "score": "0.4700346", "text": "bundleJs() {\n this.builder.run()\n }", "title": "" }, { "docid": "718143ab03f80f847259fe44772885f4", "score": "0.46909964", "text": "function scripts() {\n return src(config.paths.scripts.src)\n .pipe(plumber({\n errorHandler: notify.onError(\"Script Error: <%= error.message %>\")\n }))\n .pipe(concat(config.paths.jsOutputName))\n .pipe(babel({\n presets: [[\n '@babel/env',\n { modules: false }\n ]]\n }))\n .pipe(dest(config.paths.scripts.dest))\n .pipe(browserSync.stream());\n}", "title": "" }, { "docid": "08c196208ad522ff3a4c0f2f7c0d06d2", "score": "0.4680707", "text": "function afo_import_ajaxurl() {\n\t\treturn Drupal.settings.basePath + 'afo-import/do';\n\t}", "title": "" }, { "docid": "0588e47f6cbbd3404941a842a8a27d7d", "score": "0.46690547", "text": "function buildJs() {\n\treturn src(['dist/js/helpers/fade-elements.js',\n\t\t'dist/js/helpers/msg-empty.js',\n\t\t'dist/js/helpers/table-order.js',\n\t\t'dist/js/helpers/select.js',\n\t\t'dist/js/helpers/services.js',\n\t\t'dist/js/nav-bar-button.js',\n\t\t'dist/js/msg-session.js',\n\t\t'dist/js/search-box.js',\n\t\t'dist/js/table-listens.js',\n\t\t'dist/js/form-create.js',\n\t\t'dist/js/form-edit.js',\n\t\t'dist/js/form-delete.js',\n\t\t'dist/js/form-user.js',\n\t\t'dist/js/form-redefine.js',\n\t\t'dist/js/button-panel.js',\n\t\t'dist/js/footer-btn-top.js'])\n\t\t.pipe(gulpBabel({\n\t\t\tpresets: ['@babel/env']\n\t\t}))\n\t\t.pipe(gulpConcat('all.js'))\n\t\t.pipe(gulpUglify())\n\t\t.pipe(dest('dist/js'));\n}", "title": "" }, { "docid": "bc6f8c9a2e148d8fa5db5eaa73b40e64", "score": "0.46689686", "text": "function include(url){\n document.write('<script type=\"text/javascript\" src=\"public/site/assets/js/' + url + '\"></script>'); // Print js files on page\n return false ;\n}", "title": "" }, { "docid": "48084c5669e788e8dde56d7dcf71a210", "score": "0.46683607", "text": "function js_includes() {\n return gulp.src(paths.js.includes, { sourcemaps: true })\n .pipe(babel())\n .pipe(uglify())\n .pipe(gulp.dest(targetPath + '/assets/js', { sourcemaps: true }))\n .pipe(browserSync.stream())\n}", "title": "" } ]
be474b3843628718f039ff74cabdbad5
draws the truck for the canvas. as well as draws the wheels.
[ { "docid": "d6c7bdb2c52830445903875101cd388e", "score": "0.79261786", "text": "function drawTruck(){\n //make the outline of the truck\n canvasInfo.context.beginPath()\n canvasInfo.context.moveTo(canvasInfo.truckX, canvasInfo.truckY)\n canvasInfo.context.lineTo(canvasInfo.truckX + 400, canvasInfo.truckY)\n canvasInfo.context.moveTo(canvasInfo.truckX + 400, canvasInfo.truckY)\n canvasInfo.context.lineTo(canvasInfo.truckX + 400, canvasInfo.truckY-75)\n canvasInfo.context.moveTo(canvasInfo.truckX + 400, canvasInfo.truckY - 75)\n canvasInfo.context.lineTo(canvasInfo.truckX + 330, canvasInfo.truckY - 75)\n canvasInfo.context.moveTo(canvasInfo.truckX + 330, canvasInfo.truckY - 75)\n canvasInfo.context.lineTo(canvasInfo.truckX + 250, canvasInfo.truckY - 150)\n canvasInfo.context.moveTo(canvasInfo.truckX + 250, canvasInfo.truckY - 150)\n canvasInfo.context.lineTo(canvasInfo.truckX + 150, canvasInfo.truckY - 150)\n canvasInfo.context.moveTo(canvasInfo.truckX + 150, canvasInfo.truckY - 150)\n canvasInfo.context.lineTo(canvasInfo.truckX + 150, canvasInfo.truckY - 75)\n canvasInfo.context.moveTo(canvasInfo.truckX + 150, canvasInfo.truckY - 75)\n canvasInfo.context.lineTo(canvasInfo.truckX, canvasInfo.truckY - 75)\n canvasInfo.context.moveTo(canvasInfo.truckX, canvasInfo.truckY - 75)\n canvasInfo.context.lineTo(canvasInfo.truckX, canvasInfo.truckY)\n canvasInfo.context.closePath()\n canvasInfo.context.lineWidth = 1\n canvasInfo.context.strokeStyle = \"black\"\n canvasInfo.context.stroke()\n\n //make the first wheel\n canvasInfo.context.fillStyle = \"SlateGray\"\n canvasInfo.context.beginPath()\n canvasInfo.context.arc(canvasInfo.truckX + 75, canvasInfo.truckY+7, 40, 0, 2*Math.PI)\n canvasInfo.context.closePath()\n canvasInfo.context.stroke()\n canvasInfo.context.lineWidth = 1\n canvasInfo.context.strokeStyle = \"black\"\n canvasInfo.context.fill()\n\n //make the second wheel\n canvasInfo.context.fillStyle = \"SlateGray\"\n canvasInfo.context.beginPath()\n canvasInfo.context.arc(canvasInfo.truckX + 325, canvasInfo.truckY + 7, 40, 0, 2 * Math.PI)\n canvasInfo.context.closePath()\n canvasInfo.context.stroke()\n canvasInfo.context.lineWidth = 1\n canvasInfo.context.strokeStyle = \"black\"\n canvasInfo.context.fill()\n}", "title": "" } ]
[ { "docid": "da8f2c1e8533c1605bda06da613bd737", "score": "0.65850013", "text": "draw(){\n if (this.webGL) this.canvas.translate(-0.5 * this.canvas.width, -0.5 * this.canvas.height)\n // this.editingTrack ? this.canvas.noCursor() : this.canvas.cursor();\n\n this.canvas.background(this.backgroundColor);\n this.drawTrack();\n\n if (this.showDebug) this.drawDebugText();\n\n // Interface and listeners and such when editing track.\n this.drawCars();\n if (this.editingTrack) this.drawTrackEditing();\n }", "title": "" }, { "docid": "8b2d499a02b5e4754d91e69ebb7eacd7", "score": "0.6306359", "text": "function drawCanvas() {\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t\tdrawCanvasBackground();\n\t\tdrawHoles(holes);\n\t\tdrawLines(existingDrawnCoords);\n\t}", "title": "" }, { "docid": "5c4e58c6de8399506799416dbe5f51ff", "score": "0.628983", "text": "draw() {\n\t\t\t// erase the canvas\n\t\t\tthis.destroy_board();\n\t\t\t// redraw the contents\n\t\t\tthis.init_grid(); // grid, if show_grid is set\n\t\t\tthis.init_tray(); // tray, if pento_with_tray is set\n\t\t\tthis.draw_shapes(); // shapes present in pento_shapes\n\t\t}", "title": "" }, { "docid": "bac6becea876c9ae65a5a7094d2194e7", "score": "0.6278232", "text": "function draw() {\r\n drawBricks();\r\n}", "title": "" }, { "docid": "a5414c418f872775376f1531dd84fcf3", "score": "0.623096", "text": "drawCanvas() {\n this.context.fillStyle = this.snake.getCrashed() ? '#B00020' : 'rgba(0, 0, 0, 1)';\n this.context.fillRect(0, 0, settings.canvasSize, settings.canvasSize);\n\n this.context.fillStyle = '#888888';\n this.context.fillRect(0, 0, settings.canvasSize, settings.step);\n this.context.fillRect(0, settings.step, settings.step, settings.canvasSize - settings.step * 2);\n this.context.fillRect(0, settings.canvasSize - settings.step, settings.canvasSize, settings.step);\n this.context.fillRect(settings.canvasSize - settings.step, settings.step, settings.step, settings.canvasSize - settings.step * 2);\n }", "title": "" }, { "docid": "9a7ad4cf84dbca16b78aedbe301975b2", "score": "0.62210864", "text": "function redraw(){\n canvasInfo.context.clearRect(0, 0, canvasInfo.canvas.width, canvasInfo.canvas.height)\n drawImage()\n drawTruck()\n drawFlowers()\n drawSun()\n}", "title": "" }, { "docid": "2af9f067e07765bf5555b15d3b5337a4", "score": "0.61964095", "text": "draw() {\n this.player.draw();\n this.treasure.draw();\n //Canvas vertical lines\n for (var x = 0; x <= WIDTH; x += SQUARE_SIDE) {\n line(x, 0, x, HEIGHT);\n }\n //Canvas horizontal lines\n for (var y = 0; y <= HEIGHT; y += SQUARE_SIDE) {\n line(0, y, WIDTH, y);\n }\n }", "title": "" }, { "docid": "df7a1b4666f730906203482e9242a8ce", "score": "0.61350423", "text": "function draw() {\n /////////////////////////\n if (frameCount <= 1) {\n onStarted(ivme);\n }\n ////////////////////////\n background(144);\n\n translate(width/2, height/2);\n\n for (i = 0; i < count; i++){\n pies[i].move();\n pies[i].display();\n }\n\n for (i = 0; i < count; i++){\n pies[i].write();\n }\n\n \n fill(255);\n // Center circle\n ellipse(0, 0, 120,120);\n // The stick.\n triangle(0, -180, -10,-240, 10, -240);\n\n // decrement the acceleration every loop to make wheel stop.\n ivme -= 0.002;\n\n // if the acceleration is smaller then 1, we must to break the loop.\n if (ivme <= 0) {\n // breaks the loop\n noLoop();\n // refresh framecount\n frameCount = 0;\n // detect the winner\n pies.forEach(pie => {\n // our stick is pointing 270\n if (pie.aralik[0]%360<=270 && pie.aralik[1]%360 >= 270)\n {\n onFinished(pie);\n }\n });\n }\n}", "title": "" }, { "docid": "531b9ec350668b118cafaa9314e3fb25", "score": "0.613162", "text": "function drawChart()\n {\n\t //clear the canvas for a fresh start\n\t canvas_ctx.clearRect(0, 0, chart_canvas.width, chart_canvas.height);\n\t //set default stroke color\n\t canvas_ctx.strokeStyle = 'black';\n\t \n //background image\n if (is_wheels_or_skis == true){\n\t //wheels image\n\t canvas_ctx.drawImage(J3_WHEELS_IMG, 0, 0, chart_canvas.width, chart_canvas.height); \n }else{\n\t //skis image\n\t canvas_ctx.drawImage(J3_SKIS_IMG, 0, 0, chart_canvas.width, chart_canvas.height);\n }\n\t \n\t //draw a translucent white/ maybe yellow\n\t //canvas_ctx.fillStyle = ('rgba(255,255,255,0.4');//white\n\t canvas_ctx.fillStyle = CUB_YELLOW_ALFA;\n\t canvas_ctx.fillRect(0, 0, chart_canvas.width, chart_canvas.height);\n\t \n //draw graph overlay\n\t canvas_ctx.beginPath();\n\t canvas_ctx.lineWidth = 4;\n\t // Y axis line\n\t canvas_ctx.moveTo(XY_axis_beginX, Y_axis_length + tick_length + Y_axis_margin);\n\t canvas_ctx.lineTo(XY_axis_beginX, Y_axis_margin);\n\t // X axis line\n\t canvas_ctx.moveTo(XY_axis_beginX - tick_length, XY_axis_beginY);\n\t canvas_ctx.lineTo(X_axis_length + X_axis_margin, XY_axis_beginY);\n\t \n\t canvas_ctx.stroke();\n\t \n\t //fill in X axis ticks\n\t canvas_ctx.beginPath();\n\t canvas_ctx.lineWidth = 1;\n\t for(let i=1; i<9; i++ ){\n\t\t //draw the tick \n\t\t canvas_ctx.beginPath();\n canvas_ctx.moveTo(XY_axis_beginX + X_tick_offset*i, XY_axis_beginY + tick_length);\n\t canvas_ctx.lineTo(XY_axis_beginX + X_tick_offset*i, XY_axis_beginY - tick_length);\t\n\t\t canvas_ctx.stroke();\n\t\t \n }\n\t disp_count = 10;\n\t canvas_ctx.fillStyle = 'rgb(0,0,0)';\t\n\t canvas_ctx.beginPath();\n\t canvas_ctx.textAlign = 'center';\n\t canvas_ctx.font = font_ticks;\n\t canvas_ctx.fillText('8', XY_axis_beginX, XY_axis_beginY + tick_length*2.1);\n\t for(let i=1; i<9; i++ ){\n //draw the text number below the tick\n\t\t canvas_ctx.fillText(disp_count.toString(10), XY_axis_beginX + X_tick_offset*i, XY_axis_beginY + tick_length*2);\n\t\t disp_count = disp_count + 2;\n }\n\t \n\t //fill Y axis ticks\n\t disp_count = 750;\n\t canvas_ctx.textAlign = 'end';\n\t canvas_ctx.fillText(disp_count.toString(10), XY_axis_beginX - tick_length, XY_axis_beginY); \n\t for(let i=1; i<14; i++){\n\t //draw the tick \n\t\t canvas_ctx.beginPath();\n canvas_ctx.moveTo(XY_axis_beginX - tick_length, XY_axis_beginY - Y_tick_offset*i);\n\t canvas_ctx.lineTo(XY_axis_beginX + tick_length, XY_axis_beginY - Y_tick_offset*i);\t\n\t\t canvas_ctx.stroke();\n\t\t disp_count = disp_count + 50;\n\t\t canvas_ctx.fillText(disp_count.toString(10), XY_axis_beginX - tick_length, XY_axis_beginY - Y_tick_offset*i);\n\t }\n\n\t //create the envelope outline\n\t canvas_ctx.strokeStyle = 'black';\n\t canvas_ctx.fillStyle = 'rgba(36, 214, 54, 0.2)';\n\t canvas_ctx.lineWidth = 2;\n\t //rectangle of lines connecting the corner points of the operating CG envelope\n\t // x point formula = (COFGVALUE *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin\n\t // y point formula = (Y_axis_margin+Y_axis_length) -((WEIGHTVALUE * (Y_tick_offset/50)) - (750*(Y_tick_offset/50)))\n\t canvas_ctx.beginPath();\n\t canvas_ctx.moveTo((10.6 *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin, (Y_axis_margin+Y_axis_length) -((1220 * (Y_tick_offset/50)) - (750*(Y_tick_offset/50))));\n\t canvas_ctx.lineTo((22.7 *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin, (Y_axis_margin+Y_axis_length) -((1220 * (Y_tick_offset/50)) - (750*(Y_tick_offset/50))));\n\t canvas_ctx.lineTo((22.7 *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin, (Y_axis_margin+Y_axis_length) -((750 * (Y_tick_offset/50)) - (750*(Y_tick_offset/50))));\n\t canvas_ctx.lineTo((10.6 *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin, (Y_axis_margin+Y_axis_length) -((750 * (Y_tick_offset/50)) - (750*(Y_tick_offset/50))));\n\t canvas_ctx.lineTo((10.6 *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin, (Y_axis_margin+Y_axis_length) -((1220 * (Y_tick_offset/50)) - (750*(Y_tick_offset/50))));\n\t canvas_ctx.stroke();\n\t canvas_ctx.fill();\n\t \n\t //Show fuel warning at top of chart in RED to alert when reserve is lower than about 30 minutes cruise\n\t canvas_ctx.textAlign = 'start';\n\t if(fuel_reserve_warning){\n\t canvas_ctx.fillStyle = RGB_RED;\n\t canvas_ctx.font = font_fuelwarning;\n\t canvas_ctx.fillText ('FUEL RESERVE WARNING, estimated fuel reserve is less than 30 minutes!',\n\t\tXY_axis_beginX + X_axis_margin/2, Y_axis_margin*2);\n\t }\n\t \n\t //set display color to warning level\n\t canvas_ctx.fillStyle = display_colour;\n\t \n\n\t //calculate Take Off point for plotting to the chart\n\t //X axis calculation X_tick_offset = 90. 90/2 = 45 = 1 inch CG. so 10 in CG = (10 * (X_tick_offset/2)) - (8*(X_tick_offset/2)) + xmargin\t \n\t let TO_xvalue = (TO_CofG *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin;\n\t //Y axis calculation (TO_weight * (Y_tick_offset/50)) - (750*(Y_tick_offset/50)) + Y_axis_margin *-1\n\t let TO_yvalue = (Y_axis_margin+Y_axis_length) -((TO_weight * (Y_tick_offset/50)) - (750*(Y_tick_offset/50)) );\n\n\t //Paint the take off Weight and Balance to the chart\n\t canvas_ctx.font = font_labels;\n canvas_ctx.beginPath(); \n canvas_ctx.arc( TO_xvalue, TO_yvalue, 4, 0, 2*Math.PI,false); \n\t canvas_ctx.fill();\n\t //label the take off point\n\t canvas_ctx.fillStyle = 'black';\n\t canvas_ctx.fillText(' __Take Off Weight & Balance point',TO_xvalue, TO_yvalue);\n\t \n\t //calculate Landing point for plotting to the chart\n\t //X axis calculation X_tick_offset = 90. 90/2 = 45 = 1 inch CG. so 10 in CG = (10 * (X_tick_offset/2)) - (8*(X_tick_offset/2)) + xmargin\t \n\t let LDG_xvalue = (landing_CofG *(X_tick_offset/2))-(8*(X_tick_offset/2)) + X_axis_margin;\n\t //Y axis calculation (TO_weight * (Y_tick_offset/50)) - (750*(Y_tick_offset/50)) + Y_axis_margin *-1\n\t let LDG_yvalue = (Y_axis_margin+Y_axis_length) -((landing_weight * (Y_tick_offset/50)) - (750*(Y_tick_offset/50)) );\n\t \n\t //Paint the Landing Weight and Balance to the chart\n\t canvas_ctx.fillStyle = display_colour;\n\t canvas_ctx.beginPath(); \n canvas_ctx.arc( LDG_xvalue, LDG_yvalue, 4, 0, 2*Math.PI,false); \n\t canvas_ctx.fill();\n\t //label the take off point\n\t canvas_ctx.fillStyle = 'black';\n\t //displace display if too close together\n\t if (chart_canvas.width > 320){\n\t //set label offset for large chart size \n\t if(( LDG_yvalue - TO_yvalue)>14){\n\t\t canvas_ctx.fillText(' __Landing Weight & Balance point',LDG_xvalue, LDG_yvalue);\n\t }else{\n\t\t canvas_ctx.fillText(' ~~Landing Weight & Balance point',LDG_xvalue, LDG_yvalue + 14); \n\t\t }\n\t }else{\n\t //set label offset for small chart size \n\t if(( LDG_yvalue - TO_yvalue)>7){\n\t\t canvas_ctx.fillText(' __Landing Weight & Balance point',LDG_xvalue, LDG_yvalue);\n\t }else{\n\t\t canvas_ctx.fillText(' ~~Landing Weight & Balance point',LDG_xvalue, LDG_yvalue + 7);\n\t }\n\t }\n\t \n\t //draw a line on the chart connecting the two points\n\t canvas_ctx.strokeStyle = display_colour;\n\t canvas_ctx.beginPath();\n\t canvas_ctx.lineWidth = 2;\n\t canvas_ctx.moveTo(TO_xvalue, TO_yvalue);\n\t canvas_ctx.lineTo(LDG_xvalue, LDG_yvalue); \n\t canvas_ctx.stroke();\n\t \n }", "title": "" }, { "docid": "fbbe712a7d26cb4d0667f0b1ad70207e", "score": "0.61056423", "text": "update() {\n this.canvas.clear();\n this.canvas.backgroundColor = 'rgb(230,230,230,1.0)';\n this.drawTicketImage();\n this.drawRegions();\n }", "title": "" }, { "docid": "ce7d104d0d9d4fd464e235f281a95b96", "score": "0.6104402", "text": "function draw() {\n\tctx.clearRect(0, 0, canvas.width, canvas.height);\t\n draw_grid()\n draw_manufacturer()\n draw_color_map()\n\tdraw_cars()\n}", "title": "" }, { "docid": "e73396a5a182e7b59fe03c5412319420", "score": "0.609423", "text": "function drawCanvas() {\n\t\tdrawing(context, drawer, colours, solver, purificator, extraIndications);\n\t\tsolver.callStateForItem(spanState);\n\t}", "title": "" }, { "docid": "18ca0932070fd77b1950b34c613c7ea8", "score": "0.6050658", "text": "function initialDraw(e)\n{\n\tvar surfaceContext = surface.getContext('2d');\n\tsurfaceContext.drawImage(wheel, 0, 0);\n}", "title": "" }, { "docid": "c44e5eeee30782fb349842a85957a2c3", "score": "0.603531", "text": "paintCanvas() {\n // Draw the tile map\n this.game.map.drawMap();\n\n // Draw dropped items\n this.game.map.drawItems();\n\n // Draw the NPCs\n this.game.map.drawNPCs();\n\n // Draw other players\n this.game.map.drawPlayers();\n\n // Draw the player\n this.game.map.drawPlayer();\n\n // Draw the mouse selection\n this.game.map.drawMouse();\n }", "title": "" }, { "docid": "b269977a846dbcce5d0cb19bc8e57da5", "score": "0.6021519", "text": "function draw() {\n\tnoTint();//ensures other images aren't affected by tints in other functions\n\tdrawBackground();\n\tslideshow();\n\tnoTint();\n\tdrawArtist();\n\tdrawMidLeft();\n\tdrawRight();\n\tslideControl();\n\ttrentonMakes();\n\t//drawBorders();\n}", "title": "" }, { "docid": "1a07bfe1314a444bccefcb1921d4d0fa", "score": "0.6019942", "text": "draw(ctx) {\n ctx.save();\n ctx.beginPath();\n\n ctx.arc(this.knobX, this.knobY, this.knobRadius , 0, 2*Math.PI);\n if (this.knobTracking)\n {\n ctx.fillStyle = \"#00FF00\";\n }\n else\n {\n ctx.fillStyle = \"#FF0000\";\n }\n ctx.fill();\n ctx.restore();\n }", "title": "" }, { "docid": "4cb79f1cc2037e3ff7dc778d9f692727", "score": "0.5963619", "text": "draw() {\n this.drawRect();\n this.writeInfo();\n this.drawUmbilic();\n }", "title": "" }, { "docid": "829b1436753ac62ee0f122c69e3ed199", "score": "0.59320223", "text": "function drawLoop() {\r\n \r\n receive();\t\t//evaluate effect of current keystrokes\r\n \r\n moveBalls(allBalls ); //calculate new positions of balls\r\n \r\n moveStuff();\t\t//calculate new positions/qualities of other objects\r\n \r\n Tank.move();\t\t//calculate new position of tank\r\n \r\n\t // clear the window\r\n theContext.clearRect(0, 0, theCanvas.width, theCanvas.height);\r\n drawField();\r\n Tank.draw();\t//show tank\r\n \r\n drawBalls(allBalls ); //show balls\r\n \r\n drawBalls(Stuff);\r\n \r\n reqFrame(drawLoop);\t\t//set up another iteration of loop\r\n }", "title": "" }, { "docid": "13f19828f86770c9e01873edd819fa90", "score": "0.59190637", "text": "function draw() {\r\n if (canvasValid == false) {\r\n clear(ctx);\r\n\r\n // Add stuff you want drawn in the background all the time here\r\n if (image != null) {\r\n ctx.drawImage(image, 0, 0);\r\n }\r\n\r\n // draw all motor.zuordnungen()\r\n var l = motor.zuordnungen().length;\r\n for (var i = 0; i < l; i++) {\r\n drawshape(ctx, motor.zuordnungen()[i]);\r\n ctx.font = textFont;\r\n ctx.fillStyle = textColor;\r\n ctx.fillText(motor.zuordnungen()[i].baugruppe() + motor.zuordnungen()[i].einzelteil(), motor.zuordnungen()[i].x(), motor.zuordnungen()[i].y()-2);\r\n }\r\n\r\n // draw selection\r\n // right now this is just a stroke along the edge of the selected box\r\n if (motor.selectedZuordnung() != null) {\r\n ctx.strokeStyle = mySelColor;\r\n ctx.lineWidth = mySelWidth;\r\n ctx.strokeRect(motor.selectedZuordnung().x(), \r\n motor.selectedZuordnung().y(), \r\n motor.selectedZuordnung().width(), \r\n motor.selectedZuordnung().height());\r\n }\r\n\r\n // Add stuff you want drawn on top all the time here\r\n\r\n\r\n canvasValid = true;\r\n }\r\n}", "title": "" }, { "docid": "7b1ed2b77470b3ff845c1458d0e177d0", "score": "0.5907692", "text": "draw() {\n const drawScroll = () => {\n if (this.scroll.cache === undefined) {\n this.scroll.ctx.strokeStyle = this.options.scrollColor;\n this.scroll.ctx.strokeRect(0, 0, this.scroll.canvas.width, this.scroll.canvas.height);\n this.scroll.cache = {\n canvas: this.scroll.canvas,\n };\n }\n };\n \n const drawPaddleLeft = () => {\n if (this.paddleLeft.cache === undefined) {\n this.paddleLeft.ctx.drawImage(this.options.paddle, 0, 0);\n this.paddleLeft.cache = {\n canvas: this.paddleLeft.canvas,\n };\n }\n };\n \n const drawPaddleRight = () => {\n if (this.paddleRight.cache === undefined) {\n this.paddleRight.ctx.drawImage(this.options.paddle, 0, 0);\n this.paddleRight.cache = {\n canvas: this.paddleRight.canvas,\n };\n }\n };\n \n const drawLabelLeft = () => {\n this.labelLeft.ctx.clearRect(0, 0, this.labelLeft.canvas.width, this.labelLeft.canvas.height);\n this.labelLeft.ctx.font = `${this.options.labelSize}px monospace`;\n this.labelLeft.ctx.textAlign = 'center';\n this.labelLeft.ctx.textBaseline=\"middle\";\n this.labelLeft.ctx.strokeStyle = this.options.labelColor;\n this.labelLeft.ctx.fillText(this.labelLeft.text, this.labelLeft.canvas.width / 2, this.labelLeft.canvas.height / 2);\n };\n \n const drawLabelRight = () => {\n this.labelRight.ctx.clearRect(0, 0, this.labelRight.canvas.width, this.labelRight.canvas.height);\n this.labelRight.ctx.font = `${this.options.labelSize}px monospace`;\n this.labelRight.ctx.textAlign = 'center';\n this.labelRight.ctx.textBaseline=\"middle\";\n this.labelRight.ctx.strokeStyle = this.options.labelColor;\n this.labelRight.ctx.fillText(this.labelRight.text, this.labelRight.canvas.width / 2, this.labelRight.canvas.height / 2);\n };\n \n const drawCover = () => {\n this.cover.canvas.width = this.cover.canvas.width;\n this.cover.ctx.fillStyle = this.options.coverColor;\n this.cover.ctx.fillRect(0, 0, this.cover.canvas.width, this.cover.canvas.height);\n };\n \n const drawTimeAxis = () => {\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.ctx.drawImage(this.scroll.canvas, this.scroll.position.x, this.scroll.position.y);\n this.ctx.drawImage(this.paddleLeft.canvas, this.paddleLeft.position.x, this.paddleLeft.position.y);\n this.ctx.drawImage(this.paddleRight.canvas, this.paddleRight.position.x, this.paddleRight.position.y);\n this.ctx.drawImage(this.labelLeft.canvas, this.labelLeft.position.x, this.labelLeft.position.y);\n this.ctx.drawImage(this.labelRight.canvas, this.labelRight.position.x, this.labelRight.position.y);\n this.ctx.drawImage(this.cover.canvas, this.cover.position.x, this.cover.position.y);\n };\n \n drawScroll();\n drawPaddleLeft();\n drawPaddleRight();\n drawLabelLeft();\n drawLabelRight();\n drawCover();\n drawTimeAxis();\n }", "title": "" }, { "docid": "b40b35c1008c9f9d98f9d6cfbcb5c741", "score": "0.5888937", "text": "draw(){\n // If it's dead, don't render it.\n if(!this.isAlive) return\n\n // Check if car is in a wall, because we kill it, if it is!\n this.collisionDetection();\n this.sim.canvas.fill(0);\n\n // Drawing actual car at X and Y positions\n this.drawCar();\n\n if (!__SIMULATOR.paused){\n // Calculate distances from the walls!\n this.calculateDistances();\n this.findCurrentSector();\n\n // Controlling one vehicle with the keys!\n\n if (this.sim.trainingMode){\n if (this.sim.canvas.frameCount % 15) this.ai.predictDrive()\n } else {\n this.checkControls();\n }\n\n // Updating pixelPositions and values.\n this.updatePhysics();\n }\n\n this.updateAverageSteerChanges()\n\n }", "title": "" }, { "docid": "bcaf785fa7e3b3c46a0e9ff2fe4a223a", "score": "0.5883005", "text": "drawBicycleRunner() {\n\n // Clear all current drawing of bicycle\n clearInterval(this.timerDrawBicycle);\n\n // The timing to change images depend of actual speed of bicycle\n const timing = this.advancedBic ? 100 :\n (this.speedUp >= this.speedMax ? 10 :\n (this.speedUp >= (7/8) * this.speedMax ? 25 :\n (this.speedUp > (6/8) * this.speedMax ? 40 :\n (this.speedUp > (5/8) * this.speedMax ? 55 :\n (this.speedUp > (4/8) * this.speedMax ? 70 :\n (this.speedUp > (3/8) * this.speedMax ? 80 :\n (this.speedUp > (2/8) * this.speedMax ? 90 : 100)\n )\n )\n )\n )\n )\n );\n \n // Draw all positions by tour\n this.timerDrawBicycle = setInterval(() => {\n\n // Calculate the source x of the image\n const source_x = 91 * (this.posBic.n + 1);\n\n this.context.clearRect(this.posBic.x, this.posBic.y - 15, this.posBic.w, this.posBic.h);\n this.context.drawImage(\n this.imageList['bicycles'], \n source_x,\n 0,\n BICYCLE_W,\n BICYCLE_H,\n this.posBic.x,\n this.posBic.y,\n BICYCLE_W,\n BICYCLE_H,\n );\n\n this.posBic.n++;\n this.posBic.n %= 4;\n\n }, timing);\n }", "title": "" }, { "docid": "d88048912d52f91a5612f73b5baea3c6", "score": "0.5874774", "text": "draw() {\n this.context.clearRect(0,0, this.canvas.width, this.canvas.height);\n\n this.players.forEach(player => {\n player.draw(this.context);\n });\n\n this.bombs.forEach(bomb => {\n bomb.draw(this.context);\n });\n\n this.walls.forEach(wall => {\n wall.draw(this.context);\n });\n\n this.items.forEach(item => {\n item.draw(this.context);\n });\n }", "title": "" }, { "docid": "a54869b9943361874b63930853c60c6c", "score": "0.5846267", "text": "function drawCylinder() {\n setMV();\n Cylinder.draw();\n}", "title": "" }, { "docid": "774be9cce69fe7b21ee99919d5ee3169", "score": "0.5841537", "text": "draw(ctx) {\n\n // get the points to draw the Tribe\n var angle = this.velocity.angle();\n\n var x1 = this.location.x + Math.cos(angle) * this.base;\n var y1 = this.location.y + Math.sin(angle) * this.base;\n\n var x = this.location.x - Math.cos(angle) * this.mass;\n var y = this.location.y - Math.sin(angle) * this.mass;\n\n // draw the behaviour of the Tribe (lines)\n this.drawBehavior(ctx);\n\n if (Tribe.showBehavior && this.developed){\n this.color = \"pink\";\n }\n\n // draw the Tribe on the canvas\n ctx.lineWidth = 2;\n ctx.fillStyle = this.color;\n ctx.strokeStyle = this.color;\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n var radiusX = Math.abs(this.mass);\n var radiusY = radiusX;\n var rotation = 45 * Math.PI / 180;\n ctx.ellipse(x1, y1, radiusX, radiusY, rotation, 0, 2 * Math.PI);\n ctx.stroke();\n ctx.fillStyle = 'white';\n ctx.fillText(this.ID, x, y);\n ctx.fillStyle = this.color;\n ctx.fill();\n \n if(Tribe.showBehavior){\n // draws the influence area \n ctx.save();\n ctx.beginPath();\n ctx.restore();\n ctx.arc(x1, y1, this.influenceRange, 0, 2 * Math.PI);\n ctx.strokeStyle= '#000000';\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n ctx.stroke();\n ctx.fill();\n\n\t // draws the look area\n ctx.save();\n ctx.beginPath();\n ctx.restore();\n ctx.arc(x1, y1, this.lookRange, 0, 2 * Math.PI);\n ctx.strokeStyle= '#FFFFFF';\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n ctx.stroke();\n ctx.fill();\n }\n }", "title": "" }, { "docid": "bd47788b362edbf7e1215099f38a9e31", "score": "0.5829408", "text": "draw() {\n this.clear();\n for (const aes of this.aesthetics) {\n if (aes.isEnabled())\n this.drawTriangles(aes);\n this.drawBorders(aes);\n }\n }", "title": "" }, { "docid": "c3b17d661d64e80b57bf52894c27721a", "score": "0.58216393", "text": "function draw() {\n background(backgroundColor);\n\n\n ped1X -= 1;\n ped2X -= 2;\n ped3X -= 3;\n\n const car = drawCar(carImage, carX, carY, scale);\n\n if (ped1X > 0) {\n car.addTarget().bearing(ped1X,ped1Y);\n } else {\n ped1X = pedXStart;\n ped2X = pedXStart;\n ped3X = pedXStart;\n }\n if (ped2X > 0) {\n car.addTarget().bearing(ped2X,ped2Y);\n }\n if (ped3X > 0) {\n car.addTarget().bearing(ped3X,ped3Y);\n }\n car.drawLights();\n\n drawPedestrian(ped1X, ped1Y, \"#FF0000\");\n drawPedestrian(ped2X, ped2Y, \"#FF8800\");\n drawPedestrian(ped3X, ped3Y, \"#FF00FF\");\n}", "title": "" }, { "docid": "aa9895ae9f609c5b3e907f123f092d5a", "score": "0.5813283", "text": "render()\n {\n\n var canvas = document.createElement(\"mycanvas\");\n var ctx = mycanvas.getContext(\"2d\");\n document.body.style.background = \"#ffffff\";\n\n\n //this.drop.draw(ctx);\n //this.drag.draw(ctx);\n world.DrawDebugData();\n\n if(this.tutorialStart == true)\n {\n if(this.tutorialCount < 200){\n this.tutorialCount = this.tutorialCount + 1;\n }\n else if(this.textChanged == false){\n this.tutorialText = new tutorialText(\"Press Enter to start\",100,800);\n this.textChanged = true;\n }\n ctx.save();\n this.tutorialText.drawText();\n this.tutorialText.drawBackground();\n this.arrow.drawImage();\n this.arrow2.drawImage();\n this.arrow3.drawImage();\n this.arrow4.drawImage();\n this.highlight.drawImage();\n this.prompt.drawImage();\n ctx.restore();\n\n if(TutorialEnd == 1)\n {\n this.tutorialText = new tutorialText(\"Press R to return to start the level\",100,800);\n this.diamondAchievement = new DiamondAchievement(\"Tutorial Complete!\");\n console.log(\"TUTORIAL DONE\");\n TutorialEnd = 2;\n }\n if(TutorialEnd == 2)\n {\n this.diamondAchievement.drawImage();\n }\n }\n\n\n this.trampoline.render();\n this.ramp.render();\n this.fan.render();\n this.magnet.render();\n this.blowPipe.render();\n draw();\n //partilce effect draw\n\n ctx.fillStyle ='white';\n ctx.font = '55px Adventure Regular';\n ctx.strokeStyle = 'black';\n ctx.fillText(this.time,100,100);\n ctx.strokeText(this.time,100,100);\n\n }", "title": "" }, { "docid": "4197fe5ef0fad8c403b349e900fd6088", "score": "0.58130735", "text": "function drawRouletteWheel() {\n var canvas = document.getElementById(\"canvas\");\n if (canvas.getContext) {\n var outsideRadius = 220;\n var textRadius = 180;\n var insideRadius = 95;\n \n ctx = canvas.getContext(\"2d\");\n ctx.clearRect(0,0,500,500);\n \n \n ctx.strokeStyle = \"black\";\n ctx.lineWidth = 2;\n \n ctx.font = '16px Bodoni';\n \n for(var i = 0; i < 12; i++) {\n var angle = startAngle + i * arc;\n ctx.fillStyle = colors[i];\n \n ctx.beginPath();\n ctx.arc(250, 250, outsideRadius, angle, angle + arc, false);\n ctx.arc(250, 250, insideRadius, angle + arc, angle, true);\n ctx.stroke();\n ctx.fill();\n \n ctx.save();\n ctx.shadowOffsetX = -1;\n ctx.shadowOffsetY = -1;\n ctx.shadowBlur = 0;\n \n\n ctx.fillStyle = \"black\";\n ctx.translate(250 + Math.cos(angle + arc / 2) * textRadius,\n 250 + Math.sin(angle + arc / 2) * textRadius);\n ctx.rotate(angle + arc / 2 + Math.PI / 2);\n var text = restaurants[i];\n ctx.fillText(text, -ctx.measureText(text).width / 2, 0);\n ctx.restore();\n }\n \n //Arrow\n ctx.fillStyle = \"black\";\n ctx.beginPath();\n ctx.moveTo(250 - 4, 250 - (outsideRadius + 5));\n ctx.lineTo(250 + 4, 250 - (outsideRadius + 5));\n ctx.lineTo(250 + 4, 250 - (outsideRadius - 5));\n ctx.lineTo(250 + 9, 250 - (outsideRadius - 5));\n ctx.lineTo(250 + 0, 250 - (outsideRadius - 13));\n ctx.lineTo(250 - 9, 250 - (outsideRadius - 5));\n ctx.lineTo(250 - 4, 250 - (outsideRadius - 5));\n ctx.lineTo(250 - 4, 250 - (outsideRadius + 5));\n ctx.fill();\n }\n}", "title": "" }, { "docid": "af9fd8b088c704b110d664c2b157eeec", "score": "0.58092403", "text": "draw () {\n this.board.snake.move()\n this.ctx.beginPath()\n this.ctx.rect(0, 0, this.canvas.width, this.canvas.height)\n this.ctx.fillStyle = '#e1eff6'\n this.ctx.fill()\n this.drawFood()\n this.drawSnake()\n }", "title": "" }, { "docid": "87a180ec6a2f7a91006d3562c8a82b0a", "score": "0.58056086", "text": "function drawAll() {\r\n //Drawing the tracks\r\n drawTracks();\r\n //Drawing the car\r\n greenCar.draw();\r\n blueCar.draw();\r\n}", "title": "" }, { "docid": "1f7deabd193c09f7495bacd91f6253bc", "score": "0.57806975", "text": "drawScrollButtons(){\n ctx.save();\n ctx.fillStyle = \"white\";\n //up arrow\n ctx.beginPath();\n ctx.moveTo(100, 5);\n ctx.lineTo(75, 25);\n ctx.lineTo(125, 25);\n ctx.fill();\n //down arrow\n ctx.beginPath();\n ctx.moveTo(100, ctx.canvas.height - 5);\n ctx.lineTo(75, ctx.canvas.height - 25);\n ctx.lineTo(125, ctx.canvas.height - 25);\n ctx.fill();\n\n ctx.restore();\n }", "title": "" }, { "docid": "28f8ea33d70f93cb23ce993a105e8332", "score": "0.5776759", "text": "draw() {\n\t\tturtleRenderingContext.clearRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);\n\n\t\tif (!this.hidden) {\n\t\t\tturtleRenderingContext.strokeStyle = '#FFFF00';\n\n\t\t\tturtleRenderingContext.beginPath();\n\t\t\tturtleRenderingContext.moveTo(this.position.x, this.position.y);\n\t\t\tturtleRenderingContext.arc(\n\t\t\t\tthis.position.x, this.position.y, 10,\n\t\t\t\tthis.angle.angle() + (Math.PI / 4),\n\t\t\t\tthis.angle.angle() + (7 * Math.PI / 4)\n\t\t\t);\n\t\t\tturtleRenderingContext.closePath();\n\t\t\tturtleRenderingContext.stroke();\n\t\t}\n\t}", "title": "" }, { "docid": "85b151f7157f475e7ca23903ed1e96bf", "score": "0.57653326", "text": "function draw() {\n\t\tif (timer) { // animating\n\t\t\tvar now = new Date();\n\t\t\tif (config.clockwise) {\n\t\t\t\tframe = ((now - start) / delay) % totalFrames;\n\t\t\t} else {\n\t\t\t\t// counting backwards\n\t\t\t\tframe = (((start - now) / delay) % totalFrames) + totalFrames;\n\t\t\t}\n\t\t}\n\t\tctx.save();\n\t\tctx.clearRect(0,0,canvas.width,canvas.height);\n\t\tctx.translate(canvas.width/2, canvas.height/2);\n\t\tfor (var i=0; i<config.spokes; i++) {\n\t\t\tsetAlpha(frame);\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(0, config.spokeOutset);\n\t\t\tctx.lineTo(0, config.spokeOutset+config.spokeLength);\n\t\t\tctx.stroke();\n\t\t\tctx.rotate(-2*Math.PI/config.spokes);\n\t\t\tframe = (frame + totalFrames/config.spokes) % totalFrames;\n\t\t}\n\t\tctx.restore();\n\t}", "title": "" }, { "docid": "65e17194eed4b084475bbc4f30ef3449", "score": "0.57599133", "text": "function drawCanvas() {\n\t// Erase everything currently on the canvas\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\n\t// This is needed for the animation to snap back to center when you release mouse or touch\n\tTWEEN.update();\n\n\t// Calculate how much the canvas should be rotated\n\tvar rotate_x = (pointer.y * -0.15) + (motion.y * 1.2);\n\tvar rotate_y = (pointer.x * 0.15) + (motion.x * 1.2);\n\n\t// Actually rotate the canvas\n\tcanvas.style.transform = \"rotateX(\" + rotate_x + \"deg) rotateY(\" + rotate_y + \"deg)\";\n\n\t// Loop through each layer in the list and draw it to the canvas\n\tlayer_list.forEach(function(layer, index) {\n\n\t\t// Calculate what the position of the layer should be (getOffset function is below)\n\t\tlayer.position = getOffset(layer);\n\n\t\t// If the layer has a blend mode set, use that blend mode, otherwise use normal\n\t\tif (layer.blend) {\n\t\t\tcontext.globalCompositeOperation = layer.blend;\n\t\t} else {\n\t\t\tcontext.globalCompositeOperation = 'normal';\n\t\t}\n\t\t// Set the opacity of the layer\n\t\tcontext.globalAlpha = layer.opacity;\n\t\t// Draw the layer into the canvas context\n\t\tcontext.drawImage(layer.image, layer.position.x, layer.position.y);\n\t});\n\n\t// Loop this function! requestAnimationFrame is a special built in function that can draw to the canvas at 60 frames per second\n\t// NOTE: do not call drawCanvas() without using requestAnimationFrame here—things will crash!\n\trequestAnimationFrame(drawCanvas);\n}", "title": "" }, { "docid": "711453b616eca97c85ad4240e70d1b21", "score": "0.5751302", "text": "drawGameWindow() {\n this.canvas.setDrawOffset(this.gameWindow.left, this.gameWindow.top);\n\n if (!this.skierCaught) {\n this.skier.draw(this.canvas, this.assetManager); \n }\n if (this.isChaseStarted()) {\n this.getRhino().draw(this.canvas, this.assetManager, 2);\n }\n this.obstacleManager.drawObstacles(this.canvas, this.assetManager);\n this.powerupManager.drawPowerups(this.canvas, this.assetManager);\n }", "title": "" }, { "docid": "7156b9ab7b363a82fcb59cf9b6b98e3c", "score": "0.5745418", "text": "draw() {\n let pos;\n let x, y;\n let ctx;\n let widthtotalsteps;\n let widthcurrentstep;\n let tailwidthdiff;\n\n function _drawWithWrap(pos, diameter, color) {\n let x, y;\n let r;\n let wrapdx, wrapdy;\n\n ctx.fillStyle = color;\n\n x = pos.x;\n y = pos.y;\n r = diameter / 2;\n ctx.beginPath();\n ctx.arc(x * GRID_SCALE, y * GRID_SCALE, r * GRID_SCALE, 0, Math.PI * 2);\n ctx.fill();\n\n // if wraparound, draw again\n wrapdx = 0;\n wrapdy = 0;\n if (x + r >= GRID_WIDTH) {\n wrapdx = -GRID_WIDTH * GRID_SCALE;\n } else if (x - r < 0) {\n wrapdx = GRID_WIDTH * GRID_SCALE;\n }\n if (y + r >= GRID_HEIGHT) {\n wrapdy = -GRID_HEIGHT * GRID_SCALE;\n } else if (y - r < 0) {\n wrapdy = GRID_HEIGHT * GRID_SCALE;\n }\n if (wrapdx) {\n ctx.translate(wrapdx, 0);\n ctx.beginPath();\n ctx.arc(x * GRID_SCALE, y * GRID_SCALE, r * GRID_SCALE, 0, Math.PI * 2);\n ctx.fill();\n ctx.translate(-wrapdx, 0);\n }\n if (wrapdy) {\n ctx.translate(0, wrapdy);\n ctx.beginPath();\n ctx.arc(x * GRID_SCALE, y * GRID_SCALE, r * GRID_SCALE, 0, Math.PI * 2);\n ctx.fill();\n ctx.translate(0, -wrapdy);\n }\n if (wrapdx && wrapdy) {\n ctx.translate(wrapdx, wrapdy);\n ctx.beginPath();\n ctx.arc(x * GRID_SCALE, y * GRID_SCALE, r * GRID_SCALE, 0, Math.PI * 2);\n ctx.fill();\n ctx.translate(-wrapdx, -wrapdy);\n }\n }\n\n // get the canvas context\n ctx = gameCanvas.context;\n\n // draw snake from tail to head\n // drawn as a series of circles with tapered tail\n widthtotalsteps = SNAKE_TAIL_LENGTH / SNAKE_VELOCITY_SCALE;\n widthcurrentstep = SNAKE_TAIL_LENGTH / SNAKE_VELOCITY_SCALE;\n tailwidthdiff = this.bodywidth - SNAKE_TAIL_WIDTH;\n\n for (let i = this.body.length - 1; i > 0; i--) {\n pos = this.body[i];\n if (widthcurrentstep > 0) {\n widthcurrentstep -= 1;\n if (widthcurrentstep > widthtotalsteps * 2 / 3) {\n _drawWithWrap(pos, this.bodywidth - tailwidthdiff * (widthcurrentstep / widthtotalsteps), this.tailcolor);\n } else {\n _drawWithWrap(pos, this.bodywidth - tailwidthdiff * (widthcurrentstep / widthtotalsteps), this.bodycolor);\n }\n } else {\n _drawWithWrap(pos, this.bodywidth, this.bodycolor);\n }\n }\n _drawWithWrap(this.body[0], this.headwidth, this.headcolor);\n\n }", "title": "" }, { "docid": "1322073494f1abfaca17016526f0b925", "score": "0.57438326", "text": "function draw() {\n\n \t// *************************************\n \t// LAMP, WINDOW, FAN\n \t// *************************************\n\t\n\tmyFan.displayFan();\n\n\t// myWindow.hoverOver();\n\n\tmyLamp.drive();\n\tmyLamp.createLampZone();\n\tmyLamp.displayLamp();\n\n if (myLamp.lampOn == true) {\n\t\tmyLamp.toggleLamp();\n\t}\n\telse if (myWindow.windowOn == true) {\n\t\tmyWindow.toggleWindow();\n\t} else {\n\t\tnoTint();\n\t\tcolorMode(RGB, 255);\n\t}\n\n\t// *************************************\n \t// HOVER HAND for BACKGROUND\n \t// *************************************\n\n\tif (myLamp.hoverOver == true) {\n\t\tif (myLamp.lampOn == false) {\n\t\t\tmyLamp.highlightLamp();\n\t\t}\n\t\tmouseOver();\n\t} else if (myWindow.hoverOver() == true) {\n\t\tif (myWindow.windowOn == false) {\n\t\t\tmyWindow.highlightWindow();\n\t\t}\n\t\tmouseOver();\n\t} else if (myFan.hoverOver() == true && myLamp.lampOn == false && myWindow.windowOn == false) {\n\t\tif (myFan.fanOn == false) {\n\t\t\tmyFan.highlightFan();\n\t\t}\n\t\tmouseOver();\n\t}\n\n\t// *************************************\n \t// OBJECT ARRAY\n \t// *************************************\n\n \tfor (var i = 0; i < objects.length; i++) {\n \t\tif (objects[i].obj.enter == true) {\n\t \t\tobjects[i].obj.drive();\n\t \t} else {\n\t \t// } else if (myLamp.lampOn == false && myWindow.windowOn == false && myFan.fanOn == false) {\n\t \t\tobjects[i].obj.drift();\n\t \t}\n \t\tobjects[i].obj.createZone();\n \t\tobjects[i].obj.displayObject();\n \t\t// objects[i].obj.hoverDisplayHand();\n \t\tobjects[i].obj.hoverResetDrift();\n\n \t}\n\n\t// *************************************\n \t// CRUMBS - enters bottom to top\n \t// *************************************\n\n\tif (myCrumbs.enter == true) {\n\t\tmyCrumbs.drive(); \n\t} else {\n\t\tmyCrumbs.drift();\n\t}\n\tmyCrumbs.createCrumbZone();\n\tmyCrumbs.displayCrumbs();\n\tmyCrumbs.hoverResetDrift();\n\n\n}", "title": "" }, { "docid": "1d2f2e0881db7aece04387d7a4630291", "score": "0.5726239", "text": "function drawPostSetup() {\n clear_canvas();\n current_drawing.triangles.forEach(element => {\n drawFace(element)\n });\n if(pulse) {\n pulseFactor += .1\n }\n\n}", "title": "" }, { "docid": "24d44ee6352582e1cbca11e37015cc82", "score": "0.57237375", "text": "draw() {\r\n FutterNemo.crc2.beginPath();\r\n FutterNemo.crc2.moveTo(this.x, this.y);\r\n FutterNemo.crc2.quadraticCurveTo(this.x + 30, this.y - 35, this.x + 80, this.y + 20);\r\n FutterNemo.crc2.lineTo(this.x + 80, this.y - 10);\r\n FutterNemo.crc2.quadraticCurveTo(this.x + 30, this.y + 35, this.x, this.y);\r\n FutterNemo.crc2.fillStyle = \"orange\";\r\n FutterNemo.crc2.strokeStyle = \"orange\";\r\n FutterNemo.crc2.stroke();\r\n FutterNemo.crc2.fill();\r\n }", "title": "" }, { "docid": "d26c9f9368dc559c1ca1a03de3c6bb5b", "score": "0.5715309", "text": "doDrawingLoop() {\n const context = this.renderSurface.getRenderContext();\n this.sciChartRenderer.render(context);\n }", "title": "" }, { "docid": "e93e4a50bbf8e2b65e14c51bf5579361", "score": "0.5707931", "text": "function drawClockT() {\n drawFaceT(ctxT, radiusT);\n drawNumbersT(ctxT, radiusT);\n drawTimeT(ctxT, radiusT);\n}", "title": "" }, { "docid": "399dd7b4288bc3ff0a5fde0eefc1425e", "score": "0.57055455", "text": "draw() {\n const tetrisCtx = this.tetrisCanvas.getContext(\"2d\");\n const holdCtx = this.holdCanvas.getContext(\"2d\");\n const nextCtx = this.nextCanvas.getContext(\"2d\");\n\n this.playfield.draw(tetrisCtx);\n this.holdfield.draw(holdCtx);\n this.nextfield.draw(nextCtx);\n\n document.getElementById(this.gameComponents.score).innerText = this.score;\n document.getElementById(this.gameComponents.rows).innerText = this.rows;\n document.getElementById(this.gameComponents.level).innerText = this.level;\n document.getElementById(this.gameComponents.time).innerText = this.getTime();\n }", "title": "" }, { "docid": "ef9dc44fb2f0222151d70a762b1b2aa7", "score": "0.5688944", "text": "DrawTours() {\n for (let i = 0; i < this.parameters.TGP.tour_count; i++) {\n this.tours[i].TranslateOrigin()\n this.tours[i].IncStep()\n for (let j = 0; j < this.parameters.TGP.points_per_draw; j++)\n this.tours[i].Draw()\n this.tours[i].TranslateOrigin()\n }\n }", "title": "" }, { "docid": "6c05904e61240889c3b70034fea7312d", "score": "0.5684575", "text": "function drawDuck() \n{\n noStroke();\n\n push();\n //move the entire duck\n translate(loc.x, loc.y);\n scale(1.2); //scale the entire duck\n\n //TODO - this is where you will add the code to animation the legs - follow\n //the examples for the wings and neck \n fill(50);\n push();\n translate(0, 10); \n rotate(LegR); \n ellipse(5, 10, 5,20);\n ellipse(2, 20, 10, 2);\n pop();\n\n push();\n translate(0, 10);\n rotate(Leg2R); \n ellipse(-3, 10, 5,20);\n ellipse(-5, 20, 10, 2);\n pop();\n\n // draw body\n fill(0);\n ellipse(0, 0, 40, 30); \n\n //draw neck and head with possible animation transforms\n push();\n translate(-16, 0); //move into pivot position\n rotate(neckR); //rotate by neckR parameter\n ellipse(0, -10, 10, 18); //neck\n ellipse(0, -17, 14, 14); //head\n fill(255);\n ellipse(0, -19, 4, 4); //eye\n fill(50);\n triangle(-10, beakR, -4, -18, -4, -15);\n triangle(-10, beak2R, -4, -21, -4, -18); //beak\n pop();\n\n //draw wing with possible animation transforms\n fill(10);\n push();\n translate(-8, -5); //move into pivot position\n rotate(wingR); //animtion parameter to control wing flap\n ellipse(14, 0, 34, 20); //wing\n pop();\n\n pop();\n console.log(beakR)\n}", "title": "" }, { "docid": "31bcfe691dc01d9eb126183db1effb19", "score": "0.56802094", "text": "async drawCanvas() {\n\t\tsuper.drawCanvas();\n\n\t\tthis.context.drawImage(await this.backgroundImage, 0, 0);\n\t\tdraw.horizontalGradientSingle(this.context, 0, 30, 500, 90, draw.topColor1, draw.topColor2);\n\t\tdraw.triangle(this.context, 'rgb(28, 10, 87)', 500, 30, 450, 90, 500, 90);\n\t\tdraw.horizontalGradientSingle(this.context, 0, 90, 52, 399, draw.sideColor1, draw.sideColor2);\n\t\tdraw.horizontalGradientSingle(this.context, 584, 90, 640, 399, draw.sideColor1, draw.sideColor2);\n\n\t\tdraw.titleText(this.context, 'Local ', 'Forecast');\n\n\t\t// clear existing text\n\t\tdraw.box(this.context, 'rgb(33, 40, 90)', 65, 105, 505, 280);\n\t\t// Draw the text.\n\t\tthis.screenTexts[this.screenIndex].split('\\n').forEach((text, index) => {\n\t\t\tdraw.text(this.context, 'Star4000', '24pt', '#FFFFFF', 75, 140+40*index, text, 2);\n\t\t});\n\n\n\t\tthis.finishDraw();\n\t\tthis.setStatus(STATUS.loaded);\n\n\t}", "title": "" }, { "docid": "7ff0910eb40b65809daa325d0f67f1e7", "score": "0.5680155", "text": "function drawBike(b) {\n // For bike parts that are estimated due to lack of data\n var bike_parts_estimated = new Group();\n\n // For the bike wheels\n var bike_wheels = new Group();\n\n // For bike parts that we know the properties of\n var bike_parts = new Group();\n\n // Draw rear wheel\n var shapeRearWheel = new Shape.Circle(b.rear_wheel, b.wheel_size);\n bike_wheels.addChild(shapeRearWheel);\n\n // Draw front wheel\n var shapeFrontWheel = new Shape.Circle(b.front_wheel, b.wheel_size);\n bike_wheels.addChild(shapeFrontWheel);\n\n // Draw Head Tube\n var pathHeadTube = new Path.Line(b.steering_axis_top, b.head_tube_bottom);\n pathHeadTube.label = \"Head tube\";\n bike_parts.addChild(pathHeadTube);\n\n // Draw Down Tube. As this is estimated we move 80% up the head tube.\n var pathDownTube = new Path.Line(b.bottom_bracket, (pathHeadTube.getPointAt(pathHeadTube.length * 0.8)));\n bike_parts_estimated.addChild(pathDownTube);\n\n // Draw Seat Stay\n var pathSeatStay = new Path.Line(b.rear_wheel, b.seat_tube_top);\n bike_parts_estimated.addChild(pathSeatStay);\n\n // Draw Seat Post continuing from seat tube\n var pathSeatPost = new Path.Line(b.seat_tube_top, b.seat_post_top);\n bike_parts_estimated.addChild(pathSeatPost);\n\n // Draw handlebars from head tube\n var pathHandlebars = new Path.Line(b.steering_axis_top, b.handlebar_post_top);\n pathHandlebars.add(pathHandlebars.position + new Point(100, -25));\n pathHandlebars.smooth();\n bike_parts_estimated.addChild(pathHandlebars);\n\n // Draw chainstay\n var pathChainstay = new Path.Line(b.bottom_bracket, b.rear_wheel);\n pathChainstay.label = \"Chainstay\";\n bike_parts.addChild(pathChainstay);\n\n // Draw Seat Tube\n var pathSeatTube = new Path.Line(b.bottom_bracket, b.seat_tube_top);\n pathSeatTube.label = \"Seat tube\";\n bike_parts.addChild(pathSeatTube);\n\n // Draw Fork\n var pathFork = new Path.Line(b.head_tube_bottom, b.front_wheel);\n pathFork.label = \"Fork\";\n bike_parts.addChild(pathFork);\n\n //Draw Top Tube\n var pathTopTube = new Path.Line(b.seat_tube_top, b.steering_axis_top);\n pathTopTube.label = \"Top tube\";\n bike_parts.addChild(pathTopTube);\n\n // Draw bottom bracket\n var shapeBottomBracket = new Shape.Circle(b.bottom_bracket, 25);\n shapeBottomBracket.fillColor = window.globals.colours.component;\n shapeBottomBracket.label = \"Bottom bracket\";\n bike_parts.addChild(shapeBottomBracket);\n\n // Apply styling and interactivity to each bike part that we know the value of\n bike_parts.children.forEach(function (part) {\n part.set(window.globals.bike_part_settings);\n\n part.onMouseEnter = function () {\n window.globals.hover_label.content = part.label;\n part.strokeColor = window.globals.colours.hovered;\n part.bringToFront();\n };\n part.onMouseLeave = function () {\n window.globals.hover_label.content = \"\";\n part.strokeColor = window.globals.colours.component;\n part.bringToFront();\n }\n });\n\n bike_wheels.children.forEach(function (part) {\n part.set(window.globals.bike_wheel_settings);\n });\n\n bike_parts_estimated.children.forEach(function (part) {\n part.set(window.globals.bike_part_estimated_settings);\n });\n\n b.bike_group.addChild(bike_wheels);\n b.bike_group.addChild(bike_parts_estimated);\n b.bike_group.addChild(bike_parts);\n}", "title": "" }, { "docid": "215ec639845818e40e19685bb05553b2", "score": "0.5671795", "text": "function draw() {\n ///////////////////////////////////////////////\n background(245);\n ///////////////////////////////////////////////\n //var t0 = performance.now();\n ///////////////////////////////////////////////\n if (W1.show === 1) W1.draw();\n if (W2.show === 1) W2.draw();\n if (W3.show === 1) W3.draw();\n if (W4.show === 1) W4.draw();\n if (W5.show === 0) W5.draw();\n ///////////////////////////////////////////////\n \n\n ///////////////////////////////////////////////\n draw__info();\n draw__menu();\n draw__VCB();\n Terminal_Data_Packets.draw();\n /////////////////////////////////////////////// \n //var t1 = performance.now();\n /////////////////////////////////////////////// \n //loop();\n //info.announce(1, Terminal_Data_Packets.text_len, xText[4]);\n //mm_CC++;\n}", "title": "" }, { "docid": "c7f4e25f5bee6464144704a46bc6d3fa", "score": "0.5650078", "text": "function draw() {\n\n rotInc += 0.05;\n\n // Clear screen \n clear();\n\n // Draw transparent background\n background(0, 0);\n\n\n normalMaterial();\n push();\n translate(lastTrackablePosX * 10, lastTrackablePosY * 10);\n rotateX(lastTrackablePosX / 10);\n rotateY(lastTrackablePosY / 10);\n rotateZ(lastTrackablePosZ / 10);\n box(100);\n pop();\n\n // Set shape and color properties for circles\n /*stroke(255);\n strokeWeight(3);\n noFill();*/\n\n // Draw a circle for each finger on screen\n \t/*for (var i = 0; i < touches.length; i++) {\n\t\tellipse(touches[i].x, touches[i].y, 60, 60);\n \t}*/\n \n}", "title": "" }, { "docid": "e6f30063c793bbcf4117aacd5fde7d75", "score": "0.56440645", "text": "draw() {\n const drawer = this[__WEBPACK_IMPORTED_MODULE_7__const__[\"b\" /* DRAWER */]] || (this[__WEBPACK_IMPORTED_MODULE_7__const__[\"b\" /* DRAWER */]] = new __WEBPACK_IMPORTED_MODULE_0__draw__[\"a\" /* default */](this[__WEBPACK_IMPORTED_MODULE_7__const__[\"a\" /* CONTAINER */]]));\n // draw under layers first\n // IDEA: add some optimization options here for purely static layers\n // we shouldn't need to re-draw every item individually if they\n // haven't changed at all\n drawer.removeCanvases(this[__WEBPACK_IMPORTED_MODULE_7__const__[\"k\" /* ROOMS */]].length * 2);\n for (let i = this[__WEBPACK_IMPORTED_MODULE_7__const__[\"k\" /* ROOMS */]].length - 1; i >= 0; --i) {\n drawer.view(this[__WEBPACK_IMPORTED_MODULE_7__const__[\"r\" /* VIEWS */]][i]);\n for (let obj of this[__WEBPACK_IMPORTED_MODULE_7__const__[\"f\" /* OBJECTS */]][i]) {\n obj instanceof __WEBPACK_IMPORTED_MODULE_3__drawable__[\"b\" /* default */] && obj.draw(drawer.object(obj));\n }\n this[__WEBPACK_IMPORTED_MODULE_7__const__[\"k\" /* ROOMS */]][i] && this[__WEBPACK_IMPORTED_MODULE_7__const__[\"k\" /* ROOMS */]][i].draw(drawer);\n drawer.render(i);\n // draw GUI\n drawer.view(new __WEBPACK_IMPORTED_MODULE_1__struct__[\"d\" /* Rectangle */](0, 0, ...this.size));\n for (let obj of this[__WEBPACK_IMPORTED_MODULE_7__const__[\"f\" /* OBJECTS */]][i]) {\n obj instanceof __WEBPACK_IMPORTED_MODULE_3__drawable__[\"b\" /* default */] && obj.drawGUI(drawer.object(obj));\n }\n this[__WEBPACK_IMPORTED_MODULE_7__const__[\"k\" /* ROOMS */]][i] && this[__WEBPACK_IMPORTED_MODULE_7__const__[\"k\" /* ROOMS */]][i].drawGUI(drawer);\n drawer.render(this[__WEBPACK_IMPORTED_MODULE_7__const__[\"k\" /* ROOMS */]].length + i);\n }\n }", "title": "" }, { "docid": "f36622c2109d8e6fd0ab3e81ea3f5b11", "score": "0.564213", "text": "draw(degrees)\n {\n //Get canvas height and width.\n this.canvasWidth = this.canvas.clientWidth;\n this.canvasHeight = this.canvas.clientHeight;\n \n //Calculate the center of the canvas.\n this.canvasMiddleX = this.canvasWidth / 2;\n this.canvasMiddleY = this.canvasHeight / 2;\n\n //Calculate the drawing radius.\n this.radius = (this.canvasWidth > this.canvasHeight) ? \n this.canvasMiddleY : this.canvasMiddleX;\n this.radius *= this.radiusLen;\n\n //Clear the canvas.\n this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n\n //Calculate the direction of the wind in radians.\n this.direction = -Math.PI / 2 + Math.round(degrees) * this.oneDegree;\n\n var thisTheta;\n\n //Check if minor ticks are enabled.\n if(!(this.options & AWind.HIDE_MINOR_TICK))\n {\n //Prepare to draw 8 minor ticks.\n thisTheta = 0;\n\n //Draw the minor ticks.\n for(let i = 0; i < 16; i++)\n {\n //Dont draw minor ticks over the letters.\n if(i !== 0 && i !== 4 && i !== 8 && i !== 12)\n {\n this.drawLineAngle2(thisTheta, thisTheta, this.minorColor,\n this.radius * this.minorWidth, this.radius * this.minorTickLen,\n this.radius);\n }\n thisTheta += Math.PI / 8;\n }\n }\n\n //Check if major ticks are enabled.\n if(!(this.options & AWind.HIDE_MAJOR_TICK))\n {\n //Prepare to draw 4 major ticks.\n thisTheta = Math.PI / 4;\n\n //Draw the major ticks.\n for(let i = 0; i < 4; i++)\n {\n this.drawLineAngle2(thisTheta, thisTheta, this.majorColor, \n this.radius * this.majorWidth, this.radius * this.majorTickLen,\n this.radius);\n thisTheta += Math.PI / 2;\n }\n }\n\n //Check if the letter N are enabled.\n if(!(this.options & AWind.HIDE_N))\n {\n //Draw N.\n var textSize = this.radius * this.nRatio;\n this.ctx.font = textSize + \"px Arial\";\n this.ctx.fillStyle = this.nColor;\n this.ctx.fillText(\"N\", this.canvasMiddleX - textSize * .35, \n this.canvasMiddleY - this.radius * .85 + .50 * textSize);\n }\n\n //Check if the letters E, S and W are enabled.\n if(!(this.options & AWind.HIDE_ESW))\n {\n //Draw E, S, W.\n var textSize = this.radius * this.eswRatio;\n this.ctx.font = textSize + \"px Arial\";\n this.ctx.fillStyle = this.eswColor;\n this.ctx.fillText(\"E\", this.canvasMiddleX + this.radius - textSize * .80, \n this.canvasMiddleY + .40 * textSize);\n this.ctx.fillText(\"S\", this.canvasMiddleX - textSize * .35, \n this.canvasMiddleY + this.radius * .75 + .50 * textSize);\n this.ctx.fillText(\"W\", this.canvasMiddleX - this.radius + textSize * .15, \n this.canvasMiddleY + .40 * textSize);\n }\n\n //Check if arrow is enabled.\n if(!(this.options & AWind.HIDE_ARROW))\n {\n //Draw the back shaft portion of the wind vane.\n this.drawLineAngle2(this.direction, this.direction, this.arrowColor,\n this.radius * this.arrowWidth, 0, this.radius * .60);\n\n //Draw the front shaft portion of the wind vane.\n this.drawLineAngle2(this.direction + Math.PI, this.direction + Math.PI,\n this.arrowColor, this.radius * this.arrowWidth, 0,\n this.radius * .80);\n\n //Draw arrow front.\n this.drawLineAngle2(this.direction + Math.PI, this.direction + Math.PI + .2,\n this.arrowColor, this.radius * this.pointerWidth, \n this.radius * .78, this.radius * .60);\n this.drawLineAngle2(this.direction + Math.PI, this.direction + Math.PI - .2,\n this.arrowColor, this.radius * this.pointerWidth, this.radius * .78,\n this.radius * .60);\n\n //Draw arrow back.\n this.drawLineAngle2(this.direction, this.direction + .20, this.arrowColor,\n this.radius * this.pointerWidth, this.radius * .60, this.radius * .80);\n this.drawLineAngle2(this.direction, this.direction - .20, this.arrowColor,\n this.radius * this.pointerWidth, this.radius * .60, this.radius * .80);\n this.drawLineAngle2(this.direction, this.direction + .27, this.arrowColor,\n this.radius * this.pointerWidth, this.radius * .40, this.radius * .65);\n this.drawLineAngle2(this.direction, this.direction - .27, this.arrowColor,\n this.radius * this.pointerWidth, this.radius * .40, this.radius * .65);\n }\n\n //Check if center is enabled.\n if(!(this.options & AWind.HIDE_CENTER))\n {\n //Draw the center circle of the wind vane.\n this.drawArc(0, 2 * Math.PI, this.radius * this.centerWidth, this.centerColor,\n this.radius * this.centerWidth * 2);\n }\n }", "title": "" }, { "docid": "8a218efe9485a5034bf257268d5257ae", "score": "0.56340027", "text": "function draw() {\n drawPlane();\n drawWorm();\n dropBomb();\n drawBombs();\n removeBombs();\n }", "title": "" }, { "docid": "34fe806638da4ab2fdc75ffb04049d41", "score": "0.5632324", "text": "draw(){\n //draw itself\n painter.beginPath();\n painter.fillStyle = this.color;\n //making the object that is about to be painted\n painter.arc(this.x, this.y, this.size, 0, 2 * Math.PI);\n //filling said object with x color\n painter.fill();\n painter.strokeStyle = this.InvertedColor;\n //stroking only draws the borders of object x\n painter.stroke();\n }", "title": "" }, { "docid": "c0219bb5c5b283c56a5e8432f8b59c0e", "score": "0.56315744", "text": "draw() {\n\n // only the player if it is active... \n if (this.active){\n\n // Draw PLAYER WEAPON barrel... \n ctxDATA.beginPath();\n ctxDATA.strokeStyle = GREEN;\n ctxDATA.lineWidth = 3;\n ctxDATA.moveTo(this.x_hinge, this.y_hinge,);\n ctxDATA.lineTo(this.x_muz, this.y_muz);\n ctxDATA.stroke(); \n\n // attempt to draw the turret hinge.. \n ezCircle(this.x_hinge, this.y_hinge, this.r_hinge, 3, NUKE, NUKE);\n \n // attempt to draw the muzzle \n ctxDATA.beginPath();\n ctxDATA.arc(this.x_muz, this.y_muz, this.r_muz, 0, 2 * Math.PI, false);\n ctxDATA.lineWidth = 3;\n ctxDATA.strokeStyle = WHITE;\n ctxDATA.stroke();\n ctxDATA.fillStyle = BLACK;\n ctxDATA.fill(); \n\n // draw the turret base..\n ctxDATA.fillStyle = this.color; \n ctxDATA.fillRect(this.x, this.y, this.w, this.h);\n\n // end of the active check... \n }\n\n // end of the turret draw method \n }", "title": "" }, { "docid": "c0219bb5c5b283c56a5e8432f8b59c0e", "score": "0.56315744", "text": "draw() {\n\n // only the player if it is active... \n if (this.active){\n\n // Draw PLAYER WEAPON barrel... \n ctxDATA.beginPath();\n ctxDATA.strokeStyle = GREEN;\n ctxDATA.lineWidth = 3;\n ctxDATA.moveTo(this.x_hinge, this.y_hinge,);\n ctxDATA.lineTo(this.x_muz, this.y_muz);\n ctxDATA.stroke(); \n\n // attempt to draw the turret hinge.. \n ezCircle(this.x_hinge, this.y_hinge, this.r_hinge, 3, NUKE, NUKE);\n \n // attempt to draw the muzzle \n ctxDATA.beginPath();\n ctxDATA.arc(this.x_muz, this.y_muz, this.r_muz, 0, 2 * Math.PI, false);\n ctxDATA.lineWidth = 3;\n ctxDATA.strokeStyle = WHITE;\n ctxDATA.stroke();\n ctxDATA.fillStyle = BLACK;\n ctxDATA.fill(); \n\n // draw the turret base..\n ctxDATA.fillStyle = this.color; \n ctxDATA.fillRect(this.x, this.y, this.w, this.h);\n\n // end of the active check... \n }\n\n // end of the turret draw method \n }", "title": "" }, { "docid": "f7b23e7d78639193e438052961b93c38", "score": "0.5629119", "text": "function cokeBottle(x, y, speed) {\n this.speed = speed;\n this.x = x;\n this.y = y;\n this.move = function () {\n this.y += speed;\n }\n this.draw = function (ctx) {\n //bottle\n ctx.beginPath();\n ctx.moveTo(this.x, this.y);\n ctx.lineTo(this.x, this.y - 25);\n ctx.lineTo(this.x + 5, this.y - 30);\n ctx.lineTo(this.x + 5, this.y - 40);\n ctx.lineTo(this.x + 10, this.y - 40);\n ctx.lineTo(this.x + 10, this.y - 30);\n ctx.lineTo(this.x + 15, this.y - 25);\n ctx.lineTo(this.x + 15, this.y);\n ctx.lineTo(this.x + 13, this.y + 2);\n ctx.lineTo(this.x + 2, this.y + 2);\n ctx.lineTo(this.x, this.y);\n ctx.fillStyle = \"red\";\n ctx.fill();\n ctx.stroke();\n\n //(coffee)\n ctx.beginPath();\n ctx.moveTo(this.x + 7, this.y - 1);\n ctx.lineTo(this.x + 4, this.y - 5);\n ctx.moveTo(this.x + 7, this.y - 1);\n ctx.lineTo(this.x + 11, this.y - 5);\n //(o)\n ctx.moveTo(this.x + 4, this.y - 7);\n ctx.lineTo(this.x + 11, this.y - 7);\n ctx.lineTo(this.x + 11, this.y - 11);\n ctx.lineTo(this.x + 4, this.y - 11);\n ctx.lineTo(this.x + 4, this.y - 7);\n //:*\n ctx.moveTo(this.x + 4, this.y - 14);\n ctx.lineTo(this.x + 11, this.y - 14);\n ctx.moveTo(this.x + 7, this.y - 14);\n ctx.lineTo(this.x + 4, this.y - 18);\n ctx.moveTo(this.x + 7, this.y - 14);\n ctx.lineTo(this.x + 11, this.y - 18);\n //(e)\n ctx.moveTo(this.x + 4, this.y - 20);\n ctx.lineTo(this.x + 11, this.y - 20);\n ctx.lineTo(this.x + 11, this.y - 24);\n ctx.moveTo(this.x + 7, this.y - 20);\n ctx.lineTo(this.x + 7, this.y - 24);\n ctx.moveTo(this.x + 4, this.y - 20);\n ctx.lineTo(this.x + 4, this.y - 24);\n\n ctx.strokeStyle = \"black\";\n ctx.stroke();\n\n }\n }", "title": "" }, { "docid": "e2713a3ec7f76927e97ac10f35f50198", "score": "0.5619031", "text": "function draw() { \n \n // Background drawing\n drawBg();\n \n // Left pad\n padLeft.draw();\n // Right pad\n padRight.draw();\n \n // Draw the ball\n ball.draw();\n}", "title": "" }, { "docid": "ec436266d8dd3c34e43e1772b4c07743", "score": "0.56154597", "text": "draw() {\n\n // this.context.save()\n // this.context.translate(this.x, this.y)\n // this.context.rotate(this.angle)\n this.context.fillStyle = 'black'\n this.context.fillRect(this.x, this.y, this.width, this.height)\n // this.context.restore()\n\n }", "title": "" }, { "docid": "4daa0321787acae45d359c393cb25d71", "score": "0.5601377", "text": "draw() {\n this._predraw();\n const draw = new Draw(this.bar, this.token.w, this.h, this.tempText);\n this._draw(draw);\n this._postdraw();\n }", "title": "" }, { "docid": "9be379dfc8ac544df69938b488bf1f54", "score": "0.55782497", "text": "draw() {\n \n }", "title": "" }, { "docid": "07feb101cd98aae21022198042c403eb", "score": "0.55753684", "text": "function drawCylinder() {\n setMV() ;\n Cylinder.draw() ;\n}", "title": "" }, { "docid": "4d33caedcfe2b75185ae367ec26bb857", "score": "0.5573919", "text": "function onDraw() {\n\t\t// reset\n\t\tclearDisp();\n\t\t// draw\n\t\tsmallball();\n\t}", "title": "" }, { "docid": "8fc97490f57361c6b5d4fdf406c2c52e", "score": "0.5567557", "text": "drawCar() {\r\n\r\n //calculate size of squares\r\n let c = this.height / 10;\r\n\r\n // car body\r\n ctx.fillStyle = this.colour;\r\n ctx.beginPath();\r\n //boot curve\r\n ctx.bezierCurveTo(this.x + (c * 2), this.y + (c * 10), this.x + (c * 1), this.y + (c * 8), this.x + (c * 2), this.y + (c * 6));\r\n ctx.lineTo(this.x + (c * 4), this.y + (c * 5));\r\n //back window curve\r\n ctx.bezierCurveTo(this.x + (c * 5), this.y + (c * 4), this.x + (c * 3), this.y + (c * 1), this.x + (c * 6), this.y + (c * 1));\r\n //front window curve\r\n ctx.bezierCurveTo(this.x + (c * 18), this.y + (c * 1), this.x + (c * 15), this.y + (c * 1), this.x + (c * 15), this.y + (c * 5));\r\n ctx.lineTo(this.x + (c * 19), this.y + (c * 5));\r\n //front bonnet curve\r\n ctx.bezierCurveTo(this.x + (c * 19), this.y + (c * 5), this.x + (c * 21), this.y + (c * 5), this.x + (c * 18), this.y + (c * 10));\r\n ctx.lineTo(this.x + (c * 17), this.y + (c * 10));\r\n ctx.lineTo(this.x + (c * 2), this.y + (c * 10));\r\n ctx.fill();\r\n\r\n // text box\r\n ctx.fillStyle = 'white';\r\n ctx.strokeStyle = 'black 1px';\r\n ctx.font = '40px arial';\r\n ctx.fillText(this.number, this.x + (c * 8.5), this.y + (c * 8.5));\r\n ctx.strokeText(this.number, this.x + (c * 8.5), this.y + (c * 8.5));\r\n\r\n //window 1\r\n ctx.fillStyle = this.window;\r\n ctx.fillRect(this.x + (c * 5.5), this.y + (c * 2), (c * 3.5), (c * 3));\r\n\r\n //window 2\r\n ctx.fillStyle = this.window;\r\n ctx.fillRect(this.x + (c * 10), this.y + (c * 2), (c * 3.5), (c * 3));\r\n\r\n //Wheels\r\n ctx.fillStyle = 'black';\r\n this.drawWheel(this.x + (c * 6), this.y + (c * 10), c * 1.5);\r\n this.drawWheel(this.x + (c * 14), this.y + (c * 10), c * 1.5);\r\n\r\n }", "title": "" }, { "docid": "32ded3b4eb295d9dbe07104b6efde2fa", "score": "0.5563628", "text": "function draw() {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n ModelMatrix.setTranslate(0, 0, 0);\n ModelMatrix.setScale(g_aspect, 1, 1);\n ModelMatrix.translate(tracker.global_x_pos, tracker.global_y_pos, tracker.global_z_pos);\n ModelMatrix.rotate(tracker.global_x_rot, 1, 0, 0);\n ModelMatrix.rotate(tracker.global_y_rot + g_angle, 0, 1, 0);\n ModelMatrix.rotate(tracker.global_z_rot, 0, 0, 1);\n ModelMatrix.scale(tracker.global_x_scale, tracker.global_y_scale, tracker.global_z_scale);\n\n for (var i = 0; i < dragonfly_count; i++) {\n drawDragonfly(i);\n }\n\n for (var i = 0; i < cattail_count; i++) {\n drawCattail(g_cattails[i][0], g_cattails[i][1], g_cattails[i][2], g_cattails[i][3]);\n }\n}", "title": "" }, { "docid": "25293e42a5e79204bbb34784d5fda261", "score": "0.5557424", "text": "function renderCanvas() {\r\n\t\tif (drawing) {\r\n\t\t\tctx.moveTo(prevPos.x, prevPos.y);\r\n\t\t\tctx.lineTo(nextPos.x, nextPos.y);\r\n\t\t\tctx.stroke();\r\n\t\t\tprevPos = nextPos;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9d9f93bf09024079f3ef0bd9a984e03c", "score": "0.5555204", "text": "function drawPuck() {\n ctx.beginPath();\n ctx.arc(xPuck, yPuck, rPuck, 0, Math.PI*2);\n ctx.fillStyle = 'black';\n ctx.fill();\n}", "title": "" }, { "docid": "85fb1a07c118ebbd95f3f04ce5ed955f", "score": "0.554571", "text": "function draw(c, counting) {\nc.strokeStyle = \"#000\";\n\n\n switch (counting) {\n\n case 2://base\n c.lineWidth = 10;\n c.moveTo(20,400);\n c.lineTo(280,400);\n c.stroke();\n break;\n\n case 3://stand\n c.moveTo(50,400);\n c.lineTo(50,50);\n c.stroke();\n break;\n\n case 4://\n c.moveTo(45,50);\n c.lineTo(200,50);\n c.stroke();\n break;\n\n case 5: // robe\n c.moveTo(200,45);\n c.lineTo(200,100);\n c.stroke();\n break;\n\n case 6: // head\n c.lineWidth = 4;\n c.translate(200,150);\n circle(c);\n break;\n\n case 7: // body\n c.lineWidth = 4;\n c.moveTo(0,50);\n c.lineTo(0,150);\n c.stroke();\n break;\n\n case 8: // left arm\n c.lineWidth = 4;\n c.moveTo(0,50);\n c.lineTo(-80,100);\n c.stroke();\n break;\n\n case 9: // right arm\n c.lineWidth = 4;\n c.moveTo(0,50);\n c.lineTo(80,100);\n c.stroke();\n break;\n\n case 10:// left leg\n c.lineWidth = 4;\n c.moveTo(0,150);\n c.lineTo(-80,200);\n c.stroke();\n \n break;\n\n case 11:// right leg\n c.lineWidth = 4;\n c.moveTo(0,150);\n c.lineTo(80,200);\n c.stroke();\n break;\n\n }\n return;\n \n}", "title": "" }, { "docid": "935bddd82dca0cb22746a731b6bff01f", "score": "0.5539285", "text": "function mainDraw() {\n solarSystem.tick();\n window.requestAnimationFrame(mainDraw);\n }", "title": "" }, { "docid": "a3adbb7b4aa2b295c7dd14fb267d8cd1", "score": "0.5535384", "text": "draw(canvas) {\n canvas.saveTransform();\n canvas.translate(this.x + 0.5, this.y + 0.5);\n canvas.fillRect(-this.size, -this.size, this.size*2, this.size*2);\n if (this.size > 0.1) {\n canvas.strokeLine(0.05,0.1-this.size,0.1-this.size,this.size-0.1,this.size-0.1);\n canvas.strokeLine(0.05,0.1-this.size,this.size-0.1,this.size-0.1,0.1-this.size);\n }\n canvas.restoreTransform();\n }", "title": "" }, { "docid": "87d937700ac211e2d779a0566eae104b", "score": "0.55347323", "text": "function animation_loop() {\n if (canvas.getContext) {\n // every frame, this erases the canvas for the whole window (every frame we redraw the shapes).\n ctx.clearRect(0, 0, window.innerWidth * 2, window.innerHeight * 2);\n drawTank(tank_x, tank_y, angle);\n }\n\n if (movingForward) {\n tank_x += Math.cos(angle) * speed;\n tank_y += Math.sin(angle) * speed;\n }\n /*\n// code for if you want to turn using keys\n if (turnLeft) {\n angle -= 0.1;\n }\n if (turnRight) {\n angle += 0.1;\n }\n */\n\n // don't worry about this... but if you want to animate something, this has to be called at the end of your draw function. It's what's called a \"recurive call\"\n window.requestAnimationFrame(animation_loop);\n}", "title": "" }, { "docid": "87a5f233a4cc754dbff9392037266711", "score": "0.5533741", "text": "function draw() {\n updateButtons();\n\n makeGrid();\n\n borderR.position(canvas.position().x + width, size * 10);\n currentSelection.position(canvas.position().x + width, height / 4);\n info.position(canvas.position().x + width, height / 2.5);\n\n currentSelection.html(currentType + '<br>' + currentTile + '<br>' + currentTier);\n info.html('Pylons can be connected<br>if within a 4 block square<br>radius of each other.');\n\n elements.forEach(e => { e.show() });\n if (showBorders)\n drawBorders();\n\n let gridX = Math.floor(mouseX / size);\n let gridY = Math.floor(mouseY / size);\n\n if (checkPos(gridX, gridY)) {\n drawPreview(gridX, gridY, currentTile, currentType, currentTier);\n }\n}", "title": "" }, { "docid": "9074c2da3df00f937b364d630cff0552", "score": "0.55312914", "text": "_draw( timestamp ) {\n\t\tconst ctx = this._canvasCtx,\n\t\t\t canvas = ctx.canvas,\n\t\t\t canvasX = this._scaleX.canvas,\n\t\t\t canvasR = this._scaleR.canvas,\n\t\t\t energy = this._energy,\n\t\t\t isOctaveBands = this._isOctaveBands,\n\t\t\t isLedDisplay = this._isLedDisplay,\n\t\t\t isLumiBars = this._isLumiBars,\n\t\t\t isRadial = this._radial,\n\t\t\t isStereo = this._stereo,\n\t\t\t lineWidth = +this.lineWidth, // make sure the damn thing is a number!\n\t\t\t mirrorMode = this._mirror,\n\t\t\t mode = this._mode,\n\t\t\t channelHeight = this._channelHeight,\n\t\t\t channelGap = this._channelGap,\n\t\t\t analyzerHeight = this._analyzerHeight,\n\t\t\t analyzerWidth = isRadial ? canvas.width : this._analyzerWidth,\n\t\t\t initialX = this._initialX,\n\t\t\t finalX = initialX + analyzerWidth,\n\t\t\t centerX = canvas.width >> 1,\n\t\t\t centerY = canvas.height >> 1,\n\t\t\t radius = this._radius,\n\t\t\t maxBarHeight = isRadial ? Math.min( centerX, centerY ) - radius : analyzerHeight,\n\t\t\t useCanvas = this.useCanvas;\n\n\t\tif ( energy.val > 0 )\n\t\t\tthis._spinAngle += this._spinSpeed * RPM;\n\n\t\t// helper function - convert planar X,Y coordinates to radial coordinates\n\t\tconst radialXY = ( x, y, dir ) => {\n\t\t\tconst height = radius + y,\n\t\t\t\t angle = dir * TAU * ( x / canvas.width ) + this._spinAngle;\n\n\t\t\treturn [ centerX + height * Math.cos( angle ), centerY + height * Math.sin( angle ) ];\n\t\t}\n\n\t\t// helper function - draw a polygon of width `w` and height `h` at (x,y) in radial mode\n\t\tconst radialPoly = ( x, y, w, h ) => {\n\t\t\tfor ( const dir of ( mirrorMode ? [1,-1] : [1] ) ) {\n\t\t\t\tctx.moveTo( ...radialXY( x, y, dir ) );\n\t\t\t\tctx.lineTo( ...radialXY( x, y + h, dir ) );\n\t\t\t\tctx.lineTo( ...radialXY( x + w, y + h, dir ) );\n\t\t\t\tctx.lineTo( ...radialXY( x + w, y, dir ) );\n\t\t\t}\n\t\t}\n\n\t\t// LED attributes and helper function for bar height calculation\n\t\tconst [ ledCount, ledSpaceH, ledSpaceV, ledHeight ] = this._leds || [];\n\t\tconst ledPosY = height => ( height * ledCount | 0 ) * ( ledHeight + ledSpaceV ) - ledSpaceV;\n\n\t\t// select background color\n\t\tconst bgColor = ( ! this.showBgColor || isLedDisplay && ! this.overlay ) ? '#000' : this._gradients[ this._gradient ].bgColor;\n\n\t\t// compute the effective bar width, considering the selected bar spacing\n\t\t// if led effect is active, ensure at least the spacing from led definitions\n\t\tlet width = this._barWidth - ( ! isOctaveBands ? 0 : Math.max( isLedDisplay ? ledSpaceH : 0, this._barSpacePx ) );\n\n\t\t// make sure width is integer for pixel accurate calculation, when no bar spacing is required\n\t\tif ( this._barSpace == 0 && ! isLedDisplay )\n\t\t\twidth |= 0;\n\n\t\tlet currentEnergy = 0;\n\n\t\tconst nBars = this._bars.length;\n\n\t\tfor ( let channel = 0; channel < isStereo + 1; channel++ ) {\n\n\t\t\tconst channelTop = channelHeight * channel + channelGap * channel,\n\t\t\t\t channelBottom = channelTop + channelHeight,\n\t\t\t\t analyzerBottom = channelTop + analyzerHeight - ( isLedDisplay && ! this._maximizeLeds ? ledSpaceV : 0 );\n\n\t\t\tif ( useCanvas ) {\n\t\t\t\t// clear the channel area, if in overlay mode\n\t\t\t\t// this is done per channel to clear any residue below 0 off the top channel (especially in line graph mode with lineWidth > 1)\n\t\t\t\tif ( this.overlay )\n\t\t\t\t\tctx.clearRect( 0, channelTop - channelGap, canvas.width, channelHeight + channelGap );\n\n\t\t\t\t// fill the analyzer background if needed (not overlay or overlay + showBgColor)\n\t\t\t\tif ( ! this.overlay || this.showBgColor ) {\n\t\t\t\t\tif ( this.overlay )\n\t\t\t\t\t\tctx.globalAlpha = this.bgAlpha;\n\n\t\t\t\t\tctx.fillStyle = bgColor;\n\n\t\t\t\t\t// exclude the reflection area when overlay is true and reflexAlpha == 1 (avoids alpha over alpha difference, in case bgAlpha < 1)\n\t\t\t\t\tif ( ! isRadial || channel == 0 )\n\t\t\t\t\t\tctx.fillRect( initialX, channelTop - channelGap, analyzerWidth, ( this.overlay && this.reflexAlpha == 1 ? analyzerHeight : channelHeight ) + channelGap );\n\n\t\t\t\t\tctx.globalAlpha = 1;\n\t\t\t\t}\n\n\t\t\t\t// draw dB scale (Y-axis)\n\t\t\t\tif ( this.showScaleY && ! isLumiBars && ! isRadial ) {\n\t\t\t\t\tconst scaleWidth = canvasX.height,\n\t\t\t\t\t\t fontSize = scaleWidth >> 1,\n\t\t\t\t\t\t mindB = this._analyzer[0].minDecibels,\n\t\t\t\t\t\t maxdB = this._analyzer[0].maxDecibels,\n\t\t\t\t\t\t interval = analyzerHeight / ( maxdB - mindB );\n\n\t\t\t\t\tctx.fillStyle = '#888';\n\t\t\t\t\tctx.font = `${fontSize}px sans-serif`;\n\t\t\t\t\tctx.textAlign = 'right';\n\t\t\t\t\tctx.lineWidth = 1;\n\n\t\t\t\t\tfor ( let db = maxdB; db > mindB; db -= 5 ) {\n\t\t\t\t\t\tconst posY = channelTop + ( maxdB - db ) * interval,\n\t\t\t\t\t\t\t even = ( db % 2 == 0 ) | 0;\n\n\t\t\t\t\t\tif ( even ) {\n\t\t\t\t\t\t\tconst labelY = posY + fontSize * ( posY == channelTop ? .8 : .35 );\n\t\t\t\t\t\t\tif ( mirrorMode != -1 )\n\t\t\t\t\t\t\t\tctx.fillText( db, scaleWidth * .85, labelY );\n\t\t\t\t\t\t\tif ( mirrorMode != 1 )\n\t\t\t\t\t\t\t\tctx.fillText( db, canvas.width - scaleWidth * .1, labelY );\n\t\t\t\t\t\t\tctx.strokeStyle = '#888';\n\t\t\t\t\t\t\tctx.setLineDash([2,4]);\n\t\t\t\t\t\t\tctx.lineDashOffset = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tctx.strokeStyle = '#555';\n\t\t\t\t\t\t\tctx.setLineDash([2,8]);\n\t\t\t\t\t\t\tctx.lineDashOffset = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\tctx.moveTo( initialX + scaleWidth * even * ( mirrorMode != -1 ), ~~posY + .5 ); // for sharp 1px line (https://stackoverflow.com/a/13879402/2370385)\n\t\t\t\t\t\tctx.lineTo( finalX - scaleWidth * even * ( mirrorMode != 1 ), ~~posY + .5 );\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t}\n\t\t\t\t\t// restore line properties\n\t\t\t\t\tctx.setLineDash([]);\n\t\t\t\t\tctx.lineDashOffset = 0;\n\t\t\t\t}\n\n\t\t\t\t// set line width and dash for LEDs effect\n\t\t\t\tif ( isLedDisplay ) {\n\t\t\t\t\tctx.setLineDash( [ ledHeight, ledSpaceV ] );\n\t\t\t\t\tctx.lineWidth = width;\n\t\t\t\t}\n\n\t\t\t\t// set selected gradient for fill and stroke\n\t\t\t\tctx.fillStyle = ctx.strokeStyle = this._canvasGradient;\n\t\t\t} // if ( useCanvas )\n\n\t\t\t// get a new array of data from the FFT\n\t\t\tconst fftData = this._fftData[ channel ];\n\t\t\tthis._analyzer[ channel ].getByteFrequencyData( fftData );\n\n\t\t\t// helper function for FFT data interpolation\n\t\t\tconst interpolate = ( bin, ratio ) => fftData[ bin ] + ( fftData[ bin + 1 ] - fftData[ bin ] ) * ratio;\n\n\t\t\t// start drawing path\n\t\t\tctx.beginPath();\n\n\t\t\t// draw bars / lines\n\n\t\t\tlet points = []; // store line graph (mode 10) points to create mirror effect in radial mode\n\n\t\t\tfor ( let i = 0; i < nBars; i++ ) {\n\n\t\t\t\tconst bar = this._bars[ i ],\n\t\t\t\t\t { binLo, binHi, ratioLo, ratioHi } = bar;\n\n\t\t\t\tlet barHeight = Math.max( interpolate( binLo, ratioLo ), interpolate( binHi, ratioHi ) );\n\n\t\t\t\t// check additional bins (if any) for this bar and keep the highest value\n\t\t\t\tfor ( let j = binLo + 1; j < binHi; j++ ) {\n\t\t\t\t\tif ( fftData[ j ] > barHeight )\n\t\t\t\t\t\tbarHeight = fftData[ j ];\n\t\t\t\t}\n\n\t\t\t\tbarHeight /= 255;\n\t\t\t\tbar.value[ channel ] = barHeight;\n\t\t\t\tcurrentEnergy += barHeight;\n\n\t\t\t\t// update bar peak\n\t\t\t\tif ( bar.peak[ channel ] > 0 ) {\n\t\t\t\t\tbar.hold[ channel ]--;\n\t\t\t\t\t// if hold is negative, it becomes the \"acceleration\" for peak drop\n\t\t\t\t\tif ( bar.hold[ channel ] < 0 )\n\t\t\t\t\t\tbar.peak[ channel ] += bar.hold[ channel ] / maxBarHeight;\n\t\t\t\t}\n\n\t\t\t\t// check if it's a new peak for this bar\n\t\t\t\tif ( barHeight >= bar.peak[ channel ] ) {\n\t\t\t\t\tbar.peak[ channel ] = barHeight;\n\t\t\t\t\tbar.hold[ channel ] = 30; // set peak hold time to 30 frames (0.5s)\n\t\t\t\t}\n\n\t\t\t\t// if not using the canvas, move earlier to the next bar\n\t\t\t\tif ( ! useCanvas )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// set opacity for lumi bars before barHeight value is normalized\n\t\t\t\tif ( isLumiBars )\n\t\t\t\t\tctx.globalAlpha = barHeight;\n\n\t\t\t\t// normalize barHeight\n\t\t\t\tif ( isLedDisplay ) {\n\t\t\t\t\tbarHeight = ledPosY( barHeight );\n\t\t\t\t\tif ( barHeight < 0 )\n\t\t\t\t\t\tbarHeight = 0; // prevent showing leds below 0 when overlay and reflex are active\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tbarHeight = barHeight * maxBarHeight | 0;\n\n\t\t\t\t// invert bar for radial channel 1\n\t\t\t\tif ( isRadial && channel == 1 )\n\t\t\t\t\tbarHeight *= -1;\n\n\t\t\t\t// bar width may need small adjustments for some bars, when barSpace == 0\n\t\t\t\tlet adjWidth = width,\n\t\t\t\t\tposX = bar.posX;\n\n\t\t\t\t// Draw current bar or line segment\n\n\t\t\t\tif ( mode == 10 ) {\n\t\t\t\t\t// compute the average between the initial bar (i==0) and the next one\n\t\t\t\t\t// used to smooth the curve when the initial posX is off the screen, in mirror and radial modes\n\t\t\t\t\tconst nextBarAvg = i ? 0 : ( fftData[ this._bars[1].binLo ] / 255 * maxBarHeight * ( ! isRadial || ! channel || - 1 ) + barHeight ) / 2;\n\n\t\t\t\t\tif ( isRadial ) {\n\t\t\t\t\t\tif ( i == 0 )\n\t\t\t\t\t\t\tctx.lineTo( ...radialXY( 0, ( posX < 0 ? nextBarAvg : barHeight ), 1 ) );\n\t\t\t\t\t\t// draw line to the current point, avoiding overlapping wrap-around frequencies\n\t\t\t\t\t\tif ( posX >= 0 ) {\n\t\t\t\t\t\t\tconst point = [ posX, barHeight ];\n\t\t\t\t\t\t\tctx.lineTo( ...radialXY( ...point, 1 ) );\n\t\t\t\t\t\t\tpoints.push( point );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse { // Linear\n\t\t\t\t\t\tif ( i == 0 ) {\n\t\t\t\t\t\t\t// start the line off-screen using the previous FFT bin value as the initial amplitude\n\t\t\t\t\t\t\tif ( mirrorMode != -1 ) {\n\t\t\t\t\t\t\t\tconst prevFFTData = binLo ? fftData[ binLo - 1 ] / 255 * maxBarHeight : barHeight; // use previous FFT bin value, when available\n\t\t\t\t\t\t\t\tctx.moveTo( initialX - lineWidth, analyzerBottom - prevFFTData );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tctx.moveTo( initialX, analyzerBottom - ( posX < initialX ? nextBarAvg : barHeight ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// draw line to the current point\n\t\t\t\t\t\t// avoid X values lower than the origin when mirroring left, otherwise draw them for best graph accuracy\n\t\t\t\t\t\tif ( mirrorMode != -1 || posX >= initialX )\n\t\t\t\t\t\t\tctx.lineTo( posX, analyzerBottom - barHeight );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ( mode > 0 ) {\n\t\t\t\t\t\tif ( isLedDisplay )\n\t\t\t\t\t\t\tposX += Math.max( ledSpaceH / 2, this._barSpacePx / 2 );\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif ( this._barSpace == 0 ) {\n\t\t\t\t\t\t\t\tposX |= 0;\n\t\t\t\t\t\t\t\tif ( i > 0 && posX > this._bars[ i - 1 ].posX + width ) {\n\t\t\t\t\t\t\t\t\tposX--;\n\t\t\t\t\t\t\t\t\tadjWidth++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tposX += this._barSpacePx / 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isLedDisplay ) {\n\t\t\t\t\t\tconst x = posX + width / 2;\n\t\t\t\t\t\t// draw \"unlit\" leds\n\t\t\t\t\t\tif ( this.showBgColor && ! this.overlay ) {\n\t\t\t\t\t\t\tconst alpha = ctx.globalAlpha;\n\t\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\t\tctx.moveTo( x, channelTop );\n\t\t\t\t\t\t\tctx.lineTo( x, analyzerBottom );\n\t\t\t\t\t\t\tctx.strokeStyle = '#7f7f7f22';\n\t\t\t\t\t\t\tctx.globalAlpha = 1;\n\t\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t\t\t// restore properties\n\t\t\t\t\t\t\tctx.strokeStyle = ctx.fillStyle;\n\t\t\t\t\t\t\tctx.globalAlpha = alpha;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\tctx.moveTo( x, isLumiBars ? channelTop : analyzerBottom );\n\t\t\t\t\t\tctx.lineTo( x, isLumiBars ? channelBottom : analyzerBottom - barHeight );\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t}\n\t\t\t\t\telse if ( posX >= initialX ) {\n\t\t\t\t\t\tif ( isRadial )\n\t\t\t\t\t\t\tradialPoly( posX, 0, adjWidth, barHeight );\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tctx.fillRect( posX, isLumiBars ? channelTop : analyzerBottom, adjWidth, isLumiBars ? channelBottom : -barHeight );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Draw peak\n\t\t\t\tif ( bar.peak[ channel ] > 0 && this.showPeaks && ! isLumiBars && posX >= initialX && posX < finalX ) {\n\t\t\t\t\tif ( isLedDisplay )\n\t\t\t\t\t\tctx.fillRect( posX,\tanalyzerBottom - ledPosY( bar.peak[ channel ] ), width, ledHeight );\n\t\t\t\t\telse if ( ! isRadial )\n\t\t\t\t\t\tctx.fillRect( posX, analyzerBottom - bar.peak[ channel ] * maxBarHeight, adjWidth, 2 );\n\t\t\t\t\telse if ( mode != 10 ) // radial - no peaks for mode 10\n\t\t\t\t\t\tradialPoly( posX, bar.peak[ channel ] * maxBarHeight * ( ! channel || -1 ), adjWidth, -2 );\n\t\t\t\t}\n\n\t\t\t} // for ( let i = 0; i < nBars; i++ )\n\n\t\t\t// if not using the canvas, move earlier to the next channel\n\t\t\tif ( ! useCanvas )\n\t\t\t\tcontinue;\n\n\t\t\t// restore global alpha\n\t\t\tctx.globalAlpha = 1;\n\n\t\t\t// Fill/stroke drawing path for mode 10 and radial\n\t\t\tif ( mode == 10 ) {\n\t\t\t\tif ( isRadial ) {\n\t\t\t\t\tif ( mirrorMode ) {\n\t\t\t\t\t\tlet p;\n\t\t\t\t\t\twhile ( p = points.pop() )\n\t\t\t\t\t\t\tctx.lineTo( ...radialXY( ...p, -1 ) );\n\t\t\t\t\t}\n\t\t\t\t\tctx.closePath();\n\t\t\t\t}\n\n\t\t\t\tif ( lineWidth > 0 ) {\n\t\t\t\t\tctx.lineWidth = lineWidth;\n\t\t\t\t\tctx.stroke();\n\t\t\t\t}\n\n\t\t\t\tif ( this.fillAlpha > 0 ) {\n\t\t\t\t\tif ( isRadial ) {\n\t\t\t\t\t\t// exclude the center circle from the fill area\n\t\t\t\t\t\tctx.moveTo( centerX + radius, centerY );\n\t\t\t\t\t\tctx.arc( centerX, centerY, radius, 0, TAU, true );\n\t\t\t\t\t}\n\t\t\t\t\telse { // close the fill area\n\t\t\t\t\t\tctx.lineTo( finalX, analyzerBottom );\n\t\t\t\t\t\tctx.lineTo( initialX, analyzerBottom );\n\t\t\t\t\t}\n\n\t\t\t\t\tctx.globalAlpha = this.fillAlpha;\n\t\t\t\t\tctx.fill();\n\t\t\t\t\tctx.globalAlpha = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( isRadial ) {\n\t\t\t\tctx.fill();\n\t\t\t}\n\n\t\t\t// Reflex effect\n\t\t\tif ( this._reflexRatio > 0 && ! isLumiBars ) {\n\t\t\t\tlet posY, height;\n\t\t\t\tif ( this.reflexFit || isStereo ) { // always fit reflex in stereo mode\n\t\t\t\t\tposY = isStereo && channel == 0 ? channelHeight + channelGap : 0;\n\t\t\t\t\theight = channelHeight - analyzerHeight;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tposY = canvas.height - analyzerHeight * 2;\n\t\t\t\t\theight = analyzerHeight;\n\t\t\t\t}\n\n\t\t\t\t// set alpha and brightness for the reflection\n\t\t\t\tctx.globalAlpha = this.reflexAlpha;\n\t\t\t\tif ( this.reflexBright != 1 )\n\t\t\t\t\tctx.filter = `brightness(${this.reflexBright})`;\n\n\t\t\t\t// create the reflection\n\t\t\t\tctx.setTransform( 1, 0, 0, -1, 0, canvas.height );\n\t\t\t\tctx.drawImage( canvas, 0, channelTop, canvas.width, analyzerHeight, 0, posY, canvas.width, height );\n\n\t\t\t\t// reset changed properties\n\t\t\t\tctx.setTransform( 1, 0, 0, 1, 0, 0 );\n\t\t\t\tctx.filter = 'none';\n\t\t\t\tctx.globalAlpha = 1;\n\t\t\t}\n\n\t\t} // for ( let channel = 0; channel < isStereo + 1; channel++ ) {\n\n\t\t// Update energy\n\t\tenergy.val = currentEnergy / ( nBars << isStereo );\n\t\tif ( energy.val >= energy.peak ) {\n\t\t\tenergy.peak = energy.val;\n\t\t\tenergy.hold = 30;\n\t\t}\n\t\telse {\n\t\t\tif ( energy.hold > 0 )\n\t\t\t\tenergy.hold--;\n\t\t\telse if ( energy.peak > 0 )\n\t\t\t\tenergy.peak *= ( 30 + energy.hold-- ) / 30; // decay (drops to zero in 30 frames)\n\t\t}\n\n\t\tif ( useCanvas ) {\n\t\t\t// Mirror effect\n\t\t\tif ( mirrorMode && ! isRadial ) {\n\t\t\t\tctx.setTransform( -1, 0, 0, 1, canvas.width - initialX, 0 );\n\t\t\t\tctx.drawImage( canvas, initialX, 0, centerX, canvas.height, 0, 0, centerX, canvas.height );\n\t\t\t\tctx.setTransform( 1, 0, 0, 1, 0, 0 );\n\t\t\t}\n\n\t\t\t// restore solid lines\n\t\t\tctx.setLineDash([]);\n\n\t\t\t// draw frequency scale (X-axis)\n\t\t\tif ( this.showScaleX ) {\n\t\t\t\tif ( isRadial ) {\n\t\t\t\t\tctx.save();\n\t\t\t\t\tctx.translate( centerX, centerY );\n\t\t\t\t\tif ( this._spinSpeed )\n\t\t\t\t\t\tctx.rotate( this._spinAngle + HALF_PI );\n\t\t\t\t\tctx.drawImage( canvasR, -canvasR.width >> 1, -canvasR.width >> 1 );\n\t\t\t\t\tctx.restore();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tctx.drawImage( canvasX, 0, canvas.height - canvasX.height );\n\t\t\t}\n\t\t}\n\n\t\t// calculate and update current frame rate\n\n\t\tthis._frame++;\n\t\tconst elapsed = timestamp - this._time;\n\n\t\tif ( elapsed >= 1000 ) {\n\t\t\tthis._fps = this._frame / ( elapsed / 1000 );\n\t\t\tthis._frame = 0;\n\t\t\tthis._time = timestamp;\n\t\t}\n\t\tif ( this.showFPS ) {\n\t\t\tconst size = canvasX.height;\n\t\t\tctx.font = `bold ${size}px sans-serif`;\n\t\t\tctx.fillStyle = '#0f0';\n\t\t\tctx.textAlign = 'right';\n\t\t\tctx.fillText( Math.round( this._fps ), canvas.width - size, size * 2 );\n\t\t}\n\n\t\t// call callback function, if defined\n\t\tif ( this.onCanvasDraw ) {\n\t\t\tctx.save();\n\t\t\tctx.fillStyle = ctx.strokeStyle = this._canvasGradient;\n\t\t\tthis.onCanvasDraw( this );\n\t\t\tctx.restore();\n\t\t}\n\n\t\t// schedule next canvas update\n\t\tthis._runId = requestAnimationFrame( timestamp => this._draw( timestamp ) );\n\t}", "title": "" }, { "docid": "7cb982b81a9c0747158d545a48afcd0e", "score": "0.5527594", "text": "function draw() {\n if (self.currentShapes == 'circles') {\n drawCircles();\n } else if (self.currentShapes == 'triangles') {\n drawTriangles();\n } else {\n drawRectangles();\n }\n }", "title": "" }, { "docid": "3390a6ff776ce58e24b1581d7a742694", "score": "0.55239135", "text": "redraw()\n\t{\n\t\tif ( this._ctx )\n\t\t{\n\t\t\t// Rectangle size\n\t\t\tvar rs = this._size + 2*this._border;\n\t\t\tthis._ctx.clearRect( 0, 0, rs, rs );\n\n\t\t\tif ( this.BackgroundImage )\n\t\t\t{\n\t\t\t\tthis._ctx.drawImage( this.BackgroundImage, this._border, this._border, this._size, this._size );\n\t\t\t}\n\t\t\tif ( this.Colours.Background )\n\t\t\t{\n\t\t\t\tthis._ctx.fillStyle = this.Colours.Background;\n\t\t\t\tthis._ctx.fillRect( this._border, this._border, this._size, this._size );\n\t\t\t}\n\n\t\t\tvar b = this._border;\n\t\t\tvar s = this._size;\n\t\t\tvar x = this._size / 8;\n\n\t\t\tif ( this.Colours.ChessSquares )\n\t\t\t{\n\t\t\t\tthis._ctx.fillStyle = this.Colours.ChessSquares;\n\n\t\t\t\tfor ( var i = 0; i < 8; i++ )\n\t\t\t\t{\n\t\t\t\t\tfor ( var j = 0; j < 8; j++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( (i+j)%2 == 0 ) continue;\n\t\t\t\t\t\tthis._ctx.fillRect( b + i*x, b + j*x, x, x );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Align to centre of pixel\n\t\t\tb += 0.5;\n\n\t\t\tthis._ctx.strokeStyle = this.Colours.Border;\n\t\t\tthis._ctx.lineWidth = this._size * 0.013;\n\t\t\tthis._ctx.lineWidth = this._size * 0.005;\n\t\t\tthis._ctx.lineCap = \"round\";\n\n\t\t\tthis._ctx.strokeRect( b, b, s, s );\n\n\t\t\tthis._ctx.beginPath();\n\n\t\t\tx = 0.0615 * this._size;\n\t\t\t//this._ctx.setLineDash([ x, x ]);\n\n\t\t\tx = 0.5 * this._size;\n\t\t\tthis._ctx.moveTo( b, b );\n\t\t\tthis._ctx.lineTo( b+s, b+s );\n\t\t\tthis._ctx.moveTo( b+s, b );\n\t\t\tthis._ctx.lineTo( b, b+s );\n\t\t\tthis._ctx.stroke();\n\n\t\t\t//this._ctx.setLineDash([]);\n\n\n\t\t\tthis._ctx.lineWidth = this._size * 0.005;\n\t\t\tthis._ctx.beginPath();\n\n\t\t\tx = 0.5 * this._size;\n\t\t\tthis._ctx.moveTo( b+x, b );\n\t\t\tthis._ctx.lineTo( b+x, b+s );\n\t\t\tthis._ctx.moveTo( b+s, b+x );\n\t\t\tthis._ctx.lineTo( b, b+x );\n\n\t\t\tthis._ctx.stroke();\n\n\n\t\t\tif ( this.BackgroundGlyph != \"\" )\n\t\t\t{\n\t\t\t\tthis._ctx.fillStyle = this.Colours.BackgroundGlyph;\n\t\t\t\tthis._ctx.font = s+\"px serif\";\n\t\t\t\tthis._ctx.textAlign = \"center\";\n\t\t\t\tthis._ctx.textBaseline = \"middle\";\n\t\t\t\tthis._ctx.fillText( this.BackgroundGlyph, b+0.5*s, b+0.58*s );\n\t\t\t}\n\n\n\t\t\tthis._ctx.strokeStyle = this.Colours.PreviousStrokes;\n\t\t\tthis._ctx.lineWidth = this._size * 0.04;\n\n\t\t\tfor ( var i = 0; i < this._strokes.length; i++ )\n\t\t\t{\n\t\t\t\tif ( this._strokes[i].length == 0 ) continue;\n\n\t\t\t\tvar prev = this.toAbs(this._strokes[i][0]);\n\t\t\t\tvar curr;\n\t\t\t\tfor ( var j = 1; j < this._strokes[i].length; j++ )\n\t\t\t\t{\n\t\t\t\t\tcurr = this.toAbs(this._strokes[i][j]);\n\n\t\t\t\t\tthis._ctx.beginPath();\n\t\t\t\t\tthis._ctx.moveTo( prev[0], prev[1] );\n\t\t\t\t\tthis._ctx.lineTo( curr[0], curr[1] );\n\t\t\t\t\tthis._ctx.stroke();\n\n\t\t\t\t\tprev = curr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this._optionTarget )\n\t\t{\n\t\t\tthis._optionTarget.innerHTML = \"\";\n\n\n\t\t\tvar li = document.createElement(\"LI\");\n\t\t\tli.classList.add( \"undo\" );\n\t\t\tif ( this._strokes.length == 0 )\n\t\t\t\tli.classList.add( \"nope\" );\n\t\t\tli.innerHTML = \"<span class=\\\"glyph\\\">\\u2718</span><span class=\\\"sound\\\">undo</span>\";\n\n\t\t\tli.addEventListener( \"click\", (function(hzp)\n\t\t\t{\n\t\t\t\treturn (function( event )\n\t\t\t\t{\n\t\t\t\t\thzp.popStroke();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t})( this ));\n\t\t\tthis._optionTarget.appendChild(li);\n\n\n\t\t\tfor ( var i = 0; i < this._queue.length; i++ )\n\t\t\t{\n\t\t\t\tvar li = document.createElement(\"LI\");\n\t\t\t\tli.classList.add( \"queued\" );\n\t\t\t\tli.dataset[\"index\"] = i;\n\t\t\t\tli.dataset[\"glyph\"] = this._queue[i].glyph;\n\n\n\t\t\t\tvar s = document.createElement(\"SPAN\");\n\t\t\t\ts.classList.add( \"glyph\" );\n\t\t\t\ts.textContent = this._queue[i].glyph;\n\t\t\t\tli.appendChild( s );\n\n\t\t\t\ts = document.createElement(\"SPAN\");\n\t\t\t\ts.classList.add( \"sound\" );\n\t\t\t\tif ( this._queue[i].descriptions.length > 0 )\n\t\t\t\t\ts.textContent = this._queue[i].descriptions[0].sound;\n\n\t\t\t\tli.appendChild( s );\n\n\t\t\t\tli.addEventListener( \"click\", (function(i,hzp)\n\t\t\t\t{\n\t\t\t\t\treturn (function( event )\n\t\t\t\t\t{\n\t\t\t\t\t\thzp.dequeueCharacter( i );\n\t\t\t\t\t});\n\t\t\t\t})( i, this ));\n\n\t\t\t\tthis._optionTarget.appendChild(li);\n\t\t\t}\n\n\t\t\tfor ( var i = 0; i < this._options.length; i++ )\n\t\t\t{\n\t\t\t\tvar li = document.createElement(\"LI\");\n\t\t\t\tli.classList.add(\"option\");\n\t\t\t\tli.dataset[\"index\"] = i;\n\t\t\t\tli.dataset[\"glyph\"] = this._options[i].character.glyph;\n\n\t\t\t\tif ( i == this._activeIndex )\n\t\t\t\t\tli.classList.add( \"active\" );\n\n\t\t\t\tvar s = document.createElement(\"SPAN\");\n\t\t\t\ts.setAttribute( \"class\", \"glyph\" );\n\t\t\t\ts.textContent = this._options[i].character.glyph;\n\t\t\t\tli.appendChild( s );\n\n\t\t\t\ts = document.createElement(\"SPAN\");\n\t\t\t\ts.setAttribute( \"class\", \"sound\" );\n\t\t\t\tif ( this._options[i].character.descriptions.length > 0 )\n\t\t\t\t{\n\t\t\t\t\ts.textContent = this._options[i].character.descriptions[0].sound;\n\t\t\t\t}\n\t\t\t\tli.appendChild( s );\n\n\t\t\t\tli.addEventListener( \"click\", (function(i,hzp)\n\t\t\t\t{\n\t\t\t\t\treturn (function( event )\n\t\t\t\t\t{\n\t\t\t\t\t\thzp.activeIndex = i;\n\t\t\t\t\t\thzp.accept();\n\t\t\t\t\t});\n\t\t\t\t})( i, this ));\n\n\t\t\t\t//s = document.createElement(\"SPAN\");\n\t\t\t\t//s.setAttribute( \"class\", \"score\" );\n\t\t\t\t//s.textContent = this._options[i].score.toFixed(2);\n\t\t\t\t//li.appendChild( s );\n\n\t\t\t\t//s = document.createElement(\"SPAN\");\n\t\t\t\t//s.setAttribute( \"class\", \"normalized-score\" );\n\t\t\t\t//if ( this._strokes.length > 0 )\n\t\t\t\t//{\n\t\t\t\t//\ts.textContent = (this._options[i].score / this._strokes.length).toFixed(2);\n\t\t\t\t//}\n\t\t\t\t//li.appendChild( s );\n\n\t\t\t\tthis._optionTarget.appendChild(li);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d42dcebe3c1d85ec83a02a93aa1853c1", "score": "0.551562", "text": "function drawSpeedBrakes() {\n\tvar ctx = document.getElementById('speedBrakes').getContext('2d');\n\tctx.beginPath();\n\tctx.fillStyle = \"black\";\n\t// fill rect, clear rect functions are in primaryFlightDisplay.js file\n\tclearRect(ctx, 0, 0, window.speedBrakesWidth, window.speedBrakesHeight);\n\tfillRect(ctx, 0, 0, window.speedBrakesWidth, 2);\n}", "title": "" }, { "docid": "d2b0ec8ad4744508e9cc3528b8e72673", "score": "0.55015725", "text": "function draw()\n {\n // Background\n ctx.fillStyle = \"rgba(0,0,0,1)\";\n ctx.fillRect(0,0,W,H);\n \n // Draw the boxes\n //ctx.globalCompositeOperation = \"lighter\";\n for(i=0; i < boxes.length; i++)\n boxes[i].draw();\n \n // Draw the text on bottom\n update();\n }", "title": "" }, { "docid": "86004a537387677478d5e79225068759", "score": "0.5492188", "text": "function draw(){\r\n canvas = document.getElementById(\"canvas\");\r\n ctx = canvas.getContext(\"2d\");\r\n \"use strict\";\r\n sky();\r\n ground();\r\n sun();\r\n path();\r\n \r\n // house part\r\n ctx.save();\r\n ctx.scale(0.4,0.55);\r\n ctx.translate(x,y);\r\n // right part\r\n gray1();\r\n wall1();\r\n gray2();\r\n wall2();\r\n cell1();\r\n cell2();\r\n shadow();\r\n wall3();\r\n door();\r\n // left part\r\n middle();\r\n cellL1();\r\n grayL1();\r\n wallL1();\r\n shadowL();\r\n // smoke part\r\n smokeStack();\r\n celling();\r\n ctx.restore();\r\n }", "title": "" }, { "docid": "d5c36451d6036830d032dbfd5145f86b", "score": "0.54892623", "text": "function wheel() {\n pushMatrix();\n mat4.rotate(modelview, modelview, (frameNumber * 10) / 180 * Math.PI, [0,\n 0, 1\n ]);\n currentColor = [0, 0, 0.7, 1];\n torus.render();\n currentColor = [0.9, 0.9, 0.6, 1];\n pushMatrix();\n mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]);\n mat4.scale(modelview, modelview, [0.1, 0.1, 1.8]);\n mat4.translate(modelview, modelview, [0, 0, -0.5]);\n cylinder.render();\n popMatrix();\n pushMatrix();\n mat4.rotate(modelview, modelview, (60) / 180 * Math.PI, [0, 0, 1]);\n mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]);\n mat4.scale(modelview, modelview, [0.1, 0.1, 1.8]);\n mat4.translate(modelview, modelview, [0, 0, -0.5]);\n cylinder.render();\n popMatrix();\n pushMatrix();\n mat4.rotate(modelview, modelview, (-60) / 180 * Math.PI, [0, 0, 1]);\n mat4.rotate(modelview, modelview, (90) / 180 * Math.PI, [-1, 0, 0]);\n mat4.scale(modelview, modelview, [0.1, 0.1, 1.8]);\n mat4.translate(modelview, modelview, [0, 0, -0.5]);\n cylinder.render();\n popMatrix();\n popMatrix();\n}", "title": "" }, { "docid": "74b7e861a3d00d75ab95ca10e8c736c4", "score": "0.5483103", "text": "function draw() {\n background(c, 255, 255);\n if (cAdd) {\n c++;\n if (c >= 255)\n cAdd = false;\n } else {\n c--;\n if (c <= 0)\n cAdd = true;\n }\n\n // loop through all heads in the 'heads' array\n for (i = 0; i < headCount; i++) {\n //draw head images\n push(); // push and pop go together, basically they isolate all translations made between them to only apply to code between them\n translate(heads[i].x + (heads[i].img.width / 2), heads[i].y + (heads[i].img.height / 2)); // transforms canvas before drawing\n rotate(heads[i].angle); // rotates canvas before drawing\n scale(map(heads[i].accl, headAcclMin, headAcclMax, 0.2 , 1));\n if (heads[i].isGhost)\n image(heads[i].img, 0, 0); // draw the image\n else\n blend(heads[i].img, 0, 0, heads[i].img.width, heads[i].img.height, 0 - heads[i].img.width/2, 0 - heads[i].img.height/2, heads[i].img.width, heads[i].img.height, DARKEST); // draw the blur copy of the image to be used as a border effect\n pop();\n\n //calculate new head location\n if (heads[i].y > height) { // check if head is off the bottom of the screen\n heads[i].y = -heads[i].img.height; // if the head moves below the screen move it to the top again\n heads[i].x = random(width); // randomize the x position of the head\n heads[i].accl = random(headAcclMin, headAcclMax); // randomize new accelleration value for head\n heads[i].isGhost = random() >= 0.001; // ghost miso random chance\n }\n\n heads[i].y += 2 * heads[i].accl; // move head down an amount every loop based on the head accl value\n heads[i].angle += heads[i].angleMod * heads[i].accl; // rotate the head angle by 0.01 per frame\n\n\n }\n}", "title": "" }, { "docid": "5bab24c049862ccfa70c725b040990f6", "score": "0.54817975", "text": "function draw() {\n drawBackground();\n\n // Powerups\n for (let i = 0; i < powerups.length; i++) {\n drawPowerUp(powerups[i]);\n }\n\n // Draw player\n drawSnake(player.snake);\n}", "title": "" }, { "docid": "f6bac68b5bdf77f5b691ea6f072ac5df", "score": "0.5478311", "text": "function draw() {\n\n if (canvasValid == false) {\n clear(context);\n\n justDraw();\n\n // Add stuff drawn on top here\n canvasValid = true;\n }\n }", "title": "" }, { "docid": "9f3f5ddc623e960816b46423c5ce5ee0", "score": "0.54775417", "text": "function render() {\n drawRink();\n drawPuck();\n drawPaddles();\n renderHomeScore();\n renderAwayScore();\n renderNumPucks();\n}", "title": "" }, { "docid": "f3b47ab459d0de6b48f2a54ecd537d31", "score": "0.54753715", "text": "function redrawCanvas(context, canvas) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n for (triangle of spawnedTriangles) {\n triangle.drawTriangleOnCanvas(context);\n }\n}", "title": "" }, { "docid": "6d1f3eccb78b1ed144fbb0b55660a37d", "score": "0.5475294", "text": "function _draw(context) {\n var x = _x;\n var y = _x;\n\n // Check whether we should be currently animating for a settle bomb\n if (_timeSinceLastSettleBomb < _SETTLE_BOMB_SHAKE_PERIOD) {\n // Check whether the animation is ready for its next 'shake'\n if (_timeSinceLastSettleBombSubPeriod >= _SETTLE_BOMB_SHAKE_SUB_PERIOD) {\n _timeSinceLastSettleBombSubPeriod %= _SETTLE_BOMB_SHAKE_SUB_PERIOD;\n\n var radius = gameWindow.squarePixelSize * 0.85;\n\n x = x - radius + (Math.random() * radius * 2);\n y = y - radius + (Math.random() * radius * 2);\n }\n }\n\n // Draw the background and the border\n context.beginPath();\n context.lineWidth = _STROKE_WIDTH;\n context.fillStyle = _currentFillColor;\n context.strokeStyle = _currentStrokeColor;\n context.rect(x, y, _size, _size);\n context.fill();\n context.stroke();\n }", "title": "" }, { "docid": "1ad6ca8bddc4a5b3f63f9cb0352ddb3e", "score": "0.54721105", "text": "function draw()\n{\n\tconst cx = document.getElementById(\"xSlider\").value | 0;\n\tconst cy = document.getElementById(\"ySlider\").value | 0;\n\tconst dx = document.getElementById(\"zSlider\").value | 0;\n//\tconst cx = 256; // 0;\n//\tconst cy = 0; // 139;\n\tconst context = document.getElementById(\"canvas\").getContext(\"2d\");\n\tfor (let y = 0; y < 192; y++) {\n\t\tfor (let x = 0; x < 80; x++) {\n\t\t\tcontext.fillStyle = altirrapal[0x70 ^ mb(x * dx + cx, (y * dx >> 2) + cy)];\n\t\t\tcontext.fillRect(x * 20, y * 5, 20, 5);\n\t\t}\n\t}\n//\tdx -= 5 / 256;\n}", "title": "" }, { "docid": "9dab585965ae4ddd9a02310f1018c65c", "score": "0.547059", "text": "function draw() {\n //background(140);\n imageMode(CORNER);\n image(forest, 0,0,windowWidth,windowHeight);\n imageMode(CENTER);\n\n keyControls();\n displayIbby();\n gravity();\n mossRoad();\n offScreen();\n amountOfScrolls();\n interactScrolls();\n}", "title": "" }, { "docid": "b368c986100a5ecff5be8b7d33e35df2", "score": "0.546686", "text": "function canvasCycle(){\n if (createPieceG.drawing) {\n \tconsole.log(\"TICK AND DRAWING\");\n\t if(createPieceG.originCaptured){\n\t \tdrawStroke(createPieceG.selectedBrush);\n\t }else{\n\t \tcaptureOrigin();\n\t }\n\n \t }\n \t stage.update();\n\n}", "title": "" }, { "docid": "83bb4f595e8febc124c33684dd22e05c", "score": "0.5464791", "text": "draw() {\r\n //looping over trails\r\n for (let trail of this.trails) {\r\n trail.animate();\r\n }\r\n\r\n }", "title": "" }, { "docid": "208b4c8785990e9fb743efc458951853", "score": "0.5464514", "text": "drawAll() {\n this.drawGrid();\n this.drawRaster();\n this.drawRaster(\"temp\");\n this.drawCursor();\n this.drawSelect();\n }", "title": "" }, { "docid": "1f77e8d97a479ec93ad9ffe81240f23d", "score": "0.54644954", "text": "function drawStuff() {\n //background grid\n drawGrid(); \n \n //snake body (tail)\n tail.forEach(snakePart => rectangle('#555', snakePart.x, snakePart.y, tileSize, tileSize));\n\n //snake\n rectangle(\"black\", snakePosX, snakePosY, tileSize, tileSize); \n\n //food\n rectangle(\"green\", foodPosX, foodPosY, tileSize, tileSize);\n }", "title": "" }, { "docid": "9da1a9d5d94f9cdd6c4f555e9064083e", "score": "0.5463997", "text": "loop() {\n\t\tthis.draw();\n\t}", "title": "" }, { "docid": "9fa77d8b67bfd130bdb768027fd466cf", "score": "0.54598725", "text": "function draw(){\n\n\n\t\t\t\t\t//call to a request ainimation frame\n\t\t\t\t\t//Pass it a function that causes a infinate loop - as long as its viewable\n\n\n\t\t\t\t\trequestAnimationFrame(draw);\n\n\t\t\t\t\t//step up our coundt and x and y varaibles to track \n\t\t\t}", "title": "" }, { "docid": "46da22b75650af698316b832f787a5c0", "score": "0.54568803", "text": "draw(temperature, convType)\n {\n //Get canvas height and width.\n this.canvasWidth = this.canvas.clientWidth;\n this.canvasHeight = this.canvas.clientHeight;\n \n //Calculate the center of the canvas.\n this.canvasMiddleX = this.canvasWidth / 2;\n this.canvasMiddleY = this.canvasHeight / 2;\n\n //Calculate the drawing radius.\n this.radius = (this.canvasWidth > this.canvasHeight) ? \n this.canvasMiddleY : this.canvasMiddleX;\n this.radius *= this.radiusLength;\n\n //Clear the canvas.\n this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n\n //Convert temperature to C or F.\n temperature = this.tempCalc(temperature, convType);\n\n //Set the critical points for drawing F or C.\n if(convType === ATemp.F)\n {\n this.minorTicks = 19;\n this.majorTicks = 10;\n this.radPerMinor = this.radPerMinorF;\n this.radPerMajor = this.radPerMajorF;\n this.radToFreeze = this.radToFreezeF;\n this.dNumber = 20;\n this.radsPerDeg = this.radsPerF;\n this.tempMax = 140;\n this.text = \"F\";\n }\n else\n {\n this.minorTicks = 21;\n this.majorTicks = 11;\n this.radPerMinor = this.radPerMinorC;\n this.radPerMajor = this.radPerMajorC;\n this.radToFreeze = this.radToFreezeC;\n this.dNumber = 10;\n this.radsPerDeg = this.radsPerC;\n this.tempMax = 60;\n this.text = \"C\";\n }\n\n //Check if the minor ticks are enabled.\n if(!(this.options & ATemp.HIDE_MINOR_TICK))\n {\n //Prepare to draw minor ticks.\n this.thisTheta = -5 * Math.PI / 4;\n\n //Draw minor ticks.\n for(let i = 0; i < this.minorTicks; i++)\n {\n this.drawLineAngle(this.thisTheta, this.minorTickColor,\n this.radius * this.minorWidth, this.radius * this.minorLength,\n this.radius *.95);\n this.thisTheta += this.radPerMinor;\n }\n }\n\n //Check if the major ticks are enabled.\n if(!(this.options & ATemp.HIDE_MAJOR_TICK))\n {\n //Prepare to draw major ticks.\n this.thisTheta = -5 * Math.PI / 4;\n\n //Draw major ticks.\n for(let i = 0; i < this.majorTicks; i++)\n {\n this.drawLineAngle(this.thisTheta, this.majorTickColor,\n this.radius * this.majorWidth, this.radius * this.majorLength,\n this.radius * .95);\n this.thisTheta += this.radPerMajor;\n }\n }\n\n //Check if the freeze tick is enabled.\n if(!(this.options & ATemp.HIDE_FREEZE_TICK))\n {\n //Prepare to draw freezing point tick.\n this.thisTheta = (-5 * Math.PI / 4) + this.radToFreeze;\n\n //Draw tick for freezing mark.\n this.drawLineAngle(this.thisTheta, this.freezeTickColor,\n this.radius * this.freezeWidth, this.radius * this.freezeLength,\n this.radius * .95);\n }\n\n //Check if the numbers are enabled.\n if(!(this.options & ATemp.HIDE_NUMBERS))\n {\n //prepare to draw the numbers.\n this.thisTheta = (-5 * Math.PI / 4);\n this.thisNumber = -40;\n\n //Draw the numbers.\n for(let i = 0; i < this.majorTicks; i++)\n {\n //Prepend blank spaces to align the numbers on the dial.\n this.numText = this.thisNumber;\n if(this.thisNumber < 100 && this.thisNumber > -1)\n {\n this.numText = \" \" + this.numText;\n }\n\n if(this.thisNumber < 10 && this.thisNumber > -1)\n {\n this.numText = \" \" + this.numText;\n }\n\n this.drawTextAngle(this.thisTheta, this.numText, this.numberColor,\n this.numberRatio, this.textRadius);\n this.thisTheta += this.radPerMajor;\n this.thisNumber += this.dNumber;\n }\n }\n\n //Check if the needle is enabled.\n if(!(this.options & ATemp.HIDE_NEEDLE))\n {\n //Clamp the minimum and maximum values of the temperature.\n if(temperature < -40)\n {\n temperature = -40;\n }\n\n if(temperature > this.tempMax)\n {\n temperature = this.tempMax;\n }\n\n //Calculate difference in temperature from minimum value.\n this.dTemperature = temperature + 40;\n\n //Calculate the angle to draw the needle.\n this.handAngle = (-5 * Math.PI / 4) + this.dTemperature * this.radsPerDeg;\n\n //Draw the needle on the dial.\n this.drawTriangle(this.handAngle, this.needleColor, this.needleWidth,\n this.needleLength);\n }\n\n //Check if the center is enabled.\n if(!(this.options & ATemp.HIDE_CENTER))\n {\n //Draw the center circle of the dial.\n this.drawArc(0, 2 * Math.PI, this.radius * this.centerWidth, this.centerColor,\n this.radius * this.centerWidth * 2);\n }\n\n //Check if the text is enabled.\n if(!(this.options & ATemp.HIDE_TEXT))\n {\n //Draw F or C.\n var textSize = this.radius * this.textRatio;\n this.ctx.font = textSize + \"px Arial\";\n this.ctx.fillStyle = this.textColor;\n this.ctx.fillText(this.text, this.canvasMiddleX - textSize * .35,\n this.canvasMiddleY + this.radius * .95 - .50 * textSize);\n }\n\n //Check if the outer ring is enabled.\n if(!(this.options & ATemp.HIDE_RING))\n {\n //Draw semi-circle around dial.\n this.drawArc(-5 * Math.PI / 4, Math.PI / 4, this.radius, this.ringColor,\n this.radius * this.ringWidth);\n }\n }", "title": "" }, { "docid": "f3bc3f0272d2ac85f19b6cecfb3507b4", "score": "0.5452332", "text": "function thoughtBubble() {\n\n\t\t\t$(\"#canvas-create\").drawArc({\n\t\t\t\tstrokeStyle: \"grey\",\n\t\t\t\tstrokeWidth: 4,\n\t\t\t\tx: 100, y: 80,\n\t\t\t\tradius: 10\n\t\t\t})\n\t\t\t.drawArc({\n\t\t\t\tstrokeStyle: \"grey\",\n\t\t\t\tstrokeWidth: 4,\n\t\t\t\tx: 75, y: 105,\n\t\t\t\tradius: 10\n\t\t\t})\n\t\t\t.drawRect({\n\t\t\t\tstrokeStyle: \"grey\",\n\t\t\t\tstrokeWidth: 4,\n\t\t\t\tx: 150, y: 30,\n\t\t\t\twidth: 250,\n\t\t\t\theight: 50,\n\t\t\t\tcornerRadius: 10\n\t\t\t});\t\n\n\t\t}\t// end thought bubble", "title": "" }, { "docid": "df9ec2bbc4c0b672881667273de84344", "score": "0.54483277", "text": "function draw(){\n ctx.clearRect(0,0, canvas.width, canvas.height);\n background();\n\n let mPos = translateRelativeTo(MousePos, $(canvas));\n circles.forEach(c => c.draw());\n}", "title": "" }, { "docid": "d1863cd0a9abbd2889b0e8acb7927c94", "score": "0.5446619", "text": "drawAll() {\n this.drawCanvas();\n this.towers.forEach(function(t) {\n t.draw();\n });\n this.activeEnemies.forEach(function(e) {\n e.draw();\n });\n }", "title": "" }, { "docid": "2870007423ec7337e8118b4e5307c32a", "score": "0.544596", "text": "function drawParts(){\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n var w = canvas.width;\n canvas.width = 1;\n canvas.width = w;\n\n //neck\n ctx.beginPath();\n ctx.moveTo(270,0);\n ctx.lineTo(250,10);\n ctx.quadraticCurveTo(390,120,530,10);\n ctx.lineTo(510,0);\n ctx.quadraticCurveTo(390,90,270,0);\n ctx.fillStyle = color2;\n ctx.fill();\n\n //left arm\n ctx.beginPath();\n ctx.moveTo(640,30);\n ctx.quadraticCurveTo(635,140,670,290);\n ctx.lineTo(653,570);\n ctx.quadraticCurveTo(652,605,660,640);\n ctx.lineTo(730,640);\n ctx.bezierCurveTo(780,400,770,50,640,30);\n ctx.fillStyle = color2;\n ctx.fill();\n\n //right arm\n ctx.beginPath();\n ctx.moveTo(140,30);\n ctx.quadraticCurveTo(145,140,122,280);\n ctx.lineTo(129,570);\n ctx.quadraticCurveTo(130,605,120,640);\n ctx.lineTo(50,640);\n ctx.bezierCurveTo(20,400,30,50,140,30);\n ctx.fillStyle = color2;\n ctx.fill();\n\n //bottom\n ctx.beginPath();\n ctx.moveTo(130,630);\n ctx.lineTo(130,660);\n ctx.quadraticCurveTo(390,680,650,660);\n ctx.lineTo(650,630);\n ctx.quadraticCurveTo(390,650,130,630);\n ctx.fillStyle = color2;\n ctx.fill();\n\n drawClip(ctx);\n}", "title": "" }, { "docid": "8983ff6ad8c3c4783ad1fdf46d7b761c", "score": "0.5445543", "text": "function draw() {\r\n ctx.clearRect(0, 0, canvas.width, canvas.height); // limpar a tela\r\n desenhaBolinha();\r\n drawbarrinha();\r\n mostraPontos();\r\n desenhaBlocos();\r\n}", "title": "" }, { "docid": "8a87803bf3b1413c0f5844350e830d04", "score": "0.5444414", "text": "function draw() {\n background(20, 95, 217);\n\n let xc = 50+ 50*sin(speed);\n let yc = 50 + 50*cos(speed);\n speed += speedSlider.value();\n\n drawShape(offscreen, xc, yc);\n\n for(let x = offscreen.width*.35; x < width; x += offscreen.width/1.5) {\n for(let y = offscreen.height-185; y < height; y += offscreen.height/1.5) {\n imageMode(CENTER);\n image(offscreen, x, y);\n }\n }\n\n}", "title": "" }, { "docid": "fcb3b1e626acc507530c3d310f260931", "score": "0.54429585", "text": "draw() {\n let radius = this.radius + 10;\n let angle = Math.atan(this.speedY/speed);\n if(angle > 0) angle /= 2;\n ctx.translate(this.x, this.y);\n ctx.rotate(-angle);\n ctx.drawImage(bird_img, -radius, -radius, radius*2, radius*2);\n ctx.rotate(angle);\n ctx.translate(-this.x, -this.y);\n }", "title": "" } ]
3370b0833c46eb0e8560c573cb09a415
Handle failed requests count
[ { "docid": "491f4611739c0ac947632cd7437c8eb3", "score": "0.52842194", "text": "fail(err) {\r\n this.failureCount++;\r\n this.print(\"Failure\");\r\n return err;\r\n }", "title": "" } ]
[ { "docid": "d5d577811954dbc5437929899effe31d", "score": "0.64347064", "text": "function handleSuccess(count) {\n logToConsole(\"success!\");\n window.clearTimeout(abortTimerId);\n errorLives = 5;\n updateUnreadCount(count);\n //scheduleRequest(); \n }", "title": "" }, { "docid": "385e8582e7f592fd4514cb4def7d36ce", "score": "0.6422607", "text": "setAnalyticsFailCount(count) { }", "title": "" }, { "docid": "1a061ef7255c1ac259f4d9ee3fad7091", "score": "0.64181817", "text": "_handleResponseErrors() {\n if (!this._sendFlag) {\n return;\n }\n if (this._timedOutFlag) {\n // Timeout\n this._requestErrorSteps('timeout');\n } else if (this._isNetworkErrorResponse()) {\n // Network error\n this._requestErrorSteps('error');\n }\n }", "title": "" }, { "docid": "b6923dfeafc364b7d15f958a7ca875ad", "score": "0.64079666", "text": "function incrementErrorCount() {\n self.hcErrorCount++;\n }", "title": "" }, { "docid": "25baf284d7ecd8e755d71b9cfa8d78e3", "score": "0.6324659", "text": "evaluateCountAndHandleLimit(endpoint, res) {\n if (this[endpoint] && this[endpoint].limit) {\n this[endpoint].count++;\n\n if(this[endpoint].count > this[endpoint].limit) {\n res.status(429);\n res.send({error: 'API is under heavy load. Please try again in a short while.'});\n return true;\n }\n return false;\n }\n }", "title": "" }, { "docid": "e7a9de7496111596064a5cfbc3aa997f", "score": "0.62184614", "text": "function countRequests(req, res, next) {\n console.log(++numReq);\n next();\n}", "title": "" }, { "docid": "f209b94902751d51678b3c5cf6d0bd4d", "score": "0.6213472", "text": "function onRequestFailed(result) {\n DebugWrite(\"[OnRequestFailed]\" + result.toString());\n StatusWrite(\"FAILURE: \" + result.toString());\n}", "title": "" }, { "docid": "e74962ff7e17e48cc18db9106059b858", "score": "0.6097773", "text": "function setCounter() {\n const params = { count: counter };\n axios.get(hidden_server + \"/setCount\", { params }).then(res => {\n console.log(res.status);\n }).catch(err => {\n console.log(err.code);\n });\n}", "title": "" }, { "docid": "0c6d6da9616bfd9e2ee602f3e7f23052", "score": "0.60612404", "text": "function requestCounters(req, res, next) {\n if (req.path !== '/metrics') {\n numOfRequests.inc({ method: req.method });\n pathsTaken.inc({ path: req.path });\n }\n next();\n}", "title": "" }, { "docid": "75c14602b773cbae5a74171dc93b8aed", "score": "0.6051109", "text": "async get_errCount()\n {\n /** @type {number} **/\n let res;\n if (this._cacheExpiration <= this._yapi.GetTickCount()) {\n if (await this.load(this._yapi.defaultCacheValidity) != this._yapi.SUCCESS) {\n return YSdi12Port.ERRCOUNT_INVALID;\n }\n }\n res = this._errCount;\n return res;\n }", "title": "" }, { "docid": "3eb7e8ab128b03ed29563e8fab84554e", "score": "0.60437965", "text": "_initFailedLoginCount() {\n return this._isFailedLoginCountSet().then(failedLoginCountIsSet => {\n if (!failedLoginCountIsSet) {\n return this._setFailedLoginCount(0);\n }\n });\n }", "title": "" }, { "docid": "312372e7f5b9a524d2877290fef480de", "score": "0.5976255", "text": "analyticsFailCount() { }", "title": "" }, { "docid": "d377f6c8fa289f055ca4a5df6f143981", "score": "0.59571373", "text": "function failure() {\n if (canRetry()) {\n attempts++;\n }\n }", "title": "" }, { "docid": "d377f6c8fa289f055ca4a5df6f143981", "score": "0.59571373", "text": "function failure() {\n if (canRetry()) {\n attempts++;\n }\n }", "title": "" }, { "docid": "d377f6c8fa289f055ca4a5df6f143981", "score": "0.59571373", "text": "function failure() {\n if (canRetry()) {\n attempts++;\n }\n }", "title": "" }, { "docid": "de4e0c75585e3dd1acf302e205b2d727", "score": "0.59447604", "text": "async function failedCount() {\n return index_1.api.resque.queue.failedCount();\n }", "title": "" }, { "docid": "6e749d5b4a8c184b2159de868891e19f", "score": "0.5879008", "text": "function errorCheck(){\r\n var errorCount;\r\n errorCount++;\r\n}", "title": "" }, { "docid": "bc1b76e6065810f8c793116fae4e268b", "score": "0.58786464", "text": "function fail() {\n failed += 1;\n\n if (failed === methods.length) {\n allFailed();\n }\n }", "title": "" }, { "docid": "adcbeff3ea695f8b705c1b9cca148696", "score": "0.58774877", "text": "function logRequests(req, res, next) {\n numberOfRequests++;\n\n console.log(`Número de requisições: ${numberOfRequests}`);\n\n return next();\n\n}", "title": "" }, { "docid": "5e8beffec8cf7e1c150b5d7ac54eb2b2", "score": "0.58685684", "text": "function trackAuthError() {\n trackConnections('authErrorCount');\n}", "title": "" }, { "docid": "655af41e6c7fafcb7858cbaaba3a4193", "score": "0.5819863", "text": "function handleError(xhr, text, err) {\n logToConsole(\"error! \" + xhr + \" \" + text + \" \" + err);\n window.clearTimeout(abortTimerId);\n\n if (errorLives > 0)\n errorLives--;\n\n if (errorLives == 0) {\n errorLives = -1;\n setLoggedOutState();\n }\n\n //scheduleRequest();\n }", "title": "" }, { "docid": "10262ee7431009378ea4d8134c2b984e", "score": "0.58027893", "text": "getResponseCode() {}", "title": "" }, { "docid": "7b044dcae43132379878f315f41cc9eb", "score": "0.576885", "text": "_processError(error: Error) {\n if (this._retries <= 0) {\n return;\n }\n this._reporter.update({type: 'global_cache_error', error});\n --this._retries;\n if (this._retries <= 0) {\n this._reporter.update({type: 'global_cache_disabled', reason: 'too_many_errors'});\n }\n }", "title": "" }, { "docid": "bcd75dc62e6555cd0150173791c82124", "score": "0.5767155", "text": "function onFailure(response){\n var res = {\n 'statusCode' : 0\n };\n return res;\n }", "title": "" }, { "docid": "5d571c0f244b7bd248216755cde137fa", "score": "0.57537305", "text": "handleHTTPError(pHTTPError) {\n let Error = {\n code: 0,\n desc: '' // Error Description\n };\n // format error received from request : \n // {\"code\":\"ECONNREFUSED\",\"errno\":\"ECONNREFUSED\",\"syscall\":\"connect\",\"address\":\"127.0.0.1\",\"port\":5678}\n // map HTTP Error\n if (pHTTPError.code === 'ECONNREFUSED') {\n Error.code = 106;\n Error.desc = 'CONNECTION REFUSED';\n }\n else {\n console.log(pHTTPError);\n }\n return Error;\n }", "title": "" }, { "docid": "6c04aee1d166fcbf188ffbc2b955dec8", "score": "0.57399064", "text": "_handleFailedLoginAttempt() {\n return this._initFailedLoginCount()\n .then(() => {\n return this._incrementFailedLoginCount();\n })\n .then(() => {\n return this._setLockoutExpiration();\n });\n }", "title": "" }, { "docid": "977a3607abfb3464e93ac3c25610ac84", "score": "0.5723976", "text": "increaseFailureCounter() {\n if (this.retries === 0) {\n // first reconnect should be immediate\n this.wait = 0\n } else if (this.wait === 0) {\n // base value\n this.wait = this.baseWaitAfterFirstFailure\n } else {\n this.wait = Math.min(this.wait * 2, this.maxWaitBetweenRetries)\n }\n this.retries = this.retries + 1\n }", "title": "" }, { "docid": "c3ed367d21629a4c50aea769d1f85d4b", "score": "0.57038337", "text": "function ajaxErrorProcessor(xhr,status,error){\n if(status.localeCompare(\"error\") == 0){\n var errorCode = parseInt(xhr.status);\n switch(errorCode){\n \n case 400:\n console.log(\"Test400\");\n break;\t\t \t\t\t\n\n case 401:\n console.log(\"Test401\");\n break;\n \n case 403:\n console.log(\"Test403\");\n break;\t \t\t\t\t\t\n\n case 404:\n console.log(\"Test404\"); \n break;\t \t\t\t\t\t \t\t\t\t\n \n default:\n break;\n }\t \t\t\t\n }\n}", "title": "" }, { "docid": "19bc720366872a72c4fa78ecccbe6400", "score": "0.56973064", "text": "function errorReceivedHandler(err, req, res) {\n const host = req.headers && req.headers.host\n const code = err.code\n\n errorReporter.captureException(err)\n metrics.increment('mobile_api_proxy.num_errors')\n\n if (res.writeHead && !res.headersSent) {\n switch (code) {\n case 'ECONNRESET':\n case 'ENOTFOUND':\n case 'ECONNREFUSED':\n res.writeHead(504)\n break\n default:\n res.writeHead(500)\n }\n }\n\n res.end('Error occured while trying to proxy for: ' + host + req.url)\n}", "title": "" }, { "docid": "ade49664561acd0105c1a7ebce5a7d04", "score": "0.56912494", "text": "function retryIfServerError(fn) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var result;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, fn()];\r\n case 1:\r\n result = _a.sent();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return [2 /*return*/, fn()];\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n }", "title": "" }, { "docid": "5d04598be18b18469efb5b654e0b603b", "score": "0.5682543", "text": "handleErrorCountChange(i, errorCount) {\n let totalErrorCount;\n let errorList = this.state.errors;\n errorList[i] = errorCount;\n totalErrorCount = _.reduce(errorList, (memo, num) => memo + num, 0);\n\n // Callback\n if (this.props.onErrorCountChange) {\n this.props.onErrorCountChange(this.props.name, totalErrorCount);\n }\n }", "title": "" }, { "docid": "5d04d4453619d6d912339a35e4edf74e", "score": "0.5679435", "text": "function getTotalNumberOfRequests() {\r\n var xhttp = new XMLHttpRequest();\r\n xhttp.onreadystatechange = function () {\r\n var count = null;\r\n if (this.readyState === 4 && this.status === 200) {\r\n count = JSON.parse(this.responseText).count;\r\n }\r\n if (count != null)\r\n setHTMLObjectValueById(\"requests_number\", count);\r\n };\r\n xhttp.open(\"GET\", SERVER_BASE_URL + NUMBER_OF_REQUESTS_PATH, true);\r\n xhttp.send();\r\n}", "title": "" }, { "docid": "8060a8820b73c4dcbff0f96113afe7a3", "score": "0.5625301", "text": "function error_handler (loadcount, err) {\r\n console.log(\"Error loading batch #\" + loadcount + \": \" + err + \"\\n\");\r\n}", "title": "" }, { "docid": "1f36911e25ff380f0fcfa91f0b0faa29", "score": "0.5619552", "text": "function addError(){\n num_errors++;\n refreshLoader();\n}", "title": "" }, { "docid": "c0cc7cdcaacc30fcf235c6594c6baa3f", "score": "0.56175387", "text": "resetFailure () {\n this._responseHandler._resetFailure()\n }", "title": "" }, { "docid": "b0066e86e156b58d9308d1b0621ad791", "score": "0.5611745", "text": "function requestFailed(error) {\n // If a server request fails display an error within the browser console\n console.log(error);\n }", "title": "" }, { "docid": "c9df85da184870739a067c8799c8eaaa", "score": "0.56085455", "text": "function retryIfServerError(fn) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__awaiter\"])(this, void 0, void 0, function () {\n var result;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fn()];\n case 1:\n result = _a.sent();\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return [2 /*return*/, fn()];\n }\n return [2 /*return*/, result];\n }\n });\n });\n}", "title": "" }, { "docid": "5786ec72ba9b02ede68d1ddc3b2d7e0b", "score": "0.56057703", "text": "function retryIfServerError(fn) {\r\n return Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__awaiter\"])(this, void 0, void 0, function () {\r\n var result;\r\n return Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__generator\"])(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, fn()];\r\n case 1:\r\n result = _a.sent();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return [2 /*return*/, fn()];\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n}", "title": "" }, { "docid": "39f7c61235ed05286f617d247da09bca", "score": "0.5592571", "text": "function callback(err) {\n\t if (err) {\n\t error = err;\n\t }\n\t --count || fn(error);\n\t }", "title": "" }, { "docid": "e9cde3c43f439744c49194535ab02834", "score": "0.55915564", "text": "function retryOutstandingRequests() {\n\n\tlog(3, \"Core retrying outstanding requests, amount: \" + Object.keys(requestMap).length);\n\n\t// Requests will be re-enqueued below, this prevents them being added twice\n\trequestQueue.length = 0;\n\n\tObject.keys(requestMap).forEach((requestId) => {\n\t\tlet reqObj = requestMap[requestId];\n\n\t\tif (reqObj.tries === 1) return; // We only want to retry once\n\n\t\tprepareRequest(reqObj.observer, reqObj.request, reqObj.tries + 1);\n\t});\n}", "title": "" }, { "docid": "ac5e7bcf1b6672c0f2284434328aefa4", "score": "0.55903774", "text": "handleResponse(requestNum,data){this.pendingResponses[requestNum]=data;while(this.pendingResponses[this.currentResponseNum]){const toProcess=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let i=0;i<toProcess.length;++i){if(toProcess[i]){exceptionGuard(()=>{this.onMessage_(toProcess[i]);});}}if(this.currentResponseNum===this.closeAfterResponse){if(this.onClose){this.onClose();this.onClose=null;}break;}this.currentResponseNum++;}}", "title": "" }, { "docid": "7846b4166ad1309a947111794c5fb677", "score": "0.558388", "text": "function retry(i) {\n res.write('retry:' + i);\n }", "title": "" }, { "docid": "df341c8198add3d4861602bc63b3340c", "score": "0.55686265", "text": "function getAvailability(req, res, next) {\n logs.getCount(requestIp.getClientIp(req)).then(data => {\n if (data[0].count <= maxRequestsPerMinute) {\n logs.insert(\n {\n caller: requestIp.getClientIp(req),\n 'date-time': new Date().toISOString()\n }\n ).then(insert => {\n res.send(data[0].count);\n }).catch(err => next(err));\n } else {\n res.send('Too many requests!')\n }\n });\n}", "title": "" }, { "docid": "2e08da82798cef0540aff581ee5024d0", "score": "0.55662924", "text": "function handleRequestBad(request, response) {\n response.end(\"Keep working!\");\n}", "title": "" }, { "docid": "a28108423893d55a3873366f4622aefc", "score": "0.55630445", "text": "function retryIfServerError(fn) {\r\n return tslib.__awaiter(this, void 0, void 0, function () {\r\n var result;\r\n return tslib.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, fn()];\r\n case 1:\r\n result = _a.sent();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return [2 /*return*/, fn()];\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n}", "title": "" }, { "docid": "76277a935c7600cd2a72057e3872ede6", "score": "0.5559461", "text": "function retryIfServerError(fn) {\n return (0, _tslib.__awaiter)(this, void 0, void 0, function () {\n var result;\n return (0, _tslib.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4\n /*yield*/\n , fn()];\n\n case 1:\n result = _a.sent();\n\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return [2\n /*return*/\n , fn()];\n }\n\n return [2\n /*return*/\n , result];\n }\n });\n });\n}", "title": "" }, { "docid": "c533140e350900842467bcdd9bc023f3", "score": "0.55432576", "text": "async function retryIfServerError(fn) {\r\n const result = await fn();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return fn();\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "c533140e350900842467bcdd9bc023f3", "score": "0.55432576", "text": "async function retryIfServerError(fn) {\r\n const result = await fn();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return fn();\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "8f118ee44d64955274a426c53af7388e", "score": "0.5531111", "text": "printLastFailedRequest() {\n this._reporter.report(this.getLastFailedRequest());\n }", "title": "" }, { "docid": "747a66367677ef1ecda60d3286eacd1a", "score": "0.5504847", "text": "function onFailure(err) {\n (0, _utils.logError)('Server call for ' + spec.code + ' failed: ' + err + '. Continuing without bids.');\n onResponse();\n }", "title": "" }, { "docid": "519551cfbf1e331055dd49f39ae3ffcb", "score": "0.55030406", "text": "get failCount() {\n return this._failCount;\n }", "title": "" }, { "docid": "8d3a308f2688aa4ed0710331b4a967a2", "score": "0.5499632", "text": "decreasePendingRequestCount() {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }", "title": "" }, { "docid": "8d3a308f2688aa4ed0710331b4a967a2", "score": "0.5499632", "text": "decreasePendingRequestCount() {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }", "title": "" }, { "docid": "8d3a308f2688aa4ed0710331b4a967a2", "score": "0.5499632", "text": "decreasePendingRequestCount() {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }", "title": "" }, { "docid": "8d3a308f2688aa4ed0710331b4a967a2", "score": "0.5499632", "text": "decreasePendingRequestCount() {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }", "title": "" }, { "docid": "48ee72fd02c7333f3676051e63ac6a98", "score": "0.5484211", "text": "async _request(currentPath) {\n this._firstJSON = true;\n // Split requests into batches\n const queriesArray = await this._getQueriesArray(currentPath);\n const outputFileName = `${getDate()}.json`;\n this._successOutputStream = createWriteStream(resolve(this._outputPath, outputFileName));\n const successInn = [];\n let requestFailure = [];\n let validationFailure = [];\n // Variables to collect stats\n let currentRequestNumber = 0;\n let successNumber = 0;\n let retryErrorsNumber = 0;\n let validationErrorsNumber = 0;\n\n this._successOutputStream.write('[');\n\n // For each batch\n for (const arr of queriesArray) {\n // Make requests\n const response = await this.apiMultiCaller.makeRequests(arr);\n const success = response[0];\n const stopErrors = response[2];\n requestFailure = [...requestFailure, ...response[1]];\n validationFailure = [...validationFailure, ...response[3]];\n const failureRate = response[1].length / (success.length + response[1].length);\n const failureRateExceeded =\n failureRate > this.failureRate && arr.length > this.requestsLengthToCheckFailureRate;\n\n // If stop error occurs or the failure rate is exceeded again, stop\n if (stopErrors.length || (failureRate > this.failureRate && this._repeatedFailure)) {\n this._stop = true;\n this._isStopErrorOccurred = !!stopErrors.length;\n if (this._successOutputStream) {\n // Close output stream\n await closeStreams([this._successOutputStream]);\n // Remove output file, as a temporary file prepared for requesting is treated as a unit,\n // that can be either fully processed or not processed at all\n existsSync(resolve(this._outputPath, outputFileName)) &&\n unlinkSync(resolve(this._outputPath, outputFileName));\n const errorMessage = stopErrors.length\n ? `Due to StopError the script was stopped, ${outputFileName} was removed.`\n : `The maximum failure rate was exceeded. The script was stopped. ${outputFileName} was removed.`;\n this.logger.log('retryError', errorMessage);\n }\n return;\n }\n\n // Collect stats\n currentRequestNumber += arr.length;\n successNumber += success.length;\n retryErrorsNumber += response[1].length;\n validationErrorsNumber += response[3].length;\n\n success.flat().forEach((item) => {\n successInn.push(item.data.inn);\n // Write data into output file\n this._processResponse(item);\n });\n\n // If the failure rate is exceeded for the first time, mark it and\n // wait before making a next request in case it is a short-term issue\n if (failureRateExceeded && !this._repeatedFailure) {\n this._repeatedFailure = true;\n await new Promise((resolve) => setTimeout(resolve, this.timeToWaitBeforeNextAttempt));\n // Everything is ok\n } else {\n this._repeatedFailure = false;\n }\n }\n\n this._successOutputStream.end('\\n]\\n');\n\n // The entire temporary file prepared for requesting is now processed\n\n // Add local stats to global stats\n this._currentRequestNumber += currentRequestNumber;\n this._successNumber += successNumber;\n this._retryErrorsNumber += retryErrorsNumber;\n this._validationErrorsNumber += validationErrorsNumber;\n\n // Log success requests into success log file\n if (successInn.length)\n successInn.forEach((inn) => this.logger.log('success', `${inn} Data is received.`));\n\n // Write errors to retry into error file in temp directory\n if (requestFailure.length && !this._tempErrorStream)\n this._tempErrorStream = createWriteStream(this._mainTempErrorsPath, { flags: 'a' });\n requestFailure.forEach((item) => this._tempErrorStream.write(`${item}\\n`));\n\n // Write validation errors into validation error file\n if (validationFailure.length && !this._validationErrorStream)\n this._validationErrorStream = createWriteStream(this._mainValidationErrorsPath, {\n flags: 'a',\n });\n validationFailure.forEach((item) => this._validationErrorStream.write(`${item}\\n`));\n\n // Remove processed temporary file\n existsSync(currentPath) && unlinkSync(currentPath);\n }", "title": "" }, { "docid": "6b07144ffb20eb1f7b8b8af3372ee719", "score": "0.5475225", "text": "function responseCounters(req, res, time) {\n if (req.url !== '/metrics') {\n responses.labels(req.method, req.url, res.statusCode).observe(time);\n httpRequestDurationMilliseconds.labels(req.originalUrl).observe(time);\n }\n}", "title": "" }, { "docid": "974e313b70ab4ef987231eca14b394e2", "score": "0.54724157", "text": "function RequestFailed({onTryAgain}) {\n return (\n <p>One or more requests failed to load...<button onClick={onTryAgain}>Try again</button></p>\n );\n}", "title": "" }, { "docid": "8e6a5d70e6babb893d5ae08037127507", "score": "0.54623145", "text": "function failed(error)\n {\n console.log(error.statusText);\n }", "title": "" }, { "docid": "405572d0129ed1db0760f113c0367e28", "score": "0.5459786", "text": "noMoreRequests () {\n\t\t// if there is a shutdown pending (the master commanded us to shutdown, but is allowing all requests to finish),\n\t\t// then since there are no more requests, we can just die\n\t\tif (this.shutdownPending) {\n\t\t\tthis.critical(`Worker ${this.workerId} has no more open requests, shutting down...`);\n\t\t\tthis.shutdown();\n\t\t}\n\t}", "title": "" }, { "docid": "f9cbaf09663f29467af7bc3c89801c3e", "score": "0.54562235", "text": "function endRequest(httpMethod) {\n httpMethod = normalizedHttpMethod(httpMethod);\n pending.all--;\n pending[ httpMethod ]--;\n // EDGE CASE: In the unlikely event that the interceptors were not\n // able to obtain the config object; or, the method was changed after\n // our interceptor reached it, there's a chance that our numbers will\n // be off. In such a case, we want to try to redistribute negative\n // counts onto other properties.\n if (pending[ httpMethod ] < 0) {\n redistributePendingCounts(httpMethod);\n }\n }", "title": "" }, { "docid": "04814ba58468ea60b2d9c96b66179325", "score": "0.5444827", "text": "function process_response() {\n client_count--;\n if (client_count === 0) {\n console.log('Found %d ocurrences of \"%s\" on file %s.', ocurrences, search, filename);\n }\n}", "title": "" }, { "docid": "b43b4afe7b9ca881abc61f49f1a5701a", "score": "0.5440721", "text": "handleHTTPErrorResponse(pHTTPErrorResponse) {\n let Error = {\n code: 0,\n desc: '' // Error Description\n };\n // format error received from response :\n // {\n // \t\"statusCode\":404,\n // \t\"body\":\"\",\n // \t\"headers\":{\n // \t\t\"content-type\":\"text/html;charset=iso-8859-1\",\n // \t\t\"cache-control\":\"must-revalidate,no-cache,no-store\",\n // \t\t\"content-length\":\"1401\",\n // \t\t\"connection\":\"close\",\n // \t\t\"server\":\"Jetty(6.1.x)\"\n // \t},\n // \t\"request\":{\n // \t\t\"uri\":{\n // \t\t\t\"protocol\":\"http:\",\n // \t\t\t\"slashes\":true,\n // \t\t\t\"auth\":null,\n // \t\t\t\"host\":\"localhost:5678\",\n // \t\t\t\"port\":\"5678\",\n // \t\t\t\"hostname\":\"localhost\",\n // \t\t\t\"hash\":null,\n // \t\t\t\"search\":null,\n // \t\t\t\"query\":null,\n // \t\t\t\"pathname\":\"/OPISNET/services/idsp/userValidation\",\n // \t\t\t\"path\":\"/OPISNET/services/idsp/userValidation\",\n // \t\t\t\"href\":\"http://localhost:5678/OPISNET/services/idsp/userValidation\"\n // \t\t},\n // \t\t\"method\":\"POST\",\n // \t\t\"headers\":{\n // \t\t\t\"Content-Type\":\"application/json\",\n // \t\t\t\"content-length\":42\n // \t\t}\n // \t}\n // }\n switch (pHTTPErrorResponse.statusCode) {\n case 404:\n Error.code = 116;\n Error.desc = 'SERVICE_NOT_FOUND';\n break;\n case 403:\n Error.code = 117;\n Error.desc = 'FORBIDDEN_REQUEST';\n break;\n default:\n console.log(pHTTPErrorResponse);\n Error.code = 120;\n Error.desc = \"UNHANDLED_ERROR\";\n break;\n }\n return Error;\n }", "title": "" }, { "docid": "1653bb023390d9233ff17b9901921682", "score": "0.5437981", "text": "function retryIfServerError(fn) {\n return Object(tslib_es6[\"__awaiter\"])(this, void 0, void 0, function () {\n var result;\n return Object(tslib_es6[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fn()];\n case 1:\n result = _a.sent();\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return [2 /*return*/, fn()];\n }\n return [2 /*return*/, result];\n }\n });\n });\n}", "title": "" }, { "docid": "974f6e10ff5b3c7904222ec4d3d60e5e", "score": "0.54315686", "text": "handleResponse(requestNum, data) {\r\n this.pendingResponses[requestNum] = data;\r\n while (this.pendingResponses[this.currentResponseNum]) {\r\n const toProcess = this.pendingResponses[this.currentResponseNum];\r\n delete this.pendingResponses[this.currentResponseNum];\r\n for (let i = 0; i < toProcess.length; ++i) {\r\n if (toProcess[i]) {\r\n exceptionGuard(() => {\r\n this.onMessage_(toProcess[i]);\r\n });\r\n }\r\n }\r\n if (this.currentResponseNum === this.closeAfterResponse) {\r\n if (this.onClose) {\r\n this.onClose();\r\n this.onClose = null;\r\n }\r\n break;\r\n }\r\n this.currentResponseNum++;\r\n }\r\n }", "title": "" }, { "docid": "6e84878d00ac44f89ae50d8def60d80b", "score": "0.54298395", "text": "function incorrect(tries){\n tries--\n}", "title": "" }, { "docid": "4b146c944472ce0486ba30079077b10d", "score": "0.54129964", "text": "function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1));}finally{outstandingRequestCount--;if(outstandingRequestCount===0){while(outstandingRequestCallbacks.length){try{outstandingRequestCallbacks.pop()();}catch(e){$log.error(e);}}}}}", "title": "" }, { "docid": "181d07ef099684c94d68db5fe3b28ea2", "score": "0.54023373", "text": "function allFailed() {\n callBack(cb, new Error('All auth backend failed'));\n }", "title": "" }, { "docid": "2591e6fda1eed385a32fbbf6e3da3f12", "score": "0.53979754", "text": "function handleRequest(req, res) {\n switch(req.url) {\n case '/error':\n // We do some async stuff, and then...\n setTimeout(function() {\n // Whoops!\n flerb.bark();\n });\n break;\n default:\n res.end('ok');\n }\n}", "title": "" }, { "docid": "58355ca8bb04fdb0be765488291f657f", "score": "0.5393866", "text": "getCountResponse(model, response) {\n this.lastPayload = response.payload;\n if (response.status.code !== 200 && response.status.code !== 204) {\n throw new Error(`Unexpected count(${response.input.method}) response status: ${response.status.code}`);\n }\n else {\n const amount = parseInt(response.headers[this.apiCountingHeader]);\n if (isNaN(amount)) {\n throw new Error(`Response header '${this.apiCountingHeader}' missing or incorrect.`);\n }\n return amount;\n }\n }", "title": "" }, { "docid": "0ce6d63c20308899b8ffd2e1e875b166", "score": "0.5390033", "text": "static _requestRejected(context, rejection) {\n\t\t// @TODO: handle failed request\n\t}", "title": "" }, { "docid": "96b2a70366314eba1815a0e9279b14e4", "score": "0.5382757", "text": "function asyncRequestCounter () {\n var counter = 0;\n \n this.add = function() {\n if (counter < 0) {\n throw new negativeCounterException();\n }\n counter++;\n };\n this.remove = function() {\n counter--;\n //signifies that all asynchronous operations have been completed\n if (counter === 0) {\n //New event to signify that all asynchronous requests have finished\n var asyncDoneEvent = new CustomEvent(\n \"asynchronousDone\",\n {\n detail: {},\n bubbles: true,\n cancelable: true\n }\n );\n window.dispatchEvent(asyncDoneEvent);\n }\n else if (counter < 0) {\n throw new negativeCounterException();\n }\n };\n this.getSize = function() {\n return counter;\n };\n}", "title": "" }, { "docid": "7066ec9988502540f3115ce1987e5def", "score": "0.53819585", "text": "function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1));}finally {outstandingRequestCount--;if(outstandingRequestCount===0){while(outstandingRequestCallbacks.length){try{outstandingRequestCallbacks.pop()();}catch(e){$log.error(e);}}}}}", "title": "" }, { "docid": "8d93d6eb966d73248e36aac39a217875", "score": "0.5381906", "text": "function errCheck(request){\r\n\t\tif (request.status != 200){\r\n\t\t\tvar clearList = [\"location\", \"loadinglocation\", \"forecast\", \"loadingforecast\", \r\n\t\t\t\t\t\t\t \"loadinggraph\", \"temps\", \"buttons\"];\r\n\t\t\tfor (var i = 0; i < clearList.length; i++){\r\n\t\t\t\tdocument.getElementById(clearList[i]).style.display = \"none\";\r\n\t\t\t}\r\n\t\t\tif (request.status == 410){\r\n\t\t\t\tdocument.getElementById(\"nodata\").style.display = \"\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tdocument.getElementById(\"resultsarea\").style.display = \"none\";\r\n\t\t\t\tdocument.getElementById(\"errors\").innerHTML = request.status + \" Error: \" + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request.statusText + \".\";\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8f9e2080a198fd30b1d6da6e73c1f370", "score": "0.5375827", "text": "function processFail(self, done){\n return function(ex){\n if (ex && ex.data && ex.data.response && ex.data.response.statusCode){\n var status = ex.data.response.statusCode;\n if (status === 0xa0d2){ // no credits for UO left.\n self.skip();\n return;\n }\n }\n\n done(ex);\n }\n}", "title": "" }, { "docid": "b116b5fc2c20e1993cd5080740598896", "score": "0.5364404", "text": "function onerror(error_message) {\n // logger.error(\"onerror: NDT test failed. Test no: %s, Error: %s\", vm.iterator+1, error_message);\n d3.timer.flush();\n d3.selectAll('#progress-meter').classed('progress-error', true);\n vm.update_display('Error!', error_message);\n if ((vm.iterator + 1) == vm.serverList.length) {\n if (!$scope.$$phase) {\n $scope.$apply(function () {\n vm.showAverage = true;\n vm.testInProgress = false;\n vm.testButtonLabel = $filter('translate')('home.TEST_AGAIN');\n });\n }\n } else {\n vm.iterator++;\n Speedtest.startTest(vm.serverList[vm.iterator].url, vm.port, vm.path, vm.callbacks, 1000);\n }\n }", "title": "" }, { "docid": "3fb132c98897d5a0bb0ef810206da45a", "score": "0.53606635", "text": "_setFailedLoginCount(value) {\n const query = {\n username: this._user.username,\n };\n\n const updateFields = {\n _failed_login_count: value,\n };\n\n return this._config.database.update('_User', query, updateFields);\n }", "title": "" }, { "docid": "3102c6f29fa660215c72074c5f208b1b", "score": "0.5357613", "text": "handleStatusCode(statusCode) {\n\t\tswitch (statusCode) {\n\t\t\tcase 400:\n\t\t\t\tthis.log(\"API Error 400: Bad Request\");\n\t\t\t\tbreak;\n\n\t\t\tcase 401:\n\t\t\t\tthis.log(\"Invalid API key, fetching a new one.\");\n\t\t\t\tthis.token = null;\n\t\t\t\tthis.getToken();\n\t\t\t\tbreak;\n\n\t\t\tcase 403:\n\t\t\t\tthis.log(\"API Error 403: The device requested is not assigned to your account\");\n\t\t\t\tbreak;\n\n\t\t\tcase 404:\n\t\t\t\tthis.log(\"API Error 404: The specified device could not be found.\");\n\t\t\t\tbreak;\n\n\t\t\tcase 405:\n\t\t\t\tthis.log(\"API error 405: Method Not Allowed\");\n\t\t\t\tbreak;\n\n\t\t\tcase 406:\n\t\t\t\tthis.log(\"API error 406: Not Acceptable\");\n\t\t\t\tbreak;\n\n\t\t\tcase 410:\n\t\t\t\tthis.log(\"API error 410: The requested tank has been removed from the server. Please restart HomeBridge.\");\n\t\t\t\tbreak;\n\n\t\t\tcase 429:\n\t\t\t\tthis.log(\"API error 429: Too many requests!\");\n\t\t\t\tbreak;\n\n\t\t\tcase 500:\n\t\t\t\tthis.log(\"API error 500: There is a problem with the Tank Utility server. Try again later.\");\n\t\t\t\tbreak;\n\n\t\t\tcase 503:\n\t\t\t\tthis.log(\"API error 503: Tank Utility servers are down for maintanance. Try again later.\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthis.log(\"An unexpected error occured. Please report the following status code: \" + statusCode);\n\t\t}\n\t}", "title": "" }, { "docid": "a82f9d4b9b76137cb72c8b8981431352", "score": "0.5356652", "text": "function xhr_error_manager(){\n ipfs_error_n += 1;\n ipfs_total_retry += 1;\n // Try the same IPFS Gateway 3 times\n if(ipfs_error_n<=3){\n // try a new IPFS gateway\n console.log('IPFS Gateway Error, Attempt n.: '+ipfs_error_n);\n postMessage({type: 'ipfs_retry', value: ipfs_error_n});\n setTimeout(function(){ get_ipfs_proof(gateway,proofID,datas,w,proofi); }, timeout_betw_retry_ipfs);\n }\n else {\n if(ipfs_total_retry>=9){\n proofsok++;\n postMessage({ type: 'statusUpdate', value: ['ipfs', 1] });\n postMessage({ type: 'hlUpdate', value: ['ipfs', false] });\n postMessage({ type: 'chartUpdate', value: datas });\n var newproofi = 0;\n newproofi = proofi+1;\n setTimeout(function(cpi){ checkProof(cpi) }, 3*200, newproofi);\n ipfs_total_retry = 0;\n return;\n }\n // IPFS Gateway is down, change it (with a random one)\n console.log('IPFS Gateway is down, Changing Gateway...');\n ipfs_error_n = 1;\n //ipfs_gateway_list.splice(ipfs_gateway_list.indexOf(gateway),1);\n console.log(ipfs_gateway_list);\n var new_ipfs_rand = random_arr(ipfs_gateway_list);\n while(active_ipfs_gateway==new_ipfs_rand){\n new_ipfs_rand = random_arr(ipfs_gateway_list);\n }\n active_ipfs_gateway = new_ipfs_rand;\n postMessage({type: 'ipfs_retry', value: ipfs_error_n});\n postMessage({ type: 'ipfs_change', value: getUrlClean(active_ipfs_gateway) });\n postMessage({ type: 'ipfs_update_box', value: ipfs_gateway_list });\n get_ipfs_proof(active_ipfs_gateway,proofID,datas,w,proofi);\n }\n }", "title": "" }, { "docid": "24b39f4327031c6f42f49423736280fe", "score": "0.5346485", "text": "function requestErrorSteps(xhr) {\n clearResponse(xhr);\n xhr.errorFlag = true;\n xhr.requestHeaders = {};\n xhr.responseHeaders = {};\n\n if (xhr.readyState !== FakeXMLHttpRequest.UNSENT && xhr.sendFlag\n && xhr.readyState !== FakeXMLHttpRequest.DONE) {\n xhr.readyStateChange(FakeXMLHttpRequest.DONE);\n xhr.sendFlag = false;\n }\n }", "title": "" }, { "docid": "19fe833401a641a74a41e6bfc3d1e07e", "score": "0.5346119", "text": "async addedReview(req, res) {\n let count = 0;\n try {\n const err = validation(req.body);\n if (err != 2 && typeof(req.body.review_text) != 'string') {\n return res.status(400).json({ result: 'error', data: 'variable type error:' + err });\n } else {\n await added(req.body);\n res.status(200).json({ result: 'ok', data: 'data posted' });\n }\n } catch (ex) {\n console.log('Data placement error:' + ex);\n }\n function validation(bodM) {\n if(typeof(bodM.chat_id) == 'number')\n count++;\n if(typeof(bodM.site_id) == 'number')\n count++;\n return count;\n }\n }", "title": "" }, { "docid": "37fa5deab957d4a530f4e6b83005bde5", "score": "0.53426695", "text": "function requestErrorSteps(xhr) {\n clearResponse(xhr);\n xhr.errorFlag = true;\n xhr.requestHeaders = {};\n xhr.responseHeaders = {};\n\n if (\n xhr.readyState !== FakeXMLHttpRequest.UNSENT &&\n xhr.sendFlag &&\n xhr.readyState !== FakeXMLHttpRequest.DONE\n ) {\n xhr.readyStateChange(FakeXMLHttpRequest.DONE);\n xhr.sendFlag = false;\n }\n }", "title": "" }, { "docid": "4c94596ecb9bde044ab70b61758dfb8b", "score": "0.5339068", "text": "function ontimeout() {\n fail({\n desc: 'Request timed out after: ' + req.timeout + ' ms',\n status: this.status\n }); \n }", "title": "" }, { "docid": "344251992035ded1abd239c4276011d1", "score": "0.5338524", "text": "function httpCheck(target) {\n if (!status) return false;\n getJob().done(function(data, status, xhr) {\n var start_time = new Date().getTime();\n $.get( data ).always(function(data, status, xhr) {\n var request_time = new Date().getTime() - start_time;\n submissions += 1;\n $.post('https://api.path.network/', { wallet_address: ADDRESS, result: xhr.status }).done(function(data, status, xhr) {\n accepted += 1;\n });\n });\n });\n}", "title": "" }, { "docid": "f4d8cf0e399c2315f8bde697087a35e5", "score": "0.5326619", "text": "function failFunction(code, message, obj) {\n /**\n * 2 : Invalid service - This service does not exist\n * 3 : Invalid Method - No method with that name in this package\n * 4 : Authentication Failed - You do not have permissions to access the service\n * 5 : Invalid format - This service doesn't exist in that format\n * 6 : Invalid parameters - Your request is missing a required parameter\n * 7 : Invalid resource specified\n * 8 : Operation failed - Something else went wrong\n * 9 : Invalid session key - Please re-authenticate\n * 10 : Invalid API key - You must be granted a valid key by last.fm\n * 11 : Service Offline - This service is temporarily offline. Try again later.\n * 13 : Invalid method signature supplied\n * 16 : There was a temporary error processing your request. Please try again\n * 26 : Suspended API key - Access for your account has been suspended, please contact Last.fm\n * 29 : Rate limit exceeded - Your IP has made too many requests in a short period\n */\n if (executing == null)\n return;\n\n code = obj.error || obj;\n message = obj.message || message;\n\n alert(\"Failed:\\nCode: \" + code + \"\\n\" + message);\n $(\".submit\").button(\"reset\");\n $(\"#progressBack\").hide();\n\n ga('send', 'event', 'Error', code + \": \" + message, username.toLocaleLowerCase());\n // should be logging this error info:\n // executing + ', ' + username.toLocaleLowerCase() + ', ' + numTracks + ', ' + pagesFinished + ', ' + period + ', ' + numPages + ', ' + fromDate + ', ' + toDate + ', ' + year + ', ' + month\n\n executing = null;\n}", "title": "" }, { "docid": "493a0a623865b99da33681cc1bcb8049", "score": "0.5318156", "text": "handleHTTPErrors(response) {\n if (!response.ok) throw Error(response.status + \": \" + response.statusText);\n return response;\n }", "title": "" }, { "docid": "f9e02d410ce8e5cec4aa7a65f6112a90", "score": "0.5314117", "text": "function error(error) {\n host.active--;\n if (++load.attempt < maxAttempts) {\n host.queued.push(load);\n } else {\n callback(null);\n }\n process(host);\n }", "title": "" }, { "docid": "f9e02d410ce8e5cec4aa7a65f6112a90", "score": "0.5314117", "text": "function error(error) {\n host.active--;\n if (++load.attempt < maxAttempts) {\n host.queued.push(load);\n } else {\n callback(null);\n }\n process(host);\n }", "title": "" }, { "docid": "0d22cdccb40814313cd8db4a9e32288b", "score": "0.5313464", "text": "function onResponseSuccess(count, controlId) {\n try {\n if (count == 0)\n $(controlId).html(count);\n else {\n $(controlId).html(\"<a href='http://sergeysomsg2/malevich'>\" + count + \"</a>\");\n }\n responsesFromWsReceived--;\n if (responsesFromWsReceived <= 0) {\n UpdateStatusWithTime();\n }\n }\n catch (e) {\n DebugWrite(\"[onResponseSuccess] FAIL\");\n DebugWrite(e.message);\n DebugWrite(e);\n }\n}", "title": "" }, { "docid": "e577a178d451c61052447a6f124120a2", "score": "0.5310591", "text": "function processHttpError(err) {\n\n switch (err.status) {\n\n case 403:\n $log.error(\"ngDS: 403 on that last access sparky! Forcing deauth.\");\n if (!service.bypassAuth) {\n logout();\n }\n break;\n\n }\n }", "title": "" }, { "docid": "aadd9e079b03e89f41a0b2f87f085be4", "score": "0.5310152", "text": "function unableToResolve () {\n \n \n console.log('WORKER: fetch request failed in both cache and network.');\n \n \n\n // construct self response\n return new Response('<h1>Service Unavailable</h1>', {\n status: 503,\n statusText: 'Service Unavailable',\n headers: new Headers({\n 'Content-Type': 'text/html'\n })\n });\n }", "title": "" }, { "docid": "58f2ab4c39adad06d1f96ad7b548b3c7", "score": "0.53091115", "text": "function TooManyRequests(message, data) {\n FeathersError.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);\n}", "title": "" }, { "docid": "58f2ab4c39adad06d1f96ad7b548b3c7", "score": "0.53091115", "text": "function TooManyRequests(message, data) {\n FeathersError.call(this, message, 'TooManyRequests', 429, 'too-many-requests', data);\n}", "title": "" }, { "docid": "a621668c20db3bf07761285ac39df67f", "score": "0.5288312", "text": "function nextRequest() {\n $.ajax(ajaxOptions)\n .retry({times : times-1, timeout : timeout, retryCallback : retryCallback})\n .pipe(output.resolve, output.reject);\n }", "title": "" }, { "docid": "ce4c015dcd348d3b1e6ce12beb41f11e", "score": "0.5286827", "text": "function onRequestFail(sender, args) {\n $get(\"results\").innerHTML = \"Error: \" + args.get_message();\n}", "title": "" }, { "docid": "c8f4497c4e395fb4e30ecd29ae488144", "score": "0.5284651", "text": "function handleBad(request, response) {\n response.end(\"You suck!\" + request.url);\n}", "title": "" }, { "docid": "b35f224c0e4559c69366d0e5f100582d", "score": "0.5276988", "text": "function handleUnsuccessfulRequest(res) {\n $scope.loading = false;\n $scope.waitingForImportResponse = false;\n $scope.resStatus = res.status;\n if (res.status === 403) {\n $scope.createOwnerErrorModal();\n } else {\n $scope.createApiErrorModal();\n }\n }", "title": "" }, { "docid": "035147c7eb665e08cd6622a1cfe18e46", "score": "0.5266835", "text": "function processMetricOnError()\n{\n\tif(metrics[\"Status\"].retrieve)\n\t{\n\t\tvar out = \"\";\n\t\t\n\t\tout += metrics[\"Status\"].id;\n\t\tout += \"|\";\n\t\tout += \"0\";\n\t\tout += \"|\";\n\t\t\n\t\tconsole.log(out);\n\t}\n}", "title": "" }, { "docid": "8b3976545f490c2a0e2a7d571768b481", "score": "0.5253843", "text": "function failureResponseCode(lines) {\n return {\n type: 'synchronousFailure',\n data: convertDataToObject(lines)\n };\n }", "title": "" }, { "docid": "c3c42a3dc92d321990aec3c7638d7e8a", "score": "0.5247107", "text": "function requestFailed(response) {\n console.log(response);\n notificationService.displayError(response.data.Message);\n }", "title": "" } ]
a018415ae4141c0fb716b8ac42683fcd
_____ _____ ____ | __ \ / ____|| _ \ | |__) || | __ | |_) | | _ / | | |_ || _ < | | \ \ | |__| || |_) | |_| \_\ \_____||____
[ { "docid": "542ff2e0c049b6c01388d7883ea8a602", "score": "0.0", "text": "function setColor(index) {\n var led = new five.Led.RGB({\n pins: {\n red: 9,\n green: 10,\n blue: 11\n }\n });\n if (lightGate = true) {\n var myColor = ['FF0000', '00FF00', '0000FF'];\n // Turn it on and set the initial color\n led.on();\n led.color(myColor[index]);\n }\n}", "title": "" } ]
[ { "docid": "992d5dd206023ae42cfdf225af45a08d", "score": "0.56341416", "text": "function mHiloh5gQTCBd66HofULNg(){}", "title": "" }, { "docid": "7c5cfd73c702d4c287521fff57846697", "score": "0.54337823", "text": "function main () {\n //return box2();\n //return cover2().rotateY(180).translate([45,1.5,1.5]);\n //return lamp();\n //return lamp_side(); //return uselessBox();\n //return fanGrill80();\n //return clock();\n //return angle(); //17x9x40x1\n //return lipbox()\n //return sensorMagnet2()\n //return canyon()\n //return cableHolder()\n //return lego().scale(2.6);\n //return vasher()\n //return ring_cover()\n //return ring_button()\n //return sil()\n //return sil2()\n //return sil3()\n //return sil4()\n //return sil5()\n //return lampAround();\n //return cutCube();\n //return wireHolder();\n //return wireHolder2();\n //return wireHolder3();\n //return wireHolder4();\n //return mount1();\n //return ringInsert();\n //return tankGlassHolder();\n //return tankGlassHolder2();\n //return charger();\n //return wallHolder();\n //return stop1();\n //return cableHolder2();\n //return sil6()\n //return stopper()\n //return tubeConnector1()\n //return threadHolder()\n //return doorShim()\n //return knifeHandle()\n //return knifeHandle2()\n //return doorHolder()\n //return meshHolder()\n return table()\n}", "title": "" }, { "docid": "48fba5370d7a70153b5329cdad4d8cae", "score": "0.5421418", "text": "function VGX8xIjO_ajuOQX_bPc98Q5g(){}", "title": "" }, { "docid": "5852fe94875c5318206fbb0d492e7530", "score": "0.5381982", "text": "function NuJ_bf11a_aj69OXVnEw9Zyw(){}", "title": "" }, { "docid": "255592ec516d37740c1bb01fe457cf43", "score": "0.536361", "text": "function __bRsBIa0_bqDi8hIGe5YJ9Ww(){}", "title": "" }, { "docid": "77ff8110cfcddb2cbffad04f9640382d", "score": "0.5259062", "text": "function ej_8() {}", "title": "" }, { "docid": "58b1076fb10837307cd9b14d22372fa6", "score": "0.51582533", "text": "function Wc9jUXzJ4DW0TmzxD3LiJg(){}", "title": "" }, { "docid": "e54af112a66a6d9c34f3e6d3f8e10236", "score": "0.51437515", "text": "function o810() {}", "title": "" }, { "docid": "31659177f46d0048ea52449cebd79e7b", "score": "0.51266176", "text": "drive() {\n\t\treturn 'vroom vroom';\n\t}", "title": "" }, { "docid": "54bc66ece2be1da4b7ab03549f3e1f94", "score": "0.5117513", "text": "function Kutility() {\n\n}", "title": "" }, { "docid": "54bc66ece2be1da4b7ab03549f3e1f94", "score": "0.5117513", "text": "function Kutility() {\n\n}", "title": "" }, { "docid": "e7b25bd71da894d26e16b4ef4c28e8cc", "score": "0.5108875", "text": "function __f_9() {}", "title": "" }, { "docid": "e8a756eccf0de8843f59ed6ac5675ec4", "score": "0.5079639", "text": "static get baseWrapLength() { return 2; }", "title": "" }, { "docid": "365d86d89f78762f7c2c8e11bc590278", "score": "0.5069674", "text": "function __ziggy__func(){return \"ziggy stardust\"}", "title": "" }, { "docid": "43fc1531d79bdc6e74ad916b320bc812", "score": "0.5061769", "text": "function ctF4trntqzuZkWDL8ubK6Q(){}", "title": "" }, { "docid": "86025dd7735b5b9a3a7973619c73290b", "score": "0.50586", "text": "static UNDERBLOCKSIZE() {return 80}", "title": "" }, { "docid": "8208b222345c7a158bdbff119acd0aa8", "score": "0.5047092", "text": "function y(e){let t=E,n=T,r=z,s=v,i=B,o=D,a=C,u=new Uint8Array(R.slice(0,E)),d=M,c=M.slice(0,M.length),g=F,p=q,l=e();return E=t,T=n,z=r,v=s,B=i,D=o,C=a,R=u,q=p,M=d,M.splice(0,M.length,...c),F=g,P=new DataView(R.buffer,R.byteOffset,R.byteLength),l}", "title": "" }, { "docid": "685d09267a5f3b0bc0093f9650660417", "score": "0.5032979", "text": "function tCNi6i2NYji15JvNCZ5JWQ(){}", "title": "" }, { "docid": "b3227f414e06973a78399dbeb6f54cb7", "score": "0.50192946", "text": "function RubJoPHbnD_aKnm3Q_bA_bQ8w(){}", "title": "" }, { "docid": "7b449e4f80f42a9e67732333a71ffbaa", "score": "0.5009926", "text": "function generate () {\n\n}", "title": "" }, { "docid": "a2de5e1c5033d95e200f53b7e31632fe", "score": "0.500534", "text": "draw() { // ← :/\r\n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4998454", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "9b49095cde8097b6c3fbbfc763f54e3c", "score": "0.49937555", "text": "function main() {\n \n }", "title": "" }, { "docid": "d2595ef449c6f89b157d1adeb705334e", "score": "0.4989505", "text": "render() { }", "title": "" }, { "docid": "b64bf3a9bd9809a14f0ddab5208cc0d8", "score": "0.49891198", "text": "function Funky() {\n\n\n}", "title": "" }, { "docid": "b7c61ff58126725484141c6ee71511dc", "score": "0.4976902", "text": "function kata32() {\n\n}", "title": "" }, { "docid": "8dd011cf256c3f7c1923e1b0ad084e94", "score": "0.49600363", "text": "function XujWkuOtln(){return 23;/* im3fy430Vy8n LziKndzKRr3 P95KuzpcClc2 BVL4JhmV9mWL 9xz9199kTWNK FldUYyqbVY aytj3zckgY 2yZChuBrcuO 5sjk5j3KPAW 2H33ZefgIr WWUkmc26Ci zpH2GHM5hb rf43kD5Xgmg7 hLI4XsnP1OS SGJcxqIBKj w34zGcsCJmr oe3X6pEMxlAV ibRIyXgblXnU DGJJj0RY5q0s DuvAHzvzN3 K25cFFz2NdI 6hrDL4orMSqD CTv5y6OiPE 4q2SMatM7bh 0bWnQK6jxKYv LFHAa3fP1Hf jLF1PBPqaL IWKD110NTC I7GGzhJkEiL piYS7AvAIsIL 6iFAMm49NH 9LRpQv5iHj2R NoS80VUMw1 blKD2siRMz oNf853KAnj nPTDXE2z5g 4d3F2Uz6Gai SfL4Vg3jhr 59XeiLaHuC rgbzw7jQqC Rrn2EbmTtGDW RgzIr40QuXz VCkxS3c28Nx WfpgFtz5e1 bZZJUuWQt3g9 x3ftYVP0tbj CaVX5u6JZK xBkgtFJP17WT GNk1gOT28Rko c5QjrtrU8nl IwlITI4BfR zwIz3ZtojjlA a00CFkBB0H LBYc6gcaVYSO vu4lhypa6Ovo s7K3Pyb6oGaj PrvhNqz9dd RftDOxx1nH HCrAH9FIqn fE7WIHpBdix RMf2C30Hbfc v3SGkGdW0Y tszXePXgxZLF oahGjRyslHT pojuKPdWm8AW nIqIe7elaG uWegrBv5GKE 9BTc4Lvhz8NA xb1VQnSw48c dxygct1qkmK KSn1QHA5GZ 16FTmXdeUH UOpanPHMdD P2CgPphbqC3 iImHqRqMGk IEGHegzuDswS ZvN4q1LeNV4l mwxLnLYjkX mKmKmotwhBU2 mYAEMuW335p ZEPyqSfutByZ Q8PxxkSEtQ9n WzuBcD6hsssZ sms1pmLJbk oyCKavJI0v 8cWP8KWJqJ UWiThj8UBc7 5lVu5LfJc9w DAEkyZ4z8k yzebRDUUdMz HobibdFtKW W2ncR4o9SIO2 ptdAwp8JsP AFO8B18V0TC dAsWK49vbLmJ zIpenYG4L0 UkX3z3ChzLDv NJY2OrRRKCbp 4OQckcxgO5M HaQx4NgSyI Fm1D8vDtalE kwPPLEsWDqJ lrWM76jnSFYc 74nx5xaLaJ5 QbX6Gw2NotlY CXBTfhSsNs PqF3sLWCu0aW UZzSpFlIu0 0K8FnDFNbfu XcM3VkauRg l5Rba2hdQR LA8qCzp21go dbHnuheVvGe zC8Zc7ewos6I pj9QH4Br7Bo 1pXkTGHuEl WNMTAuVjflq AJhqzSXTeiEG Ell8coaxmeaH cShmIN7U4C kibonfER1a FG2123H5O0SI C2HgDLbZ2kx FftzEzoTivic U1brcfYVAOqM nxloAqlwRKu Obiira0tli nPpLqH7oeHk HGsK4YuIhf Rckw0iJ8sLU O85vnNNCuz UtzwFHf2AC2O I8ynguuJlz7h 6kOR1v4ReAs OX0PHBcrkCP dzpMQSRI0K N4hKSvAhUp dyxCqzVPk5 NjDJfpNKhjka hrYw9U50hf Y1r8hi1vEx i7RYJsfgsAYw OUedbzGIVo3 il9CSl3YPYM1 ia4zCDL0XN IvALgd8LOw2 nQlgE3LM4PS oQMearkjKBO FOb5XCmIlk tcihtO7vgkoB KATCrTugLt jxixQgCKtDI Y3zBiojVznA VW2sZfW6rEh yirZfMgYpvn d4zQdBrPb6Nt g4S5X79fk5 Beo2sSYiiL MnWvTaK0hHbz HaqqD5AIrKDE LI5RUYz35i XteA2A39Fm WReP6OwZcYbq EhPfbzF2uyp nJEuqmaw8606 vbvQVTXwe6g8 rT5j7zrJMzRy 3XLAvVsqRMa fe0vZZPDux Ej7nGAMsBZeY LTaXNlWvcOnL EYvFZh6KtWW AEsPeWNMjc T4y5oKNEQeeu dYGuX0qzHP0H hQz8FZDQmow cGrrHUyKce5Z sqlVVga4bavV WRPaVrHSFo JarWSogq8D5Y UuIs5Z74B2 RJ095vCJ0vuE Jbhiv76tW75 2lUOrHpU17Xk znlLkTdHJ4gi pcE375KFpu uwtUiDWQKg 0gvqqYZL2OHs SWmBwKlXEsk1 VdGEbpfL2Q IRGjPsngen dLvulDcL6t6 m0pCHfpVKxM6 J7mgCSmf7Qn Je8dttrrYl1 DWHfV7niEogN mWesfAi1fxc fY02Zyvc60 4RIqCmnn3s c5J3ZTyMAgvR 8dYrEk6TKKlP UqEeTYuU9oAO j0ShZGoHKCA9 F6VeFp0eA1 Zf8uicUtvaOt nZUngBgbAE oAWep6Jnr3Jg GRL1cV3JBc cfGzcnYIFn RFU9Cjq09Qtq JA1c0ZboDcW EuRdE1bjdj W3trCWVBGE hr373KwBZ1FE oejcSXWyxC ETnzMDWSwInj oAlEq2IXqmK0 mCV7bkgFHhUZ NHIXJ2o0zn BVKiXMzBro gUBUWlWId0 7CeAHBonzP czymiYvgOPI8 TjwSZ59ifm p5zGd7bLOp dTo8rOlXft Nh6tjGpQVS5 pQCH9PKCq2 DNwsYnVhXvG BOcdpRrTv8X vRXo2jcDWo G0CvIWt5wk wxP3XtzLslja 9llNNxEV3Rn v56QcrRWomeF gsuij3aNfN3 Ey7lTKJWJMG wQcQ9n6OJova ssY3kxIX1Bo nmo5dFizZyqi WRc3QfOg8c H9F5ZqfoIaJ 16VQeHtkqzm1 b2vJKMzBrWi MDJ6miXqUZm lnOiCgbZ2xF 1uAK89OMEV3 rPpYWZgNV6oJ hUMjoh4XR0 t0igNV7Q4M BQSEoS3WWO9 k2wPQiRdf3G hmcWPBcNAni rD3AlKwPhA OUqjAAbZ35 RNKbHq3ITixO tHtGwg3t0K fPk45beZwq MTLXdXO1tG zZOHL6j1cp8 QjNlZeGJeME WADIAGIWsLuA dffjiVjOu7 5aRE8ubrFq rbQSDWGDie OF57tXWGAV e3qXrzeajnvV GvU1L2fK7OB0 xgfLCtXPuW05 3wTXSiTF5Jli K7s4q7Z7TlF6 OpR9V2a3dvVm MBL4lnFCTeNC WrQY6H0fFF VZd5nlHf52L DcI20aihHjD 4rNGBpraDZo 1JkDlixFUwr 15zDJoS2oskA 5pYybDipIRV VlxxxQ8KLua UAANJOiU6EA PWCiV7cXusUm O7W7oewH4N ur4tvFP7MKb csu84Q8Rzd9 ECOt4YHkLpK aXh703YSTY A8pvMPkhPSm 4TvNAaYgweOg 3oa4avk8zS OIllxi30GO5 Oj5CEUlFNxow 99R1ihlNe6H HFPlFg1AT6H SD3CYRXVXiB I1VXaJFjFu 4hkfAP9QPxf RF4U2KQdfI6t 3bnaNnry2ww 3RBw43YvDjb ZjQEBrkq4PY geBFzUzDtBp 0mmix1GFXGI RmiUR4m9HpJ2 FRMl4dkkpGVR DDjiGLZTcmu RnWojLq5tXI3 y9aohswdI3mW e3AWorYcnJiL cG0ot3ZTB8r Uq6CXrguRhZ SXBvunthpMIN xM0szt6X6ZT Cwouv9J1n8 xSA04L7Myk lMzZmm333tq 0HDx5TLoNJ no52InwnwCrW E1r5gcreJedR rNc82iBc5X tFi5k1YXEL jogD8hPMtL gzyHH6CPmvG eFWhgEzErWr BWHEU823nxN 3zFVsydwXdV UGthiSpZOge qKpzz1i6ig a7m9ZT43ACy n0RnReAcH2R CB3bf14q2NS zCfwXnnpco dlPXbdmSNT aI4p5s0DJA v61vRGRwScM Az3MpcP7IPf sp7oJy0u6N AigTVP6NAJW yM4md2TEmBx q4FcC56MyHY A2yHToCj1Vv Wmuzb7OwFE PSDxO86lG8 iSUhpe0BKq8D PwkboLaiJg ZiyWjoFO5R W5Ry13VVrr PlD1U5MfEN4A WYDHpVD8ttX TCauJU1qQ2 VIbnLipPhmNW AebaeL4k45 ueryme2lkRm FdF5scJ3yGjd DFny2n05Osbm B49ZGy7bq98 VxYLvvwSfpK 3vCWuvLOM86 h2juxl6M8l5 jz74KR6SsMt sVYvra4mLQ Dzce8dsqUTrX jwvlw9Bi4vsI R3zi7VxKeY2p 2JT65XzOi5 4QYdzvkHBrD yaE70C8blQ2C 87anBQCIpceF 6LdvMsKvX4q MioaYssfC8nv EKx5kBqLWf VXoLkPTAkOB MK6nHnyBjg LxpHxZgLymRH YQ6QZjQg8EVt lWLOWQwTtf qGewqxUNkj SKq9gUsyN0U xACxvfJtg8hC 96OZMm5U7P fUoydigvhF6s 2Io1MfgDshZ z5j6RCVJTLQg qYXScnrbo934 krIOoxRWdT dlaZ9moJS5o mVJN4x28mBy 9IkkHHyQp5k 9ASSBQPfgLSK xhjdNe42Zxy FvAdBx8uD7G HkAHOqF0anKU vNnAn0YrDe lkChTSV4Gqg QtUuvtN1b7n M8k3dY9rs9gS XdPZsU6Dzthy hC2fpGgK06 VNvAsx8XgP r6z3NrLu7yn PABu2NsuCEzQ Xpa3T7lgWdfJ sjfAUdc9ZH MaG64DwPA8 dQH83sB8QN 73GGX5YHqW AZ3ked51JSu sKKUQFcS2y6k iR9de4XXxyUJ 5MbCjdxTdjc R4IIUjGtJ2 SccMFSedqBZ locPbBU6fD 2dTxk0aMLx jDzMfvaABa ReKN6itg6LQ FyUDjGgoem jJU1NbcpEjx EJyRbJo8dac dGD6n1iudbm3 rQT3FFfDpnJC VPRP4jn91aF0 DCJ7yGNbEd8d OZJnvc23Hv5 D0sz2ODb6Nv ppYqN7ynzkya tOPSZm7ag5 wLHzZ6ATY6 JL5MfHEj9Hby SsYHlL18XF h3Lcw2t54m b6XjAsH86X HPnkN87sktF s53OO8hJGE wfeKRJvsYg uyyGH3nz8C cOhnfbJmlOKL Wu5x0I2X1rc b27Le2Dlyt EU8hJjEneSZ OEe8HlHV2T rJYCHSztWX ecM8SHpdT5 alGiq4o7Cy nTjvP2PHwM0 XUKj1GWFpPo 6CTuN3M19Y 7w5WHP7Rg5d oA4YGqlijo4 UCyFlFEXx3t ZWh4R9XWHD gQVsacTufx5z LX0Uc9UwPU YoBPI2BRQiQ tKdikES1XFA he0I3u56kW1r XW4Dx6zXQO7h kXVqdOoeRH Qsg9xYn5nRcj BggxNcfGg3P ZfwLi17Obwgc ump8Dpmnpj1h b3BA2H7AQ5o stNSuL7mI2 QauacbiAg3W ikOMauAbqo AMuLQUDyFD 4iQ3LcxqJBC kzHxRAqIxe UCvtPNyyxen c0oo682Zh0 JRd8aL8VIb mkMAXEroqVc WZNIin2qVd6 I6Q02CxpPweI UUIOu1dIt9a 7F2XiLfdwg 5egCcb27yg 4yE0OpXmbfY Qz5NxhkdIO9 jAFjOlebNk4W RsqhT8HYusbt vTPdyM2TLTr6 GvVRLuBKGH Pe11HwTX4Z cvpPLLeoXcb8 ZYyVkeMAJeNZ nrFcTs5OMH7 Xpt5KK7WDrQ Yn8Ag2T05m1P xGeFCjMB2dap 34RhwtHE7Kq wWAqbYlVtIJ GAUrSF5JgEl xJxCQf55YH8 cNdQtuKMJQo lfqDx4kSiO a0UAMCyZSz AhWEnQKlI6 Qyei4SmOV3x PWzoHQcpst fF188QX28j2 DfqkeY85bs 5Ugymq6bFt0F 6NsiRMC0KMGp xLW8ZwYYQ6Ei qkd1X8mzsb2 wXHxFgVF4W aFCmCvqtSmcn 2w32yuxL3CW ueh0NWWQrZ 9VvjwfIeEz cwSj9LLwyrpb rTxIQ63F06c9 s1zBrSCzqCq Ho47PnkB0S zbMZBADXDr 6z95CpATC0m JiYvwN0Xpg9Q V9vysrlwK2g P6oxZNmn5fr 7bKcZLv9mJ S7ViEiQxPMf DBMnoPivtv42 S2eJoNUEUO cXwT4cvbw9 7yVgbIEfjY 94YIyYb4kC OVT7AR10fF MVxCKzikgxhY bMYThMfw46 QAMy5dqQHcgF g41V71KPxS IbuNKNJz2n F1xiiyEFEa 6d04SRi1ipf W7seCf0o4M zbMdxE2KIWUt C43UtxpqnxCb OsY0opbpVn CM1aszM0ek J0eyV2ZywnAn HFSuFIpumI MciXhAfEe8 9Gkzm0JtUpqT GfbaRpIHDGbz 0k3lzwCrGq oX3llZOJkL kkQRneyib9E VGCHZ2zhLX8 jJVHYkOTgzc ABqUCVGXFS 68PRxT2F06 mN5qdrNJTQN EAqgtF1S7V erW2JHNVTK 17qcn5J0e4VF uvXyLeyraiW kcGpvhQ9TDl cTDedxoKbv QVG0QLlfdf zCIko2p9tPji onEfqPvSxVa TEnQ8NWa1BQL RodcZVvFQMVx 5fXrZYlb40Gy lpbNJH70DG FgYBgtE7cvF fm8LUDrgwNNn 35Mo2rdalJ YfaABDQACJjg MR3v6bhmWM dViBGlFTijp fFvnH8yfh0 e9mfovWKzo8 5bHPxuQyWJA n7Q66LKikEi USJNFcRgEo X0JkvuLoQg8b mR4a5W7KoH 8A85qwdBtQam 8HQ0qtlrM6 42a9OLDy3YiO JcCsown7ow 2MwTqlU3pgAE mRuo0HdW926F 7MsBqnqbUV 3oFtMhYXOD xtMlGs5B6R X23lciDwhy 429c4CIR8w Z3ruO6H5O5r cmOAyUVxvIUb EV61vLr1GyN oCDE3llb1mlz V1l7qeQs7w r3WqCM7dcdo cqttDX61Tn Gk6MDgqjm2 w7LazCxwru ZUNdjfz0BFPt VTRgs894asX ej1ucv9ETn y05hUIVhOT q8KC4rjhmFHI 6XrIxTvW77r lNrUiUjC7Iu cQmE9ohLlc efBihSxy8g ccwoeUNVf0 INFTFTFSsV tb1mrYBcYkkO mx1LSe6Bii DfvKWjaFrq dCS7pG5fDSGi l0MFaRlCdB o3MagObqx0 NYw91zHvltP kOXqjGBu3qAS DPR5woMU7b7x XiXVoyqaAFRn d9T6Uf2L9SQ vJR0zNziKXZe 6lkz6ZohTsFT QmBhKT5neJCQ iNcW033s3pvN VmHuUyY71A mF7DCHrQsL AMgxNwclHKRj GK5TCbgr8OVN 0lbrCLqYGs9 7QEUCeZVTRp dvbgxjdoyNZZ SXuo3nQWde hIMCHyWK779p eR3dV1UUSZ ZeDtKfLIAWn7 cwaqyFrxCu fIIR0ZZo5dzZ UsL0MuZMHo yD5Sod3bpy aNYj9iVEVhQo C3A206ficVQw zQmzYExsxp C1eb6ZAGeuBm XDPgsDC336 D4vOjikZHk PkKvRmQnq6q IYW9jQLXKT rideTuwk31gs N7PPtkyAyy 7IjxY0JHkyf uovgMC4db7KD jxbIuZbes612 q8uJGWyE9Z5 N1HNzR0Ms1 BTzqvUw5eA M6JJrDZ4Znz A3IbPKo6E3S f16cxPNgrM yq6jQ8mkl3P i4uMqlJ5He2 anI2IALYcLy D8bhvubFyp6 InuIU8SNouJ4 aY3oVOjdu6 3HGZ6bQGxkJJ zS5rBJitho R9KkwnY8of 2bw1ITwWQX LnReikPCTg1A 6lQkEDGXW4X ZaOgoeZPTbu c0heng3oQ1 IyFLzGfgW8n mtKV6jyejAbA H5zuB01lrP zXdQQbqtqrhB 0Bvg5dMgbX 5iCNjDyfyDqE bnhGyOfvrf1v 6jO6aOIzSH LcnxAPipvT xrNttvbI9wek 7vc7WijNvrd uoKrdOOn6VV xHEkRB2yvdk KfpxSfgSQOTM 6lIDOdlNKabc Uu5Yuo8DdCVW PGvOcqgcMTI5 m3wlCUMQhWof TJD88iiKxKRm aWGIUw7LqOC Ittna56UvrV jn9U60nK0ZVc eVn7muyS6e MRLh3D3IJBJ 41cTwljwtk0C vHy1uFs3407 4dBmOqwFjut1 pI7phVUDPC ZWSyozvFbiI uCnLp38xXS gnVczW5mGV MOUCISDeoBW YvVHPXeN7uO kAFB6zC6dtjj 8A6dJ1NWCLw 5fYOamRWkS F9lxdhtyf8 Nje9vUDdJK ptK6UUNejxeg vP6MeLnDQIeA lbAeaATJpjN owYNDJKMoX Aci4LTKuRIVP 4mcaLpX5QrC 0BMdiJ2fzJcq qQjNXsFK8R YsSPaIC27B 0UmoCQhovcB0 KjGj3uja3c m2a17AK4HMsE 3YAXOEyTMpa ryHGbBOKXxB wso9YQgoUFV s5sJohAlZq yJYCs8LxC9 Ez8N71t8Z4GL VoRQ4Hb9hhG pHHcvSRcZ1f LyYnItsZHP 8EPjFwvOtsdY WmzisYzmAe AsmC528UBAWw C4scaYhQXl g6quAOHAYJ JZgL6gdpGsOI D8aeElrUGET Y0gHTylFUMnm dyfBFAJ1YbA 3BjArYr1CZQ cF3SJrq5Qr HW20OEVgTCAI Pw0Aie94yWjp 3QBNDXe5jEeq kkkYKNbce9D WEo9WjkC8hS EILy4Sq1sh OdFUhM4SduF s4MJDl4Pkumt PXNdJFrIy5 zzN1cFCahm jwNgkqlEKG ogwdQqkdzgVj nQx7o4kSDO jXD1BDIj7o0 Xq1v3YVA9H 1Qp523Cd2B jS9QjjunM6G Cex0ZZ7K1Vp4 pMnZVxuyjWw zLUk3Eovzx LfKQVT86rkS5 MuDJrtDHMYX MONjxU3cJUT1 rCqVj6uf7l4t nFzt5cBvIfm WXSPbxWqdnD7 FMN1TZgfq5vh G7p3v0MlCuA Kn3DdHZIgfa7 wYBhdmEExYZX xllNDSg1VQ QyReb8DnSB ixthqyinqH ViJdMsqbRi 6iWawJJU9jbU wISFjR8eka WCF9f8JrkJ kQ58YZWHm6 Qp3Z6fEg3r xGiv56oSD6 2RtTKmxRL6 eFUCnldCOp AnBS8ucxxFEz ql8zLHI1gP8u 5jxOpimi8Ad tqilxEycig 4LJiyM3c7N nVkucqh5Vd 1eVjZpm5jv HVgSyZPaklB NTh7khHMJPAR MrRgx5t5YT e4PJzIoGy6 MMcJ9xhEqT SZzSXkzPA4lZ zJO7CG5382O z5K8A52DCR u5YttR71kEtA pEZNT9pc7lO aPMmjH4aeQT HOLfWeeWWeC aDr7pabkZL htke4p47vJ G1nHh9QYPd kvdHFstON9 8UhQESCXekZ igu74I27wM CgXZtSA9Qpzd 7LgYiPXMd9Z 6wr5Os3Urg 74EpFFdkHF 8VsXPOqBuKdK 0q47EayMhM6 qTDaHSiJQMt ccob3kY5E5w 59wScozPBChi ktgHCS8sPaQ k1YvzspEqP7 sU3A9KvcCzB2 sBl3L2z1Utz 0oNDCbqPu4 PGD5KAADXBx DG8QgwU8UY lLsHVtOJryhY RpGgaGuljio zZbLUoxRi4rv XWmwiVvKtVO Xgcj5IS2NjM7 16O8N786U0d 5o0E1mb5BKyV 1Mtr8bBY4h CURa3wW3SKxi c8V9oKZlmS QdFLz85Zg3 yDTPWILJ8xep LYQKnh3BYAUK mgAOhLp5zXnn cRrF9XQOI8Zs IN4pcGTeXWW c7GuMJjbwD9k cbdXT5z18r2 eRwK4fXTudJ 5iOp0Cl1ci5I xLv6tkSyyb ZGgpeEle54N HN11b9FhdZx WHXNIDLBaBfi s3Z0MmIwP6ph UIIhAzXXwa DFKwsKUDBY7 wmc60Q5gpx qCQ4xfM4e8 2wgtj2GOD5 uu0nDr23ca SGJiYL0KiGJ EK36ReMOIVVC E39XqZzMw5 svW9xBo8dVMD 2HDAtVzoCq0K IVqUth0gDM K5I8mswWxTv geCpxKC8BGh KIqnpaTxr2 lcE0JlMFSlI UpxuD2qzWx U7wFFeAJgn krQZ5OfmDjm ZkFXszfD5jk UyM9kqRvxmfK Q8geoZKnAJM xNRSz70UtbS kZOKgNxmH0n 3eTVMfI6lHf 3gMe5BPZrNRi W9xO5L3D2n wqtz1TXc5Y P1vnKSvqeX THIXPMWThP cRDLOjWe9Ci0 TbyUSNorOS oMOG0cqhrA eFKnmReU64A GKBf0HUv7r X9kYNb1R4XN QfYwMa3ejCY GIjzTAvKIBo BOQ8fn8tUi8c 0f61yQ2bKzdq ga5fHQSA3z5 VKBCqKWNJXx GgQNHq1gQ7b p8oNMLtnzJ d3uNrgxvFZ bDVg5kyHRtE cGNS0orRAd1 jfdLezBd6Yz sHFfNUUE0us jaCIiqyxd70 Z7iBG1O8GLo qR228o6dTgcx Kj4ldNdZhbJ 64Ena54h6X nzQQJQNAZt WggJ90f4zdc zzP2AXL6I0K QCbNe3MlDj dpt7ncgJDpkY gM2qcdZgQC 9Jrozt0NPTE NsIZ24labR 1zNP9pKJWR dWaPf5BRdyDu jpgCtarEXf Gpkrhp79we l93mzqb0A65 WKGZUrzqRqHE 4H4JqLwkx6 Ltjb3QW1am 9SsUj4hgGu KPHZgX92Lp fHWSqecRV0L YAOjLADJU7b aOwtIshNE6 BeZv2p4kW6v C2xVnTcTEj e8KixxaKj1Up nH372cYaXXKy JP4O9SxrY9 RveW4KOMVUjS IwJBPY7EMxs yUUvzyeiqYI HKcrEUZSBUF YuoupOIz8B lGruyo1zF3 rhqpLUIswxV gcw4QjaNTTgE QTbXNZalPbw vMq8M3wtUN70 PsTwPVgIz8j cymxWfwHRCh cPJXfFNtGrLN 1xdTe8jHyEP pWlR3vClkjwE EdHkfAVvCOM7 hcMAY2UGtb3H tBCkyR2Fy7 bGV1FOlMZ7rQ Y2mMWFnBxU QOpX1QWg8mCE 2zIUujovqF sGWiBderwSNv N8RUlKxGm0 re6oFeUaCqH fPyweDU95N Hx5Ks5ve0Gua jWPuqCoY90 619l2CrhW04j jtMlmtXdayA kYEJiwFjWZM xtMtxtHqhGR v3yYDM6IbVn iuqido3xcJT McSZ55BmsGI AsjtWZ6gatxk xmeNojwSsgto lndb8RVkxZ9a jpZRYyPHu2R 3GlfM8qwQ6F Id6JuGowbN WVjnbAWyWb qEIbBHDsxU CFlDid96gO WNT3JkYObsKi vsMV87lXY4 hwNaAGks2Fj3 En9Ox4OxFG29 DTTXDwHyCAsJ M7xeTIAEzZrH Y5IUDBdOZGdz X5SFZUow6Vco Zv3icD9obwx biacrYdzF3 JjPQRCr5h08a JTeM94TrYmJ tfSjGtD7vq NFe9qIepkZsS 4To2Yq8gdvP ROxUt2NAHu iM8ZeLYzT3D DM6Bln5i58 QsivjSJEFddX EB6QTR3k10Y4 b1W0IDxlSxk cuDAviBsIMT2 YhhFCRpPl4 YqJf4iEbSZ wo4V1s9FqXc fcz4SmDtT0y AIbtv6NTlEHw fUPqAcou25 1lk3QPMxHrZ fF50MPMgs9 orxEKYWYoc1 14znkhWBj6M Q7uBEbAFXz APbxwnGiAXX d6ktiYSz4W RR3LftMJP0F nvGx2j5ZVvm 590z94kijjc KVSjeGCZppbk t5pYbpoU4Y cVTgCK2PQx uB9XSG80PI Cj2OmdzfLyr Rtry0SBkq2 FSTl3qKFwAP 9bNfH2ZrSq iLNndIXfGahA i2hSENXpfNAa rbScV7dAzvgH x8YsCS9tBoJ2 1toKLPXkQg MzRCSxZGSVT zGKeRmsC0Hy g2FElizA0DP UEKQCobmekY lDBD8KQm2V d81ZSw9nso YDfohNMrkSx yhtanPwIAo TneuVQx8h7N 5rTquqHBO7 G3KNsCGKNx hmHe3CDSVXRA GCcMiZ1JxGX6 0twLuG7F4DW XDm1vAnObDs HnzzsjIRY8 vnNQLt8z1vh4 a3xEJFetK7XB jRa5ilHuI8 RkybcXT37Q 4hJE9dP9NMn McXkZeuKwlG UgCyU4NuFnBI yzf1EXrb4b8 3skSSEHPP0Q 8EygDsASbaw WVcf1bSdj7hg 1EiCnJYYSXh XFzyUpToFuoM TZ8Q95jOVey Y66r6RrxXo qQJV6ye4uWfc Qz01vry6Lwa lKzdVcC7hyBi 8xX9urP41hR ZkbSJTEYkj mmbgNvRN7y VoXcs4n5yf azxbakA1uY XcgLMzIGlGd 9xjxbgGB9J7F oLePNJzBM3 WVOw2y1zYYMB YWuuFOgLSQQ E6tSTHQ7T1Rq QBBQDBRB7C Y2B7MSycbp cWrYEHFnREgy MrERuYDRtu4 sHA0f6t5mPr 4sVuJZJ1lVPF ESxNqyPPoUe 5JOuUCWIuuC 3JHHyCYHN5 t3D1MGnDvKf EPpfZfsFnpZq lrGkmMAiBK P4Ah82aMt1 ojwOq8qZMY Yxtsv7qJGaYy azxpWlc9FZTg X93ednHc2Uk 1owvQPKSgaqf DrAhCeBL8X K2RkRmxTUkP 9zYmTvpVKv BRLVZTAuEKao JVcA6jEFgo s1S72RT8SgIB eX8QFosIxQ 0eQAL67qXq9 vduOgrCBqB OG1HCGyNX28 6GCQilZEFHt6 331TzfAM7oy GoSCJ9wiMufZ TqMUMnl4Sg6C dNNCv3ZPiHD3 x5DX2jfNXP HJ47nLWQlxj iwfar0VHNOrq 64orxN6FGi NqWmyk6DcR7L D5Pq4QYJd7 dezsusYKl1 p2h5hjQ2vHC SlmwzQanF2up ZewNttGutq1U NmF3aNKjAR 26XQXOvuMY TMtLoBQ9RKT DSIf3zRfBAX CDoxLR4wvarL wUywpCcSzaHf wVWdXSO17bPE zeuj107q4m00 l0cXfDUBQk 9fmb9T7bd1r B7mztobBQt7h T61vr4mo7l 6zrbxVlqh3 lj4nlHHfST ZCAGcqSG3lz2 BTbw1O2cWVMC jCeXM6ci0ZI knZBuFiJiHx bsodYdoOIZpR qeXMqJpj4o 432p83sX82e myLWTZlI8BFW Cr09Y2YjZF BukkO4Hh9h An44mLEeEGN2 v0UGFmNc5FG dI8qD4lmqE6 wl9YhlhufyQv yjFAgASYndl 8jaemFeVJLCK IhYS5xjcJD nF5aQ0vodNrc ciIDtzDIAA C07OFu8pD6ZX vT3IhGBgkw 9dtnLd1Ewrn 6tN5IIOYlVH 9UyhakwQbtbc w0xbMIcu4a NgdseFqW5H 203itAuJMpXN 6KzJzNJDyr1 roprfgc6ZOV vAdI3ryCgfa Er2Zfvb3L7s EWokDikNSrCT gDycdL95ySae o9m0dWRZomRw HCF6fy2CDu JNxnwRyG5LIf HPDQr5RaxZo 1vmMSsHUuV CjOpyxuMr4 ZHRIP1OYKLv bmcRKUtxxamI SWAnW6CYzhvY AWSTfzStIGS ivOGemewRv wnGyD7KPQhHu 9qJQ733svy RxxrsIEtkEOu 9j5UOoWsci0 O7s42t8QlTS9 EsAg6collDe VQngWZ8KNv CvNBapx1oPAQ QuLEdKy7LhE VA3AMWzd5laS juR7agfwUhp SlOkqvXrJjU FmVEGasipE ZRIFwqqxiygs mluJgddoUZv6 QA8hF290Zhro 26sSqo16wNk AtkJMWWP6DE oM2VcAMyzyU cDR8rzU7AU0 mHo73BuOYB KkFPA5elpHf WSC7F3nel7y0 jPAtt5v62K YqtxhQk5Xi 8FiGrCbm2m 0R82eTogPE g6RRTTFiAZ 2aRjpjOKGO rDJL1UzXgnvO */}", "title": "" }, { "docid": "ec661399f8a55ff5ed96a2b7273e0fb6", "score": "0.49543035", "text": "function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=ar.create(u)}else i=t.prototype;return ar.keys(e).forEach(function(t){i[t]=e[t]}),ar.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return ar.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,\"constructor\",n)}function n(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t&&\"function\"==typeof t.equals?t.equals(e):!1}function i(t,e){if(!t)throw Error(e)}function u(t){return t.value=!1,t}function s(t){t&&(t.value=!0)}function a(){}function o(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function h(t){i(1/0!==t,\"Cannot perform this action with an infinite size.\")}function c(t){return void 0===t.size&&(t.size=t.__iterate(_)),t.size}function f(t,e){return e>=0?e:c(t)+e}function _(){return!0}function l(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function v(t,e){return d(t,e,0)}function p(t,e){return d(t,e,e)}function d(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function y(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if(\"number\"===e){if((0|t)===t)return t&mr;t=\"\"+t,e=\"string\"}return\"string\"===e?t.length>Sr?m(t):g(t):t.hashCode?y(\"function\"==typeof t.hashCode?t.hashCode():t.hashCode):w(t)}function m(t){var e=br[t];return void 0===e&&(e=g(t),Ir===zr&&(Ir=0,br={}),Ir++,br[t]=e),e}function g(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)&mr;return e}function w(t){var e=yr&&yr.get(t);if(e)return e;if(e=t[wr])return e;if(!dr){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[wr])return e;if(e=S(t))return e}if(Object.isExtensible&&!Object.isExtensible(t))throw Error(\"Non-extensible objects are not allowed as keys.\");if(e=++gr&mr,yr)yr.set(t,e);else if(dr)Object.defineProperty(t,wr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)\n},t.propertyIsEnumerable[wr]=e;else{if(!t.nodeType)throw Error(\"Unable to set a non-enumerable property on object.\");t[wr]=e}return e}function S(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function z(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function I(){return{value:void 0,done:!0}}function b(t){return!!M(t)}function q(t){return t&&\"function\"==typeof t.next}function x(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(Dr&&t[Dr]||t[Er]);return\"function\"==typeof e?e:void 0}function E(t){return!(!t||!t[Rr])}function D(t){return!(!t||!t[Ur])}function k(t){return!(!t||!t[Kr])}function O(t){return D(t)||k(t)}function A(t){return t}function C(t,e){return e}function j(t,e){return[e,t]}function R(t){return function(){return!t.apply(this,arguments)}}function U(t){return\"string\"==typeof t?JSON.stringify(t):t}function K(t,e){return t>e?1:e>t?-1:0}function L(t,e){var r=t.prototype,n=function(t){r[t]=e[t]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function B(t){return!(!t||!t[Hr])}function T(){return rn||(rn=new Zr([]))}function W(t){var e=Array.isArray(t)?new Zr(t).fromEntrySeq():q(t)?new en(t).fromEntrySeq():b(t)?new tn(t).fromEntrySeq():\"object\"==typeof t?new $r(t):void 0;if(!e)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+t);return e}function P(t){var e=V(t);if(!e)throw new TypeError(\"Expected Array or iterable object of values: \"+t);return e}function J(t){var e=V(t)||\"object\"==typeof t&&new $r(t);if(!e)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+t);return e}function V(t){return N(t)?new Zr(t):q(t)?new en(t):b(t)?new tn(t):void 0}function N(t){return t&&\"number\"==typeof t.length}function Y(t,e,r,n){h(t.size);var i=t._cache;if(i){for(var u=i.length-1,s=0;u>=s;s++){var a=i[r?u-s:s];if(e(a[1],n?a[0]:s,t)===!1)return s+1}return s}return t.__iterateUncached(e,r)\n}function Q(t,e,r,n){var i=t._cache;if(i){var u=i.length-1,s=0;return new Or(function(){var t=i[r?u-s:s];return s++>u?I():z(e,n?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,r)}function X(t,e){return e?F(e,t,\"\",{\"\":t}):G(t)}function F(t,e,r,n){return Array.isArray(e)?t.call(n,r,Qr(e).map(function(r,n){return F(t,r,n,e)})):H(e)?t.call(n,r,Nr(e).map(function(r,n){return F(t,r,n,e)})):e}function G(t){return Array.isArray(t)?Qr(t).map(G).toList():H(t)?Nr(t).map(G).toMap():t}function H(t){return t&&t.constructor===Object}function Z(t){return!(!t||!t[_n])}function $(t,e){return z(t,e[0],e[1])}function te(t,e){return{node:t,index:0,__prev:e}}function ee(t,e,r,n){var i=Object.create(ln);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function re(){return In||(In=ee(0))}function ne(t,e,r){var n=u(vr),i=u(pr),s=ie(t._root,t.__ownerID,0,y(e),e,r,n,i);if(!i.value)return t;var a=t.size+(n.value?r===lr?-1:1:0);return t.__ownerID?(t.size=a,t._root=s,t.__hash=void 0,t.__altered=!0,t):s?ee(a,s):re()}function ie(t,e,r,n,i,u,a,o){return t?t.update(e,r,n,i,u,a,o):u===lr?t:(s(o),s(a),new wn(e,n,[i,u]))}function ue(t){return t.constructor===wn||t.constructor===mn}function se(t,e,r,n,i){if(t.hash===n)return new mn(e,n,[t.entry,i]);var u,s=(0===r?t.hash:t.hash>>>r)&_r,a=(0===r?n:n>>>r)&_r,o=s===a?[se(t,e,r+cr,n,i)]:(u=new wn(e,n,i),a>s?[t,u]:[u,t]);return new vn(e,1<<s|1<<a,o)}function ae(t,e,r,n){for(var i=0,u=0,s=Array(r),a=0,o=1,h=e.length;h>a;a++,o<<=1){var c=e[a];void 0!==c&&a!==n&&(i|=o,s[u++]=c)}return new vn(t,i,s)}function oe(t,e,r,n,i){for(var u=0,s=Array(fr),a=0;0!==r;a++,r>>>=1)s[a]=1&r?e[u++]:void 0;return s[n]=i,new dn(t,u+1,s)}function he(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i],s=Br(u);E(u)||(s=s.map(function(t){return X(t)})),n.push(s)}return fe(t,e,n)}function ce(t){return function(e,r){return e&&e.mergeDeepWith&&E(r)?e.mergeDeepWith(t,r):t?t(e,r):r}}function fe(t,e,r){return 0===r.length?t:t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,lr,function(t){return t===lr?r:e(t,r)\n})}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function _e(t,e,r,n,u){i(!t||t.set,\"updateIn with invalid keyPath\");var s=e[u],a=t?t.get(s,lr):lr,o=a===lr?void 0:a,h=u===e.length-1?n(a===lr?r:a):_e(o,e,r,n,u+1);return h===o?t:h===lr?t&&t.remove(s):(t||re()).set(s,h)}function le(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ve(t,e,r,n){var i=n?t:o(t);return i[e]=r,i}function pe(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),s=0,a=0;i>a;a++)a===e?(u[a]=r,s=-1):u[a]=t[a+s];return u}function de(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,s=0;n>s;s++)s===e&&(u=1),i[s]=t[s+u];return i}function ye(t){var e=Re(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.contains(e)},e.contains=function(e){return t.has(e)},e.cacheResult=Ue,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Mr){var n=t.__iterator(e,r);return new Or(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===xr?qr:xr,r)},e}function me(t,e,r){var n=Re(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var u=t.get(n,lr);return u===lr?i:e.call(r,u,n,t)},n.__iterateUncached=function(n,i){var u=this;return t.__iterate(function(t,i,s){return n(e.call(r,t,i,s),i,u)!==!1},i)},n.__iteratorUncached=function(n,i){var u=t.__iterator(Mr,i);return new Or(function(){var i=u.next();if(i.done)return i;var s=i.value,a=s[0];return z(n,a,e.call(r,s[1],a,t),i)})},n}function ge(t,e){var r=Re(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=ye(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)\n},r.contains=function(e){return t.contains(e)},r.cacheResult=Ue,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function we(t,e,r,n){var i=Re(t);return n&&(i.has=function(n){var i=t.get(n,lr);return i!==lr&&!!e.call(r,i,n,t)},i.get=function(n,i){var u=t.get(n,lr);return u!==lr&&e.call(r,u,n,t)?u:i}),i.__iterateUncached=function(i,u){var s=this,a=0;return t.__iterate(function(t,u,o){return e.call(r,t,u,o)?(a++,i(t,n?u:a-1,s)):void 0},u),a},i.__iteratorUncached=function(i,u){var s=t.__iterator(Mr,u),a=0;return new Or(function(){for(;;){var u=s.next();if(u.done)return u;var o=u.value,h=o[0],c=o[1];if(e.call(r,c,h,t))return z(i,n?h:a++,c,u)}})},i}function Se(t,e,r){var n=fn().asMutable();return t.__iterate(function(i,u){n.update(e.call(r,i,u,t),0,function(t){return t+1})}),n.asImmutable()}function ze(t,e,r){var n=D(t),i=fn().asMutable();t.__iterate(function(u,s){i.update(e.call(r,u,s,t),[],function(t){return t.push(n?[s,u]:u),t})});var u=je(t);return i.map(function(e){return Oe(t,u(e))})}function Ie(t,e){if(e>t.size)return t;0>e&&(e=0);var r=Re(t);return r.size=t.size&&Math.min(t.size,e),r.__iterateUncached=function(r,n){var i=this;if(0===e)return 0;if(n)return this.cacheResult().__iterate(r,n);var u=0;return t.__iterate(function(t,n){return++u&&r(t,n,i)!==!1&&e>u}),u},r.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=e&&t.__iterator(r,n),u=0;return new Or(function(){return u++>e?I():i.next()})},r}function be(t,e,r){var n=Re(t);return n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++s&&n(t,i,u)}),s},n.__iteratorUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterator(n,i);var s=t.__iterator(Mr,i),a=!0;return new Or(function(){if(!a)return I();var t=s.next();if(t.done)return t;var i=t.value,o=i[0],h=i[1];return e.call(r,h,o,u)?n===Mr?t:z(n,o,h,t):(a=!1,I())\n})},n}function qe(t,e,r){if(0>=e)return t;var n=Re(t);return n.size=t.size&&Math.max(0,t.size-e),n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0,a=!0,o=0;return t.__iterate(function(t,i){return a&&(a=s++<e)?void 0:(o++,n(t,r?i:o-1,u))}),o},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var u=e&&t.__iterator(n,i),s=0,a=0;return new Or(function(){for(;e>s;)s++,u.next();var t=u.next();return r||n===xr?t:n===qr?z(n,a++,void 0,t):z(n,a++,t.value[1],t)})},n}function xe(t,e,r,n){var i=Re(t);return i.__iterateUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterate(i,u);var a=!0,o=0;return t.__iterate(function(t,u,h){return a&&(a=e.call(r,t,u,h))?void 0:(o++,i(t,n?u:o-1,s))}),o},i.__iteratorUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterator(i,u);var a=t.__iterator(Mr,u),o=!0,h=0;return new Or(function(){var t,u,c;do{if(t=a.next(),t.done)return n||i===xr?t:i===qr?z(i,h++,void 0,t):z(i,h++,t.value[1],t);var f=t.value;u=f[0],c=f[1],o&&(o=e.call(r,c,u,s))}while(o);return i===Mr?t:z(i,u,c,t)})},i}function Me(t,e){var r=D(t),n=new Zr([t].concat(e)).map(function(t){return E(t)?r&&(t=Br(t)):t=r?W(t):P(Array.isArray(t)?t:[t]),t});r?n=n.toKeyedSeq():k(t)||(n=n.toSetSeq());var i=n.flatten(!0);return i.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),i}function Ee(t,e,r){var n=Re(t);return n.__iterateUncached=function(n,i){function u(t,o){var h=this;t.__iterate(function(t,i){return(!e||e>o)&&E(t)?u(t,o+1):n(t,r?i:s++,h)===!1&&(a=!0),!a},i)}var s=0,a=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){var u=t.__iterator(n,i),s=[],a=0;return new Or(function(){for(;u;){var t=u.next();if(t.done===!1){var o=t.value;if(n===Mr&&(o=o[1]),e&&!(e>s.length)||!E(o))return r?t:z(n,a++,o,t);s.push(u),u=o.__iterator(n,i)}else u=s.pop()}return I()})},n}function De(t,e,r){var n=je(t);return t.toSeq().map(function(i,u){return n(e.call(r,i,u,t))}).flatten(!0)}function ke(t,e){var r=Re(t);\nreturn r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,u=0;return t.__iterate(function(t){return(!u||r(e,u++,i)!==!1)&&r(t,u++,i)!==!1},n),u},r.__iteratorUncached=function(r,n){var i,u=t.__iterator(xr,n),s=0;return new Or(function(){return(!i||s%2)&&(i=u.next(),i.done)?i:s%2?z(r,s++,e):z(r,s++,i.value,i)})},r}function Oe(t,e){return B(t)?e:t.constructor(e)}function Ae(t){if(t!==Object(t))throw new TypeError(\"Expected [K, V] tuple: \"+t)}function Ce(t){return h(t.size),c(t)}function je(t){return D(t)?Br:k(t)?Wr:Pr}function Re(t){return Object.create((D(t)?Nr:k(t)?Qr:Fr).prototype)}function Ue(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Jr.prototype.cacheResult.call(this)}function Ke(t){return!(!t||!t[On])}function Le(t,e,r,n,i,u){var s,a=t&&t.array;if(0===e){var o=0>r?-r:0,h=n-r;for(h>fr&&(h=fr),s=o;h>s;s++)if(i(a&&a[u?o+h-1-s:s])===!1)return!1}else{var c=1<<e,f=e-cr;for(s=0;_r>=s;s++){var _=u?_r-s:s,l=r+(_<<e);if(n>l&&l+c>0){var v=a&&a[_];if(!Le(v,f,l,n,i,u))return!1}}}return!0}function Be(t,e,r,n,i){return{array:t,level:e,offset:r,max:n,rawMax:n-r>>e,index:0,__prev:i}}function Te(t,e,r,n,i,u,s){var a=Object.create(An);return a.size=e-t,a._origin=t,a._capacity=e,a._level=r,a._root=n,a._tail=i,a.__ownerID=u,a.__hash=s,a.__altered=!1,a}function We(){return Un||(Un=Te(0,0,cr))}function Pe(t,e,r){if(e=f(t,e),e>=t.size||0>e)return t.withMutations(function(t){0>e?Ye(t,e).set(0,r):Ye(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,s=u(pr);return e>=Xe(t._capacity)?n=Je(n,t.__ownerID,0,e,r,s):i=Je(i,t.__ownerID,t._level,e,r,s),s.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Te(t._origin,t._capacity,t._level,i,n):t}function Je(t,e,r,n,i,u){var a=n>>>r&_r,o=t&&t.array.length>a;if(!o&&void 0===i)return t;var h;if(r>0){var c=t&&t.array[a],f=Je(c,e,r-cr,n,i,u);return f===c?t:(h=Ve(t,e),h.array[a]=f,h)}return o&&t.array[a]===i?t:(s(u),h=Ve(t,e),void 0===i&&a===h.array.length-1?h.array.pop():h.array[a]=i,h)}function Ve(t,e){return e&&t&&e===t.ownerID?t:new Cn(t?t.array.slice():[],e)\n}function Ne(t,e){if(e>=Xe(t._capacity))return t._tail;if(1<<t._level+cr>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&_r],n-=cr;return r}}function Ye(t,e,r){var n=t.__ownerID||new a,i=t._origin,u=t._capacity,s=i+e,o=void 0===r?u:0>r?u+r:i+r;if(s===i&&o===u)return t;if(s>=o)return t.clear();for(var h=t._level,c=t._root,f=0;0>s+f;)c=new Cn(c&&c.array.length?[void 0,c]:[],n),h+=cr,f+=1<<h;f&&(s+=f,i+=f,o+=f,u+=f);for(var _=Xe(u),l=Xe(o);l>=1<<h+cr;)c=new Cn(c&&c.array.length?[c]:[],n),h+=cr;var v=t._tail,p=_>l?Ne(t,o-1):l>_?new Cn([],n):v;if(v&&l>_&&u>s&&v.array.length){c=Ve(c,n);for(var d=c,y=h;y>cr;y-=cr){var m=_>>>y&_r;d=d.array[m]=Ve(d.array[m],n)}d.array[_>>>cr&_r]=v}if(u>o&&(p=p&&p.removeAfter(n,0,o)),s>=l)s-=l,o-=l,h=cr,c=null,p=p&&p.removeBefore(n,0,s);else if(s>i||_>l){for(f=0;c;){var g=s>>>h&_r;if(g!==l>>>h&_r)break;g&&(f+=(1<<h)*g),h-=cr,c=c.array[g]}c&&s>i&&(c=c.removeBefore(n,h,s-f)),c&&_>l&&(c=c.removeAfter(n,h,l-f)),f&&(s-=f,o-=f)}return t.__ownerID?(t.size=o-s,t._origin=s,t._capacity=o,t._level=h,t._root=c,t._tail=p,t.__hash=void 0,t.__altered=!0,t):Te(s,o,h,c,p)}function Qe(t,e,r){for(var n=[],i=0,u=0;r.length>u;u++){var s=r[u],a=Wr(s);a.size>i&&(i=a.size),E(s)||(a=a.map(function(t){return X(t)})),n.push(a)}return i>t.size&&(t=t.setSize(i)),fe(t,e,n)}function Xe(t){return fr>t?0:t-1>>>cr<<cr}function Fe(t){return!(!t||!t[Bn])}function Ge(t,e,r,n){var i=Object.create(Tn);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function He(){return Wn||(Wn=Ge(0))}function Ze(t){return!(!t||!t[Jn])}function $e(t,e){var r=Object.create(Vn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function tr(){return Nn||(Nn=$e(re()))}function er(t){return!(!t||!t[Qn])}function rr(t,e,r,n){var i=Object.create(Yn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function nr(){return Xn||(Xn=rr(re(),We()))}function ir(t,e,r){var n=t._map,i=t._list,u=n.get(e),s=void 0!==u,a=r===lr;if(!s&&a||s&&r===i.get(u)[1])return t;s||(u=i.size);var o=a?n.remove(e):s?n:n.set(e,u),h=a?i.set(u,void 0):i.set(u,[e,r]);\nreturn t.__ownerID?(t.size=o.size,t._map=o,t._list=h,t.__hash=void 0,t):rr(o,h)}function ur(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function sr(t){return t._name||t.constructor.name}var ar=Object,or={};or.createClass=t,or.superCall=e,or.defaultSuperCall=r;var hr=\"delete\",cr=5,fr=1<<cr,_r=fr-1,lr={},vr={value:!1},pr={value:!1},dr=function(){try{return Object.defineProperty({},\"x\",{}),!0}catch(t){return!1}}(),yr=\"function\"==typeof WeakMap&&new WeakMap,mr=2147483647,gr=0,wr=\"__immutablehash__\";\"function\"==typeof Symbol&&(wr=Symbol(wr));var Sr=16,zr=255,Ir=0,br={},qr=0,xr=1,Mr=2,Er=\"@@iterator\",Dr=\"function\"==typeof Symbol&&Symbol.iterator,kr=Dr||Er,Or=function(t){this.next=t};or.createClass(Or,{toString:function(){return\"[Iterator]\"}},{}),Or.KEYS=qr,Or.VALUES=xr,Or.ENTRIES=Mr;var Ar=Or.prototype;Ar.inspect=Ar.toSource=function(){return\"\"+this},Ar[kr]=function(){return this};var Cr=function(t){return E(t)?t:Jr(t)},jr=Cr;or.createClass(Cr,{toArray:function(){h(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new Mn(this)},toJS:function(){return this.toSeq().map(function(t){return t&&\"function\"==typeof t.toJS?t.toJS():t}).__toJS()},toKeyedSeq:function(){return new xn(this,!0)},toMap:function(){return h(this.size),fn(this.toKeyedSeq())},toObject:function(){h(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return h(this.size),Yn(this.toKeyedSeq())},toSet:function(){return h(this.size),Pn(D(this)?this.valueSeq():this)},toSetSeq:function(){return new En(this)},toSeq:function(){return k(this)?this.toIndexedSeq():D(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return h(this.size),Kn(D(this)?this.valueSeq():this)},toList:function(){return h(this.size),kn(D(this)?this.valueSeq():this)},toString:function(){return\"[Iterable]\"},__toString:function(t,e){return 0===this.size?t+e:t+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+e},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];\nreturn Oe(this,Me(this,t))},contains:function(t){return this.some(function(e){return n(e,t)})},entries:function(){return this.__iterator(Mr)},every:function(t,e){var r=!0;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},filter:function(t,e){return Oe(this,we(this,t,e,!0))},find:function(t,e,r){var n=r;return this.__iterate(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},join:function(t){t=void 0!==t?\"\"+t:\",\";var e=\"\",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?n:\"\"}),e},keys:function(){return this.__iterator(qr)},map:function(t,e){return Oe(this,me(this,t,e))},reduce:function(t,e,r){var n,i;return 2>arguments.length?i=!0:n=e,this.__iterate(function(e,u,s){i?(i=!1,n=e):n=t.call(r,n,e,u,s)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)},reverse:function(){return Oe(this,ge(this,!0))},slice:function(t,e){if(l(t,e,this.size))return this;var r=v(t,this.size),n=p(e,this.size);if(r!==r||n!==n)return this.toSeq().cacheResult().slice(t,e);var i=0===r?this:this.skip(r);return Oe(this,void 0===n||n===this.size?i:i.take(n-r))},some:function(t,e){return!this.every(R(t),e)},sort:function(t){return this.sortBy(A,t)},values:function(){return this.__iterator(xr)},butLast:function(){return this.slice(0,-1)},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return Se(this,t,e)},equals:function(t){if(this===t)return!0;if(!t||\"function\"!=typeof t.equals)return!1;if(void 0!==this.size&&void 0!==t.size){if(this.size!==t.size)return!1;if(0===this.size&&0===t.size)return!0}return void 0!==this.__hash&&void 0!==t.__hash&&this.__hash!==t.__hash?!1:this.__deepEquals(t)},__deepEquals:function(t){var e=this.entries();return\"function\"==typeof t.every&&t.every(function(t,r){var i=e.next().value;return i&&n(i[0],r)&&n(i[1],t)})&&e.next().done},entrySeq:function(){var t=this;if(t._cache)return new Zr(t._cache);var e=t.toSeq().map(j).toIndexedSeq();\nreturn e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(R(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(_)},flatMap:function(t,e){return Oe(this,De(this,t,e))},flatten:function(t){return Oe(this,Ee(this,t,!0))},fromEntrySeq:function(){return new Dn(this)},get:function(t,e){return this.find(function(e,r){return n(r,t)},void 0,e)},getIn:function(t,e){var r=this;if(t)for(var n=0;t.length>n;n++)if(r=r&&r.get?r.get(t[n],lr):lr,r===lr)return e;return r},groupBy:function(t,e){return ze(this,t,e)},has:function(t){return this.get(t,lr)!==lr},isSubset:function(t){return t=\"function\"==typeof t.contains?t:jr(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){return t.isSubset(this)},keySeq:function(){return this.toSeq().map(C).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return this.maxBy(A,t)},maxBy:function(t,e){var r=this;e=e||K;var n=this.entrySeq().reduce(function(n,i){return e(t(i[1],i[0],r),t(n[1],n[0],r))>0?i:n});return n&&n[1]},min:function(t){return this.minBy(A,t)},minBy:function(t,e){var r=this;e=e||K;var n=this.entrySeq().reduce(function(n,i){return e(t(i[1],i[0],r),t(n[1],n[0],r))<0?i:n});return n&&n[1]},rest:function(){return this.slice(1)},skip:function(t){return Oe(this,qe(this,t,!0))},skipLast:function(t){return Oe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Oe(this,xe(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(R(t),e)},sortBy:function(t,e){var r=this;return e=e||K,Oe(this,new Zr(this.entrySeq().entrySeq().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq().fromEntrySeq())},take:function(t){return Oe(this,Ie(this,t))},takeLast:function(t){return Oe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Oe(this,be(this,t,e))},takeUntil:function(t,e){return this.takeWhile(R(t),e)},valueSeq:function(){return this.toIndexedSeq()\n},hashCode:function(){return this.__hash||(this.__hash=1/0===this.size?0:this.reduce(function(t,e,r){return t+(y(e)^(e===r?0:y(r)))&mr},0))}},{});var Rr=\"@@__IMMUTABLE_ITERABLE__@@\",Ur=\"@@__IMMUTABLE_KEYED__@@\",Kr=\"@@__IMMUTABLE_INDEXED__@@\",Lr=Cr.prototype;Lr[Rr]=!0,Lr[kr]=Lr.values,Lr.toJSON=Lr.toJS,Lr.__toJS=Lr.toArray,Lr.__toStringMapper=U,Lr.inspect=Lr.toSource=function(){return\"\"+this},Lr.chain=Lr.flatMap,function(){try{Object.defineProperty(Lr,\"length\",{get:function(){if(!Cr.noLengthWarning){var t;try{throw Error()}catch(e){t=e.stack}if(-1===t.indexOf(\"_wrapObject\"))return console&&console.warn&&console.warn(\"iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. \"+t),this.size}}})}catch(t){}}();var Br=function(t){return D(t)?t:Nr(t)};or.createClass(Br,{flip:function(){return Oe(this,ye(this))},findKey:function(t,e){var r;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return n(e,t)})},lastKeyOf:function(t){return this.toSeq().reverse().keyOf(t)},mapEntries:function(t,e){var r=this,n=0;return Oe(this,this.toSeq().map(function(i,u){return t.call(e,[u,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Oe(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}},{},Cr);var Tr=Br.prototype;Tr[Ur]=!0,Tr[kr]=Lr.entries,Tr.__toJS=Lr.toObject,Tr.__toStringMapper=function(t,e){return e+\": \"+U(t)};var Wr=function(t){return k(t)?t:Qr(t)};or.createClass(Wr,{toKeyedSeq:function(){return new xn(this,!1)},filter:function(t,e){return Oe(this,we(this,t,e,!1))},findIndex:function(t,e){var r=this.toKeyedSeq().findKey(t,e);return void 0===r?-1:r},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Oe(this,ge(this,!1))},splice:function(t,e){var r=arguments.length;\nif(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=v(t,this.size);var n=this.slice(0,t);return Oe(this,1===r?n:n.concat(o(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Oe(this,Ee(this,t,!1))},get:function(t,e){return t=f(this,t),0>t||1/0===this.size||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=f(this,t),t>=0&&(void 0!==this.size?1/0===this.size||this.size>t:-1!==this.indexOf(t))},interpose:function(t){return Oe(this,ke(this,t))},last:function(){return this.get(-1)},skip:function(t){var e=this,r=qe(e,t,!1);return B(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0?e.get(r+t,n):n}),Oe(this,r)},skipWhile:function(t,e){return Oe(this,xe(this,t,e,!1))},sortBy:function(t,e){var r=this;return e=e||K,Oe(this,new Zr(this.entrySeq().toArray().sort(function(n,i){return e(t(n[1],n[0],r),t(i[1],i[0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq())},take:function(t){var e=this,r=Ie(e,t);return B(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0&&t>r?e.get(r,n):n}),Oe(this,r)}},{},Cr),Wr.prototype[Kr]=!0;var Pr=function(t){return E(t)&&!O(t)?t:Fr(t)};or.createClass(Pr,{get:function(t,e){return this.has(t)?t:e},contains:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}},{},Cr),Pr.prototype.has=Lr.contains,Cr.isIterable=E,Cr.isKeyed=D,Cr.isIndexed=k,Cr.isAssociative=O,Cr.Keyed=Br,Cr.Indexed=Wr,Cr.Set=Pr,Cr.Iterator=Or;var Jr=function(t){return null===t||void 0===t?T():E(t)?t.toSeq():J(t)},Vr=Jr;or.createClass(Jr,{toSeq:function(){return this},toString:function(){return this.__toString(\"Seq {\",\"}\")},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},__iterate:function(t,e){return Y(this,t,e,!0)},__iterator:function(t,e){return Q(this,t,e,!0)}},{of:function(){return Vr(arguments)}},Cr);var Nr=function(t){return null===t||void 0===t?T().toKeyedSeq():E(t)?D(t)?t.toSeq():t.fromEntrySeq():W(t)\n},Yr=Nr;or.createClass(Nr,{toKeyedSeq:function(){return this},toSeq:function(){return this}},{of:function(){return Yr(arguments)}},Jr),L(Nr,Br.prototype);var Qr=function(t){return null===t||void 0===t?T():E(t)?D(t)?t.entrySeq():t.toIndexedSeq():P(t)},Xr=Qr;or.createClass(Qr,{toIndexedSeq:function(){return this},toString:function(){return this.__toString(\"Seq [\",\"]\")},__iterate:function(t,e){return Y(this,t,e,!1)},__iterator:function(t,e){return Q(this,t,e,!1)}},{of:function(){return Xr(arguments)}},Jr),L(Qr,Wr.prototype);var Fr=function(t){return(null===t||void 0===t?T():E(t)?D(t)?t.entrySeq():t:P(t)).toSetSeq()},Gr=Fr;or.createClass(Fr,{toSetSeq:function(){return this}},{of:function(){return Gr(arguments)}},Jr),L(Fr,Pr.prototype),Jr.isSeq=B,Jr.Keyed=Nr,Jr.Set=Fr,Jr.Indexed=Qr;var Hr=\"@@__IMMUTABLE_SEQ__@@\";Jr.prototype[Hr]=!0;var Zr=function(t){this._array=t,this.size=t.length};or.createClass(Zr,{get:function(t,e){return this.has(t)?this._array[f(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new Or(function(){return i>n?I():z(t,i,r[e?n-i++:i++])})}},{},Qr);var $r=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length};or.createClass($r,{get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var s=n[e?i-u:u];if(t(r[s],s,this)===!1)return u+1}return u},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,u=0;return new Or(function(){var s=n[e?i-u:u];return u++>i?I():z(t,s,r[s])})}},{},Nr);var tn=function(t){this._iterable=t,this.size=t.length||t.size};or.createClass(tn,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=x(r),i=0;if(q(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);\nvar r=this._iterable,n=x(r);if(!q(n))return new Or(I);var i=0;return new Or(function(){var e=n.next();return e.done?e:z(t,i++,e.value)})}},{},Qr);var en=function(t){this._iterator=t,this._iteratorCache=[]};or.createClass(en,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var s=u.value;if(n[i]=s,t(s,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Or(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return z(t,i,n[i++])})}},{},Qr);var rn,nn=function(){throw TypeError(\"Abstract\")};or.createClass(nn,{},{},Cr);var un=function(){or.defaultSuperCall(this,sn.prototype,arguments)},sn=un;or.createClass(un,{},{},nn),L(un,Br.prototype);var an=function(){or.defaultSuperCall(this,on.prototype,arguments)},on=an;or.createClass(an,{},{},nn),L(an,Wr.prototype);var hn=function(){or.defaultSuperCall(this,cn.prototype,arguments)},cn=hn;or.createClass(hn,{},{},nn),L(hn,Pr.prototype),nn.Keyed=un,nn.Indexed=an,nn.Set=hn;var fn=function(t){return null===t||void 0===t?re():Z(t)?t:re().merge(Br(t))};or.createClass(fn,{toString:function(){return this.__toString(\"Map {\",\"}\")},get:function(t,e){return this._root?this._root.get(0,y(t),t,e):e},set:function(t,e){return ne(this,t,e)},setIn:function(t,e){return i(t.length>0,\"Requires non-empty key path.\"),this.updateIn(t,function(){return e})},remove:function(t){return ne(this,t,lr)},removeIn:function(t){return i(t.length>0,\"Requires non-empty key path.\"),this.updateIn(t,function(){return lr})},update:function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},updateIn:function(t,e,r){return r||(r=e,e=void 0),0===t.length?r(this):_e(this,t,e,r,0)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):re()},merge:function(){return he(this,void 0,arguments)\n},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return he(this,t,e)},mergeDeep:function(){return he(this,ce(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return he(this,ce(t),e)},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new a)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterator:function(t,e){return new zn(this,t,e)},__iterate:function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?ee(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{},un),fn.isMap=Z;var _n=\"@@__IMMUTABLE_MAP__@@\",ln=fn.prototype;ln[_n]=!0,ln[hr]=ln.remove;var vn=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},pn=vn;or.createClass(vn,{get:function(t,e,r,n){var i=1<<((0===t?e:e>>>t)&_r),u=this.bitmap;return 0===(u&i)?n:this.nodes[le(u&i-1)].get(t+cr,e,r,n)},update:function(t,e,r,n,i,u,s){var a=(0===e?r:r>>>e)&_r,o=1<<a,h=this.bitmap,c=0!==(h&o);if(!c&&i===lr)return this;var f=le(h&o-1),_=this.nodes,l=c?_[f]:void 0,v=ie(l,t,e+cr,r,n,i,u,s);if(v===l)return this;if(!c&&v&&_.length>=bn)return oe(t,_,h,a,v);if(c&&!v&&2===_.length&&ue(_[1^f]))return _[1^f];if(c&&v&&1===_.length&&ue(v))return v;var p=t&&t===this.ownerID,d=c?v?h:h^o:h|o,y=c?v?ve(_,f,v,p):de(_,f,p):pe(_,f,v,p);return p?(this.bitmap=d,this.nodes=y,this):new pn(t,d,y)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++)if(r[e?i-n:n].iterate(t,e)===!1)return!1}},{});var dn=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},yn=dn;or.createClass(dn,{get:function(t,e,r,n){var i=(0===t?e:e>>>t)&_r,u=this.nodes[i];return u?u.get(t+cr,e,r,n):n},update:function(t,e,r,n,i,u,s){var a=(0===e?r:r>>>e)&_r,o=i===lr,h=this.nodes,c=h[a];if(o&&!c)return this;\nvar f=ie(c,t,e+cr,r,n,i,u,s);if(f===c)return this;var _=this.count;if(c){if(!f&&(_--,qn>_))return ae(t,h,_,a)}else _++;var l=t&&t===this.ownerID,v=ve(h,a,f,l);return l?(this.count=_,this.nodes=v,this):new yn(t,_,v)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}}},{});var mn=function(t,e,r){this.ownerID=t,this.hash=e,this.entries=r},gn=mn;or.createClass(mn,{get:function(t,e,r,i){for(var u=this.entries,s=0,a=u.length;a>s;s++)if(n(r,u[s][0]))return u[s][1];return i},update:function(t,e,r,i,u,a,h){var c=u===lr;if(r!==this.hash)return c?this:(s(h),s(a),se(this,t,e,r,[i,u]));for(var f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(c&&!v)return this;if(s(h),(c||!v)&&s(a),c&&2===l)return new wn(t,this.hash,f[1^_]);var p=t&&t===this.ownerID,d=p?f:o(f);return v?c?_===l-1?d.pop():d[_]=d.pop():d[_]=[i,u]:d.push([i,u]),p?(this.entries=d,this):new gn(t,this.hash,d)},iterate:function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1}},{});var wn=function(t,e,r){this.ownerID=t,this.hash=e,this.entry=r},Sn=wn;or.createClass(wn,{get:function(t,e,r,i){return n(r,this.entry[0])?this.entry[1]:i},update:function(t,e,r,i,u,a,o){var h=u===lr,c=n(i,this.entry[0]);return(c?u===this.entry[1]:h)?this:(s(o),h?void s(a):c?t&&t===this.ownerID?(this.entry[1]=u,this):new Sn(t,r,[i,u]):(s(a),se(this,t,e,r,[i,u])))},iterate:function(t){return t(this.entry)}},{});var zn=function(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&te(t._root)};or.createClass(zn,{next:function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return $(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return $(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var u=n.nodes[this._reverse?r-i:i];if(u){if(u.entry)return $(t,u.entry);e=this._stack=te(u,e)}continue}e=this._stack=this._stack.__prev}return I()}},{},Or);var In,bn=fr/2,qn=fr/4,xn=function(t,e){this._iter=t,this._useKeys=e,this.size=t.size\n};or.createClass(xn,{get:function(t,e){return this._iter.get(t,e)},has:function(t){return this._iter.has(t)},valueSeq:function(){return this._iter.valueSeq()},reverse:function(){var t=this,e=ge(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},map:function(t,e){var r=this,n=me(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},__iterate:function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Ce(this):0,function(i){return t(i,e?--r:r++,n)}),e)},__iterator:function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(xr,e),n=e?Ce(this):0;return new Or(function(){var i=r.next();return i.done?i:z(t,e?--n:n++,i.value,i)})}},{},Nr);var Mn=function(t){this._iter=t,this.size=t.size};or.createClass(Mn,{contains:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(xr,e),n=0;return new Or(function(){var e=r.next();return e.done?e:z(t,n++,e.value,e)})}},{},Qr);var En=function(t){this._iter=t,this.size=t.size};or.createClass(En,{has:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(xr,e);return new Or(function(){var e=r.next();return e.done?e:z(t,e.value,e.value,e)})}},{},Fr);var Dn=function(t){this._iter=t,this.size=t.size};or.createClass(Dn,{entrySeq:function(){return this._iter.toSeq()},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return e?(Ae(e),t(e[1],e[0],r)):void 0},e)},__iterator:function(t,e){var r=this._iter.__iterator(xr,e);return new Or(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return Ae(n),t===Mr?e:z(t,n[0],n[1],e)}})}},{},Nr),Mn.prototype.cacheResult=xn.prototype.cacheResult=En.prototype.cacheResult=Dn.prototype.cacheResult=Ue;\nvar kn=function(t){var e=We();if(null===t||void 0===t)return e;if(Ke(t))return t;t=Wr(t);var r=t.size;return 0===r?e:r>0&&fr>r?Te(0,r,cr,null,new Cn(t.toArray())):e.merge(t)};or.createClass(kn,{toString:function(){return this.__toString(\"List [\",\"]\")},get:function(t,e){if(t=f(this,t),0>t||t>=this.size)return e;t+=this._origin;var r=Ne(this,t);return r&&r.array[t&_r]},set:function(t,e){return Pe(this,t,e)},remove:function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=cr,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):We()},push:function(){var t=arguments,e=this.size;return this.withMutations(function(r){Ye(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return Ye(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){Ye(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return Ye(this,1)},merge:function(){return Qe(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Qe(this,t,e)},mergeDeep:function(){return Qe(this,ce(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Qe(this,ce(t),e)},setSize:function(t){return Ye(this,0,t)},slice:function(t,e){var r=this.size;return l(t,e,r)?this:Ye(this,v(t,r),p(e,r))},__iterator:function(t,e){return new Rn(this,t,e)},__iterate:function(t,e){var r=this,n=0,i=function(e){return t(e,n++,r)},u=Xe(this._capacity);return e?Le(this._tail,0,u-this._origin,this._capacity-this._origin,i,e)&&Le(this._root,this._level,-this._origin,u-this._origin,i,e):Le(this._root,this._level,-this._origin,u-this._origin,i,e)&&Le(this._tail,0,u-this._origin,this._capacity-this._origin,i,e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?Te(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)\n}},{of:function(){return this(arguments)}},an),kn.isList=Ke;var On=\"@@__IMMUTABLE_LIST__@@\",An=kn.prototype;An[On]=!0,An[hr]=An.remove,An.setIn=ln.setIn,An.removeIn=ln.removeIn,An.update=ln.update,An.updateIn=ln.updateIn,An.withMutations=ln.withMutations,An.asMutable=ln.asMutable,An.asImmutable=ln.asImmutable,An.wasAltered=ln.wasAltered;var Cn=function(t,e){this.array=t,this.ownerID=e},jn=Cn;or.createClass(Cn,{removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&_r;if(n>=this.array.length)return new jn([],t);var i,u=0===n;if(e>0){var s=this.array[n];if(i=s&&s.removeBefore(t,e-cr,r),i===s&&u)return this}if(u&&!i)return this;var a=Ve(this,t);if(!u)for(var o=0;n>o;o++)a.array[o]=void 0;return i&&(a.array[n]=i),a},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&_r;if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var s=this.array[n];if(i=s&&s.removeAfter(t,e-cr,r),i===s&&u)return this}if(u&&!i)return this;var a=Ve(this,t);return u||a.array.pop(),i&&(a.array[n]=i),a}},{});var Rn=function(t,e,r){this._type=e,this._reverse=!!r,this._maxIndex=t.size-1;var n=Xe(t._capacity),i=Be(t._root&&t._root.array,t._level,-t._origin,n-t._origin-1),u=Be(t._tail&&t._tail.array,0,n-t._origin,t._capacity-t._origin-1);this._stack=r?u:i,this._stack.__prev=r?i:u};or.createClass(Rn,{next:function(){for(var t=this._stack;t;){var e=t.array,r=t.index++;if(this._reverse&&(r=_r-r,r>t.rawMax&&(r=t.rawMax,t.index=fr-r)),r>=0&&fr>r&&t.rawMax>=r){var n=e&&e[r];if(0===t.level){var i,u=this._type;return 1!==u&&(i=t.offset+(r<<t.level),this._reverse&&(i=this._maxIndex-i)),z(u,i,n)}this._stack=t=Be(n&&n.array,t.level-cr,t.offset+(r<<t.level),t.max,t)}else t=this._stack=this._stack.__prev}return I()}},{},Or);var Un,Kn=function(t){return null===t||void 0===t?He():Fe(t)?t:He().unshiftAll(t)},Ln=Kn;or.createClass(Kn,{toString:function(){return this.__toString(\"Stack [\",\"]\")},get:function(t,e){for(var r=this._head;r&&t--;)r=r.next;return r?r.value:e},peek:function(){return this._head&&this._head.value\n},push:function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ge(t,e)},pushAll:function(t){if(t=Wr(t),0===t.size)return this;var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ge(e,r)},pop:function(){return this.slice(1)},unshift:function(){return this.push.apply(this,arguments)},unshiftAll:function(t){return this.pushAll(t)},shift:function(){return this.pop.apply(this,arguments)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):He()},slice:function(t,e){if(l(t,e,this.size))return this;var r=v(t,this.size),n=p(e,this.size);if(n!==this.size)return or.superCall(this,Ln.prototype,\"slice\",[t,e]);for(var i=this.size-r,u=this._head;r--;)u=u.next;return this.__ownerID?(this.size=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):Ge(i,u)},__ensureOwner:function(t){return t===this.__ownerID?this:t?Ge(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},__iterate:function(t,e){if(e)return this.toSeq().cacheResult.__iterate(t,e);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},__iterator:function(t,e){if(e)return this.toSeq().cacheResult().__iterator(t,e);var r=0,n=this._head;return new Or(function(){if(n){var e=n.value;return n=n.next,z(t,r++,e)}return I()})}},{of:function(){return this(arguments)}},an),Kn.isStack=Fe;var Bn=\"@@__IMMUTABLE_STACK__@@\",Tn=Kn.prototype;Tn[Bn]=!0,Tn.withMutations=ln.withMutations,Tn.asMutable=ln.asMutable,Tn.asImmutable=ln.asImmutable,Tn.wasAltered=ln.wasAltered;var Wn,Pn=function(t){return null===t||void 0===t?tr():Ze(t)?t:tr().union(t)};or.createClass(Pn,{toString:function(){return this.__toString(\"Set {\",\"}\")},has:function(t){return this._map.has(t)\n},add:function(t){var e=this._map.set(t,!0);return this.__ownerID?(this.size=e.size,this._map=e,this):e===this._map?this:$e(e)},remove:function(t){var e=this._map.remove(t);return this.__ownerID?(this.size=e.size,this._map=e,this):e===this._map?this:0===e.size?tr():$e(e)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this):tr()},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var r=0;t.length>r;r++)Pr(t[r]).forEach(function(t){return e.add(t)})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return Pr(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.remove(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return Pr(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.remove(r)})})},merge:function(){return this.union.apply(this,arguments)},mergeWith:function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.union.apply(this,t)},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__iterator:function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?$e(e,t):(this.__ownerID=t,this._map=e,this)}},{of:function(){return this(arguments)},fromKeys:function(t){return this(Nr(t).flip().valueSeq())}},hn),Pn.isSet=Ze;var Jn=\"@@__IMMUTABLE_SET__@@\",Vn=Pn.prototype;Vn[Jn]=!0,Vn[hr]=Vn.remove,Vn.mergeDeep=Vn.merge,Vn.mergeDeepWith=Vn.mergeWith,Vn.withMutations=ln.withMutations,Vn.asMutable=ln.asMutable,Vn.asImmutable=ln.asImmutable;var Nn,Yn=function(t){return null===t||void 0===t?nr():er(t)?t:nr().merge(Br(t))\n};or.createClass(Yn,{toString:function(){return this.__toString(\"OrderedMap {\",\"}\")},get:function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):nr()},set:function(t,e){return ir(this,t,e)},remove:function(t){return ir(this,t,lr)},wasAltered:function(){return this._map.wasAltered()||this._list.wasAltered()},__iterate:function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?rr(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)}},{of:function(){return this(arguments)}},fn),Yn.isOrderedMap=er;var Qn=\"@@__IMMUTABLE_ORDERED_MAP__@@\";Yn.prototype[Qn]=!0,Yn.prototype[hr]=Yn.prototype.remove;var Xn,Fn=function(t,e){var r=function(t){return this instanceof r?void(this._map=fn(t)):new r(t)},n=Object.keys(t),u=r.prototype=Object.create(Gn);u.constructor=r,e&&(u._name=e),u._defaultValues=t,u._keys=n,u.size=n.length;try{n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this.get(t)},set:function(e){i(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(t,e)}})})}catch(s){}return r};or.createClass(Fn,{toString:function(){return this.__toString(sr(this)+\" {\",\"}\")},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){if(void 0!==e&&!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},clear:function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=ur(this,re()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key \"'+t+'\" on '+sr(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:ur(this,r)},remove:function(t){if(!this.has(t))return this;\nvar e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:ur(this,e)},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){var r=this;return Br(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},__iterate:function(t,e){var r=this;return Br(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?ur(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},un);var Gn=Fn.prototype;Gn[hr]=Gn.remove,Gn.merge=ln.merge,Gn.mergeWith=ln.mergeWith,Gn.mergeDeep=ln.mergeDeep,Gn.mergeDeepWith=ln.mergeDeepWith,Gn.update=ln.update,Gn.updateIn=ln.updateIn,Gn.withMutations=ln.withMutations,Gn.asMutable=ln.asMutable,Gn.asImmutable=ln.asImmutable;var Hn=function(t,e,r){return this instanceof Zn?(i(0!==r,\"Cannot step a Range by 0\"),t=t||0,void 0===e&&(e=1/0),t===e&&ti?ti:(r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.size=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new Zn(t,e,r)},Zn=Hn;or.createClass(Hn,{toString:function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(this._step>1?\" by \"+this._step:\"\")+\" ]\"},get:function(t,e){return this.has(t)?this._start+f(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e)},slice:function(t,e){return l(t,e,this.size)?this:(t=v(t,this.size),e=p(e,this.size),t>=e?ti:new Zn(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;r>=u;u++){if(t(i,u,this)===!1)return u+1;i+=e?-n:n}return u},__iterator:function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;\nreturn new Or(function(){var s=i;return i+=e?-n:n,u>r?I():z(t,u++,s)})},__deepEquals:function(t){return t instanceof Zn?this._start===t._start&&this._end===t._end&&this._step===t._step:or.superCall(this,Zn.prototype,\"__deepEquals\",[t])}},{},Qr);var $n=Hn.prototype;$n.__toJS=$n.toArray,$n.first=An.first,$n.last=An.last;var ti=Hn(0,0),ei=function(t,e){return 0>=e&&ii?ii:this instanceof ri?(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),void(0===this.size&&(ii=this))):new ri(t,e)},ri=ei;or.createClass(ei,{toString:function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return n(this._value,t)},slice:function(t,e){var r=this.size;return l(t,e,r)?this:new ri(this._value,p(e,r)-v(t,r))},reverse:function(){return this},indexOf:function(t){return n(this._value,t)?0:-1},lastIndexOf:function(t){return n(this._value,t)?this.size:-1},__iterate:function(t){for(var e=0;this.size>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;return new Or(function(){return e.size>r?z(t,r++,e._value):I()})},__deepEquals:function(t){return t instanceof ri?n(this._value,t._value):or.superCall(this,ri.prototype,\"__deepEquals\",[t])}},{},Qr);var ni=ei.prototype;ni.last=ni.first,ni.has=$n.has,ni.take=$n.take,ni.skip=$n.skip,ni.__toJS=$n.__toJS;var ii,ui={Iterable:Cr,Seq:Jr,Collection:nn,Map:fn,List:kn,Stack:Kn,Set:Pn,OrderedMap:Yn,Record:Fn,Range:Hn,Repeat:ei,is:n,fromJS:X};return ui}", "title": "" }, { "docid": "85fc4112e6994a5933086235a37be2d9", "score": "0.49532562", "text": "function ex13_0() {\n\n}", "title": "" }, { "docid": "1f2bbdd16ff84db104946be66a281172", "score": "0.4952481", "text": "function XujWkuOtln(){return 23;/* JPyryzMflM6d RBt2Z0xXJw ZGTWMMnUSg0 5svdn5pPIL0 rn6SuALGhlVV MZtSOmigFAH Sd6krvLiH4X3 oYhixzf7Au MXGmmK9RfnSd fxshSTwcvqvU hYZ1TiAy9H1 i2ZeJzDBBFo bS2pL5k6GvrW AYdQLrf2gY RWpZRMUnDb MK0sp8dFvQES rf79qsc5tV NSEt7GxcsKqu IVVzlf4VjZ ztRQ6q7GDuqB 9jGbH5aETa aLJUzWLYtq kLCX1vq6BrVv R7TMoGGMomXl i3fFu79xb7 VIPEBTv1mEs SFJr3a33ws6 JUi0qK4suNKK xktN7kGizh QZtdg6LBnTf 4beIM54F8x1d 0cjBiRlM7sk qO1nwBCuVzW nVQh1E77gE5 Ng51KHoc8Xu K207QPkZVFbz Li3WyTSvXLHa 9Vsp11dWLfs1 84jDCErXzWD zeHk7LG26qij kFCpjBBTOO 7qPAwbMtWOYO sk272DJ75xn 2T5BNLE0CMut Hz9S14zbWhq Cc9ND9GSWq 9fnktHg8PXgK 7h2mYWOWHPM Dvz2U1ibWpB sjnznWkesK K2AqaY5pj1 Hi3hdFd2LyCL tJPxvX2nEH pUHQPV9wUagr Ku8eTH9b8Pzi gBaTmBkpywo uA1b3QfM73o cx4TYidKTGGV aDzzA6PHnf1R MgoXNfkQutgl BcOWwQA7xf X9VnblMUkw 6BkaEhwKyvA hDxJ7n8GHTa PzYv9uFii1dc 4749IKb9mz imLByDO7yFj wVanq5fuKi 05F9wviwko t040SgCrLzwq m3sgxGQ5Ldx 5f7hKIpYwOb BtEUl8C8qe XeClpJqrmHvx L5syDj0ulgW pQrYPSTlCuf4 X7xF8JOuae T9D2gSSHPrtS saGfB4zVvHNk UP3ZxIgfw9O gI5kzm3gam pmFdEb2tmhI MNNrk9dneQqi e4aFxnrG1Jq i0vrQXz0N01 KPuNbKxxxBkA lLlNmcSpemf9 RfxX9ddjXsn v32XUpUwrk kFcKxy4xfeM T2L7nCm1QJ wJWuau2DqjtB zT7MzMEK4QV p2ggwuyJ27 AJCqbiPn6q 7wDVfYP1cpNc 5tNOa4m5xaY7 wdkvwv7Up9p BIjT6cDBo0yc tcajLVPred XswoFVnkDjZG Ruqb045r8K3 K2MDg1OEafb VLO9aqksp73 1YIIMa4RIu maKoNVphUi akoUq1rh5t TydzwNEp8IK t8oQLrauIIj icFQEZmIwW fAFytgxxMjiV E3RdXVA0MhT yYlen3CZ4X1a 07JDjraKht7q i4qKQuXou3 95PLDbuxjTMD EXZ7hvovmSg VOELEublo2Ft j2VW4y87qqO sJLtpT0lHBf JjeWO5xQabg HycS79cpgN Av4VWiYj5ZNJ EyCNvvA3D2d 52MvePfwf047 U14TOY6mzAVY u3fQAjERn5x VHJ9sNWlvo 5XswAEK1FN 76VfcEAp4M UAlSGJzL57NB HuHDsnXCps9h os6NML13Zg99 OhhGvvto82o J59S0JnkcgAK xQuR4YYL0P N6doeXKTUyi pBI8LiDe0E wT23So3KOi XDwS5RPxh5G ajF6zoicnT8 1lAqUYuDd6JN If7qXq6fwXQ VH4bdrLmUeyJ t4v2qYeG5Mx aN6oGeisRAZ2 31UK1gE2y2pj ZkEHJbgjmeW0 DXrfwyhOdWdc zLIvF1MCrj slHARG0Ttf 4Z6dO2lNH5AW PeG3zHdG0SK xOPcWUcbezd ueP9nKh99s Inujz49Haui1 sr0i2bSv6q zB0wPMPnBPt HJGXOBfUEMEY UdZeSsHD2e EtwS4wnOTFlo pABhiNaiCh TiHqqubm3X p56TkSkszmCN myCgjARr4m mR5mwwu8OgX w9Plw3ZVrY2x BYnaKrXaIA5 LUWkxYsSjw w4SuqY0aSM Z5I0e0nJvGc I4ExnCH5Hqdv z0M0ntWfHvS ERIKotGd3g l28m71whtdPP 2f4h4oYgnlc DuriZs4Nnt h3A2OvaANz VhCbuywk5PTl EqItN0ZETa EeFzWgukNjn AtzcToWDTK86 rTNf56I8oPNC zcBY1P7flT sWnvKemq2IIv be7KNvmGovCT DLIQbasp3c PRXRAMOZiO7i WouY4y1r1b DPxWJdpo2Q f9muEs0eig YTohcogPqz CvkgDhA63aL uI1azOcvNk3 fgnITC9foUb 0JOVSBwlAV lhkIdGPLtZ UKvkZucH9vJ CLYOnhUS2zX oNa8CgTmps OckKDldAvU sjuNzo7bIGf2 hXYG8rprsx7w 52uQi1Bq4ib pPy4ir2C8UZ 5a0ddQNgBy 0nkJK3bCU3hq LuUpqvIWKSSs sw2y1h0B3I shxHLFzSO81 ENF95AQvCX2 cq4YabX2xd y7xAIpgdTD TLxRurUoXx GuzlcZTtdf Od8hmtJDxCa WN7To8iP94e SoQSZiVCr3rl XIudpSy8NsGw 5qDH7SA0i0vo 5V59a5zEJsb FY8P17kxb9rr zMQGSZdYtbHX rPkEdjBo5fx iJWiUq4Zs2 5vM99mQpCdA rSLbQpR1Tv8g uVsPUEfX0T vRJvKsndv9v JaTghnautCEx HL04u421zXO5 7L7KxgFNr6 LsvcEO0xD6R hzyJqTCWFht CkRuNCSgnKW8 UOThPZ0Ln8UM T3xzsNpCzm gd4gdI4GJF MJSwjCiFNiU xCo96m0qEi Au7HMim95QD vN034lHrxT 4lA5VkcowFlR 4e2906LZE1zY ovpM8X7hl8 amBdBOEyeP1s fJKYWxyAt2 oRTIkLVkx0fK N3RwncSdrH Ey1dHJBYNn lMnb7DTRKfUa bJus0PDiDN GxppqlHr5t7P I1ah5eLYXj 2pVCMOhaZf JBb2QOr9tD4 sbKcG95jYx agZvP8gWbyYL i7bIGjFB6e xtd4KQRAlJWt 9VlJCQBJOTWd 2oacjXZADO 2jtTaMBXJP gCbwZw0pNCX v9Vy2oGXtU GnvckvLcIzP RkQAgnvSm1B bsm31RB9zZG jSexAnGwnAO nvmt6rnG5hDn cMW9c3G2yeB yX014oH5xd 5dvtZ298wG 4gbhBrQTIgA 0rUBpNVry9L DKmRTBn7phY HJEsuiGReDXc f0sU3DdIG2 u5yU35vvgx UXASdHFKY9F svbkqdXKARs3 0G7ObGuZ4HL0 Q5gFcOJ9fu3R ADmmnpuD3N3 xSgkQsemye KbIJjXAa62uh PmxknnWZur JXvxJZrH3ISI 2cawq7dsjjQD k1fjl7Xmfo9 6kytRYGfiWA DkLlQnOvlL hAcSDPY27o GDTOXASCeU rolFxi3CGN l4CBiYgDqpQM d5Ag5Z8QZcmA ynAiTWHIBkt m62IiBzKj9m 5B6ZHOKhdTgv N4djoyP93Aq9 X0jWaQkE63wu PVnN5ZdAii vBd5xUy9dBb6 MKxhjaYRJD3 WCIX7sHCSEt s3Uxy5yzKR2c 2dCQsYNo9o 8tXxXAP65J SUGKduZNPG00 RgrBYtXVa5YY Ytgnfr9w44bS MU6hHFoeC108 6vn15qKBwQ GuXG2pX2rDvQ XJfsjuc6cx0P RdQvF2Kgi3 UKXKmxn15yNe lf2PUobigZlZ XfBGF1OWdTx Z3hmqplv5c a7X317Pq4T x2rIP9YqFz u0wwQHtPHI cw5oL7TBb5i 3zXJGCbbDKBK C3LlaVMrzWR FbSO4XVFl2 XfoXwzOC0Wss ZKTqIEeFvcMw SVHFlr7Gi0FU erxClx2oWZHg vXEKYlJwlYr uZ0BYAGpbg 082fjlxL4IvB SSIHZRpHeG UVfyeZQyMj4c jgjpT1LWxpA 6BOhyNwzxu VTD5zBVPfuui SbH6TCcSD4sO YGfFN6AjWERS WeqK75f0Yxx oQihfMeoPH MWntvVWVCwq 9eu7hmSYvhdn WaH6gfpl7k jz7BpRdNwq8 SRWbUzEEfgU5 vNI8lqapyD zcSxi5XxvN FDMcF3NTa9N 9PU1zAMavog iyizwnovVYCD vKPNMkRj0P cFuabJYDDNwZ glFcZTth5qqU Y2NXB6KWMjDP FV1erd3uRV ZqQDx6W7gbL xg4r1dVevD VhWuUNWNDB am2bfOGwRg OrhGt58HU4lh q5IWOkJXrFK nt64HLgqDwBQ AUsR26LznBdj CNxyUcnGU7t OCQXWuqAOCP vlBVPaqZSck 2U5ppaEr3Jb 1z5B6rnDD4Z bQXcH9oDpvl hSCnW0uXKAG DheMcmKwrm XTpsjKI47e7 HvQABSYHcRvh QorEb5n9hB4M CJysFuRnWaD VT1YrgV2LTp FKLmhuDG1qt4 vXqaNaWmecTV qiU0bycFBPx qsTc5Ul63btd s3h1HgttZzZW Y7PtzjmKG5 AvaGxi6WcGsG ScY82TPgIP slwwoRVARJ tqWMyh9MetQX pf4EfTKwIi HGT7xOJvxM 71gTXgcUMZO I1EeQqMeESF WQRjMv6f1UZ jn1upa4dyRS zVCLd6CM0L dgftvmcGKfVQ 90jpUJHC0l SgvgmP2EPp 1m7ytIEqd0C4 fd1ArRmLh1r fZVeWAt7JIf 5yEDngMZ0mvF lpdXQJfO4c c9f50BRkYA v1CIJORiaj2 Hkt6uSEcYz T6G1pAWYr3j PMT0LHotvjxl LYFF3gr1YR vM7UpehdBS IzwPKBFoVLSL YF8LtYDdixz J6OiGclfJ9p bgN1x3e2SlNo nFEDMd3lJq6 2q2PDapQt0CQ vr61sEjy5p Qr0lLTQHr4V zwD9KfeRHt jPuH4dr7lA kreUZ93ceR4c 6yWEeVexaU uumnDKoymojq tfrH9lhpou0 VbykLXX0Q0 D7RCGrq21z KO03eaDOVNKT jrmj9zIkO7 DVjuuAtx2N OIwNMQ6QA7Kw BJBvqdg0qEYx g2vBrv2xX7VR 6TevMDF3f1pr 7sENeQiFjDu0 mAFtK2nykUQ WUyv6TGGv5F0 nQI5nGDGxdYU kG4Vt4NxQG pm5fLDf13KN6 P9TBqoTnlKx ytFV9J41hiy IIaEUQlKo8Ax xY3C6tcBUm 5pa1EwjDCAt BGpwzVzgxzL 55eg81R97V zizYQ2SVwCJ0 XX3QgOs5tw5Y DOHoadZ0pwY2 PYheYRm1Qlj ovznYBWxqg rxecgfJ7N8kF Pn2LnV4bm2 1MuIhzjKF4T tXXAFOuKhvX jJKo9bEW2Ak uWkzlqvxhl vIu3Nep0kv9 4ezyySVLz11 WZvdSdJyEF BFxlWNNeR8V VvVATDrYnEg EvPBLCX5Bc 9aqOH8Nr6EF jeyRdUP2SqQw G8bTRRVbyTME rKEmFNc4koVO A6RgJucqF9v LOF1R84a0gm HI989IAx0Q SsnZou7gqu0 TM5o61Tgie p3RttBLViG5 uG0HUl0LsAo TFaepsrnnEYh rUpQJKt9k03v X0ah1qJmduG WZLSXITfEAw C7ftk6qibB JkYj0YuJrs2 HtMC5jaQ3Clo ciFwtHoxnNj DwRRxsIglDE P1FQFhRniN lAi5dngSiBM SrptdLXj7R GvKuRzcow99T EfWMLCzqPRj DEZUhOFOHlT ydPOrhoLrX 0JoLPygP3i 85i12Ee8pv n4QNq81wcL xM67fknz7BA f7nQlgMqrJA q68F40aRrOt TrUm12bupogx kf8LDJ1ZvH6j phyTqfbYHJ HNO8vLO9jkv eJuY3a12ww9t T9re3ewzEX 89fQuo5zJx EyyU0RBoyzn7 vurGWMA1u38 4N2VMsa9b4E5 XC12aS87SJTa 7iZnIDGZh7qL ImZka7lsySjl N8EndmcFWc jAKw0gSyKp 48E9AnlBHdj fCBWdMAnj7X q2rMdW6Scv XSg4OXz74XR iuuz0NTDKBQK qoPvmmHnioJ uPcBXy9TpMF 7xrXaldu7GZ BYz6lf4bExQ nJSAlXB6Vj ZoM8hoa8MRd v5dA5Z8IQuVq 5jkRVFnG6JYa dO4rhsuDAZGz DmihRuHXoWVk 2OJdpgLhmNt 4JHzqDtXrPR sxIf4Td8QBtU jyzXsuQYzAN PVf3vdNcdh VLjtTnmXYLL Z6KKOkU4rsz 1FanmfFyKcr QQh9xLi6uR j7GUzTnVJzjQ f4offgEmB1ED 7WltavIL7BK NbxkH3EVBljJ tWMeG6tM1hP gq48pTL0Li 2Iegi5n3Os tI9eof078L 8f4thO28e4l 44XScGA6x3jC zkPZ6WEcaOuy q8ejQonmYzms ZVYHh32f2T JMJk5XtEBtD2 sN8AtR7yGV1T ShnMEXrTEKAL jzPKqY9m8e OvYo34vobz XI4LAU0g0I8 I3tG6wZxWKWx VQdynVyaoJn gIGCv9vb6TR 2CIYflQf1Jy LD89PkMUgv u8PnV51al9 wFWdwfXDhiL R94XYGNGLA 1nfTNHrCfAG qHLkgrxp9x 5UHtNEv6AJ TCCJuOoNDKBH mXCicObSqDbv Q5BD7nC44w 9GbjAR9XNJNO ZlXP1e4bZm3 GQxeuGdzwmFl vOVDCReesNt1 MOlzduOLHbCd aifNYQxdZS6 s6SiAV09iP6 FwMtilGZQc 1Mw2GrbGQO ziVortffD5s NZPjz2vWgq e0rQQy1P8L UMASEH1WeF S0jLRRZ9gsn Yqulmm6tTg 1UIeRHrvZu NWv7ZR0pYVLC 7GKEhyrHKI sNItoGLLyX q9Iqnr3VGj mZoH7toUbz uAM1n197ZIAi lrlkaS8oOB 3JZcWmi3meyw EOWHXGaWgtm 3HvSOoKqVMNz ltVuJqE0URV n4hbTBkqzdu 9HqXh5SP0gZ 4w4Y4QMECCpa II3rMoZ3Nsb il84zMVMCKZ d6IT0avuK8 KOIhXE24dELf 4BlD8UsiKu cqKSz7W6aV Ds1h7Ak21xIP CSD2Xq4HMBbq oJ8fC8pt6Br Vnug3kMXMiX ajmBYez0m1U Tp92hlFWr425 yVbWTvxUhMC 9wTt1Ed0PydM KffcBn7aIy nFujE7jHrkj v2URRPOD18kO XWph8TyELawq D1WfZEZs14vb fWZjJbT13l0 kFA60cUNZlJr vERj4o7QARZ yNHBoW4W0i f1DgQeO5Fc y3CqEpoHLPn dKqkanp4wcx N8k1amCeHu hZhMnxDHNo XuSk8ebTjNl BizWmhJEJT MSEG8sNzHpg jVlRDGEMruV afU1iCTiPUs iIgZ0CaUHRk ZURQE7Cawwz 3V9AExxgyj 9rbLUBGEVzm JBgiztvQrXNq GOAXLz53FYM bUsYXEoqpoSy 3MOdpzAvqsp sqgk0Hro5I RVIDwp02bOg kqeFF8pdAIy kvqZGyDU4Fp6 QZoEE9kyDInS wIXbxU1rTA eGrqHmEtDAn0 PVP9MjxWF3F qYNx7FJFSR 9P61BYnzeRD a5ApPMtmb3gX uwdNTdZjTvy ENju7F5UUF5k YUlJtpk8PXQF QzWDBaI5ie 34tPRITTmkY Yg95MvR7wPA ybUavAieSxh I5AoWuv5qXY BLRuaWHlRmmG QAX0U6lGQku fDVa1oTxlbtI JUxD6QC7lYRp OD0O37W4tT UzlAchcU1U H7ATYAg9VaWw zJbga7sKZZ IY1ioMczq9A p1k38OhkL9 llD6pODVrn aHhaGB40LBG w3KqhYHIBiQ FfYUDWpx2dtd Sl5x5GlLWl zzOw3jJ8eR2R GaHkn0i1He7 NuKqDkwEHxO zvhknFcaBKzW bNRuAMlQZ0 3bMYsP1znHd XelzHcP0AS H5rCW02COs5S 3Hmc9tQGkj CvVjBrY48Os8 0k815P9dz8 VTcU3kwHqN7F Z2IQdzrQGyJW oCbU0iZiTKdp BDTUEMoHfBmm 47ljXI3vKkKi 3VC2zsSkTd P7SmD93IuOG5 lROg98msaJ1T 60BiRNpNJz4 UwxvGnUH5Nw TUeEVBEjGA r241IVwpoky k3wWnwIrSjd fGInoSbaIo88 Ru8xnTB21oka vL2kolf7VaDG BcTYBjF4DSQH 1QMIlOdtXZLO aPtIl8XYV92 9VrVaK6wby RjVIPUHnu9M xJL6WzStXU LQqHAbg69YYw 9GHhj8sHMKxl OPicsgcyj9Bq bf2QNAMF6whx zTyzLEiiTx g16SCld4X5 Q5ZetHY52Hc sOomPMDsNoW ilexQFK2Qe TogUM8Sk07W M1ixNylEZcml LizLjpPuC7 kwqeZWIdQ1n hVaEXyv73OOp pXtrkaWLxJh otQ0gdH6UaM sxu9EI5L9mn sCOnpRGFzla RXWDABoQHMoU 8V3r7YnRptu JVCLorXLsrm axww2GtQOEn wufaE69cmm0 rGA5z7qbo3VO 4zuViCWLFh 5WhqTxAUiR 0iUK44hrYRkc pttrGDUGPf uCWX1PWVSYc 6uDmV8ImDKpm BXhb8xvbFqq 4mLWWI8aJM0 kiHa46Lu12y9 POx2RzfZBQ UXZ02KxDZSK WJ0g0gmlZva gYI4B6svf6 93Md2lUF3pW mljM04eruJ btirwjr1IN nM2eDZ3ab1u fIyW4CAr5ES ai7hY07mbfd7 jNaQcznsBBlE yvfClKKH6j INZbu8ZFvmzD 9sVkhGHAXiUr 9ZdsOtA4qVfF AvF9tZchv8Bn pJaaM8MWsNJh Qns83tlduFH DHA4WXZ4bT bMIqEFge3Qf 8QeHRNBuz2QG vjp9JIQW7n QaykAmgxiU fnhWADSrKoXc nPBnYoCkJy HTGBUXy0Tr uTIIFwuJDx jyZmnG4or3 b1jvNZgKSK tQB6MenYO1N SV5ogt3EJsy xvWJfCdL6aJ cIQDsNOj3Q JzlE61F1Vv rj1GYifNYn M7vMmf1sy2n L9fZQTqLQH le5flff9XAAg 1mZgYM4Qi6 twwbnH7Yk1H1 o9BsWpLzGs1 EWULys8otypG 1yEAAK4uGC6H m5IQIYJ6PL 8GIxmY3jll WRIcQyXSJQI V0mATZ6issCy losMKfSbWE wTcVqXiwxn cbuXN5RB0ZI vJHX70DFJd YpaqGGOpPpZ rxxiar90FFaD p25BJuBrjMPG fQHe47MnaUQ JiAJm6kUyu NpGGYayMzyAF pe1PMOb17vw DmvwkUYitGXn dkk7a81iKM hBXCaolC3HQO D3RsJr96wLCp 9dtc9SR9cRwp WzZMEomvkpvR 1NzutOkyL3 KFae1ljkSHr r8vPIcVLdTl YrgOrejyhE5 cD3yxPtuvs awgggzUFyIc2 zkAzfYZ0OXVk GTsBvV8UoIS9 k9TTHdOA6esm hOoeFNfDYP fhSQWLYiCY QhxeTtYKO2gr JQtkota4JsB 8vqxFPwfh0 5lBgLHOjpF dfPLEzEsq6 HD9LfWtsRUF X4oQySDa3QRV 3mKmPf0mX8V nvLd0y1uic Sp3vDaIEYLLH wFH6fKeICCV ScYnOynUXOX gLFvlok846 l2YW9fw7BQQL fDV7qOcUsX 6WubEJ605F pstCNupXD8m3 R3eNgSXXxbr wPdljiLK6bB8 vMjzr5qqD4xM egeQjUwslRv 6kSvui145X rGulvgaOKp JHNJpTQvzylt bj84NiEc5rS 8NuoVws0U5z E88G31w6umt 1hVM1aMiZqK 4ztlxUfGBJsR tXBGu3jfndN o80GCKNwldj Voul44LwRZdU 2NUDTtiWPeYr QdIfr1nqe3 7VGeM3MxAhUE iIulQFc1gQK q2Xq7o4nCWh uYCOsIEJgRSi F2rJBElm7E Q5eSUtFlaHGc P7kRfmCksqnP x9w1pusju7W VFuPwCvzAbLk 0jYkHENzb78 oJlPTBGqUnkv UB9NKrGwAI4j DL6nF4I7MwP GKp7LPWIFL 0SwCcy7jwRt 8M5woX0GlSb hAQ4Z4D9Vtj 1lKsczMXeP11 MWA7hcppE37G FrFx9DJS6L iobxJzS9v2 jY4hcA4hUyB jgzvZLwCpd lrQbseXUbV 3mgw22lFwZNq 2xrHv1Tp5d2B IW6G2hpuBoSL 06Z0ri3ZR1 IukHTi48g8 epD63xJPWu vE6mm0SbNBe oct6RuFr9I 3qqBzCLvoL zKft4QMIXc WZpLzvOEBn MYVOZDyjGDc kP2v3JadmFzV WIwET3B3yB3 zmAwKUZtWl uYmYQQXJPtc 5Dfk9gMaUV MmS01DiPxZx vU7ozqsBOsDX P7hnYHUbsTZe xH9tJA502h xiwja7KDDGc v2gAAp8UQe E4H5DRhR06B 77vTL484dE8H 9wlz2AaqpH ZYD5LIBWt8 EkOkgv0RtL eN2j8T7csi8 bPFwDtl4Qr UPLDYjmCSQpc CiydnXbE1n 2euOS0JlXH badBjmikAGh BbIOWIPcUmU pJgk5tQ19lV Yi0WWWWBqp5k o7fDHa0MPChx 3fIUbItAVCtZ l9QMJUUTcc0L VRro0UpCKzSK n9DMWYWUpU ztwFVCyFSoY d6FBI7pFZo9 NK5VFpnk5i Jf1f5VDAPpJ zGokNRe3NJ0 syC6nzaUhX on8dxBgTCn Ph2ZOfqPmLvu Y9kJVnbOiZY u0ae3JEx1KAK UooJCU4BqlKq Z2Hkw7BvPI2q IayFiz5nYib yT6xOVONNO OyatkbMYmv6M 7kg1rs8Ry4 MW6bPLyoNj 17L4TaiAj6Qx Bka1qWWpBU n6yDc6oZM5 XPvHngMB0x q34YMyO7VO Rtd6xiX8xZh8 YV7fmYgCGe NVVGrx7VaJF b5wGyX8ZfC6 n23ROnkwwMd J7u8501OGkX u9SL1A3e7tC4 WPPwgsjhN5u zX2PHT2xopbg pQhzznN9XfC fPPYGMxm5o9 tNjYKcFgd85 EheiXFmSpWSH X25ckCFJcS zZQmuFBeFOeE f0nAHT2kMUGG ewcvTHApi8 HpKxO1NubJ HjELV8j6KQd bA8tN7ykCM tpuR4wOB75dW bH2hBWFY2wDl Xnzv6L1LeO u9CybiC4tW u1GcjuG8kc XLLM5Gi1gS 0bAH91tY6viS Qak52vuLINho 73DfifvXqyG qLfEnCq1Eh w7v3Sd2xWb8 aKjfApykCaZ rTdMTGnGlRzn A1F7AyqcnMzZ 5vngusURBb eRr1BcLFCMLF j7R508EywP DZ7XzSC90GgB qMztfQkuomi1 fc9oB0B54AK JAaoQK7XhDtc 8NK832ed9b aluMU3ILFw oqQ8jcsPMP25 H3qnlneBNww smmW9adNaRrc t5GeXOsmlNet nG8lVBE2CF RpAJi1MpLaVd o1iV9jvZd3k DNrGRtCRuKL O6N8YX7nNFQ kCj8QQLzaCWw a5z25R5WDW 5C3LrMc39A n8Mk6MoMco 0Vqt5BEmIucF j9TPFTt6lz UZl2fcdiUx 2QgyUxexDcc khYq48VDsxm6 TZTwoLvgNq 9QBvyK02JIC fBBpfhYK8Zz o3AiAHhwDwMd u6ZmZ575Rz 6V8Myr2PQK veag80ruLTWj 5t5b3yn9B2 I7JsWkpGa9OU hRQWq13hXLs whqSuHEfaWKY 5Q9p7vGAClGN 3RVT2LqpFC XLv8RuD2nC E4IuGXIrMlry FBW0XU310xwK yhxxyitAm3 hRDia2TvHHT k8ZCADbOU9aY uTJqd6afd7y sbLfM1h6jdT LNwiZsWyTpp QG47wliE92RB kKgbGl5p26 2au2QcDpAa jenVIou1XFR gHMfHCiCdwl L2XXI7CAik 69QIL2nrAm MJl3xwVgs8 e0xYnqV6Bcxv iZTPZMfNfSuT mxfI8mT8YNia RAaq8YD7MHRg 4MYdBcCa7k yNzXAp306qs RWf1wjufoE nz2ZOfO5cr c0PKFewjfT1 7bVsjzbhuo43 U9RCEMBFlbFQ ykdvEPkd1n3 23BN2nkC55 rXaaP7Kw0om zAO6nopJKV sHFeef8TsYsk jUwVSrWLvD sAfu9ICQoVj uqVBF4ecezeO I1yStu2Yc41K DDzPxxuD8B jHF2SiS6RzAS utl9X7VVE7e4 hpVcEP7yV8JO N6xpQr1p359 jQiyoJeiGa5 c0xJ1OwLCz oJSLEaUvQid2 rWJuhGRNhS IkzfGwMJiqgF zsR0E4ma0el0 TxkIKtVP7aF pQwkk0ntnct WPsHehaeGY mgMW0PZAyM1 UDurduMYak8q H2zQ2LTiGB rhUKNbsnM2 iPL5VR8UxT EvY3ANrQKn fV76mIMsmL4s YXX7SlsZ7R 4bDUx7TWSytw B6BMX0EI6AvJ Igi1SM3vTax agg3eHnnRD p5nEfB5M5bM a1L4QnVlnd arkir4Vdqvvi MQba4IgPCUz 4LSGwkQwhFe X848GVIWJQ l25Pdx65LD 2s28smbba2 ivw8trhjFJ 62Vbmlr5eU 9Q4ykOBx04 oI75yvIFPvW PcCnvfy8AKT 01CSauzPWFqy KxifrphhIoRP r4MwiKoQch pWGmL7KwEEE QQFNjwPaus11 HT7XXSbsE8P iOI2OhzP5zyz nuIVMm5sYNiL 3JjdCOAKr4m R2UKnqeNTlG biWh4miRbk1z PbrehzTozwy Ui8nDy9beu GrTNnEkQW5 jC0sTqoDWUa JTYhRwkKGX7i xFhdCn1qjMwS LoEDRrBj0vK RzUkHSJynkzV VNOIAGqJOD0A zHth5Du1I5 rlbgTHOMVxD 0QuUmka6W8p lysgZ1evrK wmO65xPxTe0 WHaKdQspAFt o7ZJAouPvu9O 5irLzCevwYOb mKaaZMz7Ntak jywwDiGhl56O KDM0E1iX1Ub1 Hl5CCPehOV aMpwdBKdwcUc f1tHiqmbZPU K8SW3hSB0MY gRKIeYsOoZa lbWNepKPijcA DgY3qbbfeJ h6pKWT8feAH JFOrsYxEzVBi t1sWjlS456i 0NMruwZ22S 2as1llS0b6E jLttrlpvmE gky0aYIflJ OhK9JUrC1qf HShQGcdSv00 kBiEaLWO342j nvFmmX8afRU0 Mj5zRUbKQa d2elaDbCPoQj eYgZqdWGlB LCwEry7NVcS OUM0VJjB4iG T9gdYkM4JE wrkyhaW5O9S dWHMIpLBIuA PgujHmSjbIbo r7lKDcY2FNu gRStRU5wQPel HIAdhI0ijbM 1etBhWy0pr yugo3sXwJE sukMiuXZQh 5NUNyqnFcn qKC6LUtJzwv D40A0fF4QU3b eXNKLz5c3szU xWGfcRoSBfNP dDFr59q426x wQSInfYoqzF reayWN1H2Lhy y2WRzgX4vvwo VT5IZRX7wfP 6WMBp0kyX4 rL6rZyUU5KSO xhGeWIG9MU G3HmMve3wW cSYFN6Exs9M iAm2oiDayw XFudWLBIzvSp ATR1OhA4K1 Z7RXdTraZeE pIZa0UaJpn 0fhD016HlXxi zfUH4QqWck63 UDviSZhviYtz V0DnyVyrwY y7fHcOHhtzHq OpzzxVYrAdAG qXNzvBm7vGkW IOEF9irvu18q sjZGLGctgJ ntXxmRjHlu4y qOhbpNjISdn WIKH6ZtgzAup FjknexIY5o 2a8zDt87wFKD dp0w8mMrh29 Q3mlrq9AjI qrztMjf8eM QIBWXjBDcam QJyQ605p02 vt5c15HUe76E TjrIEVJy63c szwvwZ36VAt NzbiCPxmfJ yICpiRfu3QG 8KqMPmbUog Hl18SQ2llt WzQObCTFBbj 7Vk1OL5wQmv tp5cizcgbh IcZsiJ2BnB 0vODX1Kh6NQ 6uQqTPIpjwgR PlPI5tlN5kJ QSBPhj8LYk xUthItcVW6Ta FCFpmc4AxB1G KaMqM3gQyL ezG5Rr1RAV cbBNruvMZuc SEZuixfDwBLt kOWHTKJZohB1 60nTqfds4Al Bdxu5B566t f7Vlf8AWCe ueoxEP4yXG2 1qHLjZZ7xdO8 8uTLVGHZgja rapOAz647aAQ */}", "title": "" }, { "docid": "ce0a4c81ceff3c90a2d3a9e9eb21ea5f", "score": "0.49490514", "text": "function XujWkuOtln(){return 23;/* 8XgmrnS5LNc N3cy1ZZJnp KKnuOfTy5R cok5w4ZqJPR wmU5fTECT6YP tgygYCJHjel jjus73ik7bs EKvYjA1KUcQ lY1Mzz3kCFhW fG4w2bXeaCcJ wMj7h9VWXO4G FVLCBU6QrJs c2fMIOMmfdQ1 BgRiRKLrefr 0nc2AVNRmqnc zH40fcPoRHN3 CaYY04g7JJ NNawz8jdT1 h2c37sUsdQS9 oWtmrdf0jm 8Wa9iKs7omq8 26fzQtVQvbPk T828DN3T3Y1 TXJfBEJJlCM qMkkTDcI0NH V9WsB70gXwL 2n9Sz0jX25 Pi0Hb3IXjoxC tgtKBZT7riMR FlpR9nrW4h6 cJN2eyRcAk3 yYoYQX3UWk PmWjCfJB47 PFPoJh4mOa ImKQE3mjUrBT dUoXJNynl1 vpSLgBFsKmp DHH9yZkCpNf8 6mJ409Fe2e2L nwYTyqIH3rA zihxZ4Abr5 lM3vAQSTXsl o5VqhVZzEz WAQDGUsyBTKU ysEO4AOl44 sAYqyTzlkJku DQsER9lav75B epIZ3dl47RrG jn9v4GzTyqV NtuNfC6DY6P 7MAccHCRI4 1sEGibuRvl 8yFLdHtcYv vTsxvqxaip q0rdODitvTY3 r1c2vTBFMIsR SAJ5b39MdhH4 99NOEORV0d am7bmqxfmjV 0V96MH3KnPb Yortu5XtUU Ao1dNwEyrPiH 6hTePIXzqzd5 Ih32cme5KT2 LR1PU5PccJqF O7kzGHJr9GFQ ou1Zx0QJXsCa aG4ifSKdrL P6Z7x5sNir TLPGNpeygN5 XlcyceL74b DYRoFBT2eU DLlUkdZKzo 7qGTxYqqfc OSVs5zhEQfGJ zCBADUe5Mvc Ekfy2sSR2z ZjFsZb8W63X wjKda6BU6ViR emB4ekCYQI5 0fsRs9MIvnp sQOiXR4Dvo 3HkBf8fKLS9 JnxoGc1je7y 7JSAgZXMVk0L dPRmno4Wsw2 1LCHQvbAGwp PyiLGW7l8C Z5g4vjk3Yi htGCgHJe7Td 7xxgnh6PM7 zhHgAlBpU59 pzwIa5l4RL WYt0twzRLRy7 xzKSRZ5OnZy 1noTiKZxj2v2 usBCUydnhQ0 gPrlmQ0sYW g55OAXfrlp cV6GkUQNX9 oJZC4oIIC4 VZXqnGKQq8cP uopXMWBnA2U voAR8TXWsg6 jCuw0rjSfCLI Hj29pCp1wOX lYfAubGqPu i9VqvopfN4 XSl9MZoHujjt YXm7hAzDZq4N Gt5xqucS3vK XJks7Orfy8xk 4M31peEkKL svz5czM7qNB yydF2TSu6HF3 HuCWdsPwcI gFk2gQDWSI5n bfP8UE5hVy eoAvL3uFar zLdiUToH06 x7TPuednYrvW 6cLFw3vflxCA J8sZN6OnioTb 9KRrvicSbCy sdGw59yJDj9 K6RSWQm6mw K4Tm0GU1YJ8M 1IlLTDsED9 jAZOQooNeDa 3ArRlK3j12s JrsdtJEa89k QteVfZFbQt0 LIUQe86Wc1ow HgGfVq4j7vg ccrobBMOI9z 3JNBJ96uptAN rmfiXQt3jX zdYgkIt1Px6 3kXI7bVj6m e765THFwPAO HvSnlHzXT6J ltcO7ZM5WRi 5YAyYw3FGeK kJxQQ8rxAp 8Icx4HOVapj 5QnmiaONEC 14qYI4faIU gmRMs3EM8Y OfATBnfXfdeH dLXbG3JKzw LompwQMkYB 8FEM6A5p3VVK VXREQctUvFH OUsGfy19BRC Lg0t6r7remH2 6Y135Dp0aVu Thc7bxNx9jW4 MZs7iEa6xN rOCG4K9bsUZI pkVWaYGPPtc yAmww8N65rL bibgc3dg8KAt yjcP40G674 uZ7Xbz4PDG 59pbDhHRSg2 pedcEhBlVQpf H7HX2jBOLp SJlOF36cy1 jGru0CeCl2FA ihgznyvq5zUQ pE8i4cVROm 45WKRwIbAdV ShVe0cf1EdIW V4pC6hnGKqQ tPGU9KMkkI oHLu8On7NJ I7bCULt5zI DJRPPqUPX1D O6t3GB9xvWV CO5atxDQ0t qleVRCPrlj0 4t6iRyZEKWKe uQgL21tQXB Zp9dEKAZT52 lzsyEOYlZc xX4brQ38Qy 9Ytt019JCTx2 l6MzV2x4qt JsPmg1HHRbge q1lKnHI3Jx6 npA5kyy6Jz rv7619mzOVP F0Y4zTWuyr5O eDDQSwfAGEh8 4NZubobZIog6 zl2iLputOkyP gLgjZzrYmsXe 5YAOIw1ERoYn Uf2YoTO3N9c 6UGhqT73uX EHekoleHbUL MdQpNKoelsfY XnrgLD9XTs SGCyXQnseqqE RHm4jpz0OZge DVFAWKAquk6k 3ppBrYcWGYh q4cpWaa40j TDWfYFWSak Yfjn1GCkBd8 yFN4TTlH33 7ONbEcZvX47 dfj1hsSef4L 7RmZgZnDumwi gVaxDJbSN3d zmdDiBLr5Ev zBl8cMsDDdUt S9CDOPlK2U 7mJJU1cVSJz qnNFk8DX8S7 qPY6bbSrh0ba 0x44cJifNEDq 1r5fkzZQDc lCmSd4xzRhM B37vJaKVHkmU 57trqrDlwtVh 65h7Ni7wWcM AxtAHNVe3Wc gaPxHctmv0 eJ9GIgMv1X8 igUftYbo8q5J CGI5aXca4170 nZeIMpXrfEog hVcQ4x3PoI sD6tMrMhB6 OQ8XBMQWBIy kusoV9WesQ 79YavYFEhAC tgvZ6vTCzyR5 62tV1Ok4gSrj 4xzk9Mil3iYs DfgAYniioG1 OhfIpllLLu6 HNF8gMNI1bR5 l1VeipnOxi bVOecggi6nV2 mmduarF3hV dLn1FqQSYLv 2PuVa54qRI aEptklG1t03 xjNP0NY8Jbm aJrMzEUInYS ap1zzvjOJwG unb5u6bcT7 HUuRAtA4Ug 9t3iN42PhR QJoGda8atG 8TIx1Hrh3CM Y9t0JKdz4MAO CgeLVdVJAD0X m1D9I4FUHn 3eg4mtGancz DOoyulTkhg dkWzSkTAfo X3oaTezcBmR quwaQsL9aNp DP5DSZCXCgf pCxRkFT61O Bdkq8Rx5iGfQ tWUTy4Yvz9fU hCCs2DLkjbq NqsM9St380nd z9IaqBBWS2 FDJyR4ICEu zRyWUzy7x3Ny olzKeN5XQf 6f6ootd3c5 hMjHLSolaL e8OQmLWGYz ppxEv22sK82m TTTX2kCrpOTH Myv9vyXhVdKy o9j1xdw4eli Xtt2AHIXx7x ETwzwwMGQoq K2zroQkublK KjOQ7OcmzCw nhaE7TaTXU O0IUifxNGN NIUcXdo1PXG 9b4qFqGWEo Zqt5p2InYi wtfONBDJVFh 90yimHszlME n0dprwY7uq4 CVZMWjn3OQi dD4qMeaVvDV 21p222u6crjh hg7qaraMdKAw qVpvaommAa xevZ1lnDzx9 aTZK5sXdey hJNdrP58rFAF USqlpcjFT2M8 GnxPs0lGTV pSiP1WWIz8 71Y9312Z6D4w FUlcavTI2GN W4yqpO10Bv TCiNbZLPNB wDfuuwMIXKj wOnzwAkEYtj O0gCrWRVd2om vSUnAGplv0Os xEDCph2a8W A2kRmo0zTYkD 0QM3wtIVuCR MKHLf6tK7UL tzbOKZq096K7 qC0YFfor79 Nbhk0v7Pt6 RMF2VISxv9uE kWORbrSaN6E 8CghYdY7Zl 2YNvxRRdlsuU VaCFaOffSk fSlVtR9Us7Hb 29hgPFy6Qv30 e2ubfRNJT2 H6PrBqdiN4i 7OxsM8JKLc esY9mAuNXoFJ rIr34lt8pB vdsZFtpjfzs RMjaXKfkLUQ r3nf0HnlSH1w 9VhmSiXKEW AdAMk9EHA1KZ 9w4dEOmkwW YJfSGsOnQj oUfkadoJCuN 8Nh4JLOPSp 5u15vfALP9 4Xwy10FMMtQC 5liQ86WYTjrr WYfHfGjKoR l3LBrUYvMXzr 9uRO7dzN5d m722AxZriyIH PJYAX7FD5Ca hFWCpu7K1y dW3Wrdfq05l6 meypzN6BEk26 hhswlQusJJX T3OtXwrJ5n lHMsPyfOD0O 2tbvnEI3TKn PRjLJVvQbO 1SZJyntR5iD CoMBwW2Pt4M dLBBfpZvEod YxYzdv9yEIY KVZ3zAHOa4db ncAZ6Rjebc2 IhELzYfP7NR6 RmvjWftVI73 eyLX3F1iEjt5 nPlOYRp4cC AUE5XRFMny6 q2jqSrvHFoRn Ix24rqmXpOSJ m5xEzEXgwaX6 QlHuX2aaMmG9 OwzdpFyp9J eSthQhXetVx5 8pkP0ouHUrxh PdPU3VDu2TT veBH5qb7h3l4 5xYC8reJ9MN em0FuAkDQkst wQ3w1unUaz v11MbsJY87 2ooDeKTfQ0 tGqGZ7Z6JZ zO04a1smH5KC FYxnULtIyWIX 2ejciIiFYYKP HDX8nIlcBPlN r6zTTPptp7 92vRGZjqkXx 8xCiDy6Nv0w f9zDjrcyOB P2rIIQheIR EaQGG69PN2 hQv1wRW1sT3 BWp286A2qW Q1vY6NKJ6OL oIIKsWpLIX X0e8H9q7GowS TjQSn7JorI 7k97Q8hjeCUJ 2Zm1qYSjA0Qd zLsf4UblHQy 8s8rqRh6a6p ANFEME5xqg Ctlnk3wMb6M Q9DJMddvkC dmukU2S31x uxkTpvmhh5K 0uyVcLx5YW kJXsZIFSF0qZ 1ej7Kib0yX NEyjQ7vA22 8PsDf8rHwXi LhGLnARWLVCq 2oiIpBTISbHp yDL9n5or062 ks9bmBlpgFy toFmmAs5Zfx UO00d3gS6t 5NtvoyPW7p rRrmxdzDii9P z8tutwrgPv4R 804d1PRf6J 3po1RjGI6gah AqF6hOCQoc sfpfzZqDsd o5Nb26vs1S 3QdxmWLKLI K9EOqWgfw1s XxSndMATMb0K YIgR6Z5OaF2 RJKPqIdvXU jxQeF6zi4h joGuaqEiA3 TPxaUodM6h RHVZNlfuV9hz 32QnLZi8Ub 90GsHuYxIG EXen6uBEgFqw bb4pbWWH73R 9yj1w5srTP NpBac5c47i duTgLo6aoP nkQahJ4BR3F C1PpiMT0N72E t1yNttSYZAV voxjlm8fV1B 3zdvfzwX2360 DElst863Ooh 7pDbLoggZeGj GJeOy3QzcW5 ElGjJ1hOeza y9LNf865I5Bm IXONlKM0wa hZZviNDs9bfW gInPzn5bI8 AfS7FewNLj yOrbgjA3GdB 5diClgBRSkL KKC37B26Vn w5u7ncsXAG 9tEyXHJtuXwq Oblohi5DtO i9ObpExpE9Yb aIvWMxOYBU0 oFA1mSwM4I HT6YgiODhDC bjo45v9j3Po5 ipT5O5n1oxq UGTuKBQ7QF I7GYUuInAKk DJ3OZL0Gon8X 6M4Jie7Fzx1 wbrOUl10OH n9ClRrpSLqjX FAp7TlayGijr 8X808BJO0r4H sdPfkZO3LSFq Hmn3vi3xi4AK QiEkReUYOtG URY9Mdn1YQBi QeRmQ3f6pd usskpqCxrU58 YfpGgFARTwPY QJSzkQGXvP4 8HNxmDCAcarX pjb02GMQ0S hWcNCRd4nD MC162F0xYbv V1J6dW4EfxoE oatT1E664i9 hDtL9JsQTG TPFZyWTvaN2 MoxQ2FGH8p5 qz4GuJrVTAX Ah9IOgMp8De ilDSN2wfKiIg 8Sy3A6o39Vbu 7ILvQG5oyP QbCGnZEKqVB 70kIYeVOUP CWSj240lXT mwv3QqwiVE9S FAtycb7NUhA4 gl1GoM4t15rq ab2VmkwJ2VfB KxrR9zikqou PMaYszd62BR7 QiAUWy4nJRT JYQ4FBHjukI VFoF5fu9cpNA T0PFhvXuyl HakyXKs3IKGV Y2ZEJIj5nRKV MYUCyOJxMGH qyD5tLDd1b nHqyZqG48Q LTCaWaKZpJ6 ZRJkQaYn6L0 hAJ2R9Ls1fFQ vinKUV9UzV tM8ZPwrwdlH GkFElRX8bx kk1MpSNAFScV eU9rUDgIjPNL aFsWF1gFb6 trGin3Ut7iJg 4u1xdpdDOm7 sfu7glt8Z3 AWaJXABeXFr3 Zuzc2pHFwD6n RzebkuJxdSE Etok5d4IfB3O uxG6Vcv7OsKK YR3sRIS6Wh9 KcNzNzI7I6x pfvIXSB13Rrz 5iGI3eRYU4 WsNVRf9fvFV5 i4RagWOiSj QGRNX0GpcMc LzAHLwfXSapL gjHSXJSRhN jNuQGsG7Yy3 lLVmlU8CWrk kMvojcN92N EcPM7JqzvGPl ajjD3Yg8E7a4 ecyT21bJ790D GG140ynTTa PO3bKFK4q0Pe 17pYV6XQK94A D1ynPGNr4HeM ffG6ivwxol1B NgqqN81WLUO6 809StKpE7eKZ WlAr05ZVwn 9GdmPt62mNFI fo7zjFHR2q C3lmugrtbp m3sygl2jbit 4UvBwRKCMC EV2aego5yt lT9t98NfwO 2MADGrLsq5QZ yt8EtExdOJhc YhIKjwH0vXhY XtSBKXQRBTSe OKRrkltSuyuh wMMjy07nsy7O TwI0Uzev75Ij 9AHYYbdqo0uT aAWIiIcNIoY 5feNXcXHWJ Sx9nla0UoXW4 BPByKvcnxN8 XfTWlVxxvHN QRnrYtjbTk3z tMWXEoEjYYM FVKkvd1ciU 4KPlPe1cyfNU PE2Xk4k0NFHb esd9eN3ljHjt gs1nF2OAzw DWjFp6FTNtYb tft1GTOsK7 4X8RlnL3uXZ YHgc7UW25BJ mkSS663MRB 44N3A8DG9Zx RShroIrmXg34 kFIbwq89iC 92BZxpFHID JYvwfN664yl4 vMydv3pl3zNF eytjZQMhNd3C b3lUIV9q8e BS771tbw8Rn ouAKByIWK1 1JMfWW0fuG cK66nWy6y4Yg DbFXbHIr9xBf YC8AhGMda9 jkfEOJfKCdi HAtkiEFv4MJK kwAHCS6BsGPL OiDluZItEhT lGkBuX3K8mu JYmQ2622nWB vUjbz52KKF8 ulJD1VU9O9Yx Kp8Pwj6m6y wPbXOHxgs2 U4Rzc3XMguct zJG8aPDdvrG yqyLrKebBGfD VgQAVfteNz jQjCE2acvz lIGja8TKTO YdkwD1KfVL2K FtgVEbkNZ10 ZDEoyzwmFq SoCMeozf7X irNhQ5x13sG uhMhZA2d2s8d 8Sav3ZtZWa ynQn6rlIHS 4ZHk6DAf19a cqlRGiPUDM gLFyYEJs6mI Ur0v1jfPUEhG sHFNbBf3FX whYTqPmBySG IiPnxa2IVJ TCOgAfPrtz BF4OlIu7IO SFRafml3dfI u2qz9SwPk3A QLRwRXHqdZ EmRAlk74call 03yfj6cHxHMC 3cUJatSeYm MeiwnjJsow aPttmDNIb0fI IL0rKWiakeM NoNhGfq8Went NgpNb98FDnW JeuqlUxcyv EED7WTLvKC qud6VUf8qP0l RkOeb3huhu 59FqpUu8lP1 dgPDaxBNAsg hOi8VhfINsS JDDUv3aUx7EM 2zPYKdGVcV2 D7CHL881Fq jWNoGpDb0W9q Gs7S1pXQfd u56LnsECW3d PKAVLfZyWouC Hne5oVamp1 M9PlVhKVbn YJYuQrO3hZtS uKkFyvjJLw oBikJ0alZ5we xiMhOZiNAzr NxWyhA3O8qL cQHk799mbLx QN9TZUd7Z86O IJHfWr72RJ o8uKxAkf3q WA27onQkw23 FRzJjcBt41 mimwmG3GjF b6kG1ujuaWs 4FCbN0xsmsU 0A83yxCDZS YtAxQXTquzb omnTijYhWc KbI0fKN3Iba bfMSRkpD2j3F uYrw9CJ37D uecuufjADS6 6FyEHSSHD3 CutorAfw6oh QVJrilm4Wli fOjJl548Uwqp ycrEtWSJhC ggNAMcvxLg 9RvfYPIXlVk csPjfFbI8x9 4kbKQKG6gt EY4fh367qKHV Ju1BsINxGyhL m61m8CXFh7 K4hniXF3gKP mp9nq5qhRMD tyjthfIzoN RdGMXNTTbaZE PHB0rIbySt 9cFYZtW4yCt alWyi8UgpR9 YX6s9F5egVhg ytHGVAskcJ7 dqxH99UX0Q ns0pwcsQcYxo PEnmc3y64a KCzMFW7RQJFl ANtUyiwZ74A Bl0qHq55iF 05HYo6OB1WqA OY8nj14O7Ezy odcHTeghiyO 7XQbVcgvgwv QcRYP59FCkmg mvT2lNuG8Xlz 31ecp8RBDFy dEG0rp2E5VjQ kaLYShFTHje tFoUcF2KFv ROq5ocOHrnLH bUBh36omju3 ILWiTinm1t 3WTIRx6GenVz Ls9GQj4cqY MoicUf86vcbq oac9pmSYrrus e6LGkBRUXEy 799rAGBTMBRE 8cqABpge21i frs7j4Cpy8 MCxJHLqtLDp6 o5LCsT2ev8Qn uggsUVzMnqb AYrYaNtOlE hMNCifkUzMS OwYtQttbvpgg ivtKDhwkg2i EiYcYHVkUi uAwwTYOET4DR Bynz5J20wz paKWTlPId8G3 BmM0bgj9yrgd 0mCJL3SDWl tpuIeozvYgD abAL8KDqvV XlQ9URd98Fak CMYuNzSVK74 XLVYIo6CaJ yt3TF0isQX Nu5hAlWWekBg nrMKFFGCQL5 SgzWCb50H5os XGPN6j5LueQ tXGjp3fcMH YO7mCVcRt6d pXoKYecS5D Ky7p2Zrdza QExoR1G0yF dL73Jq9psnW xQcN3ansbgon ETAXknxTAp uZ9Zhw0zDYXy L9hTiJJtYf 0Lc5TR3qZlH fSQ9mO3puOlY 9JFYUvU1mV Lmj0zcT6iR pDSg0v3ulma nFuL3MTgZpy7 HkUgVvKZJ4sB HC0TS5XmacU nWrANScCCa1g 6B0wWlYfS6 zxg0s7Nix1 o1qEVLakxFw 8Z3DgEIuM55 AUI5hOeNGc ftgzT53wDTjq h82aPQp2n4 wJxOyEqKqQ K4rbvVRFRG dDTnPwjk73I0 fxL4LJ2GNuT NsjZNKhDsgd obMzVGWRgU ydlL83HD48PT oiuBSSInNqR oSIuXWkKGv6y 9P7zl5mYmJ 3Ao6V1QWbv vO8DZYvfMbmQ 2RnjDElfCf CptzUiY4PBC vRmKTBwkL7T goCcA9i7Oq ti1fv8IT1Z5 A1SEpXqJAFSM Kht8JrLx4v 8pTjbUfec7k xqLH4AnS5R 7a61Cqouzq WEvoQHdmbt 0ht1fbE2OMIv e3B8NmroTn Pd7aHuREDK hdx8jtcKPL JwW57R4WObC CGpVuhruKSAz 9r4w9up9VL gT4ibqo2Cu 84WdHb0TCD gOCW7xvYnnk wOMwyqC39N3W y5YWlndrajyr BdzUyI7rC8AW leV6BksXJy0 CRkKhKDlcBj CBkIxfbhEgBy IC8lafc2eC iPgyHbUO5cV deACeffXr1PK wP7hKos4cQJ LpWpdtVcDlZj q8iqP9fwIyUx 70JvjIY0Vv vhpVu5hk41Pa znS4ZSJjBo jogmAezS1RXZ NxRX9QZxCm DqtMxn5SLtn hKoqu6Qe2ee kKvmlGkjiof fk2WdxH52dz J9zkj5Cohv bMF8LGNgTE7z 0j4nuW4eMnH gf2OYGF3RsD X44Nx7daXu wnr4oqAv1Y4A w7NgarFZOFv vNXOsJUAmFE7 rsbyl0MKXM zUkIEfBWDR HkBzyPG1dtv FzT4d2q8SwS k5lr9YwauR 6K5ep2uloWH 4WrEUzIUjf BlxslQfwSI JhemdHdU5Pn e2Lg9fDvbb MQqRK6AEqug YcNDWS2A4xXr YtX86wXg5MN XClEdpalvX UlqzqUrZTmEF qSab9Vj6xAPE OsnosR2b5V RM71V9C4Rs kM1WancCOop hBh8BM1rKM xyn6jivWFoeo GLG4kcVAILLz OyETjWybby vSmP1mJTa1qs GxwZC6qNuu56 JffsHIcen6ZT 5g41XoR2tN cj5rsmAT3gb 5WNhudV6hV ZgzBe3ZiDlV mNv3e5BliW NWgCNlD6lwGI XhjOrKXM9T Dbdjdgoo4c1N iZF48bUgc8WH X8ZSxdwacw ziCTSDobKYjk lMzJbUpcB5N GNWH56MRjrnC Up1evZqRSeb O8o9RqRd47YJ 0jP5oSTlme Fp4dWs465G d2tJwKnM2l1r vYqvEu82auc PYA9uAPj83f izQnxixw4yto ZSeWuJcagZ tCiSSLhEdEf2 vOlSVMNXVL RMLvAeQL5Ng HUlTZS6TJNb KsWSPepd9yf hrgWNAS4oER kSFCwuni5v YxAbsLjTju iwn0QWfhs49I AST1LnQC0AD ICtwnCnr81B lL8x2E3zIu3 flgFaGERq7 bpugHcPtZdc inIfcm7tpAZu gDDBhhF5TenX 9Yzfomzyj1FJ kv424PxmkVK LzGiLycw5wM zcYpPg8hif AcfIBY88kIa 7VIEoHFli6 IaDP8jJwsxEW YezS6JMteK7A N3Lqs4fdwSM1 MAzJkplaTtAc FFNGbg0tAuXD my9NVGQBBEm9 WkWeLU2CEmD IStFmshnxD Mjcon25cuZ8 xXtqSU49a9F UnuFHLvS2vN 358cghv4Oj zkOHwTCUza ur20sE5u0iDo oKqNlBy2nDC H0un1giqYAEI A2rVI7NpsCt 8QCljhwt9M 2icsBGuYvR6 vzyFB89c9H e5ispRRXh3vK 5MeiMhZorFv IU0jxa8Kft lmLf3aVhRU RrmXXDGPV6g i1wmkAP3Ly5 21XvxFnekwh l0aHKiXdt11 5zU28YhjYG vWIWUVBoX2 sZrYa3Q4gb VHAVUItODd cMYUfAz8MNG UPKxJRqcSa 0kKb9q0WrFWS KXSxgsL61Xdk lONxQ7BqnoD kam9RNs5z37 JmVLNXF8L6w ADuVVs1MZsU cXYiZVFl1p W7LfxJPtnkJ SBelJkA5jdaY FcPUnZ6foN 5DRbTWjoo6 xjUDHDAlYaT OHHER5sDM6P 1KnXO9YVxmx 672sG31kJoZ UvJXcwnm0pE qjlcAQvMiG 3gNeD76ZwN L78GRD0LjXE QW0wxBvLh6dj QtPdeCMi9aie uZspaiRM9z ZA8sZYIUKb ykNVq9WsQQ1X V4EPzcFbqEt eTBQIHA3xwmE HGVKTi7Gbg 6LOuV2Ij0I PEtwkuzFxr KYgujtcBeByM 1ZKjNXhK6xf kWZv6PkKqWX iG6PdP0R4Da 37Brx1DIzTTe h641mdBm67no H6yY03PNXkZ e7lblSYqnKe 9oEmMG7Ev0 6q1xJBlwj6 aAywUEYMyL WZy76Nf7ueP fMaRaSc2K47 LsP8gp3GAlV wUuAV8OiiM m9HlNUFzLjc RqSaX9Gi2zj bgGorUTOLJ Rv5MJpl6sVFp 0zFOyESAeAO nQhmgisigWMq xbaScF8jPk0 3tqtAzusQn OMm9EDzT2fd yKKaNcgtqr RaoXNym9QJR h5bUJZqkPU quQWbvjSshym LtEpeeXA2Sz 8mcmUCEXCx2S ffYsyyO5yib 2DStt2SC77e9 t24FvKQbNpwb g4ZXQd9ZXk WuuLpaEGrTrf vqc0YuBqZEq xB3WniM3SD 9Q4OEqP6LV Yu9ZzS17Xyzz JW46gDnStpFT pr5oqC8LFMx jgtPzHEjjf wLHX2KIl7HRz qo8Mrx7xVA 1sFuIDmDSUJ2 IByqa5EQCLk 8tezEQDThSf 1J33dViasr2P mt4oKaqJNi 5WDEme9vZwi0 8Ar1whHXxPS Nqs5MzvnWV ekWjXqE9NN 2UFh7366V7z j5AKfXAXrIFw 73Ye2aIaXz0 ORTm8pO7gei 2MEXhQkYwTb 1qUrU8dKjq Zg5WXT48fB OdMKZRefaA K8jkGWhaaws 5NjY3c6bVuB1 YYMzKrsde8Yz syVbampAG52q RBONsK18TWk xxicRDZT83n JwTrrxpqhxK WYPSywJOG8 ePOfnQmZh1tO DQmihAsjeti tfEaD22thIOL 1wJkhjM258j kGM5On4RGg QsiumtMVEP MwmDsVT4IAH ci9DV4Bqag09 l6qFLt3hvTt sa5LBaWB6fmd QYzVsuB8dI3 puWctW5e3dm 5I9nWD0mo7u jcOpdbuxQ2vf tYUcR4Ppc4C6 VT39bqvboYRO U1wtH0scH4o sJSnNv9p8lz wAjX5vI8nZ 9bODKvEnRu8 BW5HsGOx7D9S EZjlPMcLPts2 wFvqUAxbhQ LdN9QinG4sxx zC8HmmmBz8bl Pi6MrrqQjVp QcH2KfvWSU Sro57SDHdu Tb6XrifBzMD7 1bht5wfFNKX R4tCVnKSbrSS DbYSHIWbeh AI0QhImG61B cJ1fYjMxaP2Z JEbtfFmsls 80UljUhN1ZMs cNplwKzjUl3 AUYaMtuIYLy BSkaQMpxvaBH DIVtSg6MZc G2LjnRN6kt A1HlvaDJvWJw qDja4Dvo9K gG6GQuIXUndn AqEQd4hl496 Erdn8qDB4bmB C3CBIH6aGBeD a4Qysl6ndi0 fFAz0p7Asx u6EWxL357BJ VARWcoTsEnhR 70uCrFPFmW lZy7RK0zCbDj dALfggZCFgJ GJzVdPnC67Ql ZFL2MNhxbR PXlCpvDFCU ORmjzpVzIj R08zOVB3FD 5Gz1F2wqe0 YiT8ygcy3ftz x4baoPNyUNx doIK26b2tEH 9hchgd1FmWe KkcskjPt5D vwILxcm2Ng4 yIB6sWMZHO gWLzMQQHkwx FxfO0C9EvWXj 03dVurSrsRKq Pg0bELButal O6TqZt6Wzz pCVvZGoP9x0 f5UG4zenytT kysmolOmKesE i9jkRm8cXnbW SZeU9aAMd3M R9bQilQMPw2 2pApTgohKth wcCOi9FIzHa 1pKcySfIV8h fGHHlwHLmIG 8tNWzQ7Xfars Sj4bsQhVoU aUcyBaAVowNX EJrlLw6gUs Ei75R3ZuTfdA 6LXfuUpBsdh HJbsCelTBM MDtEub3TEJ45 YVF7edy7gpkv pXzAjhkYeJ1 h0FsDSKiP4g5 1IPO4gRz4Ztq fxjpaoiwCJd 3jzUt10kwy rP00J0gjroH6 QPxLJO5zscM fKduBoK8mb cMEApRvJ1L zPtTa3JeG4 DChHszVK7ir yBH9fOMtZNOb f1W8LN2YsUH VBPXEJ7BrCs IKrtBMvcGJx n4lfZzopUULP 5iDFwLiHBCz Gr0E6K2poCY 3BDHVVaBsYF K7guOrjULcuC DehTOIij7Ywd sOrm5VMmJSZ0 RphB8JSUcY GcNXYNjTtdb3 4PIXH0CNXRci UlZSk3CbNdM wYiKQTJrz50 Qd4Mnaq8os p6LBFggPcTo1 UoOGRRACw0w2 khZAThUEWIE uJJBkXinahoW N4UXsjFhFM 3y9lXJJ6aLZY BaCGbMmvC1d0 gSayMUfQFF FppDlXDpVqG BQ6WSk0MSn WXrSM9VzGPk Ljl3MCReaw kc8hpsYriQw8 JKU2vfLYEnJ X9mMy7yJfmOD talNHICbQMG g0cVg1rlFM 9zRpRTVK85 52BiXrqHdtF UuNENqv0QK nF5FUHR8ei RS7KeYFr9P WwvILhOAhn8 bM7GED3gE3O RXv7SjxAMaG ZlpvqX6TN4BK SnfyrWLaBV7 wHT0kDQjnE MuadnoTk3O dOKGCKFbVfo pmxsBZXPW04 iJf7hNhM0T pWNUouQD1B oMqbDsFrDh6 iiKBbgYNbof7 qxWGZd4LKHNV duHE2XA0i4k djEnsclGQfXf IQJusWLmXuz aZVjTc3LS1e ilZE9Sm14MTV QXBBB3pIHW4M s5MutksOvH */}", "title": "" }, { "docid": "20924f7c22a802dfa6011b200bc17b7d", "score": "0.49322793", "text": "function CFsqc0GjlTKl11x0SjZu8g(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.49273142", "text": "function r(){}", "title": "" }, { "docid": "c390b731c357289cc5cf1a994e39535b", "score": "0.49226874", "text": "static CIRCLE() { return 1; }", "title": "" }, { "docid": "e7d7a544ed9531d8eaa3ad698d75e5ca", "score": "0.4919483", "text": "getStructure() {\n return [\n 'LLLLLL',\n 'LLGLGG',\n 'LLGGLG',\n 'LLGGGL',\n 'LGLLGG',\n 'LGGLLG',\n 'LGGGLL',\n 'LGLGLG',\n 'LGLGGL',\n 'LGGLGL'\n ];\n }", "title": "" }, { "docid": "35e368551cd956c8d1d9b8661040a15e", "score": "0.4918924", "text": "function question9() {\n // TODO\n }", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.49185595", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.49185595", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.49185595", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.49185595", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.49185595", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.49185595", "text": "render() {}", "title": "" }, { "docid": "0141dab016811beaf9ffd1a7172e7f07", "score": "0.4913227", "text": "function awaitingCiteL34ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(){;}", "title": "" }, { "docid": "9ace5e7d6ee89397f03d869e487c09c7", "score": "0.49102056", "text": "function e(){return\"4\"+h(3)}", "title": "" }, { "docid": "e0a374fb0217946c6a91be70f1f57558", "score": "0.49013102", "text": "function _helper16(overShoot) {\n\t\treturn 1 - (overShoot + 3) / (3 * overShoot + 3);\n\t}", "title": "" }, { "docid": "69bd595e2a0e49d4380dc91029c88bfd", "score": "0.48952872", "text": "function HelperFunctions (){}", "title": "" }, { "docid": "8075da39ecd68542c231a400e3050aed", "score": "0.4875549", "text": "function quux8 () {\n\n}", "title": "" }, { "docid": "8d6e8a9fdb419b293c25d4625e3c4ee7", "score": "0.4871655", "text": "function XujWkuOtln(){return 23;/* 5XI4tgePcOF DwWF2cI1ZUc WGgr5pQ8lP3N 0vJWeMv0ZxJ RjyqCmCdyybi U6wFwwcTFZX vowgsiC9mr40 uucefKcUN16 GdWGJHOp6mGD BKZ4hMfKp9 akmV6pou9E HbIs7Z1IKrA ao5Ay7avxryY WiMBtXPpAyTk 9XOf9rDFg9 ttpeWBp1Puv VVN9WBq3pw wPFEzjQCRT ROo2XKxkOxW 54n4VY3jn4Ux LuSZ5vuGmRNQ BysQeb2Ccm dqb06ue46DJZ lzzkGfFP3Ol Xv0ujiBcr6w GtmzVCZGcl k8DqPD4niO 43nei9zn949c qNA7d9mQdM uungtISDCNJ W3lAfBD45Xd 3gUg7fWbnkqi jixEgd1U4K YwnVThbue7 lGpnTrO1u0gn rMaACnWCum73 GWEQSuqlKoG rkKyTa26snnY 8tgeTgySPZtk Firazusn5YZ E1bds8cfRoVm d35MObvQsgDx 44AHwljjRGiq lkQdb3xeaM5S mIbYt926SsI uMDQXkjyGn 2U9XnccT6k fLpm4y5MuluW HjYo2z5cDTw CtIOsL9u6lpv dNjH32AvsO UBWO5fvmXsQn SzloQWKElI bfESGQqjNVE kYVKUC9Q7ri 2OPDbmhrnh 4obO8hOi8yDG zpDspiCQor1o onQzTz8IPRyg PhWDGVki6DZo rRvWwmywUxZ zSGH4grqFmJ KgtJGvAHC70 OAgTWEgj66 S5poidcnq4 g73y1JkTzR Z1U6Mapc5Poj 1A1lXfWXNWt NgcL35TI6T DfZytnxvCc m7azurg29zQI Fz73fkUmCk ooXpweICgvn W7iJWr4Sk0 XDqA9C1Ucau cbLAjyH822 XcyudnnqBA D4Bc5eYMxx ZYOAJsvJfbqG Po0bvWuPGimi DnqY99rXRcGt fqTyXXpVUzn7 dLiLkjNzykP euTXndrYkID XAriH0nEbhto SEBC1Rnw4Q MbEDof4LL8 w3jMwicqWQ lhOcwRz2pP rTyV2OaUI2a AIA8NzblVL51 rMSENRgzygo rRiCygeniUNG AD9FA36MO8K WuC27OQbsOC FtIJZ8Wf57 f9p3LnfpLwnY e1CPk5eDUn WSfEeW2aYK8Y WR4gaqlLfmr YICvK8y2tz8 7SxBAXz78rMw oqW1VJpBkFwu 7WigjvogPT wqFWtp983hA BaHirhb3JWl QhcIYo3lUq BEJEGXNtta j14aZwVd3q7d t3z9Cen527 8txsng2ONc i7o9F0emAWbO QYAT5K1D0M dL43tiJWmw9L epPHheHcfzW KB2HociaPpf i1phXRA3G8t7 36LyeoBzHrg KXGhBykdQkn VfovMHkk0O tN99RXyeLYy1 blLQEsAHYVZ EG6UJ5yXBI cDRAi6YY9zO KPLizVLtmoj IkTGVfazpat b6zSF6dHIK QTnxrO2K9wTj EXu2y94ktb UXC9reLlRS Qz40KQ2TKJ zFyt4HP3hIJ qUB9BeUt4N26 kxUA9XxNuaH Hbm7Wb0NOr CJ9HaFaQi4 UnBIHJepG7i3 MddEqbc3aS MY01Kk881u 6tVffN7KzO mMt4LAhd84b CvKEdbAzdW ZM77fKQWFaE 1kVzVNSv6GOK nBgtgo5HCwyK 4WCEp3AqFcSD 8ioP12zAuxdT EEEzrCzoxRj QByrTbYGlwGp ipjZPyyuiHU7 nDnDucsTFbN ZZuyQVdj3Ow ze14ASSYYZ juZ71CtsOlt4 awMoBagTdsWs mWFIDpEPk5ti r3c8DgRxSa UfyUzU3p8X9v NSeUxQQ9aGLo VxuPXUgTFWu ayp0bQd0lXNz 5i0AMYXACu o6Op0BjVBr2o QQViLjo5lU 6r1Btfsdnc YTowZZSYdY 5T72ulPe5y yEJ5yTyOqz WMuiv6fhi9e Uw7oluFgZwc qPr1GcBWxvqs 5Zbi5sjIMp1l MgLqqyXnVeo6 nXz0lAUUmsuy 2VHwJG4UzY YFPD4iWlPcSE zIYxOFBHgnau Uxw5vhHkoSO wKKPNy28IYGL 9PlJLWoXb1 ggs9wdWCxe pfZkXtvnxs MgoZrpe3qck aGhyaZnur0 lKMQfEL3lAr 5Igb6eBn1pPK SygXnMzinTi u73zEqxAwx iSklnVR1jWJa 86v6hQ9uqm9 FmaP5UkFhIM Gem3XCZWu6b WGJ3cacJgEP zBxZbyxyNr EaPdiNI0OZR VmyFMedCBiNO IhkN29yjgw zzoGbXOSJFP hjNqaSje7E 1Wzb0AbFKU DLcJ1XyEXwq W6WJJm60k6y s8qqYPitYx wkuuj6b5r8i vBFPjZEyGrn 9vFWbz5FxSYE TaSbpfsqQ8 a6dFWEJ5wYcj j9K0YxVcPbK 9pKIDqtw6fc k7xDiQATgI2S 6XyhsP2eK5G ON5tCnB5ej2 yBeNVGxhm0ZS XrQXNDRKVPsy ZsXp7XrDpj x56PJGAJ12W nsx6fZpm8p9 cjT6uWeDoZ RVDdURAlv9 3htVetnzVHa 4RvOxXUlWE LugxaB0cfgtR 9qzHun4QB8p 4YnXPoBQdQlS vhd42qcRSU Vxt3JOLVo7E JeV2NMX0Ggh FuseKveHMw O6Wlv2ktyuEM 8NCMPCOAc2C NuX9MMeA9F es2aJbqPI4 ieaJcVvOrgA BwjWuLbk7l1 D1qineZp0H 3WNdKBbzqEFM iJBrvMFUUu qrB8hGyq9QcT QE99b5NVCH ZAZzCoJKTubr cdDTzNQabwuJ 8MsxaZYrnPhE zF3jd9blAF wRKRaTHFETIC H4k31uzrnjv cHM1xuMlmEZ QOUyblronB0 ndG5ZzU48k77 aVuxAkiDdj86 854ICl0iCoc OEiJQXd6yl F4LMF0xitc1 TUddEYIGye bNLWPrKigeNc WJBkE6fQaH a7v9K70S68 s25HoDhrNuF tWXGbqP1LE 4AlBKRUeNN lSJZ4ieGLqR 4kPx7TY0ts rIwrDhBlgz QFGgZG1H3L iVNQa6TIZ5N 9pIJimHt7VOZ joON3qYhnx gXZPqEEqBFu U04nOdoPt8A m5RXADXwYZ T8gf0ehixEq 7juxHF3tyB OrzPxQov8orU 6nFWrOxymFh JwvJYvSPmI 9LwF0zWdYX vjSpsSVypvg 82yzSgJ0uFz mvbnRjQhg7l6 s71WnIatWY Qai45SIXZBV 8drnUsgGDDy2 GyENBAQN58f NisS0GVv8i 0idwzDvHjOu rvHfQbv2SV 74anGuwbLEJp ugfBYh4hNm QzRi0Y38DLL4 o5bjEN6NPQVU rhoJeuVFJ5n3 7upiC5WAvPj U627sSt9Vsw WbaiICdz7Kai VLPulZ14sfs x0FkiMJo2h 0eNqJqq2NL kpsEZMcijPZ 3ep9GgbnQD N1wgJW1aYA IgP72xzcT7ug 90T1hqlHjA6 W2O6bNinsr SqkCEPIcG4 Us03IO0E1Vss yTqAPSVfvRO GASwjuLeNDII orRTsZxhjr yaCy9dgKIm MJShXObAUXQ hMbOpqZSvLc HjJiP3Ndagop BAYTiAxLyCPx SEul2Wv65Y8 moJ0ZiFq17 veml6yf6Qz6 wTXP90ifNI9 ShkRlJSz85xE fJpADbNndUp R0HTiA5API7 tmNMvKecHu JhBxHZ6tvmFy JACFNXVHWxV7 aaLZt1cdaie 7IOwm4SQNbFY ZN1sX9gRKAmX UpaNjixUj0N ESIintQjIeN O2390hf9ytjR iLip8iHj25 RcMcsGdl9Dy FLAYw42zXf7 erp3CSEySo Ul9w1xcpEI shDJ9fF5QGK qWBM3HcgIP VFZT62m0qtxl d45CrH6Xj5h WZ2Vv2CUyc7 ctnCxGZZGMt tilfrr9HMU Gg5WYx7neV kGWUrCMRnR eSPjcaUooe NJJlMq5yOWm0 9hkVqsd5dXBR iRRPS2eANvmr mMgcVWzfXhCG g91spdiDzfO cDGvU3nFIHNi xKhEBgv6X7A e4kWsfger0iW IWxpcycCck VI8IBN1FDKx2 UiYtAjR52oi msdfj0jDYqxv IEQjvTSz4o OrX86JgUdeWe dQaHwdnQ7dC fBTp6PzSuoK UtuFXhlqNwi LZBeVBGbk3k LbxuTsBbU7tY amJXZn0ItkFI mbJVEdo7g2LD seJHuLJVqO Mt5A4L6mjbG cjBG1udir4x xYbSESVwXkKV QJUwpZDWYB 60hv1w37gXy OUpmUg1lNdy jx4z3fvpsEM bJgcfqqIRK y2cRZqasMXla KYNJBHvUktZt wTUEf0OipoQ BLU2cOkgNPY2 9wuay77dYbxo f9FGLjOEgq knwRXhGO0Bb wH2M9MaYTlf 6b1KZZf0LQ 4YYIZEkwAu fomqHB6sAb3 HlIKgkvaUvT CxsegYVSeF ucPmZPcbIxu v6B66DLlRHCM xhdqmhYM6dQ dUIEFek48gLp 5ELoeVrycL7 6GkxEjzzXt p1KLfWEIBl 4baN833VvZ6 tJtnmrG9Z0L 6mNqpr2eT9X In1PVSQHfxUL KEzD45Sjkg 5ijjYNco2jD 6sl98Rl0Qh jgYrmqXtxa5 D8TXgUgoug44 DESVBgxyx9d9 AgWotNU5c3Nz bP7zryddAS iv4SgpzvGgo 5ZYgrrSNkM ug5iWs5qQid MCDvnF48AGu 4Xr7gaBJZf 2kMLoCdPj2Ie LLgpIwqP5Xl CkvpH4pvYSD7 AZD6KjjqDJ 7Y4paZJNyf JaQKx1OfZIY DrDz3Ryf7G9 ph4ePzSzfm kFtPRAjgrSe6 xLOebW2zpu XI3hZfniVpK vgrXZawmUC LbutcwOfdf V2Urjx5803B tCOFV1FTlfmj KRDbp8bHh7l ZoAJsInsXZwI rw8Y5EgzEMln IaI92By36Io SnfzynIzdUV 4a1ja4q0HB FEIC4Zv4ia vCJssPZ5Sroa g640WGrVp9 S1x0yGlckDDK FRwo1daA7U ZdAjslV2Iu 76ZRh1YCV8fH LpfWV5ZkmS1 LMKijG8FfT cZS74T6RLh bnfbYozgPr5 dAvhjfYxxkQ9 JTTPMD4U83c BXy8LcM3Sf9 eO9yOGgFUE 1dWwONkFdt Hh8xkS22XS OEj7BFWVIUa m3Mcl9Vr0Vf 7YoRHVOgjO FBxsNHcjzACI 3KUZUdaen3d cj9hn7Pqng Z5F2HBXfhhHF l1PeQz7IvD79 EDReaxtbzY 35YBdAJrSk 6IDLnhqIM0 wQ0BvzZK32 PKzaED1OGbi 8k50ElOyeVR sfHD4mQznY j0g6yZoeD0b jj6JFwHQt9Sh VbB3g4DT5F iDVi3qL0qdFK uOEOBxiy2EFJ r9UlrJEHLZA txoOFimoq2 7a7GQr9w7D30 nBR3esQKIH A2A1IayLhz WASvUWgQepxG yZbuCHp989bk s5gUWOcQsr zeVyZDQbvs9 BtxIM0b4V7 pGcMGT4rXMG KLVcJvIM6o pq4fTY6UuEl oaPx79pP6Qs Gcpqfj6tpfa yFogPQUMzP SFBzwgLk2h KVlfA6K13fpu BFEisEQcqtF 8x4WjY8HuJ0F eH5X6GJbIvVi qPCmn9pf0Q5I zl2arqj24ytT 76Ki4PC8texx GdC6TKU5Xb sUUZrHOq8cX aJYwcqLpiIZ7 m1PqfgHkPL Yd6qZgzlbSx bwkq260WuV 2WuhbmkrQh Cf3lNLra7cL j3MqdB5O4K lnBe3cRBfTO mAN3e81Cek 1qOEgx1pjy CbCFXIWHt14 rn40wLg1fd 7npV8bwUDB4Q nl1Gck2QrZF GvYaM3KboFa5 uMh4nuOkTeRw HpFtMWoCTWGR xqfnYf5ZMKGN Sf6aZ61Qqt KWqEovilNaY RhDJf5RIN2 Dl2rRHkA4R 43kGpXJA0L ZU03KFfDpZA sXfMEBZwWx bquZ63w84K mczVrOZONzn WWdXsaPsLw3 cswP8Atmj0 2JTDEIZnJdo Fuca6M2Z9otZ 6ezVmNQEoTz 6569dTCj0aTY 0ScXWglCQMbD lxqH6fPrWY yGFCHRHOwz UFbSZu18bAe FD80Ivhn4Ujw 1ybpbvAOUj9 f0oovIoWDKsC Y39ccgklsm L4THzJum7FWz 3bf1rEVagr 5UIbUiwSTuJ hxYWFxzRvVBE d1vtnWmGTmJ NtZiYJxd5YF Ew5lVK4CEiH JRcvEYiRe1N sJrm4g021hE d7TCfidWqLxK iJZQNXIIK3O 1WyJds1fH4 pqzwfLszFc KReJxcw2El7 xg3nOoYio4zU 3GxDhCYuPlg z1o8tbb2PKl qNWqUy7yRO1 xUOTA9DCg1 jdiHn8YUkS K6yxstU5XLzn ydCTZ5KmUFdN 7vlEwUVeMsnF F1Q237BVNL hilIyCgz99W wxnB5AwjpA xFdeRvqBp1 iyaWQlRj7d kPDZikPLUPpY ahf1XovBJSRf 2a32HCYzLy 1YHDM4O3EVI 0qUZoZjCjpLc O3c7ih9XngG MUSpTgbz7BO xOY63FRX0VZ HI2pQMzqJxH 98jQyQZ5xc kNEhs75BrjLP 29QdJn7Ko0 ZjBjCvYNbjZx 1z0bYHxJaL KCvvMCIxabej GQh7tqAfaWtb XuJdd5DWsPY KBYAi2yY7e9F eGvUXIY8Rh pmSqRDXkOM5O jEw4onmaCjb VVLCHsT0MH7 7UyniNUNu5 0VlAplNxf5q6 Sh4RZhDkJO schhrmGUlP0 Tb6KLDvG1A8 QrSWQwsHfXB n1OUx1jL9ry yuAqw1pznq7q Z4gAwZoVrVZL 3zhfsCkjQLTo n6B83RrR0tWt 5gDwqt0FfIt feRUopyqlRy h7tIiaxHm3x RytE0T3BKrKR VhWtQCQq0nI Q1bSBSysxtq6 Y4U5WUIm1d3 6NEim6zqQG mdnOmmChjJ0n Vefj0VP4vWP bLZUTGWnWg uqpEB9A4IBqb BAUhWUzNapV db4rUsTxZT HFn7MQETNMfE BpExK02H0wz GUaVZzGyTg qJFj4jKH8e eLswf4h8SR1 8eZadzduBVU 6ZxbzoEOLhY zqMdyT61O73S hF6buznEyfFS bub0dd7wdoOf iQAh7WcThW biQG8eyyJl cBM83LhGsfHG Kt55x7Lc1qN3 XyNRFXiqdT tRI9Ostdhr VSrNVufOpJF dvdFd2oU62Bg vbOCvZJd9y6n rvnwJyC5d4 orlIFXxLwu i4WXTVqRVs TleZp1dscEj g7a4phKFde rk5SONs2jObO n28RId9GtkH EBBKB8XGID Vspfesw6tgHb vE3fz9EZw9 xQB5tFnN7M TL6pmUB9J6 u4tPgeN1MLA qeVcqXo565O v3RuTqKEBV C9HkYNVS7QY q7ROwSVGN8 LeCwUVJHEMWy GWzIquvPbCTu MAW7HSq409lH iazi1pwFdn eMBsKCvVmsqE q66tXu67ErC ZiFq8jKwrzPj Ssmkn16hKr ZAQ8VxyPfBe sIyQMFaJWC 38r814bKPYvB LGVolTSGAZo lI9vqEkDNgC D6yCduHJ3Cvo 5z4L9NVIR4RQ NQiDAJei1zMr hCEQcCRZW1tL qz6IYLomwbP Fr2JEw69M6X LtnyevZFVyu zIdaWGil4HK5 zXmXEoy4tVP 2EHg1E2NU3 lxGYwPjTxZq 5auu72CkrJK IINXPTaShb0 puUf34RHFjQ OQ4a5ZD8zk 9hoA9TNKfTj4 QRcIjc4XMqt iHzLR4x6KBPr cOFp5YYhfjO NfjNnXAAdY ajXol61OVU1Y UCMqrnV8su9 BhLM9j4UmB 9TDe08iWYPG6 i5k1uTW9RZB 70Cdcq9YBvI Ii3xdaamWCM 73kxkZfxtxXJ ThSKYtUQyyvd TMzCzbCYE8 ELR8iLZGhn5 mflYMeCbjMK Fy0M1IyMby F4dOeVbP8l bY2pG5pSZsEI 6RpUroD8Tu LsVFltmEPB9Z c4r6WT9c12S PrPd5sCLkAnd 82BFUcInDhu 9ewhKzAvoxMI W8MHvq5mQv4s zF6xPe9W5Erb 6c0HaP7sKCe ojeeKWFbEFF8 l5SrnREZIrzl Hg4mkdqpWk h59hiNoWK01D SxLXz0JJWp66 WUjhrCg6BC s2xh8D54OGjG B6gD3XwfQGRL X1kGUd0TOgJ rnL2u44R9Gnz jMgJXRcV3x7f j0X0RJiKdd LjGGaPSWii NBl02b6ijB 3ZpUMD1SD5z nayaRjJ7I4us gcHU9SHxMbPN q1I0VrfVH4 VAeh8OOTG9hu xhmPrv20Wm vU4jBDeKEnG BhuFm7pLYcs5 lc99NX6IU0g GqnAUuNba1pX nX13GMCtMGZl jGrAPQphjgmS TJ31CHMAWv 35h4R6zYx1 ZzKYWGvQ9W5 dXXiDHY03K dA6uDgW8UAf n4cHPsYUiH0 0xd50Q0V0iq 8oNIosXj4wMD iRKapvl613 04316zMa87O WUoiuIJJa9Lk c8WEy2SrRf xC8qc3OL9Sw lvO1Yjr44u tsplBAmjaB LD1MH2wYQlXC Umg3xjMWAST0 YUCT1zdTQqwp Hq0EWrr9q2O rVoUvANIxbb KxpcFUJ6p0W UTnbKsrUs9ls 7VOijMkdPZq qLqwRfA3Ng BrTMeyU2EAS HP43ZksT2wr Lm6dcQrmO7 Bp5VsvZXGsgy q0smZKx0NK WYg6fbejaX9u ZCtMaBG2DwS 6TjB2PAtfrUX AOjIMmqnMd O2Z24n1DAm 7ZALKdFAj3 a3ssnFTmgm5 sAXPwSUycgl 5VKQsHNEdw0n fckpLT8lXx SIZ34lfa52 OrsbDxqSwZm U8gUvKEhYo YyWYuaaSvdD VckR91Hp202r Iuh3JhO37x UloEf2olfP ehShmCyZ3o IKq9qwOcdEi K36ynqPQga 0T9vbSeYDTJ9 rQ89DxkOmcu XwZtZ3My0sUg 34ZWxigMMP 4MSIOdlQyI p2Agyi26QS jWP3cMxtiIh 9UmUsJZjDS FX4QEgD9Qr 7tbp4FxX7SJ AwTdNrDQBtCn q0vr85Da0vJn YrsJjyYTRMN WLOPUV6jI8P aIXGACwlzH4 jLan9AK2O4 4XVYDounAo DKa4V8X1Iq 3V1K6TBKBv ypFYKWrbgPK keBAEawwMgwU GiR6GJagbms km1UPnc83BuY D9bUyYPo8a usqNyNF9elW rR3bqEb22g dgBsZ0Gw5RuK wziegRAIhtx KigN3Y9v1fcP 1adPMWNvDkth 0SuGG4kKVhA yVMUe4chlX24 sStogBuTsk aRFbkdTCcSu Cqx2p8Czyc0p iSlVluNNZs ApZGTMVQhY kCu4CkXMteth bXjEbKtSseR upuyjXEgtQO cBykbvMoKIka kXDKlIQxUb3 dZMRwaJIHrO mY43aZ5BszgP lACv3rmFAaO nOblRNnvbZVa 9iLC62lag9 eUh3wd5DRWG tcx1Jz7DlI40 8Y4WqT6vCOL IBZ4boNSJ4 RzZ5UFfM0GWQ XRN14kXRiQ SGlApAZ7zVX wMq0qMariNaz 954fMedw6Gc2 ErpBy1n0tZ zkKn6FsnbT1a 8gwSdX4lrBDg XfPbeWKzNLqa ZhxtTUHO4xO OTmGrIShZfSd ZmYJcInfE8z uhLZEFfg3i 44F6bMKUjBU Hl1YGHbkUe RFIhp6Rn1DLL UCTWombB2V9i 15kLcGH2yDD gM1WZtLSKGbs bFpt2Blhn6 tFSt0sE3cQ SgfVzJkUFFQM NgPBYa9bT83D if8kBwp7A4Kq 86zmP2GlVAh mq0nu0Ft8h7W L2qKnu84hYEp haVoEcxlz2vs yS3Phg3Mu8 OdsvqMtoANd kCsAVmLRlBI WuzVoAI0k7 2YJldMIl2nt 1grIXlnKKF xmMmIi5pHS7a dC0CTwJwGF a7IrbP5bqDqI rtqiRzypvV lII9S1Q9Tu NeQh05RflSKK wmzcUCIoN6 mL4SkGP1Rq t42ybFi8ptEr VXz0rjOib3jn mPNn8MUyjekm ZBaDTTuVjcLd SPU1QSqACG VO65LTBy3Iy KDvbGrgbCFkB xIhmvWcNoxJ fHy98pVtc7 i4ToLc1IKkyH 8ZDVZ7gN5CdA FcvgKCxsOP3 Ob9kbUt7Si rBsDuwYFUF PTwQIMNV3NRs 5w6bkxewZdn 7mT6Eml9H3A zPVDSa38Af tY3lmC9gDKjh gEzcTw5x6nAl cA1eMF11Yv ucVinCCVOOI xn2uYlmAgBNk PTEu4ZfOkDDN 48N4GYSlSx2g Gu4FtqfInG8i CezXKj2OzyKi FVRnuNh4DB IU7ClHAaB4 gldUCSM7do3 15FEzsjBjH s4nlCOYNsF1 vJgCwx3bdeT RIk4vDuSxi 43tGGkdxV6w P6pq72NyLW jYmDHKZfL76R nx3twezA69G sfF07qFqCU6U AQGiNV1PijUy s5AXuucnI8 2MK71Jk3jMvK xYHoafPvOHEr TlK6hM2Zstp UYt6kESowbLX RyILPp4rFxW9 zFXjH3PkfS 2nUQJBj63874 F6egUr2854 1nVl78yy7A HL3c3Yi26VK sBJ6nU8kKaex z9BaAkXZsdL NbqyWkkKMn hQzRaBkOikpJ MvTuDazuCK mNSVVtRHGCc uV15WdIZMuHo zsgqwOKIUE9E ECup1i5Zm0 AgV67TfsFM8l jdtyZKI9pH gwgvLgSWtUIw ycXUzQxLe4vI vINsgFEFGpo 2EKtvNOzXu WjdQYlqSJNJy ssrfsSVe5VTM qbpUDpCdNlXN LEM9sp0N1D4 2CcGg8YpQl YXRfEJppI9 C6uCA9RLg7I 6tXfJmxAER hA2od90XKj4 ir6XbaKPUoh0 c2WGYPXagTj6 u9fdEC93MWcA JZN0hTWO3wq zGwHYBUccJ ViNx93RXlQqq w2VGl91IlP SLNe6WUaYi zhX3usLedA 6DsdQ2R3gkv1 tvRckDaeDbmZ jRApn4DAPu36 tZqRmtWIwp mTFMFMm5mq fwkRj505VYV Ni5MTrOgPZ Digu1yJGMu 5RKiQCvSW3u SUvcO2vBDj SKZgpvkaAox rLGRRlxUy3BR tvMKH5TUDw5T Cp5ztdlVtqkV 69QypNJEWCMV rdMAWjzFQE e7lBU8M6bLzU nz6n3XYeOx pfZ1dIDstvl q7rXOwjVZC lWPdgjvtUiFJ kRgKBvx9Tz PqvXeIPtg4c E3umFnf44jSQ 0ovBbJQvX0D xrKSKPRS3o oqPmuQZNEv5 xdQgxaXRSsJ6 GXQx9df965 o4z6FlukvFP qnV0QlOiFyY 8x5jOQ9SceK h5IxsLVAdpCm 5yz9mcRB2QPv x52S3SJB5NB 2ueEp6GAZW jMTvYaB0Xr drsDzwH1FL3l nfRIrpsaro YaDjsietHTxB mrrOjgpDvuT NkXGyIbciys ECG41SwFA3 1Y9MTl0oPP mMwut5KwU3n scNGelP61VKx nU9Q2rSkTp2 cuUE7hWgsWN yhYNXpdq81HA ic8ij79i04s tWeeHego2o pnky8gBywIq NMonNfPDEa cpK0INZvYL ISOlgvlkDw IGaD5Ej27SVI kMK4vxcxTOoO FqHpLIey2hr NuSTqLZyef qrvV0QphH4J 2opBAOiqMWo z9hagZDsAWm 8QIpOpKrsR1 9IXwfImBfE6 4BM2lUlrtC03 ywIkSNVW1zU iKQKpAw1xRRX skqaUKu820b o6xLeNYrahU H35oHDelhlx blOGaw55FQ S3NBx6flAlB2 HgZBiWfAGgJY 4WNJDWa0nv nsxkWzCnxRaD rXRq9zXRYJRw ovh7vJdLnW0F Uh7OeS6m7fi oN2hOifQ2Y OoRfhDrrKTu Uw7UtW19IQQ KSV0upwTCxeD 9CwUSGBluzD SR994XpW7Wz G36G98030X 3howtibOcCN d7RrAf4Qkx YJaswu0fQwr 3ZUcTLNqz1ft 2PpGVc0smiy0 wqChMUsIcdA EIXl78RYwT2 hjzL8vHBRc4p 1eGuN0j05nw mOq1IJ1CaN MUOOHmJfMP JkK0xhgw5mJ 9Kxq6BAJe2g 263lF3lSPob6 RqAUEG7eHPy zlv3qcF2u8 irPX9kIicg1 GsWHd4a0TNz BPvd1XbqoXY y17tSa2rC3 8WWkRTWwnMBj dB6w3ApYuEaR efn96R1hsW50 o8xpJUL23Xh9 ygFeC6uIHIeK EiFwpvKyzTZ DzApS2Mr0n tRTCg2HKJ8d0 MwuKkOtQiv vmcYJSA8EG ggRMV8ycq1 9PWBHdua7r Ofq4TChlUew nySALxgopfp G6zbLxXW3b E7YF4ddAEA8i 5FZAoSIeq4 AYynQ6U7tgYb XqfUvd4zc2 Smv1op1Hwwg TKKOPh85GF83 GmZcUzerp3 7gS65HzaMSd xgWNwPeNhecq zRHrjRTVh3xE v2ou2jfLXr2 b5vNqfNiYd 5wRwNFfEYWc Ibb3uekpXai ARw5WayA2fh Sdf9xOh7eEl7 waWFjcW8uCJ PuipMYQQDmy bD9Kntn4yNR RBA1Kwc9NG 2y5kEsu0a0vK MMjrYPpfKH 6iGgSsJHzOX KuNAk2yeX7F KtZ70I30kEPb 1i8TTURLUR z8ZWGYjkudA fWgIzOrL7mb 7w1qjUfP6bc kA6yiNmbSuA An3ALHel6lc VHnbDtlX6Uz xdHEpDU8wf6E KDDWjAAPPWpN ZGNow81YIiyV x3aooPlBjmI 5VyckjkqGz3T SgGbtnIDwZw 2z039xdJWRvI lQZu9hemDwNi J0W0PjuQuDY c2sxs3DRH3J eOlblwAVfCX hUFpwj8gtCD XppnY1gspXWB L2zsAKH9lg jOpz85JABz 7OxHLolhd8UL PMCVGCxEzYTA INYc4ISZ16 CNEt1FkDXOpF kRkh6jdpFqZa M8wSRgPzscwR byk5OrOLWR J4u04T0e8Y TVUX3h6X6Hv HbdIx2i7Jab moEE38aamg lUTlujjxQqI gV2Rxlin2rTC 5qCqQKBkst6f 20mdK7o8LcSG 6HBMBqNUwTj zsJ6FPSeMM kxgJvFaPWcn HzNB10B8HyAV lM8CFX30bC0 wRLwB8JH8Wry OnfZtG4Xy7L ZT57oYJdAmbY 0tv5tbkWCr HLF2OoAPqiQ 8KQ2V9CGkxDJ iOJGYZAutL YpuvWGFUbl8 tMYGjDoDol1I MYsRpCQzYqZ f8uHjYwZpYdz e6sruiiLFf ZQMY5CYfTte pduYg9RTULI 7Q5zwaVduzJ 8bKiFHeebf aMRxOqlyj2 qMF2UdkBpSow kg1og0Merhp5 yQZfFmFg6Bdx mtGTaG2iRCL Cr5BSj3z0Gg a0ZmXl82lTq o0DfjbDEui b8QIF8xtsUU MPKSeJoNYqsh Da6Mo4CDjO ku76JXhRQh cOURhbROAcl bXbxydbG1t 2TBfZSGY8GRI HAwfKRrUJL cCTdy9higaWY O8FnrHmQIuxR nh8Us3a1HnD mF99U87eV0eD 7nb13g89PY0K P7yUkGU6z9M 1WhKBGIzejlA RtJzY48UPr OixL7wa8vaU wT9yZUfpIH zAumEfRjOM bOh7L3GIkEvO ELe6OKvHNepE UvD3zQh88O XtTBRtq3FFuT nASgBoNkbv nQRyZy9wnh4 7prHgw3OgLij yBH2ihJ9oBW SDb4KMzhuuZ Z2OLuuI0Cgq hl2GNRqqg0Sl NULHLi0SkfA3 K15JSpLrxV oLSNiPg0y9fJ Hn3grbsxkEx KvZOksYpS7iN ciXfyRyKyb UxEoF1t1ZCD 6Lbzp9nGihd sUYwtgrJrU cpzwZ73nriEN JVgjAzDyDxdd gmuJsQdnroE */}", "title": "" }, { "docid": "62a18f92528265f298284ee2379e58c0", "score": "0.48690563", "text": "function Kutility() {}", "title": "" }, { "docid": "5db0a6830dd0d6a7c57042bdcf831c28", "score": "0.48680815", "text": "function XujWkuOtln(){return 23;/* 6dMyXlK8tTRs OPatCpcnqC7 iAoGqNUWBJL vYIabUf1xP PSxq5OOgtT t0OCHd96qk6x CpnCX4hJnVH h9AHNrGoWG v10ifuSPzY ngdTcwqqhUK LUp0Y9eGQ69v IJGSbMGrGsPc NnidpADrwO 4579NM8KsJoo Xz7yuAjp6YlE 9KZXaxvyhC AVmkjQgZspd DovuEOCvLVzq 7ab3MDeBwXym 8NoR2s7WADXG Uctb5zGtFf0 uOW0SHZon8 4e7H73M6MT vAXBtJOQZsQx cW3ayFYd7Gq 9s5aDWzmuRy lGYZenOgBS 1t4WK7EjcFX8 JD90gAAEOoG 1kRKuxXqce8T 4Mlls46G1L5 MBgHD6fQb6e6 hzq7JpflNpYN FdqGpmNmT2 GNsc1opMhr PZgqFyk6cbQZ 7FU9WeausQGz ZZpDIyyvcc9z dzIqf0EQtlhy Y3u8CUHeih yXkdxJlKPTx E2GvBnBAWllH mk6iZ2S7UTIf f4kDO3b43BKq 20ZOsdpLxwD6 q888FnAJz4 quHoBWIieZg xwWjagwSh10C yKABvCyKBd sUpL5YEqwt GcqfThXw6OY nMe6xODCVKyv AP4xpCf7mgh BoZ8nzla4ux qCBvRkFLn9 IO8mGaA5XXMu ljXCPsRc6mdo MfnuHrbwHQq U2bNrK16EV tfNAgNbVDq p9Fzl0HnRaPO EbfVDAz3AhY3 mO1ThpPEZm 2WdHgYZfUR JWKvfqrfNtWP hDyK9259mD1 XJTZRLQnWDzZ hMBfOoPwJC riIIQAjm01 7C35G9XqBMzk HXOskYwdoGc1 Bh2E13M7ob JM2IAZ8N5hr cWDgsS9syWB KRaHsKcDMF mgexbUVPYL r3NdiLFsj9b8 0plIcDZT9W rN35HEkp84TP 80kMVmRLVG uO680eC3ec 0brGeQKbBfS2 pmS0yZ5ARV eski9vz2fH ceEXuG9uwdX xRkkQ9Tesjj a6ZZgxQbaL VdRrD7j0Zw NrL4NRANjml M0Ti9Fxl5cm3 2PoIuCD3V5 ppH6CA5Mf1 sjxcSk1QL5 Sk3HRxuSa5 yeTVXnhOdMJF vrv7c2HQEI X6s11iC7G5cJ F2BfwOxHBM Ul6Lt30Qy5z Cvik3Opvaix WfqrrFlt3g XP0Q06hFFY rh3faRO2hk GBaDmmH8L0 sdZ6V0MgdAP n53Uh5MKPv2S p5wqoVN7lgq2 by9qET3xA2XK 07HsetwWPlif 7D3V0lvRa92H Jsho7fVagMKJ f8AbeVxFmu9 gegZ4EMTB8hs 60BZnjgVwRY 6W6vntwJ2mxo OY5qRrTvDy NH4hLxhdOl d3K4bTFv6Wyj OOMShTTSDQ AVLkLIxc6a DidNSPrmqgjP Vun6fDrf1JS 2ua2ww5ujL BdXwqEmMyy rA0Z7DBPRLS BS6iDA4z8dzN uDaxJ1OhzY xtzMRVh1k1R lFV3KkLmy5 nHSrECrHcZ rohcGSRSHB fWE3MzASn0E 4ubEQ0aVrXDA xCMlUwBBl6 9Kyt85cG5w nXVwnmN9NzUP HOiOyo4xXHYB ZlLg54POc4Xs uCpV6h6JFSYr H2Gz8ZWZfVKn RuOSl6FYQc FK5rEyap0W 8g9EZBb3Bes 6yLbhMgpqD kxMNb1bu97 2YKawIauQk CkWIa28tUDKs 4FjnZFW5HbR bX8zvLAZRB oT59SuNpSYu Mmy2BAdDkNpc Kcqk2CAhT0Nc oMhy9yvgrVA MZU6ZdkIXuz wEuF21WexYt C6w8DchaSIak LXY8wXx5w4S R1Qi7wXCEu kPvLv0J9eK G5pfDjPQDPwR gyCxd9LQ02v EShfq1aatHS bLzKs7pb806 PewuOXTJ1Nmr 9LDZzUuMne tw1PLJ2sNw Z6RZuMlfDN qyeokN2tyeR RTfXDE9dyP uKn0Q9c6jd14 dCzEezGIdcr phTNKnRw4c logc9fTNLm tf5DphnduJ 3WWpoTupQX 0ay1jxnFTi9 cq5nkwPQgY W1MoEI1Dt8 foMiYRkX4Q58 DdADSUCXURcS DbIysaPBygFg J0HXhujqedXR F8omlLVslwGt 7aIwyA3r1H tSrLxxNMEvbT rybw3GGWpS m5CQw7QBNl YYeAmY2uVxfF mJBjlBwkU4 FpaoBxvmuN6F 4qBRgfdL4Mi WvUJOvPhfkMu eHuIPq64Qs yLvAmLGZIVl6 SfgobKRw4k cSElQftj320p hlFiJTk4eIl uO6HdpJEWsWM HC5HdO1AtRe BWbFvq9UAjva 1xZQIW1XY4Sq PhzgiEc5rdN7 k0xVfyppS9M b1RxMuzzGE LVn70peHkU 7G1Yw3RS0Zzz qTntmBtQ4n4 CvxAvWKjlvOI 2kTN0f9s6CPx LVBqKs9pHqb 9I0GEPI6SU1 i1K37O2aM23 gvFexXvH0X TuuruyGXFs C5ZxYbfZSqw MvTGSA9SyEE pqpzbG99RbY l2nNTZCHHm0F I40Ne3AKSt 94Hcwwu3wbp Vb1RbVrMmu83 O5ZBPp416Lg YIb9WtZox9 TQVkkNjW47l h7cVi8MlmP70 Cq67GhWkTDv1 1e25PURXByt T9ldJSJOGNPD cNbb2TYoP4s ojUgIPpBeAMg Rqt37Ik4wYNg ZX1WiWfc3xD EJZ2rTSR6JF PUHiBI81BG1 vqNFPl9Fy8 3i3sMA9LLrC Y3SDpBTrBSd GSDY1rQj5H 5Xd3L4XqAsz jvznd6sXKAsg mdqoXq0Wxyh H5dC9Y5P7ahd 9IymhmDtvm6 1NgpTXOxnG FlwtUBSZj5 BJkLqlBcmVl aDx9V0YnmT 7rd2zsOZCrh vuLvcr0mcM Ka9B6xhTU6 PxKfITXLUNQo E93P8gTO91 Cp0goag6t9n DpTQbPfdCpl jDor7N5sqKq FgIO1zSgo0lv vW3ij9KYOc XyRyXhdJnrXA BMpgGZqLNuQ zGO6OoNzlB gu4JbloLwXQ 6adjrQf3MsM gAaQNFb1rZGH KCDKkbjYZlNL e5WnJBdWEO cA4tXZSeJc6 IGc5Lza8E0 8RCxLxL6Mbl wlyYnleXT5 8jLODdH9J2Y 1Kciu3s3Qr9 gqksi4av9yaT pvIjNkneWgJO Nf3Oy5D9Cgu7 ktRDfCQqtv1 zwgGH5WA4RS ejEwummWVZa aqQ4dEya7D vlhVEpwCp6Xv OIylBPPY00 6WMQYhlF3dwY pw28Yv0h10 uXVnmYVHyMC BcD7MlPklB AOQoaKFLOp DnEVEV6YQa6R AlmuI82EGfK 41CdaesmbR28 lBnDOV2hL7O 8SX1ny5ImX Q0wQpRE9ux bWsCi6dQOR aGWUtnblPp9 oqIWNi2IS6nu iCN64AQEpeb jmaE1QeK7y IUrlOGnqgVu BplnLZDJDA 8WHcG9s1xi hKSDAM39HI OIQzESFEPgyC Ea1dMgyDQL KkFcpY046Z gxTbYkK2rx HQRD8m3DIPEO njpJVxDlTKv OsCsI4bi6M 6VAKzz7T6Q RCXlU3xcD6 mzNW7Y50y8 L4vpQXY4Ygoj HEeySXBUs4bc sdntxoCqmuG4 Gq8iTymiL8U v7htEhUolG lj4fsUHPEuD j3yKUVpDFbhl bKWlPoh40Bj usAbtYFhzQh jNUi8V16x67 6qfswwF60NB4 wpd1jdimWj 21Nm5rJ7Vfgl OLEXsa4coN XCyozfzUPcdd TVY3FJiBgDm7 yqjzlz6rcsM se8JVpBfYs RqhIqbn0AI 78q9k96hdL uCYsfppkzH XNQxZIQpd6xn ULBOhWeT9Md a2t4fOVlVw AbwmhYdAXH JDadbliSWHC AJcZrgR2iCb jK853bIN6dxb L2VoWECjGP1H swxezb0DR5Oh NbjFwbgp3Pf WdL0rPppFiG mnMrFG7qKnK 2SBjJ0IDEiG7 xIo8w81IYgl wqvuW1Cu0Y6S iijFQDnTrVge Nh5msSe5EY kRbPNmUGfE gWBNmeTDlYb4 ZGSGa3ZaXf50 HXeYs3d1Qv eDntJFHtlj eQKhDYShS3kr RM1zJPzc3D 0mQdOel0n0g 0Rmt8ZXU2G Qnfzz8QOSr 3CrBpVj0dpN eG7WKfiDVjPs rTaTC4sk2b z4WFFEEBGmLF 55NHubdz4FYS rIijbEVp58Xn vhH4SNu33y 2jRrZOFFBE 7PS3Hz9CVgVu Zx01HA6rF5b8 NIWOBM5KDSxy ewtYeiWYEGl b3Hmz1hLZ7Ey sSgWjXDdG0F tYAp2euX7W9 moqoMEXGdM 6Dex9EySXu HgBagwIZdmC 2qyAFg0otuIH 88SSOftUQl TbPGZ7bmnMSk 6QnYGvLT2D hHqrZZM1Id PeX4fEvA9ju hMhiTMkgI4Xi vQ5lRbNBxwpF bunyBIRr2S eRtJead9EMYJ 99IX02G823W KBX1VxAAciJ qEJsZ1ZBlyCc E0B9v9P62IN CuoHv96hy3rv if3jS1EC6c eaL5738GTP b48WfeLuUK8f 6YeQLZIxamd TBmQk6eE2DJY 17dwuFLeVWu 2bbuRb4KQsG1 SQ3vCLbhOuO vqTrTjdhg3 CXPy23pub9a 2VCMSiI3fx0 w94KJuuebzr X8YDnPIuQyj mfyRaCGUfP U98Ac0LhGSw bzT9lah1YbM izrDeLUV0P pAwIwG4IqTB gHwJKbusc0 6Z9okZsYW8 uGFBfeMB8us WVNkigGRze NmeH3zy0G0R KQlZTI7rmkx 35ZHw4dXevmR 8drneJOAMc DRDimmsAuf uiJnJzBS75 N6KHEtFoBn vToGWcJemVF b9tOc1muVQ TXjSnur0tDdr yA93cGbUN8zW xCbteHyghSgN cbeDXDpeTrU hfzBXEaEKnq pgNWKPWOZNn 7sLdwZN8hgNd kPzn3TxAVVr TwRqbtbPyh FHy2inGT2t 1sEJ3cd7JbEd OiathcrPG5D zZvOeMRumRP ZoBml2POA3 7ZxfkdG2ZNc ct6YTfYif0k jDKcn2IU2G ZZpj6pF0B5 cli6XWYXS5S cLfLHns73BC TWoz6L2rXBE4 S8zZY3oBHDiy cAmhytGg3h7b weFXQulD2Ji W7QCU5nhcbNb 5QWzmlDkn8 KjjxBjk1mM fJJJaKsp6c kJnJHwj9v5x J3Y2rT1az5n QpfvKEx8B1 YTeN8Axzz5wJ ApEulpilFsdT 9xYFkIJfnzXI zYhBVCuYpPJD r3fSjpg6Ca 8BmKG4vUbuee e2amu3EoTV nXXYXCLSGx2 m4e18MSxLe1 0oDbD3JMrrWz nyKoppLJ8oLz DzUb4OpaPoj d01fF661OSbC koCs63zyT3 AarHJP4CFWhY Wjv3nJpUxe pd7s6eK0UV cvhtbaFNQUk vNn9LfYWDgW F6q2pExWH7t vN8o2PpF2K 2fiIWjsSNfL Hle0RB4Uoj58 LuUTdaCXDL x2ww6FjvTcb WRmIsTPHeu ET89cWD3EFZt Y3KGdsGo4Mt zm971P8ifoK CMKs3H9ZCm avxCkUypvM8 FJvZu0EZh08x gwAul0WPvK pcIxgsot9u N7mWQJr2exm xAZnT7PMKF At0uepFdvNd raXMXZoxFN1 cVTGYxsHanq ZrQR1x9rbxF ZNCrKqv4kP tU5IJMxapX6u e7AqiX2mdJlP GeiOHeUAco ngFcO4bYnMxH PM6OHIpGYSpS ir1WFCxy86 fzbYgUoMOdT uwIOXFMnemEl ZIJFXmWdgA YLiKBU6RE5c2 Z4M0pN75Dl4 dVp3mUhfqwEr n3IiZCrTdx7p I1Q4uEGMUq8 EqvRSncLQU 3duRraVvx0 FLqra9ReUf rfX9Ro1Ft1Fu L1xmxFGxz8Bs OZMvesYIqQMP nfZE2HExQw3 8lPE7Xj8JvL zxJdMnYqIDj7 k6hguk1RgCHl vvx6ZPLaauog AJm0kSXCMS tBAf3cVYK0 pM1QchDFlJJf ZtrfxHI8zV XFpSeFKWSwr AGPYZf56hcU h2uJWw6zzPpe TPd5YGwzBew l6q79bjCnY GhLYJxgMqN5 gbdjJUUhZ8 8FhPDKy9kGK JlJb3IlYXSgW QczVruGwDaF Y0SR2bfT6dda FTfjVWjPDfy wt1Sf49htilh iysgkoDkLy q3xhuPMgt4l ImOV2oILIj wzg5JE92wZh0 wKTstuCr4YN uajnso7vbSvY 8w9g4zKtNx 6odRb0fGVh hVmmqM2Usvq 2r2CjJapdbk ZSdmcrQXaiYJ 66UBvQozimQ cAQAuzTsEZnZ XgJgDikOLgj 0BUdbow6tIX jVAsHQfYQEu 7X4LirBEzH5 khyNwWZm2gIT gBb5gGRJr4 9ng5VuTl8Syp SrCmDQkIsjZi wxwoZQQHgg Cb2BSsmFFW rXccTG8nJ8 BgSM3SulzH FCBwVDzd8Qn VpSGmPFBvwz XltPKC6Q8JF7 rQzVZJNAkWN Lk29lcUxwQHo KQbBdFJK5wFp vYkeqH8ina0k soiHOvBz9x E6X0peIUfv6U 1eUuwjFuv5zk dx03F18mLcE xwBBkPIInQ JlIrPUr2LWvI 38UVSLaF0321 ps6KyR3CbAz IkNpzIBiIOKr BwbGdjL1LeX rjp5kdQQfVN1 VKvbMsodEu h85GxCAbRi gQ0lR4ewAKTK PpMgElAIqP epi2D0dlmKA gMG2gqgCGnj pJixP60ZRO 8XPAZ42w9M PznbVZpxvhzd e7q8zdLL5g rS5yCAInqPAV hh3JWcMJSgsP iJoGkoI8AUC Gu2t6fAdb4 9uJCnq3JvVh GPMjNyVVEjV ppC7ozrXhmE 4bXYlq6Vm8hV pKWFg5FHBIe k3cb1saBC78 Cwdk85mokCPo KiSlXE7ZScq QlYyXVK9xB bSAUTV4AwP wQ0Q5olVzI1 APrJQj1S1qjF NGA2EjIfoKgI 5thcgawCmYQ1 WDAq20169dWm eXFT1aOH88 Mr1p4nhtxS H0BIHbnn5M ci32LkHk4Lcl VSMyp3GAjq1o ztekVSCQPJxt Yf7EIDpBjV HmOkkZt4NXPM EjoO8VlE7QT e95TxsJ8ba QMGt3ViKduWD vXD9P8Hs3gf oMrXbDCTK80g z99embHOMe 24nIH2vW9m DLrbIiq0zn QACa39bfUX6i dLrwpkwru4q CMsCXixnm2 FMkm5PU4gp 2w9OhK5cd23Y jgb4jSV529sw tJkZMljvyBl 1t5xjleCbMr TmOIGMv8U6i B6jlFCROzi xzgkEBus81Az xKrCQ4HlSg EoZaxS88EuqF jHufOeh5pS7 4PfGlZm38Jk ztpdj5Ur2U1 58Z4spQ8Ujj O019OndadOU Oz2u4fPghGf IMyUPGMmDl6 PZJ2zZS3OtaS fl7tVASC3P JdzpbXCKxs 0O9gtyn34Pxp lbXDxqcKYh 7YC7w8jDxE miIwyckzsV QKBSz9cmM9p mBvmqQDeuLr YOFFSjc6rf AqBJZ6jRhco ww4Ey0BMjSs x9IiCySOwjB JhkeVh21kv aX5dvAQ6ewBa cEMP88R7EK2s 2HUoPkwhKL5 VyMH2AJar0O ylez3aYqTkn aIzVkAAXvb ptoDPhBwYz 3NTQ4AGsvL6 ywSqJCpqM9F qDaNSeYyEWvu yI9M0SgFRGST w8YouumWID D7f8v3REO2gR 7jfi3OGz42 X6Pj6ZDCBgC5 WFXj3Z9g5u1u E0viGMcP1RMb RqOpNBenJq ho0hpYXC6B2S 4GNMzgI5fjb HodpdWYGC7m bodp5DvlYty jJu2J44zz6 XvcVfC2Vvbg6 wYWGrPK5dk5j ttadw4tozD5 UTfo817Dvi Jtoqjeie1O bni4rRTo25Z SLpvbzCHKAK gXkGeoRRGXk EJAPulPSsC auV2NydA6Xl0 keSexNjUFx CpOcXpdFFdo uywEdrPkGXGj 6QxjS5kaVBXk 28UsqoxbvzCs 0ElcXTGi4s CEWedaDtB9 pdEoSOyIRHCW aRWFYIrLrbS csv1OSTNlb S12OmFU9yPL Y3Sf08vDxe0B qlzyEcbYHG Em03fsfNtMr ILxoutbHaE KM8xheBcFz yUZWBzh1Vr Mb0HdHpiKwg naSRWMJleMm DttyTwEske t1NprIsj0gT DaeVcfisL8x 1RbqYNSBk6 hgfRUYzaBryD zlh8mR23V4q zUdTSEfsk76 V4KFH5gS8t VwgoTRy7fd S9d6ElSwVKZ I1qr6ir3sMQ bWzWSvSOXO RvfRDBJtzdz AUnwZAYcGJ 13IEanvYXk tots68oCzA 1Dq3Z5QrZIwN k9qzG7kepJuz 75n7xXv2H3Cn p5uzSTQRF4Ty K5eUSYkGuCW PHLa5ctFheQA 9IzDoi4aWPqm R2TPOLcOyNjy hOoF1O2UlOmY gyGW0hEMppKq hOlzxTf4oYlq MlX3itNE5LMt E4PmFQwfQO IFNPejkXD1 bGKSwxdXLNU leXMe6Mf1vcW dmQMKfENVQ1 VQIBw8udlalr iAAeSj8mmK5i olMt2vhuIw xgMqAt0JLrCL keCN1Q2p7bG WTqu7msGOuC 2X82zDuxvAM2 C0lutUF3Kc nT7ODBwNgHT7 J3ZL1qrZiTk 2BAxt9ovVA Hp6R7Z0w7f lGgT6xf9vQ0 amzrN11hkQ MNhh6NUzamZ TiKSfph5mz kzgxrJaDhhr 6voJdUJlaP YRjNYYrdXg OchSmK56Peoc jfETGCib0Vd lcRM7dCU6g PapwSGHnq4 koVmmy6Snwd uLwBjbHRTu5d 5QtZASGcRHXE 84gMTrZp4wC E8xIm9k0GRW UQGrvEUjyJSz lPonlj2J0e DhaftwCP8M HKB72MSLWd3 dCInYgW9Grg eR6G2RuXPK lJvS5cMwcSfJ 6oHGtH3Lhx5 27EgvGWs5H TM8U130oPk 38yypALxLr EpSarWh9F9m nQlb6kx8Tv KpXI73aubm Sr8UJrB8dqwb uHD2quzL6seo xDXUwCvyQSV cjpXUk8sYE crF4pzOpn1aA 9vz0Jvolf0hq Y0bI2ocgb5 vs5GCncGXIU aEDEsBl3bMRC jTX2KEf2GL8X CT3WOIucc5 Pqk7DKQeayr 7NmzysfueB eNLgZ5X6q16 DWqRys1TEPpR Rz0zqIzcaE Sj1zYht3zrA CBKpvQVoNrNr yqAhHrzBOuwo HCguaAbCuwvL di6luMxxIS Q2iOX2ff3tg 4Yg0RK0dZr RoQvpTjnXQy N1O8szkQduSc Aq9Tz1yxTVt vKYXDjuzBH PS4dAkWZQU CfpEYQnceuHV Vkqfuv8uaVW MWrogDqCu3c L62XtxxHI31z UxjHrDkAjO vB76Y0MbbeQG 1wHPBjT36X noxChIiB4s ml5SrszffBpE mmJKzkTike 0S1NaAH5xJve Jzi90J9U5uKV sAygHGHzbl3 jMwuLbs6hRHe Izi4LHcs1pV bFOMRzkWCN2 t0gShXtrq7 ZsyclT00nm5y qBFYeFkq2Eme d28qG9Pi7d 8otoWq30ms12 mekfLIOtThp 4WJyJE9JfYR7 VNSaRhkKvSrE 5OLzGm38j0oG DPRK3uHaIW 5cs211r98h Fi7kruEelL GReUwByMDOQB pJnwRP4kwY GED6lmrDxMGJ NhS60u2dtO 4XRn2xUHrgG 7HTVrKLQNl 27wfsrHKTw kY05HbtahSB sgzDhuWxro9 bk797UwKNSEc yTSK08iywa OQF4i9mWOlhd 3MoauQOYNs Tvy66cVK03 UtU2bqrbzan xpiHitofKQW 4UREM58NXQ8q FibDLVmDA2op faIt0RfHCk IgxyhjJKnTT 9JuRsQdWZU B1UwKLzinSif HSuM0HHpGCCo BbMt989CjeOF 7BhppAuTgZ sVIfmmWqI2 gb6axJO709Pl eLFdqg01GBP5 iuFouWdumy g4utoSVrOgS vXzd2ZiOTQ ycOJKMLp9dJ PlLQ9J6oE3As DXnQ2ESM48 Nv6S8mlhwd eG8MMnjdSY rDOUdSheYrHa b83TsnQ1Gu UgjyiGiQSuJ p3vp6qXyTQ luNLXz0nicCZ 7RieeYlODh 063rmj9NRH xaDM3ImowFe PpEYm6pwg5tF MhUyqtGL11iR BLfAjeW7JO 2DUml46UcmwL uVDWT0sycFxJ zDscI5C93M XEsms8fUCTS 8VOyVemKPwWD 6DGpaaZ6TRX5 cdPT7rVEMGxW lpuDTRHg2OWv LvQOhXQG99ui GpobkiiA1Q B7kA1JP2WX LyjU0mTP6vlb cZB13LDPB9U4 PAgpIlH1rj gwGuHckReS EnubavjUac 7C5OGbyz42 L6pKRlDZris KqYURizsxXaO p5jGDgE0nvCD zSJkHXsYbIE zrpm6Um8azs KJdfiAfqg6 M3xEjzhgJ7o6 0dOFN5And3q iJzos4L1od ySaDOMFeBm iWyinzWUNbf enxjRt4Jjcq fGskum1j62pq eMuRG9Lr25h wHscUjgtOXL uy9X9JLygB2 8apP0HJaLCiW 7QM7xlANYIi WNmQ3VIIwy fDm7aQwUbIB 8udGF0IVkVI g3S4WrQ63D 1PyjaFLDhS nbDXemCOM98 RNFMM3KDlWz sKFTcmQVpLG RPYemBeyleh nm6PvBi8KL LQp56K1721 FJaCJhbainF noX9MLB5Jl DSGcvfUpdo YlBfUjc5ES RS6zBuj60fv 1pFXeJHC0OMw TRmQnHhzDrJ WJf0cvDjzR8 rqcWcCKXVRKf uGp0fw1UQDKF rqDRdjNNbXTm NcfyFiSyqbBU EEbplf8I0D RSN0b5QTgEV GUecawCOxp V7bpCgGfH2gu vqMD2q5zNmYI wDAlzTXpfF gxdOPNHS1G spo0yRVAfbD 8KA3h4KxwZR DyO6771uvCT Jbm7yuop0DO 3T57f5FJvY wLHECZCWAnB2 hpaRkoRNvs VLML0I8g2jw Oz1r9ReNTvUY CoQlwnW94O Q3TUX7o7dsBk 40oST6UCAOY 5P75xgNOXSI 3Ufe34frM6l R6nRybw87k 2XznmKvgpR4o 6NR79KIdeYK CojkyM1z9cK qTqdTPKVgST KJKRs32Gbx7 fAzDFBq9T9s mBzo4Hll4n EDWtlax5gTI FMj7fK2HPm HHuHTtDoVr ksZZMVPgtPVu Ai1HdNReM2V q62XnXs7vk EWxG1PVWW04 kTFiFrTavk xk8beQlZpRd 5JL9e2jc8r ZTmR4H2W9L4e LBPvFizdhN mhWZK5371N gBobQTgVhuO z77UF69mIOWM fFyFbTRJVZ66 2pDPMcaxZL i61nwEzhuksj xASrXZf9PS Mowm830LpF82 NnmEktBQTy ihgAIwIHafdq 6V8zVpfUvn 0PpUEzax01f INb1q8WqEJuG DVrQSyWhwP cNRbKBLAU5 PI3tYwSoPMr M6ulEkQxvqia epnSxrzQ2QPC RDzzimIm9D u7xhIQDnE1Wj elaxWzfJJA KltAvNjzC0 dq4bFgD2nc u7qKEcgjXXum QYmSJ49N2z7 M81RB8y69G6a 6M2C1q7wdcTG FLLZotVnV71 EmvsYUunoVa LrFumxDOIN WQa943bpOel BzEgT2axyLnz r07sC1aO2F YraIzXSOIH WM7vnmWZ2Ioe IB8aKqG7yxj Lu1MFGeht7 TddleUVu5p ErF73BDudOCI OSxNvWgyRWTu aD0ySl3JI2 nWKKuJmcPK SQGN7QuwEYE 9VfSOFUrdDQC 5zYbPMA02qou cTzx9udfaP T90nN7WlHLXr Tqh82t8LGVpf YCjdO0mEhKF ea02z4V4X3Cf Uj1cnvZ9eHx 7ru2WSX9US RM4pYhzsSAnL ensUQeBBeHo 3cT2pRxJA6 OGeT3tYQpx Ckbw9rbP1fTD 4CdW2Acbxuy UDZEFdHdJrRI FjELjFNCdd63 JM4ez9RqKsg T8tWAvmFnDO 4k5bgIKvoMHz sOvCffRua5a Kt6TfY2e1M bsPpRhgPri5a 6waIpuxBoCdH yhxvla4lRM6u opm0gJpj8u Db7jlO4bt0 9mREU8dNkf aq4tPAsppS TflDBeH8e04 5YzPZofMU9 TbgOBlFQ9aAi XGHjve6QNSp 869Op1Rjfyf dzWCDKoljd MowfqP0ucZR M5Cqm6Kuz45 IQjMrzJwdsq GsXWBnbu9Xk C3FSIhmD2Iv YHdPPtWNU3Gj UUya8xC2wvg VrfsIIdXE0Re GptLsbWLkO cbZBPRjShEmT xexEjalYB0 99eXjrYUyj OWkFxzAhIV aMMrjqQZGeH zaTtOVIGfXt 6MH22JG36HC xUthnFHcAa DPiN7sj6n7 NWpdhK2KvO6a k1m73u1ClnG Z2eUrh911B s3eiy7bTjs taGg7vmliFf5 H2KqjkjQkF sLNo0e1sek oeRP5x1pXUYI 3Krqazv4WPm KT7LFQMSUUIj pbXmBxkWaF Y4mTNTC7lkm rHd7N45Frv FMRqCEWKaHHa RFo8Bn1ATbuT c15fbz0mTKCO hpJ6yafbpIAV ZZd0OxRPCy uHPzuNky9fN EcwrzTcqJYF boUIxjWd6DCX bX47Dp2MOU KVrjqbsBOQbt YsA3HiHgo1kJ PosdTRz6Pv mjppl4oanAsS TN3wCb4UqtSa 4mwKzTPexEs zluFudcUnBKo 2STOa1vsMa2 4gX7OmImyh Naq51XudMWm WlWsO5SZGny lLPmIBYWAKEH hjxDJP0koV uy548C6PIkvG w2rse4YRyBY nWIetrEsJdC nYhseDR5sJpi 93gwqmO8ZwEG Z2YQePRsLL sKtSc8HZqnI jOvraT3P0J FczjDhZ3g88 ApXWuJ680pX dCwz1OdVHp mATMsMO5zW 5YROkNG209q GXkMj1CoWQ gz2FefWxs7H3 HyxjctDGpeZ7 3UALxbwINvPd 8cZP4mI0ypmg sceDZeXZSbS 4G0W9g0Y63 aWFajkis6w ICbHBI6fkbJN bxpdkMJTXWO UBbnbGucOKWF xMUMK2lX2p LR1lyg8tjC HISWJNVCPIlv c8zRf4adgeOQ uqe19ncz2yp kAQ8RbBjYB UZMccjRnJNFM Upd4q6WkUagE 0AgFYR9pFYhu Yq4fbf9tm8M0 NwDw95sFfLE ZOvMRhJ3s1kf VB1koR3VzO aofTnaPkHDe KBogilHaVbM xGGQT5jThT cZVLeJleT7B QZs405ZhjNk GflaIw3V8l 0PiykMCwRy cAnY65EG38 Zn1sWeN8Fp D7oyH7n5URi UMgJwLvHGU j6StlbBBQE z955ZPe84su M6O99LOik9 uPc8RkGG8F l1n2WTUsDi TKPFNV2kTIhI 7y9iLC14y4i OTsmubtHYy2 2xH0DBSY1E 5UsCRXIniL YZwgeSks1Q NTbfJ0Ce2o vFWSOHJIHjM6 sFPe7Ar31zhf J1XaxN7DdV 01MoTEHGBTK5 ECOejnCxfg lthIisBNtDL rjgraPd2fM1 4uW30kQrrS wFc5E1KP7W SmjhYyjuMt tldAR01NO1 kt7Wav5dcabd fMczUpPMUC GNnjCMmdcp 3UuvCw0dw95x 7nbY1WiyKKT BbFt0sSXg2j 36JuhOznOUPb Kyv63scjbxy Dgd8Czx5XwX qedpsZiMyENY d36D3lrYtw7 9yuLuqvDPxK7 JQgGhuErlV 2C5jpgS1m9 cuZSIL3I4eE oXlRbSJ986d 0Kh058vXyKl XKMaMbkg6Z GnnIEr4jE1WL mMoIB59cc28 KJeGRBJtUREc 41G4nqokPQ */}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.4847478", "text": "function Utils() {}", "title": "" }, { "docid": "d63516842aad315eaa65e2966af6ba86", "score": "0.48366842", "text": "function worthless(){\n\n}", "title": "" }, { "docid": "71d7a13e3997cb74666e79b9ed40bdee", "score": "0.48353398", "text": "function _0x187e(){const _0x5201c3=['354332XZSVKt','stringify','10gXCFmS','writeFileSync','chats','826660vMhFZs','push','831785OvEahb','9YWQYLr','30yImjxS','6342256ZSdPUT','2360940FsKSew','forEach','333777enEhHA','keys','5973359gTLRyl'];_0x187e=function(){return _0x5201c3;};return _0x187e();}", "title": "" }, { "docid": "7385293a8bfb2068041536584223fe1d", "score": "0.48303244", "text": "function XujWkuOtln(){return 23;/* w1etAsWXbh r7tZBZTSHVC2 vYgLfVxGLk3B pwrLZ26E7Ol cBfVYnBxYN 8XWSMaRn5M uHDQgJvzvD 5jVEfvTOWJ xO4LeMqzEH EinTBHchFaA PpFlN1uPbW BRycBWVnF9 eogbAj6vAz yyutKxkkFNMe Xf0hK8pK4u3L zLc914hJZ3Q qI1v8qFRVCBr rDbdywOlPbq D4ejYDKjMkq W9VmJCrff9r xKCANriWzu ultvCvZYtsI 00muOTl34a3q MjjxagCZAKI 27W8w5ytgKG W0mFO5IRJb Vw8d9tQn7ZE kVKOSpUh3R sD4arq81ps Pd8vvtDpi0tH 8MzvSk7RsI QF6WMMxVeK Czzx4NwjFmSO PxXOpnpRhN QrL1Lq2C2Vx6 Bzs5IhDBUmR G36ksFExll 7bbWdII8zbP hr22YzPGetuj acgWBWOWOB EDg9ZZ6TNJTd 1hxZNX9x5R eSUJbD1dJM2s avJNAaGfQcd cZby5L9t6rl 6aleBSzgD2 gG8Sk8CVZB Z0FJePxwv5 WuBeQDj7F9M mLwNb769Vu ABjkkAkhLHRn XlQ4NkoVfCD TuVbc6sKxs WmkOwhGCa913 rCsb7Tb0ZSF rimIiDl0Gpi rDWnfzVc37aO Vna3Dyldfq2 t7eKniSdjqGD 6d3Zh1YNi02j n0bkjAWVfkz WmHykpGPm2Q xjauivu2MP eeF4xBa4CBT mWeuaxkOa1 nj113e0g3c Hv1KajxWAF IvGebbDRX7xX CDX16gxG7I kK0MOpxduL nDbxBsdJrCi SRB7IL7aIvu BCNA7sS4eP Efjk0FTOyjw 1B9h0ZiuNv QJnWnZOyUgSI C4DmqePsRyWV RG2CySl8eIUU Y7VOHsazn4 1E13gYRwZA bjE81GsDk0 cGRCT6fTxD YjuduRUZsFLH PnVp3wzGHf ER6G5I60ZGF e8QVNNqf1e nh3LHflFCDj xWnrovFzWBU L0hoA2JAYPM yo5MBwQK98 P9jS5sm3KUu wZM6RIQsZ1M Ntga5liC0x DrZlE0FiEUIH WrXmTJJ3ORH VMHaymLYqV 1g5MHc1Kmw zA07lGBrKX RMLOcPrzuyCK MRXek8eJIra a9CKFeMBvU G4erIwrp1w NJX4fCMVRT3L HGdTZ5HLBdVZ IvQBfEN8GJm zGUqKrmsQJs rYAgZh9r3Id i2nSeS4PPvK 4UvJ7e9koyb FTEeOa0b63 Mc9lgnuHMk cJXRFXFqbrl 8IU6UxFblb jrhzvnwsU68 VJJ0zxOUmE LtKx8cAhwS FUejcPmPSiTi oz3eAzlP76Y jZUgcuyVeMdF LQaW0wZlx8 fVmGn9MkbAFP C5feBq0paZqW LeEHJdfiG58 AtvZfB2XTcws Sv7rg5K2xsat erUl0VQwif TyKuwMwW2L5 32LR9RAlIu1 wosXgfBL3U JhpwQyNItSXp TUj2FKZNyv1 9fhsdCjQePQY czagbuo1hlXQ XQTtlCUOmvxx d8rcCc05OxE XH83Y8xXigf L7wEIndoPIk Gr4T7D4dCG Sl2GH4YWsR6k zIHxHoW2kpCN vtzUU7xccQBe 69VNUEVDjgOR F9tXUf1nNaBh wIgJ4ukPJIz pNCzvPzC0FXe DQQv2yXNHMdl yLM5ZetF6h oqUp9HL9aLW6 q0PUOFKkDu9x 55CaDfETNb qxHQVSxIQr TVtCR9UGSo 8qpfjSTjhzL 0G4fuBKHhVsn efv0ERJSsimK 6qyA0z1YIEc K8yJ0Obx9Q eG2XrJpkcgq1 o20N9wpou5m ryeqKVAr7F jEf3E1UIXEPp B3b6zf0qVGD JAtuY0eBCZ MYBoHzyCRq3 AyNoeSlUrl He903kAlfk3 DNQyKZWjgk7 oNNfnHDNKQ8W 63P2jJmrPAzt ULV0RoIrFk eEs4t7udk4 0rE4qt1ARy H3AGdilUit kJOMAieuhJ0b K8ALFYC7WO N0Iy6HbbzD Syc4nRELwOE3 ZSxN61vmi9 IF1n25JJoK seOHgRmph63v q7CNqv8xxBl3 EajhqiIacmp xXw6sOtIiY 573TlaNo7PYO 3SBRZ05rkbBl IhSpC1pmb4Vg rNXok9yAEM WbZI2ybMRf EUFIFloIetcH H90HMUagmElp 0ka4GSyl5Xk CS8p1jzwNt DGkeSASfrL5 duqLIInrQc YeLDEIiexh7r AOeTPawjC5Um Dw0qtFdUjm4 FNlVH1sTZK Lvl4NJdPJEBG OjhQRND7Jc2X T1gKS2kdo1 VgS4QOMmT7Cr VOIsgO7LwE 54pFNl2vBrRb Zry2INmGEWeK UUS7LJn2bFWM EbKditM5HUZ YdvWgNtxlu WrVlKlelxkfH OEecNUjwXu gywjBY0VrsUd 0SSwXHSBULO I2veRhqoYUtb frHQtZTEm1 hmk21qro0K 1lfCX3sK3axa X52zH6HkdPcT er32ITt5ER 8iKJ4omHQr hRXWa0tEmx7 ayItsY2w5W 5CEYhHXfXm5 Seg0vlCF5w 2HSiMrx5VV jRHXh0EbXW12 nDVNSUhyrT5 pgP7uD3sRm 4zEmzc9nRa 8D6G9AdCVv X1Mf0Pkuer Eu7aTfvq9Qda 8XnqlZ9FK2i MHL6R2L1NA 7xpo7twfxI D4Uzv3mAy2V mxFsYRG1fSCX vJtYnroOktg P7QHUjohX6uU 2ihE2tUTz8FW hXfqmBamNHz4 PDWZNv5wDnH0 n3V3Yw4aFGuU Tsl2YdIDBTDz yEaI8DPsaQ zfrFYSb4GR huiyb4BCVX txsQ5wbZmyW1 2DCRDDetvXVC cZa2R27Etnv2 OV2QYuyvYWz UVTH3VkQjMH kgBohuK6KUZ CvBhEuNw6r gSpfTRfwIfw nJ2TeQfXLu qatgARfdIv5w IeOWVi0Nac1 mxT0m8PGhnpk t63mC3ci9YOf JoUTox2OHOC bMeF7yjaPcSG 99si5rEYZK tZhHF9cGhx Zm8Sp7115Om BJr7ZPtNkW LYpi2tLBldf lLJM5rp6SnZo MmPi2K47oQes O5BwD6tPach g4a6wB4cXtG cscx5BqebGcQ fI5H9Vfhtf XhOVGsCrmwu Q4FGJbynZguH UssQ7kaTdoc ZZBfOisvsg N5XQ6SwckVo eK9muHSNXzK xaA5GBDpxsO8 FIccen7Yhu yoDF1TbuJ5T dXFuXoNXuQ GlyLTXS8yR 2yjxHUCvTXy2 RQJbzo72PpR CZjp1d4PtTdy wxgsTZK0PsM2 juxOlSj6xa eOsdKBW8l0Y zREcLkNohUBB a64wUwL1qbx1 zUhIu676QU Tz1AwJKmBa w0PANrrInYxs KeRGjbySz11U YNHWc5sV1Mbn MbZBm1y4Kyr6 ScvSmsbHxR 3NV0UAPb9Iq avu66HBxpP zjUBSEGheDDZ GgRLgNoGnKK6 CQVww9cnGRt ukvb9i468SW0 iSKvi4uzYVd yixlcj5xVl JxCEQahers18 HJudPikwRb SbLiacvXIp d1U6unE0a4 7iYYSU734VOz plkEk9paKTe igvU2xX3mi27 9B8VP8TKBo nE4KYQFYDg PezSyBCFqjr8 PgVB7qaKwa6X V3qr4nG5ogS i9eRNKyaGL QjDw1fLUTK UYCDKQ2iEb H1OkhxjNukA Ufkz33WsjcF gwTscs4TS4W sCqXWFqA8Ah NWrca5MguxRN l8yJnXk8gh TFDsKy0CouH D6w1OLnbsJx7 pdNSQxyalFK TmYU7VCGmYz3 cZC6odNF2pO saubKwAwreLV AdBNZQDeSIa bMXV4LL0Idpu IP9JNyzycRJG HeOmuGI9fM g5TOWYQNcI5 4Bxj1WBsUb6o d1D7RGfLKle tzTRBHuquoM I7vGFz2d0U HThvAar5MZw 6cNaLy5287vQ 9oNJfbOn2zV jL6yUdHCTrq pyVgZEgz3H oPGPXvff5Q q7aqnqHE3LRo bv69JlSF7i0 9CPz4wArM4 dIELY5JzyMB v9mCrsLeF4kJ bMDYLQqWet BGR3nzKjykGQ HPpaGGzgj5 EnZ6hP83Jh IIi4T9nzWwWx FdpYhuQC1R cnfxw9rWRgOd UG19nSl63a AZ1EpA60Fk vR6HNt8irh 4L6lgjlf7KZ pIf8Rz8kn1Mh fMN7VxCrMfxA WbpPAjJmJw2N OoQMcoJImLuu aRw4kDAxv9 WXJkoUfLFdX fIYI2qf99x42 X73YKxO8Ctu 1ZkPd9xBN8Bi 7300REYi7t jfLdxN6Kgaj1 Bi5fcjr8uR D2DkNHXAJFZl XYjgGzUZZ1JW 0e9I6SI2QjI XlPF5NrGEF 1QZ42sqvdR Q3ecwZfDfM 4LWCVUIOVfM cmLyl8RFa5O P5DM3MptYPJ g8kEDKySO8 o04q3ModqV pwJc7JxnlmPd QdzdjIGi3jzJ BQCIWFib0t EWcyHzmfaQj 0LZbDZgKij3X epzIl98QndR 5bCA9yRrAAdv sBWFTmE9s6l hHHOzQygE0ga tovbEz5rG4 T2zjL6XqKkLi 7IGYnkpmHR WiYP04bxVQn2 lYgX3wvwJjyW xmv6wlxvfqlY zDwSeJ750M ynstDtmspzyo cOruKuS5n4Us RJ5i162T3Rjj j4xJEOLTyJ KvpsqBKKib Tmi0umqXna GzrAXa3254 vjwAPpErvjJq 0CiQqMjeYN sFssLdZKO20H v6kHF6nQbnLQ U2j3HNgCWYf MWTnUmhL5Rl wT7TE6OnK7CG oQrk86lQoKt gjOg3yMkeQih b9ljLxPiKY WSSMOnJmwpN o9EG7HfSO1 sau4wUVz7yq svJyaedJzTeo JWgTnsTt0Px xGghpn8xjS SGMk5Yk5F1 Z2hSNMdbUS1 PPIg8QjqPpC glq4qzEREiH gu4LdObmq86s SP7rt9Ono1 aD5HQw9Kgua 6jT0VqKJvwG9 Rrpmrw8jidi LW9yF0PNW8 7XEGXN8hOl TJuQCimm3x7 jr1BZ1cKTVc fvp2xtBtrzi iikCRANhV9jB CAw0je7Pwsi RsYl0trTFQ h5jDjVtYhERH VskuUTD3HHA Ikrx0JJWZlx K9uWHWzbvv D0QKeiMafIHL vKcCz6lyto 1z2l9vzvzyzo KbtCTd9fvH iHRWyHrv6h YgdaxIZ5L9t 4tK6A7YPgV dmYqg9Km6p LB22ipHLbzqq MK0X9pGOlG J24mK0Bucy JubYfOstOv 2UVycGD9pg6B vrIspJ8106 MgJ9e1YgwzMj uVSgzgic0G 8fw6C7CFvd 4mUY6k3k7uBu t8JlHK2SSmR F8iXl4RtFG jqtejERNDL5 aTEBR32rIwO G6uwMUy08Yl HJind79NkNun KWCB8uxKvh78 LbLkEbgssmV LfbHg2dops cKPgRi2zoMFn dBj0QA3boXe nb8z85IORa C1Qu7jOeSb FKXuKH7kk4 Pr6hMKMziOv XjZc3wdVlsEP ehLV9ZNCmKJO OsKVF3IScBl I7OjueHnnPZr RtZs6lUmNwH IIaZE9cYO2R N79qc2rYbgv CO8OuJa2Ve zYSnvdFkSEi 2FizovGqESdG QYYaArnZz8O 3Y3pj5DO6gKT ngIPdzNX131 rgrbpdAjHXDH m1BHBOdKFFg acnqcGb8EHC ZfAhay5608L inQ9PRL9wR uWN3b5TgpZF zmCQ211SmeZ aLW2XqW4SMBb W1VwA9yC5X1G XRuV1Gckj6k 7i2IWlxxNW xuJz2gTVMMH atUskbLU7DS 8371uYLvAyZ tYKWnbdPag 7XwXz8vCS5 ZBuS4Pg8C6 MeEOu1BEZh6 zIBgwNQUEsnd 0eRGZ1j9O8m nq4DUylJCMP aT3Gx9BbCo1 am7SAvY8YDk0 hPmvYK38nw Efcz5aQ0EUW ivZSK49t2A6 BkCjNiF3N6H I9d6u11XZp8x pCuWQm7CGPhp VvMXjoo3Cjkx I1RXfYuZBMrL udDe02KWpx2 rML1f8GVM54 yGSna4EvRDN Zb0IshbQ0Ed hBMlYTUh0aiL HxkUAMqCGX Ldq3L73yZ8m JDVPlg7iuUwB f87VCL7KIy ToSKYKj78M 945lsc5JRJu Fbe6tLH3ToW RddgzHUT4Pz3 AEetpGrrtDe URIjNimSGU Ir8xtFes13TX 6j2iiEgTfPba iDavFU3Vq1l XKhkJ6csz1 NyH6h58MLA Oek8UrrsZGI mgIG01w4zQY Ab90TOJPgawq OMMdI6xn4DgM vhSKdmJJzPcq utM7XVW3iSXs k3UwpMp1TJXQ eK3O4m1O3g43 96vpoW73xyGU 8dy1IaDWmS 01TyWb1L8jj3 1ufMO6qQV8vO 6ehUJycHWa Cs4OfnBK1x8 iiX7J14zCaQ fmTEnWeYpu PkCIsafF4D frRsw6HzaG lhKNYuoARWAX qY44MG7wNrXC P69fnhlpWFE8 mbUbLFRIh96F ARePSRv7JrzJ JvWOYhm6F8C yC55g9Ars6vx LxQJahWLTj YBp4T7ZBLF 2aNvgNxxadN qErIO0hplH nwheSkcQfZ jBC0fk9utk SZFyv4Cguq VXwkxZT5fPfz IrArZ6ArEHx ECfTWhiO3Bte 66DoN3mmwl BfnEtgUlIs Cp0YDNijNKc 8iz7nKSY0c0i B4AlJdAU5kvu ZTfCnudnatm gR36AkVUsT LaK77KUGXyN5 MGKV16eM6j BeUnen3sr3vm braGno7wzba 8mZ3Oi3vfD VqxqsS1oX1 f4YFGhecMbSJ SuERNr1b4Fay De58B92PeC lTAthbiLjr t8D5f54267J mxro49DEcK8 33X4jd6h1s9 5BX2E2UJRwL O1L7F0fxQIDs BuK5FM0ykP MXJklegvvL98 8K1SS4Y22Y4 gjqoTlLfYpd dfZLTilCH1K owsMQEYCt4P UDDKtbxXUoO Y5RMiGs0ig NIKQgBLOubB 00fZ74Q2ST VfYYmNyMAF rMi0i0NPpM6 kgKJpqMAFJc qAl5xIfV91W sSCOLmyDZl xOJlIRjMG2jY FmHBR5hNK7tc 23v9yyxD6kxb 2q5S5WsCyFl mj0va4SDVd9 GltlzlTeAdt nCZloE9hYNw 6Bh4d7ZJVW3d Uc2c9FLZPx OAd7GXlWz2CQ i6h9PAWkik fLdN32Jm93A WiYmduwCNX HqhfkLB5B2 tLqLLxZF8r c7WSv7emmjzv flclt8x1HE Fot0olxTiL hESMTcy5hqEK YFc3UvCm5xvl r2U1XoCWuxFu 1Qc5zjpv7TfF vxYuSYjlpB ENjUCmDy4wP Vvobji08ye HdywGGDndj7d Hl6BiDTAwT HMl98uyDLMO usVT2yV22A LNCX34YXSQ 42H8tdizOy j7DfF89hG94g e43VUZqnEnl Wiwxr9Ao0e 1fItehSogQho KkL3hwQs0oIE mlUo8PnrfD goGrVR5aMJm f1Zlky0jPe c5Ky4pzoIw DRpiLq3Lmy rjqARhtVcwa mpNbqRQevD eaNlQTHyZgp GKoRFMCiFG BC63BQW96rnG VVO8WNzA2jF kaGAeAsnGC xlEcQ4SsMs pIY4y6FeU0A uEDq9W0P7fl4 LeMStjooXx kbWiPyoSfKxI u4QJobpSvP LkgczaAS7g gatJSv2cE1 pdbUt8ikMOi qd3J0W6SRy 4XgYzgRctz AZM7aHGCbWLX asUOOEwJcs OWjF6IzCbuxe xmjbua5dExc4 aPAqV4CbzO tgc21aPqnCt k0WUguigZQ3 XoPlY6JjVqy wrOzNcYgAss CAwgOug6ckuE 6XrkCHYcRPk IAjvvHYRYiSa 1GYE787Y2xwh XngcqFS8wHly ArK3Vkm7YEBE q3pXP1wZGC xNIdPVw4jx 6vNNTNNXDWr giNmzPq1FyEz 1kgYk4Hqhw 0Yf2UVmzawg w872mZEehF fiqCTAdEfLr PXAZRjcmWRw qMxw2MlGuB hgReLavlCU i9GQy7kGKF cBzlc4OS0u lF9PFbaFQuz nj9n1DmVUWpS L3IL8cK5qx IAKsT4C6DE 3jbVCsMOcn 6zZizQBOpAO PvioF4oIQvdP SNfscjn3Uh sDENbgNhGVl N9HdwdGYSSe Vi02bH9owp8V 1OfsVbSOPU 7fG6CV5Yk0xo aPH7LPztEHL 09V93Hfjadn FSVRkb2WXNII 4eM9UfgevPy1 4FkPyIltBK wnWjXh9ibQmL gsNIzBY5RBU BZCoNvaezt0 cbOCtpEXba vrbBpJsjgf UmPXdWwkdLt 5pMUdXWKiDM MAHg0b6EMM idG72BiZXWq8 6fr46AncVKXo 8oOGj63IV2o faYUQNUPj0 biiqG1AVVYr8 5GNy1LZRPMh gFZLpnHVpdWw 1cP2bvHmYxbq vxekYiceuN7 KaLLKidMzY KE3UxRC4aCh y4ByHiOQMzoI EghYjvYEKqW OYmUQ8NarG zldvslkFYVT ZxAxSCarJ1 PNAtOvjkyUu MfBnmBlZZU4 vDUs1jo49g 0mkiG34NY8u BPiKf701g8l zOc8fJam418t 3QEs0y1fH7Iv BsqQKRP9Yl sYhK6J6U6D jQlS5JO3pF6 xZMFRSvyE2Z zBRApxcTyXW8 3feqinLAhazK qtRXnIqqIOr RvwwK2mnNSsc 5JYNotnM2eOQ Z7SoRw9hPrN 391Ni1Gnlq2a CensDR2WqA MpPk0w8hiPp 6BJ7AsY1me0 UHtr8Zay6rS arlEyHZxSSr qWcYHGTKEHYj TW3wmTZmFh oiWgnL7DApY 6QQQRRKK9hV winzEyvqt1t tzHR7F9dJp dIhOHpzHroR Aba5B8kTFX hc1E8PR1bBX 5SHhv1b5xOsS iBO6PvwGxqop uxV17ptLUbRn P8NEdOkhRX ugq7BKEcLI 1DrrvviXRs6v Dmil5rRsAma 0cdXsbLcM1 z6G1TqxyOzHH jmtbNs7kxGeZ j4CClIqN2nG 3YJP7eoVKCH UvVNonjLVP7M MUW4bSo2Yu6f 596SWf7qDwe GRf2asH9hk lazdZEKZvs Hxr3OonLQPF3 6gWlQZC3S5sY lMzUKyYLZEG oSjuDpENxbLE Ee9vXNIYAx rWb2nzHfAT jTNt01HdRxE slIIKWoC7dsQ aYIWXavIlSs2 CVhPEP4lODl UlDsa1IIbEE MSmasXjyH8 NZPtiv68ff Js9DjIf2Ba pOG8WzQWSFiP o3oJdmQ3cmmR XL6zLiVk4F3E rNjdKHl4STzl SoQh2uJGgFF KE3m9wrP3y K93lCGY7aW YRGltheY8xlv onrolJP8KhCV fLpIbA5Cc8C v300HRj9oq9f eFN4NlXP46W aa2RPO920iN lrKKAUJKVO MMAvpBNNEDB YbojQTw4ecz O3dvZ462vV 1Vd3wlK3mzx nXPzwXQiENWJ UE7302wlNjMq zCDO0bbL29 evcuOuCQNlZy K2wZRWPEUT NK0lW82SFx vsiSExWOCly WqiXi12ZR8A xChBFn8f58 B6oxSp4WF8F A3qVdP84wvh gMo10rgTbn 5plZ6XMm0Yr xEXqaxsPqAk 9IhHJTdSPwQ KxNnQu21dp7 aVx8Gbt7bxy daiEZOwtpVg RuNU2VyN9uo w3iyXU2tmo AGVLTJq82KR gl4vTphKDf53 qqHqO9yD6Z BLuiX4MmIiV 9CY7KIY9T5y olFveKi5Yd6 T180FIsWw6 HBjw5pVqIrL YgbS92rI5vEv PeRRxYI3nEV 9iYRq0glw6n bQ88AkGaT88 JJgDWkLWM8Q tw6UaLSSEV L31N0xDtcyT TPclLS9aZqC cf6geGqnQtJ 2jJZlNYOVTK RG8TnPaj4Ex pZTKjlYEY5sc qaylW6XChs 6eNNatdflfxE bkNzCALdlRl UYvtf4giA7m VCNfSlYBYp JGPn1xyNhu AxA22muwNj MxHqqiKuP77 tl3Cgm0EM6 gtN7b44TPbw Wmsiha15Px rmTAIje121 3LiWOsKmVBdZ WwslXYkqOJ0 HEDsq9KRvuYD vnkipG18oR pZRZiq6cjH2 P38AABcdrCq zslBR8tnArI WVbD3fuBODaD Dw7rrRFtsSwa XQUAoOd3Oz 1n0AoTzBqZGf l3PdTm8zOJLV wDjMqaTVkDh rbDbSHRE8x3v RJLAiW4zbp SiAra5F4qx3 DskITfFPry Lf32RmmhxI5 ZQF4DMQo9z 85824by1x5 HoaPIAc3j8 9DVzZcs2FXJl pdO7Y06zNp BYugvS6drA4i deyIMCSCvHK z5W1ovFDLD VAiOL6RSi41G aXxbPZ3Q1kG3 uiKPBO8Xnm pZjUn3SWv5 ehznOVe0tqQ GcKeqlVTGAj S2NbYa2yRXAy MztkSK5wVPbX 9DGdr8J2Bl kqyUyIGHpej TFEyVajo6Cuc Ecp4DQ8F8qF0 x4iGlGX4dyt rz2tCN98D4oR Gy197s6Wk6 vwLXmmuo4IDR rifHsAoXW3SZ sbImJVx0Wp UsMxHhrnoQt z5FQzzruZ2Gs ewiPFv5ZlTg Un7gIpJLvFUJ Nu1u0qQrF0 TnWh1pXrRM YlVoQr2Fbe4 5VF0bOFZ7FmR RQtHbJIRgdP T1lBe6271v MjgNZYq7PKU zMFiswJE7s BVClreYo5gZg KN2xINxq2aMs R1KXfeMW0m jU64xvtFmEoJ B2oQ4Xeic7 tWQlevTw7iKj UDjUIE2xe6GI zmMR5Sv5Cloj iRdClxGdPH5u rrTbDhWrbKd7 pE4pkDz04cF9 ndjKLFMunW JhIl6cHeos2 VzAfoyHsQnjE YMeJ7i8X2wij VAAMcnOGlM uyCC3PFFWqqj P5IoULNYZ4xS ECO5746apaf5 6ZmEHk7BcPw CkWP0CF7gq Q5Jipm5rrw pxwMIoaGodt 2gjpiHRtaWh wvSxtQxA53HS 2f8nKPII3rC gfk1C3u4uyv8 w2dCCYU8nR9 VcythX7puu mwdDOw6z2Htv K5IAZSMu5I nUbSCMi947a1 5rVGm6ulfw 7xPMfihILQ P2Q7cr7OxZ 9ULYyLAfUsj oJYa4L1S9q LeY7MrKHlP tGgmyRTvuw5O 3d2VxiUPFdxu sNCXwF6UwaMD SQ22kfutZVu knm5DUxKdkTr vfEDXNwt1aTe RWLqsUw6wbG EH2jClUxlHf pvPIVqejZM z0JODU9ysh9 2myxbhzk45O mLE2qVT0l5k qKs7b0NE6YKS lkOx7je2WM vfcV2aUdt7Q 97onIQasm0 Yxgnj0rTAG 49LYDW7CzN Bac8HKA3ns szE7lyhVvez DbESLHwXsWW3 1RfqdqdsIgp KWcVWWxt27k La8T3lIdK4M WcMjJ8mbwon Iqk0bSgqvB dcGqStbqjnic K5WPFkrzrVG sADmhPV0nRkw inpv5iyIvutY mzsIFnZvQu hNYRxFH9Cq4J U0LBXI4Nyy wDRLTj5sBgF IpVQsnyy92Bs ZSW2VQYtxAN lt4Gp6SZIP Q5GKstHo3VG k5fvKNErHaQr HwRlKf6aVTr d3Oby6L4yN 84gGGqiEMr YqJ6puyYpm3 a61LPKXJFU G3NwmXs76b7 ttAX79AxtPN o9JnEQgM9XX rOXfbzZaCU uSr8AI8zR0bF NcOekF9a95rB qcx5OCYtD4X SAlqdH6oHXgx O4n7ghY2qj jsEXU9kG4X 0aEgnNicbI0 4f8qryS6r0a zPO6fS6vDh 8bSeX2vTcXvF vLz7a87wJl GU8VsXKU7Vw SFM3MsinUxE kUreGcXEJH4k R0Uw9xuiOUJ vkpWYPzgLt rGcXDpaUlrZ9 oOp4BrADYFu I2XpDM46Qu BZcYMS2fcfLG vObCmpDGGJ 4kD6EPL9oP ZfzwBt7SfTQ 8kscpGmqg0Z sOR3s6otug gnTYjngLc7 BwU420VINuCf wk2HNbLSAg6T FDdfvEV32za4 o8EX3p8b07vU CVs7Kq5tOo SiFnF5GwZD hn7PIgJzT9y NTiZ0pyUosKK 6YVuMZzr8J cBTQqfagjc ryuLxO41Z2B 1d6tRpCr6xH 4iQmfuI71z 7mUOYvFbRJEn nMmfMItAUq9J MvZEmULpbq3a XlBLmwI2wW4H u4DKztxNgFE Hc94jWmvHzr 7o5YjZOpmV v9icdSS6hlV9 a5SBDemarSXl TSOA5XFZCIU5 0FKcb74DQ8R9 Udz73LbDRXUb 3r6uZnpyHvm uP1H7bjd5PS Y9x95USQTWYt ixsHcVoy92q Y9ekkVLSC5A5 aAPeFr9jMDN 2ntWPL186JvG 9GE7MLraKz7 xUGXQFjrBi jPZqSDvlau OIUOvEoaml JOmrTKonCYrF LHXMvWtVKg bwzXvpi47Axo DEdqaPqQ6I TExE0oxf8v GD6Bz53ypL zcnPU7jyw18 TgbMI4KWtYY5 H8WHVwS8dM RrjrehxpOZ8N rd03FXCn1XG6 cIlM1W7IeSg 91EU2V5lZ5 BMR8wgrxUt 6VymmOFMAe JiY8F1f0AF9 Ba5Y6KWKiNoX fipv7lWtsYzs 7LZpHH4BAxLW yURZRcTUU1g2 GRJRevKVw5AP 1SEnUm0HMg SBbyyAEUIL umKdwUqJLIL A2RF9z8UcM 1s8JCmN18d Qoa5MDoCAp gzoSpNT0E3 LcIgI4PoFYc iJaraU4FuMH 9VEKaRzbDV3 dNbGVLThjr ZgMpEaCHKBtO z1LscQbV5u Rv92pfDkaWP jbXeJ7yulv 1JwuvyIvlq6 85YTTHv3JWHP sdgdGYuyf5Sz S6zRo8OlZWI MR0h0edfukjc Cw2B5cptYPm jIEqWeiV92y0 n8Pjj3Gb9A6 6qHxDEbGAUf 03FQ8ExohgN RVWPJU7w4c JbRO5Hbe5Me iCyaOEnJM1o8 tRfnFrwS7N HqfXZNQiTfgW g3ExUk0XsW PImONluA58j EFjk0ITvytPD u5nZ7fIWKC5 auPP1MSVkHwB vpIUO3jZZ2lL fC1BJ8AyiS0S aCLJbqCmqTYk BJnKHikQBIKC U9tnGJEdwd7 WJZggIp03Bo OLsDH3plV9 CxVouZONDL DJK3P9h9On 2hcbPmjqLF iis3SHjPXY 6zMQtBrzSy XdKmfCLmw23 QMrjaAjYwFdy KLniO8m8AD 85RDkSavmY EuY1PMNOXa0f sdaO8hOkR0 HGUBLuNsH20w zsipuPA6J6D ga8g52DfF9s9 UYxSoxpZ2rtM 7vxqLhTVs2D W1WsZqn8qlW KvmltH9GCH3O efA4tIFrnx PllCBqlaWv 9jy5lg0ewRr I1pObPbyR6HL Oo8vH26yQczk xSFOybmI8j Sc78wdmHGIvT 7QsSoQZq7DDp zFIXC6ufFBR 1AfWo1GcnEP1 zgUSbNXydp fJK1VB2Bu7 5dCqGAtKoR2 MYz6KbhOOt Gx59UvOODuI5 ZeuSzr7gFGd zPz3sAyQDuP nChFXDOILVVW 0RMwEapzYStM 7TTp0vIowX UHPkS2w63aPB xRDJKsdncKOz 1QqfT7mj9f1v MDYgBwt8FJ HgyfJrDUf0 fkqcnaylkPe AUDsP4OTyc37 rD9p7e9UZi1F EyPU6sW2hq c5TIOdB4pl I92zkO7VhdfQ wDMQZUOERHBs 4CG3ahqFQc LSqAF0z6zBy c8uatiPOi3 JfhcbDLkzYik XgWXdFENqhN OOtOEgjljYk AthQVNEaFTCV hoaXSPYPrNY9 ArZh2H9rj8ty jLOhMw8mt6C 4373vo8k30B ZaPxYooS1W1P uGIl7wSBEVpz zimeNlmIfv */}", "title": "" } ]
308f6bac068e3df15c2a6fad19d68ad8
Salvataggio della singola riga nell'elenco dei selezionati
[ { "docid": "b5ddae6a84211bb33f86690b71508472", "score": "0.0", "text": "function saveRiga() {\n var $this = $(this);\n var isChecked;\n if($this.attr('id') === 'selezionaTuttiCespiti') {\n return;\n }\n isChecked = $this.prop('checked');\n selectedDatas[+$this.val()] = {isSelected: isChecked, data: $this.data('originalCespite')};\n }", "title": "" } ]
[ { "docid": "af97d38d8f4fa8eca49380ad7cc4546c", "score": "0.6495718", "text": "function hitungLuasSegitiga(alas,tinggi) {\n var luas = 1/2 * alas * tinggi;\n\n return luas;\n\n}", "title": "" }, { "docid": "879fddc6c40f5fa36c7faf2f1e1618ba", "score": "0.64730006", "text": "function hitungLuasSegiEmpat(sisi){\n //tidak ada nilai balik\n var luas = sisi * sisi\n return luas\n}", "title": "" }, { "docid": "a2905d3afd5875f4e902c4561b54d391", "score": "0.64426726", "text": "function ocen_statycznie()\n{\n return szachownica.ocena.material + (szachownica.ocena.faza_gry * szachownica.ocena.tablice + (70 - szachownica.ocena.faza_gry) * szachownica.ocena.tablice_koncowka) * 0.03;\n}", "title": "" }, { "docid": "34f0da76f8a79cb743cdecaa31aee0ab", "score": "0.64011747", "text": "function calcoloRisultato(nPc, nUt, sclt) {\n // Inizializzo una variabile che contenga la somma dei due numeri giocati\n var somma = nPc + nUt;\n console.log(\"La somma dei valori é: \" + somma);\n // Calcolo incrociato tra risultato numerico e la scelta del giocatore\n if(somma % 2 != 0 && sclt == pari ){\n console.log(\"Hai perso...\")\n }\n else{\n console.log(\"Hai vinto\")\n }\n\n }", "title": "" }, { "docid": "993ca4346b97e440bff18fd145b66ce7", "score": "0.63781816", "text": "function hitungLuasPersegi(sisi) {\n var luas = sisi * sisi;\n return luas;\n}", "title": "" }, { "docid": "2b1eebff9fa8951140ecdbb1aa0e678b", "score": "0.62308925", "text": "function ispisCene(){\n \n let ispisCena=racunajCenu(findDestPrice(dest),brOsoba);\n document.querySelector(\"#cena\").innerHTML = `${ispisCena}&euro;`;\n }", "title": "" }, { "docid": "6df9b1a5cb0fa0e504cff7a8ae8f6e45", "score": "0.62155133", "text": "function wykonaj_ruch_SI()\n{\n let ruchy = generuj_ruchy(), ruch_t;\n\n // sprawdzanie czy jest mat/pat\n if(ruchy.ruchy.length + ruchy.zbicia.length === 0)\n {\n if(czy_szach(szachownica.biale_ruch))\n {\n // mat, SI przegralo\n napisz_wynik(szachownica.biale_ruch ? 2 : 1);\n }\n else\n {\n // pat, remis\n napisz_wynik(3);\n }\n\n zablokowane = true;\n\n return;\n }\n\n // sprawdzanie pozostalych remisow\n if(szachownica.liczba_polowek_od_r > 100 || poprzednie_pozycje[szachownica.hash] >= 3 || !czy_wystarczajacy_material())\n {\n napisz_wynik(3);\n\n szachownica.biale_ruch = !szachownica.biale_ruch;\n zablokowane = true;\n\n return;\n }\n\n tablica_transp = new Map();\n\n let nr = Math.floor(Math.random() * (ruchy.ruchy.length + ruchy.zbicia.length));\n\n if(nr < ruchy.ruchy.length)\n ruch_t = ruchy.ruchy[nr];\n else\n ruch_t = ruchy.zbicia[nr - ruchy.ruchy.length];\n\n wykonaj_ruch(ruch_t);\n if(szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k] === 6 && ruch_t.wiersz_k === 7)\n {\n // promocja biale\n promuj_piona(ruch_t.wiersz_k, ruch_t.kolumna_k, Math.floor(Math.random() * 4) + 2);\n }\n else if(szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k] === 12 && ruch_t.wiersz_k === 0)\n {\n // promocja czarne\n promuj_piona(ruch_t.wiersz_k, ruch_t.kolumna_k, Math.floor(Math.random() * 4) + 8);\n }\n\n narysuj();\n}", "title": "" }, { "docid": "c97edce7df782b9bd3522d1599ac1e01", "score": "0.6194109", "text": "function sc_ore(ore_dec){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy). \n // scomposizione delle ore decimali [ore_dec], in hh |mm |ss. - tronca i decimali dei secondi senza applicare arrotondamenti.\n // restituisce la variabile stringa [ore_hms].\n // ATTENZIONE! La funzione riporta le ore all'interno dell'intervallo: 0-24.\n // agg: Dicembre 2011\n\n var ored=ore_24(ore_dec); // Intervallo ore: 0-24\n\n var ore= parseInt(ored); // Ore.\n var minuti= parseInt((ored-ore)*60); // Minuti.\n var secondi= parseInt(((ored-ore)*60-minuti)*60); // Secondi. \n\n ore= String(ore); // trasforma il numero in stringa.\n minuti= String(minuti ); // trasforma il numero in stringa. \n secondi= String(secondi); // trasforma il numero in stringa. \n\n //if (ore_dec<0){ore=\"-\"+ore;} // recupera il segno meno.\n\n if (ore.length<2 ){ ore='0'+ore;}\n if (minuti.length<2 ){ minuti='0'+minuti;}\n if (secondi.length<2){secondi='0'+secondi;}\n \n var ore_hms=ore+\"h. \"+minuti+\"m. \"+secondi+\"s.\";\n\t \nreturn ore_hms; \n\n}", "title": "" }, { "docid": "041ca65ed61be68a0c47028e905bf218", "score": "0.61254954", "text": "nuevoCiclo() {\n let suma = 0;\n for (let i = 0; i < this.vecinos.length; i++) {\n if (this.vecinos[i].estado === 1) {\n suma++;\n }\n }\n\n // Aplicamos las normas\n this.estadoProx = this.estado; // Por defecto queda igual\n\n // Vida: tiene 3 vecinos\n if (this.estado === 0 && suma === 3) {\n this.estadoProx = 1;\n }\n\n // Muerte: menos de 2(soledad) o mas de 3 (inanicion)\n if (this.estado == 1 && (suma < 2 || suma > 3)) {\n this.estadoProx = 0;\n }\n }", "title": "" }, { "docid": "d2ad0bd7a0ffc96a9698fd2d1532e932", "score": "0.611792", "text": "function auxNaipes(promedio) {\n let simbolo;\n\n if(promedio > 0 && promedio <= 19) \n simbolo = 'A';\n else if(promedio >= 20 && promedio <= 38) \n simbolo = 'B';\n else if(promedio >= 39 && promedio <= 57) \n simbolo = 'C';\n else if(promedio >= 58 && promedio <= 76) \n simbolo = 'D';\n else if(promedio >= 77 && promedio <= 95) \n simbolo = 'E';\n else if(promedio >= 96 && promedio <= 114) \n simbolo = 'F';\n else if(promedio >= 115 && promedio <= 133) \n simbolo = 'G';\n else if(promedio >= 134 && promedio <= 152) \n simbolo = 'H';\n else if(promedio >= 153 && promedio <= 171) \n simbolo = 'I';\n else if(promedio >= 172 && promedio <= 190) \n simbolo = 'J';\n else if(promedio >= 191 && promedio <= 209) \n simbolo = 'K';\n else if(promedio >= 210 && promedio <= 228) \n simbolo = 'L';\n else if(promedio >= 229 && promedio <= 256) \n simbolo = 'M';\n return simbolo;\n\n}", "title": "" }, { "docid": "825c31b3bd1e3a7b7390a1250b01e54e", "score": "0.6109771", "text": "function plato2sg (plato)\n{\n return (1 + (plato / (258.6 - ( (plato / 258.2) * 227.1) )));\n}", "title": "" }, { "docid": "58d31e1ca02cf3ff2fcf74fe66138898", "score": "0.61096877", "text": "function pos_sole(njd){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009\n // funzione per il calcolo della posizione del sole.\n // njd= numero dei giorni giuliani per il T.U. di Greenwich.\n // la data di riferimento per gli elementi orbitali è l'equinozio della data.\n\n var T=(njd-2415020.0)/36525;\n\n // Elementi orbitali per l'equinozio della data.\n \n Long_epoca=279.69668+36000.76892*T+0.0003025*T*T;\n\n ecc_orbita=0.01675104-0.0000418*T-0.000000126*T*T;\n\n M=358.47583+35999.04975*T-0.000150*T*T-0.0000033*T*T*T;\n\n Long_perigeo=gradi_360(Long_epoca-M);\n\n \n // correzioni ***************\n\n var A=153.23+22518.7541*T;\n var B=216.57+45037.5082*T;\n var C=312.69+32964.3577*T;\n var D=350.74+445267.1142*T-0.00144*T*T;\n var E=231.19+20.20*T;\n var H=353.40+65928.7155*T;\n\n // angoli in radianti.\n\n A=Rad(A); \n B=Rad(B); \n C=Rad(C); \n D=Rad(D); \n E=Rad(E); \n H=Rad(H); \n\n // correzione per la longitudine.\n\n var delta_L=0.00134*Math.cos(A)\n +0.00154*Math.cos(B)\n +0.00200*Math.cos(C)\n +0.00179*Math.sin(D)\n +0.00178*Math.sin(E);\n\n // correzioni per il raggio vettore.\n\n var delta_R=0.00000543*Math.sin(A)\n +0.00001575*Math.sin(B)\n +0.00001627*Math.sin(C)\n +0.00003076*Math.cos(D) \n +0.00000927*Math.sin(H);\n \nvar semiasse=0.999996;\n\n // calcolo Equazione di Keplero\n\n M=gradi_360(M); // intervallo 0-360;\n\n var E=eq_keplero(M,ecc_orbita); // equazione di Keplero.\n\n var anomalia_vera =E[1]; // restituisce l'anomalia vera in radianti.\n\n // calcola il valore del raggio vettore. \n \n var distanzas=semiasse*(1-ecc_orbita*Math.cos(E[0])); \n distanzas=distanzas+delta_R; // correzione per il raggio vettore.\n\n // calcola il diametro apparente del Sole in secondi d'arco.\n\n var diam_app=1919.22/distanzas;\n diam_app=diam_app.toFixed(1);\n\n // parallasse diurna del Sole in gradi.\n\n var parallasse=(8.794/3600)/distanzas;\n\n var longitudine_sole=Rda(anomalia_vera)+Long_perigeo; \n\n longitudine_sole=gradi_360(longitudine_sole+delta_L); // longitudine ecclittica del sole + correzione.\n\n\n // coordinate ecclittiche: longitudine_sole,0 per la latitudine.\n \nvar coord_sole=trasf_ecli_equa(njd,longitudine_sole,0); // trasforma le coordinate ecclittiche in equatoriali: AR,DEC.\n\n // ELENCO delle variabili restituite dalla funzione [pos_sole]. \n\n // coord_sole[0]=ascensione retta in ore decimali (già diviso * 15). calcolate dalla funzione trasf_ecli_equa.\n // coord_sole[1]=declinazione in gradi sessadecimali.\n coord_sole[2]=longitudine_sole; // longitudine in gradi sessadecimali.\n coord_sole[3]=M; // anomalia media.\n coord_sole[4]=distanzas; // distanza in U.A.\n coord_sole[5]=diam_app; // diametro apparente del Sole.\n coord_sole[6]=parallasse; // parallasse diurna in gradi. \n\nreturn coord_sole;\n\n}", "title": "" }, { "docid": "848ec4bcb7e3cf94852decf311cf2c5e", "score": "0.6095894", "text": "function AjPoFo() {\r\n \r\n if (perso.Por < 2) { //Test si assez d'argent\r\n alert(\"Vous n'avez pas assez d'argent\");\r\n console.log(\"Pas assez d'argent / nombre de potion = \"+ perso.Pinv[0]);\r\n } else {\r\n perso.Por -= 2; //Or du perso -2\r\n perso.Pinv[0] += 1; //Nombre de potion +1 \r\n document.getElementById('or').value = perso.Por; //affiche Or du perso dans la div caracteristique\r\n document.getElementById('nbPoFo').value = perso.Pinv[0]; //affiche le nombre de potion\r\n console.log(\"Achat d'une potion de force / nombre de potion = \"+ perso.Pinv[0]);\r\n }\r\n\r\n}", "title": "" }, { "docid": "8f48d9039b4f98b5bd25cee62c7bc179", "score": "0.6089337", "text": "function hitungLuasSegiTiga(alas,tinggi){\n var luas = 0.5 * alas * tinggi\n return luas\n}", "title": "" }, { "docid": "a861d7ca3cb2cf916889010f7988fb0c", "score": "0.60750705", "text": "function sommatoriaFinale() {\n if (sommatoria % 2 === 0) {\n return \"Pari\"\n } else {\n return \"Dispari\"\n }\n}", "title": "" }, { "docid": "a65ebf1e27edbbfedb62d28834dc59ad", "score": "0.60716426", "text": "function afase_luna(njd){\n\n // calcola l'angolo di fase della luna per la data (njd)\n // gennaio 2012\n\n var dati_luna=pos_luna(njd); // recupero fase/elongazione (1)\n var dati_sole=pos_sole(njd);\n\n var elongazione1=dati_luna[4]; // elongazione in gradi sessadecimali.\n var dist_luna=dati_luna[7]/149597870; \n var dist_sole=dati_sole[4]; // distanza del sole in UA.\n\n elongazione=Math.abs(elongazione1)*1;\n\n var dist_sl=dist_luna*dist_luna+dist_sole*dist_sole-2*dist_luna*dist_sole*Math.cos(Rad(elongazione)); // distanza sole-luna\n dist_sl=Math.sqrt(dist_sl);\n\n // calcolo dell'angolo di fase in gradi . \n\n var Dpt= dist_luna; // distanza pianeta-terra.\n var Dts= dist_sole; // distanza terra-sole.\n var Dps= dist_sl; // distanza pianeta-sole.\n\n // teorema del coseno\n\n var delta_fase=(Dts*Dts+Dps*Dps-Dpt*Dpt)/(2*Dps*Dts);\n delta_fase=Math.acos(delta_fase); \n delta_fase=Rda(delta_fase);\n\n var angolo_fase=180-elongazione-delta_fase; // angolo di fase in gradi.\n\n if(elongazione1<0) {angolo_fase=-angolo_fase; }\n\n return angolo_fase;\n\n}", "title": "" }, { "docid": "9dc11b5a857398fd453e8365a07a1880", "score": "0.60692614", "text": "function dvakrat(cislo) {\r\n return cislo * 2;\r\n}", "title": "" }, { "docid": "12d309d7a815d7dd335a87b6681cd611", "score": "0.6068932", "text": "esconder(){\n console.log(`${this._nombre} corre a ${this._velocidad}m/s y da un salto de ${this._salto}m y se esconde`)\n }", "title": "" }, { "docid": "82decf3703a378b7185a15aab0b1d364", "score": "0.6035072", "text": "getResultatCodificat(){ // SI EL MÈTODE NO PASSA ALGUN VALOR, SE LI POSSA this. MÉS EL ATRIBUT CORRESPONENT.\n this.eliminarEspaisBlanc();\n this.senseAccent();\n for (var i = 0; i < this._entrada.length; i++){\n\n // IGUALEM LA LLARGADA DE LA CLAU A LA DE L'ENTRADA\n var y = 0;\n var max_lenght = this._entrada.length;\n while (this._entrada.length != this._clau.length){\n\n this._clau = this._clau + this._clau[y];\n\n if(y >= max_lenght){\n\n y = 0;\n }\n else{\n\n y++;\n }\n }\n\n // BUSQUEM ON ESTAN SITUATS TANT LA LLETRA DE L'ENTRADA COM DE LA CLAU\n var posicio_lletra_entrada = this._alfabet.indexOf(this._entrada[i]);\n var posicio_lletra_clau = this._alfabet.indexOf(this._clau[i]);\n\n // SUMEM LES DUES POSICIONS\n var suma_posicions = posicio_lletra_entrada + posicio_lletra_clau;\n\n // ANEM RESTANT MENTRE QUE EL MOD SIGUI MÉS GRAN QUE EL LENGTH DEL ABECEDARI\n while (suma_posicions >= this._alfabet.length){\n\n suma_posicions = suma_posicions - this._alfabet.length;\n }\n \n // ARA BUSQUEM LA LLETRA AMB LA QUAL SUBSTITUIREM L'ENTRADA\n this._resultat = this._resultat + this._alfabet[suma_posicions];\n }\n\n // RETORNEM EL RESULTAT\n return (document.form.sortida.value = this._resultat);\n }", "title": "" }, { "docid": "972659dc8b861d41c278b198e8fa40ce", "score": "0.6034024", "text": "function couleur()\n {\n\treturn 25000 * (0|pos_actuelle()/5 + 1);\n }", "title": "" }, { "docid": "9870dd01b1643abd9d0ce16ebab003eb", "score": "0.6020883", "text": "function mossa(pos)\n{\n//reset in casella statistiche e messaggi a sinistra dello schermo\n\tdocument.getElementById(\"faccia\").innerHTML=\"(• ‿ •)\";\n\tif(colturno=='n')\n\t\tdocument.getElementById(\"messaggi\").innerHTML=\"tocca ai neri\";\n\telse\n\t\tdocument.getElementById(\"messaggi\").innerHTML=\"tocca ai bianchi\";\n\n/*_________________________PRIMO CLICK___________________________________*/\n\n\tif(cont%2==0)\n\t{\n\t\tprimo=document.getElementById(pos).innerHTML;\n\t\tvecchiaPos=pos;\n\t\t//ottengo colore giocatore\n\t\tvar lenstr=primo.length;\n\t\tvar colp=primo.charAt(lenstr-7);\n\t\t//controllo se la selezione corrisponde al colore della mossa\n\t\tif(colp!=colturno)\n\t\t{\n\t\t\tdocument.getElementById(\"messaggi\").innerHTML=\"mossa non valida...\";\n\t\t\tdocument.getElementById('faccia').innerHTML=\"(ಠ╭╮ಠ)\";\n\t\t\t\treturn;//esce dalla funzione in caso di selezione colore sbagliato\n\t\t}\n\n\t\t//cambia colore selezionato\n\t\tdocument.getElementById(pos).className=\"selezionato\";\n\t\t//controllo pedina + selezione mosse possibili\n\t\tSeleziona(primo, colp, colturno, pos);\n\t\t\n\t}\n//_____________________________SECONDO CLICK___________________________//\n\n\telse\n\t{\n\t\t//SE LA MOSSA E' VALIDA\n\t\tif(document.getElementById(pos).className==\"selezionato\"&&pos!=vecchiaPos)\n\t\t{\n\t\t\t//se viene mangiata una pedian avversaria, la faccia si stupisce e viene salvata la pedina mangiata in un array\n\t\t\tif(document.getElementById(pos).innerHTML!='<img src=\"imm/vuota.png\">')\n\t\t\t{\n\t\t\t\tdocument.getElementById('faccia').innerHTML=\"(^ ‿ ^)\";\n\t\t\t\tif(colturno=='b')//se era nera\n\t\t\t\t\tmangiate_n.push(document.getElementById(pos).innerHTML);\n\t\t\t\telse\t//se era bianca\n\t\t\t\t\tmangiate_b.push(document.getElementById(pos).innerHTML);\n\t\t\t}\n\t\t\t//se viene mangiato il re finisce il gioco\n\t\t\tif(document.getElementById(pos).innerHTML=='<img src=\"imm/re_b.png\">')//vincono i neri\t\t\t\n\t\t\t\tfine(true);\n\t\t\telse if(document.getElementById(pos).innerHTML=='<img src=\"imm/re_n.png\">')//vincono i bianchi\t\t\t\n\t\t\t\tfine(false);\n\t\t\t\n\t\t\t/*_____________________CONTROLLO ARROCCO____________________*/\n\t\t\tif(pos==\"13\" && isArrocco==true)//nero sx\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"14\").innerHTML='<img src=\"imm/torre_n.png\">'; //assegna alla nuova casella la pedina\n\t\t\t\tdocument.getElementById(\"11\").innerHTML=\"<img src='imm/vuota.png'>\"; //cancella la pedina nella vecchia casella\n\t\t\t\tarrocco[0]=false;\n\t\t\t}\n\t\t\telse if(pos==\"17\" && isArrocco==true)//nero dx\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"16\").innerHTML='<img src=\"imm/torre_n.png\">'; //assegna alla nuova casella la pedina\n\t\t\t\tdocument.getElementById(\"18\").innerHTML=\"<img src='imm/vuota.png'>\"; //cancella la pedina nella vecchia casella\n\t\t\t\tarrocco[0]=false;\n\t\t\t}\n\t\t\telse if(pos==\"83\" && isArrocco==true)//bianco sx\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"84\").innerHTML='<img src=\"imm/torre_b.png\">'; //assegna alla nuova casella la pedina\n\t\t\t\tdocument.getElementById(\"81\").innerHTML=\"<img src='imm/vuota.png'>\"; //cancella la pedina nella vecchia casella\n\t\t\t\tarrocco[3]=false;\n\t\t\t}\n\t\t\telse if(pos==\"87\" && isArrocco==true)//bianco dx\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"86\").innerHTML='<img src=\"imm/torre_b.png\">'; //assegna alla nuova casella la pedina\n\t\t\t\tdocument.getElementById(\"88\").innerHTML=\"<img src='imm/vuota.png'>\"; //cancella la pedina nella vecchia casella\n\t\t\t\tarrocco[3]=false;\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//se è stato mossa una pedina per l'arrocco, ma non è stato fatto (quindi l'arrocco non è più possibile per quelle pedine)\n\t\t\tvar sum=[\"15\", \"11\", \"18\", \"85\", \"81\", \"88\"]\n\t\t\tfor(var i=0; i<6; i++)\n\t\t\t{\n\t\t\t\tif(vecchiaPos==sum[i])\n\t\t\t\t\tarrocco[i]=false;\n\t\t\t\t\t\n\t\t\t}\n\t\t\t//spostamento pedine\n\t\t\tdocument.getElementById(pos).innerHTML=primo; //assegna alla nuova casella la pedina\n\t\t\tdocument.getElementById(vecchiaPos).innerHTML=\"<img src='imm/vuota.png'>\"; //cancella la pedina nella vecchia casella\n\t\t\t//cambiamenti finali\n\t\t\tcontrolloPedoneFinal(pos,primo);//controlla se la pedina spostata era un pedone è arrivato alla parte opposta della scacchiera\n\t\t\tturno++;\n\t\t\ttimersec=300;\n\t\t\tdocument.getElementById(\"mosse\").innerHTML=\"mossa numero: \"+turno;\n\t\t\t//indica a chi tocca il turno successivo\n\t\t\tif(colturno=='b')\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"messaggi\").innerHTML=\"tocca ai neri\";\n\t\t\t\tcolturno='n';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"messaggi\").innerHTML=\"tocca ai bianchi\";\n\t\t\t\tcolturno='b';\n\t\t\t}\n\t\t}\n\t\t//SE LA MOSSA NON E' VALIDA\n\t\telse\n\t\t\tdocument.getElementById(\"messaggi\").innerHTML=\"mossa non valida!!!\";\n\t\t\n\t\tDeseleziona();//deseleziona tutto\n\t\tvisualEaten();//visualizza le pedine mangiate\t\n\t}\n\tcont++;\n}", "title": "" }, { "docid": "912d3cb10c971329bcba90d60b3e4ca9", "score": "0.5989647", "text": "resumen_estado_nave(){\n this.ajuste_potencia();\n if (typeof this._potencia_disponible !== \"undefined\"){\n if (this._potencia_disponible){\n let estado_plasma = \"\";\n for (let i = 0; i < this._injectores.length; i++) {\n estado_plasma += \"Plasma \"+i.toString()+\": \";\n let total = this._injectores[i].get_plasma+this._injectores[i].get_extra_plasma;\n estado_plasma += total+\"mg/s \";\n }\n console.log(estado_plasma);\n\n for (let i = 0; i < this._injectores.length; i++) {\n if (this._injectores[i].get_danio_por<100){\n if (this._injectores[i].get_extra_plasma>0){\n console.log(\"Tiempo de vida: \"+this._injectores[i].tiempo_vuelo().toString()+\" minutos.\");\n } else {\n console.log(\"Tiempo de vida infinito!\");\n break;\n }\n }\n }\n } else {\n console.log(\"Unable to comply.\")\n console.log(\"Tiempo de vida 0 minutos.\")\n }\n } else {\n throw \"_potencia_disponible: NO DEFINIDA\";\n }\n }", "title": "" }, { "docid": "6fdbe497ada5ca655f0efee4040cd8a7", "score": "0.5989247", "text": "function sceltagiocata(scelta,segno){\n var scelta = Math.random();\n if (scelta<=0.33) {\n segno=\"Sasso\";\n }\n else if (scelta>0.33 && scelta<=0.66) {\n segno=\"Carta\";\n }\n else if (scelta>0.66) {\n segno=\"Forbici\";\n }\n return segno;\n}", "title": "" }, { "docid": "01577a1bcbb860b04e4a7c30c2ce0549", "score": "0.5984454", "text": "function maakSom() {\n\t// Maak de som\n\tgetal1 = parseInt((9 * Math.random()) + 2);\n\tgetal2 = parseInt((9 * Math.random()) + 2);\n\tantwoord = parseInt(getal1) * parseInt(getal2);\n\n\t// Toon som in vak met id 'som'\n\tdocument.getElementById(\"som\").innerHTML = getal1 + \" x \" + getal2 + \" =\";\n}", "title": "" }, { "docid": "c81fb30d2a3716917b7d754a6539c152", "score": "0.59834605", "text": "function TinhTheoLoaiXe(sokm, tgcho, giaLoai1, giaLoai2, giaLoai3, tgChoTheoLoai) {\n var tien = 0;\n if (sokm <= 1) {\n tien = sokm * giaLoai1 + tgcho * tgChoTheoLoai;\n // console.log(tien);\n } else if (sokm > 1 && sokm < 21) {\n tien = giaLoai1 + (sokm - 1) * giaLoai2 + tgcho * tgChoTheoLoai;\n // console.log(tien);\n } else if (sokm >= 21) {\n tien = giaLoai1 + 19 * giaLoai2 + (sokm - 20) * giaLoai3 + tgcho * tgChoTheoLoai;\n // console.log(tien);\n }\n return document.getElementById('xuatTien').innerHTML = tien + ' vnđ';\n}", "title": "" }, { "docid": "29cb41066425d723045ba253ca4b4b05", "score": "0.5977305", "text": "function saiyan() {\n Object.defineProperty(this,\"estatura\",{value:\"\",writable:true});\n Object.defineProperty(this,\"peso\",{value:0,writable:true});\n Object.defineProperty(this,\"ocupacion\",{value:\"\",writable:true});\n Object.defineProperty(this,\"cola\",{value:false,writable:true});\n\n Object.defineProperties(this,{\n \"obtenEstatura\":{get: function(){return this.estatura;}},\n \"obtenPeso\":{get: function(){return this.peso;}},\n \"obtenOcupacion\":{get: function(){return this.ocupacion;}},\n \"obtenCola\":{get: function(){return this.cola;}},\n \"setEstatura\":{set: function(estatura){this.estatura = estatura;}},\n \"setPeso\":{set: function(peso){this.peso = peso;}},\n \"setOcupacion\":{set: function(ocu){this.Ocupacion = ocu;}},\n \"setCola\":{set: function(cola){this.cola = cola;}}\n });\n\n this.engorda = function(comida){\n var n = 0;\n parseInt(n);\n if(comida != \"\"){\n n = 1;\n return n;\n } else {\n return n;\n }\n };\n}", "title": "" }, { "docid": "7f1adb193a9aed5e570a3d751fc3240c", "score": "0.5953342", "text": "function Suma(one, two) {\n let resultado = one + two;\n //console.log(suma)\n // return te permite regresar un valor de esa funcion\n return resultado;\n}", "title": "" }, { "docid": "1cbb46b25618ab3fe9d9c626c76f2b02", "score": "0.5948398", "text": "function sc_oresd(ore_dec){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy). \n // scomposizione delle ore decimali [ore_dec], in hh |mm |ss.decimali con 2 decimali.\n // restituisce la variabile stringa [ore_hms].\n // ATTENZIONE! La funzione riporta le ore all'interno dell'intervallo: 0-24.\n // agg: Dicembre 2011\n \n var ored=ore_24(ore_dec); // Intervallo ore: 0-24\n\n var ore= parseInt(ored); // Ore.\n var minuti= parseInt((ored-ore)*60); // Minuti.\n var secondi= (((ored-ore)*60-minuti)*60).toFixed(2); // Secondi con 2 decimali.\n\n // verifica arrotondamenti. \n\n if (secondi>=60){secondi=secondi-60; minuti=minuti+1;}\n if ( minuti>=60){ minuti= minuti-60; ore=ore+1; }\n if ( ore>=24){ ore=ore_24(ore);} // Intervallo ore: 0-24\n \n ore= String(ore); // trasforma il numero in stringa.\n minuti= String(minuti ); // trasforma il numero in stringa. \n secondi= String(secondi); // trasforma il numero in stringa. \n \n if (ore.length<2 ){ ore='0'+ore;}\n if (minuti.length<2 ){ minuti='0'+minuti;}\n if (secondi.length<=4){secondi='0'+secondi;}\n\n var ore_hms=ore+\"h. \"+minuti+\"m. \"+secondi+\"s.\";\n\t \nreturn ore_hms; \n\n}", "title": "" }, { "docid": "7669016c9525b948cb978702bdf85e3a", "score": "0.5941978", "text": "function adivinarSexoEstudiante(estudiantes) {\n //valor que se utilizará para comparar\n var resultado = 100000;\n //tupla que almacenará la posición más cercana \n var numeroTupla = 0;\n //for que recorre todos los datos como parámetro de la consulta \n //de la tabla de estudiantes\n for (var i = 0; i < estudiantes.length; i++) {\n var recintoTupla = 1;\n var estiloTupla = 0;\n \n \n //se le da valor a los recintos que pertenecen las personas en las\n //tuplas si es paraíso es 1 y turrialba es 2 \n if (estudiantes[i].recinto === 'Turrialba') {\n recintoTupla = 2;\n }\n //se elige el estilo de aprendizaje y se le asigna un valor\n //de 1 a 4\n switch (estudiantes[i].estilo) {\n case 'DIVERGENTE':\n estiloTupla = 1;\n break;\n case 'CONVERGENTE':\n estiloTupla = 2;\n break;\n case 'ASIMILADOR':\n estiloTupla = 3;\n break;\n case 'ACOMODADOR':\n estiloTupla = 4;\n break;\n }\n \n //distancia euclidiana aplicada a los valores de las tuplas para definir distancia\n var sumatoria = Math.pow((estiloTupla - (parseInt(document.getElementById('estilo').value))), 2) + Math.pow(recintoTupla - (parseInt(document.getElementById('recinto').value)), 2) + Math.pow((parseFloat(estudiantes[i].promedio)) - (parseFloat(document.getElementById('promedio').value)), 2);\n var distancia = Math.sqrt(sumatoria);\n \n //aquí comparan para mostrar el más cercano al que entra como parámetro\n //comparando los datos de la tupla y los ingresados\n if (resultado > distancia) {\n resultado = distancia;\n numeroTupla = i;\n } \n }\n \n //if para mostrar el sexo en la pantalla dependiendo de la tupla\n if(estudiantes[numeroTupla].sexo === 'M')\n document.getElementById('mensaje3').innerHTML = 'Su sexo es: Masculino y el número de tupla es: '+estudiantes[numeroTupla].id+'.';\n else\n document.getElementById('mensaje3').innerHTML = 'Su sexo es: Femenino y el número de tupla es: '+estudiantes[numeroTupla].id+'.';\n}", "title": "" }, { "docid": "8d8af2a3c8a2ed541e7c1fa6f30319b6", "score": "0.5939468", "text": "sacar(valor) {\n const taxa = 1.2;\n super._sacar(taxa, valor);\n }", "title": "" }, { "docid": "60a799ba1375c16cccb99702970153ff", "score": "0.5920631", "text": "irAlBoss(){\n this.salaActual = new Sala(this.salaActual.jugador, this.salaActual, posicionSala.bossBatle, \"Boss.txt\",5, this.counterId++);\n }", "title": "" }, { "docid": "581b02be903f84bcd48b0fa05ef50738", "score": "0.5920526", "text": "function sedePromo(sede, promo) {\n // respondiendo primera pregunta. Hallando la cantidad de alumnas y el porcentaje recorriendo un array se puede contar cuantas alumnas hay\n var arr = data[sede][promo]['students'];\n var cant = 0;\n var nocant = 0;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i].active === true) {\n cant++;\n } else {\n nocant++;\n }\n }\n var calculandoPorcentaje = parseInt((nocant / arr.length) * 100);\n total.textContent = cant;\n porcentaje.textContent = calculandoPorcentaje + '%';\n /* ***************************************************Cantida de alumnas que superan el objetivo*****************************************************/\n var sumaScore = 0;\n for (var i = 0; i < arr.length; i++) {\n debugger;\n var sumaHse = 0;\n var sumaTech = 0;\n for (var j = 0; j < data[sede][promo]['students'][i]['sprints'].length; j++) {\n var tech = data[sede][promo]['students'][i]['sprints'][j]['score']['tech'];\n var hse = data[sede][promo]['students'][i]['sprints'][j]['score']['hse'];\n sumaHse = sumaHse + hse;\n sumaTech = sumaTech + tech;\n }\n if (sumaHse > 3360 && sumaTech > 5040) {\n sumaScore++;\n }\n }\n meta.innerHTML = sumaScore;\n /* ***************************************************************cantida de nps*********************************************************************/\n var arrNps = data[sede][promo]['ratings'];\n var sum = 0;\n var npsTotal = 0;\n for (var i = 0; i < arrNps.length; i++) {\n var npsPromoters = data[sede][promo]['ratings'][i]['nps']['promoters'];\n var npsDetractors = data[sede][promo]['ratings'][i]['nps']['detractors'];\n var npsPassive = data[sede][promo]['ratings'][i]['nps']['passive'];\n var npsResta = npsPromoters - npsDetractors;\n sum = sum + npsResta;\n var npsSuma = npsPromoters + npsDetractors + npsPassive;\n npsTotal = npsTotal + npsSuma;\n }\n var promoterPorcentaje = parseInt((npsPromoters / npsTotal) * 100);\n var detractorsPorcentaje = parseInt((npsDetractors / npsTotal) * 100);\n var passivePorcentaje = parseInt((npsPassive / npsTotal) * 100);\n var totalNps = sum / arrNps.length;\n nps.textContent = totalNps.toFixed(2);\n npsPorciento.innerHTML = promoterPorcentaje + '% Promoters' + '<br>' + detractorsPorcentaje + '% Passive' + '<br>' + passivePorcentaje + '% Detractors';\n /* *********************************************calculando los puntos obtenidos en tech********************************************************************/\n var cantidadTech = 0;\n for (var i = 0; i < arr.length; i++) {\n var arrSprint = data[sede][promo]['students'][i]['sprints'];\n var sumTech = 0;\n for (var j = 0; j < arrSprint.length; j++) {\n var tech2 = data[sede][promo]['students'][i]['sprints'][j]['score']['tech'];\n sumTech = sumTech + tech2;\n if (sumTech > (1260 * 4)) {\n cantidadTech++;\n }\n }\n }\n pointTech.textContent = cantidadTech;\n /* ********************************************************calculando los puntos en hse*******************************************************************/\n var cantidadHse = 0;\n for (var i = 0; i < arr.length; i++) {\n var arrSprint = data[sede][promo]['students'][i]['sprints'];\n var sumHse = 0;\n for (var j = 0; j < arrSprint.length; j++) {\n var hse2 = data[sede][promo]['students'][i]['sprints'][j]['score']['hse'];\n sumHse = sumHse + hse2;\n if (sumHse > (840 * 4)) {\n cantidadHse++;\n }\n }\n }\n pointHse.textContent = cantidadHse;\n /* **************************************porcentaje de la expectativa de las alumnas respecto a laboratoria**************************************************/\n var sumaExpectativa = 0;\n for (var i = 0; i < arrNps.length; i++) {\n var studentNoCumple = data[sede][promo]['ratings'][i]['student']['no-cumple'];\n var studentCumple = data[sede][promo]['ratings'][i]['student']['cumple'];\n var studentSupera = data[sede][promo]['ratings'][i]['student']['supera'];\n var Expectativa = ((studentSupera + studentCumple) / (studentNoCumple + studentCumple + studentSupera)) * 100;\n sumaExpectativa = sumaExpectativa + Expectativa;\n }\n var porcentajeExpectativa = parseInt(sumaExpectativa / arrNps.length);\n boxExpectativa.textContent = porcentajeExpectativa + '%';\n /* *********************************************promedio de los profesores********************************************************************/\n var promedioTeacher = 0;\n for (var i = 0; i < arrNps.length; i++) {\n var teacher = data[sede][promo]['ratings'][i]['teacher'];\n promedioTeacher = (promedioTeacher + teacher) / arrNps.length;\n }\n boxTeacher.textContent = promedioTeacher.toFixed(2);\n /* *************************************************promedio jedi*****************************************************************/\n var promedioJedi = 0;\n for (var i = 0; i < arrNps.length; i++) {\n var jedi = data[sede][promo]['ratings'][i]['jedi'];\n promedioJedi = (promedioJedi + jedi) / arrNps.length;\n }\n boxJedi.textContent = promedioJedi.toFixed(2);\n }", "title": "" }, { "docid": "2657dcefdf375725666024703706f479", "score": "0.5914156", "text": "iluminarSecuencia() {\n for (let i = 0; i < this.nivel; i++) {\n //el numero que nos den (1) va a la funcion transformar.. y nos va a devolver un texto ('celeste')\n //importante poner const para eliminar bug en los ciclos\n const color = this.transformarNumeroAColor(this.secuencia[i]);\n //la funcion iliminarColor se va a ejecutar cada 1 segundo multiplicado por i para que la secuncia se vea cada color\n setTimeout(() => {\n this.iluminarColor(color);\n }, 800 * i);\n this.cambioColorFondo(color);\n }\n }", "title": "" }, { "docid": "2dbc0bfa923a72b3dbcb584b216c7362", "score": "0.5907094", "text": "sacar(valor) {\n let taxa = 1.1;\n return this._sacar(taxa, valor); // ou super._sacar(taxa valor)\n }", "title": "" }, { "docid": "636843045e482ea3c70f0f105277c947", "score": "0.59059364", "text": "function reestablece(){\n colector = \"0\";\n operacion = \"\";\n operador0 = 0;\n operador1 = 0;\n resultado = 0;\n iteracion = 0;\n }", "title": "" }, { "docid": "98d1c348086d7d7a64a0fdc4ff36bbcd", "score": "0.5889627", "text": "function obrisi_sekvencu(kliknuta_kartica) {\r\n\t// koji igrac zeli ponovo da popuni kombinaciju\r\n\tvar br_igraca = nadji_igraca(kliknuta_kartica);\r\n\tif (br_igraca == 1) {\r\n\t\tlocalStorage.setItem(\"sekvenca_zemalja1\", \"\");\r\n\t\t//sekvenca_zemalja1 = [];\r\n\t}\r\n\r\n\tif (br_igraca == 2) {\r\n\t\tlocalStorage.setItem(\"sekvenca_zemalja2\", \"\");\r\n\t\t//sekvenca_zemalja2 = [];\r\n\t}\r\n\r\n\t//dohvati sve kartice kako bi ih sve obrisao\r\n\tvar _niz = document.querySelectorAll(\"div.kartica\");\r\n\r\n\r\n\tvar vracen_fokus_na_prvu_karticu = 0;\r\n\t// 4 za po svakog igraca posto smo dohvatili sve kartice, a zelimo da brisemo samo za jednog\r\n\tfor (let i = 0; i < 8; i++) {\r\n\t\tlet vlasnik__niz = nadji_igraca(_niz[i]);\r\n\t\tif (vlasnik__niz != br_igraca) continue;\r\n\t\telse {\r\n\t\t\t// kada obrise sekvencu da se ispise ? na kartici\r\n\t\t\t_niz[i].innerHTML = \"<img class='icon' src='skocko-dodatno/upitnik2.png' alt='?'>\";\r\n\t\t\t_niz[i].classList.remove(mesto_fokusa[br_igraca]);\r\n\r\n\t\t\t// prva na koju naidjemo je zapravo prva kartica od tog igraca i na nju treba da se vratimo kada sve obrisemo\r\n\t\t\tif (vracen_fokus_na_prvu_karticu == 0) {\r\n\t\t\t\t_niz[i].classList.add(mesto_fokusa[br_igraca]);\r\n\t\t\t\tvracen_fokus_na_prvu_karticu = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "b92c9d0014c65cf5f5a85d61ab0b3e66", "score": "0.588688", "text": "function saludo111(){\n console.log(\"Hola buen dia 1\");\n console.log(\"Hola buen dia 2\");\n console.log(\"Hola buen dia 3\");\n console.log(\"Hola buen dia 4\");\n console.log(\"Hola buen dia 5\");\n console.log(\"Hola buen dia 6\");\n console.log(\"Hola buen dia 7\");\n }", "title": "" }, { "docid": "34eb2cbe2a0052c14afd420aa58fd765", "score": "0.5869252", "text": "function ucapSalam() {\n return \"Selamat Siang\"; //return nilai harus membuat satu variable utk meyimpan nilai yang akan di return\n}", "title": "" }, { "docid": "ad394c67ab5fb2a25881744594287191", "score": "0.5867399", "text": "function auxDomino(promedio) {\n let simbolo;\n\n if (promedio > 0 && promedio <= 25)\n simbolo = '1';\n else if (promedio >= 26 && promedio <= 50)\n simbolo = '2';\n else if (promedio >= 51 && promedio <= 75)\n simbolo = '3';\n else if (promedio >= 76 && promedio <= 100)\n simbolo = '4';\n else if (promedio >= 101 && promedio <= 125)\n simbolo = '5';\n else if (promedio >= 126 && promedio <= 150)\n simbolo = '6';\n else if (promedio >= 151 && promedio <= 175)\n simbolo = '7';\n else if (promedio >= 176 && promedio <= 200)\n simbolo = '8';\n else if (promedio >= 201 && promedio <= 225)\n simbolo = '9';\n else if (promedio >= 226 && promedio <= 256)\n simbolo = '0';\n return simbolo;\n\n}", "title": "" }, { "docid": "cf87374eb2ebe71cf031c60e932423d2", "score": "0.5861921", "text": "generaSecuencia() {\n this.secuencia = new Array(this.Ultimo_nivel)\n .fill(0)\n .map((n) => Math.floor(Math.random() * 4));\n }", "title": "" }, { "docid": "9c32045d71988759c9aa36fa8deb113b", "score": "0.5846958", "text": "function ST_SOLE(njd,LON,LAT,ALT){\n\n // metodo iterativo per calcolare il sorgere il transito e il tramontare del Sole.\n // by Salvatore Ruiu Irgoli-Sardegna (Italy). Luglio 2012.\n // gli istanti sono espressi in T.U. di Greenwich.\n // oltre ai tempi calcola gli azimut del sorgere e del tramontare.\n // Nel calcolo si tiene conto della rifrazione atmosferica (34'), dell'altitudine dell'osservatore e del raggio apparente del Sole (vedi funzione ST_ASTRO_DATA()).\n\n var p_astro=0; // posizione del sole \n var tempo_sorgere=0; // tempo del sorgere.\n var tempo_tramonto=0; // tempo del tramonto.\n var tempo_transito=0; // tempo transito.\n var azimut_sorgere=0; // azimut sorgere.\n var azimut_tramonto=0; // azimut tramonto.\n var st_astri_sl=0; //\n\n njd=jdHO(njd); // riporta il g.g. della data, all'ora H0(zero) del giorno. \n\n var njd1=njd; // numero del Giorno Giuliano.\n var raggio=0.25; // raggio apparente del sole.\n\n \n // **** Inizio delle 5 iterazioni per il calcolo del Sorgere del Sole.\n\n for (a=0; a<5; a++) {\n\n p_astro=pos_sole(njd1); // recupera l'AR la DE e il raggio apparente del Sole.\n raggio=p_astro[5]/3600/2; // raggio apparente del Sole in gradi.\n st_astri_sl=ST_ASTRO_DATA(njd1,p_astro[0],p_astro[1],LON,LAT,ALT,raggio);\n tempo_sorgere=st_astri_sl[2]; // istante del sorgere.\n njd1=njd+tempo_sorgere/24;\n }\n\n azimut_sorgere=st_astri_sl[0]; // azimut del sorgere.\n \n // **** Inizio delle 5 iterazioni per il calcolo del transito del Sole.\n\n for (a=0; a<5; a++) {\n\n p_astro=pos_sole(njd1); \n p_app=pos_app(njd1,p_astro[0],p_astro[1]); // coordinate equatoriali apparenti\n raggio=p_astro[5]/3600/2; \n st_astri_sl=ST_ASTRO_DATA(njd1,p_app[0],p_app[1],LON,LAT,ALT,raggio);\n tempo_transito=st_astri_sl[3]; // istante del transito.\n njd1=njd+tempo_transito/24;\n }\n \n // **** Inizio delle 5 iterazioni per il calcolo del tramontare del Sole.\n\n for (a=0; a<5; a++) {\n\n p_astro=pos_sole(njd1);\n raggio=p_astro[5]/3600/2;\n st_astri_sl=ST_ASTRO_DATA(njd1,p_astro[0],p_astro[1],LON,LAT,ALT,raggio);\n tempo_tramonto=st_astri_sl[4]; // istante del tramonto.\n njd1=njd+tempo_tramonto/24;\n }\n \n azimut_tramonto=st_astri_sl[1]; // azimut del tramontare.\n\nvar tempi_st= new Array(azimut_sorgere,azimut_tramonto,tempo_sorgere,tempo_transito,tempo_tramonto) ; \n// VARIABILI RESTITUITE 0 1 2 3 4\n\nreturn tempi_st;\n\n}", "title": "" }, { "docid": "6f308e0285e8e578d51a43a3315e932b", "score": "0.58413976", "text": "function operacion(){\r\n if (numeros.segundo === null || numeros.segundo === \"\" || Number.isNaN(numeros.segundo)){ \r\n return raiz(); // Si hay un solo número, llamar a la funcion raiz\r\n } else {\r\n return aritmetica(); // Si hay dos a la función aritmética\r\n }\r\n }", "title": "" }, { "docid": "8500be326da9ad0be230acadd315d1c0", "score": "0.5829119", "text": "function selecaoLivro(i, livros) {\n\n\n //Variavel para armazenar a quantidade de incones de estrelas de acordo com a nota do livro \n let qntEstrelas = ''\n //Quantas estrelas inteiras o livro tem \n for (var j = 1; j < livros[i][2]; j++) {\n console.log(j)\n qntEstrelas += `\n <img src=\"icones/star.svg\" alt=\"icone de strela\">\n `\n console.log(qntEstrelas)\n }\n\n //Se a nota do livro tiver parte decimal...\n if (livros[i][2] % 1 != 0) {\n //Se a parte decimal for maior do que 0,5 o livro ganha uma estrela completa(arredonda pra cima)\n if (livros[i][2] % 1 > 0.5) {\n qntEstrelas += `\n <img src=\"icones/star.svg\" alt=\"icone de strela\">\n `\n //Se não o livro ganha meia estrela\n } else {\n qntEstrelas += `\n <img src=\"icones/star-half-full.svg\" alt=\"icone de strela quase cheia\">\n `\n console.log(qntEstrelas)\n }\n } else {\n //Atribuindo a estrela caso livro não tenha parte decimal\n //A ultima estrela é atribuida depois para que caso o livro tenha parte decimal ela não seja atribuida 2 vezes\n //Uma pela parte decimal no for\n //E outra na validação se a parte decimal é maior que 0.5(Estrela interia), ou menor ou igual(Meia estrela)\n qntEstrelas += `\n <img src=\"icones/star.svg\" alt=\"icone de strela\">\n `\n }\n\n //Pagina do livro pra detalhes\n //Não troca de pagina para entrar em detalher a pagina apenas alteras suas infos\n let paginaCompleta = `\n\n <div class=\"root\">\n <div class=\"livroEscolido\">\n <div>\n <img src=${livros[i][6]}>\n </div>\n <div class=\"centralize\">\n <div>\n <div>\n <h3>${livros[i][0]}</h3>\n <h3>${livros[i][1]}</h3>\n </div>\n <p>\n ${livros[i][5]}\n </p>\n <h4>${livros[i][4]}</h4>\n\n <div class=\"addLista\">\n <button id=\"${i}\" onclick=\"inserirLivro(this.id, minhaLista)\">Adicionar á minha lista</button>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"detalhes\">\n <header class=\"titulo\">\n <a href=\"index.html\">\n <img class=\"retorno\" src=\"icones/arrow-left-circle.svg\">\n </a>\n <img class=\"logo\" src=\"imagens/logotipo.png\">\n </header>\n\n <div>\n <div>\n <h1>${livros[i][0]} - ${livros[i][1]}</h1>\n </div>\n <div>\n <div class=\"areaAvaliacao\">\n `\n //Definindo cor do quadrado de avaliação \n if (livros[i][2] >= 3.5) {\n paginaCompleta = paginaCompleta + `\n <div class=\"quadradoNota verde\">${livros[i][2]}</div>\n `} else if (livros[i][2] > 1.5 && livros[i][2] < 3.5) {\n paginaCompleta = paginaCompleta + `\n <div class=\"quadradoNota amarelo\">${livros[i][2]}</div>\n `} else {\n paginaCompleta = paginaCompleta + `\n <div class=\"quadradoNota vermelho\">${livros[i][2]}</div>\n `}\n\n paginaCompleta = paginaCompleta + `\n <div class=\"avaliacao\">\n <div>\n ${qntEstrelas}\n </div>\n <p>\n ${livros[i][3]} avaliações\n </p>\n </div>\n </div>\n\n <div class=\"resenha\">\n <h3>Resenha</h3>\n <p>\n ${livros[i][7]}\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n <script type=\"text/javascript\" src=\"funcoes.js\"></script>\n </script>\n\n \n `\n //Esperando transição de tela\n setTimeout(function () {\n //Chamando função reponsavel pela atualização dos dados da pagina \n criarPagina(paginaCompleta)\n }, 1000);\n}", "title": "" }, { "docid": "b980b896b1cf17a7b3cf4f3a1636e13b", "score": "0.58285147", "text": "function mostrarEstrellas(puntaje) {\r\n let estrellaVacia = '<span class=\"fa fa-star>\"</span>'\r\n let estrellaLlena = '<span class=\"fa fa-star\"checked></span>'\r\n \r\n \r\n let puntajeEstrella = \"\"\r\n \r\n for(let i = 0; i < puntaje ; i++){\r\n puntajeEstrella += estrellaLlena\r\n }\r\n for(let i = 0; i < (5-puntaje) ; i++){\r\n puntajeEstrella += estrellaVacia\r\n }\r\n return puntajeEstrella\r\n}", "title": "" }, { "docid": "15b5e4a7ee044340964b9302e0170f2f", "score": "0.5822587", "text": "function auxLetras(promedio) {\n let simbolo;\n\n if (promedio > 0 && promedio <= 15)\n simbolo = 'M';\n else if (promedio >= 16 && promedio <= 31)\n simbolo = 'N';\n else if (promedio >= 32 && promedio <= 47)\n simbolo = 'H';\n else if (promedio >= 48 && promedio <= 63)\n simbolo = '#';\n else if (promedio >= 64 && promedio <= 79)\n simbolo = 'Q';\n else if (promedio >= 80 && promedio <= 95)\n simbolo = 'U';\n else if (promedio >= 96 && promedio <= 111)\n simbolo = 'A';\n else if (promedio >= 112 && promedio <= 127)\n simbolo = 'D';\n else if (promedio >= 128 && promedio <= 143)\n simbolo = '0';\n else if (promedio >= 144 && promedio <= 159)\n simbolo = 'Y';\n else if (promedio >= 160 && promedio <= 175)\n simbolo = '2';\n else if (promedio >= 176 && promedio <= 191)\n simbolo = '$';\n else if (promedio >= 192 && promedio <= 209)\n simbolo = '%';\n else if (promedio >= 210 && promedio <= 225)\n simbolo = '+';\n else if (promedio >= 226 && promedio <= 239)\n simbolo = '.';\n else if (promedio >= 240 && rgbPromedio <= 255)\n simbolo = ' ';\n return simbolo;\n\n}", "title": "" }, { "docid": "d0e4eaa60419644ebd8f1201be46ce57", "score": "0.5822473", "text": "function fl_outToSelek ()\n\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.tamar.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.maza.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.gvina.alpha=1\n\t\t\tthis.oznei_aman.alpha=1\n\t\t\tthis.dvash.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\tthis.mishloah.alpha=1\n\t\t\tthis.of.alpha=1\n\t\t this.chanuka_btn.alpha=1\n\t\t this.tu_btn.alpha=1\n\t\t this.purim_btn.alpha=1\n\t\t this.pesach_btn.alpha=1\n\t\t this.shavuot_btn.alpha=1\n\t\t this.bible_btn.alpha=1\n\t\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\tthis.perot_explain.alpha=0\n\t\tthis.tapuah_explain.alpha=0\n\t\tthis.maza_explain.alpha=0\n\t\t\n\t\t}}", "title": "" }, { "docid": "cc13d812f3ef9bc735974a3a15e3737e", "score": "0.58207923", "text": "function obli_ecli(njd){\n\n // calcola l'obliquità dell'eclittica.\n // per l'equinozio della data.\n // T= numero di secoli giuliani dallo 0.5 gennaio 1900.\n\n var T=(njd-2415020.0)/36525;\n\n var obli_eclittica=23.452294-0.0130125*T-0.00000164*T*T+0.000000503*T*T*T;\n\nreturn obli_eclittica; //obliquità in gradi\n\n}", "title": "" }, { "docid": "9ea3d7eb0a51110f28fa552fe241e2f7", "score": "0.5818845", "text": "function testaSegundo(a){\n if(sc < 10){\n var a = \"0\";\n return a + sc;\n }else{\n return sc;\n }\n }", "title": "" }, { "docid": "174be03baa0db1e3ebae4cbf882fbbb8", "score": "0.5806927", "text": "function adivinarEstiloAprendizaje(estudiantes) {\n //valor que se utilizará para comparar\n var resultado = 100000;\n //tupla que almacenará la posición más cercana \n var numeroTupla = 0;\n //for que recorre todos los datos como parámetro de la consulta \n //de la tabla estudiantes\n for (var i = 0; i < estudiantes.length; i++) {\n var recintoTupla = 1;\n var sexoTupla = 1;\n \n //se le da valor a los recintos que pertenecen las personas en las\n //tuplas si es paraíso es 1 y turrialba es 2 \n\n if (estudiantes[i].recinto === 'Turrialba') {\n recintoTupla = 2;\n }\n //le da parámetro de 1 para masculino\n //si es femenino es 2\n if (estudiantes[i].sexo === 'F') {\n sexoTupla = 2;\n }\n //distancia euclidiana aplicada a los valores de las tuplas para definir distancia\n var sumatoria = Math.pow((sexoTupla - (parseInt(document.getElementById('sexo').value))), 2) + Math.pow(recintoTupla - (parseInt(document.getElementById('recinto').value)), 2) + \n Math.pow((parseFloat(estudiantes[i].promedio)) - (parseFloat(document.getElementById('promedio').value)), 2);\n var distancia = Math.sqrt(sumatoria);\n \n //aquí comparan para mostrar el más cercano al que entra como parámetro\n //comparando los datos de la tupla y los ingresados\n if (resultado > distancia) {\n resultado = distancia;\n numeroTupla = i;\n }\n }\n //select para cambiar el color y mostrar \n //el estilo de aprendizaje del estudiante\n switch (estudiantes[numeroTupla].estilo) {\n case \"ACOMODADOR\":\n document.getElementById('mensaje4').style.color = \"orange\";\n document.getElementById('mensaje4').innerHTML = 'Su estilo de aprendizaje es: ' + (estudiantes[numeroTupla].estilo) + ' en la posición '+estudiantes[numeroTupla].id+'.';\n break;\n case \"CONVERGENTE\":\n document.getElementById('mensaje4').style.color = \"blue\";\n document.getElementById('mensaje4').innerHTML = 'Su estilo de aprendizaje es: ' + (estudiantes[numeroTupla].estilo) + ' en la posición '+estudiantes[numeroTupla].id+'.';\n break;\n case \"ASIMILADOR\":\n document.getElementById('mensaje4').style.color = \"green\";\n document.getElementById('mensaje4').innerHTML = 'Su estilo de aprendizaje es: ' + (estudiantes[numeroTupla].estilo) + ' en la posición '+estudiantes[numeroTupla].id+'.';\n break;\n case \"DIVERGENTE\":\n document.getElementById('mensaje4').style.color = \"red\";\n document.getElementById('mensaje4').innerHTML = 'Su estilo de aprendizaje es: ' + (estudiantes[numeroTupla].estilo) + ' en la posición '+estudiantes[numeroTupla].id+'.';\n break;\n }\n}", "title": "" }, { "docid": "0f34faf8c13aa5a6bf3d8198ae41e495", "score": "0.58068866", "text": "function swieta_ruchome(year) \n{\n //wielkanoc\n var poniedzialek_wielkanocny_dzien, poniedzialek_wielkanocny_miesiac, boze_cialo_dzien, boze_cialo_miesiac,\n luty = l_dni(1, year), \n dzien_roku = 31 + luty, \n f = Math.floor,\n\t\tG = year % 19,\n\t\tC = f(year / 100),\n\t\tH = (C - f(C / 4) - f((8 * C + 13)/25) + 19 * G + 15) % 30,\n\t\tI = H - f(H/28) * (1 - f(29/(H + 1)) * f((21-G)/11)),\n\t\tJ = (year + f(year / 4) + I + 2 - C + f(C / 4)) % 7,\n\t\tL = I - J,\n\t\tmonth = 3 + f((L + 40)/44),\n day = L + 28 - 31 * f(month / 4);\n\n if( day==31 && month==3 )\n {\n poniedzialek_wielkanocny_dzien = 1;\n poniedzialek_wielkanocny_miesiac = 3;\n }\n else\n {\n poniedzialek_wielkanocny_dzien = day + 1;\n poniedzialek_wielkanocny_miesiac = month - 1;\n }\n\n if( month==3 )\n {\n dzien_roku += day;\n }\n else\n {\n dzien_roku = dzien_roku + 31 + day;\n }\n\n dzien_roku += 60;\n\n if( luty==28 && dzien_roku<=151)\n {\n boze_cialo_dzien = dzien_roku - 120;\n boze_cialo_miesiac = 4;\n }\n else if( luty==29 && dzien_roku<=152 )\n {\n boze_cialo_dzien = dzien_roku - 121;\n boze_cialo_miesiac = 4;\n }\n else if( luty==29 )\n {\n boze_cialo_dzien = dzien_roku - 152;\n boze_cialo_miesiac = 5;\n }\n else\n {\n boze_cialo_dzien = dzien_roku - 151;\n boze_cialo_miesiac = 5;\n }\n\n return [poniedzialek_wielkanocny_dzien, poniedzialek_wielkanocny_miesiac, boze_cialo_dzien, boze_cialo_miesiac];\n}", "title": "" }, { "docid": "0a8da2bcf6304e568a7a23b2a89d8e83", "score": "0.5797909", "text": "function renderPorSucursal() {\n var ventasPorSucursal = [];\n for (i = 0; i < local.sucursales.length; i++) {\n ventasPorSucursal.push('Total de ' + local.sucursales[0] + ': ' + ventasSucursal(local.sucursales[0]));\n ventasPorSucursal.push(' Total de ' + local.sucursales[1] + ': ' + ventasSucursal(local.sucursales[1]));\n //intenté mil veces con ventasPorSucursal.push('Total de ' + local.sucursales[i] + ': ' + ventasSucursal(local.sucursales[i])) pero no funciona\n } return 'Ventas por sucursal: ' + ventasPorSucursal;\n}", "title": "" }, { "docid": "940bb605c36843c6c3c955431c73fd4d", "score": "0.5790301", "text": "sacar(valor) {\n\n let taxa = 1.1;\n return super._sacar(valor, taxa); // chamar um método privado só é permitido se ele o estiver herdando da class pai, isso o torna protegido\n\n }", "title": "" }, { "docid": "b743c21cf212f0c65418b95bd466093a", "score": "0.5789985", "text": "function hitungLuasLingkaran(jariJari){\n return 3.14 * jariJari ^ 2 \n}", "title": "" }, { "docid": "7fd5946f927d8d411a2f68b154380d7f", "score": "0.57877797", "text": "function viagem(limiteTanque, valorGasolina, kmPercorrido, destino){\n\n document.write(\"fizemos uma viagem para \" + destino +'<br>')\n document.write(\"A viagem foi de \" + kmPercorrido + 'km <br>')\n\n //Quantos km faz o tanque\n var kmTotalTanque = limiteTanque * 2\n document.write('O tanque do carro faz ' + kmTotalTanque + 'km <br>')\n\n console.log(kmTotalTanque)\n //Quantas vezes abastecer\n var qtsVzsAbastecer = Math.ceil(kmPercorrido / kmTotalTanque)\n document.write('Precisamos abastecer ' + qtsVzsAbastecer +'vez(es) <br>')\n console.log(qtsVzsAbastecer)\n //Quantos litros abastecer\n var qtsLitrosAbastecer = (kmPercorrido / 2) - limiteTanque\n document.write('Precisamos abastecer ' + qtsLitrosAbastecer +'litros <br>')\n console.log(qtsLitrosAbastecer)\n //valor gasto com a gasolina\n var gastoGasolina = qtsLitrosAbastecer * valorGasolina\n document.write('Gastamos R$' + gastoGasolina + ' com gasolina <br>')\n console.log(gastoGasolina)\n //quanto tempo durou a viagem\n var tempoViagem = Math.ceil(kmPercorrido / 60)\n document.write(\"A viagem demorou aproximadamente \" + tempoViagem + ' horas')\n console.log(tempoViagem)\n}", "title": "" }, { "docid": "4ba30354fd4c373f9bbf05b49bf34883", "score": "0.57845247", "text": "liikuta(nimi, suunta){\n for (var i = 0; i < this.hahmot.length; i++){\n var h = this.hahmot[i];\n if (h.nimi == nimi) {\n if (suunta == suunnat.OIKEA) {\n if (this.onkoEtanoita(h.x + 1,h.y)) return;\n if (++h.x >= this.leveys) {\n h.x = 0;\n }\n }\n if (suunta == suunnat.VASEN) {\n if (this.onkoEtanoita(h.x - 1,h.y)) return;\n if (--h.x < 0) {\n h.x = this.leveys - 1;\n }\n }\n if (suunta == suunnat.YLOS) {\n if (this.onkoEtanoita(h.x,h.y - 1)) return;\n if (--h.y < 0) {\n h.y = 0;\n }\n }\n if (suunta == suunnat.ALAS) {\n if (this.onkoEtanoita(h.x, h.y + 1)) return;\n if (++h.y >= this.korkeus) {\n h.y = this.korkeus - 1;\n }\n }\n }\n } \n if (typeof this.pelihahmo == 'undefined') return;\n var h = this.pelihahmo;\n if (h.nimi == nimi) {\n if (suunta == suunnat.OIKEA) {\n if (++h.x >= this.leveys) {\n h.x = 0;\n }\n pisteet++;\n }\n if (suunta == suunnat.VASEN) {\n if (--h.x < 0) {\n h.x = this.leveys - 1;\n }\n pisteet--;\n }\n if (suunta == suunnat.YLOS) {\n if (--h.y < 0) {\n h.y = 0;\n }\n }\n if (suunta == suunnat.ALAS) {\n if (++h.y >= this.korkeus) {\n h.y = this.korkeus - 1;\n }\n }\n }\n }", "title": "" }, { "docid": "14b781772c83efc5013f04ae6c9d7b26", "score": "0.5780017", "text": "function uspjesnost() {\n let brojRijesenih = 0;\n let procenat = 0;\n\n zadaci.forEach(zadatak => {\n if (zadatak.zavrsen === true) {\n brojRijesenih++;\n }\n })\n procenat = ((brojRijesenih / zadaci.length) * 100).toFixed(2);\n\n if (procenat < 50) {\n document.getElementById(\"uspesnost\").style.color = \"#DC143C\";\n } else {\n document.getElementById(\"uspesnost\").style.color = \"#00AD56\";\n }\n if (zadaci.length == 0) {\n document.getElementById('uspesnost').innerHTML = '';\n } else {\n document.getElementById('uspesnost').innerHTML = '<h6>Uspjesnost: ' + procenat + '%</h6>';\n }\n}", "title": "" }, { "docid": "59b0e5e2c69171bde64e3ceb1f5a3dd6", "score": "0.57747704", "text": "function hitungVolumedanLuasPermukaanBalok(panjang, lebar, tinggi) {\n luasPermukaanBalok = 2 * ( (panjang * lebar) + (panjang * tinggi) + (lebar * tinggi) );\n volumeBalok = panjang * lebar * tinggi;\n document.write(\"Panjang : \" + panjang + \"<br/>\");\n document.write(\"Lebar : \" + lebar + \"<br/>\");\n document.write(\"Tinggi : \" + tinggi + \"<br/>\" + \"<br/>\");\n document.write(\"Volume Balok : \" + volumeBalok + \"<br/>\");\n document.write(\"Luas Permukaan Balok : \" + luasPermukaanBalok + \"<br/>\");\n}", "title": "" }, { "docid": "f2a622bda187bb59ad5a4fb5f2d0d208", "score": "0.57665384", "text": "function segundogrado(a, b, c) {\n if (b > (4 * a * c)) {\n let solucion1 = ((-1 * -b) + (Math.sqrt((Math.pow(b, 2) - (4 * a * c))))) / (2 * a);\n let solucion2 = ((-1 * -b) - (Math.sqrt((Math.pow(b, 2) - (4 * a * c))))) / (2 * a);\n\n document.write(\"<p> Las soluciones son \" + solucion1.toFixed(2) + \" y \" + solucion2.toFixed(2) + \"</p>\");\n } else {\n document.write(\"<p> Indefinida</p>\");\n }\n}", "title": "" }, { "docid": "85b3097196ac2919271c1ff49b6e39e5", "score": "0.5763967", "text": "function salariosemanal() {\n\tvar base, horas, salario;\n\t// Se desplegará en pantalla un mensaje al usuario solicitando\n\t// ingresar por teclado el número de horas trabajadas por semana\n\t// e ingresar por teclado el salario base por hora\n\tdocument.write(\"Ingresar el número de horas trabajadas en la semana ...\",'<BR/>');\n\thoras = Number(prompt());\n\tdocument.write(\"Ingresar el salario base por hora ...\",'<BR/>');\n\tbase = Number(prompt());\n\t// Calcular el salario con los datos ingresados\n\tsalario = horas*base;\n\t// Desplegar el salario semanal\n\tdocument.write(\"El salario semanal será de: \",salario,\"pesos\",'<BR/>');\n\thoras = Number(prompt());\n}", "title": "" }, { "docid": "d67aa561cda4c955be5d2a5e7e69d1cc", "score": "0.57596236", "text": "get sclo() {\n\t\treturn p5.Vector.mult(this.o, scl);\n\t}", "title": "" }, { "docid": "bfbe8dbac6861a35579048029606cbe0", "score": "0.5758065", "text": "function botonPrecionado(peso) {\n\n switch (peso) {\n case 10:\n addPeso(peso);\n break;\n case 7.5://6.6\n addPeso(peso);\n break;\n case 4.3://3.3\n addPeso(peso);\n break;\n case 0:\n addPeso(peso);\n break;\n default:\n }\n indicePregunta++;\n if(indicePregunta < preguntas.length){\n cambiarPregunta();\n }\n else {\n analizarAptitudes();\n // document.getElementById(\"con1\").value = 1\n // document.getElementById(\"con2\").value = 1\n // document.getElementById(\"con3\").value = 1\n // document.getElementById(\"con4\").value = 1\n // document.getElementById(\"con5\").value = 1\n // document.getElementById(\"con6\").value = 1\n\n //enviar resultados a\n document.getElementById(\"voc-form\").submit();\n\n }\n }", "title": "" }, { "docid": "951ca5bf0d2be548d620fdc83f1e13fc", "score": "0.57536066", "text": "function skaiciuotiVidurki(mas) {\n var suma = 0;\n for (var i = 0; i < mas.length; i++) {\n suma += mas[i];\n }\n // return Math.round(suma / mas.length);\n var ats = suma / mas.length;\n ats = Math.round(ats);\n return ats;\n}", "title": "" }, { "docid": "cb8ceda6c7e3ba524d0449c4703e325d", "score": "0.57491153", "text": "function kiekReiketuTapetuRulonuKambariui(ilgis, plotis, aukstis) {\n const vienasRulonas = 10;\n \n // debugger\n // gauti visus sienu ir lubu plota\n let sienos = kambarioSienuPlotas(ilgis, plotis, aukstis);\n let grindysLubos = kabarioLubosGrindys(ilgis, plotis);\n // pagal gauta plota paskaiciuoti kiek rulonu reikes \n let kiekRulonu = (sienos + grindysLubos) / vienasRulonas;\n\n return kiekRulonu;\n}", "title": "" }, { "docid": "3e34d3b2a60441ec66d26c79922f2ead", "score": "0.5748673", "text": "function brutoNeto(sueldoBruto, porcentajeSindical) {\r\n obraSocial = sueldoBruto * 0.03 \r\n descINSSJP = sueldoBruto * 0.03 \r\n jubilacion = sueldoBruto * 0.11\r\n cuotaSindical = sueldoBruto * porcentajeSindical\r\n\r\n // Calculate sueldo neto\r\n if (cuotaSindical > 0) {\r\n sueldoNeto = sueldoBruto - cuotaSindical - obraSocial - descINSSJP - jubilacion\r\n } else {\r\n sueldoNeto = sueldoBruto - obraSocial - descINSSJP - jubilacion\r\n }\r\n\r\n // Output\r\n return sueldoNeto\r\n}", "title": "" }, { "docid": "7f9ca718cebcc4f91879cd618bd232a6", "score": "0.5731164", "text": "function simple(cantidadOriginal, interes, tiempo) {\n let ganacia = \"\";\n validarNumero(cantidadOriginal, interes, tiempo);\n cantidadOriginal = new Number(cantidadOriginal);\n tiempo = new Number(tiempo);\n interes = new Number(interes);\n ganacia = (cantidadOriginal * interes * tiempo);\n cantidadFinal = cantidadOriginal + ganacia;\n mostrar(cantidadFinal);\n}", "title": "" }, { "docid": "36db0aca83324e88d81180811ea7b80e", "score": "0.57288975", "text": "function esProtesisf(diente, codigopieza){\n\t\t\n\t\tvar esProtesisf = false;\n\t\tvar color = 'blue';\n\t\tvar pdiente = \"\"; //primer diente\n\t\tvar udiente = \"\"; // ultimo diente\n\t\tvar protesisfcompleto = false;\n\t\tvar salida ='';\n\n\t\tvar esCor = false;\n\t\tvar color = 'blue';\n\n\t\tvar trat_protesisf = ko.utils.arrayFilter(vm.tratamientosAplicados(), function(t){\n\t\t\treturn t.tratamiento.id == codigopieza;\n\t\t});\t\n\n\t\ttry {\n\n \tfor (var i = 0; i <= trat_protesisf.length - 1; i++) {\n\t\t\tvar t = trat_protesisf[i];\n \n // Si esta completo el puente\n if (t.diente.id.indexOf('_') > -1) { \n\t\t pdiente = t.diente.id.substring(0, t.diente.id.indexOf('_'));\t\n\t\t\t udiente = t.diente.id.substring(t.diente.id.lastIndexOf('_')+3, t.diente.id.length - t.diente.id.lastIndexOf('_'));\n\n // si estan definidos ambos dientes del puente devuelvo el tratamiento\n\t\t\t if(pdiente>0 && udiente>0 && diente.id==pdiente){ \n\t\t\t \t esProtesisf = true;\n\t\t\t \t protesisfcompleto = true;\n\n\t\t if (t.tratamiento.id == \"01.09\" || t.tratamiento.id == \"01.03\" || t.tratamiento.id == \"01.10\"){\n\t\t\t\t\t color = t.tratamiento.color;\n\t\t } \n\t\t\t \t salida=[esProtesisf,color,pdiente,udiente, protesisfcompleto];\n\t\t\t }\n\t\t\t // con que uno este definido ya es puente\n\t\t\t if(pdiente>0 && udiente>0 && diente.id==pdiente){ \n\t\t\t \t esProtesisf = true;\n\t\t\t \t salida=[esProtesisf,color,pdiente,udiente, protesisfcompleto];\n\t\t\t }\n\t\t\t \n\t\t\t} \n\t\t};\n \n }\n catch(err) {\n\t\t \n\t\t}\n \treturn salida;\n\n\t}", "title": "" }, { "docid": "996f0c16571ba6a2f18909fe46001a9a", "score": "0.5728135", "text": "function turis(r) { // funkicja, funkcijos pavadinimas () skliausteliuose duomenys, {} aprasoma ka funkcija turi daryti // r kintamasis\nlet t = 4 * 3.14 * r * r * r / 3;\nreturn t; // grazinimas\n}", "title": "" }, { "docid": "bb6e739773888173b2df15a9edb5c278", "score": "0.5722091", "text": "function calculo() {\r\n\r\n let peso = document.dados.peso.value;\r\n let altura = document.dados.altura.value;\r\n if ((validacao(peso) && validacao(altura) && isNumber(peso) && isNumber(altura)) == true) {\r\n\r\n \t//IMC\r\n\r\n imc = parseFloat(peso) / (parseFloat(altura) * parseFloat(altura));\r\n\r\n if (imc < 0.00185) {\r\n document.dados.res.value = \" Subnutrido\";\r\n } else if (imc >= 0.00185 && imc <= 0.00249) {\r\n document.dados.res.value = \" Saudável\";\r\n } else if (imc > 0.00249 && imc <= 0.00299) {\r\n document.dados.res.value = \" Sobrepeso\";\r\n } else if (imc > 0.00299 && imc <= 0.00349) {\r\n document.dados.res.value = \" Obesidade grau 1\";\r\n } else if (imc > 0.00349 && imc <= 0.00399) {\r\n document.dados.res.value = \" Obesidade grau 2\";\r\n } else {\r\n document.dados.res.value = \" Obesidade grau 3\";\r\n }\r\n\r\n //Intervalo\r\n\r\nlet inter_1=parseFloat( 0.00185)*parseFloat(altura)*parseFloat(altura);\r\nlet inter_2 = parseFloat(0.00249)*parseFloat(altura)*parseFloat(altura);\r\n\r\n\r\n document.dados.inter.value = \" Entre \" + inter_1 + \" KG e \" + inter_2 + \" KG\"; \r\n\r\n\r\n\r\n \r\n}\r\n\r\ndocument.dados.peso.value = \"\";\r\ndocument.dados.altura.value=\"\";\r\n}", "title": "" }, { "docid": "add59c79b05f04fa1120f2de985249b8", "score": "0.5720753", "text": "function upisSlobFunc()\n{\n\n\tif (brojBacanja === 0)\n\t\treturn;\n\n\tif (indNajave > 0)\n\t{\n\t\talert(\"Igrali ste najavu!\")\n\t\treturn;\n\t}\n\n\t/* get the value of the field clicked */\n\tvar vred = Number(this.id.slice(1, ));\n\n\t///* see if the previous field is not -1 */\n\t///* else disable writting to preserve order */\n\t//if(vred > 1 && kDole[vred-2] < 0)\n\t//{\n\t//\talert(\"Nedozvoljen upis!\");\n\t//\treturn;\n\t//}\n\t\n\t/* did we already write into this field */\n\tif(kSlob[vred-1] >= 0)\n\t{\n\t\talert(\"Vec ste upisali u ovo polje!\");\n\t\treturn;\n\t}\n\n\tvar tmp = 0;\n\tvar tmpNiz = [];\n\n\t/* splice izabraneKockice and baceneKockice */\n\tfor(var i=0; i<5; ++i)\n\t{\n\t\tif (Number(izabraneKockice[i].innerText))\n\t\t\ttmpNiz.push(Number(izabraneKockice[i].innerText));\n\t}\n\n\tfor(var i=0; i<5; ++i)\n\t{\n\t\tif (Number(baceneKockice[i].innerText))\n\t\t\ttmpNiz.push(Number(baceneKockice[i].innerText));\n\t}\n\n\tif(tmpNiz.length != 5)\n\t\talert(\"Niz nije 5! vec: \" + tmpNiz.length);\n\n\t/* decide which field was clicked: broj, maxmin ili igra */\n\tswitch(vred)\n\t{\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\t\tfor(var i=0; i<5; ++i)\n\t\t\t{\n\t\t\t\tif(tmpNiz[i] == vred)\n\t\t\t\t\ttmp += tmpNiz[i]\n\t\t\t}\n\t\t\tkSlob[vred-1] = tmp;\n\t\t\tsumaKolFunc(kSlob, \"suma2\");\n\t\t\tsumaRazFunc(kSlob, \"suma6\")\n\t\t\tbreak;\n\t\tcase 7:\n\t\tcase 8:\n\t\t\ttmp = zbir(tmpNiz);\n\t\t\tkSlob[vred-1] = tmp;\n\t\t\tsumaRazFunc(kSlob, \"suma6\")\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ttmp = jelFul(tmpNiz);\n\t\t\tkSlob[vred-1] = tmp;\n\t\t\tsumaIgFunc(kSlob, \"suma10\");\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\ttmp = jelPoker(tmpNiz);\n\t\t\tkSlob[vred-1] = tmp;\n\t\t\tsumaIgFunc(kSlob, \"suma10\");\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\ttmp = jelKenta(tmpNiz);\n\t\t\tkSlob[vred-1] = tmp;\n\t\t\tsumaIgFunc(kSlob, \"suma10\");\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\ttmp = jelYamb(tmpNiz);\n\t\t\tkSlob[vred-1] = tmp;\n\t\t\tsumaIgFunc(kSlob, \"suma10\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\t/* write number of vred thrown */\n\tdocument.getElementById(this.id).innerText=Number(tmp);\n\n\tresetuj(izabraneKockice, baceneKockice);\n}", "title": "" }, { "docid": "313578e0ac2f085e5e8c65ecaf74f401", "score": "0.5719693", "text": "function Seleziona(pimo, colp, colturno, pos)\n{\n\tswitch(primo)\n\t{\n\t\tcase '<img src=\"imm/pedone_n.png\">': //pedone nero\n\t\t\tif(document.getElementById(parseInt(pos)+9)!=null && document.getElementById(parseInt(pos)+9).innerHTML!='<img src=\"imm/vuota.png\">')//diagonale sinistra\n\t\t\t{\n\t\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos)+9).innerHTML).length;\n\t\t\t\t\tvar col2=(document.getElementById(parseInt(pos)+9).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\t\tif(colp!=col2)\n\t\t\t\t\t\tdocument.getElementById(parseInt(pos)+9).className=\"selezionato\";\n\t\t\t}\n\t\t\tif(document.getElementById(parseInt(pos)+11)!=null && document.getElementById(parseInt(pos)+11).innerHTML!='<img src=\"imm/vuota.png\">')//diagonale destra\n\t\t\t{\n\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos)+11).innerHTML).length;\n\t\t\t\tvar col2=(document.getElementById(parseInt(pos)+11).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\tif(colp!=col2)\n\t\t\t\t\tdocument.getElementById(parseInt(pos)+11).className=\"selezionato\";\n\t\t\t}\n\n\t\t\tif(document.getElementById(parseInt(pos)+10)!=null&&document.getElementById(parseInt(pos)+10).innerHTML=='<img src=\"imm/vuota.png\">')\n\t\t\t{\n\t\t\t\tdocument.getElementById(parseInt(pos)+10).className=\"selezionato\";\n\t\t\t\tif(parseInt(pos)>=20&&parseInt(pos)<=28 && document.getElementById(parseInt(pos)+20).innerHTML=='<img src=\"imm/vuota.png\">')\n\t\t\t\t\tdocument.getElementById(parseInt(pos)+20).className=\"selezionato\";\n\t\t\t}\n\t\tbreak;\n\t\t//pedone bianco\n\t\tcase '<img src=\"imm/pedone_b.png\">':\n\t\t\tif(document.getElementById(parseInt(pos)-9)!=null && document.getElementById(parseInt(pos)-9).innerHTML!='<img src=\"imm/vuota.png\">')//diagonale sinistra\n\t\t\t{\n\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos)-9).innerHTML).length;\n\t\t\t\tvar col2=(document.getElementById(parseInt(pos)-9).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\tif(colp!=col2)\n\t\t\t\t\tdocument.getElementById(parseInt(pos)-9).className=\"selezionato\";\n\t\t\t}\n\n\t\t\tif(document.getElementById(parseInt(pos)-11)!=null && document.getElementById(parseInt(pos)-11).innerHTML!='<img src=\"imm/vuota.png\">')//diagonale destra\n\t\t\t{\n\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos)-11).innerHTML).length;\n\t\t\t\tvar col2=(document.getElementById(parseInt(pos)-11).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\tif(colp!=col2)\n\t\t\t\t\tdocument.getElementById(parseInt(pos)-11).className=\"selezionato\";\n\t\t\t}\n\n\t\t\tif(document.getElementById(parseInt(pos)-10)!=null&&document.getElementById(parseInt(pos)-10).innerHTML=='<img src=\"imm/vuota.png\">')\n\t\t\t{\n\t\t\t\tdocument.getElementById(parseInt(pos)-10).className=\"selezionato\";\n\t\t\t\tif(parseInt(pos)>=70&&parseInt(pos)<=78 && document.getElementById(parseInt(pos)-20).innerHTML=='<img src=\"imm/vuota.png\">')\n\t\t\t\t\tdocument.getElementById(parseInt(pos)-20).className=\"selezionato\";\n\t\t\t}\n\t\tbreak;\n\t\t//torri nere e bianche\n\t\tcase '<img src=\"imm/torre_n.png\">':\n\t\tcase '<img src=\"imm/torre_b.png\">':\n\t\t var i=0;\n\t\t var sum=[10, 1, -1, -10];\n\t\t for(var k=0; k<4; k++)\n\t\t {\n\t\t\tfor(var j=1; j<8; j++)\n\t\t\t{\n\t\t\t i+=sum[k];\n\t\t\t if(document.getElementById(parseInt(pos+i))!=null && document.getElementById(parseInt(pos+i)).innerHTML=='<img src=\"imm/vuota.png\">')\n\t\t\t\tdocument.getElementById(parseInt(pos+i)).className=\"selezionato\";\n\t\t\t else if(document.getElementById(parseInt(pos+i))!=null)\n\t\t\t {\n\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos+i)).innerHTML).length;\n\t\t\t\tvar col2=(document.getElementById(parseInt(pos+i)).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\tif(colp!=col2)\n\t\t\t\t\tdocument.getElementById(parseInt(pos+i)).className=\"selezionato\";\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t else\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\ti=0;\n\t\t }\n\t\t break;\n\n\t\t\t//alfieri neri e bianchi\n\t\t\tcase '<img src=\"imm/alfiere_n.png\">':\n\t\t\tcase '<img src=\"imm/alfiere_b.png\">':\n\t\t\t var i=0;\n\t\t\t var sum=[11, 9, -9, -11];\n\t\t\t for(var k=0; k<4; k++)\n\t\t\t {\n\t\t\t\tfor(var j=1; j<8; j++)\n\t\t\t\t{\n\t\t\t\t\ti+=sum[k];\n\t\t\t\t\tif(document.getElementById(parseInt(pos+i))!=null&&document.getElementById(parseInt(pos+i)).innerHTML=='<img src=\"imm/vuota.png\">')\n\t\t\t\t\t\tdocument.getElementById(parseInt(pos+i)).className=\"selezionato\";\n\t\t\t\t\t\telse if(document.getElementById(parseInt(pos+i))!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos+i)).innerHTML).length;\n\t\t\t\t\t\tvar col2=(document.getElementById(parseInt(pos+i)).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\t\t\tif(colp!=col2)\n\t\t\t\t\t\t\tdocument.getElementById(parseInt(pos+i)).className=\"selezionato\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti=0;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t//regine nere e bianche\n\t\t\tcase '<img src=\"imm/regina_n.png\">':\n\t\t\tcase '<img src=\"imm/regina_b.png\">':\n\t\t\tvar sum=[10, 1, -1, -10, 11, 9, -9, -11];\n\t\t\tvar i=0;\n\t\t\tfor(var k=0; k<8; k++)\n\t\t\t{\n\t\t\t\tfor(var j=0; j<8; j++)\n\t\t\t\t{\n\t\t\t\t\ti+=sum[k];\n\t\t\t\t\tif(document.getElementById(parseInt(pos+i))!=null && document.getElementById(parseInt(pos+i)).innerHTML=='<img src=\"imm/vuota.png\">')\n\t\t\t\t\t\tdocument.getElementById(parseInt(pos+i)).className=\"selezionato\";\n\t\t\t\t\telse if(document.getElementById(parseInt(pos+i))!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos+i)).innerHTML).length;\n\t\t\t\t\t\tvar col2=(document.getElementById(parseInt(pos+i)).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\t\t\tif(colp!=col2)\n\t\t\t\t\t\t\tdocument.getElementById(parseInt(pos+i)).className=\"selezionato\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti=0;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t//re neri e bianchi\n\t\t\tcase '<img src=\"imm/re_n.png\">':\n\t\t\tcase '<img src=\"imm/re_b.png\">':\n\t\t\tcontrolloArrocco(colp);\n\t\t\tvar sum=[10, 1, -1, -10, 11, 9, -9, -11];\n\t\t\tvar i=0;\n\t\t\tfor(var k=0; k<8; k++)\n\t\t\t{\n\t\t\t\tfor(var j=0; j<8; j++)\n\t\t\t\t{\n\t\t\t\t\ti=sum[k];\n\t\t\t\t\tif(document.getElementById(parseInt(pos+i))!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos+i)).innerHTML).length;\n\t\t\t\t\t\tvar col2=(document.getElementById(parseInt(pos+i)).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\t\t\tif(colp!=col2)\n\t\t\t\t\t\t\tdocument.getElementById(parseInt(pos+i)).className=\"selezionato\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t//cavallo nero e bianco\n\t\t\tcase '<img src=\"imm/cavallo_n.png\">':\n\t\t\tcase '<img src=\"imm/cavallo_b.png\">':\n\t\t\tsum=[10, -10, 1, -1];\n\t\t\tsum1=[1, -1];\n\t\t\tsum2=[10, -10];\n\t\t\tfor(var k=0; k<4; k++)\n\t\t\t{\n\t\t\t\tfor(var j=0; j<2; j++)\n\t\t\t\t{\n\t\t\t\t\ti=sum[k];\n\t\t\t\t\tif(k<2)\n\t\t\t\t\t\tz=sum1[j];\n\t\t\t\t\telse\n\t\t\t\t\t\tz=sum2[j];\n\t\t\t\t\tif(document.getElementById(parseInt(pos+i+i+z))!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar lenstr2=(document.getElementById(parseInt(pos+i+i+z)).innerHTML).length;\n\t\t\t\t\t\tvar col2=(document.getElementById(parseInt(pos+i+i+z)).innerHTML).charAt(lenstr2-7);//colore pedina raggiungibile\n\t\t\t\t\t\t//controllo non mangi pedina amica\n\t\t\t\t\t\tif(colp!=col2)\n\t\t\t\t\t\t\tdocument.getElementById(parseInt(pos+i+i+z)).className=\"selezionato\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t}//fine switch\t\n}", "title": "" }, { "docid": "ab04d2a8622a00a09315ec04553dd6ec", "score": "0.57083404", "text": "function luo_joukkueen_sarjat() {\n\t// Haetaan oikea paikka spanien perusteella.\n\tlet spanit = document.getElementsByTagName(\"span\");\n\tlet oikea_span;\n\tfor (let i = 0; i < spanit.length; i++) {\n\t\tif (spanit[i].textContent === \"Sarja\") {\n\t\t\toikea_span = spanit[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\t// Etsitään oikea container ja tyhjennetään globaali muuttuja.\n\tlet nappi_container = etsi_seuraava(oikea_span,\"DIV\");\n\tsarja = [];\n\t// Käydään sarjat läpi ja lisäillään ne oikeaan containeriin DIV -> LABEL+INPUT -muodossa.\n\tfor (let i = 0; i < data.sarjat.length; i++) {\n\t\tlet container = document.createElement(\"div\");\n\t\tlet lappu = document.createElement(\"label\");\n\t\tlet nimi = data.sarjat[i].nimi;\n\t\tlappu.setAttribute(\"for\",nimi);\n\t\tlappu.textContent=nimi;\n\t\tcontainer.appendChild(lappu);\n\t\tlet input = document.createElement(\"input\");\n\t\tinput.setAttribute(\"id\",nimi);\n\t\tinput.setAttribute(\"type\",\"radio\");\n\t\tinput.setAttribute(\"name\",\"sarja\");\n\t\tinput.setAttribute(\"value\",data.sarjat[i].id);\n\t\tsarja.push(input);\n\t\tinput.addEventListener('click', laske_sarjat);\n\t\tcontainer.appendChild(input);\n\t\tnappi_container.appendChild(container);\n\t}\n}", "title": "" }, { "docid": "74dad1c1257e8b6dcc36b9973c6e8f24", "score": "0.5705642", "text": "function dibujar_protesis_fija(canvas){\r\n\tif (i_inic<=i_final){\r\n\t//var px=87;\r\n\t//var py=129;\r\n\t//var numi=0;\r\n\t\r\n\tvar i= i_inic+1;\r\n\t var i_inic_s= i_inic+1;\r\n\t \r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n \r\n\t//dibujar diente sano en dientes medios\r\n\tfor ( i_inic_s; i_inic_s<i_final; i_inic_s++) {\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\r\n\t\t\r\n\t}\r\n\t//dibujar diente sano antes de convencion\r\n\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\r\n\t//dibujar protesis fija en diente inicial\r\n\tdibujar_protesis_fija_inicial(canvas,protesisim,i_inic);\r\n\t\r\n\t//dibujar protesis fija en dientes medios\r\n\tfor ( i; i<i_final; i++) {\r\n\t\r\n\t\t//dibujar convencion\r\n\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\r\n\t}\r\n\t\r\n\t//dibujar protesis fija en diente final\r\n\tdibujar_protesis_fija_final(canvas,protesisf,i_final);\r\n\t//\r\n\t\r\n\t\r\n\ti=0;\r\n\ti_inic=0;\r\n\ti_final=0;\r\n\tpxi=0;\r\n\tpxf=0;\r\n\tpyi=0;\r\n\tpyf=0;\r\n\tsw_punto_inic =false;\r\n\tsw_punto_final =false;\r\n\tsector_inicial=0;\r\n\tsector_final=0;\r\n\t//protesisf.length=0;\r\n\t//protesisim.length=0;\r\n\t\r\n\t\r\n\t}else{\r\n\t\tvar i= i_final+1;\r\n\t\tvar i_inic_s= i_final+1;\r\n\t\t \r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_inic);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_inic);\r\n\t \r\n\t\t//dibujar diente sano en dientes medios\r\n\t\tfor ( i_inic_s; i_inic_s<i_inic; i_inic_s++) {\r\n\t\t\t//dibujar diente sano antes de convencion\r\n\t\t\tdibujar_diente_sano_alr(canvas,pxi, pyi,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara1,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara2,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara3,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara4,i_inic_s);\r\n\t\t\tdibujar_diente_sano (canvas,cara5,i_inic_s);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t//dibujar diente sano antes de convencion\r\n\t\tdibujar_diente_sano_alr(canvas,pxf, pyf,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara1,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara2,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara3,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara4,i_final);\r\n\t\tdibujar_diente_sano (canvas,cara5,i_final);\r\n\t\t//dibujar protesis fija en diente inicial\r\n\t\tdibujar_protesis_fija_inicial(canvas,protesisim,i_final);\r\n\t\t\r\n\t\t//dibujar protesis fija en dientes medios\r\n\t\tfor ( i; i<i_inic; i++) {\r\n\t\t\tdibujar_protesis_fija_media(canvas,protesisim,i);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//dibujar protesis fija en diente final\r\n\t\tdibujar_protesis_fija_final(canvas,protesisf,i_inic);\r\n\t\ti=0;\r\n\t\ti_inic=0;\r\n\t\ti_final=0;\r\n\t\tpxi=0;\r\n\t\tpxf=0;\r\n\t\tpyi=0;\r\n\t\tpyf=0;\r\n\t\tsw_punto_inic =false;\r\n\t\tsw_punto_final =false;\r\n\t\tsector_inicial=0;\r\n\t\tsector_final=0;\r\n\t\t//protesisf.length=0;\r\n\t\t//protesisim.length=0;\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\r\n}", "title": "" }, { "docid": "1d6294e9e594599ba3e2ec31793cd873", "score": "0.57008237", "text": "function kaliTerusRekursif(angka) {\r\n // you can only write your code here!\r\n let angkaString = angka.toString();\r\n let hasil = kaliRekursif(angka);\r\n let hasilString = hasil.toString();\r\n if(hasilString.length > 1){\r\n hasil = kaliTerusRekursif(hasil);\r\n }\r\n return hasil;\r\n \r\n}", "title": "" }, { "docid": "7e362f7b06564fc3c9b58855074e8a7f", "score": "0.5699288", "text": "function prikaziRezultat(){\r\n // na samom pocetku nije imao tacnih odgovora\r\n let brTacnih = 0;\r\n const listaPitanja = document.querySelectorAll(\".pitanje\")\r\n // prolazimo kroz globalni niz svih pitanja\r\n // tu poredimo odgovor koji je igrac dao na to pitanja sa tacnim odgovorom pitanja \r\n pitanja.forEach(function(trenutnoPitanje, pitanjeInd){\r\n // selektor koji trazi cekirani input na trenutno pitanje\r\n const selektor = `input[name=odgovor${pitanjeInd}]:checked`;\r\n // igrac je odgovorio ono sto je vrijednost cekiranog input-a (radio button-a)\r\n const odgovoreno = (document.querySelector(selektor) || {} ).value;\r\n\r\n // ako je ono sto je igrac odgovorio jednako tacnom odgovoru na trenutno pitanje\r\n // to znaci da je igrac tacno odgovorio i povecavamo ukupan broj tacnih odgovora\r\n \r\n if(odgovoreno === trenutnoPitanje.tacanOdgovor){\r\n brTacnih = brTacnih + 1;\r\n\r\n /* DOMACI */\r\n listaPitanja[pitanjeInd].style.color = \"green\"\r\n }else {\r\n listaPitanja[pitanjeInd].style.color = \"red\" \r\n } /* DOMACI */\r\n\r\n\r\n });\r\n // na kraju samo popunjavamo div za prikaz rezultata\r\n rezultatDiv.innerHTML = `rezultat: <h3>${brTacnih} od ${pitanja.length}</h3>`; \r\n}", "title": "" }, { "docid": "686c04a8a224a33c664f3507f118ba37", "score": "0.56978637", "text": "function sumarAlCarrito(){\n numeroDeClases = numeroDeClases + 1;\n totalClase = valorClase * numeroDeClases;\n console.log(\"El valor de las clases reservadas es de $\" + totalClase + \". Reservo \" + numeroDeClases + \" clases\");\n }", "title": "" }, { "docid": "420e6ab58adf3857f936bb6de4ee78b9", "score": "0.56974715", "text": "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}", "title": "" }, { "docid": "e2bdb154d77b8a973c7ccf618d7f8cfd", "score": "0.56959945", "text": "function cruzamiento(poblacion,seleccion,ciudades,elite)\n\t\t\t{\n\t\t\t\tvar numPobla = poblacion.length;\n\t\t\t\tvar indice1,indice2;\n\t\t\t\tvar k = 0;\n\t\t\t\tvar new_poblation = new Array();\n\t\t\t\t/*Genero nueva poblacion*/\n\t\t\t\twhile(k < parseInt(numPobla / 2))\n\t\t\t\t{\n\t\t\t\t\t//Escogo el metodo de seleccion para tener dos PADRES\n\t\t\t\t\tswitch(seleccion)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Torneo\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t\tindice1 = torneo(poblacion,elite);\n\t\t\t\t\t\t\t\tindice2 = torneo(poblacion,elite);\n\t\t\t\t\t\t\t}while(indice1 == indice2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t//Ranking\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t//Aleatorio\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t\tindice1 = parseInt( Math.random() * numPobla*elite);\n\t\t\t\t\t\t\t\tindice2 = parseInt( Math.random() * numPobla*elite);\n\t\t\t\t\t\t\t}while(indice1 == indice2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//console.log(indice1);\n\t\t\t\t\t//console.log(indice2);\n\t\t\t\t\t/*Padres*/\n\t\t\t\t\tvar dad = poblacion[indice1].recorrido; \n\t\t\t\t\tvar mom = poblacion[indice2].recorrido;\n\t\t\t\t\t/*Camino para Hijos*/\n\t\t\t\t\tvar camino1 = new Array();\n\t\t\t\t\tvar camino2 = new Array();\n\t\t\t\t\t/*Numero entre 0 y numero de ciudades menos 1*/\n\t\t\t\t\tbp = parseInt( Math.random() * ciudades ); /*Punto de roptura*/\n\n\t\t\t\t/*-----------Genero 2 nuevos caminos-----------*/\n\t\t\t\t\t//Respaldo caminos de papa y mama hasta bp\n\t\t\t\t\tfor(var i = 0; i < bp; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcamino1.push(dad[i]);\n\t\t\t\t\t\tcamino2.push(mom[i]);\n\t\t\t\t\t}\n\t\t\t\t\tfor(var i = 0; i < ciudades; i++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//Tomo el elemento a buscar en el segundo vector\n\t\t\t\t\t\tvar busca1 = mom[i];\n\t\t\t\t\t\tvar busca2 = dad[i];\n\t\t\t\t\t\tfor(var j = bp; j < ciudades; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(busca1 == dad[j])\n\t\t\t\t\t\t\t\tcamino1.push(busca1);\n\t\t\t\t\t\t\tif(busca2 == mom[j])\n\t\t\t\t\t\t\t\tcamino2.push(busca2); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*Hijos generados*/\n\t\t\t\t\tvar hijo1 = {recorrido: camino1, distancia: aptitud(camino1,region)}\n\t\t\t\t\tvar hijo2 = {recorrido: camino2,distancia : aptitud(camino2,region)}\n\n\t\t\t\t\tnew_poblation.push(hijo1);\n\t\t\t\t\tnew_poblation.push(hijo2);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\treturn new_poblation;\n\t\t\t}", "title": "" }, { "docid": "278e8b69acdddd11b324057bb78748aa", "score": "0.5692995", "text": "function DescuentoAusencia(){\n //recupero el valor de ausencia\n var sal_aus= document.getElementById(\"sal_aus\").value;\n var SaldoNeto= document.getElementById('sueldoNeto').value;\n //reestablece los valores al cambiar dias\n if(sal_aus > 0)\n {\n var suma=parseFloat(SaldoNeto) + parseFloat(sal_aus);\n document.getElementById(\"sueldoNeto\").value=suma;\n \n }\n var SueldoBrutoIni=document.getElementById('sueldoBruto').value;\n //calcula el jpornal diario\n var jornal=SueldoBrutoIni/30;\n //obtiene la cantidad de dias\n var dias=document.getElementById('DiaAusencia').value;\n //calcula jornal diario por cantidad de dias\n document.getElementById(\"sal_aus\").value=jornal*dias;\n //Actualiza el neto a cobrar\n var SaldoNeto= document.getElementById('sueldoNeto').value;\n document.getElementById(\"sueldoNeto\").value=SaldoNeto-(jornal*dias);\n //guardamos el valor de salario neto(esto se actualizara con cada descuento)\n var sueldoneto=document.getElementById('sueldoNeto').value;\n document.getElementById(\"sal_neto\").value=sueldoneto;\n \n \n }", "title": "" }, { "docid": "347600f427f87ff909be5bdb978bb718", "score": "0.5689352", "text": "function IA_sacrifier(){\n\t\t // IA sacrifie la carte de plus haut cout d'invocation\n\t\t //SSI aucune carte vide\n\t\t \n\t\t no=rechercherIdxCarteAdvCoutMax()\n\t\t if (no>=0){\n\t\t\tlaCarte = jeu_adv[no];\n\t\t \tsacrifierUneCarte(no,laCarte,false,true);\n\t\t}\n\t }", "title": "" }, { "docid": "2262ca8ed03c571c9116420b0594bd20", "score": "0.56880593", "text": "function porEstuSupePuntosHse(generacion){\n var sumaScore=0;\n for(var i=0;i<generacion.students.length;i++){\n var sumaHse=0;\n \n \n for(var j=0;j<generacion.students[i]['sprints'].length;j++){\n \n var hse=generacion.students[i]['sprints'][j]['score']['hse'];\n\n sumaHse+=hse;\n }\n\n if((sumaHse/j)>840){\n sumaScore++;\n }\n var porcentaje=parseInt((sumaScore*100)/generacion.students.length);\n \n }\n return (porcentaje);\n}", "title": "" }, { "docid": "a715237ae7414ea4534ba568f22cdb3f", "score": "0.5684591", "text": "function proposerUnNombre () {\n var monNombreSecret = 0;\n var nombreSaisi = document.getElementById('nombreSaisi').value;\n if (1 < 0) { // ... A TOI DE JOUER !\n erreur(\"Ce puzzle n'est pas fini !\");\n } else {\n erreur(\"Ce puzzle n'est pas fini !\");\n }\n}", "title": "" }, { "docid": "1ec37ccb1f14de972629d48ae0a3d45f", "score": "0.56800383", "text": "function ex3(){\n const cotacao = 4.1\n\tlet nome = prompt('Informe seu nome completo por favor.')\n\tlet tipoJogo = prompt('Jogo Nacional (NA) ou Internacional (IN)? (digitar a sigla)')\n\tif (tipoJogo==='IN'){\n\t tipoJogo='Internacional'\n\t}else if(tipoJogo==='NA'){\n\t tipoJogo='Nacional'}\n\tif(tipoJogo==='Nacional'){\n\t let jogo = prompt('Digite a sigla em maiusculo, SF - Semifinais, DT - Decisao do 3 lugar, FI - Final')\n if (jogo==='SF'){jogo='Semifinais'}\n else if (jogo==='DT'){jogo='Decisao do 3 lugar'}\n else if (jogo==='FI'){jogo='Final'}\n\t if (jogo==='semifinais'){\n\t\tlet categoria= Number(prompt ('Qual Categoria? 1,2,3 ou 4'))\n\t\tif(categoria===1){\n let valor = 1320\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===2){\n\t\t\tlet valor = 880\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===3){\n\t\t\tlet valor = 550\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===4){\n\t\t\tlet valor = 220\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse{\n\t\t console.log('Categoria Inexistente')\n\t\t}\n\t }\n\t else if (jogo==='Decisao do 3 lugar'){\n\t\tlet categoria= Number(prompt ('Qual Categoria? 1,2,3 ou 4'))\n\t\tif(categoria===1){\n let valor = 660\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===2){\n\t\t\tlet valor = 440\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===3){\n\t\t\tlet valor = 330\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===4){\n\t\t\tlet valor = 170\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse{\n\t\t console.log('Categoria Inexistente')\n\t\t}\n\t }\n\t else if (jogo==='Final'){\n\t\tlet categoria= Number(prompt ('Qual Categoria? 1,2,3 ou 4'))\n\t\tif(categoria===1){\n let valor = 1980\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===2){\n\t\t\tlet valor = 1320\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===3){\n\t\t\tlet valor = 880\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse if(categoria===4){\n\t\t\tlet valor = 330\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra : R$'+ total+',00')\n\t\t}\n\t\telse{\n \n\t\t console.log('Categoria Inexistente')\n\t\t}\n\t }\n\t else{\n \n\t\tconsole.log('Por Favor verifique se digitou a sigla corretamente.')\n\t }\n \n\t}else if (tipoJogo==='Internacional'){\n \t let jogo = prompt('Digite a sigla em maiusculo, SF - Semifinais, DT - Decisao do 3 lugar, FI - Final')\n if (jogo==='SF'){jogo='Semifinais'}\n else if (jogo==='DT'){jogo='Decisao do 3 lugar'}\n else if (jogo==='FI'){jogo='Final'}\n\t if (jogo==='semifinais'){\n\t\tlet categoria= Number(prompt ('Qual Categoria? 1,2,3 ou 4'))\n\t\tif(categoria===1){\n let valor = 1320\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t \tconsole.log('---Dados da compra---')\n \t\tconsole.log('Nome do cliente : '+ nome)\n\t \tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t \tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n console.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs +',00')\n console.log('Valor do Ingresso : R$'+ valor +',00')\n console.log('Valor total da compra em R$ :'+ total +',00')\n console.log('Valor total da compra em US$ :'+ totalUs +',00')\n\t\t}\n\t\telse if(categoria===2){\n\t\t\tlet valor = 880\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===3){\n\t\t\tlet valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===4){\n\t\t\tlet valor = 220\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\t console.log('---Dados da compra---')\n\t console.log('Nome do cliente : '+ nome)\n\t\t console.log('Tipo de Jogo : '+ tipoJogo)\n\t\t console.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n console.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n console.log('Valor do Ingresso : R$'+ valor+',00')\n console.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse{\n\t\t console.log('Categoria Inexistente')\n\t\t}\n\t }\n\t else if (jogo==='Decisao do 3 lugar'){\n\t\tlet categoria= Number(prompt ('Qual Categoria? 1,2,3 ou 4'))\n\t\tif(categoria===1){\n let valor = 660\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===2){\n\t\t\tlet valor = 440\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===3){\n\t\t\tlet valor = 330\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===4){\n\t\t\tlet valor = 170\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse{\n\t\t console.log('Categoria Inexistente')\n\t\t}\n\t }\n\t else if (jogo==='Final'){\n\t\tlet categoria= Number(prompt ('Qual Categoria? 1,2,3 ou 4'))\n\t\tif(categoria===1){\n let valor = 1980\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===2){\n\t\t\tlet valor = 1320\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===3){\n\t\t\tlet valor = 880\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse if(categoria===4){\n\t\t\tlet valor = 330\n let valorUs = valor/cotacao\n let quantos = Number(prompt('Quantos ingressos?'))\n let total= quantos*valor\n let totalUs = total/cotacao\n\t\tconsole.log('---Dados da compra---')\n\t\tconsole.log('Nome do cliente : '+ nome)\n\t\tconsole.log('Tipo de Jogo : '+ tipoJogo)\n\t\tconsole.log('Etapa do Jogo : '+ jogo)\n \tconsole.log('Categoria : '+ categoria)\n \tconsole.log('Quantidade de Ingressos : '+ quantos)\n \tconsole.log('---Valores---')\n console.log('Valor do Ingresso : US$'+ valorUs+',00')\n \tconsole.log('Valor do Ingresso : R$'+ valor+',00')\n \tconsole.log('Valor total da compra em R$ :'+ total+',00')\n console.log('Valor total da compra em US$ :'+ totalUs+',00')\n\t\t}\n\t\telse{\n \n\t\t console.log('Categoria Inexistente')\n\t\t}\n\t }\n\t else{\n \n\t\tconsole.log('Por Favor verifique se digitou a sigla corretamente.')\n\t }\n \n\t}\n else{\n\tconsole.log('Por Favor verifique se digitou a sigla corretamente.')\n }}", "title": "" }, { "docid": "25688d3a847140e902c0a10d7c181db2", "score": "0.5675813", "text": "function posarBoleta(e) {\r\n// console.log(\"has clicat el \"+ e.target.getAttribute('id'));\r\n if (numDeClics==0) {\r\n //si guanya\r\n if (e.target.getAttribute('id')==aleatorio) {\r\n resultat(\"guany\", \"Felicitats :)\");\r\n // resultat(\"Felicitats :)\");\r\n //si perd\r\n }else{\r\n // resultat(\"Torna a provar! :S\");\r\n resultat(\"perd\", \"Torna a provar! :S\");\r\n\r\n }\r\n numDeClics=numDeClics+1;\r\n }\r\n}", "title": "" }, { "docid": "71440b3b6d7608adde0b835f9a7198cd", "score": "0.5674491", "text": "function crepuscolo(njd,tempo_rif,longitudine,latitudine,altitudine){\n\n // funzione per il calcolo del crepuscolo astronomico.\n // FUNZIONE DA ELIMINARE e sostituire con crepuscolo_UT\n \n var tempo_rifst=0; // tempo di riferimento per il sorgere e il tramonto.\n // \nif (tempo_rif==\"TL\") { tempo_rifst=-fuso_loc(); } // riferimento al tempo locale.\nelse if (tempo_rif==\"TU\") { tempo_rifst=0 ;} // il riferimento rimane il TU\n\n\n var ps_sole=pos_sole(njd);\n var DEs=ps_sole[1];\n\n var LATr=latitudine/180*Math.PI;\n var DEr=DEs/180*Math.PI;\n\n var H=Math.acos(-Math.tan(LATr)*Math.tan(DEr));\n\n var H1=Math.acos((Math.cos(1.88495556)-Math.sin(LATr)*Math.sin(DEr))/(Math.cos(LATr)*Math.cos(DEr)));\n\n var H= H*180/Math.PI;\n var H1=H1*180/Math.PI;\n\n var T=((H1-H)/15)*0.9973;\n\n// new Array(azimut_sorgere,azimut_tramonto,tempo_sorgere,tempo_transito,tempo_tramonto)\n// 0 1 2 3 4\n\n var p_sole=ST_ASTRO_DATA(njd,ps_sole[0],ps_sole[1],longitudine,latitudine,altitudine,0.25);\n\n var crep_m=ore_24(p_sole[2]-T+tempo_rifst); // crepuscolo del mattino.\n var crep_s=ore_24(p_sole[4]+T+tempo_rifst); // crepuscolo serale\n\n crep_m=sc_ore_hm(crep_m); // crepuscolo del mattino.\n crep_s=sc_ore_hm(crep_s); // crepuscolo serale\n\n var tempi_crep= new Array(crep_m,crep_s);\n\n return tempi_crep;\n \n}", "title": "" }, { "docid": "71e8eda0d1b00de0f74306ca8614530d", "score": "0.56655556", "text": "function sg2plato (sg)\n{\n return ((-1 * 616.868) + (1111.14 * sg) - (630.272 * Math.pow(sg,2)) + (135.997 * Math.pow(sg, 3)));\n}", "title": "" }, { "docid": "84a71e96e5da1345e19e71f618d33688", "score": "0.56650776", "text": "function rimuovi(){\n\n\tvar j = 0;\n\n\t// Per ogni elemento controllo la condizione\n\t// Se è idoneo, copio elemento in J\n\n\tfor(var i = 0; i<persone.length; i++){\n\t\tif(persone[i].altezza > 1.5) {\n\t\t\tpersone[j++] = persone[i];\n\t\t}\n\t}\n\t// Aggiorno array con valori nuovi messi in J\n\tpersone.length = j;\n\n\t// Visualizzo\n\tvisualizzaPersone();\n}", "title": "" }, { "docid": "3d2eee95c0dbd97d809c4eae4258ac33", "score": "0.5660568", "text": "function reglaAumPrecioFullCobertura(){\n if(producto.f_cobertura.sellIn -1){\n precio_FullCobertura + 1;\n }else{\n\n }\n}", "title": "" }, { "docid": "76f509390ef564eb23ad5ee17de83b9e", "score": "0.56600964", "text": "presupuesto_restante() {\n //console.log(cantidad_presupuesto);\n\n const restante_span = document.querySelector('span#restante');\n restante_span.innerHTML = `${cantidad_presupuesto.restante}`;\n this.comprobar_presupuesto();\n\n\n }", "title": "" }, { "docid": "4c6b606be003e2dc141cc156c9209fa6", "score": "0.56575274", "text": "function szamol(szam){\r\n\tif (szam==1){\r\n\t\tosszeg=ido*ar/letsz;\r\n\t\tconsole.log(osszeg);\r\n\t\t//xd1.value=osszeg*1;\r\n\t\tdocument.getElementById(\"fk\").value=osszeg;\r\n\t}\r\n\telse if (szam==2){\r\n\t\tosszeg=ido1*ar1/letsz1;\r\n\t\t//xd2.value=osszeg;\r\n\t}\r\n\telse if (szam==3){\r\n\t\tosszeg=ido2*ar2/letsz2;\r\n\t\t//xd3.value=osszeg;\r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "2bbcefd19da631a1943c3821339ed371", "score": "0.565273", "text": "secuencia() {\n this.secuencia = new Array(ULTIMO_NIVEL).fill(0).map(n => Math.floor(Math.random() * 4))\n // console.log(this.secuencia)\n }", "title": "" }, { "docid": "48b9eca0ead8f822e9bbbe4fe6f19efb", "score": "0.56491786", "text": "function beratBadanWanita(tinggi){\r\n let ideal = (tinggi - 100) - (tinggi -100) * 0.15\r\n return `Wanita = ${ideal} Kg`; \r\n}", "title": "" }, { "docid": "73cb87c82b3d082bbe41ae9d4957fccf", "score": "0.56491154", "text": "function cfasi_lunari(mese,anno,fase){\n\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) Luglio 2010\n // funzione per il calcolo delle fasi lunari.\n // mese= numero del mese da 1 a 12.\n // anno=anno di riferimento.\n // k=0.00 per la luna nuova\n // k=0.25 per il primo quarto.\n // k=0.50 per la luna piena\n // k=0.75 per l'ultimo quarto.\n // fase= valore numerico per la fase 0 - 0.25 - 0.50 - 0.75 sono ammessi solo questi valori.\n \nvar anno_dec=anno+(mese/12);\nvar k=(anno_dec-1900)*12.3685; // calcolo della costante k. (parseInt) tronca la parte decimale\n k=parseInt(k)*1+fase*1;\n \nvar T=k/1236.85;\n\nvar fseno=166.56+132.87*T-0.009173*T*T;\n fseno=fseno/180*Math.PI;\n\nvar njd_fase =2415020.75933+29.53058868*k+0.0001178*T*T-0.000000155*T*T*T+0.00033*Math.sin(fseno);\n\n // calcolo anomalia media del sole.\n\nvar M=359.2242+29.10535608*k-0.0000333*T*T-0.00000347*T*T*T;\n M=gradi_360(M);\n M=M/180*Math.PI;\n\n // calcolo anomalia media della luna.\n\nvar M1=306.0253+385.81691806*k+0.0107306*T*T+0.00001236*T*T*T;\n M1=gradi_360(M1);\n M1=M1/180*Math.PI;\n\n // calcolo dell'argomento della latitudine della luna.\n\nvar F=21.2964+390.67050646*k-0.0016528*T*T-0.00000239*T*T*T;\n F=gradi_360(F);\n F=F/180*Math.PI;\n\n // calcolo correzioni per la luna nuova e piena.\n\nvar correzione1=0;\n\nif (fase==0 || fase==0.50) {\n \n correzione1= (0.1734-0.000393*T)*Math.sin(M)\n +0.0021*Math.sin(2*M)\n -0.4068*Math.sin(M1)\n +0.0161*Math.sin(2*M1)\n -0.0004*Math.sin(3*M1)\n +0.0104*Math.sin(2*F)\n -0.0051*Math.sin(M+M1)\n -0.0074*Math.sin(M-M1)\n +0.0004*Math.sin(2*F+M)\n -0.0004*Math.sin(2*F-M)\n -0.0006*Math.sin(2*F+M1)\n +0.0010*Math.sin(2*F-M1)\n +0.0005*Math.sin(M+2*M1); \n}\n\nelse if (fase==0.25 || fase==0.75) {\n \n correzione1= (0.1721-0.0004*T)*Math.sin(M)\n +0.0021*Math.sin(2*M)\n -0.6280*Math.sin(M1)\n +0.0089*Math.sin(2*M1)\n -0.0004*Math.sin(3*M1)\n +0.0079*Math.sin(2*F)\n -0.0119*Math.sin(M+M1)\n -0.0047*Math.sin(M-M1)\n +0.0003*Math.sin(2*F+M)\n -0.0004*Math.sin(2*F-M)\n -0.0006*Math.sin(2*F+M1)\n +0.0021*Math.sin(2*F-M1)\n +0.0003*Math.sin(M+2*M1)\n +0.0004*Math.sin(M-2*M1)\n -0.0003*Math.sin(2*M+M1); \n}\n\nelse {alert(\"Valore fase \"+fase+\" non valido!\");}\n\nvar njd_fase=njd_fase+correzione1; // per la luna nuova.\n\n // njd_fase= numero dei giorni giuliani.\nreturn njd_fase;\n\n}", "title": "" }, { "docid": "3da3a5b431efca92ef20e980d44053c3", "score": "0.564318", "text": "function DescuentoJudicial(){ \n //obtiene el valor anterior de sal_jud\n var sal_jud=document.getElementById(\"sal_jud\").value\n //valor del input de sueldo neto\n var SaldoNeto= document.getElementById('sueldoNeto').value;\n //si anteriormente ya tenia un valor restaura ante cambios del operador\n if(sal_jud > 0)\n {\n var suma=parseFloat(SaldoNeto) + parseFloat(sal_jud);\n document.getElementById(\"sueldoNeto\").value=suma;\n }\n //valor del input del descuento judicial\n var monto= document.getElementById('inputJudicial').value;\n //el nuevo valor de Saldo Neto\n var SaldoNeto= document.getElementById(\"sueldoNeto\").value;\n document.getElementById(\"sueldoNeto\").value=(SaldoNeto-monto);\n document.getElementById(\"sal_jud\").value=monto;\n //guardamos el valor de salario neto(esto se actualizara con cada descuento)\n var sueldoneto=document.getElementById('sueldoNeto').value;\n document.getElementById(\"sal_neto\").value=sueldoneto;\n \n }", "title": "" }, { "docid": "e29c6e1cdd986a03e8ed9520f7070562", "score": "0.56405395", "text": "function llogarit()\n{\n\n\tmerr();\n\n\tvar piket = 0;\n\n\tvar shumaKrediteve = 0;\n\n\tfor( var i = 0; i < fushatAktive.length; i++ )\n\t{\t\n\n\t\tvar kredit = LENDET[ fushatAktive[ i ].pozicioni ].kreditet;\n\n\t\tpiket += kredit * fushatAktive[ i ].vlera;\n\n\t\tshumaKrediteve += kredit;\n\n\t}\n\n\tif( gabim == true )\n\t{\n\n\t\tdocument.getElementById( \"pergjigja\" ).innerHTML = mesazhGabimi;\n\t}\n\telse\n\t{\t\n\t\tvar mesatarja = piket / shumaKrediteve;\n\n\t\tvar string = \"<br>Piket: \" + piket + \"<br>Kreditet: \" + shumaKrediteve + \"<br><b>Mesatarja: \" + mesatarja.toFixed( 2 ) + \"</b>\";\n\n\t\tdocument.getElementById( \"pergjigja\" ).innerHTML = string;\n\t}\n\n\t/// ngrirja e butonave\n\tdocument.querySelector( \"button\" ).disabled = true ;\n\n\tgabim = false;\n\n\tfushatAktive = [];\n}///FUND llogarit", "title": "" }, { "docid": "ad5b143e9c698731c940d4de4644b116", "score": "0.56396693", "text": "enhetspris() {\n return this.pris / this.antall;\n }", "title": "" }, { "docid": "dedb5c64f29bd3f55f653e95e0fa25b4", "score": "0.56343454", "text": "function Descuento40(){\n //recuperamos el valor descuento40 anterior\n var descuento40=document.getElementById(\"sal_pyt40\").value;\n //recuperamos el sueldo neto del input\n var SueldoNeto=document.getElementById('sueldoNeto').value;\n //si anteriormente ya tenia un valor, debe reestablecer\n if(descuento40 > 0)\n {\n var suma=parseFloat(SueldoNeto) + parseFloat(descuento40);\n document.getElementById(\"sueldoNeto\").value=suma;\n }\n //sueldo bruto inicial\n var SaldoBrutoIni=document.getElementById('sueldoBruto').value;\n //calcula el jpornal diario\n var jornal=SaldoBrutoIni/30;\n //obtiene dias de permisos/llegada tardia\n var dias= document.getElementById('descuento40').value;\n //descuento por dia de 40 %\n var descuento40=((jornal*40)/100)\n //actualizar valor de sal_pyt\n document.getElementById(\"sal_pyt40\").value=(descuento40*dias);\n //Actualiza el neto a cobrar\n var SaldoNeto= document.getElementById('sueldoNeto').value;\n document.getElementById(\"sueldoNeto\").value=SaldoNeto-(descuento40*dias);\n \n \n //guardamos el valor de salario neto(esto se actualizara con cada descuento)\n var sueldoneto=document.getElementById('sueldoNeto').value;\n document.getElementById(\"sal_neto\").value=sueldoneto;\n }", "title": "" }, { "docid": "73a85e5332c72f04d7d263630c175f95", "score": "0.5634273", "text": "function saludar() {\n console.log(\"HOLA MUNDO\");\n}", "title": "" }, { "docid": "e899a8416efe6e65e1471ca05de66ce5", "score": "0.56341887", "text": "function Descuento50(){\n //recuperamos el valor descuento50 anterior\n var descuento50=document.getElementById(\"sal_pyt50\").value;\n //recuperamos el sueldo neto del input\n var SueldoNeto=document.getElementById('sueldoNeto').value;\n //si anteriormente ya tenia un valor, debe reestablecer\n if(descuento50 > 0)\n {\n var suma=parseFloat(SueldoNeto) + parseFloat(descuento50);\n document.getElementById(\"sueldoNeto\").value=suma;\n }\n //sueldo bruto inicial\n var SaldoBrutoIni=document.getElementById('sueldoBruto').value;\n //calcula el jpornal diario\n var jornal=SaldoBrutoIni/30;\n //obtiene dias de permisos/llegada tardia\n var dias= document.getElementById('descuento50').value;\n //descuento por dia de 50 %\n var descuento50=((jornal*50)/100);\n \n //actualizar valor de sal_pyt\n document.getElementById(\"sal_pyt50\").value=(descuento50*dias);\n //Actualiza el neto a cobrar\n var SaldoNeto= document.getElementById('sueldoNeto').value;\n document.getElementById(\"sueldoNeto\").value=SaldoNeto-(descuento50*dias);\n \n \n \n //guardamos el valor de salario neto(esto se actualizara con cada descuento)\n var sueldoneto=document.getElementById('sueldoNeto').value;\n document.getElementById(\"sal_neto\").value=sueldoneto;\n }", "title": "" }, { "docid": "0d7fa98c73b3895fdd763eb5aaa4fd78", "score": "0.56327003", "text": "function salta(Nio_lvl1_2, grupo_lvl1_2){\n this.salta=0;\n }", "title": "" }, { "docid": "cc3d9d7b5b93f9b603b7cf3eb6fdca49", "score": "0.5631302", "text": "function perimetroCuad(lado){\n return lado * 4;\n}", "title": "" }, { "docid": "99b3bec3d1538b249b6b860c7bc22292", "score": "0.5626773", "text": "function UtilPoFo() {\r\n if (perso.Pinv[0] != 0) { //Test si il reste des potion\r\n if (perso.Pfor >= 100) { //Test si le maximum est atteint\r\n alert(\"Vous avez atteint la force maximale\");\r\n console.log(\"Force au max / nombre de potion = \"+ perso.Pinv[0]);\r\n } else {\r\n perso.Pinv[0] -= 1; // -1 potion\r\n perso.Pfor += 1; // +1 caracteristique\r\n document.getElementById('nbPoFo').value = perso.Pinv[0]; //affichage du nombre de potion dans l'inventaire\r\n document.getElementById('force').value = perso.Pfor; //affichage de la force dans les caractéristique\r\n console.log(\"Utilisation d'une potion de force / nombre de potion = \"+ perso.Pinv[0]);\r\n console.log(\"La force de \"+ perso.Pnom + \" monte a \"+perso.Pfor);\r\n }\r\n } else {\r\n alert(\"Vous n'avez plus de potion\");\r\n console.log(\"Pas de potion de force / nombre de potion = \"+ perso.Pinv[0]);\r\n }\r\n\r\n}", "title": "" } ]
8b7e7928c65dc1f8cf51ab91d8092b24
Helper Hook to check if our context is null. This makes it easier to call `useContext` where we need it.
[ { "docid": "bd08df4edb0a486750ede2b42798e743", "score": "0.4932016", "text": "function useInstance() {\n const context = useContext(InstanceContext);\n if (context === undefined) {\n throw Error(`useInstance must be used within a InstanceProvider`);\n }\n return context;\n}", "title": "" } ]
[ { "docid": "6b92f5bb0242b13d664a57475a04d74c", "score": "0.638108", "text": "function useStoryContext() {\n var _getHooksContextOrThr = getHooksContextOrThrow(),\n currentContext = _getHooksContextOrThr.currentContext;\n\n if (currentContext == null) {\n throw invalidHooksError();\n }\n\n return currentContext;\n}", "title": "" }, { "docid": "6b92f5bb0242b13d664a57475a04d74c", "score": "0.638108", "text": "function useStoryContext() {\n var _getHooksContextOrThr = getHooksContextOrThrow(),\n currentContext = _getHooksContextOrThr.currentContext;\n\n if (currentContext == null) {\n throw invalidHooksError();\n }\n\n return currentContext;\n}", "title": "" }, { "docid": "f2974e635524d924e42756986b134918", "score": "0.6305427", "text": "get useContext () {\n\t\treturn this._useContext;\n\t}", "title": "" }, { "docid": "f2974e635524d924e42756986b134918", "score": "0.6305427", "text": "get useContext () {\n\t\treturn this._useContext;\n\t}", "title": "" }, { "docid": "f2974e635524d924e42756986b134918", "score": "0.6305427", "text": "get useContext () {\n\t\treturn this._useContext;\n\t}", "title": "" }, { "docid": "f2974e635524d924e42756986b134918", "score": "0.6305427", "text": "get useContext () {\n\t\treturn this._useContext;\n\t}", "title": "" }, { "docid": "0ba9d797f4e4b3802416fa6ec387c179", "score": "0.6277135", "text": "function isAppContext() {\n return (typeof window === 'undefined');\n}", "title": "" }, { "docid": "008c68812c22453f09e5bab39f839670", "score": "0.618332", "text": "function useThemeContext() {\n const context = (0, _react.useContext)(_ThemeContext.default);\n\n if (context == null) {\n throw new Error('\"useThemeContext\" is used outside of \"Layout\" component. Please see https://docusaurus.io/docs/api/themes/configuration#usethemecontext.');\n }\n\n return context;\n}", "title": "" }, { "docid": "3ebb5e1ca6dbfa22960248b2257d706a", "score": "0.61357814", "text": "get useContext() {\n\t\treturn this.__useContext;\n\t}", "title": "" }, { "docid": "3ebb5e1ca6dbfa22960248b2257d706a", "score": "0.61357814", "text": "get useContext() {\n\t\treturn this.__useContext;\n\t}", "title": "" }, { "docid": "679b4ff96bee929d1aff10e014b9831f", "score": "0.60447", "text": "function useAppContext() {\n const context = React.useContext(AppContext);\n\n if (!context) {\n throw new Error('Must use useAppContext within AppProvider');\n }\n\n return context;\n}", "title": "" }, { "docid": "2a966ed3871d6aeda245b2cae8e63275", "score": "0.59856546", "text": "function isRelayContext(context) {\n\t return typeof context === 'object' && context !== null && typeof context.getFragmentResolver === 'function' && typeof context.getStoreData === 'function';\n\t}", "title": "" }, { "docid": "2a966ed3871d6aeda245b2cae8e63275", "score": "0.59856546", "text": "function isRelayContext(context) {\n\t return typeof context === 'object' && context !== null && typeof context.getFragmentResolver === 'function' && typeof context.getStoreData === 'function';\n\t}", "title": "" }, { "docid": "fcb3f363226633f00a2eff1168d9af13", "score": "0.5807792", "text": "function useThemeContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_theme_ThemeContext__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]);}", "title": "" }, { "docid": "36d761ee8d9cf84f9554ab0cce63cadf", "score": "0.5805765", "text": "function requireGLContext() {\n if (!gl)\n throw \"No active WebGL context\";\n}", "title": "" }, { "docid": "9014d01ee35dfaedea528935735768f4", "score": "0.5635891", "text": "function useLocalizationContext() {\n const localization = React.useContext(MuiPickersAdapterContext);\n\n if (localization === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.` : _formatMuiErrorMessage(13));\n }\n\n return localization;\n}", "title": "" }, { "docid": "1d88bc4f9673e1a0303af07d03362111", "score": "0.56282943", "text": "function get_context()\n\t{\n\t\treturn os_ctx;\n\t\t//return ctx;\n\t}", "title": "" }, { "docid": "7c646e930a95c01f3d793aaf454fd153", "score": "0.56033903", "text": "function getContext(_, ctx) {\n return ctx;\n}", "title": "" }, { "docid": "7c646e930a95c01f3d793aaf454fd153", "score": "0.56033903", "text": "function getContext(_, ctx) {\n return ctx;\n}", "title": "" }, { "docid": "5a673fb5aab9006c92277888b67fe5b9", "score": "0.5576549", "text": "function getContext(_, ctx) {\n return ctx;\n }", "title": "" }, { "docid": "5a673fb5aab9006c92277888b67fe5b9", "score": "0.5576549", "text": "function getContext(_, ctx) {\n return ctx;\n }", "title": "" }, { "docid": "79e841e20cc763b3c0bc589fcef9775c", "score": "0.5550885", "text": "contextIsActive() {\n return this.context != null;\n }", "title": "" }, { "docid": "800c11efb63e58acf2eb97bf891a2399", "score": "0.5515613", "text": "function browserContext() {\n if (typeof window === 'undefined') return false;\n return true;\n}", "title": "" }, { "docid": "5e9bdb041ef46442d67694c9d537dfed", "score": "0.54673946", "text": "function useParentContextOrNot() {\n return ((nt.useParentContext == 'auto') && (parent != this))\n || (nt.useParentContext == 'yes');\n}", "title": "" }, { "docid": "1844e37722e2be211bb5db30aafab903", "score": "0.5411179", "text": "function checkContext() {\n\tlet sortdata = document.querySelector(\"#sort-data\");\n\tif (sortdata !== null) enableSort(sortdata);\n}", "title": "" }, { "docid": "31cebcf6bde2c54d1a8ab60fe3ef669c", "score": "0.5390199", "text": "_isValidContext() {\n const isNode = (typeof process !== 'undefined')\n && (typeof process.release !== 'undefined')\n && (process.release.name === 'node');\n return isNode;\n }", "title": "" }, { "docid": "3db188dd2c1e764ae8956d70e6e3ac41", "score": "0.53798944", "text": "function Home() {\n\n\n\n// const {inicioSesion} = useContext(userContext);\n return (\n <>\n <Navbar></Navbar>\n <Dashboard/>\n </>\n )\n}", "title": "" }, { "docid": "f2790829d195a34db87195371dcc9123", "score": "0.53589195", "text": "function isInferentialContext(mapper) {\n return mapper && mapper.context;\n }", "title": "" }, { "docid": "b8c9362321568c1b81fdfac826092c71", "score": "0.53306496", "text": "componentDidMount() {\n let value = this.context;\n console.log(value);\n /* perform a side-effect at mount using the value of MyContext */\n }", "title": "" }, { "docid": "1144c4c9db3485c33f37854a9049163d", "score": "0.5324681", "text": "_onContextDisposed(context) {\n algorithm_1.ArrayExt.removeFirstOf(this._contexts, context);\n }", "title": "" }, { "docid": "2d6560b538286baf1236c24de6c94f37", "score": "0.5265773", "text": "function setupContext( itcb ) {\n // if a context was passed we can skip this step\n if ( hasContext || isTest ) { return itcb( null ); }\n options.activityContext = {\n skipInvalidateParentActivities,\n 'cache': {},\n 'queueKey': {},\n 'lastInBatch': ( 0 === numberOfCopies )\n };\n itcb( null );\n }", "title": "" }, { "docid": "694155fedb5f164134ec005a8fd1b526", "score": "0.5262102", "text": "function useAccount() {\n const context = useContext(AccountContext)\n\n if (!context) {\n throw new Error('The useAccount hook should be used inner AccountProvider')\n }\n\n return context\n}", "title": "" }, { "docid": "560796972991b7c2232149c6a6218c38", "score": "0.52307326", "text": "function useDocusaurusContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_context__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]);}", "title": "" }, { "docid": "df2f094c9084f97f386169d846d200a1", "score": "0.52081263", "text": "static first(context) {\n throw new Error(\"TODO: Method not implemented\");\n }", "title": "" }, { "docid": "c6864e671775024282d7646895726ef9", "score": "0.5200914", "text": "function usePortalForContext() {\n var usePortal = false;\n\n // for iframe use the outer window's context unless the outer window is hosted on a different domain.\n try {\n // For security reasons the browsers will not allow cross server scripts and\n // throw an exception instead.\n // Note that bad browsers (e.g. google chrome) will not catch the exception\n usePortal = (top != self) && (top.location.host == location.host);\n }\n catch (e) {\n usePortal = false;\n }\n\n return usePortal;\n}", "title": "" }, { "docid": "4aaef562dcacf3a4d29bfd297e781b79", "score": "0.5195563", "text": "function noContext(){\n console.log(this);\n}", "title": "" }, { "docid": "cf206e1c2afe788a0c0209e7708e595b", "score": "0.5155732", "text": "getContext() {\n return this.context;\n }", "title": "" }, { "docid": "cf206e1c2afe788a0c0209e7708e595b", "score": "0.5155732", "text": "getContext() {\n return this.context;\n }", "title": "" }, { "docid": "3e0c8c72bd5fd812a3f2c5991a8bb7f9", "score": "0.5152561", "text": "function getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}", "title": "" }, { "docid": "3e0c8c72bd5fd812a3f2c5991a8bb7f9", "score": "0.5152561", "text": "function getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}", "title": "" }, { "docid": "b33a926f943165a82b91be5086bf8315", "score": "0.51404846", "text": "function getQueryClientContext(contextSharing) {\r\n if (contextSharing && typeof window !== 'undefined') {\r\n if (!window.ReactQueryClientContext) {\r\n window.ReactQueryClientContext = defaultContext;\r\n }\r\n\r\n return window.ReactQueryClientContext;\r\n }\r\n\r\n return defaultContext;\r\n}", "title": "" }, { "docid": "b9bf35e93fb36137bcb63f36ab06bad0", "score": "0.51313144", "text": "function makeLostContextWrapper(ctx, functionName) {\n var f = ctx[functionName];\n return function() {\n // Only call the functions if the context is not lost.\n if (!contextLost_) {\n if (!checkResources(arguments)) {\n glErrorShadow_[ctx.INVALID_OPERATION] = true;\n return;\n }\n var result = f.apply(ctx, arguments);\n return result;\n }\n };\n }", "title": "" }, { "docid": "7026c2e932a46f7396b7030b268752c4", "score": "0.51209867", "text": "function ContextAPI() {\n }", "title": "" }, { "docid": "c7c7124656cf886fda38a0482a698fee", "score": "0.51130843", "text": "get context() {\n return getComponent$1(this.nativeNode) || getContext(this.nativeNode);\n }", "title": "" }, { "docid": "d46d376d1978e59fd7720c91ccedeae6", "score": "0.510445", "text": "function getRealContext(gl) {\n if (gl === null) {\n // Return to ensure we don't create a context in this case.\n return null;\n }\n\n var data = getContextData(gl);\n // If the context has a realContext member, it is a debug context so return the realContext\n return data.realContext ? data.realContext : gl;\n}", "title": "" }, { "docid": "bb2cf765f87e27cbb582d97349da8142", "score": "0.5094837", "text": "get defaultContext() {\n return result(this.constructor, 'defaultContext', {})\n }", "title": "" }, { "docid": "2ad82027bf94baa10c1c844a4056760f", "score": "0.5082927", "text": "function App () {\n return (\n <div className=\"App\">\n {/* <ContextDemo /> */}\n {/* <Header /> */}\n <HookDemo />\n </div>\n );\n}", "title": "" }, { "docid": "e72d45ea4a910cd816fad5ed925202af", "score": "0.5078852", "text": "setContext(context) {\n this.context = context;\n }", "title": "" }, { "docid": "8933ee7f3ca6d6d4edc5545293854193", "score": "0.5078522", "text": "function App() {\n\n const {showResult} = useAppContext()\n\n return (\n <div className='app'>\n \n {!showResult ? \n \n <QuizContainer /> :\n\n <Result />\n }\n\n <footer>\n CodeAgainst&nbsp;<a href=\"https://devchallenges.io/\">@DevChalenges.io</a>\n </footer>\n </div>\n );\n}", "title": "" }, { "docid": "ee4a4e2767a9e2a2d54d982ba2073c18", "score": "0.50782824", "text": "function App() {\n\n const { user } = useContext(AuthContext)\n console.log(\"user\", user);\n\n return (\n <AuthProvider>\n <div className=\"App\">\n <Router>\n <Header /> \n <Route exact path=\"/\" component={Body} />\n <Route exact path=\"/test\" component={Testform} />\n <AuthRoute exact path=\"/Signup\" component={Signup} />\n <AuthRoute exact path=\"/login\" component={Login} />\n </Router>\n </div>\n </AuthProvider>\n );\n}", "title": "" }, { "docid": "910a4769629ac4c6d298aaebeeb10bda", "score": "0.5061991", "text": "function enterContext(context) {\n var keyword = toKeyword(context);\n lt.objs.context.in_BANG_.call(null, keyword, null);\n }", "title": "" }, { "docid": "ba4a4ca36ee41de914928d3a344e89be", "score": "0.5047617", "text": "isContextDefault() {\n return this.state.command.contextInfo.selector === \"*\";\n }", "title": "" }, { "docid": "fd1a4d5f56fa595db50026a98bbb8f2b", "score": "0.5044556", "text": "function useCart() {\n // use a consumer to access local state\n const all = useContext(LocalStateContext);\n return all;\n}", "title": "" }, { "docid": "eda3d21b45b64287fef263cd2a1ae464", "score": "0.5038022", "text": "isWebContext () {\n return true;\n }", "title": "" }, { "docid": "c6544854738c5576b446a677a920eb2e", "score": "0.5036536", "text": "function sglGetCanvasContext(canvasID) {\n\t var canvas = document.getElementById(canvasID);\n\t if (!canvas) return null;\n\n\t var gl = canvas.getContext(\"experimental-webgl\");\n\t if (!gl) return null;\n\n\t if (gl.FALSE == undefined) gl.FALSE = 0;\n\t if (gl.TRUE == undefined) gl.TRUE = 1;\n\n\t return gl;\n }", "title": "" }, { "docid": "4beb4d3625d76b81140129cc185f37ee", "score": "0.50223935", "text": "function getRootContext$2(component) {\n var rootContext = getRootView(component)[CONTEXT];\n ngDevMode && assertDefined(rootContext, 'rootContext');\n return rootContext;\n}", "title": "" }, { "docid": "4beb4d3625d76b81140129cc185f37ee", "score": "0.50223935", "text": "function getRootContext$2(component) {\n var rootContext = getRootView(component)[CONTEXT];\n ngDevMode && assertDefined(rootContext, 'rootContext');\n return rootContext;\n}", "title": "" }, { "docid": "43b17564708f1cd7bd1d22feeba682cd", "score": "0.50169843", "text": "function __onContextDisable() {\n return false;\n }", "title": "" }, { "docid": "d11f040d13bd0cd9486465f6ea315447", "score": "0.50156444", "text": "function pollContext(gl) {\n __WEBPACK_IMPORTED_MODULE_5__helpers_query_manager__[\"a\" /* default */].poll(gl);\n}", "title": "" }, { "docid": "027739d2df891cd663c8e0f0a5cd5619", "score": "0.50049496", "text": "function makeLostContextFunctionWrapper(ctx, functionName) {\n var f = ctx[functionName];\n return function() {\n // log(\"calling:\" + functionName);\n // Only call the functions if the context is not lost.\n loseContextIfTime();\n if (!contextLost_) {\n //if (!checkResources(arguments)) {\n // glErrorShadow_[wrappedContext_.INVALID_OPERATION] = true;\n // return;\n //}\n try{\n var result = f.apply(ctx, arguments);\n return result;\n }catch (e){\n debugger;\n return null;\n }\n }\n };\n }", "title": "" }, { "docid": "3629c4e0c909e2223e11b7187339dc16", "score": "0.4996116", "text": "processContext(context) {}", "title": "" }, { "docid": "2f95496c727fd1d2b0ecd6d7c4b0152b", "score": "0.4989939", "text": "function initContext () {\n var cwd = process.cwd(),\n context = \"none\";\n if (hasDir(cwd, \"CVS\")) context = \"cvs\";\n else if (hasDir(cwd, \".svn\")) context = \"svn\";\n else if (hasInSelfOrParent(cwd, \".git\")) context = \"git\";\n else if (hasInSelfOrParent(cwd, \".hg\")) context = \"hg\";\n return context;\n}", "title": "" }, { "docid": "07e958bc4203abfcb61a565edd5b006c", "score": "0.4989642", "text": "getContext() {\n return this._context;\n }", "title": "" }, { "docid": "2789407e176939d5c924272055cc3f99", "score": "0.49857628", "text": "function App() {\n return (\n <div className=\"App\">\n <ThemeProvider>\n <FunctionContextComponent />\n </ThemeProvider>\n </div>\n );\n}", "title": "" }, { "docid": "1a2f8a017ac7141f255f900cda9e6524", "score": "0.49824017", "text": "function withContext(Component) {\n // ...and returns another component...\n return function ContextComponent(props) {\n // ... and renders the wrapped component with the context theme!\n // Notice that we pass through any additional props as well\n return (\n <MyConsumer>\n {context => <Component {...props} context={context} />}\n </MyConsumer>\n );\n };\n}", "title": "" }, { "docid": "9a72a882d83ca3232d64feec7087599d", "score": "0.4980116", "text": "function makeLostContextFunctionWrapper(ctx, functionName) {\n var f = ctx[functionName];\n return function() {\n // log(\"calling:\" + functionName);\n // Only call the functions if the context is not lost.\n loseContextIfTime();\n if (!contextLost_) {\n //if (!checkResources(arguments)) {\n // glErrorShadow_[wrappedContext_.INVALID_OPERATION] = true;\n // return;\n //}\n var result = f.apply(ctx, arguments);\n return result;\n }\n };\n }", "title": "" }, { "docid": "c35a6fdedb2119c7e1ecf42336f75ace", "score": "0.4958977", "text": "function getAvailableContext(canvas, contextList) {\n if (canvas.getContext) {\n for(var i = 0; i < contextList.length; ++i) {\n try {\n var context = canvas.getContext(contextList[i]);\n if(context != null)\n return context;\n } catch(ex) { }\n }\n }\n return null;\n}", "title": "" }, { "docid": "2deb91312d92f38fd8db6d3d1dc616f1", "score": "0.4956222", "text": "function getRootContext$1(component) {\n var rootContext = getRootView(component)[CONTEXT];\n ngDevMode && assertDefined(rootContext, 'rootContext');\n return rootContext;\n}", "title": "" }, { "docid": "8ea568ae9a06db8c04dc77fac3415946", "score": "0.49522674", "text": "function initializeContext() {\n GSC.Logging.checkWithLogger(logger, context === null);\n context = new GSC.PcscLiteClient.Context(CLIENT_TITLE, SERVER_APP_ID);\n context.addOnInitializedCallback(contextInitializedListener);\n context.addOnDisposeCallback(contextDisposedListener);\n context.initialize();\n}", "title": "" }, { "docid": "7a36d3b8cc90aa560f1b8cec61f4e693", "score": "0.49212253", "text": "render () {\n // const value = this.context\n // console.log(this.context);\n const count = useContext(CounterContext)\n const user = useContext(UserContext)\n return (\n <View>\n 我是counter.js\n {user}\n Count: {count}\n </View>\n )\n }", "title": "" }, { "docid": "60deca6b1dc535168bcef420dd56332f", "score": "0.4917134", "text": "function getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "60deca6b1dc535168bcef420dd56332f", "score": "0.4917134", "text": "function getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "60deca6b1dc535168bcef420dd56332f", "score": "0.4917134", "text": "function getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "60deca6b1dc535168bcef420dd56332f", "score": "0.4917134", "text": "function getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "60deca6b1dc535168bcef420dd56332f", "score": "0.4917134", "text": "function getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "60deca6b1dc535168bcef420dd56332f", "score": "0.4917134", "text": "function getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "48fbc630a2864f404330a16e6e4bb805", "score": "0.4916887", "text": "static get contextTypes() {\n return {\n router: React.PropTypes.object.isRequired,\n };\n }", "title": "" }, { "docid": "9b350db512a64e83c2998e53557e4bab", "score": "0.49149284", "text": "function setContext() {\n\n $context = $( Config.get( 'context' ) );\n\n }", "title": "" }, { "docid": "a8bf5642ac1a3b670bfba66e82296570", "score": "0.49100342", "text": "function useSwitchTheme() {\n return useContext(SwitchThemeContext)\n }", "title": "" }, { "docid": "64f4698f54c499dceb83c0c2d80d54a5", "score": "0.49073103", "text": "get context() {\n\t\treturn this.__context;\n\t}", "title": "" }, { "docid": "64f4698f54c499dceb83c0c2d80d54a5", "score": "0.49073103", "text": "get context() {\n\t\treturn this.__context;\n\t}", "title": "" }, { "docid": "64f4698f54c499dceb83c0c2d80d54a5", "score": "0.49073103", "text": "get context() {\n\t\treturn this.__context;\n\t}", "title": "" }, { "docid": "358c95e6c646ab64e37321a96ec68342", "score": "0.4906048", "text": "componentDidMount() {\n console.log(this.context)\n }", "title": "" }, { "docid": "bc2651becdf03efe5f5358672fbae086", "score": "0.4894933", "text": "get context () {\n\t\treturn this._context;\n\t}", "title": "" }, { "docid": "bc2651becdf03efe5f5358672fbae086", "score": "0.4894933", "text": "get context () {\n\t\treturn this._context;\n\t}", "title": "" }, { "docid": "bc2651becdf03efe5f5358672fbae086", "score": "0.4894933", "text": "get context () {\n\t\treturn this._context;\n\t}", "title": "" }, { "docid": "006a53a2dd9d7d2638476287c13ecc5e", "score": "0.48766142", "text": "_preInit() {\n if (this.context) {\n throw new Error(`${this.debugTag} has assigned a context in the wrong place. Make sure to only assign context in shared function.`);\n }\n\n // run shared\n try {\n const sharedResult = this.shared?.();\n if (isPlainObject(sharedResult)) {\n // store returned object in `this`\n Object.assign(this, sharedResult);\n }\n\n // assign context\n this.context = Object.freeze({\n ...(this.parent?.context || EmptyObject),\n ...(this.context || EmptyObject)\n });\n }\n catch (err) {\n throw new NestedError(`${this.debugTag} Failed to initialize shared context. ` +\n `IMPORTANT: \"shared\" function is executed on host and client. Make sure to only reference symbols available on both.`, err);\n }\n }", "title": "" }, { "docid": "10dfccdb82566328c8ac6aae3a6906d8", "score": "0.4865918", "text": "function getRootContext(component) {\r\n var rootContext = getRootView(component).context;\r\n ngDevMode && assertNotNull(rootContext, 'rootContext');\r\n return rootContext;\r\n}", "title": "" }, { "docid": "40679afe8dcff26ab93b234d2c3996f5", "score": "0.4865447", "text": "function getRootContext(viewOrComponent) {\n var rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "c81b64d996a357b90dee1dd5cdc3279c", "score": "0.4864421", "text": "handleWebGLContextLost() {\n ol.obj.clear(this.bufferCache_);\n ol.obj.clear(this.shaderCache_);\n ol.obj.clear(this.programCache_);\n this.currentProgram_ = null;\n }", "title": "" }, { "docid": "682aea54fd5a885640fcd3fa16262eb4", "score": "0.4861517", "text": "function requiredConfigsExist (context) {\n const {VICTOROPS_API_ID, VICTOROPS_API_KEY, VICTOROPS_TWILIO_SERVICE_API_KEY} = context;\n if (\n _.isUndefined(VICTOROPS_API_ID) ||\n _.isUndefined(VICTOROPS_API_KEY) ||\n _.isUndefined(VICTOROPS_TWILIO_SERVICE_API_KEY)\n ) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "7712c9fcc22844c7e3f48141a4d05aff", "score": "0.48545486", "text": "function getRootContext(viewOrComponent) {\n var rootView = getRootView(viewOrComponent);\n ngDevMode && assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n }", "title": "" }, { "docid": "8bba4e78b462da8ae743d6c8b0b4f57e", "score": "0.48524183", "text": "render() {\n // const { user } = this.context;\n return (\n <themeContext.Consumer>\n {({ bg }) =>\n console.log(bg) || (\n <userContext.Consumer>\n {({ user }) => (\n <ul style={{ backgroundColor: bg }}>\n <li>Full name: {user.name}</li>\n <li>age: {user.age}</li>\n <li>job: {user.job}</li>\n </ul>\n )}\n </userContext.Consumer>\n )\n }\n </themeContext.Consumer>\n );\n }", "title": "" }, { "docid": "005dacf8e7898ed6ad8d2c92c57649fd", "score": "0.48504022", "text": "function getRootContext$2(component){var rootContext=getRootView(component)[CONTEXT];ngDevMode&&assertDefined(rootContext,'rootContext');return rootContext;}", "title": "" }, { "docid": "b5d840755daa946a93782b087d6f1c81", "score": "0.4850353", "text": "function handleContext(which)\n{\n}", "title": "" }, { "docid": "af5fbb116afdf41344197676ddc292ec", "score": "0.4849244", "text": "function once (fn, context) {\n let result\n return function () {\n if (fn) {\n result = fn.apply(context || this, arguments)\n fn = null\n }\n return result\n }\n}", "title": "" }, { "docid": "a6ae69cca0b0d09ca321ffc49742f373", "score": "0.48484218", "text": "_before(uid) {\n const context = this._contexts.get(uid);\n if (context !== undefined) {\n this._enterContext(context);\n }\n }", "title": "" }, { "docid": "f0ba945b7f1f7f2e850d47f263342dcf", "score": "0.484354", "text": "function getRootContext(viewOrComponent) {\n var rootView = getRootView(viewOrComponent);\n ngDevMode && assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}", "title": "" }, { "docid": "7c685c0e0e19f85f616067694082953c", "score": "0.48385522", "text": "function makeDebugContext(gl) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n debug = _ref.debug;\n\n if (gl === null) {\n // Return to ensure we don't create a context in this case.\n return null;\n }\n\n return debug ? getDebugContext(gl) : getRealContext(gl);\n}", "title": "" }, { "docid": "bc3d26995ba19066201738c4091b21f7", "score": "0.48353377", "text": "function LContext() { }", "title": "" } ]
05c6351be38977d775783bc74f048e59
below two functions check type of media to ensure that pictures are not stored as music and viceversa. Checks carried out here to reduce database interactions
[ { "docid": "dc784a9c03582332ea8e244a1156d479", "score": "0.0", "text": "function checkVisual(name) {\n var check = name.split(\"\\.\")[1];\n if(check === 'jpg' || check === 'jpeg' || check === 'png') \n return true;\n else return false;\n\n}", "title": "" } ]
[ { "docid": "fa57c02865143de3bb09e505df284f75", "score": "0.65187323", "text": "function heroMediaCheck() {\n var checkMediaType = $.trim($(\".hero__media\").data(\"media-type\"));\n if (checkMediaType == \"video\") {\n $(\".hero__media__slider\").remove();\n $(\".hero__media__video\").show();\n $.getScript(\"/js/jquery.mb.ytplayer.min.js\", function() {\n heroVideo();\n });\n } else if (checkMediaType == \"image\") {\n $(\".hero__media__video\").remove();\n $(\".hero__media__slider\").show();\n heroImage();\n } else {\n $(\".hero__media__video\").remove();\n $(\".hero__media__slider\").show();\n heroImage();\n }\n }", "title": "" }, { "docid": "f585036afff290caa6bcea5bd4b300b5", "score": "0.59949", "text": "restoreMedia() {\n if (this.removedMedia) {\n //replace the media if it was removed then details were canceled.\n this.removedMedia.forEach((media) => {\n if (media.mimetype.indexOf('audio') > -1) { //check if mimetype is an audio type...\n this.currentNotebook.audio = media;\n } else {\n this.currentNotebook.image = media;\n }\n })\n }\n }", "title": "" }, { "docid": "427708d6317e017e1993ffca3c5a3f16", "score": "0.58509046", "text": "function showMedia(url,type){\n var media_target=$ID(\"METABOOKMEDIATARGET\");\n var media_elt=false, src_elt=false;\n function placeMedia(){\n if (media_elt) {\n // if mediaTarget doesn't have a parent node,\n // it's been replaced, so we don't do anything\n if (media_target.parentNode)\n fdjt.DOM.replace(media_target,media_elt);}\n else $ID(\"METABOOKMEDIA\").appendChild(media_target);\n addClass(document.body,\"mbMEDIA\");}\n if (metaBook.showing===url) {\n addClass(document.body,\"mbMEDIA\");\n return;}\n else if (type.search(\"image\")===0) {\n src_elt=media_elt=fdjtDOM(\"IMG\");}\n else if (type.search(\"audio\")===0) {\n src_elt=fdjtDOM(\"SOURCE\");\n media_elt=fdjtDOM(\"AUDIO\",src_elt);\n media_elt.setAttribute(\"CONTROLS\",\"CONTROLS\");\n media_elt.setAttribute(\"AUTOPLAY\",\"AUTOPLAY\");\n src_elt.type=type;}\n else if (type.search(\"video\")===0) {\n src_elt=fdjtDOM(\"SOURCE\");\n src_elt.type=type;\n media_elt=fdjtDOM(\"VIDEO\",src_elt);\n media_elt.setAttribute(\"CONTROLS\",\"CONTROLS\");\n media_elt.setAttribute(\"AUTOPLAY\",\"AUTOPLAY\");}\n else if (url.search(\"https://www.youtube.com/embed/\")===0) {\n url=\"https://www.youtube-nocookie.com/\"+\n url.slice(\"https://www.youtube.com/\".length);\n if (url.indexOf(\"?\")>0) \n url=url+\"&rel=0\";\n else url=url+\"?rel=0\";}\n else {\n src_elt=media_elt=fdjtDOM(\"IFRAME\");}\n media_elt.id=\"METABOOKMEDIATARGET\";\n metaBook.showing=url;\n if ((src_elt)&&(mB.glossdata[url])) {\n src_elt.src=mB.glossdata[url];\n placeMedia();}\n else if (src_elt) {\n addClass($ID(\"METABOOKMEDIA\"),\"loadingcontent\");\n addClass(src_elt,\"loadingcontent\");\n metaBook.getGlossData(url).then(function(val){\n dropClass($ID(\"METABOOKMEDIA\"),\"loadingcontent\");\n dropClass(src_elt,\"loadingcontent\");\n src_elt.src=val;\n placeMedia();})\n .catch(function(ex){\n fdjt.Log(\"Couldn't fetch glossdata from %s: %o\",url,ex);\n metaBook.showing=url;\n dropClass($ID(\"METABOOKMEDIA\"),\"loadingcontent\");\n dropClass(src_elt,\"loadingcontent\");});}\n else placeMedia();}", "title": "" }, { "docid": "b0d1da42107fcfaefdff60fb3c6aa2ba", "score": "0.57205486", "text": "async verifyMediaThumbnailFiles (mediaItem) {\n\t\tif (mediaItem == null) {\n\t\t\treturn (false);\n\t\t}\n\t\tif (this.configureMap.mediaThumbnailCount <= 0) {\n\t\t\treturn (true);\n\t\t}\n\t\tfor (let i = 0; i < this.configureMap.mediaThumbnailCount; ++i) {\n\t\t\tconst path = Path.join (this.configureMap.dataPath, mediaItem.params.id, App.StreamThumbnailPath, `${i}.jpg`);\n\t\t\tif (! await FsUtil.fileExists (path)) {\n\t\t\t\treturn (false);\n\t\t\t}\n\t\t}\n\t\treturn (true);\n\t}", "title": "" }, { "docid": "38fdaff605a4cc04b12b34765515e9ac", "score": "0.5709437", "text": "mediaViewContent(type) {\n // Avatars require a bit more overhead than embedded a video.\n if (type == \"3D\") {\n\n } else {\n\n }\n }", "title": "" }, { "docid": "38fdaff605a4cc04b12b34765515e9ac", "score": "0.5709437", "text": "mediaViewContent(type) {\n // Avatars require a bit more overhead than embedded a video.\n if (type == \"3D\") {\n\n } else {\n\n }\n }", "title": "" }, { "docid": "0f9f64a930a745b5c45c63f23433b9ab", "score": "0.56965345", "text": "function checkMediaDimensions( itcb ) {\n\n function onExpandMeta( err ) {\n if ( err ) { return itcb( null ); }\n report( 'i', 'New image dimensions: ' + mediaObj.widthPx + 'x' + mediaObj.heightPx + ' layers: ' + mediaObj.layers );\n mediaObj._isDirty = true;\n itcb( null );\n }\n\n if ( 'image' === mediaObj._category && -1 === mediaObj.widthPx && -1 === mediaObj.heightPx ) {\n report( '*', 'Image is missing dimensions, correcting... ' );\n Y.doccirrus.media.images.expandMeta( user, mediaObj, checkSingleCB( onExpandMeta, 'onExpandMeta' ) );\n return;\n }\n\n // dimensions are OK\n itcb( null );\n }", "title": "" }, { "docid": "35bae1e1077480f6f263596145175bf9", "score": "0.5633584", "text": "mime(input) {\n if (is.empty(input)) {\n return false;\n }\n const [mediaType] = input.split('/');\n let type = input;\n\n // Verify we're using HTML5 and there's no media type mismatch\n if (!this.isHTML5 || mediaType !== this.type) {\n return false;\n }\n\n // Add codec if required\n if (Object.keys(defaultCodecs).includes(type)) {\n type += `; codecs=\"${defaultCodecs[input]}\"`;\n }\n try {\n return Boolean(type && this.media.canPlayType(type).replace(/no/, ''));\n } catch (_) {\n return false;\n }\n }", "title": "" }, { "docid": "0770e86f560c9e61cb198e6e7e0f9420", "score": "0.5583576", "text": "static createMedia (media) {\r\n let mediaObj;\r\n if (media.video !== undefined) {\r\n // media is a video => use Video class\r\n mediaObj = new Video (media);\r\n } else {\r\n // media is a photo => use Photo class\r\n mediaObj = new Photo (media);\r\n }\r\n return mediaObj;\r\n }", "title": "" }, { "docid": "1354d007c3fcdb0d00b513e6171a9857", "score": "0.5574886", "text": "function checkForValidUrl(url) {\n var host = new Uri(url).heirpart().authority().host();\n return GLOBAL_config.MEDIA_PLATFORMS.indexOf(host) !== -1;\n }", "title": "" }, { "docid": "d72dd3caa7ecc1393b7ed6b441f467b2", "score": "0.5557438", "text": "function checkMusic() {\n if (!music || !music.initialized) {\n music = self.bot.getSubmodule('./music.js');\n }\n }", "title": "" }, { "docid": "158ea97e13f481c7f54c8fd8891acd21", "score": "0.5514241", "text": "function checkForValidUrl(url) {\n var host = new Uri(url).heirpart().authority().host();\n return GLOBAL_config.MEDIA_PLATFORMS.indexOf(host) !== -1;\n }", "title": "" }, { "docid": "55075a01888e422e25813d19d9f658bc", "score": "0.5473808", "text": "function WrongMediaTypeError(message) {\n this.name = 'WrongMediaTypeError';\n this.message = message || 'This media type is not allowed';\n this.stack = (new Error()).stack;\n}", "title": "" }, { "docid": "e2c72024b5ec70620c9d80c60d80a84f", "score": "0.54645413", "text": "function checkinMediaElement(mediaElem){\n\tmediaElem = mediaElem.get ? mediaElem.get(0) : mediaElem;\t\t// in case it's jQuery object, make it a DOM element\n\tvar idSave = mediaElem.id;\n\n\tvar checkedIn = f;\n\tvar mediaPoolDiv = triv$('#mediaPool', getDisplayDocument().body);\n\tif ( mediaPoolDiv[0] )\n\t{\n\t\ttriv$('source', mediaElem).remove();\n\t\ttriv$('track', mediaElem).remove();\n\t\ttriv$(mediaElem).removeAttr('id name src style controls hidden autoplay loop');\n\n\t\tif ( mediaElem.__listeners ) for ( var i = 0; i < mediaElem.__listeners.length; i++ )\n\t\t{\n\t\t\tvar listn = mediaElem.__listeners[i];\n\t\t\tmediaElem.removeEventListener(listn.type, listn.listener);\n\t\t}\n\t\tdelete mediaElem.__listeners;\n\n\t\ttriv$(mediaElem).appendTo(mediaPoolDiv);\n\t\tvar source = document.createElement('source');\n\t\tsource.src = 'media/blank.mp4';\n\n\t\tvar track = document.createElement('track');\n\t\ttriv$(track).attr('srclang', 'en');\n\t\ttriv$(track).attr('kind', 'subtitles');\n\n\t\ttriv$(source).appendTo(mediaElem);\n\t\ttriv$(track).appendTo(mediaElem);\n\t\tcheckedIn = t;\n\t}\n\n\t// Clean up... delete the attributes that ME player added\n\tvar tagName = mediaElem.tagName.toLowerCase();\n\tvar arAttrs = mediaElem.parentElement.__origAttribs && mediaElem.parentElement.__origAttribs[tagName];\n\tfor ( var x in mediaElem )\n\t{\n\t\tif ( triv$.inArray(x, arAttrs) == -1 )\n\t\t{\n\t\t\tdelete mediaElem[x];\n\t\t\tif ( window.console )\n\t\t\t\tconsole.log('cleaning up after ME, id: [' + idSave + '], deleted attrib: ' + x);\n\t\t}\n\t}\n\n\treturn checkedIn;\n}", "title": "" }, { "docid": "c410d06fdefd9da13965eb57197436e2", "score": "0.545333", "text": "function showMediaUploader(button) {\r\n if($(button).data('mime_type') == 'all') {\r\n var params = {\r\n title: 'Select or Upload Media',\r\n button: {\r\n text: 'Use this media'\r\n },\r\n multiple: false, // Set to true to allow multiple files to be selected\r\n };\r\n \r\n showUploader(button, params, 'media', 'fileUploadFrame');\r\n } else if($(button).data('mime_type') == 'audio') {\r\n var params = {\r\n title: 'Select or Upload Audio File',\r\n button: {\r\n text: 'Use this audio file'\r\n },\r\n multiple: false, // Set to true to allow multiple files to be selected\r\n library: { type: 'audio'}\r\n };\r\n \r\n showUploader(button, params, 'media', 'audioUploadFrame');\r\n } else if($(button).data('mime_type') == 'video') {\r\n var params = {\r\n title: 'Select or Upload Video File',\r\n button: {\r\n text: 'Use this video file'\r\n },\r\n multiple: false, // Set to true to allow multiple files to be selected\r\n library: { type: 'video'}\r\n };\r\n \r\n showUploader(button, params, 'media', 'videoUploadFrame');\r\n }\r\n }", "title": "" }, { "docid": "b8f869d919aafb1c84f84afdf26f4e78", "score": "0.5452881", "text": "function MediaFormat (){\n // http://www.youtube.com/embed/m5yCOSHeYn4\n var ytRegEx = /^(?:https?:\\/\\/)?(?:i\\.|www\\.|img\\.)?(?:youtu\\.be\\/|youtube\\.com\\/|ytimg\\.com\\/)(?:embed\\/|v\\/|vi\\/|vi_webp\\/|watch\\?v=|watch\\?.+&v=)((\\w|-){11})(?:\\S+)?$/;\n // https://player.vimeo.com/video/50489180\n var vmRegEx = /https?:\\/\\/(?:player\\.)(?:vimeo\\.com\\/video\\/)((\\w|-){8})/;\n // https://embed.spotify.com/?uri=spotify:track:78z8O6X1dESVSwUPAAPdme\n var spRegEx = /https?:\\/\\/(?:embed\\.)(?:spotify\\.com\\/)\\?uri=spotify:track:((\\w|-){22})/;\n // https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/29395900&amp;color=ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false\n var scRegEx = /https?:\\/\\/(?:w\\.)(?:soundcloud\\.com\\/player\\/)\\?url=https\\%3A\\/\\/api.soundcloud.com\\/tracks\\/((\\w|-){8})/;\n\n function getIDfromRegEx ( src, regExpy ){\n return (src.match(regExpy)) ? RegExp.$1 : null;\n }\n\n return {\n // returns only the ID\n getYoutubeID: function ( src ){\n return getIDfromRegEx( src, ytRegEx);\n },\n // returns main link\n getYoutubeUrl: function ( ID ){\n return \"https://www.youtube.com/watch?v=\" + ID;\n },\n // returns only the ID\n getVimeoID: function ( src ){\n return getIDfromRegEx( src, vmRegEx);\n },\n // returns main link\n getVimeoUrl: function ( ID ){\n return \"http://vimeo.com/\" + ID;\n },\n // returns only the ID\n getSpotifyID: function ( src ){\n return getIDfromRegEx( src, spRegEx);\n },\n // returns main link\n getSpotifyUrl: function ( ID ){\n return \"http://open.spotify.com/track/\" + ID;\n },\n // returns only the ID\n getSoundcloudID: function ( src ){\n return getIDfromRegEx( src, scRegEx);\n },\n // returns main link\n // NOTE: this one really sucks since soundcloud doesnt have good API without js library\n getSoundcloudUrl: function ( ID ){\n return \"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/\" + ID; //only way to link to the track currently\n }\n };\n}", "title": "" }, { "docid": "c368d4323f58ce61ce25b1da8f296a4d", "score": "0.5419006", "text": "function get_media(media_type,list_type){\n\tif(media_type == undefined){\n\t\tmedia_type = \"videos\";\n\t}\n\n\tif(list_type == undefined){\n\t\tlist_type = \"Active\";\n\t}\n\n\tif(media_type == \"audio_clips\"){\n\t\tmedia_type = \"allaudio\";\n\t}\n\t\n\tif(media_type == \"videos\"){\n\t\tmedia_type = \"allvideos\";\n\t}\n\n\tskill_id = $(\"#edit_talent_form #id\").val();\n\t$.post(media_controller,{\"action\":\"get_skill_media\",\"skill_id\":skill_id,\"status\":list_type,\"media_type\":media_type},\n\t\tfunction(data){\n\t\t\tif(data.status == \"success\"){\n\t\t\t\tif(list_type == \"Active\"){\n\t\t\t\t\tnum_active = data.num;\n\t\t\t\t\tswitch(media_type){\n\t\t\t\t\t\tcase \"videos\":\n\t\t\t\t\t\t\t$(\"#video_expand .list_box_left_0 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"allvideos\":\n\t\t\t\t\t\t\t$(\"#video_expand .list_box_left_0 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"audio\":\n\t\t\t\t\t\t\t$(\"#audio_expand .list_box_left_2 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"allaudio\":\n\t\t\t\t\t\t\t$(\"#audio_expand .list_box_left_2 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"documents\":\n\t\t\t\t\t\t\t$(\"#document_expand .list_box_left_3 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tnum_archive = data.num;\n\t\t\t\t\tswitch(media_type){\n\t\t\t\t\t\tcase \"videos\":\n\t\t\t\t\t\t\t$(\"#video_expand .list_box_right_0 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"allvideos\":\n\t\t\t\t\t\t\t$(\"#video_expand .list_box_right_0 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"audio\":\n\t\t\t\t\t\t\t$(\"#audio_expand .list_box_right_2 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"allaudio\":\n\t\t\t\t\t\t\t$(\"#audio_expand .list_box_right_2 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"documents\":\n\t\t\t\t\t\t\t$(\"#document_expand .list_box_right_3 ul\").html(data.content);\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tswitch(media_type){\n\t\t\t\t\tcase \"videos\":\n\t\t\t\t\t\tcreate_media_sortable('videos');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"allvideos\":\n\t\t\t\t\t\tcreate_media_sortable('videos');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"audio\":\n\t\t\t\t\t\tcreate_media_sortable('audio_clips');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"allaudio\":\n\t\t\t\t\t\tcreate_media_sortable('audio_clips');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"documents\":\n\t\t\t\t\t\tcreate_media_sortable('documents');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\topen_media_div(media_type);\n\t\t\t\t\trecalc(media_type);\n\t\t\t\t\tclose_media_div(media_type);\n\t\t\t}\n\t\t},\"json\"\n\t);\n}", "title": "" }, { "docid": "ffbc01d8e5cbe1ce0721b11b30873a21", "score": "0.54125494", "text": "function checkNewContent(content) {\n let imageUrl = getImage(content);\n let videoUrl = getVideo(content);\n\n if (imageUrl) {\n $('#new .img-wrapper .img-input')\n .attr('src', imageUrl[0])\n .attr('value', imageUrl[0])\n .on('load', function(e) {\n $('#new .img-wrapper').show();\n $('#new-type').val('IMG');\n $('#new-media').val(imageUrl[0]);\n }).on('error', function() {\n hideNewImage();\n });\n } else if (videoUrl) {\n let img = new Image();\n img.src = 'http://img.youtube.com/vi/' + videoUrl[2] + '/mqdefault.jpg';\n img.onload = function() {\n if (img.width === 320) {\n $('#new .img-wrapper .img-input')\n .attr('src', img.src)\n .attr('value', videoUrl[0])\n .on('load', function() {\n $('#new .img-wrapper').show();\n $('#new-type').val('VIDEO');\n $('#new-media').val(videoUrl[0]);\n });\n } else {\n hideNewImage();\n }\n }\n } else {\n $('#new-type').val('TEXT');\n $('#new-media').val('');\n hideNewImage();\n }\n}", "title": "" }, { "docid": "e539365f0c8de99f23ecf3f42f6b88c5", "score": "0.53897065", "text": "function checkMusicNote(ctx){\n \n if(musicNote==true)\n loadImage(ctx,notesOne,450/3-20, 30); \n\n else\n loadImage(ctx,notesTwo,450/3-20, 30); \n\n musicCount++;\n\n if(musicCount%15==0){\n\n switchMusicNotes = true;\n if(musicNote==true)\n musicNote=false;\n\n else\n musicNote=true;\n }\n\n if(musicCount>60){\n musicOn=false;\n\n musicCount=0;\n }\n \n\n}", "title": "" }, { "docid": "1b40c316bd5c53f162983690851dbc3b", "score": "0.5382091", "text": "function sanitizeMedia(media) {\n let i = media.length;\n while (i--) {\n media[i].id = media[i].compound_ref.split('/').pop();\n }\n return media.sort((a, b) => {\n if (a.id < b.id) return -1;\n if (a.id > b.id) return 1;\n return 0;\n });\n }", "title": "" }, { "docid": "383307e5c5334ed4c76c5ffaa1c12640", "score": "0.53811544", "text": "function customMusicHandler(file)\n\t{\n\t\t// make sure it's a useable type of audio, it doesn't like wma for some reason\n\t\tif(file.type.substr(0, 5) == \"audio\" && file.type != \"audio/x-ms-wma\")\n\t\t{\n\t\t\t// change innerHTML to say what it's playing\n\t\t\tdrag.innerHTML = \"Now playing... \" + file.name;\n\t\t\taudio.src = window.URL.createObjectURL(file);\t\t\t// https://stackoverflow.com/questions/28619550/javascript-play-uploaded-audio\n\t\t\tplayMusic();\n\t\t}\n\t\t\n\t\t// otherwise say it's not supported\n\t\telse\n\t\t\tdrag.innerHTML = \"Not an accepted audio file!\";\n\t}", "title": "" }, { "docid": "c61e97e5727ea373a436e4f29e279246", "score": "0.53795314", "text": "function _supportMime(plyr, mimeType) {\n var media = plyr.media;\n\n if (plyr.type === 'video') {\n // Check type\n switch (mimeType) {\n case 'video/webm':\n return !!(media.canPlayType && media.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(/no/, ''));\n case 'video/mp4':\n return !!(media.canPlayType && media.canPlayType('video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"').replace(/no/, ''));\n case 'video/ogg':\n return !!(media.canPlayType && media.canPlayType('video/ogg; codecs=\"theora\"').replace(/no/, ''));\n }\n } else if (plyr.type === 'audio') {\n // Check type\n switch (mimeType) {\n case 'audio/mpeg':\n return !!(media.canPlayType && media.canPlayType('audio/mpeg;').replace(/no/, ''));\n case 'audio/ogg':\n return !!(media.canPlayType && media.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/no/, ''));\n case 'audio/wav':\n return !!(media.canPlayType && media.canPlayType('audio/wav; codecs=\"1\"').replace(/no/, ''));\n }\n }\n\n // If we got this far, we're stuffed\n return false;\n }", "title": "" }, { "docid": "7d70247d8079249e43439f15a2da1084", "score": "0.5358939", "text": "function ensureAudible(media)\n{\n media.muted = false;\n media.volume = 1.0;\n}", "title": "" }, { "docid": "99007258e50cd6823f4d31d832f739e4", "score": "0.53488374", "text": "create() {\r\n var _a;\r\n this.media = this.mediaService.getMedia(this.container, this.format, this.alt);\r\n if (!((_a = this.media) === null || _a === void 0 ? void 0 : _a.src)) {\r\n this.handleMissing();\r\n }\r\n }", "title": "" }, { "docid": "51aa2ca93b2f75ba8eb30da970dbccd9", "score": "0.53261703", "text": "function checkType(source) {\n valueAdded = 0;\n if (source.endsWith(\"source.gif\")) {\n valueAdded = 10; //normal bird\n }\n else if (source.endsWith(\"giphy.gif\")) {\n valueAdded = 5; //red bird\n }\n else if (source.endsWith(\"bird.gif\")) {\n valueAdded = -10; //black bird\n }\n changeScore(valueAdded); //go to changescore \n}", "title": "" }, { "docid": "9bfd9a199979d7c5b97414590a7630a4", "score": "0.53141123", "text": "function CheckFileType(fileType) {\n if (fileType == \"image/jpeg\") {\n return true;\n }\n else if (fileType == \"image/png\") {\n return true;\n }\n else if (fileType == \"image/gif\") {\n return true;\n }\n else {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "9ebc2d4ec372f350c8410567c386285e", "score": "0.5309881", "text": "function MediaContext () {\n this.element = void 0;\n this.elIdx = 0;\n\n /**\n * parses the URL String and returns an object containing useful path items\n */\n this.getUri = function ( href ){\n var l = document.createElement(\"a\");\n l.href = href;\n return l;\n };\n\n /**\n * get media file extension\n */\n this.fileType = function ( src ){\n var ytRE = new RegExp(\"ytimg\");\n // var t = /.+\\.([^?]+)(\\?|$)/; //old\n var t = /.+\\.([^?]+)/;\n // check if is youtube thumb, if so, return video type\n if(ytRE.test(src)){\n return \"youtube\";\n }\n return src.match(t)[1];\n };\n\n /**\n * Pass in a dom element, get media type\n */\n this.getType = function ( elem ) {\n var _self = this;\n var _type = \"\", finalType, _file, _src;\n var providers = [\"youtube\",\"vimeo\",\"spotify\",\"soundcloud\"];\n var typeMap = {\n quote: \"link\",\n img: \"image\",\n jpg: \"image\",\n jpeg: \"image\",\n png: \"image\", \n gif: \"image\",\n webp: \"image\",\n youtube: \"video\",\n vimeo: \"video\",\n spotify: \"audio\",\n soundcloud: \"audio\"\n };\n\n elem = elem || this.element;\n _type = elem.nodeName;\n _src = elem.src;\n\n if(_type === \"IMG\"){\n _file = (elem.src) ? _self.fileType(elem.src) : \"img\";\n finalType = (_file !== \"img\") ? typeMap[_file] + \"/\" + _file : typeMap[_type];\n } else {\n var found;\n \n for (var i = providers.length - 1; i >= 0; i--) {\n var prI = providers[i];\n var pR = new RegExp( prI );\n \n found = pR.test( elem.src );\n \n if(found){\n _file = _src.match( pR )[0];\n break;\n }\n }\n \n finalType = (_file) ? typeMap[_file] + \"/\" + _file : typeMap[_type];\n }\n\n return (finalType) ? finalType.toLowerCase() : null;\n };\n\n /**\n * get the src and url correctly for media types other than image\n */\n this.getMediaSrcUrl = function ( data, type ){\n // setup correct src and url structure based on type\n // - video sources will be video ID\n var specialType = (type) ? type.split(\"/\")[1] : type;\n var src, url;\n\n // setup formatting for each type\n switch (specialType){\n case \"youtube\":\n src = MediaFormat().getYoutubeID( data.src );\n url = MediaFormat().getYoutubeUrl( src );\n break;\n case \"vimeo\":\n src = MediaFormat().getVimeoID( data.src );\n url = MediaFormat().getVimeoUrl( src );\n break;\n case \"spotify\":\n src = MediaFormat().getSpotifyID( data.src );\n url = MediaFormat().getSpotifyUrl( src );\n break;\n case \"soundcloud\":\n src = MediaFormat().getSoundcloudID( data.src );\n url = MediaFormat().getSoundcloudUrl( src );\n break;\n }\n\n return {\n src: src,\n url: url\n };\n };\n}", "title": "" }, { "docid": "1968cfafcde077ad1fac0e606496ed86", "score": "0.5296153", "text": "if (m_penMainMusicHolder==NULL) {\n // no fuss\n return FALSE;\n }", "title": "" }, { "docid": "5fefbe5f4d63c03f366f3bf55061c5dd", "score": "0.52880776", "text": "addMedia(type) {\n this.showMedia = type;\n }", "title": "" }, { "docid": "c655b4a87953275b4a323489c694e281", "score": "0.5283309", "text": "validateFileURLInfo(url) {\n return new Promise((res, rej) => {\n return request.head(url, (err, resp, body) => {\n if (err) {\n return rej(\"Bad URL\");\n } else {\n const contentType = resp.headers['content-type'];\n const contentLength = resp.headers['content-length'];\n\n let validContentType = contentType.startsWith('audio/');\n let validContentLength = contentLength <= maxFileSize;\n\n if (validContentType && validContentLength) {\n return res();\n } else {\n if (!validContentType) {\n return rej(\"Invalid file type\");\n } else if (!validContentLength) {\n const sizeLimMB = (maxFileSize / 1024) / 1024;\n return rej(\"File size too big (\" + sizeLimMB + \" MB limit).\");\n }\n }\n }\n });\n });\n }", "title": "" }, { "docid": "044e1ac2399915411b8dbd17f164412d", "score": "0.5252539", "text": "function toggleMedia(){\n\t\tvar defined;\n\t\tfor( var i = 0; i < sheets.length; i++ ){\n\t\t\tif( sheets[ i ].href && sheets[ i ].href.indexOf( href ) > -1 ){\n\t\t\t\tdefined = true;\n\t\t\t}\n\t\t}\n\t\tif( defined ){\n\t\t\tss.media = media || \"all\";\n\t\t}\n\t\telse {\n\t\t\tsetTimeout( toggleMedia );\n\t\t}\n\t}", "title": "" }, { "docid": "0e39d52bf4d76b83f9ce6e400e9061d1", "score": "0.5243597", "text": "function handleMultimedia(vService) {\n setShowVideo(false);\n setShowImage(false);\n if (vService.videos.length > 0 || vService.images.length > 0) {\n if (vService.images.length > 0) {\n setShowImage(true);\n setImages(vService.images);\n }\n if (vService.videos.length > 0) {\n setShowVideo(true);\n setVideos(vService.videos);\n setActualVideo(vService.videos[parseInt(actualIndexVideo)]);\n }\n } else {\n setShowImage(false);\n setShowVideo(false);\n if (!vService.permissionsImage && vService.existsImage === true) {\n NotificationManager.error(t(\"routes.imageErrorMessage\"), t(\"routes.imageErrorTitle\"), 3000);\n }\n if (!vService.permissionsVideo && vService.existsVideo === true) {\n NotificationManager.error(t(\"routes.videoErrorMessage\"), t(\"routes.videoErrorTitle\"), 3000);\n }\n }\n }", "title": "" }, { "docid": "53d7f0404519996873748fbe37ab2ead", "score": "0.5241692", "text": "function getMediaTypeForNetworkAudio() {\n if (!getMediaTypeForNetworkAudio.cached) {\n getMediaTypeForNetworkAudio.cached = getBrowserSupportedTypeFromList(['ogg', 'mp3']); // TODO ogg should be preferred, correct?\n }\n return getMediaTypeForNetworkAudio.cached;\n }", "title": "" }, { "docid": "1a30d3aaa1975aae110e91a07f0ee038", "score": "0.52380955", "text": "function sanitizeMedia(media) {\n var i = media.length;\n while (i--) {\n media[i].id = media[i].compound_ref.split('/').pop();\n }\n return media.sort(function(a, b) {\n if (a.id < b.id) return -1;\n if (a.id > b.id) return 1;\n return 0;\n })\n }", "title": "" }, { "docid": "aa7ddbe0e9fb8bea311782bfb3e4a970", "score": "0.5237304", "text": "function testUrlForMedia(pastedData) {\r\n var success = false;\r\n var media = {};\r\n if (pastedData.match('http://(www.)?youtube|youtu\\.be')) {\r\n if (pastedData.match('embed')) {\r\n youtube_id = pastedData.split(/embed\\//)[1].split('\"')[0];\r\n } else {\r\n youtube_id = pastedData.split(/v\\/|v=|youtu\\.be\\//)[1].split(/[?&]/)[0];\r\n }\r\n media.type = \"youtube\";\r\n media.id = youtube_id;\r\n success = true;\r\n }\r\n\r\n if (success) {\r\n return media;\r\n } else {\r\n alert(\"No valid media id detected.\\nBe sure to use the \\\"Share\\\" url, located in the menu under the video on the youtube page.\");\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "78ca67e32a304280c38bcf1ebd88fd40", "score": "0.52312917", "text": "function checkLegacyFormat( itcb ) {\n // if already migrated then we can skip this step\n if ( !mediaObj.source || '' === mediaObj.source ) { return itcb( null ); }\n \n function onMigratedSingle( err, addReport ) {\n if ( err ) {\n report( '!', 'Could not migrate item from media colection: ' + JSON.stringify( err ) );\n return itcb( err );\n }\n strReport = strReport + addReport;\n itcb( null );\n }\n \n report( 'i', 'Media is in legacy format, migrating...' );\n migrateSingleMediaObject( user, mediaObj, mediaModel, inMigration, checkSingleCB( onMigratedSingle, 'onMigratedSingle' ) );\n }", "title": "" }, { "docid": "fab1f3ed2d7936d8e096ff35230427a6", "score": "0.5210536", "text": "function checkIfReadyForUpload() {\n if (!nameField.value) return \"Albumtitel\";\n if (!artistField.value) return \"Albumkünstler\";\n if (!priceField.value) return \"Preis\";\n if (!durationField.value) return \"Album Länge\";\n if (!tracksField.value) return \"Anzahl der Titel\";\n if (!cdsField.value) return \"Anzahl der CDs\";\n if (!artworkFile) return \"Albumcover\";\n if (!trackArray[0]) return \"Audio Datei(en)\";\n return;\n}", "title": "" }, { "docid": "2a0dcc978ab417e4c61f32817b5615c8", "score": "0.51995665", "text": "function toggleMedia() {\n var defined;\n for (var i = 0; i < sheets.length; i++) {\n if (sheets[i].href && sheets[i].href.indexOf(href) > -1) {\n defined = true;\n }\n }\n if (defined) {\n ss.media = \"all\";\n callback();\n } else {\n setTimeout(toggleMedia);\n }\n }", "title": "" }, { "docid": "3e45616e0e1807abbf3a104a64ea422d", "score": "0.5185323", "text": "function MongoMediaProvider() {\n\t}", "title": "" }, { "docid": "1855e13c50d1bf34d8815581ae0ae904", "score": "0.5180665", "text": "modelCanExist () {\n\t\t// matching file-type streams and direct streams are permitted, but not channel streams\n\t\t// (also object streams)\n\t\treturn this.attributes.type !== 'channel';\n\t}", "title": "" }, { "docid": "3104c1c61d29a5b445b1d1c454950137", "score": "0.51618457", "text": "function getInputMedia(media, { isPhoto = false, attributes = undefined, forceDocument = false, voiceNote = false, videoNote = false, supportsStreaming = false, } = {}) {\n if (media.SUBCLASS_OF_ID === undefined) {\n _raiseCastFail(media, \"InputMedia\");\n }\n if (media.SUBCLASS_OF_ID === 0xfaf846f4) {\n // crc32(b'InputMedia')\n return media;\n }\n else {\n if (media.SUBCLASS_OF_ID === 2221106144) {\n // crc32(b'InputPhoto')\n return new tl_1.Api.InputMediaPhoto({ id: media });\n }\n else {\n if (media.SUBCLASS_OF_ID === 4081048424) {\n // crc32(b'InputDocument')\n return new tl_1.Api.InputMediaDocument({ id: media });\n }\n }\n }\n if (media instanceof tl_1.Api.MessageMediaPhoto) {\n return new tl_1.Api.InputMediaPhoto({\n id: getInputPhoto(media.photo),\n ttlSeconds: media.ttlSeconds,\n });\n }\n if (media instanceof tl_1.Api.Photo ||\n media instanceof tl_1.Api.photos.Photo ||\n media instanceof tl_1.Api.PhotoEmpty) {\n return new tl_1.Api.InputMediaPhoto({ id: getInputPhoto(media) });\n }\n if (media instanceof tl_1.Api.MessageMediaDocument) {\n return new tl_1.Api.InputMediaDocument({\n id: getInputDocument(media.document),\n ttlSeconds: media.ttlSeconds,\n });\n }\n if (media instanceof tl_1.Api.Document || media instanceof tl_1.Api.DocumentEmpty) {\n return new tl_1.Api.InputMediaDocument({ id: getInputDocument(media) });\n }\n if (media instanceof tl_1.Api.InputFile || media instanceof tl_1.Api.InputFileBig) {\n if (isPhoto) {\n return new tl_1.Api.InputMediaUploadedPhoto({ file: media });\n }\n else {\n const { attrs, mimeType } = getAttributes(media, {\n attributes: attributes,\n forceDocument: forceDocument,\n voiceNote: voiceNote,\n videoNote: videoNote,\n supportsStreaming: supportsStreaming,\n });\n return new tl_1.Api.InputMediaUploadedDocument({\n file: media,\n mimeType: mimeType,\n attributes: attrs,\n forceFile: forceDocument,\n });\n }\n }\n if (media instanceof tl_1.Api.MessageMediaGame) {\n return new tl_1.Api.InputMediaGame({\n id: new tl_1.Api.InputGameID({\n id: media.game.id,\n accessHash: media.game.accessHash,\n }),\n });\n }\n if (media instanceof tl_1.Api.MessageMediaContact) {\n return new tl_1.Api.InputMediaContact({\n phoneNumber: media.phoneNumber,\n firstName: media.firstName,\n lastName: media.lastName,\n vcard: \"\",\n });\n }\n if (media instanceof tl_1.Api.MessageMediaGeo) {\n return new tl_1.Api.InputMediaGeoPoint({ geoPoint: getInputGeo(media.geo) });\n }\n if (media instanceof tl_1.Api.MessageMediaVenue) {\n return new tl_1.Api.InputMediaVenue({\n geoPoint: getInputGeo(media.geo),\n title: media.title,\n address: media.address,\n provider: media.provider,\n venueId: media.venueId,\n venueType: \"\",\n });\n }\n if (media instanceof tl_1.Api.MessageMediaDice) {\n return new tl_1.Api.InputMediaDice({\n emoticon: media.emoticon,\n });\n }\n if (media instanceof tl_1.Api.MessageMediaEmpty ||\n media instanceof tl_1.Api.MessageMediaUnsupported ||\n media instanceof tl_1.Api.ChatPhotoEmpty ||\n media instanceof tl_1.Api.UserProfilePhotoEmpty ||\n media instanceof tl_1.Api.ChatPhoto ||\n media instanceof tl_1.Api.UserProfilePhoto) {\n return new tl_1.Api.InputMediaEmpty();\n }\n if (media instanceof tl_1.Api.Message) {\n return getInputMedia(media.media, { isPhoto: isPhoto });\n }\n if (media instanceof tl_1.Api.MessageMediaPoll) {\n let correctAnswers;\n if (media.poll.quiz) {\n if (!media.results.results) {\n throw new Error(\"Cannot cast unanswered quiz to any kind of InputMedia.\");\n }\n correctAnswers = [];\n for (const r of media.results.results) {\n if (r.correct) {\n correctAnswers.push(r.option);\n }\n }\n }\n else {\n correctAnswers = undefined;\n }\n return new tl_1.Api.InputMediaPoll({\n poll: media.poll,\n correctAnswers: correctAnswers,\n solution: media.results.solution,\n solutionEntities: media.results.solutionEntities,\n });\n }\n if (media instanceof tl_1.Api.Poll) {\n return new tl_1.Api.InputMediaPoll({\n poll: media,\n });\n }\n _raiseCastFail(media, \"InputMedia\");\n}", "title": "" }, { "docid": "973516bdccbb429500ec2ebe18dc480d", "score": "0.51468086", "text": "constructMediaForCustomFields(){\n this.filesToBeIgnored = [];\n for(let k in this.mediaSelectedFiles){\n // if media file is custom field\n if(this.customFieldValues[k] !== undefined) {\n this.customFieldValues[k] = [];\n for(let mediaKey in this.mediaSelectedFiles[k]){\n if(this.customFieldValues[k].indexOf(this.mediaSelectedFiles[k][mediaKey].mediaID) == -1) {\n this.customFieldValues[k].push(this.mediaSelectedFiles[k][mediaKey].mediaID);\n this.filesToBeIgnored.push(k);\n }\n }\n }else{\n let keysArray = k.split(\"___\");\n /* if non translatable sub fields */\n if(keysArray.length == 3) {\n // check if keys structure is ok\n if(this.customFieldValues[keysArray[0]] !== undefined\n && this.customFieldValues[keysArray[0]][keysArray[1]] !== undefined\n && this.customFieldValues[keysArray[0]][keysArray[1]][keysArray[2]] !== undefined\n ) {\n // insert media IDs in sub custom field values\n this.customFieldValues[keysArray[0]][keysArray[1]][keysArray[2]] = [];\n for(let mediaKey in this.mediaSelectedFiles[k]){\n if(this.customFieldOriginalStructure[keysArray[0]].subFields[keysArray[2]].isMultiple) {\n this.customFieldValues[keysArray[0]][keysArray[1]][keysArray[2]].push(this.mediaSelectedFiles[k][mediaKey].mediaID);\n }else{\n this.customFieldValues[keysArray[0]][keysArray[1]][keysArray[2]] = this.mediaSelectedFiles[k][mediaKey].mediaID;\n }\n }\n this.filesToBeIgnored.push(k);\n }\n // if translatable sub fields\n }else if(keysArray.length == 5) {\n // check if keys structure is ok\n if(this.customFieldValues[keysArray[0]] !== undefined\n && this.customFieldValues[keysArray[0]][keysArray[4]] !== undefined\n && this.customFieldValues[keysArray[0]][keysArray[4]][keysArray[1]] !== undefined\n && this.customFieldValues[keysArray[0]][keysArray[4]][keysArray[1]][keysArray[2]] !== undefined\n ) {\n // insert media IDs in sub custom field values\n this.customFieldValues[keysArray[0]][keysArray[4]][keysArray[1]][keysArray[2]] = [];\n for(let mediaKey in this.mediaSelectedFiles[k]){\n if(this.customFieldOriginalStructure[keysArray[0]].subFields[keysArray[2]].isMultiple) {\n this.customFieldValues[keysArray[0]][keysArray[4]][keysArray[1]][keysArray[2]].push(this.mediaSelectedFiles[k][mediaKey].mediaID);\n }else{\n this.customFieldValues[keysArray[0]][keysArray[4]][keysArray[1]][keysArray[2]] = this.mediaSelectedFiles[k][mediaKey].mediaID;\n }\n }\n this.filesToBeIgnored.push(k);\n }\n }else{\n /* FOR TRANSLATABLE MEDIA CUSTOM FIELDS */\n let keysArray = k.split(\"__lang__\");\n if(keysArray.length == 2) {\n if(this.customFieldValues[keysArray[0]] !== undefined\n && this.customFieldValues[keysArray[0]][keysArray[1]] !== undefined\n ) {\n this.customFieldValues[keysArray[0]][keysArray[1]] = [];\n for(let mediaKey in this.mediaSelectedFiles[k]){\n if(this.customFieldOriginalStructure[keysArray[0]].isMultiple) {\n this.customFieldValues[keysArray[0]][keysArray[1]].push(this.mediaSelectedFiles[k][mediaKey].mediaID);\n }else{\n this.customFieldValues[keysArray[0]][keysArray[1]] = this.mediaSelectedFiles[k][mediaKey].mediaID;\n }\n }\n this.filesToBeIgnored.push(k);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d50179331c362dd919defeb59698fc94", "score": "0.5143845", "text": "function mediaView(view, raw){\n\n//\tconsole.log([view, view.getParent(), raw]);\n\n\tview.getParent().id = raw;\n\t\n\tvar parts \t = raw.split(\"@@\");\n\t\tvar type = parts[0];\n\t\tvar url\t = parts[1];\n\n//\tconsole.log([type, url]);\n\n\tif(type == \"folder\"){\n\t\tvar img = {'src':'ressource/img/media-folder.png', \t\t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"pdf\"){\n\t\tvar img = {'src':'ressource/img/media-file_pdf.png', \t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"flash\"){\n\t\tvar img = {'src':'ressource/img/media-file_flash.png', \t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"audio\"){\n\t\tvar img = {'src':'ressource/img/media-file_audio.png', \t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"image\"){\n\t\tvar img = (view.getParent().hasClass('notFound'))\n\t\t\t? {'src':'ressource/img/media-file_file.png', \t\t'height':128, 'width':128, 'myclass':''}\n\t\t\t: {'src':url, \t\t\t\t\t\t\t\t\t\t'height':'', 'width':'', 'myClass':'shd'};\n\t}else{\n\t\tvar img = {'src':'ressource/img/media-file_file.png', \t'height':128, 'width':128, 'myclass':''};\n\t}\n\n\tif(img.myClass != '') view.addClass(img.myClass);\n\n\timage = new Image(); \n\timage.onload = function(){\n\n\t\tvar ratio\t= 1;\n\t\tvar raw \t= {\n\t\t\tsrc\t\t: this.src,\n\t\t\theight\t: this.height,\n\t\t\twidth\t: this.width,\n\t\t};\n\n\t\t// Portrait\n\t\tif(raw.height >= raw.width){\n\t\t\tif(raw.height >= 140){\n\t\t\t\timg.height\t= 140;\n\t\t\t\tvar ratio \t= (img.height / raw.height);\n\t\t\t}else{\n\t\t\t\timg.height\t= raw.height;\n\t\t\t}\n\n\t\t\timg.width\t= Math.round(raw.width * ratio);\n\n\t\t// Paysage\n\t\t}else{\n\n\t\t\tif(raw.width >= 140){\n\t\t\t\timg.width\t= 140;\n\t\t\t\tvar ratio\t= (img.width / raw.width);\n\t\t\t}else{\n\t\t\t\timg.width\t= raw.width;\n\t\t\t}\n\n\t\t\timg.height\t= Math.round(raw.height * ratio);\n\t\t}\n\n\t\timageView = new Element('img', {\n\t\t\t'src' \t\t: this.src,\n\t\t\t'height'\t: img.height,\n\t\t\t'width'\t\t: img.width,\n\t\t\t'styles'\t: {\n\t\t\t\t'margin-top' : Math.round((150 - img.height) / 2)+'px',\n\t\t\t\t'margin-left': Math.round((150 - img.width) / 2)+'px'\n\t\t\t}\n\t\t}).inject(view.empty());\n\t}\n\n\tif(img.myClass == 'shd'){\n\t\timage.src = '/h:140'+img.src+'?&ttloff=45+minutes';\n\t}else{\n\t\timage.src = img.src;\n\t}\n}", "title": "" }, { "docid": "92a8fae30bb9cb7f95e939219ccc50cb", "score": "0.5140979", "text": "function try_can_play(element, type) {\n var can_play = false;\n try {\n can_play = element.canPlayType(type);\n } catch(err) { //assume browser that chokes--IE--can handle mp4\n\t if (type.indexOf(\"mp4\") != -1) {\n\t\tcan_play = true;\n\t }\n\t}\n return !!can_play;\n }", "title": "" }, { "docid": "bbf0eb58d07bfe7cbad267f83fbc5ea9", "score": "0.51393336", "text": "function checkMediaReady() {\n if (isNaN(media.duration)) {\n return false\n }\n\n // Wait for videos to appear in the DOM\n if (media instanceof HTMLVideoElement && !media.parentElement) {\n return false\n }\n\n if (media.readyState >= MediaReadyState.HAVE_CURRENT_DATA) {\n setActiveMedia(media)\n media.removeEventListener('playing', checkMediaReady)\n media.removeEventListener('durationchange', checkMediaReady)\n media.removeEventListener('canplay', checkMediaReady)\n return true\n }\n\n return false\n }", "title": "" }, { "docid": "8b2d79704a90104c1fa21118ad1d3006", "score": "0.513735", "text": "function validSoundcloud(url) { \n\n var soundcloud = url.match(/https?:\\/\\/(m\\.)?(soundcloud.com|snd.sc)\\/(.*)$/);\n \n if(soundcloud) { //If either of the RegEx's return true, we have a valid url.\n\n return true;\n \n } else {\n \n return false;\n \n }\n\n}", "title": "" }, { "docid": "46a74bb1b204f8956d5520ad18c48a34", "score": "0.5109372", "text": "async isQualitySound() {\n const blobArrayBuffer = await this.blob.arrayBuffer();\n this.audioBuffer = await this.context.decodeAudioData(blobArrayBuffer);\n\n const qualityResult = {\n success: true,\n errorMessage: '',\n };\n\n const audioResult = this.silenceCheck();\n\n if (this.audioBuffer.duration < 2.0) {\n qualityResult.success = false;\n qualityResult.errorMessage = 'Recording is too short. Try again!';\n } else if (audioResult) {\n qualityResult.success = false;\n qualityResult.errorMessage = audioResult;\n }\n\n return qualityResult;\n }", "title": "" }, { "docid": "6b9bd369b42f7e95d620c2be3e714969", "score": "0.5094949", "text": "function stopMediaInLessonViewer() {\n var current_slide_id = $('._lesson_viewer_current_slide').attr('id');\n stopMedia('#' + current_slide_id + ' audio');\n stopMedia('#' + current_slide_id + ' video');\n var media_audio = $('#' + current_slide_id + ' audio');\n var media_video = $('#' + current_slide_id + ' video');\n if(media_audio.length > 0) {\n setCurrentTimeToMedia(media_audio, 0);\n } else if(media_video.length > 0){\n setCurrentTimeToMedia(media_video, 0);\n }\n}", "title": "" }, { "docid": "89bb9f6a5ba3cdacac153d57db8eee57", "score": "0.50580776", "text": "checkMusic() {\n if (this.currentMusic != this.currentRoom.music) {\n \n this.music ? this.music.fadeOut(): null;\n this.currentMusic = this.currentRoom.music;\n\n if (this.currentMusic != null) {\n \n if (__DEBUG__) console.log('playing music: '+this.currentMusic);\n this.music = this.game.sound.add(this.currentMusic, 1, true);\n this.music.onDecoded.add(function() {\n //this.music.play(); \n this.music.fadeIn(); \n }, this);\n \n }\n } \n }", "title": "" }, { "docid": "bde6aff4fac3da369e4807f51295a461", "score": "0.5057683", "text": "function isItemMutedOrDeleted($item) {\n return $item.is(S_postIsMutedOrDeleted);\n}", "title": "" }, { "docid": "c8b45f48855eecfe9402b690c951ec14", "score": "0.50497437", "text": "removeMedia(media, selectedTile, otherTile) {\n if (media.createdAt) { //this tells us the media has been saved to the db before\n this.removedMedia.push(media);\n }\n }", "title": "" }, { "docid": "98552446aac6dfb03195da7caf27f5b4", "score": "0.5049496", "text": "function beforeUpload(file) {\n const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';\n if (!isJpgOrPng) {\n message.error('You can only upload JPG/PNG file!');\n }\n\n return isJpgOrPng;\n }", "title": "" }, { "docid": "35d8ce815b3de1b730b20269732edb9a", "score": "0.5047635", "text": "function videourl(pastedData) {\r\nvar success = false;\r\nvar media = {};\r\nif (pastedData.match('https://(www.)?youtube|youtu\\.be')) {\r\n if (pastedData.match('embed')) { youtube_id = pastedData.split(/embed\\//)[1].split('\"')[0]; }\r\n else { youtube_id = pastedData.split(/v\\/|v=|youtu\\.be\\//)[1].split(/[?&]/)[0]; }\r\n media.type = \"youtube\";\r\n media.id = youtube_id;\r\n success = true;\r\n}\r\nelse if (pastedData.match('http://(player.)?vimeo\\.com')) {\r\n vimeo_id = pastedData.split(/video\\/|http:\\/\\/vimeo\\.com\\//)[1].split(/[?&]/)[0];\r\n media.type = \"vimeo\";\r\n media.id = vimeo_id;\r\n success = true;\r\n}\r\nif (success) { return media.id; }\r\nelse { alert(\"No valid media id detected\"); }\r\nreturn false;\r\n}", "title": "" }, { "docid": "a5153ae7242b1d82fb037c19315bd593", "score": "0.50315166", "text": "function isMediaUploadToggle() {\n return AACommonService.isMediaUploadToggle();\n }", "title": "" }, { "docid": "354e77527cbee70c888270932253b475", "score": "0.5016037", "text": "function storeMedia(user, media){\n var dfd = q.defer();\n \n user.updated_at = Date.now();\n user.last_login = Date.now();\n user.pictures = media;\n \n user.save(function(err){\n if(err) return dfd.reject(err);\n console.log('user updated');\n dfd.resolve(media);\n });\n \n return dfd.promise;\n}", "title": "" }, { "docid": "027134c21329559d8e0c5457472d3f8c", "score": "0.5003459", "text": "function isVideoItem(item){return item.duration > 0 && item.hasVideo == true;}", "title": "" }, { "docid": "a3e771bbb8a65caef05c715a9c5012ac", "score": "0.50016165", "text": "function isMediaType(value, types) {\n const val = normalizeType(value);\n if (!val) {\n return false;\n }\n if (!types.length) {\n return val;\n }\n for (const type of types) {\n if (mimeMatch(normalize(type), val)) {\n return type[0] === \"+\" || type.includes(\"*\") ? val : type;\n }\n }\n return false;\n }", "title": "" }, { "docid": "dd0acf296b089a45267d53d6d2f3c83a", "score": "0.49905446", "text": "function layoutIfMediaMatch(mediaName) { // 5527\n if (mediaName == null) { // 5528\n // TODO(shyndman): It would be nice to only layout if we have // 5529\n // instances of attributes using this media type // 5530\n ctrl.invalidateLayout(); // 5531\n } else if ($mdMedia(mediaName)) { // 5532\n ctrl.invalidateLayout(); // 5533\n } // 5534\n } // 5535", "title": "" }, { "docid": "8f2ccd04bcab6973c97ea14155280b8a", "score": "0.49873284", "text": "function mediaView(view, raw){\n//\tconsole.log([view, view.getParent(), raw]);\n\tview.parent().attr('id', raw);\n\t\n\tvar parts \t = raw.split(\"@@\");\n\t\tvar type = parts[0];\n\t\tvar url\t = parts[1];\n\n//\tconsole.log([type, url]);\n\n\tif(type == \"folder\"){\n\t\tvar img = {'src':'ressource/img/media-folder.png', \t\t\t\t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"pdf\"){\n\t\tvar img = {'src':'ressource/img/media-file_pdf.png', \t\t\t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"flash\"){\n\t\tvar img = {'src':'ressource/img/media-file_flash.png', \t\t\t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"audio\"){\n\t\tvar img = {'src':'ressource/img/media-file_audio.png', \t\t\t'height':128, 'width':128, 'myclass':''};\n\t}else\n\tif(type == \"image\"){\n\t\tvar img = (view.parent().hasClass('notFound'))\n\t\t\t? {'src':'/admin/content/ui/img/media-file_file.png', \t\t'height':128, 'width':128, 'myclass':''}\n\t\t\t: {'src':url, \t\t\t\t\t\t\t\t\t\t\t\t'height':'', 'width':'', 'myClass':'shd'};\n\t}else{\n\t\tvar img = {'src':'/admin/content/ui/img/media-file_file.png', \t'height':128, 'width':128, 'myclass':''};\n\t}\n\t\n\tif(img.myClass != '') view.addClass(img.myClass);\n\n\timage = new Image(); \n\timage.onload = function(){\n\t\t\n\t\tvar ratio\t= 1;\n\t\tvar raw \t= {\n\t\t\tsrc\t\t: this.src,\n\t\t\theight\t: this.height,\n\t\t\twidth\t: this.width\n\t\t};\n\n\t\t// Portrait\n\t\tif(raw.height >= raw.width){\n\t\t\tif(raw.height >= 140){\n\t\t\t\timg.height\t= 140;\n\t\t\t\tvar ratio \t= (img.height / raw.height);\n\t\t\t}else{\n\t\t\t\timg.height\t= raw.height;\n\t\t\t}\n\n\t\t\timg.width\t= Math.round(raw.width * ratio);\n\n\t\t// Paysage\n\t\t}else{\n\n\t\t\tif(raw.width >= 140){\n\t\t\t\timg.width\t= 140;\n\t\t\t\tvar ratio\t= (img.width / raw.width);\n\t\t\t}else{\n\t\t\t\timg.width\t= raw.width;\n\t\t\t}\n\n\t\t\timg.height\t= Math.round(raw.height * ratio);\n\t\t}\n\t\t\n\t\t_styles = 'margin-top: '+Math.round((150 - img.height) / 2)+'px; margin-left: '+Math.round((150 - img.width) / 2)+'px';\n\t\timageView = $('<img src=\"'+this.src+'\" height=\"'+img.height+'\" width=\"'+img.width+'\" style=\"'+_styles+'\" />').on('mousedown', function() {return false;}).appendTo(view.empty());\n\t\t\n\t}\n\n\tif(img.myClass == 'shd'){\n\t\timage.src = '/h:140'+img.src+'?&ttloff=45+minutes';\n\t}else{\n\t\timage.src = img.src;\n\t}\n}", "title": "" }, { "docid": "78143d6af4bea09bced2176057c0d005", "score": "0.49844253", "text": "isMultiple () {\n return this.options.audio.length > 1;\n }", "title": "" }, { "docid": "33ad3055714ec075e7d3b300172806a3", "score": "0.49763513", "text": "imageCheck(imgURL) {\n console.log(imgURL);\n if (imgURL !== undefined && imgURL !== \"\") {\n let imageType = imgURL.substr(-4);\n if (imageType !== '.jpg' && imageType !== '.png') {\n this.setState({\n errorMessage:{\n name:null,\n image: \"Image Urls must be in jpg or png form.\"\n }\n });\n return false;\n } else {\n return true;\n }\n }\n return true;\n }", "title": "" }, { "docid": "7582d850204c21be2ac0629b7d81a770", "score": "0.49592182", "text": "function chooseUploadType(){\r\n var url = document.getElementById(\"url\");\r\n var image = document.getElementById(\"image\");\r\n if(url.checked){\r\n document.getElementById(\"url-upload\").classList.toggle(\"show\");\r\n document.getElementById(\"url-radio\").style.background = \"#2ac48e\";\r\n if(document.getElementById(\"photo-upload\").classList.contains(\"show\")){\r\n document.getElementById(\"photo-upload\").classList.toggle(\"show\");\r\n document.getElementById(\"threadPhoto\").value = \"\";\r\n document.getElementById(\"photo-radio\").style.background = \"\";\r\n }\r\n }\r\n if(image.checked){\r\n document.getElementById(\"photo-upload\").classList.toggle(\"show\");\r\n document.getElementById(\"photo-radio\").style.background = \"#2ac48e\";\r\n if(document.getElementById(\"url-upload\").classList.contains(\"show\")){\r\n document.getElementById(\"url-upload\").classList.toggle(\"show\");\r\n document.getElementById(\"threadURL\").value = \"\";\r\n document.getElementById(\"url-radio\").style.background = \"\";\r\n }\r\n }\r\n}", "title": "" }, { "docid": "a77c871a57e1be72ed802e61d6e96fce", "score": "0.495323", "text": "function mediaChange(e) {\r\n setMedia(e.target.value);\r\n }", "title": "" }, { "docid": "2eee7d0a9649a963cdc97c6f8529ebd5", "score": "0.49452758", "text": "function checkTypeDocUploadRequireCustomer(uploaderIn, typeCustomer){\n\t\n\tvar listFileDocType = getListFileDocumentType(uploaderIn);\n\t\n\tvar checkFileHS1 = $.inArray(TYPE_IMG_HS1, listFileDocType)> SELECT_NONE_INDEX;\n\tvar checkFileHS2 = $.inArray(TYPE_IMG_HS2, listFileDocType)> SELECT_NONE_INDEX;\n\t\n\tvar isFileHSSelected = false;\n\tif(checkFileHS1 == true || checkFileHS2 == true){\n\t\tisFileHSSelected = true;\n\t}\n\t\n\t// check cutomer is individual\n\tif(typeCustomer == CUSTOMER_TYPE_PRIVATE){\n\t\t// check if document type CMT1 AND KH1\n\t\tvar checkPrivateCMT1 = $.inArray(TYPE_IMG_CMT1, listFileDocType)> SELECT_NONE_INDEX;\n\t\tvar checkPrivateKH = $.inArray(TYPE_IMG_KH, listFileDocType)> SELECT_NONE_INDEX;\n\t\t\n\t\tif(checkPrivateKH == false || checkPrivateCMT1 == false || isFileHSSelected == false){\n\t\t\treturn PRIVATE_TYPE_DOC_ERROR;\n\t\t}\n\t}\n\t\n\tif(typeCustomer == CUSTOMER_TYPE_FOREIGN){\n\t\t// check if document type CMT1 AND KH1\n\t\tvar checkPrivateCMT1 = $.inArray(TYPE_IMG_CMT1, listFileDocType)>SELECT_NONE_INDEX;\n\t\tvar checkPrivateKH = $.inArray(TYPE_IMG_KH, listFileDocType)> SELECT_NONE_INDEX;\n\t\t\n\t\tif(checkPrivateKH ==false || checkPrivateCMT1 == false || isFileHSSelected == false){\n\t\t\treturn FOREIGN_TYPE_DOC_ERROR;\n\t\t}\n\t}\n\t\n\tif(typeCustomer == CUSTOMER_TYPE_COMPANY){\n\t\t// check if document type CMT1 AND KH1\n\t\tvar checkPrivateCMT1 = $.inArray(TYPE_IMG_CMT1, listFileDocType)>SELECT_NONE_INDEX;\n\t\tvar checkPrivateKH = $.inArray(TYPE_IMG_KH, listFileDocType)> SELECT_NONE_INDEX;\n\t\t\n\t\tvar checkPrivateGPKD = $.inArray(TYPE_IMG_GPKD, listFileDocType)> SELECT_NONE_INDEX;\n\t\tvar checkPrivateHD1 = $.inArray(TYPE_IMG_HD1, listFileDocType)> SELECT_NONE_INDEX;\n\t\t\n\t\tif(checkPrivateKH ==false || checkPrivateCMT1 == false\n\t\t\t\t|| checkPrivateGPKD ==false || checkPrivateHD1 == false || isFileHSSelected == false){\n\t\t\treturn COMPANY_TYPE_DOC_ERROR;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f9a715eb4e84878ba5d3280dc9ab7ae1", "score": "0.49363917", "text": "static get mediaServerTypes() {\n \treturn {\n\t\t\tFS: 'nkmedia_fs',\n\t\t\tFREESWITCH: 'nkmedia_fs',\n\t\t\tJANUS: 'nkmedia_janus',\n\t\t\tKURENTO: 'nkmedia_kurento'\n\t\t};\n }", "title": "" }, { "docid": "5532e328213b6f19312f7610333b26bd", "score": "0.49288443", "text": "function previousMedia() {\n if(mediaIndex == 0) {\n mediaIndex = arrayMedia.length-1\n } else {\n mediaIndex--;\n } \n defineDialogMedia(arrayMedia, photographerSurnameFolder, mediaIndex, dialogImgContainer, titleDialog); \n }", "title": "" }, { "docid": "0b660127bfdb0502206fa74d59e8bc47", "score": "0.49225998", "text": "function analyzeItem(item) {\n let actualitem = null;\n let isDJSet = false;\n\n if (['track', 'track-repost'].includes(item.type)) {\n // Single track, just check the duration\n isDJSet = (item.track.duration / 1000 / 60) > djSetThreshold;\n actualitem = item.track;\n } else if (['playlist', 'playlist-repost'].includes(item.type)) {\n // Playlist, check if there is at least 1 track\n actualitem = item.playlist\n for (const track of item.playlist.tracks) {\n isDJSet = isDJSet || (track.duration / 1000 / 60) > djSetThreshold;\n }\n }\n\n return {\n item: actualitem,\n isDJSet,\n };\n }", "title": "" }, { "docid": "3c76344e52344e77ae9d993e07c86986", "score": "0.4917686", "text": "function GetCommandAudioVideoVariables(commandInDB) {\n\n var audioFile = \"\";\n var videoFile = \"\";\n var imageFile = \"\";\n var type = 0;\n\n if (commandInDB.audio.length > 0) {\n audioFile = commandInDB.audio;\n }\n\n if (commandInDB.video.length > 0) {\n videoFile = commandInDB.video\n }\n\n if (commandInDB.image.length > 0) {\n imageFile = commandInDB.image\n }\n\n // audio and video (not possible)\n if (audioFile.length > 0 && videoFile.length > 0 && imageFile.length == 0) {\n type = 0;\n }\n\n // audio , video and image\n else if (audioFile.length > 0 && videoFile.length > 0 && imageFile.length && 0) {\n type = 0;\n }\n\n // audio and image\n else if (audioFile.length > 0 && videoFile.length == 0 && imageFile.length > 0) {\n type = 1;\n }\n\n // audio only \n else if (audioFile.length > 0 && videoFile.length == 0 && imageFile.length == 0) {\n type = 2;\n }\n\n // video only\n else if (audioFile.length == 0 && videoFile.length > 0 && imageFile.length == 0) {\n type = 3;\n }\n\n // image only\n else if (audioFile.length == 0 && videoFile.length == 0 && imageFile.length > 0) {\n type = 4;\n } else {\n type = 0;\n }\n\n return type;\n }", "title": "" }, { "docid": "1ab329acb0148b1fe3d47488cef2b153", "score": "0.49173564", "text": "function checkFileIsImage(file)\n{\n if (/image\\/\\w+/.test(file.type)) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "c8842c62859f085786cee4e55174ac7e", "score": "0.4917186", "text": "function removeMedia() {\n var result = confirm(\"Are sure? Do you want to remove media?\");\n\n if (result == true) {\n this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);\n } else {\n false;\n }\n }", "title": "" }, { "docid": "fc2f7e31c2f09906f7de13384591bc84", "score": "0.49099705", "text": "function makeMediaModel( itcb ) {\n function onModelCreated( err, model ) {\n if ( err ) { return itcb( err ); }\n mediaModel = model;\n itcb( null );\n }\n\n Y.doccirrus.mongodb.getModel( user, 'media', true, onModelCreated );\n }", "title": "" }, { "docid": "b4705f5e17448049a06ebb344c1afb2a", "score": "0.4902573", "text": "function checkMutedAutoplaySupport() {\n videoContent.volume = 0;\n videoContent.muted = true;\n const playPromise = videoContent.play();\n if (playPromise !== undefined) {\n playPromise.then(onMutedAutoplaySuccess).catch(onMutedAutoplayFail);\n }\n}", "title": "" }, { "docid": "f91af5ab4e6ece44b4383b4f5a19565b", "score": "0.49018812", "text": "function storageCheck(resourceType, amount){\n let storageType;\n if(resourceType === worker){\n console.log(\"Checking Houses\");\n //storageType = house\n }\n else if(resourceType === food){\n //console.log(\"Checking Food\");\n storageType = barn;\n\n if((barn.total * barn.foodStorage) - food.total >= amount){\n return true;\n }\n return false;\n }\n else if(resourceType === wood){\n //console.log(\"Checking Wood\");\n storageType = lumberyard;\n\n if((lumberyard.total * lumberyard.woodStorage) - wood.total >= amount){\n return true;\n }\n return false;\n }\n else if(resourceType === stone){\n //console.log(\"Checking stone\");\n storageType = stoneyard;\n if((stoneyard.total * stoneyard.stoneStorage) - stone.total >= amount){\n return true;\n }\n return false;\n }\n // NEED TO ENSURE NO INVALID TYPE IS PASSED IN\n else{\n console.error(\"Invalid resource type: \" + resourceType);\n return false;\n }\n}", "title": "" }, { "docid": "92091d8594666298830f3dc15762f6ce", "score": "0.4896202", "text": "function checkFileType(file, callback){\n //allowed ext\n const filetypes = /jpeg|jpg|png|gif/;\n //check ext\n const extName = filetypes.test(path.extname(file.originalname).toLowerCase());\n //check mime\n const mimetype = filetypes.test(file.mimetype);\n //check that both are true\n if(mimetype && extName){\n return callback(null, true)\n } else {\n callback(\"Error: Images Only\")\n }\n}", "title": "" }, { "docid": "5e8d4ff8fe8f2285a9ce53287aa1f5be", "score": "0.48943818", "text": "function urlType(url) {\n\t\t\tif (/(\\.mp3(?!\\w)|\\.ogg(?!\\w)|\\.wav(?!\\w)|#audio$)/.test(url))\n\t\t\t\treturn \"audio\"\n\t\t\tif (/(\\.mp4(?!\\w)|\\.mkv(?!\\w)|#video$)/.test(url))\n\t\t\t\treturn \"video\"\n\t\t\tif (/(?:https?:\\/\\/)?(?:www\\.)?youtu\\.?be(?:\\.com)?\\/?.*(?:watch|embed)?(?:.*v=|v\\/|\\/)([\\w\\-_]+)\\&?/.test(url))\n\t\t\t\treturn \"youtube\"\n\t\t\treturn \"image\"\n\t\t}", "title": "" }, { "docid": "e154b2f98aee1794ec847d7c3587bf6f", "score": "0.48839468", "text": "function validTrackType (type) {\n var trackTypes = {'hold' : 1, 'count' : 1, 'coll' : 1};\n return trackTypes[type];\n}", "title": "" }, { "docid": "f2cc189b8488de72533060f7a4010575", "score": "0.48837772", "text": "function checkAudioLength() {\n audioRecordingTime = new Date() - audioRecordingStartTime;\n if (audioRecordingTime > MAX_RECORDING_TIME) {\n stopRecording();\n }\n }", "title": "" }, { "docid": "d03c78b1533cb21070df70487c522937", "score": "0.48825866", "text": "function checkImageFileFormatType(input, assignid, same_image_assigned_another_place_idone, same_image_assigned_another_place_idtwo, h, w) {\n var type = input.files[zeroIndex].type;\n var type_reg = regExForImageTypeValidation;\n if (type_reg.test(type)) {\n showLoader();\n setImageIdForAssigning(assignid, same_image_assigned_another_place_idone, same_image_assigned_another_place_idtwo);\n readerFileFromFileReader(assignid, h, w, same_image_assigned_another_place_idone, same_image_assigned_another_place_idtwo, input);\n // chcek();\n }\n else {\n alert('This file type is unsupported.');\n }\n}", "title": "" }, { "docid": "fc4aab2bb7318fba0d2354cb8fc927e3", "score": "0.48796323", "text": "function isImageCorrupt(img){\n\t//check for required fields\n\tif( !img.created_time ) return false;\n\tif( !img.user.username ) return false;\n\tif( !img.link ) return false;\n\tif( !img.images.standard_resolution.url ) return false;\n\tif( !img.id ) return false;\n\n\t//all checks passed\n\treturn true;\n}", "title": "" }, { "docid": "b462ca78879336cc8b2334d857806e8b", "score": "0.48792037", "text": "function onAutoplayWithSoundFail() {\n // Unmuted autoplay failed. Now try muted autoplay.\n checkMutedAutoplaySupport();\n}", "title": "" }, { "docid": "54dae4b6828b08892718020b74303e6f", "score": "0.4879168", "text": "function checkImageDimensions( itcb ) {\n report( 'i', 'Checking image dimensions: ' + mediaObj._id + ' (' + mediaObj.widthPx + 'x' + mediaObj.heightPx + ')' );\n Y.doccirrus.media.images.identify( mediaObj._diskFile, onIdentifyComplete);\n\n function onIdentifyComplete( err, newMeta ) {\n if ( err ) { return itcb( err ); }\n\n // skip this step if measured values match those in database\n if (\n ( parseFloat( newMeta.widthPx ) === parseFloat( mediaObj.widthPx ) ) &&\n ( parseFloat( newMeta.heightPx ) === parseFloat( mediaObj.heightPx ) )\n ) {\n report( '-', 'Stored image dimensions are correct: ' + newMeta.widthPx + 'x' + newMeta.heightPx + ' ' + mediaObj.mime );\n return itcb( null );\n }\n\n // force update of media if dimensions are incorrect (legacy, import or migration issues, MOJ-7175)\n report( '*', 'Writing new image dimensions to database: ' + newMeta.widthPx + 'x' + newMeta.heightPx + ' ' + mediaObj.mime + ' from ' + mediaObj.widthPx + 'x' + mediaObj.heightPx );\n\n Y.doccirrus.mongodb.runDb( {\n 'user': user,\n 'model': 'media',\n 'action': 'put',\n 'query': { _id: mediaObj._id + '' },\n 'data': Y.doccirrus.filters.cleanDbObject( {\n 'fields_': [ 'widthPx', 'heightPx' ],\n 'widthPx': newMeta.widthPx,\n 'heightPx': newMeta.heightPx\n } ),\n 'callback': itcb\n } );\n }\n }", "title": "" }, { "docid": "eafacc34693afcb0678a0e05f508789a", "score": "0.4878988", "text": "function checkFileType(file, cb) {\n const filetypes = /jpeg|jpg|png|gif/;\n const extname = filetypes.test(path.extname(file.originalname).toLowerCase());\n const mimetype = filetypes.test(file.mimetype)\n if(mimetype && extname){\n return cb(null, true);\n } else{\n cb('Error: must be image');\n }\n } // end check file type ", "title": "" }, { "docid": "7f070e4664f6a4ec1de6f80b1f8f45a0", "score": "0.48780686", "text": "function validate_uploadfile_format(fileName,filterType)\n {\n \n var allowed_extensions1 = new Array(\"jpeg\",\"jpg\",\"png\",\"gif\");\n var allowed_extensions2 = new Array(\"pdf\",\"doc\",\"docs\");\n var allowed_extensions12 = new Array(\"jpeg\",\"jpg\",\"png\",\"gif\",\"pdf\",\"doc\",\"docx\");\n \n var file_extension = fileName.split('.').pop(); // split function will split the filename by dot(.), and pop function will pop the last element from the array which will give you the extension as well. If there will be no extension then it will return the filename.\n\n if(filterType == 'image'){\n for(var i = 0; i <= allowed_extensions1.length; i++)\n {\n if(allowed_extensions1[i]==file_extension)\n {\n return 'true'; // valid file extension\n }\n }\n }\n if(filterType == 'docs'){\n for(var i = 0; i <= allowed_extensions2.length; i++)\n {\n if(allowed_extensions2[i]==file_extension)\n {\n return 'true'; // valid file extension\n }\n }\n }\n \n if(filterType == 'imgdocs'){\n for(var i = 0; i <= allowed_extensions12.length; i++)\n {\n if(allowed_extensions12[i]==file_extension)\n {\n return 'true'; // valid file extension\n }\n }\n }\n \n \n \n return 'false';\n }", "title": "" }, { "docid": "9dcfc62d0971cbc9cf847e9bcb4b57ad", "score": "0.48739383", "text": "function groupByMedia(imageVariants){var withMedia=[];var without=[];imageVariants.forEach(function(variant){return(variant.media?withMedia:without).push(variant);});if(without.length>1&&\"production\"!==\"production\"){console.warn(\"We've found \"+without.length+\" sources without a media property. They might be ignored by the browser, see: https://www.gatsbyjs.org/packages/gatsby-image/#art-directing-multiple-images\");}return[].concat(withMedia,without);}", "title": "" }, { "docid": "9dcfc62d0971cbc9cf847e9bcb4b57ad", "score": "0.48739383", "text": "function groupByMedia(imageVariants){var withMedia=[];var without=[];imageVariants.forEach(function(variant){return(variant.media?withMedia:without).push(variant);});if(without.length>1&&\"production\"!==\"production\"){console.warn(\"We've found \"+without.length+\" sources without a media property. They might be ignored by the browser, see: https://www.gatsbyjs.org/packages/gatsby-image/#art-directing-multiple-images\");}return[].concat(withMedia,without);}", "title": "" }, { "docid": "9dcfc62d0971cbc9cf847e9bcb4b57ad", "score": "0.48739383", "text": "function groupByMedia(imageVariants){var withMedia=[];var without=[];imageVariants.forEach(function(variant){return(variant.media?withMedia:without).push(variant);});if(without.length>1&&\"production\"!==\"production\"){console.warn(\"We've found \"+without.length+\" sources without a media property. They might be ignored by the browser, see: https://www.gatsbyjs.org/packages/gatsby-image/#art-directing-multiple-images\");}return[].concat(withMedia,without);}", "title": "" }, { "docid": "335b58318c295ac6412db9ac17c104b5", "score": "0.4873189", "text": "checkIsUploaded(doc) {\n return !(doc._id in this.dataMeta.unuploadeds);\n }", "title": "" }, { "docid": "8eeaf0163ca10390d7776b4ade6007b2", "score": "0.4865227", "text": "fetchIfNecessary() {\n const { match: { params: { pk } } } = this.props;\n const { itemId } = this.state;\n if(pk !== itemId) {\n this.setState({ itemId: pk, saveSuccess: false });\n mediaGet(pk).then(item => (item.id === pk) && this.setState({ item }));\n }\n }", "title": "" }, { "docid": "717fe608559c08d938af78184f16e4a7", "score": "0.48630306", "text": "function isValidArtwork(displayMessage)\r\n{\r\n\treturn _checkIsValidRecord(\"_isValidArtwork\", true, szMsg_Invalid_Artwork);\r\n}", "title": "" }, { "docid": "e8e16c3556478d1cc30ef9098d937f23", "score": "0.48607412", "text": "function isMediaEntity(target) {\n return Reflect.hasMetadata(EdmMediaEntity, target);\n}", "title": "" }, { "docid": "1bd158c8c736f49b13443dc42c0b7efb", "score": "0.4860189", "text": "function checkForNullImage(image) { //Done: try a ternery instead\n // if (!image) {\n // return DEFAULT_IMAGE_URL; //Done: make this a global constant\n // }\n // return image.medium\n return image ? image.medium : DEFAULT_IMAGE_URL;\n}", "title": "" }, { "docid": "fb488dcc8fb2957f643f5414b9ce14e4", "score": "0.4858305", "text": "function checkFile(file, type)\n{\n return file.type.indexOf(type) === 0;\n}", "title": "" }, { "docid": "3662fbd09536b42ec1cfed7d32f4c49a", "score": "0.48576176", "text": "_getUrlForMedia(media) {\n if(media.type.startsWith(\"video\")) {\n return \"video/raw/\" + media.id + \"/\" + encodeURIComponent(media.name);\n } else if (media.type.startsWith(\"audio\")) {\n return \"audio/raw/\" + media.id + \"/\" + encodeURIComponent(media.name);\n } else {\n return media.id + \"/\" + encodeURIComponent(media.name);\n }\n }", "title": "" }, { "docid": "3662fbd09536b42ec1cfed7d32f4c49a", "score": "0.48576176", "text": "_getUrlForMedia(media) {\n if(media.type.startsWith(\"video\")) {\n return \"video/raw/\" + media.id + \"/\" + encodeURIComponent(media.name);\n } else if (media.type.startsWith(\"audio\")) {\n return \"audio/raw/\" + media.id + \"/\" + encodeURIComponent(media.name);\n } else {\n return media.id + \"/\" + encodeURIComponent(media.name);\n }\n }", "title": "" }, { "docid": "818aa7d548c46236187ea4631372103d", "score": "0.4857566", "text": "function guessEnclosureType(url) {\n if (url.indexOf('.m4v') != -1) {\n return \"video/mp4\";\n }\n if (url.indexOf('.mp4') != -1) {\n return \"video/mp4\";\n }\n if (url.indexOf('.avi') != -1) {\n return \"video/avi\";\n }\n if (url.indexOf('.mov') != -1) {\n return \"video/quicktime\";\n }\n if (url.indexOf('.mp3') != -1) {\n return \"audio/mpeg\";\n }\n if (url.indexOf('.m4a') != -1) {\n return \"audio/mp4\";\n }\n if (url.indexOf('.wav') != -1) {\n return \"audio/wav\";\n }\n if (url.indexOf('.ogg') != -1) {\n return \"audio/ogg\";\n }\n if (url.indexOf('.wmv') != -1) {\n return \"video/x-ms-wmv\";\n }\n\n return \"\";\n}", "title": "" }, { "docid": "5739cabaad94030b1421e3eddf73397b", "score": "0.48542538", "text": "static getDerivedStateFromProps({ media }) {\n const photos =\n media.length === 0\n ? [\"http://placeorgi.com/600/600\"]\n : media.map(({ large }) => large);\n\n return { photos };\n }", "title": "" }, { "docid": "e5acdcd0c9964145ac873333ea9f782b", "score": "0.48518154", "text": "function isValidUpload(str)\n {\n if(str!=\"\")\n { \n var fileTypes=[\"bmp\",\"gif\",\"png\",\"jpg\",\"jpeg\"];// valid file types\n var source=str;\n var ext=source.substring(source.lastIndexOf(\".\")+1,source.length).toLowerCase();\n var c=0;\n for (var i=0; i<fileTypes.length; i++) \n {\n if (fileTypes[i]==ext) { c=1; break; }\n }\n if(c==0)\n {\n alert(\"THAT IS NOT A VALID IMAGE\\nPlease load an image with an extention of one of the following:\\n\\n\"+fileTypes.join(\", \"));\n return false;\n }\n } \n else\n {\n alert(\"Please select [bmp,gif,png,jpg,jpeg] file to upload.\");\n return false;\n } \n return true; \n }//End isValidUpload", "title": "" }, { "docid": "ebf0c5843056700422354ce42b55b56e", "score": "0.48473784", "text": "function media (list, path, options) {\n\n\toptions.model = options.ref;\n\n\tthis.options = options;\n\n\tvar baseSchema = { type: String, ref: options.ref }//keystone.mongoose.Schema.Types.ObjectId\n\n\tif(options.many){\n\n\t\tthis._nativeType = [baseSchema];\n\n\t}else{\n\n\t\tthis._nativeType = baseSchema;\n\t}\n\n\tthis._properties = ['many','model','sizeMax'];\n\t//this._underscoreMethods = ['crop'];\n\t\n\tmedia.super_.call(this, list, path, options);\n\n}", "title": "" }, { "docid": "193a491406fca41874630e094116d680", "score": "0.48292634", "text": "async function loading_medias(event){\n var id = $(event).data('media');\n var type = $(event).data('type');\n var ftype = $(event).data('ftype');\n $('#tabs-upload-media .upload-file input').attr('accept',type);\n $('#tabs-upload-media .upload-file input').attr('ftype',ftype);\n $('#tabs-upload-media .upload-file input').attr('data-insert','single_image');\n $.ajax({\n url: setting.ajax_url,\n type: \"POST\",\n data: {action:'get_medias',_token: setting.token,type:ftype},\n success: function(resulf){\n if(resulf){\n document.querySelector('#grid-medias').innerHTML = resulf;\n }\n }\n });\n $('[name=\"UploadMedia\"]').attr('data-media',id);\n}", "title": "" }, { "docid": "9870259285879e95846efe740cb4a331", "score": "0.48270938", "text": "importAlexandriaMedia(artifact) {\n if (artifact.publisher) {\n this.setPubAddress(artifact.publisher);\n }\n\n if (artifact.timestamp) {\n this.setTimestamp(artifact.timestamp);\n }\n\n if (artifact.type) {\n let type = artifact.type;\n\n if (type === 'music') {\n type = 'Audio';\n }\n\n if (type === 'book') {\n type = 'Text';\n this.setSubtype('Book');\n }\n\n if (type === 'thing') {\n type = 'Web';\n }\n\n this.setType(type);\n }\n\n if (artifact.torrent) {\n this.setLocation(artifact.torrent);\n\n if (artifact.torrent.split(':')[0] === 'btih') {\n this.setNetwork('bittorrent');\n }\n }\n\n if (artifact.info) {\n if (artifact.info.title) {\n this.setTitle(artifact.info.title);\n }\n\n if (artifact.info.description) {\n this.setDescription(artifact.info.description);\n }\n\n if (artifact.info.year) {\n this.setYear(artifact.info.year);\n }\n\n if (artifact.info['extra-info']) {\n let tmpFiles = [];\n let hadFiles = false;\n\n for (let key in artifact.info['extra-info']) {\n if (artifact.info['extra-info'].hasOwnProperty(key)) {\n switch (key) {\n case 'tags':\n this.setTags(artifact.info['extra-info'][key]);\n break;\n\n case 'Bitcoin Address':\n this.addSinglePaymentAddress('btc', artifact.info['extra-info'][key]);\n break;\n\n case 'DHT Hash':\n let hash = artifact.info['extra-info'][key];\n this.setLocation(hash);\n break;\n\n case 'filename':\n if (artifact.info['extra-info'][key] !== 'none') {\n tmpFiles.push({\n fname: artifact.info['extra-info'][key]\n });\n }\n\n break;\n\n case 'posterFrame':\n tmpFiles.push({\n fname: artifact.info['extra-info'][key],\n type: 'Image',\n subtype: 'Thumbnail'\n });\n break;\n\n case 'runtime':\n this.setDetail('duration', artifact.info['extra-info'][key]);\n break;\n\n case 'files':\n let fileList = artifact.info['extra-info'][key];\n\n for (let file of fileList) {\n this.addFile(file);\n }\n\n if (this.FileObjects.length > 0) {\n hadFiles = true;\n }\n\n break;\n\n default:\n this.setDetail(key, artifact.info['extra-info'][key]);\n }\n }\n }\n\n if (!hadFiles) {\n for (let file of tmpFiles) {\n this.addFile(file);\n }\n }\n }\n }\n\n if (artifact.payment) {// toDo\n // if (artifact.payment.type && artifact.payment.type === \"tip\"){\n // this.setPaymentFiat(artifact.payment.fiat);\n // }\n // if (artifact.payment.scale){\n // this.setPaymentScale(artifact.payment.scale);\n // }\n // if (artifact.payment.sugTip){\n // this.setSuggestedTip(artifact.payment.sugTip)\n // }\n }\n }", "title": "" }, { "docid": "77dd8fc4d17c44a280ff731218facdcb", "score": "0.48266375", "text": "function filterMusic(type, name) {\n var out = glob.json.filter(function(x) {return type==x.type && name==x.name});\n if (out.length == 0) {\n out = \"\"\n } else {\n out = out[0].music\n }\n return out\n}", "title": "" } ]
ac00e27d592ac646b3b1e196707c18f4
mark all todos as uncompleted
[ { "docid": "8cd9ae31ae998d32e7373e0399bd7820", "score": "0.70902723", "text": "clearCompleted() {\n this.todos.forEach(todo => todo.completed = false);\n return this.todos;\n }", "title": "" } ]
[ { "docid": "0c5390e747b039157a6176bf47f87087", "score": "0.7653938", "text": "function clearCompletedTodos() {\n $scope.todos = $scope.todos.filter(function (val) {\n return !val.completed;\n });\n }", "title": "" }, { "docid": "fb3535a8f79c1135381d83801fa3b7d0", "score": "0.70235735", "text": "function completeAllTasks() {\n clearCompleted.classList.toggle('not-selected');\n todos.forEach((todo) => {\n todo.isDone = !todo.isDone;\n });\n renderDOM(todos);\n}", "title": "" }, { "docid": "48c252c71fc3ab4180c1b2ef975869bc", "score": "0.7012164", "text": "static unCheckAll () {\n $('#todo-list li input[type=\"checkbox\"]:checked').each(function (i, el) {\n let element = $(el);\n element.prop('checked', false);\n element.next().removeClass('task-done');\n updateTaskVal(element.attr('name'), 'labelClass', 'title');\n });\n }", "title": "" }, { "docid": "67c8bc28c833c0a5c62b46bf3c037da1", "score": "0.68673384", "text": "toggleAll(completed) {\n this.todos.forEach(todo => { \n todo.completed = completed;\n });\n }", "title": "" }, { "docid": "1690021d01961f7dc91745d2061d05f6", "score": "0.6781368", "text": "function unselectAll() {\n $(\"input[name='todo']\").prop('checked', false);\n}", "title": "" }, { "docid": "c206d22cbbf24fb4a4413e26322279e3", "score": "0.6781053", "text": "function ClearTodo() {\n const newTodos = todos.filter(todo => !todo.complete)\n setTodos(newTodos)\n }", "title": "" }, { "docid": "76b01839b9be5a1d725130f656afdec3", "score": "0.66962", "text": "getIncompleteToDos() {\n return this.state.todos.filter(todo => !todo.completed)\n }", "title": "" }, { "docid": "a6dd4112c0aaaa85318538b8769adfe5", "score": "0.66270876", "text": "uncheck() {\n\t\tif (this._done === false) {\n\t\t\tthrow new Error(`Todo: '${this._title}' has not been checked.`);\n\t\t} else {\n\t\t\tthis._done = false;\n\t\t}\n\t}", "title": "" }, { "docid": "aec633f212cc555648ded85a84c1d2e7", "score": "0.6607113", "text": "function clearAll() {\n var data = getData();\n if (data.uncompleted || data.completed) {\n data.uncompleted = [];\n data.completed = [];\n setData(data);\n displayError(\"All tasks cleared\");\n } else {\n displayError(\"No tasks present!!\");\n }\n}", "title": "" }, { "docid": "1d930c7cbf1a83f632576fd2085d1ce9", "score": "0.66034704", "text": "deleteAll() {\n\t\tthis.setState({ toDoList: [] });\n\t\t\n\t\t/* Reset the number of the checked tasks */\n\t\tthis.setState({ numOfChecked: 0 });\n\t}", "title": "" }, { "docid": "5da637e70bc0d56ee67db92cf8697cab", "score": "0.65668035", "text": "function unselectAllTask() {\n $(\"input[name='task']\").prop('checked', false);\n}", "title": "" }, { "docid": "3701338a1179b1f8405ce39c933e2b47", "score": "0.65632", "text": "function handleClearTodos() {\n\t\tconst newTodos = todos.filter(todo => !todo.complete)\n\t\tsetTodos(newTodos)\n\t}", "title": "" }, { "docid": "c0133eec71696f8a4204d9044f3cdf46", "score": "0.654439", "text": "completeAll(todos) {\n todos.forEach((todo => {\n todo.status = \"complete\";\n const newTodo = Object.assign({}, todo);\n newTodo.status = 'complete';\n newTodo.archive = false;\n api('PUT', newTodo, this.putTodo);\n }))\n this.setState({ todos })\n\n this.countCompletedTodos();\n\n }", "title": "" }, { "docid": "a651cba37f471fe63e1757dd09e1048a", "score": "0.6541908", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }", "title": "" }, { "docid": "a651cba37f471fe63e1757dd09e1048a", "score": "0.6541908", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }", "title": "" }, { "docid": "a651cba37f471fe63e1757dd09e1048a", "score": "0.6541908", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }", "title": "" }, { "docid": "a651cba37f471fe63e1757dd09e1048a", "score": "0.6541908", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }", "title": "" }, { "docid": "a651cba37f471fe63e1757dd09e1048a", "score": "0.6541908", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }", "title": "" }, { "docid": "a651cba37f471fe63e1757dd09e1048a", "score": "0.6541908", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }", "title": "" }, { "docid": "a651cba37f471fe63e1757dd09e1048a", "score": "0.6541908", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }", "title": "" }, { "docid": "4b6211343b850679f29518bb202232fc", "score": "0.65185285", "text": "clearCompleted() {\n //this.todos = this.todos.filter(todo => !todo.complete);\n store.dispatch(clearCompleted());\n }", "title": "" }, { "docid": "ec063f4293e65bbc656426daf993cfd3", "score": "0.651801", "text": "removeCompleted() {\n this.todos.filter(todo => todo.completed)\n .forEach(this.removeTodo.bind(this));\n }", "title": "" }, { "docid": "a10148a59d71349785aac5d34881ea6f", "score": "0.6500569", "text": "function checkOffTodo(id) {\n // create copy of todolist to ensure not changing the current one, which is a state variable that cannot be changed inside react\n const newTodos = [...todos]\n const todo = newTodos.find(todo => todo.id === id)\n todo.complete = !todo.complete\n setTodos(newTodos)\n }", "title": "" }, { "docid": "2da4bd766d9608753ef5a081bcd56704", "score": "0.6478403", "text": "function clearCompleted() {\n // view('todo').remove();\n resource('todo').query('completed').remove();\n return false;\n}", "title": "" }, { "docid": "a67d24b0514ccdffaa5fd60ba5175592", "score": "0.64377415", "text": "static setAllChecked () {\n $('#todo-list li input[type=\"checkbox\"]:not(:checked)').each(function (i, el) {\n let element = $(el);\n element.prop('checked', true);\n element.next().addClass('task-done');\n updateTaskVal(element.attr('name'), 'labelClass', 'title task-done');\n });\n }", "title": "" }, { "docid": "08aba4fafe7386f1d1aeb628f1595ff7", "score": "0.64154243", "text": "function clearCompletedTodo(e) {\n e.preventDefault();\n\n // jika tidak ada todo, munculkan alert\n if (todos.length === 0) return alert('Anda belum memiliki todo!');\n\n // ambil semua elemen input type checkbox\n const checkboxes = Array.from(document.querySelectorAll('input[type=\"checkbox\"]'));\n\n // variabel berisi true (jika ada todo yg completed) / false (jika tidak ada todo yg completed)\n const hasCompletedTodo = checkboxes.some(checkbox => checkbox.checked);\n\n // jika belum ada todo yg diselesaikan, munculkan alert\n if (!hasCompletedTodo) return alert('Belum ada todo yang diselesaikan!');\n\n checkboxes.forEach(checkbox => {\n const todoItem = checkbox.closest('li');\n const todoName = todoItem.querySelector('.todo-name').textContent;\n\n // jika todo / checkboxnya di checklist\n if (checkbox.checked) {\n // hapus todo item dari DOM\n todoItem.remove();\n // hapus todo yg di checklist dari array todos\n todos = todos.filter(todo => todo.name !== todoName);\n // simpan todolist ke locale storage\n saveTodosToLocaleStorage(todos);\n }\n });\n}", "title": "" }, { "docid": "65713d37fd92488de7c645c826c6efd3", "score": "0.6396437", "text": "clearCompleted() {\n let todoList = this.getLocalStorage().filter(todo => {\n if (!todo.isFinished) {\n return true;\n }\n });\n if (todoList.length < 1) {\n todoList = [];\n this.setLocalStorage(todoList);\n } else {\n this.setLocalStorage(todoList);\n }\n }", "title": "" }, { "docid": "f966457563215b2987d0468d469bd872", "score": "0.637952", "text": "completeAll() {\n this.todos.forEach(todo => todo.completed = true);\n return this.todos;\n }", "title": "" }, { "docid": "fa7cc917caa9387bee3ab47a725aa12a", "score": "0.6362714", "text": "function clearCompleted(){\n console.log('clearCompleted...')\n var tempArr = items.filter(item=>(item.isCompleted !== true))\n setItems([...tempArr])\n }", "title": "" }, { "docid": "e8040fc856242e55e33b006e056473fe", "score": "0.631278", "text": "'todos.toggleComplete'(todo) {\n if (todo.owner !== this.userId) {\n throw new Meteor.Error('todos.toggleComplete.not-authorized',\n 'You are not allowed to update to-dos for other users.')\n }\n\n ToDos.update(todo._id, {\n $set: { complete: !todo.complete }\n });\n }", "title": "" }, { "docid": "57348ee5a14798297a355fd13be6eb78", "score": "0.6296848", "text": "function clearCompleted() {\n completeTodo.forEach(todo => localStorage.removeItem(todo.id));\n\n getPrintCountTodo();\n}", "title": "" }, { "docid": "e7b90540b8b20e312177798c9fcded96", "score": "0.6261503", "text": "function clearCompletedToDoItems() {\n var completedItems = toDoList.getElementsByClassName(\"completed\");\n\n while (completedItems.length > 0) {\n completedItems.item(0).remove();\n }\n}", "title": "" }, { "docid": "b16ffbbb689fb0e051daebc48ea6f34a", "score": "0.6246963", "text": "onClickCompleteAll() {\n const newTodos = this.state.todos.map(todo => {\n todo.status = 'complete'\n return todo\n })\n api('PUT', newTodos, this.updateTodos);\n }", "title": "" }, { "docid": "51cfbcea869e338e303f2befa55921b9", "score": "0.62191147", "text": "unmarkAll() {\n for (let i = 0; i < this.marked.length; i++) {\n this.marked[i].classList.remove('mark');\n }\n\n this.marked.length = 0;\n }", "title": "" }, { "docid": "cdd458a91eca978ba23d8865c8a47405", "score": "0.61862683", "text": "toggleComplete(todo){\n todo.complete = !todo.complete\n }", "title": "" }, { "docid": "8026cdf2f2e6ebc3a2051e0900807ef1", "score": "0.61853635", "text": "function clearDone() {\n var data = getData();\n\n if (data.completed) {\n data.completed = [];\n setData(data);\n displayError(\"All completed tasks cleared\");\n } else {\n displayError(\"No tasks present!!\");\n }\n}", "title": "" }, { "docid": "1ea0da4add3c4f5f0c3c4f08989ae6d7", "score": "0.61613053", "text": "archiveAllCompleted(todos) {\n todos.forEach(todo => {\n if (todo.status === \"complete\") {\n const newTodo = Object.assign({}, todo);\n todo.archive = true;\n newTodo.archive = true;\n api('PUT', newTodo, this.putTodo);\n } else {\n return todo;\n }\n })\n\n this.setState({ todos })\n this.countCompletedTodos();\n }", "title": "" }, { "docid": "82cc1bca734863f256307e7a8ddb09ee", "score": "0.61220443", "text": "function checkAllComplete() {\n $scope.allComplete = filterFilter($scope.todos, {complete: false}).length === 0;\n }", "title": "" }, { "docid": "86bc32e1df6647bbf898bf3e8eb90cd0", "score": "0.6106781", "text": "\"todos.toggleComplete\"(todo) {\n if (todo.owner !== this.userId) {\n // Checks if the user matches\n throw new Meteor.Error(\n \"todos.toggleComplete.not-authorized\",\n \"You are not allowed to update to-dos for other users.\"\n );\n }\n // change the complete status\n ToDos.update(todo._id, {\n $set: { complete: !todo.complete }\n });\n }", "title": "" }, { "docid": "279d33f81f7087e3b672967eb9ce05d4", "score": "0.60767394", "text": "function clear() {\n var data = getData();\n\n if (data.uncompleted) {\n data.uncompleted = [];\n setData(data);\n displayError(\"All pending tasks cleared\");\n } else {\n displayError(\"No tasks present!!\");\n }\n\n}", "title": "" }, { "docid": "8664717ea2618018f4f41410b54fd97f", "score": "0.6066724", "text": "_onToggleCompleteAll() {\n TodoActions.toggleCompleteAll();\n }", "title": "" }, { "docid": "0e9a59a573dfe4023c8280adf20858b2", "score": "0.6048885", "text": "markTodoCompleted(id){\n //TODO: mark ToDo item with a matching id to the input one as completed \n // Hint: At this point your local ToDos should already be objects\n var toDos = this.getLocalTodos();\n \n // Your code goes here\n \n this.updateLocalTodos(toDos);\n }", "title": "" }, { "docid": "18895922254bb56d12c3522def721693", "score": "0.6048643", "text": "hasUndoneTodos(todoList) {\n return todoList.todos.some(todo => !todo.done);\n }", "title": "" }, { "docid": "cebf0f0826dac3a37251636dfc402039", "score": "0.6032029", "text": "function removeTasksDone() {\n const tasksDone = document.querySelectorAll('.completed');\n for (let index = 0; index < tasksDone.length; index += 1) {\n tasksDone[index].remove();\n }\n}", "title": "" }, { "docid": "2f03cb6f1ea8d8f5d5e2a6d6c506a174", "score": "0.6029257", "text": "function completeTodo(num){\r\n for(var i = 0; i < todoArray.length; i++){\r\n if(todoArray[i].id === num){\r\n todoArray[i].completed = true;\r\n updateTodo();\r\n displayTodo();\r\n }\r\n }\r\n}", "title": "" }, { "docid": "addcea6a0bb85b43ade97315fa9977a3", "score": "0.6002943", "text": "function destroyCompletedRequest() {\n for (var id in _todos) {\n if (_todos[id].complete) {\n update(id, {isDeleting: true});\n }\n }\n}", "title": "" }, { "docid": "dc4aafd9efe8dad04dc034233698f94e", "score": "0.60013604", "text": "setTodos(state, todos) {\n let completedArr = [];\n let todoArr = [];\n let customListTodos = [];\n todos.forEach((t) => {\n if (t.listId !== null) {\n customListTodos.push(t);\n } else if (t.completed == true) {\n completedArr.push(t);\n } else if (t.completed == false) {\n todoArr.push(t);\n }\n });\n // NOTE This method will recieve every single todo a user has, regardless of if it belongs to a custom list or not. However, in reality we only care about the todos without a listId property (the ones with a listId will be handled by the 'setCustomTodos' method), and so to ensure that the customTodosArray is not overwritten and filled with ALL custom todos I created essentialy a fake or dump array to store ALL custom todos.\n state.todo.todos = todoArr;\n state.todo.completedTodos = completedArr;\n state.todo.customListTodosDontUse = customListTodos;\n // NOTE after updating a todo's completed property it will run this method. We want to check to see if any of the newly fetched custom todos are completed or not, if they are, remove them from the customListTodos array and insert it into the completedTodos array\n state.todo.customListTodosDontUse.forEach((t) => {\n if (t.completed == true) {\n let todoIndexToRemove = state.todo.customListTodos.findIndex(\n (todo) => todo._id == t._id\n );\n state.todo.customListTodos.splice(todoIndexToRemove, 1);\n state.todo.completedTodos.push(t);\n }\n });\n }", "title": "" }, { "docid": "c270876151967d5b6391d8b1047e4121", "score": "0.59809303", "text": "deleteCompletedTasks() {\n\t\tthis.props.todoList.deleteCompletedTasks();\n\t}", "title": "" }, { "docid": "b1ab93e44eb3ee63a0f5a29f36ea1962", "score": "0.59726673", "text": "function deleteAllCompletedTodos() {\n // Write your code here...\n}", "title": "" }, { "docid": "ef8418045d40d833146924a1a41554c2", "score": "0.5962179", "text": "function resetMarkedState() {\n _.forEach(userData[\"userQuestions\"], function(q) {\n q.marked = false;\n })\n }", "title": "" }, { "docid": "483635f7fc8c2a61b9abc949f34cee82", "score": "0.5957857", "text": "function deleteAllCompletedTodos() {\r\n // Write your code here...\r\n}", "title": "" }, { "docid": "dcb83bc559855051787c63dacb410042", "score": "0.5951445", "text": "function filterNotFinished(){\n unfinishedList = toDoList.filter(toDoSingle => toDoSingle.completed == false);\n\n}", "title": "" }, { "docid": "46fdf7c9378dfd1266a85dcb8d37e51a", "score": "0.5951211", "text": "restoreAllTodo(){\r\n for (let i = 0; i < this.todosDeleted.length; i++){\r\n this.todos.push(this.todosDeleted[i]);\r\n }\r\n this.todosDeleted.splice(0);\r\n }", "title": "" }, { "docid": "fcc6e113f8ec643825ad55529ecafe8a", "score": "0.59397215", "text": "markComplete(id) {\n this.setState({\n todos: this.state.todos.map(item =>{\n if(item.id === id){\n item.completed = !item.completed\n }\n return item\n })\n })\n }", "title": "" }, { "docid": "02ee9c7866972917f5ea7373023a2373", "score": "0.5930924", "text": "function removeCompleted() {\n const allTasks = document.querySelectorAll('.task');\n for (let index = allTasks.length - 1; index >= 0; index -= 1) {\n if (allTasks[index].classList.contains('completed')) {\n allTasks[index].remove();\n }\n }\n}", "title": "" }, { "docid": "746211721e4f05dae11d734199c9014e", "score": "0.59221625", "text": "function todoCheckAll() {\n\t var mdis = document.querySelectorAll(\".todo-single-item .mdi\");\n\t mdis.forEach(function (fa) {\n\t fa.addEventListener(\"click\", function (e) {\n\t e.stopPropagation();\n\t e.target.parentElement.classList.toggle(\"finished\");\n\t });\n\t });\n\t }", "title": "" }, { "docid": "4fd2419cdf22c75193dccb84f692a393", "score": "0.58968127", "text": "function todoCheckAll() {\n var mdis = document.querySelectorAll(\".todo-single-item .mdi\");\n mdis.forEach(function(fa) {\n fa.addEventListener(\"click\", function(e) {\n e.stopPropagation();\n e.target.parentElement.classList.toggle(\"finished\");\n });\n });\n }", "title": "" }, { "docid": "931542c9c6a1b6f0571597232bda6a83", "score": "0.5893634", "text": "function markAsComplete ( e ) {\n e.preventDefault()\n if (e.target.tagName === 'A') {\n //console.log(e)\n let ourIndex = e.target.parentNode.dataset.index\n //console.log(ourIndex)\n let checkedTodo = e.target.parentNode.previousElementSibling\n\n if (!data.todos[ourIndex].isCompleted) {\n // Mark the item as completed and then move it to the Completed todos array\n data.todos[ourIndex].isCompleted = true\n let completedTodo = data.todos[ourIndex]\n\n //console.log(checkedTodo)\n\n\n data.completedTodos.push(completedTodo)\n //console.log(data.completedTodos)\n //data.todos.splice(ourIndex,1)\n } else {\n data.todos[ourIndex].isCompleted = !data.todos[ourIndex].isCompleted\n\n // this makes sure that if it is toggled back to \"mark as completed\", it is removed from the completed todos array\n let removeFromCompletedTodos = data.todos[ourIndex].newTodo\n for (let i = 0; i < data.completedTodos.length; i++) {\n if(removeFromCompletedTodos == data.completedTodos[i].newTodo){\n data.completedTodos.splice(i,1)\n }\n }\n }\n\n // refresh list\n reCompile();\n }\n}", "title": "" }, { "docid": "ea3b866fb6ddc1ccba44e675998471bd", "score": "0.58861244", "text": "chooseAll() {\n var { todoItems } = this.state;\n let count = 0\n for(let item of todoItems) {\n if(item.isCompleted === true) {\n count++;\n }\n }\n if(count === todoItems.length) {\n for(let item of todoItems) {\n item.isCompleted = false;\n }\n } else {\n for(let item of todoItems) {\n item.isCompleted = true;\n }\n }\n\n var newState = {todoItems: todoItems};\n\n this.setState(newState, () => {\n window.localStorage.clear();\n window.localStorage.setItem('listItem', JSON.stringify(this.state));\n });\n }", "title": "" }, { "docid": "a5f6279cf164efab0f012eaef888174e", "score": "0.58695364", "text": "markTaskAsUnSelected() {\n this.isSelected = false;\n this.styleUnselectedTask();\n }", "title": "" }, { "docid": "c3ce6b4817b9b37da7445c8db520566f", "score": "0.58568966", "text": "onCheckTodo(target) {\n const newTodos = this.state.todos.map((todo) => {\n if (todo === target) {\n todo.check = !todo.check;\n }\n return todo;\n });\n this.setState({\n todos: newTodos,\n selected: null\n });\n }", "title": "" }, { "docid": "3ed081c9e4927c90e4ecf640fe12d407", "score": "0.5851637", "text": "archiveTodo() {\n this.todoData = this.todoData.filter(x => x.done === false);\n }", "title": "" }, { "docid": "3ed081c9e4927c90e4ecf640fe12d407", "score": "0.5851637", "text": "archiveTodo() {\n this.todoData = this.todoData.filter(x => x.done === false);\n }", "title": "" }, { "docid": "22bf807efcd1e84bdb0ec460463ca849", "score": "0.58365536", "text": "function clearCompleted() {\n for (var i = 0; i < itemList.length; i++) {\n if (itemList[i].isComplete) {\n itemList.splice(i, 1);\n i--;\n }\n }\n reDisplay();\n}", "title": "" }, { "docid": "6de9491923045ea817e265449792fda0", "score": "0.58304805", "text": "function clearCompleted () {\n for (var index = 0; index < taskDetailsArray.length; index++) {\n if (taskDetailsArray[index].selectValue === 'completed') {\n var xhttp = new XMLHttpRequest()\n var c = taskDetailsArray[index].id\n xhttp.open('DELETE', `http://localhost:3000/objects/${c}`, true)\n xhttp.send(null)\n taskDetailsArray.splice(index, 1)\n index--\n }\n }\n displayTasks()\n calculations()\n}", "title": "" }, { "docid": "6e4d76a2daa4f2082eafdda8a459fe9b", "score": "0.58269984", "text": "function unDoneTask() {\n var li = this.parentNode;\n li.className = 'task' + ' ' + 'item' + ' ' + 'priority';\n var checked = li.querySelector('input');\n li.removeChild(checked);\n}", "title": "" }, { "docid": "305692a541fea847aa1ad28f16be9355", "score": "0.5824939", "text": "function updateTodos() {\n todoList.innerHTML = \"\";\n todoDoneList.innerHTML = \"\";\n//this clears old todos\n\n todos.forEach(function (el) {\n //so I can do it for each todo \n\n var todo = document.createElement('li');\n todo.className = \"todo\";\n todo.innerText = el.todo;\n //so I can create new todos\n\n todo.addEventListener('click', function (e) {\n todos.forEach(function (el, i) {\n if (todos[i].todo === e.target.innerText) {\n todos[i].checked = !todos[i].checked;\n updateTodos();\n }\n })\n });\n//this allows the todo's to be checked and unchecked\n\n if (el.checked) {\n todoDoneList.appendChild(todo);\n } else {\n todoList.appendChild(todo);\n }\n });\n}", "title": "" }, { "docid": "85b42f0fa70a61b6dc518c07c924ec23", "score": "0.5823101", "text": "deleteUncompletedTasks(array){\n return array.filter(item => item.isCompleted);\n }", "title": "" }, { "docid": "1545128e43f93e5b5f4038308e6a7013", "score": "0.5802155", "text": "function CheckboxHandler() {\n setTodos(\n todos.map((item) => {\n if (item.id === todo.id) {\n return {\n ...item,\n completed: !item.completed,\n };\n }\n return item;\n })\n );\n }", "title": "" }, { "docid": "96dd2bcb7389fbb4dea9f6a99750cfea", "score": "0.5783654", "text": "function removeTaskComplete(){\n const task2 = task.filter((t,i) =>{ \n \n return t.isComplete === false \n \n });\n localStorage.setItem('@List', JSON.stringify([...task2]))\n setTask([...task2])\n \n }", "title": "" }, { "docid": "ec3db88da35a5f4a354d657e210d53e1", "score": "0.57803047", "text": "function toggler(todo){\n const updatedTodos = todos.map((t)=>\n t.id===todo.id ? { ...t,done:!t.done} : t\n );\n updateTodos(updatedTodos);\n }", "title": "" }, { "docid": "e43db5a6e70455e7a5482ee8cd5521c7", "score": "0.5766134", "text": "function fCompleteResetM() {\n jq(\".completeM input:checkbox\").each(function() {\n jq(this).prop('checked', false);\n });\n filterCompleteM('');\n }", "title": "" }, { "docid": "7b52dcb1cda677227999bb20ad98d0f1", "score": "0.5764891", "text": "deleteCompletedTasks(array){\n return array.filter(item => !item.isCompleted);\n }", "title": "" }, { "docid": "723fe839e63b97264e064eebfb917aa9", "score": "0.5742817", "text": "function outputNotComplete() {\n document.querySelector(\"#tasks\").innerHTML = \"\";\n let items = todos.filter(todo => todo.Completed == 0);\n items.forEach(\n item => {\n document.querySelector(\"#tasks\").innerHTML +=\n `<li>Not completed: ${item.Content}</li>`\n \n });\n}", "title": "" }, { "docid": "7b90c1c6ceda53373a9262914bcf00cb", "score": "0.5738128", "text": "done(itemIndex) {\n let tempList = this.state.toDoItems;\n tempList[itemIndex].done = !tempList[itemIndex].done;\n this.setState({\n toDoItems: tempList\n });\n }", "title": "" }, { "docid": "1bc9fc833229cf52c79fac6d30100182", "score": "0.5733203", "text": "function deleteAllTodos() {\n todos.data.length = 0\n todos.setLocalStorage()\n view.render()\n}", "title": "" }, { "docid": "34fbe64dab71e2e23948de379f86113b", "score": "0.5725305", "text": "function unCompleteItem() {\n var todoLi = $(this).parent('li');\n var idToUnComplete = todoLi.attr('data-id');\n $.ajax({\n url: \"/todo_items/\" + idToUnComplete,\n method: \"put\",\n data: {\n \"todo_item\": {\n \"completed\": false\n }\n },\n dataType: \"json\",\n success: function (todo_item) {\n var todoContainer = $('#todo ol');\n var todoLiCopy = todoLi.clone(true, true); // deep copy with data and events\n todoLi.hide();\n todoLiCopy.children('input[type=checkbox]').prop(\"checked\", false);\n todoLiCopy.appendTo(todoContainer);\n todoLiCopy.off(\"click\");\n todoLiCopy.on(\"click\", completeItem);\n },\n error: function () {\n alert(\"Sorry, we couldn't put your todo back in the queue. \" +\n \"Looks like it'll just stay completed!\");\n }\n });\n}", "title": "" }, { "docid": "e5ee51b6a3961f1a0d2f84501cfe809c", "score": "0.57211584", "text": "_unmarkAll() {\n if (!this.isEmpty()) {\n this._selectionMap.clear();\n }\n }", "title": "" }, { "docid": "375c7a93a377bf359b7ea3c703664eba", "score": "0.5720829", "text": "function clearAll() {\n if (confirm(\"Are you sure you want to clear the entire list?\")) {\n viewSection.innerHTML = \" \";\n tasks = [];\n counter.textContent = tasks.length;\n setPersistent(tasks);\n }\n }", "title": "" }, { "docid": "e8247cd352ceafa720ecdf7df35bde16", "score": "0.57157564", "text": "_onClearCompletedClick() {\n TodoActions.destroyCompleted();\n }", "title": "" }, { "docid": "e329155e59f0f73d4c53e464994138b8", "score": "0.5711844", "text": "function deleteAllCompleteTasks() {\n axios.delete('http://localhost:5000/api/tasks', {\n\n }).then(res => {\n $('li').each(function (i) {\n if ($(this).hasClass('complete')) {\n $(this).remove();\n }\n });\n }).catch(err => console.error(err));\n\n }", "title": "" }, { "docid": "844b6b43c410d72bac20508f6e00b282", "score": "0.56997216", "text": "function clearAllTasks() {\r\n Task.all = [];\r\n localStorage.setItem('tasks', JSON.stringify(Task.all));\r\n render();\r\n\r\n}", "title": "" }, { "docid": "278963c371feca47168e9ab256f1e36a", "score": "0.5685929", "text": "function markCompleted() {\n\n const list = document.querySelectorAll('li');\n list.forEach((items) => {\n items.setAttribute('class', 'completed');\n });\n}", "title": "" }, { "docid": "c745dc8386ad7fd288b87239d2ae9403", "score": "0.5679622", "text": "function getIncompleteItems(){\n return.todoArr.filter(function(item,idx,arr){\n return !item.completed\n })\n}", "title": "" }, { "docid": "2c3c1f43d0cd97619ee83e286e5e0093", "score": "0.5677009", "text": "function uncheckAll() {\n $$('input.survey_checkbox').each(function(checkbox) {\n checkbox.checked = false;\n });\n}", "title": "" }, { "docid": "fe475fc66a39f7e280e73ed15870d2ff", "score": "0.5673991", "text": "updateCompletedKey(index) {\n this.todos[index].completed = !this.todos[index].completed;\n }", "title": "" }, { "docid": "1311c97648d8b0fc44ed881f193b6898", "score": "0.5668933", "text": "function deSelectAnswers() {\n correctAnsEl.forEach((correctAnsEl) => {\n correctAnsEl.checked = false;\n });\n }", "title": "" }, { "docid": "69ee457e63a3fba0175e481f79c90b75", "score": "0.5666722", "text": "togglePendingTask(ids = []) {\n ids.forEach(id => {\n const task = this._List[id];\n if (!task.CompleteDate) {\n task.CompleteDate = new Date().toDateString();\n }\n })\n this.ListArray.forEach(task => {\n if (!ids.includes(task.id)) {\n this._List[task.id].CompleteDate = null;\n }\n })\n }", "title": "" }, { "docid": "f3d20d42235eb6d72865bb6f715f7aeb", "score": "0.56622237", "text": "onRemoveAll() {\n this.setState({\n todos: [],\n selected: null\n });\n }", "title": "" }, { "docid": "9c3dbfa08546564e246cbd1879323060", "score": "0.5661012", "text": "onCheck(todo){\n var newTodo = _.update(todo, 'isChecked', () => {return !todo.isChecked});\n var newTodos = _.assign(this.state.todos, newTodo);\n var falseTodos = _.find(this.state.todos, {'isChecked': false});\n\n this.setState({todos: newTodos, isToggleAll: falseTodos === undefined})\n\t}", "title": "" }, { "docid": "014f52583677c6bdd1e7bfa45f63b4d5", "score": "0.5657963", "text": "function clearAllTodos(todo) {\r\n let todos;\r\n let notesLS = localStorage.getItem(\"todos\");\r\n if (notesLS === null) {\r\n todos = [];\r\n } else {\r\n todos = JSON.parse(notesLS);\r\n }\r\n let notesCard = document.getElementsByClassName(\"todo\");\r\n Array.from(notesCard).forEach((element) => {\r\n element.remove();\r\n });\r\n todos.splice(0, todos.length);\r\n localStorage.setItem(\"todos\", JSON.stringify(todos));\r\n totalTasks();\r\n}", "title": "" }, { "docid": "10ad2baeb8e61e422359c059cad41917", "score": "0.565099", "text": "function resetToDo() {\r\n fs.writeFile('toDoList.txt', '', function(err) {\r\n if (err) throw err;\r\n console.log('reset done')\r\n })\r\n}", "title": "" }, { "docid": "f8dcafd6110c05727f7a7ac2e6c63080", "score": "0.5648406", "text": "function emptyToDoList() {\n $(\"#notCompleted\").empty();\n $(\"#completedList\").empty();\n}", "title": "" }, { "docid": "5514ac45f9b1655eb1608fdc40b87081", "score": "0.5647783", "text": "toggle()\n {\n if (this.completed === false && this.failed === false)\n {\n this.completed = true;\n }\n else if (this.completed === true)\n {\n this.failed = true;\n this.completed = false;\n }\n else\n {\n this.failed = false;\n }\n }", "title": "" }, { "docid": "a2825b05ddbb9db3d4a526760ebd2081", "score": "0.5642514", "text": "function toggleDone(id) {\n \n setTodos(todos.map(todo => {\n if(todo.id===id) {\n\n // update the counter\n if(todo.completed===true) {\n \n i++\n\n } else {\n\n i--\n }\n \n setCounter(i) \n\n // if was checked - spesific 'todo'\n return {\n id:todo.id,\n name:todo.name,\n completed:! todo.completed // toggle logic\n };\n\n\n } else {\n return todo; // do nothing\n }\n\n })\n );\n }", "title": "" }, { "docid": "479758686ba1ddadfcfb0fe1d3b49861", "score": "0.56404316", "text": "function completeTodo(e) {\n let listItem = e.target.parentElement;\n let checkbox = e.target;\n\n listItem.classList.toggle('list-item-done');\n checkbox.classList.toggle('checkbox-done');\n}", "title": "" }, { "docid": "abaa342b50472f7115184dc341dcee61", "score": "0.5638928", "text": "function deseleccionarTodo(){\n for (i=0;i<document.f1.modulo.length;i++)\n if(document.f1.modulo[i].type == \"checkbox\")\n document.f1.modulo[i].checked=0\n}", "title": "" }, { "docid": "4a088ae2e2e7e11721dd2ee9d160caaa", "score": "0.5628341", "text": "function toggleComplete() {\n // TEMP: toggle a class that makes a todo look complete and update the todo list.\n // console.log(\"clicked\");\n var clickedItem = this;\n\n // if(clickedItem.className === 'done') {\n // clickedItem.className = '';\n // } else {\n // clickedItem.className = 'done';\n // }\n\n // to update the todo list we will use a loop to find matching text\n var listItems = document.getElementsByTagName(\"li\");\n\n for(var i = 0; i < listItems.length; i++) {\n if(listItems[i] === clickedItem) {\n toDoList[i].done = !toDoList[i].done;\n }\n }\n\n listToDos();\n}", "title": "" }, { "docid": "6c8a09ebf42246f6b35bbb45c9d17e02", "score": "0.56215453", "text": "getCompleteToDos() {\n return this.state.todos.filter(todo => todo.completed)\n }", "title": "" }, { "docid": "a8a0cdff1a55c2255db453fde5a4786a", "score": "0.56121874", "text": "function Completed() \n{\n let to_do_task = Todo_list.getElementsByTagName(\"div\");\n \n //Looping through all the tasks to find which one is selected\n for (let i=0; i < to_do_task.length; i++) \n {\n let checkbox = to_do_task[i].getElementsByTagName(\"input\");\n \n if(checkbox[0].checked) \n {\n /* Getting the label of the task */\n let label = to_do_task[i].getElementsByTagName(\"label\");\n let comp_task = label[0]; \n \n /* Removing the task from to_do list */\n to_do_task[i].parentNode.removeChild(to_do_task[i]);\n \n /* Appending to the completed list*/\n append_completed_list(comp_task); \n }\n }\n}", "title": "" } ]
62fe084232ed67815f60ac8bee76f994
save checkbox state if it changed, need to unchecked checkbox
[ { "docid": "d3f33a1f688291652e272f7d148f0f65", "score": "0.77433854", "text": "_saveCheckboxState(event, context)\n\t{\n\t\tthis.state.serverData[context.name] = event.target.checked;\n\t}", "title": "" } ]
[ { "docid": "bdbe7195abc43e23a1ccc1ef2d6336ea", "score": "0.74685043", "text": "function changeCheckBoxState() {\n STORE.checkBox = !STORE.checkBox;\n}", "title": "" }, { "docid": "62fb39c7879871c67ef1a706a5609644", "score": "0.70599043", "text": "function restoreChecked(){\n\n\t\tif( hasControls ){\n\t\t\tif(typeof storage.get(\"cb_private\") != 'undefined'){\n\t\t\t\tcb_private.checked = storage.get(\"cb_private\") === \"true\" ? true : false;\n\t\t\t}\n\n\t\t\tif(typeof storage.get(\"cb_protected\") != 'undefined'){\n\t\t\t\tcb_protected.checked = storage.get(\"cb_protected\") === \"true\" ? true : false;\n\t\t\t}\n\n\t\t\tif(typeof storage.get(\"cb_inherits\") != 'undefined'){\n\t\t\t\tcb_inherits.checked = storage.get(\"cb_inherits\") === \"true\" ? true : false;\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "cd46bb16e89a3dc42e50581f5a15e095", "score": "0.6947164", "text": "onOverwriteOriginalCheckboxChanged_() {\n var items = {};\n items[SlideMode.OVERWRITE_ORIGINAL_KEY] =\n this.overwriteOriginalCheckbox_.checked;\n chrome.storage.local.set(items);\n }", "title": "" }, { "docid": "b0970b64c199268e1df79da37c5f2163", "score": "0.6879557", "text": "_changeCheckState(optionalValue) {\n const that = this;\n let oldValue = that.checked;\n\n if ((oldValue === null) && (optionalValue !== undefined)) {\n that.$.fireEvent('change', { 'value': optionalValue, 'oldValue': null });\n that.checked = optionalValue;\n return;\n }\n\n if (that.checked === null) {\n that.checked = true;\n }\n else {\n that.checked = !that.checked;\n }\n\n that.$.fireEvent('change', { 'value': that.checked, 'oldValue': oldValue });\n that._updateHidenInputNameAndValue();\n }", "title": "" }, { "docid": "9ed86fb149d914f8f0a2b65db3ab5ef3", "score": "0.6832615", "text": "function handleCheckboxChange(event) {\n todo.isChecked = event.target.checked\n setTodoCompleted(todo.id)\n }", "title": "" }, { "docid": "78d8b33d38fa9a2505b42d301ecf42a9", "score": "0.6826825", "text": "function changeCheckboxesState(){\n if (checkUStz == false && checkEUtz == false && checkASIAtz == false) {\n $('#checkboxWorldwide').prop('checked', true);\n readCheckboxesState();\n }\n}", "title": "" }, { "docid": "64ba6dd8724aede451981b9b927d0e97", "score": "0.672927", "text": "function onInitCheck(e) {\n e.checked = todo.checked\n }", "title": "" }, { "docid": "4dcf5b35ec21889fc68e0a50ac10c469", "score": "0.66970366", "text": "function cambiarEstadoCheck(anodehijo,check) {\r\n\t\t\tif(anodehijo.attributes.checked != check) {\r\n\t\t\t\tanodehijo.getUI().toggleCheck(check);\r\n\t\t\t\tanodehijo.attributes.checked = check;\r\n\t\t\t\tupdateArrayDeschequeados(anodehijo);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "70c4290478807d90f5f96161bf53a008", "score": "0.66775745", "text": "function CheckBox_setCheckedState(isChecked) \r\n{\r\n if (isChecked)\r\n {\r\n this.checkBox.setAttribute(\"checked\",\"true\");\r\n }\r\n else\r\n {\r\n this.checkBox.removeAttribute(\"checked\");\r\n }\r\n}", "title": "" }, { "docid": "538b46498dd762732267072c55262d80", "score": "0.66747725", "text": "_applyValue(value, old) {\n value ? this.addState(\"checked\") : this.removeState(\"checked\");\n this.getContentElement().setAttribute(\"aria-checked\", Boolean(value));\n }", "title": "" }, { "docid": "3ca4844a1ae80b47d5b20e297fb9ce27", "score": "0.65874183", "text": "function handleCheck(e){\n if(e.target.checked){\n setInput({\n ...input,\n status: e.target.value //es la misma logica que arriba solo que modifico el status\n })\n }\n }", "title": "" }, { "docid": "004f2ec43ec21215929fd47a11ae0cce", "score": "0.65718275", "text": "function save1() {\t\n\tlet checkbox = document.getElementById(\"checkbox1\");\n localStorage.setItem(\"checkbox1\", checkbox.checked);\t\n}", "title": "" }, { "docid": "a624b72db6b7951516d109ad49d8102a", "score": "0.6519827", "text": "function saveOption(e){\n \n \t// Get the input target field\n \tvar target = (e.currentTarget) ? e.currentTarget : e.srcElement;\n \n \tif (target.tagName.toLowerCase() === \"input\" && target !== undefined) {\n e.stopPropagation();\n \t} \n\n \tvar check=(target.getAttribute('checked')=='checked')?true:false;\n \tvar save = {};\n\tsave[target.value] = !check;\n\t\n\t// Store the setting in the Chrome Storage API\n\tchrome.storage.sync.set(save,function(){});\n\n\tif(check){\n\t\ttarget.removeAttribute('checked');\n\t}\n\telse\n\t{\n\t\ttarget.setAttribute('checked','checked');\n\t}\n \n\n}", "title": "" }, { "docid": "f1d092b20ebaa572158b6886d49fc05b", "score": "0.65161294", "text": "setCheckboxValue (checkbox, value) {\n checkbox.checked = !!value;\n }", "title": "" }, { "docid": "23dffceef3b3b12c852cb56c0e570611", "score": "0.6506667", "text": "toggleCheckOutStatus(){\n this.isCheckedOut = !this.isCheckedOut;\n }", "title": "" }, { "docid": "c23927489b9442326b9aa04e0c7cd984", "score": "0.6486579", "text": "function ctd_bind_task_checkoff() {\n $( \":checkbox\" ).change(function(){\n ctd_task_id_to_update = this.id;\n ctd_task_id_to_update = ctd_task_id_to_update.match(/\\d+/)[0];\n if(this.checked) {\n ctd_task_completed(ctd_task_id_to_update, 1);\n $(\"#ctd-draggable-\"+ctd_task_id_to_update).delay(2000).fadeOut();\n $(\"#ctd-oncal-\"+ctd_task_id_to_update).delay(2000).fadeOut();\n } else {\n ctd_task_completed(ctd_task_id_to_update, 0);\n $(\"#ctd-draggable-\"+ctd_task_id_to_update).delay(1000).fadeIn();\n $(\"#ctd-oncal-\"+ctd_task_id_to_update).delay(1000).fadeIn();\n }\n });\n}", "title": "" }, { "docid": "8f59655db9958e53530bfe4bc7d87669", "score": "0.6482328", "text": "toggleCheckOutStatus() {\n this._isCheckedOut = !this._isCheckedOut;\n}", "title": "" }, { "docid": "497256bea1d4e8df84a1ca1017158a48", "score": "0.6471271", "text": "setChecked() {\n this.setState({\n checked: !this.states.checked\n })\n\n this.states.checked = !this.states.checked\n }", "title": "" }, { "docid": "b06140cae6657757ffc1d5013e9540a7", "score": "0.63806665", "text": "toggleCheckOutStatus() {\n this.isCheckedOut = !this.isCheckedOut;\n }", "title": "" }, { "docid": "71ba065574e91ddd60c79adaa9b5a2fb", "score": "0.6377089", "text": "change() {\n (0, _metal.set)(this, 'checked', this.element.checked);\n }", "title": "" }, { "docid": "b8f928662538533c3a29fcb040317efa", "score": "0.63760567", "text": "bindCheckbox(e) {\n let data = this.data.currentList\n let id = e.currentTarget.dataset.id\n if (this.data.index != null && this.data.index !== ''){\n this.setData({\n ['currentList[' + this.data.index + '][' + this.data.indexs + '].checked']: false\n })\n }\n let index = e.currentTarget.dataset.index\n let indexs = e.currentTarget.dataset.indexs\n let num = this.data.currentList[0].lengt\n if ((this.data.index != index && this.data.indexs != indexs) || (this.data.index === '' && this.data.indexs === '')){\n this.setData({\n ['currentList[' + index + '][' + indexs + '].checked']: true\n })\n this.data.index = index\n this.data.indexs = indexs\n app.globalData.serviceName = data[index][indexs].name\n app.globalData.serviceAddress = data[index][indexs].address\n app.globalData.serviceId = id\n }else{\n app.globalData.serviceName = ''\n app.globalData.serviceAddress = ''\n app.globalData.serviceId = ''\n this.data.index = ''\n this.data.indexs = ''\n }\n }", "title": "" }, { "docid": "40c03cf6e88f13b1650e3d68b5c61229", "score": "0.63639444", "text": "handleCheckboxT() {\n if(this.state.checkT){\n this.setState({checkT: false});\n return false;\n } else {\n this.setState({checkT: true});\n return true;\n }\n }", "title": "" }, { "docid": "3ea17e81e2f6ee5dc58055237b9aed09", "score": "0.63573664", "text": "changeCheck(evt) {\n let current = evt.target.getAttribute('checked');\n evt.target.setAttribute('checked', !current);\n }", "title": "" }, { "docid": "39f869f4bd9f8f60cd5ae2d6b407d306", "score": "0.6357041", "text": "function checkStateChanged() {\n storageService.set(vm.items);\n }", "title": "" }, { "docid": "951aefbe0e2385c199950815cb8a0193", "score": "0.63471574", "text": "function checar(status){\n $(\"input:checkbox\").prop(\"checked\", status);\n}", "title": "" }, { "docid": "dbf2d09bcc6eb2ef13fc1447e5a115d5", "score": "0.63393533", "text": "checkOnChangedCheckbox(el){\n\n if($(el).is(':checked') ){\n select.selectAll(el);\n }else{\n select.deselectAll(el);\n }\n }", "title": "" }, { "docid": "e214bef0931324f0d0a5fb0618dee568", "score": "0.6336399", "text": "setChecked(checked) {\n this.set('checked', checked);\n ChromeGA.event(ChromeGA.EVENT.TOGGLE, `${this.name}: ${this.checked}`);\n }", "title": "" }, { "docid": "a7ff345331397eab6cd6ea4c1110788c", "score": "0.6331864", "text": "function initIsChecked() {\n\t\t\t$scope.bussinessRequests.forEach(function(bussinessRequest) {\n\t\t\t\tbussinessRequest.isChecked = false;\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "94f032b0e980c4cfaabf7dcac8d0280a", "score": "0.6320584", "text": "function monitorCheckbox(checkbox) {\n\tvar catIndex = categories.findIndex(element => element.id === checkbox.value);\n\tcategories[catIndex].selected = checkbox.checked;\n\tpopulateListProductChoices();\n}", "title": "" }, { "docid": "1ab44d9645b3998b973027d201c251c8", "score": "0.63013345", "text": "function check(e) {\n let checked = e.target.checked\n // Set currnt todo object to checkbox state\n todo.checked = checked\n\n //TODO: use some kind of STORE for better data saving\n // Saves to localStorage \n localStorage.setItem('todos', JSON.stringify(todos))\n // Set checked class to show marked or not\n checkedClass.setValue(checked ? 'item-checked' : '')\n }", "title": "" }, { "docid": "92efd3b64f43a735015780a3fab463cf", "score": "0.62765694", "text": "function noResetListener(checkbox) {\n\tnoReset = checkbox.checked;\n}", "title": "" }, { "docid": "15eaea318e6b4aff621fa48eb2995f42", "score": "0.6273355", "text": "writeValue(value) {\n this.checked = !!value;\n }", "title": "" }, { "docid": "00a494c4484a1d82404fd571637b59d7", "score": "0.625593", "text": "function saveChkBox(ele) {\r\n ele.nextSibling.value = ele.checked;\r\n}", "title": "" }, { "docid": "2b2b767abc7aaca3835e8e9174f3de65", "score": "0.6248514", "text": "setChecklist() {\n\n let checklist = this.accordionEl.querySelectorAll('input[type=checkbox]');\n\n\n checklist.forEach((checkbox, index) => {\n\n checkbox.addEventListener('change', e => {\n\n let checkboxId = checkbox.id;\n\n checkboxId = checkboxId.replace(\"cb-\", \"\");\n\n Object.keys(this.projDt.checklist).forEach(check => {\n\n\n if (check == checkboxId) {\n\n if (checkbox.checked)\n this.projDt.checklist[check] = true;\n\n else\n this.projDt.checklist[check] = false;\n\n }\n\n })\n });\n\n\n\n });\n\n }", "title": "" }, { "docid": "cba056e20aaf3049cfe439e8ebb7c685", "score": "0.6233662", "text": "function desSelected() {\n ansEl.forEach((val) => {\n val.checked = false;\n });\n}", "title": "" }, { "docid": "b57df2efa8a3bc17f1d87021480b63aa", "score": "0.62244445", "text": "function archivedCheckboxUpdate(checkbox)\n{\n\tfilter.archived = checkbox.checked;\n\tpopulateMap();\n}", "title": "" }, { "docid": "2bd9aae72ad1f5734beda33e0c33168d", "score": "0.62238204", "text": "function checkboxSet(id,status){\n $(id).checked=status;\n }", "title": "" }, { "docid": "78ed3820bd2f300edfee8ae9cead10e8", "score": "0.6217532", "text": "updateCheck(objId, objKey) {\n\n let stateCopy = this.state.checked;\n\n for (let i = 0; i < stateCopy.length; i++) {\n if (stateCopy[i].id === objId) {\n\n for (let key in stateCopy[i].checked) {\n if (key === objKey) {\n\n stateCopy[i].checked[key] = !stateCopy[i].checked[key];\n }\n }\n }\n }\n\n this.setState({\n checked: stateCopy,\n });\n\n }", "title": "" }, { "docid": "c69f6a01e0cadc41683824c8d8a4b7ab", "score": "0.62166005", "text": "storeState() {\n this.internal.saveState=this.getElementState();\n }", "title": "" }, { "docid": "869538458031fc559d0830505a2d332f", "score": "0.62163776", "text": "function updateIsR1() {\n currIsR1 = $(\"#isr1_checkbox\").is(\":checked\");\n}", "title": "" }, { "docid": "c0080077c145a80ea4b8a7a87a5cb194", "score": "0.6209492", "text": "isChecked() {\n return this.checkbox_.checked;\n }", "title": "" }, { "docid": "642b7f5cc2f074a308768cdf24cf29e6", "score": "0.62085253", "text": "function setSelected(checked) {\n $(\"input[name='object-selected']\").prop('checked', checked);\n }", "title": "" }, { "docid": "c0ade21e57c173b800d7a62c40b98f64", "score": "0.6204604", "text": "function cambiarEstadoCheck(anodehijo, check)\r\n {\r\n if (anodehijo.data.checked != check)\r\n {\r\n anodehijo.getUI().toggleCheck(check);\r\n anodehijo.data.checked = check;\r\n banderaClick = false;\r\n anodehijo.fireEvent('checkchange', anodehijo, check);\r\n }\r\n }", "title": "" }, { "docid": "74aaf5d68546c3ac3902b4001d32a236", "score": "0.62031263", "text": "function checkboxChanged(checkbox)\n{\n var boxName = checkbox.name;\n controlChanged(checkbox);\n if (checkbox.type == \"checkbox\") {\n checkbox.form.elements[boxName][1].value = (checkbox.checked)? 'true' : 'false';\n }\n}", "title": "" }, { "docid": "b50ed953b00a5b0a167a9290faec5a66", "score": "0.6196532", "text": "function resetCheckboxesOfPreviousStep(){\n\t\t$('input:checkbox:checked').prop('checked', false);\n}", "title": "" }, { "docid": "df39786e749d5f209a887383ac16f7f1", "score": "0.6192229", "text": "function refreshCheckBoxControls(){ \n\n if(todos.length>0)\n {\n show_active.removeAttribute(\"disabled\");\n show_completed.removeAttribute(\"disabled\");\n show_active.setAttribute(\"enabled\",\"enabled\");\n show_completed.setAttribute(\"enabled\",\"enabled\");\n }\n else{\n show_active.setAttribute(\"disabled\",\"disabled\");\n show_completed.setAttribute(\"disabled\",\"disabled\");\n }\n}", "title": "" }, { "docid": "5515db5dbd8f074dc096f41417c7f106", "score": "0.617309", "text": "function updateCheckUncheck() {\n checkedState = !checkedState;\n if (checkedState) {\n browser.contextMenus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"contextMenuItemUncheckMe\"),\n });\n } else {\n browser.contextMenus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"contextMenuItemCheckMe\"),\n });\n }\n}", "title": "" }, { "docid": "0066bbdfb697c27b3ae1132ee3e1ed3e", "score": "0.6169108", "text": "function saveCheckedSetting() {\n\n // Don't run on Firefox\n var status = document.getElementById(\"button_status\");\n if (status === null ) {return};\n\n // reset status\n status.innerHTML = \"\";\n\n var checkedState = document.querySelector(\"#disableBtn\").checked;\n ls.setItem(\"Options:DissableButton\", checkedState);\n\n status.innerHTML = \"Setting Saved.\"; \n}", "title": "" }, { "docid": "05f221b5f54fdc6783da872e6c0b1a90", "score": "0.6160077", "text": "setCheckboxesState() {\n\t\tlet { dataItems } = this.props;\n\n\t\tlet i,\n\t\t\tcheckboxes = [];\n\t\tfor (i = 0; i < dataItems.length; i++) {\n\t\t\tcheckboxes.push(false);\n\t\t}\n\n\t\tthis.setState({ checkboxes });\n\t}", "title": "" }, { "docid": "e7dcf84ca59451eb292873615c454c93", "score": "0.6159618", "text": "function updateCheckUncheck() {\n checkedState = !checkedState;\n if (checkedState) {\n browser.menus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"menuItemUncheckMe\"),\n });\n } else {\n browser.menus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"menuItemCheckMe\"),\n });\n }\n}", "title": "" }, { "docid": "4e6da7d24336cedd37f540476951049c", "score": "0.61590576", "text": "function checkboxChanged(name, allHit)\r\n{\r\n console.log(\"Resetting checkbox \" + name)\r\n if(firstClick)\r\n {\r\n firstClick = false;\r\n resetAllCheckBoxes();\r\n }\r\n \r\n let objChanged = document.getElementById(name);\r\n let lang = name.substring(0, name.indexOf(\"-check\"))\r\n let openChange, displayStyle;\r\n \r\n if(objChanged.checked)\r\n {\r\n for(let id of filterList[lang])\r\n {\r\n projectRowsOpen[id]++;\r\n document.getElementById(id).style.display = \"table-row\";\r\n }\r\n }\r\n else\r\n {\r\n for(let id of filterList[lang])\r\n {\r\n projectRowsOpen[id]--;\r\n if(!projectRowsOpen[id])\r\n {\r\n console.log(\"Turning \" + id + \" off\")\r\n document.getElementById(id).style.display = \"none\"; \r\n }\r\n }\r\n }\r\n\r\n colorProjectsTable();\r\n}", "title": "" }, { "docid": "dad8305b1cd2547a0b1d58f3ce5a2f5d", "score": "0.61579007", "text": "onInputChange(e) {\n\n const target = e.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n this.setState({[target.name]: value});\n\n if (target.dataset.stored) {\n console.log(\"Storing in local storage\", target.name, target.value)\n localStorage.setItem(target.name, target.value);\n }\n }", "title": "" }, { "docid": "3a98e6ae99ee70f1fb8cdfad480f2a10", "score": "0.6157409", "text": "walletResetDlEncrypted(e) {\n e.preventDefault();\n if (e.target.checkbox.checked) {\n this.setState({\n walletResetModal1: false,\n walletResetModalDlUnencrypted: false,\n walletResetModal2unencrypted: false,\n walletResetModalDlEncrypted: true\n })\n }\n }", "title": "" }, { "docid": "4078f9ccd00eb9ce887b004ff5ed994c", "score": "0.6153697", "text": "toggleCheckBox(inst, boxName, e) {\n let stateUpdate = {};\n stateUpdate[boxName] = !inst.state[boxName]\n inst.setState(stateUpdate)\n return null;\n }", "title": "" }, { "docid": "92e9403558542ec7a1d50055b180993c", "score": "0.6146161", "text": "function toggleCheckState(index) {\n TodoObject[index].Checked = !TodoObject[index].Checked;\n drawListToDOM();\n}", "title": "" }, { "docid": "43d56bfbdb6320bcf54b7132f09e403b", "score": "0.61455864", "text": "function storeState() {\n varMun = document.getElementById('toggleMunicipalGarages').checked\n varPri = document.getElementById('togglePrivateGarages').checked\n varSma = document.getElementById('toggleSmartMeters').checked\n varBlu = document.getElementById('toggleBlueTopMeters').checked\n varBro = document.getElementById('toggleBrownTopMeters').checked\n varYel = document.getElementById('toggleYellowTopMeters').checked\n varHan = document.getElementById('toggleHandicap').checked\n varEvc = document.getElementById('toggleEVCharge').checked\n varLoa = document.getElementById('toggleLoadingUnloading').checked\n varMot = document.getElementById('toggleMotorcycle').checked\n varBus = document.getElementById('toggleBusLargeVehicle').checked\n }", "title": "" }, { "docid": "1cd3c1df3b4aa232f1d631809d7d9031", "score": "0.61415976", "text": "writeValue(value) {\n this.checked = !!value;\n }", "title": "" }, { "docid": "44ef5360b36303e4bf36b55ffa58f6ed", "score": "0.6141154", "text": "checkboxHandler(event) {\n if (event.target.checked) {\n this.setState({\n selectedProvince: [\n ...this.state.selectedProvince,\n event.target.value,\n ],\n });\n } else {\n this.setState({\n selectedProvince: this.state.selectedProvince.filter(\n (pref) => pref !== event.target.value\n ),\n });\n }\n }", "title": "" }, { "docid": "4e071003c693c44f6fc8c79eb850c5f5", "score": "0.6136991", "text": "function checkBox_Maniputaltion(e, row) {\r\n const id = e.target.getAttribute(\"data\")\r\n const state = e.target.checked\r\n ArrayData(checkedID, state, id)\r\n setHtmlInputs(row)//inputs filling\r\n }", "title": "" }, { "docid": "1de97b53b66fec333b42d9651f024dff", "score": "0.6134509", "text": "function setOwn() {\n $(\"#ownBike\").prop('checked', true);\n $(\"#hubway\").prop('checked', false);\n ownBike = true;\n\n}", "title": "" }, { "docid": "0981b4ca651d82eab12b07295b91eb3c", "score": "0.6120284", "text": "function checkboxes() {\n console.log(\"checkboxes\");\n if(document.getElementById('checkboxall').checked) {\n chrome.storage.local.get(null, function(storage) {\n for(key in storage) {\n if(isBox(key)) { continue; }\n document.getElementById('checkbox' + key).checked = true;\n }\n });\n }\n\n chrome.storage.local.set({images: document.getElementById('filtercheckbox.images').checked})\n chrome.storage.local.set({music: document.getElementById('filtercheckbox.music').checked})\n chrome.storage.local.set({docs: document.getElementById('filtercheckbox.docs').checked})\n chrome.storage.local.set({arch: document.getElementById('filtercheckbox.arch').checked})\n chrome.storage.local.set({preventDuplication: document.getElementById('filtercheckbox.preventDuplication').checked})\n\n //saveStorage();\n}", "title": "" }, { "docid": "203d578955ec069c6f6b83d96ef75f9b", "score": "0.61193967", "text": "set isCheckedOut(value) {\n return this._isCheckedOut = value;\n }", "title": "" }, { "docid": "b1d541e65f76341a4ec6cbdd6c1d1e98", "score": "0.61087906", "text": "function checkboxLiveVal(){\r\n activityField.addEventListener(\"change\", (e)=>{\r\n checkBoxChecked();\r\n });\r\n}", "title": "" }, { "docid": "e10a6222ac4812d5e88eb2c34dba53b8", "score": "0.6099224", "text": "function stanCheckboxa() {\n zgodaMarketingowa1.checked = this.checked;\n zgodaMarketingowa2.checked = this.checked;\n \n zgodaMarketingowa1.disabled = this.checked;\n zgodaMarketingowa2.disabled = this.checked; \n}", "title": "" }, { "docid": "6c75df8829d8973792aa3b28425d80ee", "score": "0.60957", "text": "handleCheckboxChange() {\n // Toggle the completed state\n this.props.toggleCompleted(this.props.id);\n }", "title": "" }, { "docid": "5d112dd80a853329b294e415de4b3925", "score": "0.6091988", "text": "function setHubway() {\n $(\"#hubway\").prop('checked', true);\n $(\"#ownBike\").prop('checked', false);\n ownBike = false;\n}", "title": "" }, { "docid": "6c408c7844c99f3ee8f98eb10e9be771", "score": "0.6087938", "text": "function setCheckedFlag(hidField){\n\t\t\t\t if(hidField.value == \"N\")\n\t\t\t\t\thidField.value = \"Y\";\n\t\t\t\telse\n\t\t\t\t\thidField.value=\"N\";\n\t\t}", "title": "" }, { "docid": "c052db2de500f96681145d62e8a523ce", "score": "0.6080539", "text": "onCheckboxChanged() {\n const newState = { isCheckboxChecked: !this.state.isCheckboxChecked };\n if (newState.isCheckboxChecked === true) {\n document.body.style.backgroundColor = \"#ffffff\";\n newState.graphTextColor = \"black\";\n Chart.defaults.global.defaultFontColor = newState.graphTextColor;\n } else {\n document.body.style.backgroundColor = \"#282c34\";\n newState.graphTextColor = \"white\";\n Chart.defaults.global.defaultFontColor = newState.graphTextColor;\n }\n this.setState(newState);\n }", "title": "" }, { "docid": "246b45ba28def77c76f182e79f960694", "score": "0.6080065", "text": "function changeUndiscloseCheckboxStatus() {\n let notifyCheckbox = document.getElementById(\"notify-attendees-checkbox\");\n let undiscloseCheckbox = document.getElementById(\"undisclose-attendees-checkbox\");\n undiscloseCheckbox.disabled = !notifyCheckbox.checked;\n updateParentSaveControls();\n}", "title": "" }, { "docid": "2340375175027a3e45bbdc82a2e012fb", "score": "0.60792214", "text": "TickCheckBox(event) {\n var me = event.data['jsObject'];\n $('.main-table tr').removeClass('select');\n $(this).parent().addClass('select');\n $(this).toggleClass('check');//this la o check-box \n $(this).toggleClass('uncheck');\n me.GetInforEditCheckBox();\n me.SetStatusButtonPaging(this);\n me.SetStatusButton();\n }", "title": "" }, { "docid": "2669e388155061d58fccb69c4e076ae4", "score": "0.60783106", "text": "function check_all_page(e) {\n // get the check box state\n var checked = $(\"#check_all\")[0]['checked'];\n \n // check each individual box\n $(\"input[type='checkbox'].batch_document_selector\").each(function(index, value) {\n value['checked'] = checked;\n });\n toggleButtons(); \n \n // set menu check marks\n toggleStateBool($(\"[data-behavior='batch-edit-select-page']\"),checked); \n toggleStateBool($(\"[data-behavior='batch-edit-select-none']\"),!checked); \n \n }", "title": "" }, { "docid": "9ee73fcd06b095bc61120d7d458c9d9b", "score": "0.6074476", "text": "uncheck() {}", "title": "" }, { "docid": "93beb8e25435a1f35a341119b374e502", "score": "0.60736215", "text": "function updateRowCheckState() {\n var visibleRows = scope.rows;\n var numVisibleRows = visibleRows.length;\n var checkedCount = visibleRows.filter(stiTableCtrl.isSelected).length;\n element.prop('checked', numVisibleRows > 0 && numVisibleRows === checkedCount);\n }", "title": "" }, { "docid": "67c1a9c8f122afe6368821a79e3a9526", "score": "0.60674876", "text": "checkState() {\n let newState = this.getState(this.el);\n if (!this.isValueOrObjectEqual(newState, this.oldState)) {\n this.oldState = newState;\n this.callback(newState);\n }\n }", "title": "" }, { "docid": "ff425fa2e01ee352e7d1303d99b5af27", "score": "0.60673463", "text": "todoCheck() {\n document.getElementById('todo-ul').addEventListener('click', checkMark);\n let showTodo = false;\n\n function checkMark(e) {\n if (e.target.classList.contains('label-check')) {\n if (!showTodo) {\n e.target.previousElementSibling.checked = true;\n\n let checkObj;\n\n checkObj = {\n status: true,\n text: e.target.textContent.toLowerCase()\n };\n console.log(e.target.previousElementSibling.checked);\n store.setCheck(checkObj);\n\n e.target.style.textDecoration = 'line-through';\n // e.target.style.textDecorationColor = '#fff';\n e.target.style.color = '#555';\n showTodo = true;\n } else {\n e.target.previousElementSibling.checked = false;\n let checkarray = store.getCheck();\n checkarray.forEach(function(element, index) {\n if (e.target.textContent.toLowerCase() === element.text) {\n checkarray.splice(index, 1);\n // let input = document.querySelectorAll('.left');\n // input.forEach(inp => {\n // if (inp.checked !== element.status) {\n\n // }\n // });\n if (checkarray.length === 1) {\n checkarray.pop();\n }\n console.log(index);\n }\n });\n localStorage.setItem('check', JSON.stringify(checkarray));\n e.target.style.textDecoration = 'none';\n e.target.style.color = '#fff';\n showTodo = false;\n }\n }\n }\n }", "title": "" }, { "docid": "369507b461b778b845e50bd9199c6693", "score": "0.6067088", "text": "writeValue(value) {\n this._state = value === this.value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);\n }", "title": "" }, { "docid": "3d034144f09eb9568ea80ebf70c21d1c", "score": "0.6066506", "text": "handleCheckboxChange(event) {\n const target = event.target;\n const name = target.name;\n const status = target.value;\n\n console.log(event.target.name);\n\n {/* Use a callback function after setState to get checkboxes to work properly --\n setState calls render which causes a delay/loggging issue?? */}\n this.setState({[name]: !this.state[name]}, () => {\n switch(name) {\n case \"mainStoryAuto\":\n if ( this.state.mainStoryAuto === true ) { this.setState({ mainStory: consts.autoMainStory })}\n else { this.setState({ mainStory: '' })}\n break;\n case \"storyTwoAuto\":\n if ( this.state.storyTwoAuto === true ) { this.setState({ storyTwo: consts.autoStoryTwo })}\n else { this.setState({ storyTwo: '' })}\n break;\n case \"allAuto\":\n if ( this.state.allAuto === true ) { this.setState({ \n newspaperName: consts.autoNewspaperName,\n city: consts.autoCity,\n state: consts.autoState,\n mainHeadline: consts.autoHeadline,\n mainSubHeading: consts.autoMainSubHeading,\n headlineTwo: consts.autoHeadlineTwo,\n author: consts.autoAuthor,\n month: consts.autoMonth,\n day: consts.autoDay,\n year: consts.autoYear,\n mainStory: consts.autoMainStory,\n storyTwo: consts.autoStoryTwo,\n imgCaption: consts.autoImgCaption \n })}\n else { this.setState({ \n newspaperName: '',\n city: '',\n state: '',\n mainHeadline: '',\n mainSubHeading: '',\n headlineTwo: '',\n author: '',\n month: '',\n day: '',\n year: '',\n mainStory: '',\n storyTwo: '',\n imgCaption: '' \n })}\n break;\n case \"elseAuto\":\n if ( this.state.elseAuto === true ) {\n (this.state.newspaperName) ? this.setState({newspaperName: this.state.newspaperName}) : this.setState({newspaperName: consts.autoNewspaperName});\n (this.state.city) ? this.setState({city: this.state.city}) : this.setState({city: consts.autoCity});\n (this.state.state) ? this.setState({state: this.state.state}) : this.setState({state: consts.autoState});\n (this.state.mainHeadline) ? this.setState({mainHeadline: this.state.mainHeadline}) : this.setState({mainHeadline: consts.autoHeadline});\n (this.state.mainSubHeading) ? this.setState({mainSubHeading: this.state.mainSubHeading}) : this.setState({mainSubHeading: consts.autoMainSubHeading});\n (this.state.headlineTwo) ? this.setState({headlineTwo: this.state.headlineTwo}) : this.setState({headlineTwo: consts.autoHeadlineTwo});\n (this.state.author) ? this.setState({author: this.state.author}) : this.setState({author: consts.autoAuthor});\n (this.state.month) ? this.setState({month: this.state.month}) : this.setState({month: consts.autoMonth});\n (this.state.day) ? this.setState({day: this.state.day}) : this.setState({day: consts.autoDay});\n (this.state.year) ? this.setState({year: this.state.year}) : this.setState({year: consts.autoYear});\n (this.state.mainStory) ? this.setState({mainStory: this.state.mainStory}) : this.setState({mainStory: consts.autoMainStory});\n (this.state.storyTwo) ? this.setState({storyTwo: this.state.storyTwo}) : this.setState({storyTwo: consts.autoStoryTwo});\n (this.state.imgCaption) ? this.setState({imgCaption: this.state.imgCaption}) : this.setState({imgCaption: consts.autoImgCaption});\n }\n break;\n case \"isVertical\":\n (this.state.isVertical) ? \n this.setState({\n imgH: \"500px\",\n imgW: \"300px\"\n })\n : this.setState({\n imgH: \"300px\",\n imgW: \"500px\"\n })\n break;\n case \"isGrayscale\":\n (this.state.isGrayscale) ? \n this.setState({\n imgFilter: \"grayscale()\"\n })\n : this.setState({\n imgFilter: \"none\"\n })\n break;\n default:\n }\n });\n}", "title": "" }, { "docid": "70094bdb257cd4510d081fe2ff1eec75", "score": "0.6063416", "text": "function SaveSettings()\n{ \n if(tamrielDays.checked)\n {\n mainSettings.tamrielDays = \"checked\";\n }\n else\n {\n mainSettings.tamrielDays = \"unchecked\";\n }\n if(whiteTheme.checked)\n {\n mainSettings.whiteTheme = \"checked\";\n }\n else\n {\n mainSettings.whiteTheme = \"unchecked\";\n }\n if(eng.checked)\n {\n mainSettings.eng = \"checked\";\n }\n else\n {\n mainSettings.eng = \"unchecked\";\n }\n SetMainSettings(mainSettings);\n}", "title": "" }, { "docid": "27771dfdbf9a42171bc4c83a318eb1ec", "score": "0.6061923", "text": "handleCheckBox(e) {\n const newSelection = e.target.value;\n let newSelectionArray;\n\n if (this.state.userInfo.skills.indexOf(newSelection) > -1) {\n newSelectionArray = this.state.userInfo.skills.filter(\n s => s !== newSelection\n );\n } else {\n newSelectionArray = [...this.state.userInfo.skills, newSelection];\n }\n\n this.setState(prevState => ({\n userInfo: { ...prevState.userInfo, skills: newSelectionArray }\n }));\n }", "title": "" }, { "docid": "d185b82ea49ac39443044d2a70cbd193", "score": "0.6044445", "text": "function readCheckboxesState() {\n checkWorldwide = $('#checkboxWorldwide').prop('checked');\n check50remote = $('#checkbox50remote').prop('checked');\n checkUSauth = $('#checkboxUSauth').prop('checked');\n checkEUauth = $('#checkboxEUauth').prop('checked');\n checkUStz = $('#checkboxUStz').prop('checked');\n checkEUtz = $('#checkboxEUtz').prop('checked');\n checkASIAtz = $('#checkboxASIAtz').prop('checked');\n handleTextChangeInFilterButtons();\n}", "title": "" }, { "docid": "9b80f84ceba3ce721ccef1e3a126b98d", "score": "0.6043061", "text": "function linkedinSearchFeature() {\n chrome.storage.sync.get(\"linkedin_search_desactivated\", function(value){\n if (value[\"linkedin_search_desactivated\"] == true) {\n $(\"#linkedin_search_desactivated\").prop(\"checked\", true);\n }\n });\n\n $(\"#linkedin_search_desactivated\").change(function() {\n feature_value = $(this).prop(\"checked\");\n chrome.storage.sync.set({\"linkedin_search_desactivated\": feature_value}, function() { });\n });\n}", "title": "" }, { "docid": "ef398554d8c1103e50fff7b0b3f576af", "score": "0.6012586", "text": "function updateState(trId, check) {\n var data = JSON.parse(localStorage.getItem(trId));\n data.checkState = check;\n localStorage.setItem(trId, JSON.stringify(data));\n}", "title": "" }, { "docid": "7665d61b3f240c632fe969a7ba6031a1", "score": "0.6006796", "text": "showPreviousResultToggle(event){\n //update the value of the input checkbox to save to \n //variable showPreviousResultToggle\n this.showPreviousResults = event.target.checked;\n console.log(this.showPreviousResults);\n\n }", "title": "" }, { "docid": "6406ee577419475dc3d718d08b96cdcf", "score": "0.60035145", "text": "_markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }", "title": "" }, { "docid": "46843fbd56db9a39d5d2885ecb592640", "score": "0.60011375", "text": "function handleCheckBox ( state ) {\n\n\t\t// Can't use this[0] otherwise.\n\t\tif ( this.length ) {\n\n\t\t\tswitch ( state ) {\n\t\t\t\tcase ':checked':\n\t\t\t\t\treturn isChecked(this[0]);\n\t\t\t\tcase ':disabled':\n\t\t\t\t\treturn isDisabled(this[0]);\n\t\t\t\tcase ':indeterminate':\n\t\t\t\t\treturn isIndeterminate(this[0]);\n\t\t\t\tcase ':off':\n\t\t\t\t\treturn isOff(this[0]);\n\t\t\t}\n\t\t}\n\n\t\treturn this.filter(':checkbox').each(function(){\n\n\t\t\tswitch ( state ){\n\n\t\t\t\tcase 'disabled':\n\t\t\t\t\tthis.indeterminate = false;\n\t\t\t\t\tthis.checked = false;\n\t\t\t\t\tthis.disabled = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'off':\n\t\t\t\t\tthis.removeAttribute('disabled');\n\t\t\t\t\tthis.indeterminate = false;\n\t\t\t\t\tthis.checked = false;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'indeterminate':\n\t\t\t\t\tthis.removeAttribute('disabled');\n\t\t\t\t\tthis.checked = checkedState;\n\t\t\t\t\tthis.indeterminate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'checked':\n\t\t\t\t\tthis.removeAttribute('disabled');\n\t\t\t\t\tthis.indeterminate = false;\n\t\t\t\t\tthis.checked = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "06d3d55789c9e4667bdf18bcd465b93e", "score": "0.59969485", "text": "handleChecked(event){\n const tempProduto = this.state.produto\n tempProduto[event.target.name] = event.target.checked;\n this.setState({ produto : tempProduto })\n console.log(this.state);\n }", "title": "" }, { "docid": "213497bdcde70de4fd00cf6e9e9c8974", "score": "0.5995936", "text": "handleCheckboxChange(e) {\n const newForm = { ...this.state.form };\n newForm[e.target.name] = e.target.checked;\n this.setState({ form: newForm });\n }", "title": "" }, { "docid": "b9d3d8abfe2f9783d3f7981b6087bd11", "score": "0.5994733", "text": "checkedChanged(prev, next) {\n if (typeof next === \"boolean\") {\n this.ariaChecked = next ? \"true\" : \"false\";\n return;\n }\n\n this.ariaChecked = null;\n }", "title": "" }, { "docid": "d829ea2404df7588ee8b3c6f84bcb020", "score": "0.5989605", "text": "function storeData ( checkbox, name ) {\n if ( checkbox.checked === true ) {\n localStorage.setItem( name, checkbox.value);\n } else {\n localStorage.removeItem( name );\n }\n}", "title": "" }, { "docid": "3e5f5ee3f5b1efafe3041ea9208c6a79", "score": "0.5986023", "text": "function checkedState() {\n\tif (document.getElementById(\"idWISPs\").checked) {\n\t\tloadGroundOverlays();\n\t}\n\telse {\n\t\tclearOverlays();\n\t}\n}", "title": "" }, { "docid": "a5c9c8033c3deaefecd0924e6e247f7f", "score": "0.598532", "text": "function CheckBox_getCheckedState()\r\n{\r\n var retValue; \r\n \r\n if (this.checkBox.getAttribute(\"checked\"))\r\n {\r\n retValue = true;\r\n }\r\n else \r\n {\r\n retValue = false;\r\n } \r\n \r\n return retValue; \r\n}", "title": "" }, { "docid": "d0544f2592fdb5b5ffd23904218f6839", "score": "0.59737974", "text": "handleMarkUnmarkAll(event){\n this.setState({checkbox:!this.state.checkbox}, ()=>{this.handleSetResetAll()})\n }", "title": "" }, { "docid": "f64890dc7cf871318c6174a56cdef78e", "score": "0.5972128", "text": "toggleCheckbox(option) {\n const newSelectedOptions = { ...this.state.selectedOptions };\n\n if (option in this.state.selectedOptions) {\n delete newSelectedOptions[option];\n } else {\n newSelectedOptions[option] = 1;\n }\n\n this.setState({\n selectedOptions: newSelectedOptions,\n });\n }", "title": "" }, { "docid": "afd6d6b2779a43751bd2d35b92105930", "score": "0.5970599", "text": "handleCheckChange(event) {\n\t\tthis.setState({\n\t\t\tchecked: !this.state.checked\n\t\t});\n\t}", "title": "" }, { "docid": "c69b490ab3aa9e58a652588c1084c967", "score": "0.5970389", "text": "function initIsChecked() {\n\t\t\t$scope.posts.forEach(function(post) {\n\t\t\t\tpost.isChecked = false;\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "45f55e34d7e50898b2b302a639f86d78", "score": "0.5964859", "text": "function CheckBox_inspectServerBehavior(sbObj) \r\n{\r\n var retVal = \"\";\r\n \r\n var checkBoxState = sbObj.parameters[this.paramName];\r\n \r\n if (checkBoxState == this.checkBox.value || checkBoxState == true || \r\n checkBoxState == \"true\" || checkBoxState == 1)\r\n {\r\n this.checkBox.setAttribute(\"checked\",\"true\");\r\n }\r\n else\r\n {\r\n this.checkBox.removeAttribute(\"checked\");\r\n }\r\n \r\n return retVal;\r\n}", "title": "" }, { "docid": "2fef9e4ef779141f8dd1173879fa0249", "score": "0.5964731", "text": "function toggleCb(checkbox) {\n var name = checkbox.getAttribute('name');\n var elems = _rsplit(name, '_', 3);\n // Get the DOM node corresponding to the Ref field.\n var node = document.getElementById(elems[0] + '_' + elems[1]);\n // Get the array that stores checkbox statuses.\n var statuses = node['_appy_' + elems[2] + '_cbs'];\n // Get the array semantics\n var semantics = node['_appy_' + elems[2] + '_sem'];\n var uid = checkbox.value;\n if (semantics == 'unchecked') {\n if (!checkbox.checked) statuses[uid] = null;\n else {if (uid in statuses) delete statuses[uid]};\n }\n else { // semantics is 'checked'\n if (checkbox.checked) statuses[uid] = null;\n else {if (uid in statuses) delete statuses[uid]};\n }\n}", "title": "" }, { "docid": "86c90b3eadcadfd9f5d62339f51b13f1", "score": "0.59647167", "text": "function _updateSelectAllCheckboxState() {\n var $cbSelectAllInheritance = $('#cbSelectAllInheritance');\n if (!$cbSelectAllInheritance.data('isUpdatingSections')) {\n var $uncheckedBoxes = $('.divInheritSection input[type=checkbox]').not(\":checked\");\n $cbSelectAllInheritance.prop('checked', $uncheckedBoxes.length === 0);\n }\n }", "title": "" }, { "docid": "86c90b3eadcadfd9f5d62339f51b13f1", "score": "0.59647167", "text": "function _updateSelectAllCheckboxState() {\n var $cbSelectAllInheritance = $('#cbSelectAllInheritance');\n if (!$cbSelectAllInheritance.data('isUpdatingSections')) {\n var $uncheckedBoxes = $('.divInheritSection input[type=checkbox]').not(\":checked\");\n $cbSelectAllInheritance.prop('checked', $uncheckedBoxes.length === 0);\n }\n }", "title": "" }, { "docid": "3f3068084641eb1a2c1e31302139b4c8", "score": "0.59638935", "text": "function radioCheckboxState(func){\n var elemID = $(this).attr('id');\n if($(this).hasClass('checkbox')){\n if(allObjects[elemID].checked === true){\n $(this).removeClass('checked'); \n allObjects[elemID].checked = false;\n }else{ \n $(this).addClass('checked');\n allObjects[elemID].checked = true;\n }\n }else{ \n if(allObjects[elemID].checked !== true){\n var nameGroup = allObjects[elemID].name;\n $(this).addClass('checked');\n allObjects[elemID].checked = true;\n $('[name=\"'+nameGroup+'\"].checked').each(function(){\n var inputID = $(this).attr('id');\n\t\t\t\tif(inputID !== elemID){\n\t\t\t\t\tallObjects[inputID].checked = false;\n\t\t\t\t\t$(this).removeClass('checked'); \n\t\t\t\t}\n });\n } \n }\n\tfunc.apply(this, []);\n}", "title": "" } ]
1aba169bc12df698769ff523db3d9e5b
Render out our expression tree to latex
[ { "docid": "35f0b780fb33f9320b11c858cd8d80a5", "score": "0.698913", "text": "function renderAsLatex(tree, showTypes = false){\n var thisBit = \"\"\n if(Array.isArray(tree)){\n tree.forEach(x => {\n if(Array.isArray(x)){\n thisBit += renderAsLatex({paren: x},showTypes)\n }else{\n thisBit += renderAsLatex(x,showTypes)\n }\n })\n }\n else if(tree.paren){\n thisBit = \"\\\\left(\" + renderAsLatex(tree.paren,showTypes) + \"\\\\right)\"\n }\n else if(tree.ord){\n thisBit = \"{\" + renderAsLatex(tree.ord,showTypes) + \"}\"\n }\n else if(tree.objectName){\n const renderer = objectRenderers.find(x => x.objectName == tree.objectName).render\n thisBit = renderAsLatex(renderer(tree.data),showTypes)\n }\n else if(tree.binop){\n thisBit = renderAsLatex(tree.left,showTypes) + renderAsLatex(tree.binop,showTypes) + renderAsLatex(tree.right,showTypes)\n }\n else if(tree.operator){\n thisBit = renderAsLatex(tree.operator,showTypes) + \"\\\\left[ \" + renderAsLatex(tree.argument,showTypes) + \" \\\\right] \"\n }\n else if(tree.numer){\n thisBit = \"\\\\frac\" + renderAsLatex(tree.numer,showTypes) + renderAsLatex(tree.denom,showTypes)\n }\n else if(tree.base){\n thisBit = renderAsLatex(tree.base,showTypes)\n if(tree.sub){\n thisBit += \"_\" + renderAsLatex(tree.sub,showTypes)\n }\n if(tree.sup){\n thisBit += \"^\" + renderAsLatex(tree.sup,showTypes)\n }\n }\n else if(tree.textContent){\n thisBit = tree.textContent + \" \"\n }\n if(tree.value){\n thisBit = \"\\\\textcolor{blue}{\" + thisBit + \"}\"\n }\n if(showTypes && tree.typing){\n thisBit = \"{\\\\left\\\\langle \" + thisBit + \" \\\\colon \" + renderAsLatex(tree.typing,showTypes) + \"\\\\right\\\\rangle} \"\n }\n return thisBit\n}", "title": "" } ]
[ { "docid": "22550672f4e2dee05b5e4f9184a32a64", "score": "0.75358814", "text": "function renderExpr(expr){\n const renderOut = document.getElementById(\"renderOutput\")\n const newRenderSpot = document.createElement(\"div\")\n renderOut.appendChild(newRenderSpot)\n console.log(expr)\n console.log(renderAsLatex(expr))\n katex.render(renderAsLatex(expr),newRenderSpot,{displayMode: true})\n}", "title": "" }, { "docid": "ed1a760f46662ad6158cc6bdafe69cce", "score": "0.6729466", "text": "function buildHTML(tree,options){// buildExpression is destructive, so we need to make a clone\n// of the incoming tree so that it isn't accidentally changed\ntree=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(tree));// Build the expression contained in the tree\nvar expression=buildExpression(tree,options,true);var body=makeSpan([\"base\"],expression,options);// Add struts, which ensure that the top of the HTML element falls at the\n// height of the expression, and the bottom of the HTML element falls at the\n// depth of the expression.\nvar topStrut=makeSpan([\"strut\"]);var bottomStrut=makeSpan([\"strut\",\"bottom\"]);topStrut.style.height=body.height+\"em\";bottomStrut.style.height=body.height+body.depth+\"em\";// We'd like to use `vertical-align: top` but in IE 9 this lowers the\n// baseline of the box to the bottom of this strut (instead staying in the\n// normal place) so we use an absolute value for vertical-align instead\nbottomStrut.style.verticalAlign=-body.depth+\"em\";// Wrap the struts and body together\nvar htmlNode=makeSpan([\"katex-html\"],[topStrut,bottomStrut,body]);htmlNode.setAttribute(\"aria-hidden\",\"true\");return htmlNode;}", "title": "" }, { "docid": "63373efe129225900537f8f83d709810", "score": "0.63958806", "text": "function rerender() {\n var root_poly = $(\"#math .base\");\n\n tree = new TreeModel();\n\n math_root = tree.parse({});\n math_root.model.id = \"0\";\n //KaTeX offers MathML semantic elements on the HTML, could that be used?\n\n parse_poly(math_root, root_poly, 0, true);\n\n var newmath = parse_mtstr(math_root, [], []);\n\n prepare(newmath);\n }", "title": "" }, { "docid": "9e062d4d8c22d2bdee74ecb0dd2bac7f", "score": "0.6364347", "text": "function buildHTML(tree, options) {\n // buildExpression is destructive, so we need to make a clone\n // of the incoming tree so that it isn't accidentally changed\n tree = JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(tree));\n\n // Build the expression contained in the tree\n var expression = buildExpression(tree, options, true);\n var body = makeSpan([\"base\"], expression, options);\n\n // Add struts, which ensure that the top of the HTML element falls at the\n // height of the expression, and the bottom of the HTML element falls at the\n // depth of the expression.\n var topStrut = makeSpan([\"strut\"]);\n var bottomStrut = makeSpan([\"strut\", \"bottom\"]);\n\n topStrut.style.height = body.height + \"em\";\n bottomStrut.style.height = body.height + body.depth + \"em\";\n // We'd like to use `vertical-align: top` but in IE 9 this lowers the\n // baseline of the box to the bottom of this strut (instead staying in the\n // normal place) so we use an absolute value for vertical-align instead\n bottomStrut.style.verticalAlign = -body.depth + \"em\";\n\n // Wrap the struts and body together\n var htmlNode = makeSpan([\"katex-html\"], [topStrut, bottomStrut, body]);\n\n htmlNode.setAttribute(\"aria-hidden\", \"true\");\n\n return htmlNode;\n}", "title": "" }, { "docid": "9e062d4d8c22d2bdee74ecb0dd2bac7f", "score": "0.6364347", "text": "function buildHTML(tree, options) {\n // buildExpression is destructive, so we need to make a clone\n // of the incoming tree so that it isn't accidentally changed\n tree = JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(tree));\n\n // Build the expression contained in the tree\n var expression = buildExpression(tree, options, true);\n var body = makeSpan([\"base\"], expression, options);\n\n // Add struts, which ensure that the top of the HTML element falls at the\n // height of the expression, and the bottom of the HTML element falls at the\n // depth of the expression.\n var topStrut = makeSpan([\"strut\"]);\n var bottomStrut = makeSpan([\"strut\", \"bottom\"]);\n\n topStrut.style.height = body.height + \"em\";\n bottomStrut.style.height = body.height + body.depth + \"em\";\n // We'd like to use `vertical-align: top` but in IE 9 this lowers the\n // baseline of the box to the bottom of this strut (instead staying in the\n // normal place) so we use an absolute value for vertical-align instead\n bottomStrut.style.verticalAlign = -body.depth + \"em\";\n\n // Wrap the struts and body together\n var htmlNode = makeSpan([\"katex-html\"], [topStrut, bottomStrut, body]);\n\n htmlNode.setAttribute(\"aria-hidden\", \"true\");\n\n return htmlNode;\n}", "title": "" }, { "docid": "9e062d4d8c22d2bdee74ecb0dd2bac7f", "score": "0.6364347", "text": "function buildHTML(tree, options) {\n // buildExpression is destructive, so we need to make a clone\n // of the incoming tree so that it isn't accidentally changed\n tree = JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(tree));\n\n // Build the expression contained in the tree\n var expression = buildExpression(tree, options, true);\n var body = makeSpan([\"base\"], expression, options);\n\n // Add struts, which ensure that the top of the HTML element falls at the\n // height of the expression, and the bottom of the HTML element falls at the\n // depth of the expression.\n var topStrut = makeSpan([\"strut\"]);\n var bottomStrut = makeSpan([\"strut\", \"bottom\"]);\n\n topStrut.style.height = body.height + \"em\";\n bottomStrut.style.height = body.height + body.depth + \"em\";\n // We'd like to use `vertical-align: top` but in IE 9 this lowers the\n // baseline of the box to the bottom of this strut (instead staying in the\n // normal place) so we use an absolute value for vertical-align instead\n bottomStrut.style.verticalAlign = -body.depth + \"em\";\n\n // Wrap the struts and body together\n var htmlNode = makeSpan([\"katex-html\"], [topStrut, bottomStrut, body]);\n\n htmlNode.setAttribute(\"aria-hidden\", \"true\");\n\n return htmlNode;\n}", "title": "" }, { "docid": "87059db4cec2cfeae80d2efaedc4e5f9", "score": "0.61887807", "text": "function buildHTML(tree, options) {\n // Strip off outer tag wrapper for processing below.\n var tag = null\n\n if (tree.length === 1 && tree[0].type === 'tag') {\n tag = tree[0].tag\n tree = tree[0].body\n } // Build the expression contained in the tree\n\n var expression = buildHTML_buildExpression(tree, options, 'root')\n var children = [] // Create one base node for each chunk between potential line breaks.\n // The TeXBook [p.173] says \"A formula will be broken only after a\n // relation symbol like $=$ or $<$ or $\\rightarrow$, or after a binary\n // operation symbol like $+$ or $-$ or $\\times$, where the relation or\n // binary operation is on the ``outer level'' of the formula (i.e., not\n // enclosed in {...} and not part of an \\over construction).\"\n\n var parts = []\n\n for (var i = 0; i < expression.length; i++) {\n parts.push(expression[i])\n\n if (\n expression[i].hasClass('mbin') ||\n expression[i].hasClass('mrel') ||\n expression[i].hasClass('allowbreak')\n ) {\n // Put any post-operator glue on same line as operator.\n // Watch for \\nobreak along the way, and stop at \\newline.\n var nobreak = false\n\n while (\n i < expression.length - 1 &&\n expression[i + 1].hasClass('mspace') &&\n !expression[i + 1].hasClass('newline')\n ) {\n i++\n parts.push(expression[i])\n\n if (expression[i].hasClass('nobreak')) {\n nobreak = true\n }\n } // Don't allow break if \\nobreak among the post-operator glue.\n\n if (!nobreak) {\n children.push(buildHTMLUnbreakable(parts, options))\n parts = []\n }\n } else if (expression[i].hasClass('newline')) {\n // Write the line except the newline\n parts.pop()\n\n if (parts.length > 0) {\n children.push(buildHTMLUnbreakable(parts, options))\n parts = []\n } // Put the newline at the top level\n\n children.push(expression[i])\n }\n }\n\n if (parts.length > 0) {\n children.push(buildHTMLUnbreakable(parts, options))\n } // Now, if there was a tag, build it too and append it as a final child.\n\n var tagChild\n\n if (tag) {\n tagChild = buildHTMLUnbreakable(buildHTML_buildExpression(tag, options, true))\n tagChild.classes = ['tag']\n children.push(tagChild)\n }\n\n var htmlNode = buildHTML_makeSpan(['katex-html'], children)\n htmlNode.setAttribute('aria-hidden', 'true') // Adjust the strut of the tag to be the maximum height of all children\n // (the height of the enclosing htmlNode) for proper vertical alignment.\n\n if (tagChild) {\n var strut = tagChild.children[0]\n strut.style.height = htmlNode.height + htmlNode.depth + 'em'\n strut.style.verticalAlign = -htmlNode.depth + 'em'\n }\n\n return htmlNode\n }", "title": "" }, { "docid": "229bc1ee000132dec1bccb9e0f3a250a", "score": "0.6138086", "text": "function displayEquation() {\r\n var htmlString = \"\";\r\n for(var i = 0; i < tokenList.length; i++) {\r\n if(isNaN(tokenList[i])) {\r\n if(tokenList[i] === \"bracket-left\") {\r\n htmlString += \" (\";\r\n } else if(tokenList[i] === \"bracket-right\") {\r\n htmlString += \") \";\r\n } else if(tokenList[i] === \"num-pi\") {\r\n htmlString += \" π \";\r\n } else {\r\n htmlString += getOperator(tokenList[i]).symbol;\r\n }\r\n } else {\r\n htmlString += tokenList[i];\r\n }\r\n }\r\n $(\"#expression\").html(htmlString);\r\n }", "title": "" }, { "docid": "2cd56c7b83e197e4c687738b095134f2", "score": "0.61290866", "text": "renderMath() {\n if (window.MathJax) {\n window.MathJax.Hub.Queue([\n \"Typeset\",\n window.MathJax.Hub,\n this.node.current\n ]);\n }\n }", "title": "" }, { "docid": "f789d4ad4fc8dd5798ee01ccb72231de", "score": "0.6048128", "text": "function eval_expression(expression) {\n var new_term;\n expression = latex_to_ascii(expression) //doesn't work with some expressions, as usual\n if (expression.search(/[a-z\\(\\)]/) > -1) {\n var new_str = Algebrite.simplify(expression).toString();\n new_term = ascii_to_latex(new_str);\n // try {\n // new_term = CQ(expression).simplify().toLaTeX().replace(\"\\\\cdot\", \"\"); //removing cdot format\n // }\n // catch(err) {\n // console.log(\"Error (from CQ): \" + err);\n // console.log(\"Expression is : \" + expression);\n // new_term = CQ(expression).simplify().toString().replace(/\\*{2}(\\d+)/, \"^{$1}\").replace(/\\*/g, \"\")\n // .replace(/([a-z0-9]+)\\/([a-z0-9]+)/, \"\\\\frac{$1}{$2}\");\n // }\n // finally {\n // }\n\n } else {\n new_term = math.eval(expression).toString();\n }\n return new_term;\n}", "title": "" }, { "docid": "4af536de3f063f1c3872d175b66cac2c", "score": "0.59303904", "text": "function render(toRender, renderOptions) {\n renderOptions = setupOptions(renderOptions);\n var mathRegexp = renderOptions.mathRegexp;\n var katexOptions = __assign(__assign({}, Defaults.katexOptions), renderOptions.katexOptions);\n if (typeof toRender !== 'string')\n return '';\n var options = function (isDisplay) {\n return __assign(__assign({}, katexOptions), { displayMode: isDisplay });\n };\n mathRegexp.display.forEach(function (regexp) {\n toRender = toRender.replace(regexp, function (match, math) { return katex_1.renderToString(math, options(true)); });\n });\n mathRegexp.inline.forEach(function (regexp) {\n toRender = toRender.replace(regexp, function (match, math) { return katex_1.renderToString(math, options(false)); });\n });\n return toRender;\n}", "title": "" }, { "docid": "9e84b1ef02a9f66f021a6050b17cf189", "score": "0.5899668", "text": "renderFunc(expression){\n initializeGraph.setExpression({ id: 'oneAndOnlyGraph', latex: expression, color: \"#00FFFF\"});\n }", "title": "" }, { "docid": "31e2b3e02a898d857e471cbd878e7219", "score": "0.583425", "text": "function render(tree)\r\n{\r\n s = \"\";\r\n\r\n if (tree == null || tree.type == \"unkn\")\r\n return \"\";\r\n\r\n // Innovative head-recursion.\r\n if (tree.type == \"tag\")\r\n {\r\n s += bb(tree.c)[0]; // Opening html tag.\r\n s += render(tree.child); // Down.\r\n s += bb(tree.c)[1]; // Closing html tag.\r\n s += render(tree.next); // Forward.\r\n }\r\n else if (tree.type == \"text\")\r\n s += ( tree.c + render(tree.next) );\r\n return s;\r\n}", "title": "" }, { "docid": "0e25a8582cf9c4f5ee7890c148ae74ba", "score": "0.5812148", "text": "function displayReact(equation, displayproducts) {\n output.style.color = \"black\";\n \n let display = \"H<sub>3</sub>O<sup>+</sup><sub>(aq)</sub>\";\n display = \"\";\n \n const formText = (set) => {\n for (let n in set[0]) {\n //Formula\n let string = set[0][n].formula.split(\"\");\n for (let c in string) {\n if (parseInt(string[c]).toString() != \"NaN\") {\n string[c] = \"<sub>\" + string[c] + \"</sub>\";\n }\n }\n\n string = string.join(\"\");\n\n //Ion\n let tempion = Math.abs(set[0][n].ion);\n if (tempion == 1) {\n tempion = \"\";\n }\n\n if (set[0][n].ion < 0) {\n string += \"<sup> -\" + tempion + \"</sup>\";\n\n } else if (set[0][n].ion > 0) {\n string += \"<sup> +\" + tempion + \"</sup>\";\n }\n else {\n string += \" \"\n }\n\n //State\n let state = \"\";\n if (set[4][n] == null) {\n state = equation.getState(set[0][n], true);\n set[4][n] = state;\n } else {\n state = set[4][n];\n }\n\n string += \"<sub>(\" + state + \")</sub> \";\n\n //Mole Ratio\n let ratio = \"\";\n if (set[1][n] > 1) {\n ratio = set[1][n];\n }\n\n display += ratio + string + \"+ \";\n }\n }\n //Forms the reactants part of the output\n formText(equation.reactants);\n\n //Remove the + sign at the end of the display string\n display = display.split(\"\"); display.pop(); display.pop(); display = display.join(\"\");\n\n //Display the products -- Requires Unicode charachters\n if (displayproducts){\n if (!equation.isDynamic) {\n display += \"&#8594 \";\n } else {\n display += \"&#8652 \";\n }\n formText(equation.products);\n display = display.split(\"\"); display.pop(); display.pop(); display = display.join(\"\");\n }\n\n return display;\n}", "title": "" }, { "docid": "4e212e0316d0e926f784876f1f222db5", "score": "0.5800172", "text": "function buildMathML(tree,texExpression,options){var expression=buildExpression(tree,options);// Wrap up the expression in an mrow so it is presented in the semantics\n// tag correctly.\nvar wrapper=new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\"/* default */].MathNode(\"mrow\",expression);// Build a TeX annotation of the source\nvar annotation=new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\"/* default */].MathNode(\"annotation\",[new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\"/* default */].TextNode(texExpression)]);annotation.setAttribute(\"encoding\",\"application/x-tex\");var semantics=new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\"/* default */].MathNode(\"semantics\",[wrapper,annotation]);var math=new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\"/* default */].MathNode(\"math\",[semantics]);// You can't style <math> nodes, so we wrap the node in a span.\nreturn __WEBPACK_IMPORTED_MODULE_0__buildCommon__[\"a\"/* default */].makeSpan([\"katex-mathml\"],[math]);}", "title": "" }, { "docid": "74c4e63344b35ced897e32ae0f3bcbfe", "score": "0.5773184", "text": "render()\n {\n //the result to return\n var res;\n \n //if denominator is 1\n if(this.denominator == 1)\n {\n res = this.numerator;\n }\n else\n {\n res = \"<sup>\" + this.numerator + \"</sup>&frasl;<sub>\" + this.denominator + \"</sub>\";\n }\n \n //use small font if number is too long\n if(Math.abs(this.denominator) >= 1000 || Math.abs(this.numerator) >= 1000)\n {\n res = \"<div class='MatrixEntrySmallFont'>\" + res + \"</div>\";\n }\n \n return res;\n }", "title": "" }, { "docid": "57212e4b2aef1e3eef6bc2b6b6336b2f", "score": "0.57388556", "text": "function prepare(math) {\n\n\n math = math.replace(/\\\\frac{}/g, \"\\\\frac{1}\")\n // .replace(/ /g, \"\") some operators require the space, for exampl a \\cdot b\n .replace(/\\(\\+/g, \"(\")\n .replace(/^\\+/, \"\")\n .replace(/=$/, \"=0\")\n .replace(/=+/, \"=\")\n .replace(/0\\+/g, \"\")\n .replace(/0-/g, \"-\")\n .replace(/^=/, \"0=\")\n .replace(/\\^{}/g, \"\")\n .replace(/\\+/g, '--').replace(/(--)+-/g, '-').replace(/--/g, '+');\n\n var math_el = document.getElementById(\"math\");\n katex.render(math, math_el, { displayMode: true });\n math_str_el.val(math);\n mathquill.latex(math);\n\n var root_poly = $(\"#math .base\");\n\n tree = new TreeModel();\n\n math_root = tree.parse({});\n math_root.model.id = \"0\";\n //KaTeX offers MathML semantic elements on the HTML, could that be used?\n\n parse_poly(math_root, root_poly, 0, true);\n\n math_root.walk(function (node) {\n if (node.type2 === \"frac\" && node.children[1].text === \"\") {prepare(replace_in_mtstr(node, node.children[0].text));}\n });\n\n if (!playing) {\n if (current_index < math_str.length) {\n remove_from_history(current_index);\n math_str[current_index] = math;\n add_to_history(current_index, current_index-1);\n } else {\n current_index = math_str.push(math)-1;\n add_to_history(current_index, current_index-1);\n }\n }\n\n active_in_history(current_index);\n\n if (recording) {\n var ids = [];\n for (var i=0; i<selected_nodes.length; i++) {\n ids.push(selected_nodes[i].model.id);\n }\n selected_nodes_id_rec.push(ids);\n math_str_rec.push(math);\n }\n\n create_events(manip, depth);\n\n //repositioning equals so that it's always in the same place. put in fixed value.\n $equals = $(\"#math .base\").find(\".mrel\");\n if ($equals.length !== 0) {\n new_equals_position = $equals.offset();\n if (equals_position.left !== 0) {h_eq_shift += equals_position.left-new_equals_position.left;}\n if (equals_position.top !== 0) {v_eq_shift += equals_position.top-new_equals_position.top;}\n math_el.setAttribute(\"style\", \"left:\"+h_eq_shift.toString()+\"px;\"+\"top:\"+v_eq_shift.toString()+\"px;\");\n equals_position = $equals.offset();\n }\n //useful variables\n beginning_of_equation = math_root.children[0].model.obj.offset();\n width_last_term = tot_width(math_root.children[math_root.children.length-1].model.obj, true, true);\n end_of_equation = math_root.children[math_root.children.length-1].model.obj.offset();\n end_of_equation.left += width_last_term;\n}", "title": "" }, { "docid": "520446538533830fe6246d1a5520ba97", "score": "0.57331914", "text": "function renderMath(math) {\n // TODO: definitely add error handling.\n return katex.renderToString(math, {\n macros: { '\\\\f': '#1f(#2)' },\n });\n}", "title": "" }, { "docid": "5c79df0e4f8862360913231b147b1eab", "score": "0.57091993", "text": "function treeToHtml(tree) {\n // only leafs containing category\n if (tree.category) {\n return ['<ul>',\n '<li>',\n '<a href=\"#\">',\n '<b>', tree.category, '</b>',\n '</a>',\n '</li>',\n '</ul>'].join('');\n }\n \n return ['<ul>',\n '<li>',\n '<a href=\"#\">',\n '<b>', tree.attribute, ' ', tree.predicateName, ' ', tree.pivot, ' ?</b>',\n '</a>',\n '<ul>',\n '<li>',\n '<a href=\"#\">sim</a>',\n treeToHtml(tree.match),\n '</li>',\n '<li>', \n '<a href=\"#\">não</a>',\n treeToHtml(tree.notMatch),\n '</li>',\n '</ul>',\n '</li>',\n '</ul>'].join('');\n }", "title": "" }, { "docid": "8ce409be4c1b145992113a23555743e4", "score": "0.567618", "text": "function printLatex(node, showPlusMinus=false) {\n let nodeTex = node.toTex({implicit: 'hide'});\n\n if (!showPlusMinus) {\n // Replaces '+ -' with '-'\n nodeTex = nodeTex.replace(/\\s*?\\+\\s*?\\-\\s*?/g, ' - ');\n }\n\n return nodeTex;\n}", "title": "" }, { "docid": "fd0f8d495d608599824a8af23af58077", "score": "0.5653967", "text": "function treeToHtml(tree) {\n if (!tree) {\n return;\n }\n\n if (tree.category) {\n return ['<ul>',\n '<li>',\n '<a href=\"#\" style=\"background-color:', tree.category, '\">', EMPTY_STRING, '</a>',\n '</li>',\n '</ul>'].join('');\n }\n\n return ['<ul>',\n '<li>',\n '<a href=\"#\"><b>', tree.attribute, ' ', tree.predicateName, ' ', tree.pivot, ' ?</b></a>',\n '<ul>',\n '<li>',\n '<a href=\"#\">yes (', tree.matchedCount, ' points) </a>',\n treeToHtml(tree.match),\n '</li>',\n '<li>',\n '<a href=\"#\">no (', tree.notMatchedCount, ' points) </a>',\n treeToHtml(tree.notMatch),\n '</li>',\n '</ul>',\n '</li>',\n '</ul>'].join('');\n }", "title": "" }, { "docid": "4112a42b48891378b10ffcd41abafe0f", "score": "0.5647905", "text": "function buildMathML(tree, texExpression, options) {\n var expression = buildExpression(tree, options);\n\n // Wrap up the expression in an mrow so it is presented in the semantics\n // tag correctly.\n var wrapper = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"mrow\", expression);\n\n // Build a TeX annotation of the source\n var annotation = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"annotation\", [new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].TextNode(texExpression)]);\n\n annotation.setAttribute(\"encoding\", \"application/x-tex\");\n\n var semantics = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"semantics\", [wrapper, annotation]);\n\n var math = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"math\", [semantics]);\n\n // You can't style <math> nodes, so we wrap the node in a span.\n return __WEBPACK_IMPORTED_MODULE_0__buildCommon__[\"a\" /* default */].makeSpan([\"katex-mathml\"], [math]);\n}", "title": "" }, { "docid": "4112a42b48891378b10ffcd41abafe0f", "score": "0.5647905", "text": "function buildMathML(tree, texExpression, options) {\n var expression = buildExpression(tree, options);\n\n // Wrap up the expression in an mrow so it is presented in the semantics\n // tag correctly.\n var wrapper = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"mrow\", expression);\n\n // Build a TeX annotation of the source\n var annotation = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"annotation\", [new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].TextNode(texExpression)]);\n\n annotation.setAttribute(\"encoding\", \"application/x-tex\");\n\n var semantics = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"semantics\", [wrapper, annotation]);\n\n var math = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"math\", [semantics]);\n\n // You can't style <math> nodes, so we wrap the node in a span.\n return __WEBPACK_IMPORTED_MODULE_0__buildCommon__[\"a\" /* default */].makeSpan([\"katex-mathml\"], [math]);\n}", "title": "" }, { "docid": "4112a42b48891378b10ffcd41abafe0f", "score": "0.5647905", "text": "function buildMathML(tree, texExpression, options) {\n var expression = buildExpression(tree, options);\n\n // Wrap up the expression in an mrow so it is presented in the semantics\n // tag correctly.\n var wrapper = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"mrow\", expression);\n\n // Build a TeX annotation of the source\n var annotation = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"annotation\", [new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].TextNode(texExpression)]);\n\n annotation.setAttribute(\"encoding\", \"application/x-tex\");\n\n var semantics = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"semantics\", [wrapper, annotation]);\n\n var math = new __WEBPACK_IMPORTED_MODULE_2__mathMLTree__[\"a\" /* default */].MathNode(\"math\", [semantics]);\n\n // You can't style <math> nodes, so we wrap the node in a span.\n return __WEBPACK_IMPORTED_MODULE_0__buildCommon__[\"a\" /* default */].makeSpan([\"katex-mathml\"], [math]);\n}", "title": "" }, { "docid": "2b28a71ad1b16bb1942e78a77c177533", "score": "0.5587091", "text": "function render() {\n\n // render the nodes\n renderNodes();\n\n // render links\n renderLinks();\n\n // render the reveal arrow\n renderReveal();\n }", "title": "" }, { "docid": "44b036f10b4775e5a0e6b69382ffb1b1", "score": "0.5579038", "text": "function buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) {\n var expression = buildMathML_buildExpression(tree, options) // Wrap up the expression in an mrow so it is presented in the semantics\n // tag correctly, unless it's a single <mrow> or <mtable>.\n\n var wrapper\n\n if (\n expression.length === 1 &&\n expression[0] instanceof mathMLTree_MathNode &&\n utils.contains(['mrow', 'mtable'], expression[0].type)\n ) {\n wrapper = expression[0]\n } else {\n wrapper = new mathMLTree.MathNode('mrow', expression)\n } // Build a TeX annotation of the source\n\n var annotation = new mathMLTree.MathNode('annotation', [\n new mathMLTree.TextNode(texExpression),\n ])\n annotation.setAttribute('encoding', 'application/x-tex')\n var semantics = new mathMLTree.MathNode('semantics', [wrapper, annotation])\n var math = new mathMLTree.MathNode('math', [semantics])\n math.setAttribute('xmlns', 'http://www.w3.org/1998/Math/MathML')\n\n if (isDisplayMode) {\n math.setAttribute('display', 'block')\n } // You can't style <math> nodes, so we wrap the node in a span.\n // NOTE: The span class is not typed to have <math> nodes as children, and\n // we don't want to make the children type more generic since the children\n // of span are expected to have more fields in `buildHtml` contexts.\n\n var wrapperClass = forMathmlOnly ? 'katex' : 'katex-mathml' // $FlowFixMe\n\n return buildCommon.makeSpan([wrapperClass], [math])\n }", "title": "" }, { "docid": "100f3561d2d2c913b4a0dfc788f33153", "score": "0.5566456", "text": "function treeToHtml(tree) {\n // only leafs containing category\n if (tree.category) {\n return ['<ul>',\n '<li>',\n '<a href=\"#\">',\n '<b>', tree.category, '</b>',\n '</a>',\n '</li>',\n '</ul>'].join('');\n }\n\n return ['<ul>',\n '<li>',\n '<a href=\"#\">',\n '<b>', tree.attribute, ' ', tree.predicateName, ' ', tree.pivot, ' ?</b>',\n '</a>',\n '<ul>',\n '<li>',\n '<a href=\"#\">yes</a>',\n treeToHtml(tree.match),\n '</li>',\n '<li>',\n '<a href=\"#\">no</a>',\n treeToHtml(tree.notMatch),\n '</li>',\n '</ul>',\n '</li>',\n '</ul>'].join('');\n }", "title": "" }, { "docid": "aadcc983ef2672eca9b8739b223a8a55", "score": "0.55570227", "text": "_render() {\n let flagText; // Render a label for any flags that have been set of the expression.\n\n if (this.flags.length > 0) {\n flagText = this.container.text(0, 0, `Flags: ${this.flags.join(', ')}`);\n } // Render the content of the regular expression.\n\n\n return this.regexp.render(this.container.group()).then(() => {\n // Move rendered regexp to account for flag label and to allow for\n // decorative elements.\n if (flagText) {\n this.regexp.transform(Snap.matrix().translate(10, flagText.getBBox().height));\n } else {\n this.regexp.transform(Snap.matrix().translate(10, 0));\n }\n\n let box = this.regexp.getBBox(); // Render decorative elements.\n\n this.container.path(`M${box.ax},${box.ay}H0M${box.ax2},${box.ay}H${box.x2 + 10}`);\n this.container.circle(0, box.ay, 5);\n this.container.circle(box.x2 + 10, box.ay, 5);\n });\n }", "title": "" }, { "docid": "86bd4b968736eec197d732d75a7dd496", "score": "0.5459243", "text": "function compute(equation, treeTableElement, prettyInputElement, simplifyElement, calculateElement) {\r\n\ttreeTableElement.innerHTML = '';\r\n\tprettyInputElement.innerHTML = '';\r\n\tsimplifyElement.innerHTML = '';\r\n\tcalculateElement.innerHTML = '';\r\n\r\n\t//try {\r\n\t\tvar rootNode = new EquationTree(equation.value);\r\n\r\n\t\t// Output results\r\n\t\ttreeTableElement.innerHTML = rootNode.toString();\r\n\t\t\r\n\t\tprettyInputElement.className = 'formatted';\r\n\t\tprettyInputElement.innerHTML = rootNode.toString(); \r\n\t\t\r\n\t\trootNode.simplify();\r\n\t\trootNode.cleanup(); \r\n\t\t\r\n\t\tsimplifyElement.className = 'treeTable';\r\n\t\tsimplifyElement.innerHTML = rootNode.toString();\r\n\t\t\r\n\t\tcalculateElement.className = 'formatted result';\r\n\t\tcalculateElement.innerHTML = rootNode.toString();\r\n\t\t\r\n\t//} catch (err) {\r\n\t\t//console.warn([].slice(arguments).join(' '));\r\n\t\t//prettyInputElement.innerHTML = '<span style=\"color:red; font-size:80%;\">' + err.message + '</span>';\r\n\t//}\r\n}", "title": "" }, { "docid": "34cee48f28661a6bea62cd780c1de757", "score": "0.5433192", "text": "function tree2sexp(exp){\n\tif(exp.exp == undefined) return exp;\n\tswitch(exp.exp){\n//\t\tcase 'function': break;\n//\t\tcase 'define':\tbreak;\n\t\tcase 'value': \treturn exp; break;\n\t\tcase 'apply':\n\t\t\tvar root\t= jsworld.div({ className: \"Expression \"+exp.type, id: exp.id });\n\t\t\tvar removeFromWorld\t= function (world){\n\t\t\t\t\t\t\t\t\treturn jsworld.augment(world, { expressions: removef(world.expressions, function(e){return e.id == exp.id}),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyles:\t\tremovef(world.styles, function(s){return s[0] == exp.id})\n\t\t\t\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t}\n\t\t\tvar operator\t= jsworld.div({ className: \"operator\", dblclick: removeFromWorld, mousedown: start_drag(root) });\n\t\t\tvar op_text\t= jsworld.text(exp.fn);\n\t\t\tvar boxes\t= jsworld.map(exp.inputs, function(input){return tree2sexp(input)});\n\t\t\ttree_node\t= jsworld.append([root, [operator, [op_text]]], boxes);\n\t\t\treturn tree_node;\n\t\t\tbreak;\n\t\tdefault: alert( 'ERROR - invalid expression type! exp.exp: '+exp.exp + ', exp: '+exp);\n\t}\n throw new Error(\"tree2sexp\");\n}", "title": "" }, { "docid": "1ea8b882208071e3776aa6a6a2eec428", "score": "0.54293674", "text": "function formatLatex(qe, parenLevel) {\n if (qe === null || qe === undefined) {\n return \"\";\n }\n if (parenLevel === undefined || parenLevel === null) {\n parenLevel = 0;\n }\n function bracketWrap(string) {\n return \"{\" + string + \"}\";\n }\n if (qe.type !== 5 && parenLevel === 3)\n parenLevel = 1;\n\n //Special operators that MathQuill requires the use of the \\operatorname tag\n const opSet = new Set([\"asin\", \"acos\", \"atan\", \"asinh\", \"acosh\", \"atanh\", \"acsch\", \"asech\", \"atanh\", \"sgn\", \"int\"]);\n\n let ret;\n switch (qe.type) {\n case 0:\n ret = qe.part;\n for (let i = 0; i < CONST_ARRAY.length; i++) {\n ret = replaceAll(ret, CONST_DELIM + CONST_ARRAY[i] + CONST_DELIM, \"\\\\\" + CONST_ARRAY[i]);\n }\n if (parenLevel === 1) {\n parenLevel = 0;\n }\n break;\n case 1:\n if (parenLevel === 1) {\n parenLevel = 0;\n }\n ret = OP.SUB + formatLatex(qe.part, 1);\n break;\n case 2:\n let temp = [];\n temp.push(formatLatex(qe.parts[0]));\n for (let i = 1; i < qe.parts.length; i++) {\n temp.push(qe.signs[i] ? OP.ADD : OP.SUB);\n temp.push(formatLatex(qe.parts[i]));\n }\n ret = temp.join(\"\");\n break;\n case 3:\n if (parenLevel === 1)\n parenLevel = 0;\n ret = qe.parts.map(function (x, idx, arr) {\n if (!qe.explicit && idx > 0) {\n if (x.type === 1) {\n return formatLatex(x, 2);\n } else if (x.type === 0 && arr[idx-1].type === 0) {\n if (!isNaN(parseFloat(x.part)) && !isNaN(parseFloat(arr[idx - 1].part))) {\n return formatLatex(x, 2);\n }\n }\n }\n return formatLatex(x, 1);\n }).join(qe.explicit ? \"\\\\cdot \" : \"\");\n break;\n case 4:\n if (parenLevel === 1)\n parenLevel = 0;\n ret = \"\\\\frac\" + bracketWrap(formatLatex(qe.numerator)) + bracketWrap(formatLatex(qe.denominator));\n break;\n case 5:\n if (parenLevel === 1) {\n parenLevel = 0;\n }\n ret = formatLatex(qe.base, 3) + OP.EXP + bracketWrap(formatLatex(qe.power, 3));\n break;\n case 6:\n if (parenLevel === 1) {\n parenLevel = 0;\n }\n if (qe.name === \"sqrt\") {\n ret = \"\\\\sqrt\" + bracketWrap(formatLatex(qe.part));\n } else if (opSet.has(qe.name)) {\n ret = \"\\\\operatorname{\" + qe.name + \"}\" + formatLatex(qe.part, 2);\n } else {\n ret = \"\\\\\" + qe.name + formatLatex(qe.part, 2);\n }\n break;\n case 7:\n parenLevel = 0; //abs work as parens\n ret = \"\\\\left|\" + formatLatex(qe.part) + \"\\\\right|\";\n break;\n case 8:\n if (qe.isLog === true) {\n let part = qe.part;\n ret = \"\\\\log_{\" +\n formatLatex(part.denominator.isLog ? part.denominator : part.denominator.part) +\n \"}\" + //if log is nested, format that log as well\n formatLatex(part.numerator.isLog ? part.numerator : part.numerator.part, 2);\n if (parenLevel === 1) {\n parenLevel = 0;\n }\n } else {\n return formatLatex(qe.part, parenLevel);\n }\n break;\n case 9:\n return qe.parts.map(x => formatLatex(x)).join(OP_EQUALITY);\n default:\n console.error(\"Unknown element type: %o\", qe);\n throw new Error(\"\");\n }\n return parenLevel > 0 ? \"\\\\left(\" + ret + \"\\\\right)\" : ret;\n }", "title": "" }, { "docid": "3400553a181777dad8487b6e4a1dd811", "score": "0.54134864", "text": "render(options) {\n this.display = new TreeRender(this, options);\n return this.display;\n }", "title": "" }, { "docid": "780d891a2b56ae05f9126669a95f26a3", "score": "0.5405574", "text": "function renderer(input){\n\t\treturn res.render(\"index\", {math: input});\n\t}", "title": "" }, { "docid": "c84543752af962e386e3726ed811f911", "score": "0.5349425", "text": "function buildHTML() {\n fs.writeFileSync(outputPath, render(employee), \"utf-8\")\n}", "title": "" }, { "docid": "a7610cceb57108093c2c9cec2c9ccd8c", "score": "0.5338856", "text": "display() {\n // Circle.\n push();\n noStroke();\n fill(237, 75, 158, 850);\n ellipse(this.x, this.y, this.size);\n\n /// Equation written inside.\n fill(255, 255, 255);\n textAlign(CENTER, CENTER);\n textFont(workSansRegular);\n textSize(28);\n text(this.representation, this.x, this.y);\n pop();\n }", "title": "" }, { "docid": "3e6d73345696b333898008081f22e329", "score": "0.53371346", "text": "function evaluateExpression(expression){\r\n var regex = /\\d*(\\.?\\d+)?[+-/*]\\d*\\.?\\d+/gi;\r\n var parsedEquation = expression.match(regex);\r\n console.log(parsedEquation);\r\n var equation = \"\";\r\n result = parsedEquation.reduce(function(acc,val){\r\n equation = acc + formatInput(val);\r\n return eval(equation).toString();\r\n },result)\r\n}", "title": "" }, { "docid": "248878f1e6e9883a199ff669ea2389b9", "score": "0.5325626", "text": "function printBinaryishExpressions(path,print,options,isNested,isInsideParenthesis){var parts=[];var node=path.getValue();// We treat BinaryExpression and LogicalExpression nodes the same.\nif(isBinaryish(node)){// Put all operators with the same precedence level in the same\n// group. The reason we only need to do this with the `left`\n// expression is because given an expression like `1 + 2 - 3`, it\n// is always parsed like `((1 + 2) - 3)`, meaning the `left` side\n// is where the rest of the expression will exist. Binary\n// expressions on the right side mean they have a difference\n// precedence level and should be treated as a separate group, so\n// print them normally. (This doesn't hold for the `**` operator,\n// which is unique in that it is right-associative.)\nif(shouldFlatten$1(node.operator,node.left.operator)){// Flatten them out by recursively calling this function.\nparts=parts.concat(path.call(function(left){return printBinaryishExpressions(left,print,options,/* isNested */true,isInsideParenthesis);},\"left\"));}else{parts.push(path.call(print,\"left\"));}var shouldInline=shouldInlineLogicalExpression(node);var lineBeforeOperator=node.operator===\"|>\";var right=shouldInline?concat$4([node.operator,\" \",path.call(print,\"right\")]):concat$4([lineBeforeOperator?softline$1:\"\",node.operator,lineBeforeOperator?\" \":line$3,path.call(print,\"right\")]);// If there's only a single binary expression, we want to create a group\n// in order to avoid having a small right part like -1 be on its own line.\nvar parent=path.getParentNode();var shouldGroup=!(isInsideParenthesis&&node.type===\"LogicalExpression\")&&parent.type!==node.type&&node.left.type!==node.type&&node.right.type!==node.type;parts.push(\" \",shouldGroup?group$1(right):right);// The root comments are already printed, but we need to manually print\n// the other ones since we don't call the normal print on BinaryExpression,\n// only for the left and right parts\nif(isNested&&node.comments){parts=comments.printComments(path,function(){return concat$4(parts);},options);}}else{// Our stopping case. Simply print the node normally.\nparts.push(path.call(print));}return parts;}", "title": "" }, { "docid": "a7807ef5f8b612be02f0d3d09fe230fa", "score": "0.53153527", "text": "static render() {\n this.renderText();\n this.renderNodes();\n }", "title": "" }, { "docid": "56be80acaeb26b7c854a4f002340a7c3", "score": "0.5307579", "text": "function renderExpression(exp, data, options, resolveOptionalsToBoolean = false) {\n \n /*\n if (exp == WHITESPACE_TMP_TAG_EXP) {\n return TPL_TAG_OPEN+WHITESPACE_TMP_TAG_EXP+TPL_TAG_CLOSE\n }\n */\n\n exp = String(exp).trim(); \n\tvar origExp = exp;\n \n if (exp.charAt(0) == '>'){\n throw new Error('Couldn\\'t resolve include `'+exp+'`');\n }\n \n \n // 1) Filters are considered first unless wrapped in brackets\n // - Defer ternary operations to eval\n // - Defer logical operations to eval\n // - Defer ! to eval\n\n // 1) Replace string constants with vars, they may contain chars that break parsing\n // Supports double and single quotes as well as escaped chars\n \n if (exp.includes(`'`) || exp.includes(`\"`)){ // Pre check to quickly bypass non-targeted expressions\n \n var regex = new RegExp(/(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\")|(\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*\\')/gi);\n \n var startingExp = exp;\n var m;\n var indexOffset = 0;\n while ((m = regex.exec(startingExp)) !== null) {\n\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n \n var isDoubleQuote = m[1] != undefined;\n var strContent = isDoubleQuote ? m[1] : m[2]; \n var content = strContent.substr(1,strContent.length-2);\n \n // Escape sequences can be safely removed now.\n if (isDoubleQuote){\n content = content.split('\\\\\"').join('\"')\n } else {\n content = content.split(\"\\\\'\").join(\"'\")\n }\n data._tmp_vars.push(content);\n \n var val = '_tmp_vars[' + String(data._tmp_vars.length-1) + ']' // Use square brackets as result will be evaled\n exp = exp.substr(0, m.index+indexOffset) + val + exp.substr(m.index+indexOffset + m[0].length);\n indexOffset += String(val).length - m[0].length;\n \n }\n \n }\n \n // Now string constants are gone remove all spacing from expression \n \n exp = exp.replace(/\\s/g, '')\n \n // Escape || chars to enable parse single filter pipes \n \n exp = exp.replace(/\\|\\|/g, OR_ESCAPE);\n \n // Recursively weed out top level curly brackets \n // Colons and commas within break filter arg prefix\n if (exp.includes(`{`) ){ // Pre check to quickly bypass non-targeted expressions\n var regex = new RegExp(/({[^{}]*})/gi);\n var keepLooping = true;\n while(keepLooping){\n var startingExp = exp;\n var m;\n var indexOffset = 0;\n while ((m = regex.exec(startingExp)) !== null) {\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n if (m[1] !== undefined){\n // Found a simple curly bracket, replace all commas and colons with placeholders\n var val = CURLY_BRACKET_IN_ESCAPE + m[1].substr(1,m[1].length-2).split(':').join(COLON_ESCAPE).split(',').join(COMMA_ESCAPE) + CURLY_BRACKET_OUT_ESCAPE\n } \n exp = exp.substr(0, m.index+indexOffset) + val + exp.substr(m.index+indexOffset + m[0].length);\n indexOffset += String(val).length - m[0].length;\n }\n keepLooping = exp != startingExp;\n }\n }\n \n \n // 2) Seach for a filter inside a top level bracket.\n // - Weed out simple brackets, looking for filter pipes.\n \n if (exp.includes(`|`) && exp.includes(`(`)){ // Pre check to quickly bypass non-targeted expressions\n \n var regex = new RegExp(/(\\([^()|]*\\))|(\\([^()]*\\))/gi);\n \n var keepLooping = true;\n \n while(keepLooping){\n \n var startingExp = exp;\n var m;\n var indexOffset = 0;\n while ((m = regex.exec(startingExp)) !== null) {\n\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n \n if (m[1] !== undefined){\n // Found a simple bracket, replace with placeholder char\n var val = BRACKET_IN_ESCAPE + m[1].substr(1,m[1].length-2).split(',').join(COMMA_ESCAPE) + BRACKET_OUT_ESCAPE\n } else {\n // Found a bracket containing a top level filter, process this separately\n var bracketExp = m[2].substr(1,m[2].length-2);\n data._tmp_vars.push(renderExpression(bracketExp, data, options));\n \n var val = '_tmp_vars[' + String(data._tmp_vars.length-1) + ']' // Use square brackets as result will be evaled;\n }\n \n exp = exp.substr(0, m.index+indexOffset) + val + exp.substr(m.index+indexOffset + m[0].length);\n indexOffset += String(val).length - m[0].length;\n \n }\n \n keepLooping = exp != startingExp;\n \n }\n }\n \n // Resolve each filter expression separately as their own call to this function\n // Rolling the result to be processed on the next filter.\n // -----------------------------------------------------------------\n \n var filterSequence = exp.split('|'); \n var tagSearchRegex = new RegExp(TPL_TAG_OPEN_REGSAFE, 'im')\n if (filterSequence.length > 1){\n \n var rollingResult = undefined; \n for (var i = 0; i < filterSequence.length; i++){\n \n if (i == 0){ // Index 0 will contain the seed value \n \n rollingResult = renderExpression(filterSequence[i], data, options);\n \n // If the result has more tags to resolve then keep rendering.\n // These need to be complete before applying filters.\n // Check result is a string as non-string may match\n while (typeof rollingResult === 'string' && tagSearchRegex.test(rollingResult)){ \n rollingResult = renderString(rollingResult, data, options);\n }\n \n //try { \n // \n //} catch(e){\n // // It is possible, if index 0 doens't resolve that index 0 is a filter name, that takes undefined as it's rolling value.\n //} \n } else {\n // Interpret the filter:\n // `filterName:arg2,arg3`\n var filterParts = filterSequence[i].split(':');\n var filterName = filterParts[0];\n // Parse each extra arg\n var filterArgs = [rollingResult]\n if (filterParts.length > 1){\n filterArgs = filterArgs.concat(filterParts[1].split(','));\n for (var j = 1; j < filterArgs.length; j++){\n filterArgs[j] = renderExpression(filterArgs[j], data, options); // Result each arg \n } \n }\n rollingResult = filter.applyFilter(filterName, filterArgs); \n }\n \n }\n \n return rollingResult;\n \n }\n\n // Single expression parsing \n // -------------------------\n \n // Ensure expressions referenced do not have unresolved tags\n var varNameRegex = /([a-zA-Z_$]+[a-zA-Z_$0-9\\[\\].]*)/gim;\n var m;\n while ((m = varNameRegex.exec(exp)) !== null) {\n if (m.index === varNameRegex.lastIndex) {\n regex.lastIndex++;\n }\n var varPath = m[1];\n var val = utils.getObjPath(data, varPath);\n\t\tif (val != undefined){\n var valPre = val;\n // Check result is a string as non-string may match\n while (typeof val === 'string' && tagSearchRegex.test(val)){ // Any tags?\n val = renderString(val, data, options);\n }\n if (valPre != val){ // Save data for being evalulated later\n setObjPathVal(data, varPath, val);\n }\n }\n }\n \n // Replace escaped chars with real ones.\n\n exp = exp.split(BRACKET_IN_ESCAPE).join('(');\n exp = exp.split(BRACKET_OUT_ESCAPE).join(')');\n exp = exp.split(OR_ESCAPE).join('||');\n exp = exp.split(COMMA_ESCAPE).join(',');\n exp = exp.split(COLON_ESCAPE).join(':');\n exp = exp.split(CURLY_BRACKET_IN_ESCAPE).join('{');\n exp = exp.split(CURLY_BRACKET_OUT_ESCAPE).join('}');\n \n\n\tvar isNot = false;\n\tif (exp.length > 0){\n\t\tif (exp.charAt(0) == '!') {\n\t\t\texp=exp.substr(1);\n\t\t\tisNot = true;\n\t\t}\n\t}\n\n\t// If last char is question mark then\n\t// if the result is a bool of whether expression defined or undefined\n\tvar isOptional = false;\n\tif (exp.length > 0){\n\t\tif (exp.charAt(exp.length-1) == '?') {\n\t\t\texp=exp.substr(0,exp.length-1);\n\t\t\tisOptional = true;\n\t\t}\n\t}\n\n\t// Optional chain\n\tprops = exp.split('??');\n\t\n\tvar result;\n\n\t// Search optional props in order\n\tfor (var i = 0; i < props.length; i++){\n\n\t\tvar prop = props[i];\n \n\t\t// Find filters\n\t\t\n // Try resolving expression as var name\n result = utils.getObjPath(data, prop);\n \n\t\tif (result == undefined){ // Try evaluating\n \n try {\n \n result = safeEval(prop, data); // Will throw error if invalid\n \n } catch(error) {\n \n }\n \n\t\t}\n \n\t\tif (result != undefined){ \n\t\t\t// Found a result, exit optional search loop\n \n // If the result has more tags to resolve then keep rendering, saves having to do another whole pass later.\n // Check result is a string as non-string may match\n while (typeof result === 'string' && tagSearchRegex.test(result)){ \n result = renderString(result, data, options);\n }\n \n\t\t\tbreak;\n\t\t}\n \n\t}\n\n\tif (isOptional){\n\n\t\tif (resolveOptionalsToBoolean){\n\n\t\t\tresult = result != undefined; // For conditional query result,\n\n\t\t} else {\n\n\t\t\tresult = result != undefined ? result : ''; // Default behaviour, will return empty string if not set rather than throwing error.\n\n\t\t}\n\n\t} else {\n\n\t\tif (result == undefined){\n\t\t\tthrow new Error('Couldn\\'t resolve template expression `'+origExp+'` `'+exp+'`');\n\t\t}\n\n\t}\n\n\tif (isNot){\n\t\tif (result === true || result === false){\n\t\t\tresult = !result;\n\t\t} else {\n\t\t\tthrow new Error('Can\\'t `NOT`(!) non-boolean result `'+origExp+'` resolved to `'+result+'` (type:'+typeof result+')');\n\t\t}\n\t}\n\n\t// The result may have more expressions in them,\n\t// If any further expressions are identified in the output then keep applying the template\n\n\treturn result;\n\n}", "title": "" }, { "docid": "8858da1b4ce304b112d020b22634c317", "score": "0.53017676", "text": "_render() {\n // **NOTE:** `this.label()` **MUST** be called here, in _render, and before\n // any child nodes are rendered. This is to keep the group numbers in the\n // correct order.\n let label = this.label(); // Render the contained regexp.\n\n return this.regexp.render(this.container.group()) // Create the labeled box around the regexp.\n .then(() => this.renderLabeledBox(label, this.regexp, {\n padding: 10\n }));\n }", "title": "" }, { "docid": "0280006998601af2e2fa7d76358e18ca", "score": "0.5293031", "text": "function evaluateMarkup(expression, doc, namespaceURI, module, parentContainer) {\n var source = module && module.source;\n var smg;\n var fileUri;\n if (source) {\n fileUri = source.uri;\n if (source.map) {\n smg = new sm.SourceMapConsumer(source.map);\n }\n }\n var stack = new Error().stack;\n var root = expression;\n function linkSourceInfo(expression, synthetic) {\n synthetic.$module = module;\n var euri = fileUri;\n // may be undefined if setting innerHTML\n var start = parser_1.getHTMLASTNodeLocation(expression) || { line: 1, column: 1 };\n if (smg) {\n var org = smg.originalPositionFor({ line: start.line, column: start.column - 1 });\n start = { line: org.line, column: org.column };\n euri = org.source;\n }\n synthetic.$source = {\n uri: euri,\n start: start\n };\n return synthetic;\n }\n function appendChildNodes(container, expression) {\n for (var i = 0, n = expression.childNodes.length; i < n; i++) {\n var child = evaluateMarkup(expression.childNodes[i], doc, namespaceURI, module, container);\n child.$createdCallback();\n }\n }\n var getAttribute = function (expression, name) {\n var attr = expression.attrs.find(function (attr) { return attr.name === name; });\n return attr && attr.value;\n };\n var map = function (expression) {\n // nothing for now for doc type\n if (expression.nodeName === \"#documentType\") {\n var node = doc.createTextNode(\"\");\n linkSourceInfo(expression, node);\n parentContainer.appendChild(node);\n return node;\n }\n if (expression.nodeName === \"#comment\") {\n var node = linkSourceInfo(expression, doc.createComment(expression.data));\n linkSourceInfo(expression, node);\n parentContainer.appendChild(node);\n return node;\n }\n else if (expression.nodeName === \"#text\") {\n var value = expression.value;\n var isWS = /^[\\n\\r\\t ]+$/.test(value);\n var node = doc.createTextNode(expression.value);\n if (!isWS) {\n linkSourceInfo(expression, node);\n parentContainer.appendChild(node);\n }\n return node;\n }\n else if (expression.nodeName === \"#document\" || expression.nodeName === \"#document-fragment\") {\n var container = void 0;\n if (!expression.parentNode && parentContainer) {\n container = parentContainer;\n }\n else {\n container = doc.createDocumentFragment();\n linkSourceInfo(expression, container);\n }\n appendChildNodes(container, expression);\n if (container !== parentContainer) {\n container.$createdCallback();\n }\n return container;\n }\n var elementExpression = expression;\n var xmlns = getAttribute(elementExpression, \"xmlns\") || namespaceURI || doc.defaultNamespaceURI;\n // bypass $createdCallback executed by document\n var elementClass = doc.$getElementClassNS(xmlns, expression.nodeName);\n var element = new elementClass(xmlns, expression.nodeName);\n element.$setOwnerDocument(doc);\n parentContainer.appendChild(element);\n for (var i = 0, n = elementExpression.attrs.length; i < n; i++) {\n var attributeExpression = elementExpression.attrs[i];\n element.setAttribute(attributeExpression.name, attributeExpression.value);\n }\n linkSourceInfo(expression, element);\n appendChildNodes(element, elementExpression);\n return element;\n };\n return map(expression);\n}", "title": "" }, { "docid": "723743443105313d412effcfa234ffbd", "score": "0.52609795", "text": "render() {\n\t\t//get all root nodes\n\t\tvar roots = this.state.nodes.filter((elem, i)=>{\n\t\t\t//root elements have no parent\n\t\t\tif (elem.parent === ''){\n\t\t\t\treturn true;\n\t\t\t}else {return false;}\n\t\t})\n\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<h2 id=\"tree_label\" aria-label='Org Chart press the tab key to enter the tree view'>\n\t\t\t\t\t<span id='treeLabel'>Org Chart</span>\n\t\t\t\t</h2>\n\t\t\t\t\n\t\t\t\t<ul role=\"tree\" \n\t\t\t\t\taria-labelledby='treeLabel'\n\t\t\t\t\taria-describedby=\"kbd_desc\"\n\t\t\t\t\tonClick={(e) => this.onClickEvent(e)}\n\t\t\t\t\tonFocus={ (e) => this.onFocusEvent(e) }\n\t\t\t\t\tonBlur={ (e) => this.onBlurEvent(e) }\n\t\t\t\t\tonKeyDown={(e) => this.onKeyPressedEvent(e)}\n\t\t\t\t>\n\t\t\t\t\t{/* start render root elements */}\n\t\t\t\t\t{ \n\t\t\t\t\t\troots.map( (elem, i)=>{\n\t\t\t\t\t\t\treturn this.renderRoots(elem, i+1, roots.length)\n\t\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t);\n\t}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.5247601", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.5247601", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.5247601", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.5247601", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.5247601", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.5247601", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.5247601", "text": "render() {}", "title": "" }, { "docid": "395825a66e0b9781e2a238b80aee59bd", "score": "0.5230461", "text": "function ExprVisitor() {\n antlr4.tree.ParseTreeVisitor.call(this);\n return this;\n}", "title": "" }, { "docid": "a8855a5d8c9b5402352519026366b0d3", "score": "0.52300763", "text": "function ascii_to_latex(str) {\n var exp = new algebra.Expression(str);\n return exp.toTex().replace(/\\^([a-z0-9])/g, \"^{$1}\").replace(/\\^\\(([-a-z0-9]+)\\)/g, \"^{$1}\");\n}", "title": "" }, { "docid": "f536ef2d5c58f68168e99f24f4e29335", "score": "0.5220837", "text": "function latex_to_ascii(str) {\n str.replace(/\\\\sqrt\\{([-a-z0-9]+)\\}/g, \"sqrt($1)\");\n str = str.replace(/\\}\\{/g, \")/(\").replace(/\\\\frac{/g, \"(\").replace(/\\}/g, \")\");\n str = str.split(\"\").join(\"*\");\n str = str.replace(/\\*?\\+\\*?/g, \"+\")\n .replace(/([0-9])\\*([0-9])/g, \"$1$2\")\n .replace(/\\*?-\\*?/g, \"-\")\n .replace(/\\*?=\\*?/g, \"=\")\n .replace(/\\*?\\(\\*?/g, \"(\")\n .replace(/\\*?\\)\\*?/g, \")\")\n .replace(/\\*?\\/\\*?/g, \"/\")\n .replace(/\\(\\+/g, \"(\")\n .replace(/\\*\\^\\*\\{\\*(\\-?[0-9]+)\\)/g, \"^($1)\")\n .replace(/\\^\\*\\{\\*(\\-?[0-9]+)\\)/g, \"^($1)\")\n .replace(/\\*\\^\\*\\{(\\-?[0-9]+)\\)/g, \"^($1)\");\n return str;\n}", "title": "" }, { "docid": "7141f64351ea2531f7529cbc3508f47a", "score": "0.5204332", "text": "function plot() {\n\tgraph.setExpressions(expressions);\n}", "title": "" }, { "docid": "f92c9f6b24b3fbd4b3777b200ba5b87c", "score": "0.5189495", "text": "function MathJaxSVGManipulation()\r\n{\r\n\tcurrentTreeBuilder.svgtree.selectAll(`${selectors.nodeElementSelector}`).each(function(){\r\n\t\tlet self = d3.select(this),\r\n\t\t\tg = self.select(`${webvars.nodeTextTag} > span > svg`);\r\n\r\n\t\tif (g.node())\r\n\t\t{\r\n\t\t\tg.remove();\r\n\t\t\tself.append(webvars.texContainerTag)\r\n\t\t\t\t.classed(webvars.texContainerClass, true)\r\n\t\t\t\t.attr('width', '100%')\r\n\t\t\t\t.style('overflow', 'visible')\r\n\t\t\t\t.on('click', node_onclick)\r\n\t\t\t\t.append(function(){\r\n\t\t\t\t\treturn g.node();\r\n\t\t\t\t})\r\n\t\t\t\t.attr('width', '50%')\r\n\t\t\t\t.attr('x', '-25%');\r\n\t\t}\r\n\t});\r\n\r\n\tcurrentTreeBuilder.postRenderProposition();\r\n\r\n\tcurrentTreeBuilder.svgtree.selectAll(`${webvars.ruleTextContainerTag}.${webvars.ruleTextClass}`).each(function(){\r\n\t\tlet self = d3.select(this),\r\n\t\t\tg = self.select(`${webvars.nodeTextTag} > span > svg`);\r\n\r\n\t\tif (g.node())\r\n\t\t{\r\n\t\t\tg.remove();\r\n\t\t\tself.append(webvars.texContainerTag)\r\n\t\t\t\t.classed(webvars.texContainerClass, true)\r\n\t\t\t\t.attr('width', '100%')\r\n\t\t\t\t.style('overflow', 'visible')\r\n\t\t\t\t.on('click', node_onclick)\r\n\t\t\t\t.append(function(){\r\n\t\t\t\t\treturn g.node();\r\n\t\t\t\t});\r\n\t\t}\r\n\t});\r\n\r\n\tcurrentTreeBuilder.postRenderRuleText();\r\n}", "title": "" }, { "docid": "ac39983e809c3dccb7cb14b9b8d410db", "score": "0.5144873", "text": "function render() {\n tree.render();\n tree.nodeName(d => d.data._id);\n tree.pathName('instance1', '_parentCut');\n}", "title": "" }, { "docid": "0997b5fd3683f1eec25813a10fd711db", "score": "0.5123858", "text": "mathJax(){\n let mathMatrix = '';\n mathMatrix += '\\\\begin{bmatrix} ';\n for(let i = 0; i < this.matrix[0].length; i++){\n for(let j = 0; j < this.matrix[0].length; j++){\n if(j < this.matrix[0].length-1) mathMatrix += '' + this.matrix[i][j] + ' & ';\n else mathMatrix += '' + this.matrix[i][j] + '\\\\\\\\ ';\n }\n }\n mathMatrix += '\\\\end{bmatrix} ';\n return mathMatrix;\n }", "title": "" }, { "docid": "a07406e0b661ba1fecb3170e5d2b114f", "score": "0.50992376", "text": "function treeToInput() {\n\n return {\n restrict: \"E\",\n\n template: '<div></div>',\n link: function(scope, element, attrs) {\n /*\n * Traverses a regex tree and builds the equivalent regex string.\n * node: the current node in the regex tree to be evaluated.\n */\n var buildRegexString = function(node){\n var regex = '';\n switch(node.type){\n case 'match':\n for(var i = 0; i < node.body.length; i++){\n regex += buildRegexString(node.body[i]);\n }\n return regex;\n case 'capture-group':\n return '(' + buildRegexString(node.body) + ')';\n case 'literal':\n var text = node.body;\n for(var i = 0; i < text.length; i++){\n //Add a \\ if it's a character that needs to be escaped\n if(isSpecial(text[i])){\n regex += '\\\\';\n }\n regex += text[i];\n }\n return regex;\n case 'alternate':\n return buildRegexString(node.left) + '|' + buildRegexString(node.right);\n case 'quantified':\n var body = buildRegexString(node.body);\n\n //MIGHT NOT BE NECESSARY\n //Only add () if the text length is greater than 1, the first character is not (, and its not a single escaped character\n if(body.length > 1 && body[0] !== '(' && (body.length !== 2 || body[0] !== '\\\\')){\n regex += '(' + body + ')';\n } else {\n regex += body;\n }\n\n var min = node.quantifier.min;\n var max = node.quantifier.max;\n //Maybe just replace Infinity with null below\n if(max === null){\n max = Infinity;\n }\n if(min > max){\n throw new Error(\"Minimum quantifier (\" + min + \") must be lower than maximum quantifier (\" + max + \")\");\n }\n if(min === 0 && max === Infinity){\n regex += '*';\n } else if(min === 1 && max === Infinity){\n regex += '+';\n } else if(min === 0 && max === 1){\n regex += '?';\n } else if(min === max){\n regex += '{' + min + '}';\n } else {\n regex += '{' + min + ',' + max + '}';\n }\n return regex;\n case 'charset':\n regex += '[';\n if(node.invert){\n regex += '^';\n }\n //Specials inside a charset don't all need to be escaped, but it should be ok if they all are\n for(var i = 0; i < node.body.length; i++){\n regex += buildRegexString(node.body[i]);\n }\n regex += ']';\n return regex;\n\n //THIS MIGHT BE WRONG\n case 'range':\n return node.text;\n\n case 'start':\n return '^';\n case 'end':\n return '$';\n case 'word':\n return '\\\\w';\n case 'non-word':\n return '\\\\W';\n case 'any-character':\n return '.';\n case 'digit':\n return '\\\\d' ;\n case 'non-digit':\n return '\\\\D' ;\n case 'white-space':\n return '\\\\s' ;\n case 'non-white-space':\n return '\\\\S' ;\n case 'word-boundary':\n return '\\\\b';\n case 'non-word-boundary':\n return '\\\\B';\n case 'tab':\n return '\\\\t';\n case 'carriage-return':\n return '\\\\r';\n case 'vertical-tab':\n return '\\\\v';\n case 'form-feed':\n return '\\\\f';\n case 'line-feed':\n return '\\\\n';\n default:\n return regex;\n }\n };\n\n /*\n * Helper function to determine if a character needs to be escaped\n */\n var isSpecial = function(char){\n if(char === '/' || char === '*' || char === '+' || char === '?' || char === '\\\\' || char === '(' || char === ')' || char === '{' ||\n char === '[' || char === '.' || char === '$' || char === '^' || char === '|') {\n return true;\n }\n return false;\n };\n\n scope.$watch('main.treeChanged', function(newValues, oldValues){\n // console.log(scope.main.treeChanged);\n // console.log(buildRegexString(scope.main.regexTree));\n scope.main.regexBody = buildRegexString(scope.main.regexTree);\n });\n }\n };\n }", "title": "" }, { "docid": "145ebf5729635e43c1f293de81e6617c", "score": "0.5086143", "text": "function ExportAsLatex(edges,nodes) {\n this.edges = edges;\n this.nodes = nodes; \n\tthis.texData = '';\n\tthis.scale = 0.1; // to convert pixels to document space (TikZ breaks if the numbers get too big, above 500?)\n\n \n this.createData = function(){\n for (var i = 0; i < this.edges.length; i++) {\n edge = this.edges[i];\n this.texData += edge.toLatex();\n }\n for (var i = 0; i < this.nodes.length; i++) {\n node = this.nodes[i];\n this.texData += node.toLatex(); \n }\n }\n\n\tthis.toLatex = function() {\n this.createData();\n\t\treturn '\\\\documentclass[12pt]{article}\\n' +\n\t\t\t'\\\\usepackage{tikz}\\n' +\n\t\t\t'\\n' +\n\t\t\t'\\\\begin{document}\\n' +\n\t\t\t'\\n' +\n\t\t\t'\\\\begin{center}\\n' +\n\t\t\t'\\\\begin{tikzpicture}[scale=0.2]\\n' +\n\t\t\t'\\\\tikzstyle{every node}+=[inner sep=0pt]\\n' +\n\t\t\tthis.texData +\n\t\t\t'\\\\end{tikzpicture}\\n' +\n\t\t\t'\\\\end{center}\\n' +\n\t\t\t'\\n' +\n\t\t\t'\\\\end{document}\\n';\n\t};\n\n\n\n}", "title": "" }, { "docid": "9df5cc9362972cad2009f9df7c59d7e4", "score": "0.50839025", "text": "function renderHTMLforPDF() {\n // Iterate over the data structures\n var typeOfData = undefined;\n for (docType in dataStructures) {\n // If selected document is in data structure\n if (selectedTemplate == docType) {\n console.log(`Its a ${docType} `);\n typeOfData = docType;\n } else {\n // Notify the user\n console.log(\"Not an accepted document!\");\n return;\n }\n }\n\n var component = [];\n var individualComponents = [];\n if (typeOfData != undefined) {\n for (obj in dataStructures[typeOfData]) {\n var componentName = dataStructures[typeOfData][obj][\"name\"];\n\n var template = `\n <!-- -->\n\t\t\t\t<div>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t${componentName}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t::value::\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n <!-- -->\n `;\n individualComponents.push(template);\n }\n inputValues = getInputValues();\n for (let a = 0; a < inputValues.length; a++) {\n component.push(\n individualComponents[a].replace(\"::value::\", inputValues[a])\n );\n }\n }\n var templateStart = `\n <img src=\"http://placekitten.com/500/200\" alt=\"\" />\n <span>Código QR de la operación:</span>\n <img src=\"img/qr.png\"/>\n\t\t`;\n component.unshift(templateStart);\n // targetHTML.append(component.join(\" \"));\n return component.join(\" \");\n}", "title": "" }, { "docid": "03d3b78dbc5dc83b7fb02792d474d8b4", "score": "0.5067686", "text": "print() {\n if (!this.tree) {\n return '';\n }\n\n return this._printRecursive(this.tree);\n }", "title": "" }, { "docid": "b5c1ae356522f027b4482cc54d40a3d3", "score": "0.50601274", "text": "render(ctx) {}", "title": "" }, { "docid": "2da54429bf5b11af4c000756b2a5efd4", "score": "0.5055194", "text": "function stringify(config) {\n var settings = xtend(config, this.data('settings'));\n this.Compiler = compiler;\n\n function compiler(tree) {\n return toLaTeX(tree, settings, tree);\n }\n}", "title": "" }, { "docid": "ca722a74f8c70add210bfeb4402ec6d5", "score": "0.5050974", "text": "compile(down) {\n let childrenString\n let attributes = ''\n\n if (this.parent && !down) {\n return this.parent.compile()\n }\n\n let childTmp = this.children.map((child)=>{\n child.compile(true)\n return child.compiledString\n })\n\n attributes = this.compileAttributes()\n childrenString = childTmp.join('')\n if (this.innerText) {\n\n this.compiledString = this.elem.open +\n attributes +\n this.elem.afterOpen +\n '${opts' + `${this.fullPrefix.length ? '.' + this.fullPrefix.join('.') : ''}`\n + '['+ `'${this.innerText}'` +']}' +\n childrenString +\n this.elem.close\n } else {\n this.compiledString = this.elem.open +\n attributes + this.elem.afterOpen +\n childrenString + this.elem.close\n }\n\n this.template = new Function('opts',`return \\`${this.compiledString}\\``)\n return this\n }", "title": "" }, { "docid": "4076c73e8f981381fe7805fee52b564b", "score": "0.50479686", "text": "function ExportAsLaTeX() {\r\n\tthis._points = [];\r\n\tthis._texData = '';\r\n\tthis._scale = 0.1; // to convert pixels to document space (TikZ breaks if the numbers get too big, above 500?)\r\n\r\n\tthis.toLaTeX = function() {\r\n\t\treturn '\\\\documentclass[12pt]{article}\\n' +\r\n\t\t\t'\\\\usepackage{tikz}\\n' +\r\n\t\t\t'\\n' +\r\n\t\t\t'\\\\begin{document}\\n' +\r\n\t\t\t'\\n' +\r\n\t\t\t'\\\\begin{center}\\n' +\r\n\t\t\t'\\\\begin{tikzpicture}[scale=0.2]\\n' +\r\n\t\t\t'\\\\tikzstyle{every node}+=[inner sep=0pt]\\n' +\r\n\t\t\tthis._texData +\r\n\t\t\t'\\\\end{tikzpicture}\\n' +\r\n\t\t\t'\\\\end{center}\\n' +\r\n\t\t\t'\\n' +\r\n\t\t\t'\\\\end{document}\\n';\r\n\t};\r\n\r\n\tthis.beginPath = function() {\r\n\t\tthis._points = [];\r\n\t};\r\n\tthis.arc = function(x, y, radius, startAngle, endAngle, isReversed) {\r\n\t\tx *= this._scale;\r\n\t\ty *= this._scale;\r\n\t\tradius *= this._scale;\r\n\t\tif(endAngle - startAngle == Math.PI * 2) {\r\n\t\t\tthis._texData += '\\\\draw [' + this.strokeStyle + '] (' + fixed(x, 3) + ',' + fixed(-y, 3) + ') circle (' + fixed(radius, 3) + ');\\n';\r\n\t\t} else {\r\n\t\t\tif(isReversed) {\r\n\t\t\t\tvar temp = startAngle;\r\n\t\t\t\tstartAngle = endAngle;\r\n\t\t\t\tendAngle = temp;\r\n\t\t\t}\r\n\t\t\tif(endAngle < startAngle) {\r\n\t\t\t\tendAngle += Math.PI * 2;\r\n\t\t\t}\r\n\t\t\t// TikZ needs the angles to be in between -2pi and 2pi or it breaks\r\n\t\t\tif(Math.min(startAngle, endAngle) < -2*Math.PI) {\r\n\t\t\t\tstartAngle += 2*Math.PI;\r\n\t\t\t\tendAngle += 2*Math.PI;\r\n\t\t\t} else if(Math.max(startAngle, endAngle) > 2*Math.PI) {\r\n\t\t\t\tstartAngle -= 2*Math.PI;\r\n\t\t\t\tendAngle -= 2*Math.PI;\r\n\t\t\t}\r\n\t\t\tstartAngle = -startAngle;\r\n\t\t\tendAngle = -endAngle;\r\n\t\t\tthis._texData += '\\\\draw [' + this.strokeStyle + '] (' + fixed(x + radius * Math.cos(startAngle), 3) + ',' + fixed(-y + radius * Math.sin(startAngle), 3) + ') arc (' + fixed(startAngle * 180 / Math.PI, 5) + ':' + fixed(endAngle * 180 / Math.PI, 5) + ':' + fixed(radius, 3) + ');\\n';\r\n\t\t}\r\n\t};\r\n\tthis.moveTo = this.lineTo = function(x, y) {\r\n\t\tx *= this._scale;\r\n\t\ty *= this._scale;\r\n\t\tthis._points.push({ 'x': x, 'y': y });\r\n\t};\r\n\tthis.stroke = function() {\r\n\t\tif(this._points.length == 0) return;\r\n\t\tthis._texData += '\\\\draw [' + this.strokeStyle + ']';\r\n\t\tfor(var i = 0; i < this._points.length; i++) {\r\n\t\t\tvar p = this._points[i];\r\n\t\t\tthis._texData += (i > 0 ? ' --' : '') + ' (' + fixed(p.x, 2) + ',' + fixed(-p.y, 2) + ')';\r\n\t\t}\r\n\t\tthis._texData += ';\\n';\r\n\t};\r\n\tthis.fill = function() {\r\n\t\tif(this._points.length == 0) return;\r\n\t\tthis._texData += '\\\\fill [' + this.strokeStyle + ']';\r\n\t\tfor(var i = 0; i < this._points.length; i++) {\r\n\t\t\tvar p = this._points[i];\r\n\t\t\tthis._texData += (i > 0 ? ' --' : '') + ' (' + fixed(p.x, 2) + ',' + fixed(-p.y, 2) + ')';\r\n\t\t}\r\n\t\tthis._texData += ';\\n';\r\n\t};\r\n\tthis.measureText = function(text) {\r\n\t\tvar c = canvas.getContext('2d');\r\n\t\tc.font = '20px \"Times New Romain\", serif';\r\n\t\treturn c.measureText(text);\r\n\t};\r\n\tthis.advancedFillText = function(text, originalText, x, y, angleOrNull) {\r\n\t\tif(text.replace(' ', '').length > 0) {\r\n\t\t\tvar nodeParams = '';\r\n\t\t\t// x and y start off as the center of the text, but will be moved to one side of the box when angleOrNull != null\r\n\t\t\tif(angleOrNull != null) {\r\n\t\t\t\tvar width = this.measureText(text).width;\r\n\t\t\t\tvar dx = Math.cos(angleOrNull);\r\n\t\t\t\tvar dy = Math.sin(angleOrNull);\r\n\t\t\t\tif(Math.abs(dx) > Math.abs(dy)) {\r\n\t\t\t\t\tif(dx > 0) nodeParams = '[right] ', x -= width / 2;\r\n\t\t\t\t\telse nodeParams = '[left] ', x += width / 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(dy > 0) nodeParams = '[below] ', y -= 10;\r\n\t\t\t\t\telse nodeParams = '[above] ', y += 10;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tx *= this._scale;\r\n\t\t\ty *= this._scale;\r\n\t\t\tthis._texData += '\\\\draw (' + fixed(x, 2) + ',' + fixed(-y, 2) + ') node ' + nodeParams + '{$' + originalText.replace(/ /g, '\\\\mbox{ }') + '$};\\n';\r\n\t\t}\r\n\t};\r\n\r\n\tthis.translate = this.save = this.restore = this.clearRect = function(){};\r\n}", "title": "" }, { "docid": "f5552dc81ab37f35a597185ab2a50f2f", "score": "0.50375223", "text": "function stringify (config) {\n const settings = xtend(config, this.data('settings'))\n\n this.Compiler = compiler\n\n function compiler (tree) {\n return toLaTeX(tree, settings, tree)\n }\n}", "title": "" }, { "docid": "54a6e2e41e9898ff543b109d5419a1bf", "score": "0.5014251", "text": "function fullSexp(text, tree) {\n let lastTextI = 0;\n function flushText(i) {\n let slice = text.slice(lastTextI, i);\n lastTextI = i;\n return slice ? [slice] : [];\n }\n function walk(node) {\n const preText = flushText(node.startIndex);\n const children = [].concat(...node.children.map(walk));\n const text = flushText(node.endIndex);\n const name = node.isNamed ? node.type : \"_anon\";\n return [...preText, [name, ...children, ...text]];\n }\n return [\"_root\", ...walk(tree.rootNode), ...flushText(text.length)];\n}", "title": "" }, { "docid": "2d43f9d1f3c76a42b03b5fc4c01260c8", "score": "0.49974522", "text": "Draw() {\n stroke(1)\n strokeWeight(0.4)\n textSize(this.textSize);\n fill(0);\n line(-this.w / 2, 0, this.w / 2, 0);\n for(let i = -( ( this.w/2) / this.xScale ); i < ( ( this.w/2) / this.xScale ); i += ( this.axisPxLabelJump / this.xScale )){\n text(i.toFixed(1), i * this.xScale, -1); \n }\n line(0, -this.h / 2, 0, this.h / 2);\n for(let i = -( ( this.h/2) / this.yScale ); i < ( ( this.h/2) / this.yScale ); i += ( this.axisPxLabelJump / this.yScale )){\n text(-i.toFixed(1), 1, i * this.yScale); \n }\n textSize(10);\n text(\"y\", 10, -(this.h * .92)/2);\n text(\"x\", (this.w * .92)/2,10);\n this.CalcExpressions();\n this.RenderExpression();\n }", "title": "" }, { "docid": "fbc19b90ad2cc12399974819751547fb", "score": "0.49908692", "text": "function fraccion(entero, numerador, denominador) {\n\treturn `<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"inline\" mathcolor=\"teal\" mathbackground=\"yellow\" mathsize=\"big\">\n\t${entero > 0 ? `<mn>${Number(entero)}</mn>` : ''}\n\t<mrow>\n\t\t<mfrac>\n\t\t\t\t<mrow>\n\t\t\t\t\t <mn>${Number(numerador)}</mn>\n\t\t\t\t</mrow>\n\t\t\t\t<mrow> \n\t\t\t\t\t <mn>${Number(denominador)}</mn> \n\t\t\t\t</mrow>\n\t\t </mfrac>\n\t</mrow>\n</math>`;\n}", "title": "" }, { "docid": "05870b3a9de17f6157edbb94d6ac7fa1", "score": "0.4973613", "text": "toMarkup(): string {\n return utils.escape(this.text);\n }", "title": "" }, { "docid": "7ff18f8cad800f4072964187ad585831", "score": "0.49715304", "text": "render(_weakmap, _treeNode) {\n }", "title": "" }, { "docid": "9814f5f1d1116c81d13f4ebaac2f083d", "score": "0.49683383", "text": "function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) {\n let parts = [];\n const node = path.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same.\n\n if (isBinaryish$1(node)) {\n // Put all operators with the same precedence level in the same\n // group. The reason we only need to do this with the `left`\n // expression is because given an expression like `1 + 2 - 3`, it\n // is always parsed like `((1 + 2) - 3)`, meaning the `left` side\n // is where the rest of the expression will exist. Binary\n // expressions on the right side mean they have a difference\n // precedence level and should be treated as a separate group, so\n // print them normally. (This doesn't hold for the `**` operator,\n // which is unique in that it is right-associative.)\n if (shouldFlatten$1(node.operator, node.left.operator)) {\n // Flatten them out by recursively calling this function.\n parts = parts.concat(path.call(left => printBinaryishExpressions(left, print, options,\n /* isNested */\n true, isInsideParenthesis), \"left\"));\n } else {\n parts.push(path.call(print, \"left\"));\n }\n\n const shouldInline = shouldInlineLogicalExpression(node);\n const lineBeforeOperator = (node.operator === \"|>\" || node.type === \"NGPipeExpression\" || node.operator === \"|\" && options.parser === \"__vue_expression\") && !hasLeadingOwnLineComment$1(options.originalText, node.right, options);\n const operator = node.type === \"NGPipeExpression\" ? \"|\" : node.operator;\n const rightSuffix = node.type === \"NGPipeExpression\" && node.arguments.length !== 0 ? group$b(indent$7(concat$d([softline$6, \": \", join$9(concat$d([softline$6, \":\", ifBreak$6(\" \")]), path.map(print, \"arguments\").map(arg => align$1(2, group$b(arg))))]))) : \"\";\n const right = shouldInline ? concat$d([operator, \" \", path.call(print, \"right\"), rightSuffix]) : concat$d([lineBeforeOperator ? softline$6 : \"\", operator, lineBeforeOperator ? \" \" : line$9, path.call(print, \"right\"), rightSuffix]); // If there's only a single binary expression, we want to create a group\n // in order to avoid having a small right part like -1 be on its own line.\n\n const parent = path.getParentNode();\n const shouldGroup = !(isInsideParenthesis && node.type === \"LogicalExpression\") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type;\n parts.push(\" \", shouldGroup ? group$b(right) : right); // The root comments are already printed, but we need to manually print\n // the other ones since we don't call the normal print on BinaryExpression,\n // only for the left and right parts\n\n if (isNested && node.comments) {\n parts = comments.printComments(path, () => concat$d(parts), options);\n }\n } else {\n // Our stopping case. Simply print the node normally.\n parts.push(path.call(print));\n }\n\n return parts;\n }", "title": "" }, { "docid": "dd4368df7d757021e856f10c9c4f6bda", "score": "0.49631238", "text": "function render(node, options) {\n if (options === void 0) { options = {}; }\n var nodes = \"length\" in node ? node : [node];\n var output = \"\";\n for (var i = 0; i < nodes.length; i++) {\n output += renderNode(nodes[i], options);\n }\n return output;\n}", "title": "" }, { "docid": "dd4368df7d757021e856f10c9c4f6bda", "score": "0.49631238", "text": "function render(node, options) {\n if (options === void 0) { options = {}; }\n var nodes = \"length\" in node ? node : [node];\n var output = \"\";\n for (var i = 0; i < nodes.length; i++) {\n output += renderNode(nodes[i], options);\n }\n return output;\n}", "title": "" }, { "docid": "dd4368df7d757021e856f10c9c4f6bda", "score": "0.49631238", "text": "function render(node, options) {\n if (options === void 0) { options = {}; }\n var nodes = \"length\" in node ? node : [node];\n var output = \"\";\n for (var i = 0; i < nodes.length; i++) {\n output += renderNode(nodes[i], options);\n }\n return output;\n}", "title": "" }, { "docid": "5eb9d34a64464900ddd7b3d10bdb096c", "score": "0.49543688", "text": "function makeHtml(data) {\n storage.get(['supportMath', 'katex', 'toc'], function(items) {\n // Convert MarkDown to HTML\n var preHtml = data;\n if (items.katex) {\n config.markedOptions.katex = true;\n preHtml = diagramFlowSeq.prepareDiagram(preHtml);\n }\n\n if (items.toc) {\n toc = [];\n const renderer = new marked.Renderer()\n const slugger = new marked.Slugger()\n const r = {\n heading: renderer.heading.bind(renderer),\n };\n\n renderer.heading = (text, level, raw, slugger) => {\n var anchor = config.markedOptions.headerPrefix + slugger.serialize(raw)\n\n toc.push({\n anchor: anchor,\n level: level,\n text: text\n });\n\n return r.heading(text, level, raw, slugger);\n };\n config.markedOptions.renderer = renderer;\n }\n\n initMarked()\n var html = marked.parse(preHtml);\n html = DOMPurify.sanitize(html, {\n ADD_ATTR: ['flow'],\n SANITIZE_DOM: false\n });\n\n if (items.toc) {\n var ctx = [];\n ctx.push('<div class=\"toc-list\"><h1 id=\"table-of-contents\">Table of Contents</h1>\\n<ul>');\n buildCtx(toc, 0, 0, ctx);\n ctx.push(\"</ul></div>\");\n html = ctx.join('') + html\n }\n $(document.body).html(html);\n $('img').on(\"error\", () => resolveImg(this));\n\n diagramFlowSeq.drawAllMermaid();\n postRender();\n });\n }", "title": "" }, { "docid": "165ac3d44688d7f0953f38fd8a8d56b0", "score": "0.49521375", "text": "function treeToHtml(tree) {\n // only leafs containing category\n if (tree.category) {\n return [' \"', tree.category, '\"'].join('');\n }\n\n var myBranch = {};\n var branchName = ['\"',tree.attribute,' ',tree.predicateName,' ',tree.pivot,' ?\"'].join('');\n\n myBranch[branchName] = {\n 'yes': treeToHtml(tree.match),\n 'no': treeToHtml(tree.notMatch)\n };\n\n return myBranch;\n}", "title": "" }, { "docid": "208574dd67f5acbca427197498b2df1a", "score": "0.49481574", "text": "toHtml() {\n return this.templEngine.renderMain(this.response);\n }", "title": "" }, { "docid": "68f6ebc071095a53a9e7c73fa7d0e6d3", "score": "0.49475768", "text": "_render() {\n return this.renderLabel(['\\u201c', this.literal, '\\u201d']).then(label => {\n let spans = label.selectAll('tspan'); // The quote marks get some styling to lighten their color so they are\n // distinct from the actual literal value.\n\n spans[0].addClass('quote');\n spans[2].addClass('quote');\n label.select('rect').attr({\n rx: 3,\n ry: 3\n });\n return label;\n });\n }", "title": "" }, { "docid": "2fd026c63a81033c0b64b0112e0f8ced", "score": "0.49451834", "text": "function ASTExpr()\n{\n}", "title": "" }, { "docid": "a70c485fe0ff009514cbcdbcbceb89c3", "score": "0.49363145", "text": "toStringOrdinaryLatex() {\n\t\tlet cuadraticTerms = \"(x-\" + this.h +\")^{2}\";\n\t\tlet nonCuadraticTerms = 4 * this.p + \"(y-\" + this.k + \")\";\n\t\tif(this.orientation === \"down\"){\n\t\t\tnonCuadraticTerms = \"-\" + nonCuadraticTerms;\n\t\t}else if(this.orientation === \"right\"){\n\t\t\tcuadraticTerms = cuadraticTerms.replace(\"x\", \"y\");\n\t\t\tnonCuadraticTerms = nonCuadraticTerms.replace(\"y\", \"x\");\n\t\t}else if(this.orientation === \"left\"){\n\t\t\tcuadraticTerms = cuadraticTerms.replace(\"x\", \"y\");\n\t\t\tnonCuadraticTerms = \"-\" + nonCuadraticTerms.replace(\"y\", \"x\");\n\t\t}\n\t\treturn (cuadraticTerms + \"=\" + nonCuadraticTerms).replace(/\\-\\-/g, \"+\").replace(/\\-\\+/g, \"-\");\n\t}", "title": "" }, { "docid": "55a471b24674cd3c488584140711ea11", "score": "0.49356654", "text": "render () {}", "title": "" }, { "docid": "fb83c539e91031b5c071351f7f5715a4", "score": "0.49315813", "text": "function render(self) {\n var container = isDOMElement(self.node) ? self.node : document.getElementById(self.node);\n var leaves = [], click;\n var renderLeaf = function (item) {\n var leaf = document.createElement('div');\n var content = document.createElement('div');\n var text = document.createElement('div');\n var expando = document.createElement('div');\n\n leaf.setAttribute('class', 'tree-leaf');\n content.setAttribute('class', 'tree-leaf-content');\n content.setAttribute('data-item', JSON.stringify(item));\n text.setAttribute('class', 'tree-leaf-text');\n text.textContent = item.name;\n expando.setAttribute('class', 'tree-expando ' + (item.expanded ? 'expanded' : ''));\n expando.textContent = item.expanded ? '-' : '+';\n content.appendChild(expando);\n content.appendChild(text);\n leaf.appendChild(content);\n if (item.children && item.children.length > 0) {\n var children = document.createElement('div');\n children.setAttribute('class', 'tree-child-leaves');\n forEach(item.children, function (child) {\n var childLeaf = renderLeaf(child);\n children.appendChild(childLeaf);\n });\n if (!item.expanded) {\n children.classList.add('hidden');\n }\n leaf.appendChild(children);\n } else {\n expando.classList.add('hidden');\n }\n return leaf;\n };\n\n forEach(self.data, function (item) {\n leaves.push(renderLeaf.call(self, item));\n });\n container.innerHTML = leaves.map(function (leaf) {\n return leaf.outerHTML;\n }).join('');\n\n click = function (e) {\n var parent = (e.target || e.currentTarget).parentNode;\n var data = JSON.parse(parent.getAttribute('data-item'));\n var leaves = parent.parentNode.querySelector('.tree-child-leaves');\n if (leaves) {\n if (leaves.classList.contains('hidden')) {\n self.expand(parent, leaves);\n } else {\n self.collapse(parent, leaves);\n }\n } else {\n emit(self, 'select', {\n target: e,\n data: data\n });\n }\n };\n\n forEach(container.querySelectorAll('.tree-leaf-text'), function (node) {\n node.onclick = click;\n });\n forEach(container.querySelectorAll('.tree-expando'), function (node) {\n node.onclick = click;\n });\n }", "title": "" }, { "docid": "db0054a96351e452f6f4990c6943e359", "score": "0.49220192", "text": "toStringGeneralLatex() {\n\t\tlet cuadraticTerms = \"x^{2}+\" + this.C +\"x\";\n\t\tlet linearTerms = this.D + \"y\";\n\t\tif(this.h === 0){\n\t\t\tcuadraticTerms = \"x^{2}\";\n\t\t}\n\t\tif(this.orientation === \"right\" || this.orientation === \"left\"){\n\t\t\tcuadraticTerms.replace(/x/g, \"y\");\n\t\t\tlinearTerms = linearTerms.replace(\"y\", \"x\");\n\t\t}\n\t\treturn (cuadraticTerms + linearTerms + \"+\" + this.F + \"=0\").replace(/\\+\\-/g, \"-\");\n\t}", "title": "" }, { "docid": "6e7ffc2286e4c5e9b5386278eb208e9b", "score": "0.49191988", "text": "function calculate() {\n var result;\n \n if (invalidEquationRegex.test(output.textContent)) {\n error();\n } else {\n try {\n result = eval(output.textContent);\n } catch (err) {\n error();\n return;\n }\n \n equation.textContent = output.textContent;\n output.textContent = result;\n }\n }", "title": "" }, { "docid": "7d83493d80cd33e9381a18f78789f226", "score": "0.49139208", "text": "typeset(node) {\n this._html\n .clear()\n .findMath({ elements: [node] })\n .compile()\n .getMetrics()\n .typeset()\n .updateDocument();\n }", "title": "" }, { "docid": "e61a4c3aaa72d392ec8ac70181933b64", "score": "0.49089056", "text": "function prepare_render(value,options){if(is_node(value)){var settings=$.extend({},options,{raw:true,finalize:function finalize(div){div.find('.terminal-render-item').replaceWith(value);if(options&&is_function(options.finalize)){options.finalize(div,self);}}});return['<div class=\"terminal-render-item\"/>',settings];}}// ---------------------------------------------------------------------", "title": "" }, { "docid": "644633b25e0f5b406cf1d9b2ce7213e4", "score": "0.49080193", "text": "function printAST(a){\r\n //where the result will be stored \r\n var result = \"{ \\n\";\r\n \r\n function helper(result, a){\r\n //go through all the key possibilities\r\n for(var i = 0; i<12; i++){\r\n // var key store the key string\r\n var key = Object.keys(a)[i];\r\n //if it stores another object, look if it's null or not\r\n if(key == \"templateinvocation\" || key == \"templatedef\" || key == \"itext\" || key == \"targs\" || key == \"tparam\" || key == \"next\" || key == \"dtext\"){\r\n \r\n if(a[Object.keys(a)[i]] == null){\r\n result = result + Object.keys(a)[i] + \": \" + a[Object.keys(a)[i]] + \",\" +'\\n';\r\n }\r\n \r\n else{\r\n result = result + Object.keys(a)[i] + \": \" + \"\\n\";\r\n result = result + printAST(a[Object.keys(a)[i]]) ;\r\n }\r\n }\r\n //print the key:value\r\n else if(key == \"name\" || key == \"OUTERTEXT\" || key == \"INNERTEXT\" || key == \"INNERDTEXT\" || key == \"pname\"){\r\n result = result + Object.keys(a)[i] + \": \" + '\"' + a[Object.keys(a)[i]] +'\",'+ '\\n';\r\n }\r\n \r\n }\r\n return result + \"},\" + '\\n';\r\n }\r\n return helper(result, a);\r\n}", "title": "" }, { "docid": "a114852edc74ee1e0269b04b95bc3e5c", "score": "0.48924243", "text": "function render(html, data) {\n var evalHtml = Engine.run(html, data);\n return evalHtml;\n}", "title": "" }, { "docid": "3ef4ae96dad4095eecda249b2072e044", "score": "0.48911697", "text": "function render(nodeContainer, data) {\n // TODO make a better caching system\n var cache = {};\n cache.padding = 5;\n var text = {};\n text.cache = {};\n text.cache.fontSize = 12;\n text.cache.alignmentBaseline = data.text.verticalAlign;\n text.cache.textAnchor = function() {\n if (data.text.textAlign == 'left'){\n return 'start';\n } else if (data.text.textAlign == 'right') {\n return 'end';\n } else {\n return 'middle';\n }\n };\n text.cache.x = function() {\n if (data.text.textAlign == 'left'){\n return -1 * data.width / 2;\n } else if (data.text.textAlign == 'right') {\n return data.width / 2;\n } else {\n return 0;\n }\n };\n text.cache.translate = {};\n // TODO replace this with the actual translate values\n text.cache.translate.dx = data.width / 2;\n text.cache.translate.dy = data.height / 2;\n text.line = {};\n text.line.cache = {};\n text.line.cache.y = [];\n var textLineCount = data.text.line.length;\n var i = 0\n data.text.line.forEach(function(line) {\n text.line.cache.y.push(i * text.cache.fontSize);\n i += 1;\n }); \n\n var textArea = nodeContainer.selectAll('g.text-area')\n .data(function(d) {\n return [data];\n })\n .enter()\n .append('g')\n .attr(\"id\", function (d) {\n return 'text-container' + pathvisiojs.view.pathwayDiagram.svg.convertToId(d['id']);\n })\n .attr('transform', function(d) {\n return 'translate(' + text.cache.translate.dx + ' ' + text.cache.translate.dy + ')';\n })\n .attr(\"class\", \"text-area\")\n .attr(\"style\", function (d) {\n var style = '';\n if (d.text.hasOwnProperty('color')) {\n style += 'fill:' + d.text.color + '; ';\n }\n if (d.text.hasOwnProperty('fontFamily')) {\n style += 'font-family:' + d.text.fontFamily + '; ';\n }\n if (d.text.hasOwnProperty('fontSize')) {\n style += 'font-size:' + d.text.fontSize + 'px; ';\n }\n if (d.text.hasOwnProperty('fontWeight')) {\n style += 'font-weight:' + d.text.fontWeight + '; ';\n }\n if (d.text.hasOwnProperty('fontStyle')) {\n style += 'font-style:' + d.text.fontStyle + '; ';\n }\n return style;\n });\n\n var textLine = textArea.selectAll('text')\n .data(function(d) {\n return d.text.line;\n })\n .enter()\n .append('text')\n .attr(\"id\", function (d, i) {\n return 'text-line' + i;\n })\n .attr(\"x\", text.cache.x)\n .attr(\"y\", function (d, i) { return (i - (textLineCount - 1)/2) * 1.1 + 'em';})\n .attr(\"alignment-baseline\", text.cache.alignmentBaseline) \n .attr(\"text-anchor\", text.cache.textAnchor)\n .text(function (d) { return d; });\n\n /*\n nodeText.attr('transform', function(d) {\n applyTextAlign(nodeText[0][0], d, function(translate) {\n return 'translate(' + translate.dx + ' ' + translate.dy + ')';\n });\n })\n //*/\n\n return nodeContainer;\n }", "title": "" }, { "docid": "ab631ab32c45366ae1a9de0c20df8522", "score": "0.48881185", "text": "function evaluateXenExpr() {\n playback.audioOn || playback.init();\n codeInput.placeholder = \"\";\n let inputExpr = codeInput.value;\n appendNewDiv(\"inputExpression\", `> ${inputExpr}`);\n\n if (inputExpr == 'clear') resultFeed.innerHTML = \"\";\n else if (inputExpr == 'help') displayHelp();\n else {\n // evaluate xen code\n try {\n // not case sensitive\n inputExpr = inputExpr.toLowerCase();\n // convert the previous answer with prefix operator\n if (inputExpr == \"#\" || inputExpr == \":\") inputExpr = inputExpr + \" ans\";\n // convert the previous answer with postfix operator\n else if (inputExpr == \"c\" || inputExpr == \"hz\") inputExpr = \"ans \" + inputExpr;\n // evaluate the current expression\n let allResults = evaluate(inputExpr);\n // display all returned values\n for (let result of allResults) {\n if (result) appendNewDiv(\"output\", `${result.value} (${result.type})`);\n }\n } catch (e) {\n appendNewDiv(\"error\", e);\n }\n }\n // reset input order\n while (futureInputs.length) pastInputs.push(futureInputs.pop());\n // add to stack if not empty string\n if (inputExpr) pastInputs.push(inputExpr);\n codeInput.value = \"\";\n codeInput.scrollIntoView();\n}", "title": "" }, { "docid": "9ed71f7f0c1583c90ceef5b5d1046fe0", "score": "0.4875959", "text": "generaAstE(exprs) {\n this.numeroNodo++;\n this.nombreHijo = \"nodo\" + this.numeroNodo.toString();\n this.arbolito += this.nombreHijo + \"[label=\\\"\" + exprs + \"\\\"];\\n\";\n this.arbolito += this.padre + \"->\" + this.nombreHijo + \";\\n\";\n }", "title": "" }, { "docid": "1ba4957e4c433bf43a28d0df6b1f0287", "score": "0.48682064", "text": "function parsedToTree(katexOutput){\n var crumbs = []\n var out = []\n var curSubExpr = []\n crumbs.push(curSubExpr)\n const parseStep = x => {\n if(!x){return}\n if(!curSubExpr){\n curSubExpr = []\n }\n if(x.type == \"atom\"){\n if(x.family == \"open\"){\n var newCur = []\n curSubExpr.push({paren: newCur})\n crumbs.push(curSubExpr)\n curSubExpr = newCur\n return\n }\n if(x.family == \"close\"){\n curSubExpr = crumbs.pop()\n return\n }\n }\n if(x.type == \"text\"){\n var string = \"\"\n x.body.forEach(textPc => {string += textPc.text})\n curSubExpr.push({textContent: \"\\\\text{\" + string + \"}\"})\n return\n }\n if(x.type == \"supsub\"){\n var scriptedObj = {}\n curSubExpr.push(scriptedObj)\n\n crumbs.push(curSubExpr)\n curSubExpr = undefined\n parseStep(x.base)\n scriptedObj.base = curSubExpr\n\n curSubExpr = undefined\n parseStep(x.sub)\n if(curSubExpr)\n scriptedObj.sub = curSubExpr\n\n curSubExpr = undefined\n parseStep(x.sup)\n if(curSubExpr)\n scriptedObj.sup = curSubExpr\n\n curSubExpr = crumbs.pop()\n return\n }\n if(x.type == \"ordgroup\"){\n var ordGroupObj = {}\n curSubExpr.push(ordGroupObj)\n crumbs.push(curSubExpr)\n\n curSubExpr = undefined\n x.body.forEach(parseStep)\n ordGroupObj.ord = curSubExpr\n\n curSubExpr = crumbs.pop()\n return\n }\n if(x.type == \"leftright\"){\n var parensObj = {}\n curSubExpr.push(parensObj)\n crumbs.push(curSubExpr)\n\n curSubExpr = undefined\n x.body.forEach(parseStep)\n parensObj.paren = curSubExpr\n\n curSubExpr = crumbs.pop()\n return\n }\n if(x.type == \"genfrac\"){\n var fracObj = {}\n curSubExpr.push(fracObj)\n crumbs.push(curSubExpr)\n\n curSubExpr = undefined\n parseStep(x.numer)\n fracObj.numer = curSubExpr\n\n curSubExpr = undefined\n parseStep(x.denom)\n fracObj.denom = curSubExpr\n\n curSubExpr = crumbs.pop()\n return\n }\n if(x.type == \"mathord\" || x.type == \"textord\"){\n curSubExpr.push({textContent: x.text, origin: \"parse\", type: x.type})\n }\n if(x.type == \"atom\"){\n curSubExpr.push({textContent: x.text, origin: \"parse\", type: x.type, family: x.family})\n }\n if(x.type == \"op\"){\n curSubExpr.push({textContent: x.name, origin: \"parse\", type: x.type})\n }\n }\n katexOutput.forEach(parseStep)\n if(crumbs.length != 1){console.warn(\"Mismatched brackets!\"); return undefined}\n return deepApply(validRules.singletonArrayReduce,curSubExpr)\n}", "title": "" }, { "docid": "3c72b8ac21c5aae9463e9cab06c54113", "score": "0.48654166", "text": "renderString(contents) {\n return this.engine.renderString(contents);\n }", "title": "" }, { "docid": "d0865512f1901575e28e70c6a804a033", "score": "0.4861655", "text": "generateTree() {\n const baseD = this.baseD.toLocaleString('fullwide', { useGrouping: false })\n const expV = this.intregralDegree * 1000000\n if (this.priceStart === 0) {\n return [\n {\n name: '18 ( Opcode Ternary)',\n children: [\n {\n name: '12 (Opcode <)',\n children: [\n {\n name: '1 (Opcode Variable)',\n },\n {\n name: '0 (Opcode Constant)',\n children: [\n {\n name: `${this.baseD} (Values)`,\n },\n ],\n },\n ],\n },\n {\n name: '7 (Opcode /)',\n children: [\n {\n name: '6 (Opcode x)',\n children: [\n {\n name: '0 (Opcode Constant)',\n children: [\n {\n name: `${this.c} (Values)`,\n },\n ],\n },\n {\n name: '1 (Opcode Variable)',\n },\n ],\n },\n {\n name: '0 (Opcode Constant)',\n children: [\n {\n name: `${this.baseD} (Values)`,\n },\n ],\n },\n ],\n },\n {\n name: \"20 (Opcode Bancor's power)\",\n children: [\n {\n name: '0 (Opcode Constant)',\n children: [\n {\n name: `${this.c} (Value)`,\n },\n ],\n },\n {\n name: '1 (Opcode Variable)',\n },\n {\n name: '0 (Opcode Constant)',\n children: [\n {\n name: `${baseD} (Value)`,\n },\n ],\n },\n {\n name: '0 (Opcode Constant)',\n children: [\n {\n name: `${expV} (Value)`,\n },\n ],\n },\n ],\n },\n ],\n },\n ]\n }\n }", "title": "" }, { "docid": "e0f3be2fd1325199e0c9e7a1493fa3ec", "score": "0.4855786", "text": "function draw_tree(){\n push_matrix();\n gl.uniform4f(u_diffuseColor, 0.5,1,0, 1); // draw green to the tree to the leaves\n installModel(objects[5]);\n currentModelNumber = 5;\n mat4.rotateX(modelview,modelview,-degToRad(90));\n mat4.translate(modelview,modelview,[0,0,0.8]);\n update_uniform(modelview, projection, 5);\n pop_matrix(); \n \n \n push_matrix();\n gl.uniform4f(u_diffuseColor, 0.545, 0.27, 0.0745, 1); // draw brown to the root of the tree\n installModel(objects[4]);\n currentModelNumber = 4;\n mat4.rotateX(modelview,modelview,-degToRad(90));\n mat4.scale(modelview,modelview,[0.7,0.7,0.7]);\n mat4.translate(modelview,modelview,[0,0,-0.25]);\n update_uniform(modelview, projection, 4);\n pop_matrix();\n \n \n \n \n}", "title": "" }, { "docid": "5f487eafd81ecc0df5147f99a37186d2", "score": "0.48512277", "text": "showNode () {\n\n return `Subject = ${this.subject}; ` +\n `Amount = ${this.amount}; ` + \n `Previous = ${this.prevPtr === null ? null : this.prevPtr.subject}; ` +\n `Next = ${this.nextPtr === null ? null : this.nextPtr.subject}`;\n\n }", "title": "" }, { "docid": "8baee3186c62f723a918a907704a316d", "score": "0.4847013", "text": "render() {\n const token2html = (token, tokentype, index) => {\n let output = token;\n if(tokentype == \"RUS\") {\n let words = this.props.story_text.lemmasOf(token).map((word) => word.label);\n let found = this.props.vocab_text.containsLemmas(words);\n if(this.props.colorize) {\n let level = this.props.story_text.levelOf(token);\n if(found) {\n output = `<b class=\"wordlevel${level}\">${output}</b>`\n } else {\n output = `<span class=\"wordlevel${level}\">${output}</span>`;\n }\n } else {\n if(found) {\n output = `<b>${token}</b>`;\n } else {\n output = token;\n }\n }\n } else {\n output = output.replace(/\\n/g, '<br>');\n }\n return output;\n };\n\n let html = this.props.story_text.mapTokens(token2html).join(\"\");\n \n document.querySelector(this.selector).innerHTML = html;\n }", "title": "" }, { "docid": "82d74da6541584dae5bd51377bc41a96", "score": "0.48352498", "text": "function printBinaryishExpressions(\n path,\n print,\n options,\n isNested,\n isInsideParenthesis\n) {\n let parts = [];\n const node = path.getValue();\n\n // We treat BinaryExpression and LogicalExpression nodes the same.\n if (isBinaryish(node)) {\n // Put all operators with the same precedence level in the same\n // group. The reason we only need to do this with the `left`\n // expression is because given an expression like `1 + 2 - 3`, it\n // is always parsed like `((1 + 2) - 3)`, meaning the `left` side\n // is where the rest of the expression will exist. Binary\n // expressions on the right side mean they have a difference\n // precedence level and should be treated as a separate group, so\n // print them normally. (This doesn't hold for the `**` operator,\n // which is unique in that it is right-associative.)\n if (util.shouldFlatten(node.operator, node.left.operator)) {\n // Flatten them out by recursively calling this function.\n parts = parts.concat(\n path.call(\n left =>\n printBinaryishExpressions(\n left,\n print,\n options,\n /* isNested */ true,\n isInsideParenthesis\n ),\n \"left\"\n )\n );\n } else {\n parts.push(path.call(print, \"left\"));\n }\n\n const right = concat([\n node.operator,\n shouldInlineLogicalExpression(node) ? \" \" : line,\n path.call(print, \"right\")\n ]);\n\n // If there's only a single binary expression, we want to create a group\n // in order to avoid having a small right part like -1 be on its own line.\n const parent = path.getParentNode();\n const shouldGroup =\n !(isInsideParenthesis && node.type === \"LogicalExpression\") &&\n parent.type !== node.type &&\n node.left.type !== node.type &&\n node.right.type !== node.type;\n\n parts.push(\" \", shouldGroup ? group(right) : right);\n\n // The root comments are already printed, but we need to manually print\n // the other ones since we don't call the normal print on BinaryExpression,\n // only for the left and right parts\n if (isNested && node.comments) {\n parts = comments.printComments(path, () => concat(parts), options);\n }\n } else {\n // Our stopping case. Simply print the node normally.\n parts.push(path.call(print));\n }\n\n return parts;\n}", "title": "" }, { "docid": "23dc4d2eaa4b21390adb05fd2ffccfe7", "score": "0.4829894", "text": "display() {\n console.log(\"-----------------------------------------------------\");\n console.log(`Input Expression : ${this.infixToPostFix.inputExpression}`);\n console.log(`Postfix Expression: ${this.infixToPostFix.outputExpression}`);\n console.log(`Result of the Evaluation : ${this.stack.pop()}`);\n console.log(\"-----------------------------------------------------\");\n }", "title": "" }, { "docid": "927d30a54d74f33796e9d60e0bef30e9", "score": "0.482611", "text": "function eval_expr() {}", "title": "" } ]
bc1ef834396a4b2a57d3adfef576da72
First 3 letters of the first name, first 5 letters of the last name, up to 3 random numbers. ex: jactanda325
[ { "docid": "5c68e99d08e505031cc9ae553fc8dfc1", "score": "0.7163287", "text": "function generateUsername(first_name, last_name) {\n const updatedFirstName = first_name.replace(/[^0-9a-z]/gi, '');\n const updatedLastName = last_name.replace(/[^0-9a-z]/gi, '');\n\n var username = updatedLastName.toLowerCase() + updatedFirstName.toLowerCase().substring(0, 1);\n username += Math.floor(Math.random() * Math.floor(MAX_ID));\n\n return username;\n}", "title": "" } ]
[ { "docid": "375452a705838579c33bf936e27a42a6", "score": "0.69684225", "text": "function generate_username(first_name, last_name, school_name) {\r\n\r\n // Shorten the first and last names to a single character and reduce the school name to a single word\r\n var first_name_char = get_first_character(first_name.toLowerCase());\r\n var last_name_char = get_first_character(last_name.toLowerCase());\r\n var school_name_word = get_first_word(school_name.toLowerCase());\r\n\r\n /* TODO\r\n Add check to database for duplicate usernames\r\n add a number to usernames that have already been taken\r\n a random number should be used to avoid inumeration\r\n */\r\n\r\n return `${first_name_char}${last_name_char}${school_name_word}`;\r\n}", "title": "" }, { "docid": "8a453717c97211e8080a14e3df2e4011", "score": "0.67164516", "text": "makeRandName(){\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for ( var i = 0; i < 5; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }", "title": "" }, { "docid": "b2a10f71b0c50704a647aa5a01a317ad", "score": "0.67061156", "text": "function generateName() {\n let first_names = ['Adam', 'Jules', 'Bob', 'John', 'Monica', 'Jesse', 'Derek', 'Zara', 'Alice', 'Joe', 'Sue'];\n let last_names = ['Doe', 'Smith', 'Park', 'Wu', 'Johnson', 'Aduba'];\n\n\n return first_names[Math.floor(Math.random()*first_names.length)] + ' ' + last_names[Math.floor(Math.random()*last_names.length)];\n}", "title": "" }, { "docid": "2521c90fc5602a3eb5181d71b654dd30", "score": "0.6685472", "text": "function getName() {\n\treturn firstnames[rand(firstnames.length)] + \" \" + lastnames[rand(lastnames.length)]\n}", "title": "" }, { "docid": "a343b012183a379477e1fd9d90a605e5", "score": "0.65745133", "text": "function Randomname (){\n let Firstnames = ['small', 'little', 'tiny', 'big', 'huge', 'THICC']\n let Middlenames = ['stinky', 'slimy', 'shiny', 'rough']\n let Lastnames = ['fangtooth','blobfish','goldfish','stargazer','sheaphead','dragonfish','jawfish','scorpionfish','frogfish','boxfish']\n\n let Firstname = Randomarray(Firstnames)\n let Middlename = Randomarray(Middlenames)\n let Lastname = Randomarray(Lastnames)\n return Firstname + ' ' + Middlename + ' ' + Lastname\n}", "title": "" }, { "docid": "ef5746e580d85cead4b16d083d9b032a", "score": "0.6570989", "text": "generateInitials() {\n const { fullName, username } = this;\n if (fullName) {\n return fullName\n .trim()\n .split(\" \")\n .map((name) => name.substring(0, 1))\n .join(\"\");\n }\n else if (username) {\n return username.substring(0, 2);\n }\n return false;\n }", "title": "" }, { "docid": "fb5664a1d02ba04390dea15d8af085db", "score": "0.65199596", "text": "function nameShuffler(str) {\n const name = str.split(\" \");\n const firstName = name.shift();\n const lastName = name.pop().replace(\"\", \"\");\n name.unshift(lastName.charAt(0) + lastName.slice(1));\n name.push(firstName);\n return name.join(\" \");\n}", "title": "" }, { "docid": "45c31d61a13443773558ba910dbe900b", "score": "0.64849615", "text": "generateAvatarInitials() {\n let avatarInitials = '';\n // Contains words split by space\n const splitWords = this.state.name.split(' ');\n\n if (splitWords.length >= 2) {\n // Two letter initials\n avatarInitials += (splitWords[0][0] + splitWords[splitWords.length - 1][0]);\n } else {\n // One letter initial\n avatarInitials += splitWords[0][0];\n }\n\n return avatarInitials;\n }", "title": "" }, { "docid": "46409e5b376beda70a7448841e2398cd", "score": "0.6450957", "text": "function generateName() {\r\n const alphabet = \"abcdefjhigklmnopqrstuvwxyzABCDEFJHIGKLMNOPQRSTUVWXYZ\";\r\n let result = \"\";\r\n for (let i = 0; i < 6; i++) {\r\n result += alphabet[Math.floor(Math.random() * 52)];\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "e27ae833705120ce584f80de2a27ea4c", "score": "0.64346105", "text": "function getNickname() {\n var names = [\"You Grow Girl!\",\"Encourage-Mints\",\"AloeYouVeraMuch\",\"PartyThyme\",\"WoodYouBeMine?\",\"Tree O’clock\",\"RomaineCalm\",\"Mint To Be\",\"Uno Moss\",\"Unbeleafable\",\"Leaf of Faith\",\"RootingForYou!\",\"IWetMyPlants\",\"PricklyPear\",\"Lookin' Sharp\",\"PrickleMyFancy\",\"sucCUTElent\",\"Plantastic24\",\"GoodChivesOnly\",\"Lettuce123\",\"LongThymeNoSee\",\"DontKaleMyVibe\",\"SpruceItUp!\",\"AloeThere\",\"KeanuLeaves\",\"TheBeetles\",\"BestFronds\",\"FlyCactiFly\",\"PeasOnEarth\",\"HostaLaVista\",\"Soilmates\",\"PricklyPear\",\"MeSoThorny\",\"ElvisParsley\",\"Ferntasic24\",\"JoeTheFungi\",\"LetTheBeetDrop\",\"Aloe-Ha\",\"CarrotsAreCool\",\"ImaBigDill\",\"HarryPotPlant\",\"KaleYeah!\",\"SimplyRadishing\",\"Sprout&Proud\",\"One In a Melon!\",\"BeetIt!BeetIt!\",\"PeaBerryPeaHappy\"];\n var randomName = names[Math.floor(Math.random() * names.length)];\n return randomName;\n}", "title": "" }, { "docid": "ed70d0cb838598a7b6ecb0e1e903c76a", "score": "0.63822883", "text": "randomFullName () {\n\t\treturn `${RandomString.generate(8)} ${RandomString.generate(10)}`;\n\t}", "title": "" }, { "docid": "d8be0a430035723ef1378a9285542259", "score": "0.63696206", "text": "function randomUsername() {\n return randomName('', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@$&_.');\n}", "title": "" }, { "docid": "d8be0a430035723ef1378a9285542259", "score": "0.63696206", "text": "function randomUsername() {\n return randomName('', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@$&_.');\n}", "title": "" }, { "docid": "fddd7fee6866cfdfc171881be03c7b43", "score": "0.63689286", "text": "function inName() {\n var splitName = bio.name.split(\" \");\n splitName[0] = splitName[0].slice(0,1).toUpperCase() + splitName[0].slice(1).toLowerCase(); // first name\n splitName[1] = splitName[1].toUpperCase(); // lastname\n finalName = splitName.join(\" \");\n return finalName;\n}", "title": "" }, { "docid": "79eeb153cfab1f812bacf9ffbdf36ba6", "score": "0.6363643", "text": "function firstThree (str){\n newStr = str.substring(0,3);\n if (str.length <= 3) {\n return newStr.toUpperCase();\n } else {\n return newStr\n }\n}", "title": "" }, { "docid": "6a975a4ba47ce5b6ec2f44e0565e7cc4", "score": "0.63282436", "text": "function generateLogin (_name, _lastName) {\n var nameFirstLetter = _name.substr(0,1),\n lastnemeLetters = _lastName.substr(0, 5),\n result = nameFirstLetter + lastnemeLetters;\n \n result = result.toLowerCase();\n result = checkLoginLength(result);\n \n return result;\n }", "title": "" }, { "docid": "4ebc1ca673a230ec8eeae8694140d525", "score": "0.6282742", "text": "function getUserName(fName, lName){\n let userName =\"\";\n // setting username equal to firstname plus last name in lower case\n userName = fName.toLowerCase() + lName.toLowerCase();\n return userName;\n }", "title": "" }, { "docid": "d842f862e6d1e09932d8a8b2bc0833d8", "score": "0.6277215", "text": "function createRandomUserName(maxNumber = 0)\n{\n const words = getValues();\n \n const adj = words.adjs[Math.floor(Math.random() * (words.adjs.length - 1))];\n const noun = words.nouns[Math.floor(Math.random() * (words.nouns.length - 1))];\n const number = createRandomNumber(10000, maxNumber);\n\n return `${ capitalizeString(adj) }${ capitalizeString(noun) }${ maxNumber !== 0 ? number : '' }`;\n}", "title": "" }, { "docid": "25bde94038083284df4cf169c46b14d1", "score": "0.6236476", "text": "function jediName(firstName, lastName) {\n let newName = firstName.slice(0, 2);\n let otherName = lastName.slice(0, 3);\n let bestName = otherName + newName;\n return bestName; \n}", "title": "" }, { "docid": "94f2765df713ef254c03f0dc1d25134f", "score": "0.6168836", "text": "function randomletter(){\n\tvar rlg = \"abcdefghijklmnoprstuvwxyz\";\n\tvar characterArray = rlg.split(\"\");\n\tvar firstLetter = characterArray[\n\t\tMath.floor(Math.random() *26)\n\t];\n\tvar secondLetter = characterArray[\n\t\tMath.floor(Math.random() *26)]\n\t// var firstLetterNumber = Math.random()\n\treturn firstLetter + \" \" + secondLetter;\n}", "title": "" }, { "docid": "2febf1e4cb49c7c8c831e82bbc1e3f02", "score": "0.616418", "text": "function genName() {\n let first = [\"Doom \", \"Fire \", \"Merciless \", \"Thunderous \", \"Wicked \", \"Epic \", \"Evil \", \"Nuclear \",\n \"Dark \", \"Poison \", \"Iron \", \"Explosive \", \"Hideous \", \"Hellacious \", \"Corrosive \",\n \"Acid \", \"Magma \", \"Chronic \", \"Unspeakable \", \"Mysterious \", \"Reckless \"\n ];\n let second = [\"Spitter\", \"Bash\", \"Fist\", \"Invasion\", \"Blast\", \"Night\", \"Ax\", \"Crusher\", \"Sting\",\n \"Spike\", \"Scream\", \"Riot\", \"Slice\", \"Tomb\", \"Sword\", \"Enslaver\", \"Titan\", \"Chomp\",\n \"Disaster\", \"Flood\", \"Hurricane\", \"Ninja\"\n ];\n let n_1 = first[Math.floor(Math.random() * first.length)];\n let n_2 = second[Math.floor(Math.random() * second.length)];\n return n_1 + n_2;\n }", "title": "" }, { "docid": "f0871369d84b598b0c991cb1a5c8ebeb", "score": "0.6163143", "text": "function getRandomResturantName(initialName)\r\n{\r\n var bShouldAddPrefix = Math.random() >= 0.5;\r\n\r\n if(bShouldAddPrefix)\r\n {\r\n var prefixes = [\"Good\", \"Best\", \"Geat\", \"Awesome\", \"Fantastic\"];\r\n return prefixes[Math.floor(Math.random() * prefixes.length)] + \" \" + initialName;\r\n }\r\n else\r\n {\r\n var suffixes = [\"Supreme\", \"King\", \"Legend\", \"Royale\", \"Mystic\"];\r\n\r\n return initialName + \" \" + suffixes[Math.floor(Math.random() * suffixes.length)];\r\n }\r\n}", "title": "" }, { "docid": "5125e3ef6ce5a45e8f546e650c33f4ef", "score": "0.61398613", "text": "function Name(first_name,last_name ){\n var greek =first_name+last_name;\n return greek;\n \n }", "title": "" }, { "docid": "192cec9f426e74d854aed2a181a02022", "score": "0.6126015", "text": "function random_name() {\n\t\tvar names = [\"Song\",\"Ami\",\"Georgiana\",\"Major\",\"Junko\",\"Willian\",\"Robby\",\"Ricki\",\"Scottie\",\"Deneen\",\"Micaela\",\"Kaycee\",\"Faviola\",\"Hang\",\"Nelda\",\"Hyun\",\"Chelsie\",\"Yasuko\",\"Tatum\",\"Meryl\",\"Louvenia\",\"Rachele\",\"Carmel\",\"Emeline\",\"Harris\",\"Dorsey\",\"Venita\",\"Gus\",\"Colby\",\"Indira\",\"Phylicia\",\"Keenan\",\"Brigida\",\"Augustina\",\"Maira\",\"Twyla\",\"Lauren\",\"Boris\",\"Qiana\",\"Yu\",\"Adrian\",\"Adella\",\"Robt\",\"Lia\",\"Mignon\",\"Mari\",\"Thanh\",\"Romona\",\"Renna\",\"Frida\",\"Adele\",\"Marlin\",\"Del\",\"Retta\",\"Treva\",\"Larae\",\"Whitley\",\"Katelynn\",\"Verena\",\"Reatha\",\"Markus\",\"Pandora\",\"Maryln\",\"Makeda\",\"Marry\",\"Cher\",\"Mitch\",\"Donita\",\"Charise\",\"Dalton\",\"Tressa\",\"Patricia\",\"Philomena\",\"Gerri\",\"Fredricka\",\"Kathe\",\"Charles\",\"Leonila\",\"Alisia\",\"Juliana\",\"Creola\",\"Candi\",\"Phoebe\",\"Kelsie\",\"Ellyn\",\"Anastasia\",\"Carolynn\",\"Sharron\",\"Kai\",\"Dennise\",\"Deloise\",\"Dudley\",\"Jessia\",\"Clair\",\"Luann\",\"Jessika\",\"Enriqueta\",\"Charlesetta\",\"Thao\",\"Inga\"];\n\t\treturn names[Math.floor(Math.random()*names.length)];\n\t}", "title": "" }, { "docid": "aba45ae9aa39f046173f278b8df2b2da", "score": "0.61115736", "text": "function randomizeF3L3(){\n\tvar name1 = charName[Math.floor(Math.random()*charName.length)];\n\tvar name2 = charName[Math.floor(Math.random()*charName.length)];\n\tvar verb2 = zombieVerbs[Math.floor(Math.random()*zombieVerbs.length)];\n\tformat3.haikuLine3 = name1.word + \" and \" + name2.word + \" \" + verb2.word + \".\";\n\tformat3.line3Syll = name1.syllables + 1 + name2.syllables + verb2.syllables;\n}", "title": "" }, { "docid": "f56e5e7989bc79a8f9c5da23b4618dc3", "score": "0.6104027", "text": "function getFirstName() {\n var email = getScriptEmail();\n var firstName = email.slice(0, email.indexOf(\".\"));\n firstName = firstName.charAt(0).toUpperCase() + firstName.substring(1);\n return firstName + \"_fake\";\n }", "title": "" }, { "docid": "3db0bc56dedbeca915988ad57c204f17", "score": "0.6096574", "text": "function fullName(first, last) {\n\treturn first + ' ' + last;\n}", "title": "" }, { "docid": "5ae88e36df88cd5f661f3df15d1dec05", "score": "0.60938627", "text": "function firstName(name){\n\tvar position = 0;\n\tposition=name.indexOf(\" \") + 1;\n\tconsole.log(\"My first name is \"+name.slice(0,position));\n}", "title": "" }, { "docid": "e1cdcd9ddb9490af80947dd9a7c9f08e", "score": "0.60830194", "text": "function shortenUsername(username) \n{\n if (username.length > 15)\n return username.substring(0, username.length - 3) + \"...\";\n else\n return username;\n}", "title": "" }, { "docid": "ad13b6d690b9094cd7d0a541b367db54", "score": "0.6082325", "text": "function fullName(first, last = 'Khan') {\n const name = first + ' ' + last;\n return name;\n}", "title": "" }, { "docid": "ffb1f234a383ed7f13c6ce892d6ac112", "score": "0.60812664", "text": "function aliasGen(f, l){\n // Code Here\n let fL = f[0].toUpperCase();\n let lL = l[0].toUpperCase();\n\n if (fL.charCodeAt(0) < 65 || fL.charCodeAt(0) > 90 || lL.charCodeAt(0) < 65 || lL.charCodeAt(0) > 90) {\n return \"Your name must start with a letter from A - Z.\";\n }\n return `${firstName[fL]} ${surname[lL]}`;\n \n}", "title": "" }, { "docid": "871bc924b731a07fceb4bbedbad9fe87", "score": "0.60758334", "text": "function greet3(firstName3, lastName3) {\n\tif (typeof firstName3 == 'undefined') {firstName3 = 'Richard';}\n\n\tif (typeof lastName3 == 'undefined') {lastName3 = 'Feynman';}\n\n\treturn 'Hey ' + firstName3 + ' ' + lastName3;\n}", "title": "" }, { "docid": "b3e5a4592fcda52c7f5cbdd6aad6e015", "score": "0.6075145", "text": "static generateValidUsername() {\n let name = faker.internet.userName();\n if (name.includes('.')) {\n name = User.generateValidUsername();\n }\n return name;\n }", "title": "" }, { "docid": "f3a9c41084fe43b8b3d00210671ceec0", "score": "0.60732585", "text": "function generateUsername() {\n\tconst username = [\n\t\t'user1', 'usesr2', 'user3', 'user4', 'user5'];\n\treturn username[Math.floor(Math.random() * username.length)];\n}", "title": "" }, { "docid": "8563e73add476ed354e0748e83a1fc24", "score": "0.606526", "text": "function GenRegistrationId(GivenName, MaxChars)\r\n{\r\n\tvar RetVal = \"\";\r\n\tvar WordsArray;\r\n\tvar CharIndex = 0;\r\n\tvar Index = 0;\r\n\tvar LoopCount = 0;\r\n\r\n\tif (GivenName && GivenName !== \"\")\r\n\t{\r\n\t\tWordsArray = GivenName.split(\" \");\r\n\t\t$.each()\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tRetVal += WordsArray[Index++].substr(CharIndex, 1);\r\n\t\t\tLoopCount++;\r\n\t\t\tif (LoopCount == MaxChars)\r\n\t\t\t{\r\n\t\t\t\treturn RetVal.toUpperCase() + (Math.floor(10000 + Math.random() * 90000));\r\n\t\t\t}\r\n\r\n\t\t\tif (Index == WordsArray.length)\r\n\t\t\t{\r\n\t\t\t\tIndex = 0;\r\n\t\t\t\tCharIndex++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn RetVal;\r\n}", "title": "" }, { "docid": "b614ea9c6fcb10b6c222ec24ed2fefc7", "score": "0.60563487", "text": "function randomUsername(){\n\t\tlet random = faker.vehicle.color() + faker.random.word();\n\t\treturn random;\n\t}", "title": "" }, { "docid": "5e52eaa626b0aaec6177017aa2170d7d", "score": "0.6054265", "text": "function doctorize1(firstName) {\n return `Dr. ${firstName}`;\n}", "title": "" }, { "docid": "afbb3ba2cc81734f52256eee2e6b334b", "score": "0.6034671", "text": "function randomName(contacts) {\n\treturn contacts[Math.floor(Math.random() * contacts.length)];\n}", "title": "" }, { "docid": "f6971b9369e9d9c593ab7abce3be3734", "score": "0.6030861", "text": "function socialSecurityNumberFinland() {\n let day, month, year, dateOfBirth;\n let lastThreeNumbers, lastCharacter;\n let bigString = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n day = Math.ceil(Math.random() * 31)\n if (day < 10 && day > 0) {\n day = '0' + day;\n }\n\n month = Math.ceil(Math.random() * 12)\n if (month < 10 && month > 0) {\n month = '0' + month;\n }\n\n year = Math.ceil(Math.random() * 99)\n if (year < 10 && year > 0) {\n year = '0' + year;\n }\n\n dateOfBirth = `${day}${month}${year}-`;\n\n lastThreeNumbers = Math.ceil(Math.random() * 999)\n if (lastThreeNumbers < 10) {\n lastThreeNumbers = '00' + lastThreeNumbers\n } else if (lastThreeNumbers < 100) {\n lastThreeNumbers = '0' + lastThreeNumbers\n }\n\n lastCharacter = bigString.charAt(Math.floor(Math.random() * bigString.length));\n\n\n\n return `${dateOfBirth}${lastThreeNumbers}${lastCharacter}`\n\n}", "title": "" }, { "docid": "c0515faa56eb70c4b832642866cf0582", "score": "0.600126", "text": "function NameMe(f,l){Object.assign(this,{firstName[cap(fst)]: ${surname[cap(lst)]}f, lastName:l, name:f+' '+l})}", "title": "" }, { "docid": "b4e3dc96eb8a78462805a9f6aa770fa8", "score": "0.60008603", "text": "function myName(firstName, middleName, lastName) {\n return middleName;\n}", "title": "" }, { "docid": "83cfba927454338562674e5a3ea2b487", "score": "0.5991572", "text": "function generateUsername() {\nvar firstNames = [\"Speed\", \"Virgin\", \"Chad\", \"Spooky\", \"Edgy\", \"Christian\", \"Lazy\", \"Spectral\", \"Brave\", \"Straight\", \"Godly\", \"Taino\", \"Nintendo\", \"SEGA\", \"Furious\", \"Fruity\", \"Lego\", \"Ghostly\", \"Ixis\", \"Rich\", \"Sound\"];\n \n// Create a second single array that holds the \"last\" 20 names that will be combined with the previous array to form a full name.\nvar lastNames = [\"Warrior\", \"Metalhead\", \"Trekkie\", \"Soul\", \"Drummer\", \"Guru\", \"Spaghetti\", \"Nerd\", \"Marine\", \"Dachshund\", \"Lambda\", \"Hero\", \"Jedi\", \"Fiddlesticks\", \"Tarsier\", \"Ninja\", \"Pirate\", \"Cowboy\", \"Punk\", \"Hedgehog\", \"Redneck\"];\n\n// Create a variable for the textarea in the HTML code and then create a for loop with math.random below to create random loops of the randomnly generated names.\nvar userInput = document.querySelector(\".userInput\").value; \n for (var i = 0; i < userInput; i++) { \n var randomizeName1 = firstNames[Math.floor(Math.random() * firstNames.length)];\n var randomizeName2 = lastNames[Math.floor(Math.random() * lastNames.length)];\n document.querySelector(\".result\").innerHTML += \"<br>Username: \" + randomizeName1 + \" \" + randomizeName2;\n } \n}", "title": "" }, { "docid": "5886db2a6b6286f88209cbc0267084b1", "score": "0.59823376", "text": "function gn() {\n var girlName1 = girlFirst[Math.floor(Math.random()*girlFirst.length)];\n var girlName2 = girlMiddle[Math.floor(Math.random()*girlMiddle.length)];\n document.getElementById(\"girlNameOutput\").innerHTML = girlName1 + ' ' + girlName2;\n}", "title": "" }, { "docid": "40f937904816e8164882df8f2fddf9eb", "score": "0.5967235", "text": "function genOne(usersFirstName) {\n // capitalize first letter for consistensy\n var firstChar = $('.firstName').val().charAt(0).toUpperCase();\n var charCount = $('.firstName').val().length;\n // override attempt\n // if even charcount\n if (usersFirstName = 'Ashley' && charCount % 2 === 0){\n // choose from this bank of names\n evenFirst();\n console.log('ashley');\n }\n // if odd charcount\n else {\n // choose from this bank of names\n oddFirst();\n }\n }", "title": "" }, { "docid": "e96e64e4af0524a8c02d1cea32a489be", "score": "0.5948363", "text": "function getShortName(person) {\n const maxLength = 20;\n\n const birthName = person.getDisplayName();\n const middleInitialName = `${person._data.FirstName} ${person._data.MiddleInitial} ${person._data.LastNameAtBirth}`;\n const noMiddleInitialName = `${person._data.FirstName} ${person._data.LastNameAtBirth}`;\n\n if (birthName.length < maxLength) {\n return birthName;\n } else if (middleInitialName.length < maxLength) {\n return middleInitialName;\n } else if (noMiddleInitialName.length < maxLength) {\n return noMiddleInitialName;\n } else {\n return `${person._data.FirstName.substring(0, 1)}. ${person._data.LastNameAtBirth}`;\n }\n }", "title": "" }, { "docid": "dd76439437a0067b27ea80c128dfcaa1", "score": "0.5944741", "text": "function tinyFriend(name){\n var small_name = name[0];\n for(var i = 0; i < name.length ; i++){\n var current_name = name[i];\n if(current_name.length < small_name.length){\n small_name = current_name;\n }\n }\n return small_name;\n}", "title": "" }, { "docid": "a6f929405cc5043804b695a1da84f6af", "score": "0.59434164", "text": "function returnFirstAndLastNameInitials(names) {\n return [...names].map(name => {\n const firtAndLastName = name.split(' ')\n const firstNameInitial = firtAndLastName[0][0]\n const lastNameInitial = firtAndLastName[1][0]\n\n return `${firstNameInitial}. ${lastNameInitial}.`\n })\n}", "title": "" }, { "docid": "e8e9c51f9a208d1e5b5890a7592b4c9a", "score": "0.59415287", "text": "function fullName(first, last) {\n return first + last;\n}", "title": "" }, { "docid": "58dcb6e9832c7a94e1cc75eca0ff91c9", "score": "0.593281", "text": "function makeFullName () { \nreturn nameIntro + firstName + \" \" + lastName; \n}", "title": "" }, { "docid": "6871c72037969dd2e35c0e32e0e5e980", "score": "0.5920823", "text": "function randomAlphanumeric(n) {\n\tvar id = '';\n var domain = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i=0; i < n; i++)\n id += domain.charAt(Math.floor(Math.random() * domain.length));\n\n return id;\n}", "title": "" }, { "docid": "93c2ed1aead1e5fcbb9d901c5e26e730", "score": "0.59092426", "text": "randomName () {\n\t\treturn 'company ' + RandomString.generate(12);\n\t}", "title": "" }, { "docid": "be5401fdb1dce7b14c6e53ebafe49cd9", "score": "0.5908608", "text": "returnFirstLastName() {\n let names = this._name.split(\" \");\n //remove middle names and surnames, e.g: jr., P., Sr.\n names = names.filter(piece => {\n \n if (!piece.includes(\".\")) {\n return true;\n };\n return false;\n });\n return names;\n }", "title": "" }, { "docid": "60e6fd9413df96f353607dd3c7fd3f8e", "score": "0.5899172", "text": "function getLeadName() {\n let names = [\"Momo\", \"Chi\", \"Toru\", \"Maru\", \"Mabel\"];\n let index = getRandomInt(names.length);\n return names[index];\n}", "title": "" }, { "docid": "47ae6e709921f16142b827442a4eee20", "score": "0.58828026", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n /* get a char and divide by alphabet-length */\n\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n} // ", "title": "" }, { "docid": "4d115a80307ed13461553ee0cd2dc8f9", "score": "0.587815", "text": "function fullName(first, last){\n let wholeName = first + \" \" + last;\n return wholeName; // Or return first + \" \" + last;\n}", "title": "" }, { "docid": "a8211bfa73ee1de12b8f3a163240c03d", "score": "0.5866492", "text": "function makeid_stg(){\n\tvar text = \"\";\n\tvar possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\tfor(var i=0; i<6; i++){text+=possible.charAt(Math.floor(Math.random()*possible.length));}\n\treturn text;\n}", "title": "" }, { "docid": "5a37bafb4723d4316185ccc11e2227b9", "score": "0.58641326", "text": "function getFirstName(fullName){\n return fullName.split(\" \")[0]\n}", "title": "" }, { "docid": "fe0ac111bb15882003df7cfc47abbda7", "score": "0.5862448", "text": "function makeFullName(){\n return nameIntro + firstName + ' ' + lastName;\n }", "title": "" }, { "docid": "60bb2429d99c44ab748c41327574f541", "score": "0.58530426", "text": "function fullNameAsPera(firstName, lastName) {\n let fullName = firstName + ' ' + lastName\n return fullName\n}", "title": "" }, { "docid": "f176bd51015bc63e4ada467a35619473", "score": "0.5842709", "text": "function get3LetterAcronym(word1, word2, word3) {\r\n return word1[0] + word2[0] + word3[0];\r\n}", "title": "" }, { "docid": "ed7ec11dd23744e6e06b033260e8fc7e", "score": "0.5839092", "text": "function makeid() // random 5 digit string generater\n\t\t{\n\t\t var text = '';\n\t\t var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n\t\t for( var i=0; i < 5; i++ )\n\t\t text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n\t\t return text;\n\t\t}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "4d2af0d86524d15b3e59022e2b9f9d5a", "score": "0.5832607", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n}", "title": "" }, { "docid": "9547a745c8e3868171d9d2a47e11ac16", "score": "0.5829076", "text": "function greet4(firstName4 = 'Michael', lastName4 = 'Faraday') {return 'Eyyo ' + firstName4 + ' ' + lastName4}", "title": "" }, { "docid": "6232ac84da78cbd660da7269f28faa42", "score": "0.582328", "text": "function getFullName(){\n return firstName + \" \" + secondName;\n}", "title": "" }, { "docid": "002a808f7d51a4f64d7602afd01c9caa", "score": "0.58071774", "text": "function inName() {\n\tvar oldName = bio.name;\n var finalName = oldName;\n array = oldName.split(' ');\n finalName = array[0][0].toUpperCase() + array[0].slice(1).toLowerCase() + ' ' + array[1].toUpperCase();\n return finalName;\n}", "title": "" }, { "docid": "8a9db6563d8d5ede8dbb177d52b13099", "score": "0.5801817", "text": "getShortname() {\n const fullname = this.getFullname();\n\n if(!fullname) {\n return '';\n }\n\n const nameParts = fullname.split(' ');\n const surname = nameParts[0];\n const name = nameParts[1] || null;\n const patronymic = nameParts[2] || null;\n\n let shortName = surname + ' ';\n\n if(name && name.slice) {\n shortName += name.slice(0, 1) + '.';\n }\n\n if(patronymic && patronymic.slice) {\n shortName += patronymic.slice(0, 1) + '.';\n }\n\n return shortName;\n }", "title": "" }, { "docid": "652928325c8d7f8e15383e1797575949", "score": "0.5801189", "text": "function generateAlphabeticName(code) {\n var name = '';\n var x;\n /* get a char and divide by alphabet-length */\n\n for (x = Math.abs(code); x > charsLength; x = x / charsLength | 0) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n }", "title": "" }, { "docid": "a1baed5bd5a761141294e1915e575f35", "score": "0.57951546", "text": "function initials(name){\n\tvar newName=\"\";\n\tvar position = 0;\n\tposition=name.indexOf(\" \") + 1;\n\tnewName= name.charAt(0) + \".\" + name.charAt(position) + \".\";\n\tconsole.log(newName);\n}", "title": "" }, { "docid": "ac1aecf4161e53e81d566cb8d022de4f", "score": "0.5793277", "text": "function createPhoneNumber(numbers){\n areaCode = '(' + numbers.slice(0,3).join('') + ') '\n telephoneNumber = numbers.slice(3,6).join('') + '-' + numbers.slice(6).join('')\n return areaCode + telephoneNumber\n}", "title": "" }, { "docid": "ee4fdb290bab683618f00ce39fa4ada1", "score": "0.5792365", "text": "function makeid() {\r\n var text = \"\";\r\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\r\n for (var i = 0; i < 5; i++)\r\n text += possible.charAt(Math.floor(Math.random() * possible.length));\r\n\r\n return text;\r\n}", "title": "" }, { "docid": "8bb665e9e44c0421bdd5f25e7bd740f3", "score": "0.57855546", "text": "function randomSN(length) {\n let result = \"\";\n let characters = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n let charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}", "title": "" }, { "docid": "4503bf3853edb2eca7ba6b85046ebbfe", "score": "0.5782178", "text": "function createUsernames(accs) {\n accs.forEach(function (acc) {\n acc.username = acc.owner\n .toLowerCase()\n .split(' ')\n //return first letter\n .map(function (name) {\n return name[0];\n })\n .join('');\n });\n}", "title": "" }, { "docid": "dcf8285cafa4f504e85be1f9e7fc98be", "score": "0.5778438", "text": "function generateAlphabeticName(code) {\n\t var name = '';\n\t var x = void 0;\n\t\n\t /* get a char and divide by alphabet-length */\n\t for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n\t name = getAlphabeticChar(x % charsLength) + name;\n\t }\n\t\n\t return getAlphabeticChar(x % charsLength) + name;\n\t}", "title": "" }, { "docid": "2c64d7055124e310cbe4dd4f215ecc52", "score": "0.5776892", "text": "function makeid() {\n\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\n for (var i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n\n }", "title": "" }, { "docid": "a178be25b424529e590512de08ecf374", "score": "0.5773055", "text": "function deriveNames(values){\n\tvar last = values.name.split(' ');\n\tlast = last[last.length -1];\n\tvalues.lastName = last[0].toUpperCase() + last.substr(1);\n\tvalues.firstName = values.name.substring(0,values.name.indexOf(' '))\n\tvalues.compareableName = values.name.replace(/[\\s\\-\\']/g,'').toLowerCase();\n}", "title": "" }, { "docid": "c462abf3e564dc4029c70fb0fb6a9d06", "score": "0.5771395", "text": "function generateAlphabeticName(code) {\n\t var name = '';\n\t var x = void 0;\n\n\t /* get a char and divide by alphabet-length */\n\t for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n\t name = getAlphabeticChar(x % charsLength) + name;\n\t }\n\n\t return getAlphabeticChar(x % charsLength) + name;\n\t}", "title": "" }, { "docid": "a18c10bfcb0419760f3ae01bc740f5e4", "score": "0.57634", "text": "function tinyFriend (names) {\n var smallName = names[0];\n for (var i = 0; i < names.length; i++) {\n var currentName = names[i];\n if (currentName.length < smallName.length) {\n smallName = currentName;\n }\n }\n return smallName; \n}", "title": "" }, { "docid": "4915ff5506ab53556ffcf8fb8cf25f74", "score": "0.5761084", "text": "function getInitials(name) {\n let initialsArr = name.split(\" \");\n let arrLen = initialsArr.length;\n let nameInitials = '';\n if (arrLen > 1) {\n nameInitials = initialsArr[0].charAt(0) + initialsArr[arrLen - 1].charAt(0);\n } else {\n nameInitials = initialsArr[0].charAt(0);\n }\n\n return nameInitials;\n}", "title": "" }, { "docid": "be4ddf602e5c5257e75b90532d40b68c", "score": "0.57610756", "text": "function getFirstName(name){\n // return firstName;\n // \"Steve Rogers\"\n name = name.split(\" \");\n // [ \"Steve\" , \"rogers\"];\n return name[0];\n\n}", "title": "" }, { "docid": "9ae7432cc3c365c51ca3f997dff42697", "score": "0.5758233", "text": "function lastName(name){\n\tvar position = 0;\n\tposition=name.indexOf(\" \") + 1;\n\tconsole.log(\"My last name is \"+name.slice(position));\n}", "title": "" }, { "docid": "1d2d0d8ad4572beea4b958391113a269", "score": "0.57573646", "text": "function makeid() {\r\n var text = '';\r\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n for (var i = 0; i < 5; i++) {\r\n text += possible.charAt(Math.floor(Math.random() * possible.length));\r\n }\r\n return text;\r\n }", "title": "" }, { "docid": "12e83e5f2066806f945b16e8e7680235", "score": "0.5755278", "text": "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n}", "title": "" }, { "docid": "86e7964abe6418e5516d61eb3e4c256e", "score": "0.5752616", "text": "function getLasttName() {\n var email = getScriptEmail();\n var lastName = email.slice(0, email.indexOf(\"@\"));\n var lastName1 = lastName.length - lastName.lastIndexOf(\".\") - 1;\n var lastName2 = lastName.slice(-lastName1, email.lastIndexOf(\"@\"));\n lastName = lastName2.charAt(0).toUpperCase() + lastName2.substring(1);\n return lastName + \"_fake\";\n }", "title": "" }, { "docid": "61887c94ebda71b6c276876d3da400b9", "score": "0.5750007", "text": "function fullName(firstName, lastName){\n return firstName + '' + lastName;\n}", "title": "" }, { "docid": "3fa40d78bc80ccd2b94182d8ab8f5ce1", "score": "0.5742698", "text": "function NameGiver(who) {\r\n var FemaleFirstNames = [\"Jaiden\", \"Judy\", \"Nia\", \"Kelis\", \"Chelsea\", \"Amani\", \"Veronica\", \"Kyra\", \"Lauryn\", \"Alicja\", \"Tate\", \"Colleen\", \"Melody\", \"Pippa\", \"Keziah\", \"Melissa\", \"Lana\", \"Marie\", \"Molly\", \"Sandra\", \"Dannielle\", \"Yusra\", \"Laiba\", \"Gabrielle\", \"Syeda\", \"Amirah\"];\r\n var MaleFirstNames = [\"Jerome\", \"Napoleon\", \"Duncan\", \"Brant\", \"Chance\", \"Dewitt\", \"Brendan\", \"Asim\", \"Faith\", \"Macy\", \"Landon\", \"Sulaiman\", \"Iestyn\", \"Gordon\", \"Hector\", \"Haris\", \"Lee\", \"Simran\", \"Ronnie\", \"Rishi\", \"Bartosz\", \"Shelley\", \"Virgil\", \"Howard\", \"Rio\"];\r\n var LastNames = [\"Paine\", \"Ward\", \"Bostock\", \"Devine\", \"Heath\", \"Bone\", \"Dupont\", \"Patterson\", \"Garza\", \"Stein\", \"Madden\", \"Francis\", \"Villanueva\", \"Perry\", \"Lyssa\", \"Beach\", \"Crouch\", \"Sharp\", \"Clifford\", \"Wade\", \"Vargas\", \"Hatfield\", \"Mata\", \"Lozano\", \"Everett\"];\r\n switch (CheckGender(who)) {\r\n case \"cuntboy\":\r\n case \"male\":\r\n who.FirstName = RandomString(MaleFirstNames);\r\n break;\r\n case \"hermaphrodite\":\r\n case \"female\":\r\n case \"dickgirl\":\r\n case \"doll\":\r\n who.FirstName = RandomString(FemaleFirstNames);\r\n break;\r\n }\r\n who.LastName = RandomString(LastNames);\r\n}", "title": "" }, { "docid": "438bb1365ad50de0679565f149453b1c", "score": "0.5742452", "text": "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n for( var i=0; i < 4; i++ )\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n}", "title": "" } ]
f727e4691fe7cde0657e4c9077c1df25
Response Times Over Time
[ { "docid": "f098e2b37db7ca762b0b49702415c9b2", "score": "0.0", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 10800000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" } ]
[ { "docid": "2924d18e98c07b54a492fd913a3b2388", "score": "0.71655875", "text": "function response_time(req, res){\n if (!res._header || !req._startAt) return '';\n var diff = process.hrtime(req._startAt);\n var ms = diff[0] * 1e3 + diff[1] * 1e-6;\n return ms.toFixed(3);\n}", "title": "" }, { "docid": "40e8ed840498099cb977a1ed8976f7b3", "score": "0.712974", "text": "async function calcResponseTime(ctx, next) {\n const start = Date.now();\n await next();\n const ms = Date.now() - start;\n ctx.set(responeTimeKey, `${ms} ms`);\n}", "title": "" }, { "docid": "217ef32eef8c57527f73e6e96d7dd734", "score": "0.6983907", "text": "function determineResponseTime(){\n\tvar m = Math.floor(Math.random() * 2000) + 500;\n\treturn m;\n}", "title": "" }, { "docid": "f773e50decd94335add9518c6ab0dfee", "score": "0.68029064", "text": "function getServerTime(res) {\n if (res.headers[\"x-response-time\"]) return parseInt(res.headers[\"x-response-time\"]);\n if (res.headers[\"x-runtime\"]) return Math.floor(res.headers[\"x-runtime\"] * 1000);\n return -1;\n }", "title": "" }, { "docid": "7bc75aea5ac3176ca078b198bd5a7e95", "score": "0.6598955", "text": "setCounterTime(state, response) { \r\n state.counterTime = state.counterTime - response;\r\n }", "title": "" }, { "docid": "afc7b25b2e82c79aed82fe6e0b6b4ba6", "score": "0.64776987", "text": "get timings() {\n var _a;\n return (_a = this[kRequest]) === null || _a === void 0\n ? void 0\n : _a.timings;\n }", "title": "" }, { "docid": "59e864959843b233f6cf5fe626959059", "score": "0.639537", "text": "get timings() {\n var _a;\n return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings;\n }", "title": "" }, { "docid": "59e864959843b233f6cf5fe626959059", "score": "0.639537", "text": "get timings() {\n var _a;\n return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings;\n }", "title": "" }, { "docid": "59e864959843b233f6cf5fe626959059", "score": "0.639537", "text": "get timings() {\n var _a;\n return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings;\n }", "title": "" }, { "docid": "34d74fb02edbbb8a777c2b1e81aba1aa", "score": "0.6383422", "text": "function get_site_response_time(host, callback) {\n var start = Date.now();\n request('https://ryanseys.com/up', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n if(body == 'yep\\n') {\n var dur = Date.now() - start;\n console.log(\"Site is up and responded in \" + dur + \" ms.\");\n callback(dur);\n }\n else {\n console.log('SITE IS DOWN');\n }\n }\n else {\n callback(null);\n }\n });\n}", "title": "" }, { "docid": "f1dfdb9b07bbaf98a90569b6f5a4a4ad", "score": "0.6354272", "text": "timeRes () { return this._timeRes }", "title": "" }, { "docid": "ea3a5e0df17457fab2353ca8d4a629c6", "score": "0.6343938", "text": "responseTime(data) {\n\n var avgTime = 0;\n var nbRequest = 0;\n var maxTime = 0;\n var minTime = Number.MAX_VALUE;\n\n data.map(element => {\n nbRequest++;\n avgTime = avgTime + element.delay;\n maxTime = (maxTime >= element.delay) ? maxTime : element.delay;\n minTime = (minTime <= element.delay) ? minTime : element.delay;\n });\n\n var avg = (nbRequest == 0) ? \"none\" : Math.round(avgTime / nbRequest);\n return {\n \"min\": minTime,\n \"avg\": avg,\n \"max\": maxTime\n };\n }", "title": "" }, { "docid": "479404878ab50905698ec7d3fbdfd82d", "score": "0.62463737", "text": "function getUserResponsetimeDifference(response_to,response_by,response_time,req,res,connection)\r\n {\r\n var isRespondedInTime = false;\r\n var sendAt;\r\n var query = \"select DATE_FORMAT(created_at,'%Y/%m/%d %T') As created_At from push_notification where send_from='\"+response_to+\"' AND send_to='\"+response_by+\"' ORDER BY id DESC LIMIT 1\";\r\n //console.log('push notification query: '+query);\r\n connection.query(query,function(err,rows,fields){\r\n if(!err){\r\n for (var i in rows) {\r\n //console.log('rows[i].created_at = '+ rows[i].created_At)\r\n sendAt=rows[i].created_At;\r\n }\r\n\r\n }\r\n else{\r\n console.log('Error in fetching user push notification detail'); //comment this line\r\n }\r\n\r\n console.log('response_time = ' +response_time + ' sendAt = '+sendAt );//Comment this line\r\n if(sendAt == null)\r\n {\r\n isRespondedInTime = false;\r\n }\r\n else if(response_time < sendAt)\r\n {\r\n isRespondedInTime = true;\r\n }\r\n else\r\n {\r\n isRespondedInTime = false;\r\n }\r\n\r\n console.log('isRespondedInTime = ' + isRespondedInTime);// comment this line\r\n process(isRespondedInTime,req,res,connection);\r\n }); \r\n }", "title": "" }, { "docid": "be662f81f97b5e1df06dc9a7a237e214", "score": "0.6236781", "text": "function getLastRequestTiming(){\n // Check performance support\n if (performance === undefined) {\n console.log(\"= Calculate Load Times: performance NOT supported\");\n return {};\n }\n\n // Get a list of \"resource\" performance entries\n var resources = performance.getEntriesByType(\"resource\");\n if (resources === undefined || resources.length <= 0) {\n console.log(\"= Calculate Load Times: there are NO `resource` performance records\");\n return;\n }\n logLoadTimes();\n const resource = resources[resources.length - 1];\n const {name, redirectStart, redirectEnd, domainLookupEnd, domainLookupStart, connectEnd, connectStart,\n secureConnectionStart, responseStart, responseEnd, startTime, requestStart, fetchStart} = resource;\n\n const redirectTime = redirectEnd - redirectStart;\n const dns = domainLookupEnd - domainLookupStart;\n const connect = connectEnd - connectStart;\n const ssl = secureConnectionStart > 0 ? connectEnd - secureConnectionStart : 0;\n const responseTime = responseEnd - responseStart;\n const total = fetchStart > 0 ? responseEnd - fetchStart : 0;\n return {\n dns, connect, ssl, receive: responseTime, total,\n }\n}", "title": "" }, { "docid": "72fa9de3066063384b1097a6b04e6fd6", "score": "0.6231633", "text": "function getServerTime(req, res) {\n\tvar time = new Date();\n\t\n\tvar result = {success: true, time: time};\n\tres.json(result); \n}", "title": "" }, { "docid": "d179f6994656534c75799338434826bd", "score": "0.621737", "text": "async getAllResponseTimes() {\n try {\n var query = await this.pool.query(queries.get.getAllResponseTimes);\n if (query) {\n if (query.rows) {\n //console.log(query.rows);\n return query.rows;\n }\n } \n } catch (err) {\n console.log('Error retrieving response times.');\n }\n return [];\n }", "title": "" }, { "docid": "4bbee8f05645324c98b1f2e1dfd946ce", "score": "0.6170999", "text": "function new_time_result(data){\n var latency = (Date.now() - data.c_time) / 2;\n var offset = data.s_time - Date.now();\n time_results.push({latency: latency, offset: offset});\n _choose_time_offset();\n }", "title": "" }, { "docid": "a35eeace88a90e2d97b084336c733d73", "score": "0.6143174", "text": "function handlePushNotificationResponse(req,res,connection){\r\n\r\n response_time = getCurrentDateTime();//\"0000 00 00 00:00:00\"\r\n getUserResponsetimeDifference(response_to,response_by,response_time,req,res,connection);// check user response less or greater than 90 sec\r\n \r\n \r\n}// End - handle APNS response - anas - 17 Sep 2015", "title": "" }, { "docid": "919f3312c09fa571349a52e551f3e06e", "score": "0.6120156", "text": "function callTime(response) {\n let utc = Date.now();\n let offsetTime = response;\n console.log(offsetTime);\n let newTime = utc + offsetTime;\n let updateTime = new Date(newTime);\n\n let days = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n let today = days[updateTime.getDay()];\n let hour = updateTime.getHours();\n let minute = updateTime.getMinutes();\n\n let displayTime = document.querySelector(\"#current-time\");\n \n if (minute < 10) {\n displayTime.innerHTML = `${today} ${hour}:0${minute}`\n } else {\n displayTime.innerHTML = `${today} ${hour}:${minute}`\n }\n}", "title": "" }, { "docid": "a9764ce569761b62f01dacd439439818", "score": "0.6118534", "text": "function calcResponseTime(site, iterations, siteIndex, numOfSites, testHandle, currentResponse) {\r\n\t// Map which stores the calculated results for given site.\r\n\tvar result = {};\r\n\tvar startTime = Date.now();\r\n\tvar siteHostName = getHostFromUrl(site);\r\n\t\r\n /*console.log('Calucating response for site [%s] with iterations [%s], this is site [%d] / [%d] . TestHandle = [%s]',\r\n siteHostName, iterations, siteIndex+1, numOfSites, testHandle);*/\r\n\r\n // Update global map with empty test result for this site.\r\n // TODO: Ideally response times should be zeroed based on user given iterations, instead of hardcoding it here.\r\n var siteResult = {\r\n \tsite : siteHostName,\r\n\t\tavg : 0,\r\n\t\tmax : 0,\r\n\t\tmin : 0,\r\n\t\tstartTestTime : startTime,\r\n\t\tendTestTime : Date.now(),\r\n\t\titerations : iterations,\r\n\t\tcurIterations : 0,\r\n\t\tcurResponseTimes : [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\r\n };\r\n var curSiteResultsMap = testHandleToResultMap[testHandle];\r\n if (curSiteResultsMap === null) {\r\n \t/*console.log('Current site results map empty for testHandle [%s]. Initializaing Map with empty results for site [%s]',\r\n \t\ttestHandle, siteHostName);*/\r\n \tcurSiteResultsMap = {};\r\n }\r\n curSiteResultsMap[siteHostName] = siteResult;\r\n // Put it back with testHandle\r\n testHandleToResultMap[testHandle] = curSiteResultsMap;\r\n\r\n\r\n // Trigger HTTP GET on given site and callback function has all the logic to update test results in global map.\r\n var request = {\r\n\t\thost : siteHostName,\r\n\t\tport : 80\r\n\t};\r\n\tfor (iterationCount = 0; iterationCount < iterations; iterationCount++) {\r\n\thttp.get(request, function (res) {\r\n\t\t// Compute the response time.\r\n\t\tvar responseTime = Date.now()-startTime;\r\n\t\t// Lets use Host name as the key for storing site results.\r\n\t\tvar host = res.req._headers.host;\r\n // Retrieve the test result from testHandle.\r\n console.log('Received response for site [%s] testHandle [%s], request took [%d]', host, testHandle, responseTime);\r\n var curSiteResultsMap = testHandleToResultMap[testHandle];\r\n if (curSiteResultsMap === null) {\r\n \tconsole.error(\"ERROR: Cannot find testHandle [%s] associated with site[%s]\", testHandle, host);\r\n \treturn;\r\n }\r\n // Retrieve existing result for this site from TestResult.\r\n var curSiteResult = curSiteResultsMap[host];\r\n if (curSiteResult === null) {\r\n \tconsole.error(\"ERROR: Cannot find siteResult for site [%s], associated with testHandle [%s]\", host, testHandle);\r\n return;\r\n }\r\n\r\n //console.log(\"Will update the response info for site [%s]\", host);\r\n var curIterations = curSiteResult.curIterations;\r\n // Add the response time to internal array, using iteration as index. Array is zero-indexed to increment curIterations later.\r\n var curResponseTimes = curSiteResult.curResponseTimes;\r\n curResponseTimes[curIterations] = responseTime;\r\n // Increment and Update iteration count.\r\n curIterations++;\r\n curSiteResult.curIterations = curIterations;\r\n // Compute and update average, min and max, by iterating through all the responseTimes we have so far.\r\n var newAvg = 0; \r\n for (valIndex = 0; valIndex < curSiteResult.iterations; valIndex++) {\r\n \tnewAvg = newAvg + curResponseTimes[valIndex];\r\n \tif (curSiteResult.min > responseTime || curSiteResult.min === 0) {\r\n \t\tcurSiteResult.min = responseTime;\r\n \t}\r\n \tif (curSiteResult.max < responseTime) {\r\n \t\tcurSiteResult.max = responseTime;\r\n \t}\r\n }\r\n newAvg = newAvg / curSiteResult.iterations;\r\n curSiteResult.avg = newAvg;\r\n\r\n // If TEST HAS COMPLETED!!, Update end time only if this is last iteration of test for this site.\r\n if (curSiteResult.iterations == curIterations) {\r\n \tcurSiteResult.endTestTime = Date.now();\r\n \t// Nullify non-required fields from result.\r\n \tdelete curSiteResult[\"curIterations\"];\r\n \tdelete curSiteResult[\"curResponseTimes\"];\r\n \t// Update status of Test\r\n \ttestStatusMap[testHandle] = \"finished\";\r\n \t// Write test result to file.\r\n \twriteTestToFile(\"alltests.txt\", curSiteResult);\r\n }\r\n // Push the site result back in the map.\r\n curSiteResultsMap[host] = curSiteResult;\r\n // Push the site results map back to global Test Results Map.\r\n testHandleToResultMap[testHandle] = curSiteResultsMap;\r\n\r\n /*console.log(\"Updated Response for site [%s] after iteration [%d] is : %s\",\r\n \thost, curIterations, JSON.stringify(curSiteResult));*/\r\n //console.log(\"Updated TestResult for handle [%s] is : %s\", testHandle, JSON.stringify(testHandleToResultMap));\r\n\t}); // http GET handler ends here.\r\n } // iteration for loop ends here.\r\n}", "title": "" }, { "docid": "89afa79783897808a43e77d1bfd0525f", "score": "0.60793763", "text": "latency() {\n return Date.now() - this.time;\n }", "title": "" }, { "docid": "9c5c728ce58761b9fdd9db7dc96032ff", "score": "0.60152185", "text": "metricTargetResponseTime(props) {\n return this.metric('TargetResponseTime', {\n statistic: 'Average',\n ...props,\n });\n }", "title": "" }, { "docid": "4994aadf311d6ca9a1d9c77cd3f46b87", "score": "0.59898007", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "2f77e926d60a901f459b00881fe15a10", "score": "0.5989466", "text": "function process(isRespondedInTime,req,res,connection)\r\n {\r\n if(isRespondedInTime)// if responded less than 90 sec\r\n {\r\n console.log('Responded within 90 seconds');// comment this line\r\n getUserStatus(response_to,req,res,connection);\r\n \r\n }\r\n else\r\n {\r\n console.log('Responded after 90 seconds');// comment this line\r\n\r\n // Treating second user as main user if requestor user is busy in playing or gone offline \r\n user_name=response_by;\r\n user_Lat=response_by_user_lat;\r\n user_Lon=response_by_user_long;\r\n page = 0; // Handled pagination on socket response (Force play)\r\n force_play_request = req;\r\n force_play_resource = res;\r\n from_user = user_name; \r\n\r\n checkOtherParametersFromDB(req,res,connection);\r\n }\r\n }", "title": "" }, { "docid": "9f988e839ed80a1705d771940baa0057", "score": "0.59323186", "text": "function getStartTime() {\n sendAjaxRequest('timer', null, function (xhttp) {\n responseCallback(xhttp, onError, function (xhttp) {\n var resObj = JSON.parse(xhttp.response);\n console.log(resObj);\n if(resObj['response'] !== undefined) {\n var timestamp = resObj['response'].timestamp;\n if(isNaN(timestamp) || timestamp === '\"\"' || timestamp === \"\") {\n getStartTime();\n } else {\n interval.timestamp = setInterval(countDown, 10, timestamp);\n }\n } else if(resObj['error'] !== undefined) {\n console.log(resObj);\n setStatus('disconnected', resObj['error']);\n } else {\n console.log(resObj);\n setStatus('disconnected', resObj['exception']);\n }\n });\n });\n}", "title": "" }, { "docid": "c8e5794539e8e82227b80b02eb9d2a7c", "score": "0.5931031", "text": "get time() { return(this.startTime?(new Date()).getTime()-this.startTime:0); }", "title": "" }, { "docid": "fc1a6ee59f32147ec89a43a526a02bb3", "score": "0.59163165", "text": "setFirstCounterTime(state, response) { \r\n state.counterTime = response;\r\n }", "title": "" }, { "docid": "fb7c81bf38e2a6d1030767afbc693313", "score": "0.59031487", "text": "function getTiming(callback) {\n getAppIp();\n var request = $http({\n method: \"POST\",\n //url: 'storage/timing.json'\n url: cfg.server_url + cfg.stat_url\n });\n request.success(function(data) {\n return callback(data);\n }).error(function() {\n console.log('Error: CommunicationStatistics');\n handleError(false, true);\n\n });\n }", "title": "" }, { "docid": "0bba919d932b73a3a6b1883707b85196", "score": "0.589473", "text": "function updateEndTime(response) {\n response.customData = response.customData || {};\n response.customData.time =\n new Date().getTime() - response.config.customData.startTime;\n return response;\n}", "title": "" }, { "docid": "729584b5d2cc202bf1e8008135389cb4", "score": "0.5887944", "text": "get nextRequestTime() {\n return this._nextRequestTime;\n }", "title": "" }, { "docid": "751d08c71984f2627624e9899e24f2cb", "score": "0.5871841", "text": "function timeRead(response) {\n var time = response.list[0][\"dt_txt\"];\n var hour = time.charAt(12)+time.charAt(13);\n return (24-parseInt(hour))/3;\n }", "title": "" }, { "docid": "efad1bd3cf633eaaec021619e3b5f39c", "score": "0.584443", "text": "function time(){\n return Date.now() + time_offset;\n }", "title": "" }, { "docid": "30da50f543ee7f66e6f8a5a8317320ba", "score": "0.58372855", "text": "function printTime(req,res,next){\n console.log(\"time: \",new Date())\n next()\n}", "title": "" }, { "docid": "87b414b4a70328a773004da13d88339f", "score": "0.58217126", "text": "function targetResponseTime(change) {\n return metric(\"TargetResponseTime\", Object.assign({}, change));\n }", "title": "" }, { "docid": "f543ce22ff76a56e99d19bdfd64e14db", "score": "0.5806501", "text": "function myTimer() {\n counter++;\n feedNo++;\n if (feedNo >= feedsCount) feedNo = 0;\n feed = config.feeds[feedNo];\n if (counter == maxTime) {\n console.log(getDateTime());\n counter = 0;\n } else {\n process.stdout.write('.');\n process.stdout.write(feed.title);\n }\n request({\n url: feed.url, //URL to hit\n qs: {from: 'feed example', time: +new Date()}, //Query string data\n method: 'GET', //Specify the method\n headers: { //We can define headers too\n 'Content-Type': 'MyContentType',\n 'Custom-Header': 'Custom Value'\n }\n }, function(error, response, body){\n // console.log(\"...returned\", error);\n if(error) {\n console.log(\"Feed err: \", error);\n } else {\n if (response.statusCode !== 200) {\n console.log(\"Status code: \", response.statusCode);\n } else {\n // if (!quiet) console.log(body);\n jsonObj = {};\n if (feed.type == \"xml\") {\n jsonObj = xml2json.parser( body );\n } else {\n jsonObj = JSON.parse(body);\n }\n jsonDiff = diff(jsonLast[feedNo], jsonObj);\n jsonLast[feedNo] = JSON.parse(JSON.stringify(jsonObj));\n \n // if (!quiet) console.log(jsonObj);\n\n if (jsonDiff) {\n var timeString = getDateTime().substring(11);\n console.log(timeString, \": \");\n\n jsonObj.logTime = getDateTime();\n jsonObj.title = feed.title;\n log2db(jsonObj, quiet);\n \n var jsonLog = {};\n jsonLog.changes = jsonDiff;\n jsonLog.logTime = getDateTime();\n jsonLog.title = feed.title;\n\n console.log(feedNo, \":::\", JSON.stringify(jsonLog));\n log2diff(jsonLog, quiet);\n \n }\n }\n }\n });\n}", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5798813", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5798813", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5798813", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5798813", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5798813", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "0df6082df8d5d752ee6ea75857335486", "score": "0.5719183", "text": "function formatTeeTimes (response, sessionAttributes) {\n var maxResponseLength = NO_TEE_TIMES\n if (response.TeeTimes.length >= TOO_MANY_TEE_TIMES) {\n // Only want to return top 5 results if more than 5\n maxResponseLength = TOO_MANY_TEE_TIMES\n } else if (response.TeeTimes.length < TOO_MANY_TEE_TIMES && response.TeeTimes.length > NO_TEE_TIMES) {\n maxResponseLength = response.TeeTimes.length\n }\n // var courseOutput = 'Here are your course options: '\n sessionAttributes['teeTimes'] = []\n for (var i = 0; i < maxResponseLength; i++) {\n // Convert the dates into date objects\n var startDateAndTime = new Date(response.TeeTimes[i].Time)\n // var endDateAndTime = new Date(response.items[i].maxTime)\n\n // Format them into the format of ' Thursday August 10 11:30 am'\n var dateFormatStartDate = date.format(startDateAndTime, 'dddd MMMM DD hh:mm A')\n // var dateFormatEndDate = date.format(endDateAndTime, 'dddd MMMM DD hh:mm A')\n\n // split the string up in order to reconstruct it for the response\n var startTimeInfo = dateFormatStartDate.split(' ')\n // var endTimeInfo = dateFormatEndDate.split(' ')\n\n // Reconstruct them\n // var startDate = startTimeInfo[0] + ' ' + startTimeInfo[1] + ' ' + startTimeInfo[2]\n var startTime = startTimeInfo[3] + ' ' + startTimeInfo[4]\n // var endTime = endTimeInfo[3] + ' ' + endTimeInfo[4]\n\n // var nameAndCity = getFacilityInfoFromTeeTime(response.TeeTimes[i].FacilityID, response.Facilities)\n var price = formatPriceTeeTimes(response.TeeTimes[i].DisplayRate.SinglePlayerPrice.TotalDue.Value)\n // Output to User\n var teeTimeOutput = ' Tee Time option ' + (i + 1) + ' is at '\n teeTimeOutput = teeTimeOutput + startTime + ' for '\n teeTimeOutput = teeTimeOutput + price[0] + ' dollars and ' + price[1] + ' cents. '\n\n sessionAttributes['maxTeeTimeLength'] = maxResponseLength\n sessionAttributes['teeTimes'].push(teeTimeOutput)\n }\n return new Promise((resolve, reject) => {\n resolve(sessionAttributes['teeTimes'][0])\n })\n}", "title": "" }, { "docid": "2b4561f46e729cd8c59fb8fa0297c6aa", "score": "0.57175237", "text": "function ask_time() {\n last_ask_time = Date.now();\n last_ask_numb = ++last_ask_numb;\n ws_send(lib.hexs_to_bytes([\n lib.u8_to_hex(lib.TIME),\n lib.u64_to_hex(last_ask_numb),\n ]));\n }", "title": "" }, { "docid": "8d0c0747a54c18aa6bc56085b4fff482", "score": "0.57062", "text": "function now(){\n return (new Date()).getTime() - timeDifference;\n}", "title": "" }, { "docid": "83e71d2d46ac52267af8bc0e3d5c4721", "score": "0.570347", "text": "getCurrentRequestTime() {\n console.warn(\"'getCurrentRequestTime' is deprecated and will be removed in a future version\");\n return this.latency();\n }", "title": "" }, { "docid": "11e683f78677f06039f30bbc031afb62", "score": "0.5688974", "text": "function checkRequestTimeout(){\n\tvar currentTime = new Date().getTime();\n\tif(lastRcvRequestTime != 0){\n\t\tif(currentTime - lastRcvRequestTime > 30 * 1000){\n\t\t\tlastRcvRequestTime = 0;\n\t\t\tendRefreshRequest(1);\n\t\t\talert(MESSAGE.DASHBOARD_LABLE_CHECKREQUESTTIMEOUT_ALERT);\n\t\t}\n\t}\n\t\n\tif(lastSndRequestTime != 0){\n\t\tif(currentTime - lastSndRequestTime > 30 * 1000 ){\n\t\t\tlastSndRequestTime = 0;\n\t\t\tendRefreshRequest(2);\n\t\t\talert(MESSAGE.DASHBOARD_LABLE_CHECKREQUESTTIMEOUT_ALERT);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "11e683f78677f06039f30bbc031afb62", "score": "0.5688974", "text": "function checkRequestTimeout(){\n\tvar currentTime = new Date().getTime();\n\tif(lastRcvRequestTime != 0){\n\t\tif(currentTime - lastRcvRequestTime > 30 * 1000){\n\t\t\tlastRcvRequestTime = 0;\n\t\t\tendRefreshRequest(1);\n\t\t\talert(MESSAGE.DASHBOARD_LABLE_CHECKREQUESTTIMEOUT_ALERT);\n\t\t}\n\t}\n\t\n\tif(lastSndRequestTime != 0){\n\t\tif(currentTime - lastSndRequestTime > 30 * 1000 ){\n\t\t\tlastSndRequestTime = 0;\n\t\t\tendRefreshRequest(2);\n\t\t\talert(MESSAGE.DASHBOARD_LABLE_CHECKREQUESTTIMEOUT_ALERT);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "91d9b9e7d4e843a10faf922bdf467498", "score": "0.56752145", "text": "function timedCount() {\n c = c - 1;\n if (c < 30) {\n var parms = {\n ok: true,\n cancel: false,\n message: \"No Activity. Click OK to continue\",\n loadTemplate: jwt.templates.loadPopUp,\n popCallback: function () {\n c = timeout;\n }\n };\n jwt.templates.loadTemplate(parms);\n }\n if (c < 0) {\n console.log('you are logged out');\n window.location.href = logoutLink;\n }\n\n t = setTimeout(function () {\n timedCount();\n }, 1000);\n }", "title": "" }, { "docid": "d4d3afd7a8c6cf12aebbca80bdbf5654", "score": "0.5622286", "text": "function pinger(){\n var date = new Date();\n var timeCheck = date.setMinutes(date.getMinutes() - 20);\n date = convDate(date);\n var spins = 0;\n\n twit.get('search/tweets', {\n q: '#NowPlaying jay-z since:'+date, count: 100\n }, function(err, data, response){\n// console.log(date);\n// console.log(data);\n\n for(i = 0; i < data.statuses.length; i++)\n {\n var tweetTime = new Date(data.statuses[i].created_at);\n tweetTime = tweetTime.setMinutes(tweetTime.getMinutes());\n //console.log(\"Check: \" + timeCheck + \" \" + \"Tweet: \" + tweetTime);\n if (timeCheck <= tweetTime)\n {\n //console.log(\"This is newer than 20 minutes\");\n spins++;\n }\n else\n {\n //console.log(\"This is older than 20 minutes\");\n }\n }\n\n //Here we pass the number of spins to the controler\n console.log(spins);\n spinner(60);\n\n });\n }", "title": "" }, { "docid": "c52cb3701ad6ad7a461b7fe52e3ac4e9", "score": "0.5617346", "text": "function totalTimeCounter() {\n util.timeCounter($userTimeSpent, $userTotalTime, $userTimePercent, 1800);\n $userTimeSpent.html(state.userTimeSpent);\n }", "title": "" }, { "docid": "5faebcc9e10402b6b99312aa339eea4e", "score": "0.56158966", "text": "function hour() {\n var requestURL ='http://'+IP_adresse+':'+port+'/api/hour';\n var request = new XMLHttpRequest();\n request.open('GET', requestURL);\n request.responseType = 'text';\n request.send();\n \n request.onload = function() {\n var hour = request.response;\n console.log();\n document.getElementById(\"hour\").innerHTML = hour;\n\n \n\n }\n\t//MODIFICAT 09/10/2020 10:42\n //setTimeout(hour, 2000); \n\tsetTimeout(hour, 4000);\n}", "title": "" }, { "docid": "202a9a5ac49bfc23306f9dafc4770dd0", "score": "0.56133014", "text": "get time() {\n\t\t\t\t\treturn (Date.now() - section.timestamp);\n\t\t\t\t}", "title": "" }, { "docid": "d4f63d8fa30cce4a7fa971eeaf376239", "score": "0.5608822", "text": "async function middleware(ctx, next) {\n\tconst start = new Date();\n\tawait next();\n\tconst ms = new Date() - start;\n\tctx.set(\"X-Response-Time\", `${ms}ms`);\n}", "title": "" }, { "docid": "3dee5d499351e7e2fbaa3f06def93fcb", "score": "0.55802256", "text": "function getEndTime(request){\n request.endTime = new Date(request.date);\n switch (request.duration){\n case \"30 分鐘\":\n request.endTime.setMinutes(request.date.getMinutes() + 30);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"45 分鐘\":\n request.endTime.setMinutes(request.date.getMinutes() + 45);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"1 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 60);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"2 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 120);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"3 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 180);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"4 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 240);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"5 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 300);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"6 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 360);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"7 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 420);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"8 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 480);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"9 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 540);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n case \"10 小時\":\n request.endTime.setMinutes(request.date.getMinutes() + 600);\n request.endTimeString = request.endTime.toLocaleTimeString();\n break;\n }\n}", "title": "" }, { "docid": "d4be8d8878a9af77fc8afcbd2262ba13", "score": "0.5555887", "text": "age() {\n let age = this._ageValue();\n\n const residentTime = (this.now() - this._responseTime) / 1000;\n return age + residentTime;\n }", "title": "" }, { "docid": "2ccc44d7f84d9b53214397223363c414", "score": "0.55558336", "text": "function count(respArray){\n\t var a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;\n var result = [];\n\t\tfor (var j = 0; j < respArray.length; j++) {\n\t\t\tif ( respArray[j].Duration < 1 ){\n\t\t\t\ta++;\n\t\t\t} else if ( respArray[j].Duration > 1 && respArray[j].Duration < 5){\n\t\t\t\tb++;\n\t\t\t} else if ( respArray[j].Duration > 5 && respArray[j].Duration < 10){\n\t\t\t\tc++;\n\t\t\t} else if ( respArray[j].Duration > 10 && respArray[j].Duration < 20){\n\t\t\t\td++;\n\t\t\t} else if ( respArray[j].Duration > 20 && respArray[j].Duration < 50){\n\t\t\t\te++;\n\t\t\t} else if ( respArray[j].Duration > 50){\n\t\t\t\tf++;\n\t\t\t}\n\t\t}\n\t\tresult.push(a,b,c,d,e,f);\n\t\treturn result;\n\t}", "title": "" }, { "docid": "ac7688213332d7ec2919eb5e2202f11c", "score": "0.5551822", "text": "function checkTime(){\n\tif(!commonInfo)\n\t\treturn;\n\tconsole.log(\"Checktime\");\n\tnow = new Date();\n\tserver = new Date(commonInfo.serverTime)\n\tif(server.getTime() < now.getTime()-1000 || \n\t server.getTime() > now.getTime()+10000 ){\n\t\t$(\"#warning\").text(\"Warning: Server time was \" + ((server - now)/1000.0) + \" seconds before client time while sending the page, all clocks may be incorrect.\");\n\t\tconsole.log(\"SetW\" + now+ commonInfo.serverTime+ server+ \"Warning: Server time \" + ((server - now)/1000.0) + \" seconds off, all clocks will be incorrect.\" );\n\t}else{\n\t\t$(\"#warning\").text(\"\");\n\t}\n\t\t//$(\"#warning\").text(\"Warning: Server time \" + ((server - now)/1000.0) + \" seconds off, all clocks will be incorrect.\");\n\n}", "title": "" }, { "docid": "677c55ec966aac3e875ca0bdcd2e3954", "score": "0.5551041", "text": "getTime(){\n return this.updatedTime-this.startTime;\n }", "title": "" }, { "docid": "c95b64d48b09c453fb2bbfcaae093a6c", "score": "0.555081", "text": "function statistics() {\n\tvar time = Date.now() - startTime - pauseTime;\n\tvar seconds = ((time / 1000) % 60).toFixed(2);\n\tvar minutes = ~~(time / 60000);\n\tstatsTime.innerHTML =\n\t\t(minutes < 10 ? '0' : '') + minutes + (seconds < 10 ? ':0' : ':') + seconds;\n}", "title": "" }, { "docid": "f65d6f61617a6a7fc3511d205028d7c8", "score": "0.55462074", "text": "static setTimeout(sendResponse, _timeoutMinutes){\n this.load(scatter => {\n inactivityInterval = TimingHelpers.minutes(_timeoutMinutes);\n scatter.settings.inactivityInterval = inactivityInterval;\n this.update(() => {}, scatter);\n });\n\n sendResponse(true);\n }", "title": "" }, { "docid": "7629924db8e2000e773eaff28ad80722", "score": "0.5540963", "text": "checkWaitTime()\n {\n makeRequest(\"/wait-time/\"+new Date().toISOString(), \"GET\")\n .then(response =>\n this.setState({waitTime: response.averageTimeInQueueSeconds, displayWaitTime: !this.state.displayWaitTime})\n )\n .catch(function (err) {\n console.log(err);\n // API call failed...\n });\n }", "title": "" }, { "docid": "e47e20ed3eddc3a869c4197eaea78416", "score": "0.5537138", "text": "function processData(timesArray){\n timesArray = timesArray.filter(function(d){return (d.signup_time != null);});\n timesArray.forEach(function(d) {\n d.date = new Date(Date.parse(d.signup_time));\n });\n //Sort times\n timesArray.sort(function (a,b) {return (new Date(a.date) - new Date(b.date))})\n var total = 1;\n timesArray.forEach(function(d){\n d.response = total++;\n });\n return timesArray;\n}", "title": "" }, { "docid": "7eaba84778d6fb127bd60ae063c5d1f3", "score": "0.5534862", "text": "checkTimeFrame() {\n if (this.tick % 120 == 0) {\n this.checkAvailability(this.history.getAll());\n }\n if (this.tick % 60 == 0) {\n this.displayInfo(this.history.getAll());\n } else {\n this.displayInfo(this.history.getHistory(Math.round(10 / this.timer) + 1));\n }\n\n }", "title": "" }, { "docid": "7c3396feac0f1e9fdc50dc0280e0c16e", "score": "0.5533078", "text": "function requestTime(id) {\n\t// prepare data\n\tlet data = {\n\t\tquery: anilist.query,\n\t\tvariables: { idMal: id }\n\t};\n\t// do request\n\tGM_xmlhttpRequest({\n\t\tmethod: \"POST\",\n\t\turl: anilist.api,\n\t\theaders: { \"Content-Type\": \"application/json\" },\n\t\tdata: JSON.stringify(data),\n\t\tonload: function(resp) {\n\t\t\tlet res = JSON.parse(resp.response);\n\t\t\tlet times = GM_getValue(\"anilistTimes\", {});\n\t\t\t// get data from response\n\t\t\tlet sched = res.data.Media.airingSchedule.nodes[0];\n\t\t\t// if there is no episode then it means the last episode just notYetAired\n\t\t\tif (!sched || !sched.episode) return;\n\t\t\tlet ep = sched.episode;\n\t\t\tlet timeMillis = sched.airingAt * 1000;\n\t\t\t// set time, ep is episode the timer is referring to\n\t\t\ttimes[id] = {\n\t\t\t\tep: ep,\n\t\t\t\ttimeMillis: timeMillis\n\t\t\t};\n\t\t\t// put times in GM value\n\t\t\tGM_setValue(\"anilistTimes\", times);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "996b9b4268a50b3b27a087b57e3c58b5", "score": "0.55304897", "text": "add(time, errorCode) {\n\t\tlog.debug('New value: %s', time);\n\t\tthis.partialTime += time;\n\t\tthis.partialRequests++;\n\t\tthis.totalTime += time;\n\t\tthis.totalRequests++;\n\t\tif (errorCode) {\n\t\t\terrorCode = '' + errorCode;\n\t\t\tthis.partialErrors++;\n\t\t\tthis.totalErrors++;\n\t\t\tif (!(errorCode in this.errorCodes)) {\n\t\t\t\tthis.errorCodes[errorCode] = 0;\n\t\t\t}\n\t\t\tthis.errorCodes[errorCode] += 1;\n\t\t}\n\t\tlog.debug('Partial requests: %s', this.partialRequests);\n\t\tconst rounded = Math.floor(time);\n\t\tif (rounded > this.maxLatencyMs) {\n\t\t\tthis.maxLatencyMs = rounded;\n\t\t}\n\t\tif (rounded < this.minLatencyMs) {\n\t\t\tthis.minLatencyMs = rounded;\n\t\t}\n\t\tif (!this.histogramMs[rounded]) {\n\t\t\tlog.debug('Initializing histogram for %s', rounded);\n\t\t\tthis.histogramMs[rounded] = 0;\n\t\t}\n\t\tthis.histogramMs[rounded] += 1;\n\t\tif (this.isFinished()) {\n\t\t\tthis.finish();\n\t\t}\n\t}", "title": "" }, { "docid": "05c01631eed5f9ac14b135ed7cc6e678", "score": "0.55268496", "text": "get answerTime() {\n\t\treturn this.__answerTime;\n\t}", "title": "" }, { "docid": "4f8edb4817f80da41148315ffbbe9297", "score": "0.5524723", "text": "function countDelay(delay) {\n\t //showtime.print('Getting difference between:'+lastRequest+\" and \"+showtime.time());\n\t var timeDiff = getTimeDifference(lastRequest,showtime.time())*1000;\n\t //showtime.print(\"time sinse last call:\"+timeDiff);\n\t if(timeDiff<delay) {\n\t //wait for the delay time to end\n\t return delay-timeDiff;\n\t }\n\t else {\n\t return 0; \n\t }\n\t \n\t}", "title": "" }, { "docid": "cbe9da9c37b2ccfe0087e488a1534bb4", "score": "0.5507027", "text": "function getHours(response, params) {\n\ttry {\n\t\tvar r = JSON.parse(response).data;\n\t\tdocument.getElementById(params.ID + \"-hours\").innerHTML = r;\n\t} catch(e) {\n\t\t// Error Occurred\n\t\talert(e);\n\t}\n\tajaxRequests -= 1;\n}", "title": "" }, { "docid": "5843af0fa1b365a4d0db7a92feef519b", "score": "0.5494872", "text": "get lifetime() { return Date.now() - stats.templateInit }", "title": "" }, { "docid": "a7ac76e48afacd2b7d7910c531c4487b", "score": "0.5486569", "text": "function testAPI (url, requests, rateLimit) {\n\tif (requests > 1) {\n\t\tvar count = new Array(requests).fill(0);\n\t\tvar results = count.map(function() {\n\t\t\tvar startTime = Date.now();\n\t\t\tvar result = request.sync(url);\n\t\t\tvar responsetime = Date.now() - startTime;\n\t\t\t//the below if statement checks if the responsetime is less\n\t\t\t//than 15 minutes/rateLimit, if it is, we wait \n\t\t\tif (responsetime < 900000/rateLimit) {\n\t\t\t\tvar waitTime = (900000/rateLimit)-responsetime;\n\t\t\t\tvar start = Date.now();\n\t\t\t\twhile (Date.now() != start+waitTime) {\n\t\t\t\t}//pretty hacky, but there isn't a nice wait() function\n\t\t\t}\n\t\t\tconsole.log(JSON.parse(result.body).forms[0]);\n\t\t\treturn responsetime;\n\t\t});\n\t\treturn results;\n\t} else {\n\t\tvar startTime = Date.now();\n\t\tvar result = request.sync(url);\n\t\tvar responsetime = Date.now() - startTime;\n\t\treturn responsetime;\n\t}\n}", "title": "" }, { "docid": "14608e069b47cc3c278b133c1dd6838b", "score": "0.54862356", "text": "function getData(time) {\n lastRequestedTime = time;\n return data\n}", "title": "" }, { "docid": "d3285eaee47ab4263ff72a165fd673dc", "score": "0.54754233", "text": "function outOfTime(){\n console.log(\"ooT function is called\");\n setUpResp();\n emptyQuestionDiv();\n $('#score').text('Bummer! You ran out of time!');\n incorrect++;\n responseInterval();\n\n }", "title": "" }, { "docid": "ddbe44c063aced0e7db411315ef3c5a2", "score": "0.54715484", "text": "function time() { return Math.round((new Date()).getTime() / 1000); }", "title": "" }, { "docid": "5f0fae10989cdb8c77511ec293bb7bb7", "score": "0.5467918", "text": "function getServerDateTime()\r\n{\r\n\treturn new Date().getTime()+_options.serverTimeDelta;\r\n}", "title": "" }, { "docid": "374598c0167b502eed04e9fd14612345", "score": "0.5464666", "text": "function getTime() {\n\t\t\t\treturn ClockIn.query().$promise.then(function(results) {\n\t\t\t\t\tangular.forEach(results, function(result) {\n\n\t\t\t\t\t\t// Add the loggedTime property which calls \n\t\t\t\t\t\t// getTimeDiff to give us a duration object\n\t\t\t\t\t\tresult.loggedTime = getTimeDiff(result.start_time, result.end_time);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn results;\n\t\t\t\t}, function(error) { // Check for errors\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "9ba78fc6ba0977703fd8d629002439fa", "score": "0.5461302", "text": "async lastAccessed(url) {\n let domain = this.getDomain(url);\n\n //console.log(\"Hi, so, we are accessing a time for \" + url);\n return new Promise((resolve) => {\n this.postMessage({\"kind\": \"lastAccessed\", \"domain\": domain}, (data) => {\n //console.log(\"Here is the time we read \" + data.time);\n resolve(data.time);\n });\n });\n }", "title": "" }, { "docid": "cf5655020cd131879f31e44996eef772", "score": "0.54578054", "text": "calculateTime() {\n // Assuming that we need 15 mins for every 3 ingredients\n const numOfIngredients = this.ingredients.length;\n const periods = Math.ceil(numOfIngredients / 3);\n this.time = periods * 15;\n }", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "007ab565f7c8a9186101aef05c8c6c25", "score": "0.54571074", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 3600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "c8012b5ef43eec097fed04a9803be3ac", "score": "0.5456598", "text": "function renderTime(params) {\n const postTime = new Date(params * 1000).getHours();\n const currentTime = new Date().getHours();\n const diff = currentTime - postTime;\n return diff;\n }", "title": "" }, { "docid": "0b7dd8b1499ec59fabc2df9759d4409e", "score": "0.54521024", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -21600000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "bc7770c07b490c087aa51c0ffb52a4e5", "score": "0.54498327", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -18000000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "bc7770c07b490c087aa51c0ffb52a4e5", "score": "0.54498327", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -18000000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "bc7770c07b490c087aa51c0ffb52a4e5", "score": "0.54498327", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -18000000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "bc7770c07b490c087aa51c0ffb52a4e5", "score": "0.54498327", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -18000000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "bc7770c07b490c087aa51c0ffb52a4e5", "score": "0.54498327", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -18000000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "bc7770c07b490c087aa51c0ffb52a4e5", "score": "0.54498327", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -18000000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "b8faecfb3c7ac03a57999346263cffc8", "score": "0.5449683", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -14400000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "b8faecfb3c7ac03a57999346263cffc8", "score": "0.5449683", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -14400000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "b8faecfb3c7ac03a57999346263cffc8", "score": "0.5449683", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -14400000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "b8faecfb3c7ac03a57999346263cffc8", "score": "0.5449683", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -14400000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "b8faecfb3c7ac03a57999346263cffc8", "score": "0.5449683", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, -14400000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" }, { "docid": "83b8c749f91383be59838ff89b7f3697", "score": "0.5448171", "text": "function refreshResponseTimeOverTime(fixTimestamps) {\n var infos = responseTimesOverTimeInfos;\n prepareSeries(infos.data);\n if(infos.data.result.series.length == 0) {\n setEmptyGraph(\"#bodyResponseTimeOverTime\");\n return;\n }\n if(fixTimestamps) {\n fixTimeStamps(infos.data.result.series, 25200000);\n }\n if(isGraph($(\"#flotResponseTimesOverTime\"))){\n infos.createGraph();\n }else{\n var choiceContainer = $(\"#choicesResponseTimesOverTime\");\n createLegend(choiceContainer, infos);\n infos.createGraph();\n setGraphZoomable(\"#flotResponseTimesOverTime\", \"#overviewResponseTimesOverTime\");\n $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\n });\n }\n}", "title": "" } ]
421de8cea1356654105e9b7bd8c87615
object that is already on the "stack" of items being processed.
[ { "docid": "eb95027676bf78581debf1ccfee7875a", "score": "0.0", "text": "function canonicalize(obj, stack, replacementStack) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n var i =\n /*istanbul ignore start*/\n void 0;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj =\n /*istanbul ignore start*/\n void 0;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);\n }\n\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if (\n /*istanbul ignore start*/\n (typeof\n /*istanbul ignore end*/\n obj === 'undefined' ? 'undefined' : _typeof$$1(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n key =\n /*istanbul ignore start*/\n void 0;\n\n for (key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(key)) {\n sortedKeys.push(key);\n }\n }\n\n sortedKeys.sort();\n\n for (i = 0; i < sortedKeys.length; i += 1) {\n key = sortedKeys[i];\n canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);\n }\n\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n\n return canonicalizedObj;\n }", "title": "" } ]
[ { "docid": "8187c6edf60c891a212afc0800e740c3", "score": "0.63133204", "text": "push(item){\n this.stack.push(item);\n }", "title": "" }, { "docid": "600ea595365f3193491e1182e7971a9b", "score": "0.62932897", "text": "push(item) {\n this.stack.push(item);\n }", "title": "" }, { "docid": "5c1122922ec8af466cb23440b24670e7", "score": "0.5956772", "text": "push(element) {\n // put element onto stack\n this.items.push(element)\n // set the top to the element we just put on\n this.top = element\n }", "title": "" }, { "docid": "b3097202f66798754668d69800777854", "score": "0.58193606", "text": "push(obj) {\n return this.data[this.top++] = obj;\n }", "title": "" }, { "docid": "5f0c107f05691d9cbce477ea8c3bfedb", "score": "0.578593", "text": "peek() {\n if (this.isEmpty()) return undefined\n let topItem = this.items[this.count - 1]\n logIntoConsole(\"The Top element in the stack is : \" + topItem)\n }", "title": "" }, { "docid": "113475bfea8a2167aafd7d3f03f2f064", "score": "0.5699673", "text": "push(item) {\n this.stack.push(item);\n if (this.maxesStack.peek() === null || item >= this.maxesStack.peek()) {\n this.maxesStack.push(item);\n }\n }", "title": "" }, { "docid": "b8b72bfe2907346230e5b1a75b20bf35", "score": "0.5660593", "text": "makeStack() {\n let stack = this.queue;\n this.queue = [];\n return stack;\n }", "title": "" }, { "docid": "ab5a6b1117e093d2c77cad8bdb609ca0", "score": "0.5612641", "text": "push(element) {\n this.items[this.count] = element\n // this.items.push(element) <-- Can also use this to push element into the array.\n this.count++\n logIntoConsole(\"The size of the stack is : \" + this.count.toString())\n\n }", "title": "" }, { "docid": "b6f2aa262fa1cd042b4d2368c8dfaf9b", "score": "0.5602897", "text": "push(newEntry)\n {\n this.stackObject.copyWithin(1,0);\n this.stackObject[0] = newEntry;\n if(this.currentLength != 8)\n {\n this.currentLength++; \n }\n }", "title": "" }, { "docid": "a36e71ee103e9379ebbaf54995b8e6a1", "score": "0.5596513", "text": "enqueue(item){\n\t\tqueue.unshift(item)\n\t}", "title": "" }, { "docid": "ecc123801dc77d0c114b90d3ecc713af", "score": "0.55729777", "text": "enqueue(item) {\n queue.unshift(item);\n }", "title": "" }, { "docid": "a39d968716b9a0e7f387d42f3df2f885", "score": "0.5567321", "text": "pushTop(element) {\n let temp = this.internalStack.get(this);\n temp.unshift(element);\n }", "title": "" }, { "docid": "7f86b7da1a20166224db95bb2d8da1df", "score": "0.5562925", "text": "peek() {\n if (this.items.length === 0) {\n console.log(\"No items in the queue\");\n return;\n }\n return this.items[0];\n }", "title": "" }, { "docid": "fc2b089ffaaa0e2a52b008327c4e8ff2", "score": "0.5553698", "text": "constructor(){\n\t\tthis.stack = [];\n\t}", "title": "" }, { "docid": "01169039587b020e1586b45baeef76e5", "score": "0.5552584", "text": "add(item) {\n this.queue.push(item);\n }", "title": "" }, { "docid": "4e7f89f738c020132d6e61fa431d60b6", "score": "0.5538211", "text": "_optionalTransform(item, done) {\n const pushedCount = this._pushedCount;\n this._transform(item, () => {\n if (pushedCount === this._pushedCount)\n this._push(item);\n done();\n }, this._boundPush);\n }", "title": "" }, { "docid": "3fdaacda8cc8a41df615011e9cc9b8b0", "score": "0.5523669", "text": "push(data){\n this.stack.push(data)\n this.top++\n }", "title": "" }, { "docid": "8f115396cc8c4d608421a7d6fde00ebd", "score": "0.55135375", "text": "pop() {\n this.items.pop();\n }", "title": "" }, { "docid": "c5b0b207b17e8380f795eb7b94c2d392", "score": "0.55124706", "text": "enQueue(item){\n this.items.push(item);\n }", "title": "" }, { "docid": "c5f999ee264b079228bb515eae790188", "score": "0.5492155", "text": "function Stack(){\n this.count = 0;\n this.storage = {};\n}", "title": "" }, { "docid": "46be40eb74149c7afe929957e9223dad", "score": "0.5486758", "text": "constructor() {\n this.items = [];\n this.size = 5;\n // Functions to be implemented\n // push(item)\n // pop()\n // peek()\n // printStack()\n }", "title": "" }, { "docid": "2f7f17a389f89458686c8ecda279f313", "score": "0.54785377", "text": "constructor() {\n\t\tthis.stack = [];\n\t}", "title": "" }, { "docid": "055a889321212a5e6cd2f82585491c1a", "score": "0.54719174", "text": "constructor() {\n this.stack = [];\n this.top = -1;\n this.size = 0;\n }", "title": "" }, { "docid": "cfd2b2ef9c3907a4cc7b8e4d3398ba6c", "score": "0.54688394", "text": "pop() {\n if (this.isEmpty()) return undefined\n let deleteItem = this.items[this.count - 1]\n this.customDelete(deleteItem)\n // this.items.pop() // can also use this in order to implement pop\n logIntoConsole(deleteItem + \"is popped out of the stack\")\n logIntoConsole(\"The size of the stack is : \" + this.count.toString())\n }", "title": "" }, { "docid": "7e1591a0481d7b6eac0c6696cdfdafb9", "score": "0.5465646", "text": "peek(){\n\t\treturn this.items[this.items.length - 1];\n\t}", "title": "" }, { "docid": "53145aa1485ca79caf11187f0d1548ef", "score": "0.5453798", "text": "function stackClear(){this.__data__=new ListCache();}", "title": "" }, { "docid": "53145aa1485ca79caf11187f0d1548ef", "score": "0.5453798", "text": "function stackClear(){this.__data__=new ListCache();}", "title": "" }, { "docid": "53145aa1485ca79caf11187f0d1548ef", "score": "0.5453798", "text": "function stackClear(){this.__data__=new ListCache();}", "title": "" }, { "docid": "53145aa1485ca79caf11187f0d1548ef", "score": "0.5453798", "text": "function stackClear(){this.__data__=new ListCache();}", "title": "" }, { "docid": "b4ce9e75384fa8bd577671b562f2430b", "score": "0.5453112", "text": "function Queue(){\nthis.stack1 = new Stack();\nthis.stack2 = new Stack();\n}", "title": "" }, { "docid": "79ea85a7f010695d1bae4551c3059b82", "score": "0.54323083", "text": "function stack() {\n this.top = 0;\n}", "title": "" }, { "docid": "2a6bcd97c6b6c0da98b42c80cda235a1", "score": "0.5413827", "text": "peek() {\n return items[size()-1];\n }", "title": "" }, { "docid": "c63714d39d9c9b26e9387f264f1f4a4a", "score": "0.5411347", "text": "peek() {\n if (this.items.length === 0) {\n return null;\n }\n return items[0];\n }", "title": "" }, { "docid": "03ee90332fc56e3b4b61abb2b4432f1b", "score": "0.5407788", "text": "pop() {\n\n // If the stack is empty, return null\n // (It would also be reasonable to throw an exception)\n if (!this.items.length) {\n return null;\n }\n return this.items.pop();\n }", "title": "" }, { "docid": "03ee90332fc56e3b4b61abb2b4432f1b", "score": "0.5407788", "text": "pop() {\n\n // If the stack is empty, return null\n // (It would also be reasonable to throw an exception)\n if (!this.items.length) {\n return null;\n }\n return this.items.pop();\n }", "title": "" }, { "docid": "03ee90332fc56e3b4b61abb2b4432f1b", "score": "0.5407788", "text": "pop() {\n\n // If the stack is empty, return null\n // (It would also be reasonable to throw an exception)\n if (!this.items.length) {\n return null;\n }\n return this.items.pop();\n }", "title": "" }, { "docid": "c1ee7b2b82a0885af08e9b76cf3a341d", "score": "0.5405868", "text": "function items_put_back(stack){\n\tif (stack.container){\n\t\tstack.apiPutBack();\n\t}\n\telse{\n\t\tthis.addItemStack(stack);\n\t}\n}", "title": "" }, { "docid": "7009fbaeb82ac8abf1df271299204d8b", "score": "0.53887063", "text": "function stack(){\n\tthis.data = [];\n\tthis.push = push;\n\tthis.pop = pop;\n\tthis.top = top;\n\tthis.contains = contains;\n\tthis.isEmpty = isEmpty;\n\tthis.size = size;\n}", "title": "" }, { "docid": "00c168d79eecd3183229dd64d9de7ea7", "score": "0.5385242", "text": "pop() {\n // If the stack is empty, return null\n // (It would also be reasonable to throw an exception)\n if (!this.items.length) {\n return null;\n }\n return this.items.pop();\n }", "title": "" }, { "docid": "b32428b85df7b5274ecd029b57bc7ec7", "score": "0.53825444", "text": "push( o )\n\t{\n\n\t\tif( this.m_index[ o ] === undefined )\n\t\t\tthrow new Error( \"The specified object does not belong to the pool\" );\n\n\n\t\tif( this.m_index[ o ] === o )\n\t\t\treturn; // object is already in pool\n\n\t\tthis.m_index[ o ] = o;\n\t\tthis.m_cache[ --this.m_position ] = o;\n\n\t}", "title": "" }, { "docid": "d89dd8c21e7455957dec6670a3838caa", "score": "0.53785026", "text": "function Queue(){\n this.inStack = [];\n this.outStack = [];\n}", "title": "" }, { "docid": "7ccaab6be3c99316320d7cfab539ea53", "score": "0.53736514", "text": "pop() {\n this._stack.pop();\n }", "title": "" }, { "docid": "09412381d34f048248850b27b0863ad0", "score": "0.53724223", "text": "put(item) {\n this.queue.push(item);\n if (this.size < this.queue.length) {\n this.queue.shift();\n }\n }", "title": "" }, { "docid": "e4b8b1d5e65ab3bd4844a4a9b9e9f02b", "score": "0.5371372", "text": "peek() {\r\n console.log(\"Element at the top of the stack\",this.st[(this.st.length) - 1]);\r\n }", "title": "" }, { "docid": "36d20cd690a23d92f597ad601e5ade39", "score": "0.536012", "text": "pop() {\n if(!this.isEmpty()) return this.items.pop()\n else console.log('ERRO EM pop(): PILHA VAZIA')\n }", "title": "" }, { "docid": "6c60ea4544f9fb932b076ee72c680b40", "score": "0.53600717", "text": "push(element) {\n let stack = items.get(sKey);\n stack.push(element);\n }", "title": "" }, { "docid": "712cf156e1faac5568945b36a129b5c2", "score": "0.5350181", "text": "deQueue(){\n return this.items.shift();\n }", "title": "" }, { "docid": "0559345dd10c8420b3d4b4f2f068f067", "score": "0.5338959", "text": "peek() {\n // Return the last item in \"items\" without removing it.\n return this.list[this.length - 1];\n }", "title": "" }, { "docid": "f0335730c7670407b1f9eb958de35c8c", "score": "0.5336696", "text": "function queue(arr, item) {\n arr.push(item);\n var removed = arr.shift();\n\n return removed; \n\n }", "title": "" }, { "docid": "a5dedf47c8944090ec93cc6bc2c81004", "score": "0.53346574", "text": "function Stack() {\n this.stack = {};\n this.length = 0;\n }", "title": "" }, { "docid": "487f3189929014c7b29a7a78b5fbe534", "score": "0.53327674", "text": "push(item) {\n this.length++\n this.storage[this.length] = item\n }", "title": "" }, { "docid": "b4fd022591fca24fc6049e8e507576dd", "score": "0.5330577", "text": "peek(){\n return this.top; \n }", "title": "" }, { "docid": "c62d030ac8d9134a5382552ff33e5b95", "score": "0.5328673", "text": "async pop() {\n this._must_not_closed()\n await this._wait_for_item()\n\n let front = this._items.shift()\n if (this._push_defer) {\n this._push_defer.resolve()\n }\n return front\n }", "title": "" }, { "docid": "ded761cd39bd38e08c36a26edf8bebdf", "score": "0.53264165", "text": "function stackClear(){this.__data__ = new ListCache();this.size = 0;}", "title": "" }, { "docid": "9b4b22045262dd33e8ca85de2b34f0be", "score": "0.5319945", "text": "peek() {\n return this.items[this.items.length-1];\n }", "title": "" }, { "docid": "a1ee0bd3032bc379a827303e8a0727dd", "score": "0.531575", "text": "function stack() {\r\n this.value = new Array() ;\r\n this.cursor = 0 ;\r\n}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "4b55fafeb441ed06a0974c64265b1750", "score": "0.53150207", "text": "function stackClear(){this.__data__=new ListCache();this.size=0;}", "title": "" }, { "docid": "a15a62591bd5c5b8e79789f6c58b88b9", "score": "0.5313223", "text": "constructor(){\n this.stack = [];\n }", "title": "" }, { "docid": "cafcf6efff486735215d897edbf3ddd3", "score": "0.5311562", "text": "peek() {\n console.log(`Top Element is ${this.items[this.count - 1]}`);\n return this.items[this.count - 1];\n }", "title": "" }, { "docid": "e80f377bd8beeda5f0a00fe6a556cb93", "score": "0.53017503", "text": "push(e) {\n this.items.push(e);\n this.size++;\n }", "title": "" }, { "docid": "e6e97ebb6d53cf19b25f6fe3a6160f85", "score": "0.52973217", "text": "async nextItem() {\n const { result: item, headers } = await this.executionContext.nextItem();\n return {\n result: item !== undefined ? item.payload : undefined,\n headers,\n };\n }", "title": "" }, { "docid": "ac968704c628673177478164d5f53cd7", "score": "0.5289899", "text": "function stackClear() {\n\t\t this.__data__ = new ListCache;\n\t\t }", "title": "" }, { "docid": "ac968704c628673177478164d5f53cd7", "score": "0.5289899", "text": "function stackClear() {\n\t\t this.__data__ = new ListCache;\n\t\t }", "title": "" }, { "docid": "840169911d15f66dc4658f6e9835ed75", "score": "0.52878565", "text": "enqueue(item) {\n this.queue[parseInt(this.rear)] = item;\n this.rear += 1;\n }", "title": "" }, { "docid": "bb917fb1c6b59344705fa445dd37aa5a", "score": "0.5284659", "text": "function newTomb(obj) {\n\tvar extraTomb = objArray.length;\t\t\n\tobjArray[extraTomb] = new item(2);\n\tobjArray[extraTomb].left = obj.left;\n\tobjArray[extraTomb].top = obj.top;\n\tobjArray[extraTomb].id = extraTomb;\n\treturn extraTomb;\n}", "title": "" }, { "docid": "7a84d1b2abaff85dc9e38967c3b343c1", "score": "0.5281215", "text": "ADD_ITEM(state, item) {\n state.bayiler.unshift(item)\n }", "title": "" }, { "docid": "e1db90dbc2a8d752409b27c21d6db518", "score": "0.5277348", "text": "function Stack () {\n this.top = 0;\n this.storage = {};\n}", "title": "" }, { "docid": "9b9042f6fb8441fc7e47078767759795", "score": "0.5276269", "text": "remove() {\n // remove top most element on stack\n this.data.pop(this.data.length);\n }", "title": "" }, { "docid": "fc549e1143c2ea3401c11d940c096b1d", "score": "0.52741927", "text": "function ImmediateItem( ) { }", "title": "" }, { "docid": "507b1278118cd71842811683a121a485", "score": "0.5272666", "text": "restore() {\n this.stack.pop();\n // Never let the stack be totally empty\n if (this.stack.length < 1) {\n this.stack[0] = m3.identity();\n }\n }", "title": "" }, { "docid": "c8ef1ef5194b72fd7de6fcd2fdecd260", "score": "0.52678597", "text": "_stackPush() {\n while (this.enqueueStack.isEmpty() == false) {\n this.dequeueStack.push(this.enqueueStack.pop());\n }\n }", "title": "" }, { "docid": "be391b94685a005c1875beddce2bd8d0", "score": "0.526682", "text": "function Stack(){\n this.items = new Array();\n var that = this;\n\n return {\n empty: function(){\n return that.items.length === 0;\n },\n push: function(val){\n that.items.push(val);\n },\n pop: function(val){\n that.items.pop(val);\n },\n peek: function(){\n return that.items[that.items.length - 1];\n },\n search: function(val){\n var location = that.items.indexOf(val);\n\n // if the item does not exist in the stack return .1\n if (location === -1) return .1;\n\n return that.items.length - 1 -location;\n }\n }\n\n}", "title": "" }, { "docid": "50d7b35873967e5479c5306e11bd56c5", "score": "0.52664644", "text": "peek(){\n if (this.top == -1) {\n return -1\n }\n let data = this.stack[this.top]\n return data\n }", "title": "" }, { "docid": "848c49f8b0ab8f69619149f4ac7b9538", "score": "0.5263897", "text": "push(item) {\n this.items.push(item);\n this.size++;\n }", "title": "" }, { "docid": "925067d811d60e4b573f68b0167b39f2", "score": "0.5260511", "text": "peek() {\r\n\t\treturn this.items[this.items.length - 1];\r\n\t}", "title": "" }, { "docid": "99d34fadf01f976329b47dac7eb71607", "score": "0.52565694", "text": "function stackClear(){this.__data__=new ListCache;this.size=0}", "title": "" }, { "docid": "a9c5e45ddd72e3d82e2db46088fd689b", "score": "0.5253756", "text": "front(){\n return this.items[0]; // first item in queue is index 0 in the array\n }", "title": "" }, { "docid": "bc107ae86e858df1a848945544623154", "score": "0.52500355", "text": "peek() {\n if (this.isEmpty()) {\n console.log(\"Stack Empty.\");\n return;\n }\n let temp = this.arr[this.top];\n return temp;\n }", "title": "" }, { "docid": "4ded7479943e527e844610225f702cd0", "score": "0.5249964", "text": "peek() {\n if (!this.isEmpty()) {\n return this.stack[this.top];\n }\n }", "title": "" }, { "docid": "3aa088096318e85bcfda4f9c80c04df6", "score": "0.5249805", "text": "peek() {\n return this.items[this.items.length - 1];\n }", "title": "" }, { "docid": "3aa088096318e85bcfda4f9c80c04df6", "score": "0.5249805", "text": "peek() {\n return this.items[this.items.length - 1];\n }", "title": "" }, { "docid": "3aa088096318e85bcfda4f9c80c04df6", "score": "0.5249805", "text": "peek() {\n return this.items[this.items.length - 1];\n }", "title": "" }, { "docid": "37cd3b5219f56021e8edd844b0f6b539", "score": "0.5238982", "text": "enqueue(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "37cd3b5219f56021e8edd844b0f6b539", "score": "0.5238982", "text": "enqueue(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "a214dd94e006a5f2fc30d11c82734d31", "score": "0.52341634", "text": "function stackClear() {\r\n this.__data__ = new ListCache;\r\n}", "title": "" }, { "docid": "f8c0590352579719233a3db05009ee74", "score": "0.5228591", "text": "add (item) {\n\t\tthis.heap.push(item)\n\t\tthis.heapifyUp()\n\t}", "title": "" }, { "docid": "73a18d75b7c765fe8fcd0791d69987b6", "score": "0.522469", "text": "peek () {\n return this.items[this.items.length - 1];\n }", "title": "" } ]
9d7aa3355d00693d4e4c51229ff50b7f
Checks if the url is one of the special cases above
[ { "docid": "44e8d2e573e662a4c6869d1e703ea1b8", "score": "0.73279816", "text": "function checkIfSpecialCase() {\n var vreturn = false;\n $.each( specialCases, function(index, spec){\n if(isFunction(spec.url)){\n if(spec.url()) {\n vreturn = spec;\n }\n return false; // break out of each loop\n } else if(window.location.host.search(spec.url) != -1){\n // We have a special case!\n vreturn = spec;\n return false; // break out of each loop\n }\n });\n return vreturn;\n }", "title": "" } ]
[ { "docid": "64d33fc0be10bdb2a882bc8dd4700e2a", "score": "0.772603", "text": "function urlValid(url){\r\n\t\tif(url.indexOf(\"chrome\")===0)\r\n\t\t\treturn false;\r\n\t\tif(url.indexOf(\"about\")===0)\r\n return false;\r\n for(var i in unsupported){\r\n if(url.lastIndexOf(unsupported[i])===url.length - unsupported[i].length){\r\n return false;\r\n }\r\n }\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "649608aae21c93e4dda0ffbf55293819", "score": "0.74314034", "text": "function validUrl() {\n var re = /^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/;\n return re.test(urlText);\n }", "title": "" }, { "docid": "b5a2180287fed57e413976322ef9882f", "score": "0.73153627", "text": "function IsURLValid(url){\n if(url && url.length>0){\n if(url.indexOf(\"/\") != -1 && url.indexOf(\".aspx\") != -1)//If not a valid URL\n {return true; }\n }\n return false;\n}", "title": "" }, { "docid": "f5705720cc6b4c895dad52262a3dad46", "score": "0.7294775", "text": "function urlIsValid(url) {\r\n return !!url.match(/^.+\\:/);\r\n}", "title": "" }, { "docid": "a8acc537f6076239af6eedb2a1727ef0", "score": "0.7283376", "text": "function goodUrl(u, s) {\n if (!u.protocol.startsWith(\"http\"))\n return false;\n\n if (u.pathname.endsWith(\"/chrome/newtab\"))\n return false;\n\n const tokens = s.hostname.split(\".\");\n const domain = tokens[tokens.length - 2];\n\n if (!u.host.includes(domain))\n return false;\n\n return true;\n}", "title": "" }, { "docid": "1200b3788e3a348d7491797aa241249a", "score": "0.72512436", "text": "checkURL(str) {\n try {\n new URL(string);\n return true;\n } catch (error) {\n return false;\n }\n }", "title": "" }, { "docid": "be0f3bd18b4f968e4e231e87ac107a4a", "score": "0.72463065", "text": "function checkURL(address){\n\tvar satisfactory = false,\n\t\tsize = address.indexOf(\":\"),\n\t\tprotocol = address.substr(0, size);\n\t\t\n\t\tif (protocol === \"http\"){\n\t\t\tsatisfactory = true;\n\t\t}\n\t\telse if (protocol ===\"https\"){\n\t\t\tsatisfactory = true;\n\t\t}\n\t\treturn satisfactory;\n}", "title": "" }, { "docid": "959feea8981a90fd87e830ae408bb183", "score": "0.7242523", "text": "function checkURL(value)\n{\n var expression = /[-a-zA-Z0-9@:%_\\+.~#?&//=]{2,256}\\.[a-z]{2,4}\\b(\\/[-a-zA-Z0-9@:%_\\+.~#?&//=]*)?/gi\n var regexp = new RegExp(expression);\n return regexp.test(value);\n}", "title": "" }, { "docid": "c2f5493026fe95a513ac451ee9b8df72", "score": "0.7237755", "text": "function urlIsValid(url) {\n return !!url.match(/^.+\\:/);\n}", "title": "" }, { "docid": "010e4cf7055880a5929c0ecb7671a95d", "score": "0.7237104", "text": "static isValidUrl(string) { try { new URL(string); } catch (_) { return false; } return true; }", "title": "" }, { "docid": "1f44bdac597a8bfaf64a2e8b784fce4c", "score": "0.7220954", "text": "validURL (str) {\n try {\n return Boolean(new URL(str))\n } catch(e) {\n return false\n }\n }", "title": "" }, { "docid": "864d8d4b3ad52c2174bb21b0a2853c10", "score": "0.7207794", "text": "function isUrl(url) {\n\ttry {new URL(url);}catch{return false;}\n\treturn true;\n}", "title": "" }, { "docid": "fadb6afdeff9bd08d02ab72fb77aea0a", "score": "0.7199013", "text": "function urlCheck(str) {\n var parsed = url.parse(str);\n\n return (!!parsed.hostname && !!parsed.protocol && str.indexOf(' ') < 0);\n }", "title": "" }, { "docid": "3e67845a23ca0af3e51d162335385219", "score": "0.71265644", "text": "function valid(url) {\n if (! starts(url, \"/\")) return false;\n if (url.indexOf(\"//\") >= 0) return false;\n if (url.indexOf(\"/.\") >= 0) return false;\n if (ends(url, \"/\")) return true;\n if (url.lastIndexOf(\".\") < url.lastIndexOf(\"/\")) return false;\n return true;\n}", "title": "" }, { "docid": "4f526570f6a3f29ad1fb73a99ed53c6f", "score": "0.711623", "text": "checkURL() {\n\t\t// parse URL\n\t\tlet path = window.location.pathname;\n\t\tlet route = path.split('/');\n\t\troute.splice(0, 1);\n\n\t\t// is the page a VOD or Live/hosting channel\n\t\tif (route[0] == 'videos') {\n\t\t\t// found a VOD\n\t\t\tthis.log.info('Navigation - video ' + route[1]);\n\t\t\tthis.type = 'VOD';\n\t\t\tthis.getVOD();\n\t\t} else if (!URL.includes('/' + route[0])) {\n\t\t\t// found a channel\n\t\t\tthis.log.info('Navigation - Channel ' + path);\n\t\t\tthis.type = 'CHAT';\n\t\t\tthis.getChat();\n\t\t}\n\t}", "title": "" }, { "docid": "e3b678892600394f2641325ea173675e", "score": "0.711319", "text": "function isUrl(url) {\n\ttry {\n\t\treturn toString.call(url) === \"[object String]\" && !!new URL(url);\n\t} catch (_) {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "c7a59f1c47fcdcd5f742b6c50442a1e1", "score": "0.70785", "text": "function validate_url(url) {\n if (!url) return false;\n var root = url.split('/')[1];\n if (Object(utils_platform[\"a\" /* api */])('development').split('/')[1] === root) return true;\n if (Object(utils_platform[\"a\" /* api */])('staging').split('/')[1] === root) return true;\n if (Object(utils_platform[\"a\" /* api */])('production').split('/')[1] === root) return true;\n return false;\n}", "title": "" }, { "docid": "a66fc9593783c8edab432c26e836f875", "score": "0.70777017", "text": "function isURL(url) {\n\t\n\tvar urlIs = url.split(\":\");\n\t\n\t\tif(urlIs[0].length === 4) {\n\t\t\tif(urlIs[0] === \"http\") {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} \n\t\t\n\t\tif(urlIs[0].length === 5) {\n\t\t\tif(urlIs[0] === \"https\") {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t} return false;\n\t\n\t\n}", "title": "" }, { "docid": "062029ad0c20cea63d9b630df366be72", "score": "0.70631677", "text": "function validateURL(obj){\n if(re_weburl.test(obj.url)){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "82d4ed662083dea8dad874892771d315", "score": "0.70316887", "text": "function checkURL(url) {\n return (url.match(/\\.(jpeg|jpg|gif|png)$/) != null);\n}", "title": "" }, { "docid": "82d4ed662083dea8dad874892771d315", "score": "0.70316887", "text": "function checkURL(url) {\n return (url.match(/\\.(jpeg|jpg|gif|png)$/) != null);\n}", "title": "" }, { "docid": "c4b40c92df3a5dc111ffc8e2f4391f3e", "score": "0.7025602", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str[0] === '/');\n }", "title": "" }, { "docid": "c4b40c92df3a5dc111ffc8e2f4391f3e", "score": "0.7025602", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str[0] === '/');\n }", "title": "" }, { "docid": "c4b40c92df3a5dc111ffc8e2f4391f3e", "score": "0.7025602", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str[0] === '/');\n }", "title": "" }, { "docid": "c4b40c92df3a5dc111ffc8e2f4391f3e", "score": "0.7025602", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str[0] === '/');\n }", "title": "" }, { "docid": "e4b1203c8f3f34f7c6eaa2f60409065a", "score": "0.70134425", "text": "function checkUrl(url){\n var regex = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))\\.?)(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\n return regex.test(url);\n}", "title": "" }, { "docid": "fa953b68d93f6410f327a98daa105f8c", "score": "0.70081383", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str.charAt(0) === '/');\n }", "title": "" }, { "docid": "fa953b68d93f6410f327a98daa105f8c", "score": "0.70081383", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str.charAt(0) === '/');\n }", "title": "" }, { "docid": "f0b9fe62a783258f726d02e3773a1333", "score": "0.7003438", "text": "function isUrl(string) {\n return string && !!string.match(/\\/|:|\\./g);\n}", "title": "" }, { "docid": "bb963d1ede387a0b0e3703732a4dd635", "score": "0.69869107", "text": "isURI(input) {\n // todo: maybe better check with a regExp\n return input.startsWith('http://') || input.startsWith('https://');\n }", "title": "" }, { "docid": "a7e27c2a752c5ac900c18d768741240b", "score": "0.69763196", "text": "function isValidURL(url) {\n try {\n new URL(url);\n } catch (err) {\n console.log(err);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "ce8ac787ffbfdf339af2ba3c8ec7b48c", "score": "0.6972696", "text": "function isurl(theurl) {\n\treturn /^\\s*https?:\\/\\//.test(theurl);\n}", "title": "" }, { "docid": "8c4d11148f23311b22ca98b6ea1cdd56", "score": "0.6967705", "text": "function validate_isUrl(s) {\n missing = 0;\n //Regex for URL with http Page\n // var regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/\n //Regex for urls without http Page\n var regexp = /(http(s)?:\\\\)?([\\w-]+\\.)+[\\w-]+[.com|.in|.org]+(\\[\\?%&=]*)?/\n if (regexp.test(s)) {\n\n }\n else {\n toastr.warning(\"Enter valid Domain URL\");\n missing++;\n return;\n }\n\n if (parseInt(missing) > 0) { return false; }\n else { return true; }\n // return regexp.test(s);\n}", "title": "" }, { "docid": "00a97e3de7a9cc41ab63525fd72c8b8d", "score": "0.69657457", "text": "function isValidURL(url) {\n let host = config.host;\n return url.includes(`${host}/`);\n}", "title": "" }, { "docid": "632f8871ae3b1b7aa27d50ba02f32372", "score": "0.6942966", "text": "function checkValidURL(string) {\n try {\n let protocols = [\"https\"];\n new URL(string);\n const parsed = parse(string);\n return protocols\n ? parsed.protocol\n ? protocols.map((x) => `${x.toLowerCase()}:`).includes(parsed.protocol)\n : false\n : true;\n } catch (err) {\n console.log(err);\n return false;\n }\n}", "title": "" }, { "docid": "5f85ee5a46d775cb499488d95cee3b15", "score": "0.691849", "text": "function IsURL(a) {\n //URL have to has '.' or '。'\n if (!RegExp('[.。]').test(a)){ return false; }\n //URL can`t have any space\n if (RegExp(' ').test(a)){ return false; }\n //URL have to start with letter,digital or chinese simplified character\n if (!RegExp('^[A-Za-z0-9\\u4e00-\\u9fa5]').test(a)){\n return false;\n }\n //common domain name\n if (RegExp('.+[.。](com|cn|org|net|info|club|edu|gov|io)/?(/.+)?$').test(a)){ return true; }\n //IP address\n if (RegExp('^((http|https)://)?((2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[.。]){3}(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)/?([:/].+)?$').test(a)){ return true; }\n //have chinese simplified character but not domain name\n if (RegExp('[\\u4e00-\\u9fa5]').test(a)){\n if (RegExp('.+[.。](测试|佛山|慈善|集团|在线|八卦|公益|公司|移动|我爱你|时尚|淡马锡|商标|商店|商城|工行|中文网|中信|中国|中國|娱乐|谷歌|測試|网店|网络|香港|飞利浦|台湾|台灣|手机|澳門|政府|机构|组织机构|健康|世界|网址|游戏|企业|信息|广东|新加坡|政务)/?(/.+)?$').test(a)){\n return true;\n }else{\n return false;\n }\n }\n\n//all of domain name\n//this also work quickly...\n switch(RegExp('.+[.。](.)').exec(a)[1]){\n /*A*/case 'a': if (RegExp('.+[.。](abb|abbott|abogado|ac|academy|accenture|accountant|accountants|active|actor|ad|ads|adult|ae|aero|af|afl|ag|agency|ai|aig|airforce|al|allfinanz|alsace|am|amsterdam|an|android|ao|apartments|aq|aquarelle|ar|archi|army|arpa|as|asia|associates|at|attorney|au|auction|audio|auto|autos|aw|ax|axa|az)/?(/.+)?$').test(a)){ return true; }; break;\n /*B*/case 'b': if (RegExp('.+[.。](ba|band|bank|bar|barclaycard|barclays|bargains|bauhaus|bayern|bb|bbc|bd|be|beer|berlin|best|bf|bg|bh|bi|bid|bike|bingo|bio|biz|bj|bl|black|blackfriday|bloomberg|blue|bm|bmw|bn|bnpparibas|bo|boats|bond|boo|boutique|bq|br|bridgestone|broker|brother|brussels|bs|bt|budapest|build|builders|business|buzz|bv|bw|by|bz|bzh)/?(/.+)?$').test(a)){ return true; }; break;\n /*C*/case 'c': if (RegExp('.+[.。](ca|cab|cafe|cal|camera|camp|cancerresearch|canon|capetown|capital|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cbn|cc|cd|center|ceo|cern|cf|cfa|cfd|cg|ch|channel|chat|cheap|chloe|christmas|chrome|church|ci|cisco|citic|city|ck|cl|claims|cleaning|click|clinic|clothing|club|cm|cn|co|coach|codes|coffee|college|cologne|com|community|company|computer|condos|construction|consulting|contractors|cooking|cool|coop|corsica|country|coupons|courses|cr|credit|creditcard|cricket|crs|cruises|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz)/?(/.+)?$').test(a)){ return true; }; break;\n /*D*/case 'd': if (RegExp('.+[.。](dabur|dad|dance|date|dating|datsun|day|dclk|de|deals|degree|delivery|democrat|dental|dentist|desi|design|dev|diamonds|diet|digital|direct|directory|discount|dj|dk|dm|dnp|do|docs|dog|doha|domains|doosan|download|durban|dvag|dz)/?(/.+)?$').test(a)){ return true; }; break;\n /*E*/case 'e': if (RegExp('.+[.。](earth|eat|ec|edu|education|ee|eg|eh|email|emerck|energy|engineer|engineering|enterprises|epson|equipment|er|erni|es|esq|estate|et|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express)/?(/.+)?$').test(a)){ return true; }; break;\n /*F*/case 'f': if (RegExp('.+[.。](fail|faith|fan|fans|farm|fashion|feedback|fi|film|finance|financial|firmdale|fish|fishing|fit|fitness|fj|fk|flights|florist|flowers|flsmidth|fly|fm|fo|foo|football|forex|forsale|foundation|fr|frl|frogans|fund|furniture|futbol|fyi)/?(/.+)?$').test(a)){ return true; }; break;\n /*G*/case 'g': if (RegExp('.+[.。](ga|gal|gallery|garden|gb|gbiz|gd|gdn|ge|gent|gf|gg|ggee|gh|gi|gift|gifts|gives|gl|glass|gle|global|globo|gm|gmail|gmo|gmx|gn|gold|goldpoint|golf|goo|goog|google|gop|gov|gp|gq|gr|graphics|gratis|green|gripe|gs|gt|gu|guge|guide|guitars|guru|gw|gy)/?(/.+)?$').test(a)){ return true; }; break;\n /*H*/case 'h': if (RegExp('.+[.。](hamburg|hangout|haus|healthcare|help|here|hermes|hiphop|hitachi|hiv|hk|hm|hn|hockey|holdings|holiday|homes|honda|horse|host|hosting|house|how|hr|ht|hu)/?(/.+)?$').test(a)){ return true; }; break;\n /*I*/case 'i': if (RegExp('.+[.。](ibm|icbc|icu|id|ie|ifm|il|im|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insure|int|international|investments|io|iq|ir|irish|is|it|iwc)/?(/.+)?$').test(a)){ return true; }; break;\n /*J*/case 'j': if (RegExp('.+[.。](java|jcb|je|jetzt|jewelry|jll|jm|jo|jobs|joburg|jp|juegos)/?(/.+)?$').test(a)){ return true; }; break;\n /*K*/case 'k': if (RegExp('.+[.。](kaufen|kddi|ke|kg|kh|ki|kim|kitchen|kiwi|km|kn|koeln|komatsu|kp|kr|krd|kred|kw|ky|kyoto|kz)/?(/.+)?$').test(a)){ return true; }; break;\n /*L*/case 'l': if (RegExp('.+[.。](la|lacaixa|land|lat|latrobe|lawyer|lb|lc|lds|lease|leclerc|legal|lgbt|li|liaison|lidl|life|lighting|limited|limo|link|lk|loan|loans|lol|london|lotte|lotto|love|lr|ls|lt|ltda|lu|lupin|luxe|luxury|lv|ly)/?(/.+)?$').test(a)){ return true; }; break;\n /*M*/case 'm': if (RegExp('.+[.。](ma|madrid|maif|maison|management|mango|market|marketing|markets|marriott|mba|mc|md|me|media|meet|melbourne|meme|memorial|men|menu|mf|mg|mh|miami|mil|mini|mk|ml|mm|mma|mn|mo|mobi|moda|moe|monash|money|mormon|mortgage|moscow|motorcycles|mov|movie|mp|mq|mr|ms|mt|mtn|mtpc|mu|museum|mv|mw|mx|my|mz)/?(/.+)?$').test(a)){ return true; }; break;\n /*N*/case 'n': if (RegExp('.+[.。](na|nadex|nagoya|name|navy|nc|ne|nec|net|network|neustar|new|news|nexus|nf|ng|ngo|nhk|ni|nico|ninja|nissan|nl|no|np|nr|nra|nrw|ntt|nu|nyc|nz)/?(/.+)?$').test(a)){ return true; }; break;\n /*O*/case 'o': if (RegExp('.+[.。](okinawa|om|one|ong|onl|online|ooo|org|organic|osaka|otsuka|ovh)/?(/.+)?$').test(a)){ return true; }; break;\n /*P*/case 'p': if (RegExp('.+[.。](pa|page|panerai|paris|partners|parts|party|pe|pf|pg|ph|pharmacy|philips|photo|photography|photos|physio|piaget|pics|pictet|pictures|pink|pizza|pk|pl|place|plumbing|plus|pm|pn|pohl|poker|porn|post|pr|praxi|press|pro|prod|productions|prof|properties|property|ps|pt|pub|pw|py)/?(/.+)?$').test(a)){ return true; }; break;\n /*Q*/case 'q': if (RegExp('.+[.。](qa|qpon|quebec)/?(/.+)?$').test(a)){ return true; }; break;\n /*R*/case 'r': if (RegExp('.+[.。](racing|re|realtor|recipes|red|redstone|rehab|reise|reisen|reit|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rich|rio|rip|ro|rocks|rodeo|rs|rsvp|ru|ruhr|run|rw|ryukyu)/?(/.+)?$').test(a)){ return true; }; break;\n /*S*/case 's': if (RegExp('.+[.。](sa|saarland|sale|samsung|sap|sarl|saxo|sb|sc|sca|scb|schmidt|scholarships|school|schule|schwarz|science|scot|sd|se|seat|sener|services|sew|sex|sexy|sg|sh|shiksha|shoes|show|shriram|si|singles|site|sj|sk|sky|sl|sm|sn|so|soccer|social|software|sohu|solar|solutions|sony|soy|space|spiegel|spreadbetting|sr|ss|st|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swiss|sx|sy|sydney|systems|sz)/?(/.+)?$').test(a)){ return true; }; break;\n /*T*/case 't': if (RegExp('.+[.。](taipei|tatar|tattoo|tax|taxi|tc|td|team|tech|technology|tel|temasek|tennis|tf|tg|th|thd|theater|tickets|tienda|tips|tires|tirol|tj|tk|tl|tm|tn|to|today|tokyo|tools|top|toray|toshiba|tours|town|toys|tp|tr|trade|trading|training|travel|trust|tt|tui|tv|tw|tz)/?(/.+)?$').test(a)){ return true; }; break;\n /*U*/case 'u': if (RegExp('.+[.。](ua|ug|uk|um|university|uno|uol|us|uy|uz)/?(/.+)?$').test(a)){ return true; }; break;\n /*V*/case 'v': if (RegExp('.+[.。](va|vacations|vc|ve|vegas|ventures|versicherung|vet|vg|vi|viajes|video|villas|vision|vlaanderen|vn|vodka|vote|voting|voto|voyage|vu)/?(/.+)?$').test(a)){ return true; }; break;\n /*W*/case 'w': if (RegExp('.+[.。](wales|wang|watch|webcam|website|wed|wedding|weir|wf|whoswho|wien|wiki|williamhill|win|wme|work|works|world|ws|wtc|wtf)/?(/.+)?$').test(a)){ return true; }; break;\n /*X*/case 'x': if (RegExp('.+[.。](xerox|xin|xxx|xyz)/?(/.+)?$').test(a)){ return true; }; break;\n /*Y*/case 'y': if (RegExp('.+[.。](yachts|yandex|ye|yodobashi|yoga|yokohama|youtube|yt)/?(/.+)?$').test(a)){ return true; }; break;\n /*Z*/case 'z': if (RegExp('.+[.。](za|zip|zm|zone|zuerich|zw)/?(/.+)?$').test(a)){ return true; }; break;\n }\n\n return false;\n}", "title": "" }, { "docid": "8a14ac04dab5ed5497bf05f5a30de966", "score": "0.68949604", "text": "function isURL(str) {\n\treturn /^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$/.test(str); \n}", "title": "" }, { "docid": "c6722bcfe61cbbb828246bff95fad0e7", "score": "0.68927324", "text": "function isUrlValid(url) {\n // var pattern = new RegExp('^(http?:\\\\/\\\\/)?'+ // protocol\n // '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|'+ // domain name\n // '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))'+ // OR ip (v4) address\n // '(\\\\:\\\\d+)?(\\/[-a-z\\\\d%_.~+]*)*'); // port and path\n // if(!pattern.test(url)) {\n // console.log(\"getOSDViewer: invalid URL for slide images\");\n // return false;\n // }\n return true;\n }", "title": "" }, { "docid": "c70dc358bf8bead99e6698787f5a9687", "score": "0.6880966", "text": "function woo_slg_is_url_valid(url) {\n return /^(https?|s?ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(url);\n}", "title": "" }, { "docid": "ac9f5b8bcf9aca9c5c5d43bf30e4a45b", "score": "0.6871506", "text": "function check_after_slash_on_url(str){\n if(str.includes(\"user\") || str.includes(\"search\") || str.includes(\"account\")){\n return false\n } else {\n let last_index = str.lastIndexOf(\"/\")\n if( last_index == -1){\n return false\n } else {\n let target_string = str.substring(last_index + 1)\n\t if ((target_string == \" \" ) || !(target_string)){\n\t target_string = str.split( '/' );\n\t target_string = target_string[ target_string.length - 2 ]\n\t }\n\n if(target_string.includes(\"index.html\") || checkUnderscore(target_string) || checkHypen(target_string) || hasNumbers(target_string)){\n return true\n }\n return false\n }\n }\nreturn false\n}", "title": "" }, { "docid": "feedfa224c085ae95499a55d7ad88840", "score": "0.68526214", "text": "function checkUrl(url){\n\t\tvar sites = /(http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/; \n\t\t// regEx verifies if the string is a http: or https:\n\t\t\tif(url.match(sites)){\n\t\t\t\tgoodUrl = \"valid url\"; //if it does have http: or https: in the url, it will print true.\n\t\t\t\treturn goodUrl;\n\t\t\t\t}else { \n\t\t\t\t\tbadUrl = \"invalid url\";//if it doesn't have http: or https: in the url, it prints false.\n\t\t\t\treturn badUrl;\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "a9386c0617bc3f08945c6e8856680d01", "score": "0.68472207", "text": "function isUrlOK(compareChar)\n{\n\tvar charCode = compareChar.charCodeAt(0);\n\n\tif ((charCode >= 97 && charCode <= 122)\t\t// 'a'-'z'\n\t\t || (charCode >= 65 && charCode <= 90)\t// 'A'-'Z'\n\t\t || (charCode >= 48 && charCode <= 57)\t// '0'-'9'\n\t\t || charCode == 46\t\t\t\t// '.'\n\t\t || charCode == 45\t\t\t\t// '-'\n\t\t || charCode == 95\t\t\t\t// '_'\n\t\t || charCode == 42)\t\t\t\t// '*'\n\t{\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "edafc21bec0ac6446b84c7616931b4e3", "score": "0.6847119", "text": "function isValidURL() {\n moodle_url = document.getElementById('url').value;\n /*\n Reject invalid URLs and avoid saving given URL\n Invalid URL-> URLs without http or https\n */\n if (moodle_url.search(\"http\") == -1 || moodle_url.length < 15) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "01bd9514dc75966b2fbf744bb9b41049", "score": "0.6844753", "text": "hasURL() {\n return _.isStringNotEmpty(this.getURL());\n }", "title": "" }, { "docid": "c02b67ad0cde352fa9e023ec440c2169", "score": "0.68431515", "text": "function testIfValidURL(str) {\n const pattern = new RegExp(\n \"^https?:\\\\/\\\\/\" + // protocol\n \"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|\" + // domain name\n \"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + // OR ip (v4) address\n \"(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*\" + // port and path\n \"(\\\\?[;&a-z\\\\d%_.~+=-]*)?\" + // query string\n \"(\\\\#[-a-z\\\\d_]*)?$\",\n \"i\"\n ); // fragment locator\n \n return !!pattern.test(str);\n}", "title": "" }, { "docid": "b678ee52b5293bf7968d7eaec930870a", "score": "0.6842089", "text": "function isValidUrl(url) {\n\t\treturn /^(ftp|http|https):\\/\\/[^ \"]+$/.test(url);;\n\t}", "title": "" }, { "docid": "cf84c1734198ad2a19c8e39302af8835", "score": "0.68388116", "text": "function webUrl (thing) {\n return unemptyString(thing) && /^https?:\\/\\/.+/.test(thing);\n }", "title": "" }, { "docid": "ddf5c11093ef5314b4ccc3f42fbd479d", "score": "0.6820614", "text": "validURL(str) {\n var pattern = new RegExp(\n '^(https?:\\\\/\\\\/)?' +\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' +\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' +\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' +\n '(\\\\?[;F&a-z\\\\d%_.~+=-]*)?' +\n '(\\\\#[-a-z\\\\d_]*)?$',\n 'i',\n ) // fragment locator\n return !!pattern.test(str)\n }", "title": "" }, { "docid": "3a1a5f36370761fd90d8a8b198c58f72", "score": "0.68074805", "text": "function isSpecialCase(aux_URL, tabHost){\n if(aux_URL.host.includes(\"fbcdn.net\") && tabHost.includes(\"facebook.com\")){\n return true; //visiting facebook\n }\n if(aux_URL.host.includes(\"twitchcdn.net\") && tabHost.includes(\"twitch.tv\")){\n return true; //visiting twitch\n }\n if(aux_URL.host.includes(\"lolstatic\") && tabHost.includes(\"leagueoflegends.com\")){\n return true;\n }\n if(aux_URL.host.includes(\"poecdn\") && tabHost.includes(\"pathofexile.com\")){\n return true;\n }\n if(aux_URL.host.includes(\"outlook\") && tabHost.includes(\"outlook.live.com\")){\n return true;\n }\n if(aux_URL == \"https://www.google.com/recaptcha/api.js\"){\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "9bdce1eb60e301850f3ad8a02e8bbf24", "score": "0.68024236", "text": "function urlIsValid(m, strict) {\n if (strict && ! (m[2] || m[7])) return false;\n return /\\w/.test(m[1]) && /\\W/.test(m[1]);\n }", "title": "" }, { "docid": "0dc086e90fba4e58d19a38a11fe49509", "score": "0.67941844", "text": "function is_url_file() {\n var url = window.location.pathname;\n return ([\"blob\", \"raw\"].includes(url.split(\"/\").filter(s => s !== \"\")[2]));\n}", "title": "" }, { "docid": "23c9c11b91350ffb1b3f0fd151170e29", "score": "0.6787694", "text": "function isUrl(s) {\n\t\t var regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/\n\t\t return regexp.test(s);\n\t\t}", "title": "" }, { "docid": "8f95dbb534e9f6fc184c85c60f83dcfa", "score": "0.678", "text": "validateUrl(value) {\n return /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test(value);\n }", "title": "" }, { "docid": "53cb4ceccd0c41ddb486130adaa47760", "score": "0.6775209", "text": "function validUrl(str) {\n try {\n const url = new URL(str);\n return true;\n }\n catch {\n return false;\n }\n}", "title": "" }, { "docid": "fe9a7ff77ed55fa06921fbaacc2948d2", "score": "0.67614615", "text": "function isValidUrl(url) {\n // This pattern is not perfect but it's better than nothing\n const full_url_pattern = /^http(s)?:\\/\\/[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$/g;\n return url.match(full_url_pattern) && true || false;\n}", "title": "" }, { "docid": "d66acf1afa8c0d4edf4c54d6ddce721f", "score": "0.676143", "text": "function fnCheckURL(sFieldValue)\n{\n\tbValidFlag=true;\n\tsFieldValue=fnTrim(sFieldValue)\n\tfor(i=0;i<sFieldValue.length-1;i++)\n\t{\n\t\tif(sFieldValue.substr(i,4) == \"www.\")\n\t\t{\n\t\t\tfor(j=i+5;j<sFieldValue.length-1;j++)\n\t\t\t{\n\t\t\t\tif(sFieldValue.substr(j,1) == \".\")\n\t\t\t\t{\n\t\t\t\t\tbValidFlag=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn (bValidFlag)\n }", "title": "" }, { "docid": "a08a95f36754676246b75655f84e3fce", "score": "0.674138", "text": "function validateURL(url) {\n try {\n new URL(url);\n // if you made it here the url is in the correct format.\n return url;\n } catch (error) {\n // Bad string for url entered. \n return false;\n }\n}", "title": "" }, { "docid": "9d9349a753155838be749be05b3f0d4e", "score": "0.6736814", "text": "function isUrl(string) {\n var urlRegexp = /^(https?:\\/\\/|ftps?:\\/\\/)?([a-z0-9%-]+\\.){1,}([a-z0-9-]+)?(:(\\d{1,5}))?(\\/([a-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]+)?)?$/i;\n return urlRegexp.test(string);\n }", "title": "" }, { "docid": "307d1ec61d21dfc42b588ecc01871890", "score": "0.67028135", "text": "function inURLWhiteList(url) {\n var whiteList = [\n '/login',\n '/auth/google',\n '/oauth2callback',\n '/css/bootstrap.css'\n ];\n var url = url.split('?')[0];\n return whiteList.indexOf(url) !== -1;\n}", "title": "" }, { "docid": "24b92bcfe894a0109540095b65bad29e", "score": "0.6676744", "text": "function isValidUrl(s) {\n try {\n new URL(s);\n } catch (_) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "d4cf7462189ed501a632f7ca75af849c", "score": "0.66730404", "text": "function isValidUrl(string) {\n\ttry {\n\t\tnew URL(string);\n\t} catch (_) {\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "ae278659195205acd356f42b0f6b7ebc", "score": "0.66647285", "text": "function isValid(url) {\n\n var matcher = /^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$/;\n \n return matcher.test(url);\n }", "title": "" }, { "docid": "ea60a6eaed58d744d8cc38ae5e150a1f", "score": "0.6649761", "text": "function checkValidURL(url) {\n var regexUrl = /(https?:\\/\\/)?(www\\.)?([a-zA-Z]+)(\\.[a-zA-Z]{2,})+(\\:\\d{2,})?/;\n if (regexUrl.test(url)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "6ad47ccbc7764e24af13041283763711", "score": "0.66455007", "text": "function internal_isValidUrl(iri) {\n const iriString = internal_toIriString(iri);\n // If the runtime environment supports URL, instantiate one.\n // If the given IRI is not a valid URL, it will throw an error.\n // See: https://developer.mozilla.org/en-US/docs/Web/API/URL\n /* istanbul ignore if [URL is available in our testing environment, so we cannot test the alternative] */\n if (typeof URL !== \"function\") {\n // If we can't validate the URL, do not throw an error:\n return true;\n }\n try {\n new URL(iriString);\n }\n catch (_a) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "3d3809d29f6cd2615119f78f32245038", "score": "0.6643731", "text": "function checkUrl(url) {\t\n\t// Create temp anchor to simplify process of parsing URL\n\tvar anchor = document.createElement('a');\n\tanchor.href = url;\n\n\t// Fix for sites where the actual image URL is located in the query string (eg WaPo)\t\n\tif (url.split(anchor.protocol).length > 2) {\n\t\tvar queryUrl = url.split(anchor.protocol)[2];\t\t\n\t\tif (hasImage(queryUrl)) {\n\t\t\treturn anchor.protocol + queryUrl;\n\t\t}\n\t}\n\t\n\treturn url;\n}", "title": "" }, { "docid": "19fa2aebd1723b438efea300c5f4401c", "score": "0.6639628", "text": "isAWebpage(URL) {\n\t\tif (URL.match(/^http:/) || URL.match(/^https:/)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c49289c13d8c87ed0649b0bfba663375", "score": "0.66387504", "text": "function validURL(str) {\n\t// From http://stackoverflow.com/questions/1701898/how-to-detect-whether-a-string-is-in-url-format-using-javascript\n\tvar regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/\n return regexp.test(str);\n}", "title": "" }, { "docid": "1b3a82e5eadabbd7c6e547d2c160f5cc", "score": "0.6637079", "text": "function isValidURL(url){\n console.debug(\"[content_script isValidURL()] url=\" + url);\n // Remember, if we use jQuery here, we should update manifest.json to include jQuery in the \"content_scripts\" field.\n /* For example, if the URL \"https://github.com/\" is in the User's excluded lists: */\n var excluded_lists = new Array();\n\n /*\n We do not need double quote \"\" here, because the function match(reg) requires RGEEX in its argument, and string confounded by double forward slash /MY_REG/ is the RGEEX in javascript\n */\n // We do not need this: excluded_lists[0] = \"/http[s]?:\\/\\/*github.com\\/*/\";\n // Instead we use this: excluded_lists[0] = /http[s]?:\\/\\/*github.com\\/*/;\n excluded_lists[0] = /http[s]?:\\/\\/*github.com\\/*/;\n excluded_lists[1] = /http[s]?:\\/\\/*class.coursera.org\\/*/;\n\n for(var i=0;i< excluded_lists.length;i++){\n // console.log(excluded_lists[i])\n if(url.match(excluded_lists[i])){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "30ebfd112536c8f59f43495f1bb162c5", "score": "0.6635466", "text": "function isURL(s) {\n var regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/\n return regexp.test(s);\n }", "title": "" }, { "docid": "c114f16b1e2d8fab5b0e425368c52054", "score": "0.66348183", "text": "function checkSEOUrl() {\n var queryUrl = document.location.href.match(/index.php/);\n if (queryUrl == null)\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "fc75b53a376fb892d3b9905c9b296a03", "score": "0.66326326", "text": "function isHttp() {\n //return true;\n if(window.location.href.split('/')[0].indexOf(\"http\") === 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "2d2918dcaaa882d9cc88d4dfe1ba3a42", "score": "0.6615459", "text": "function isValidUrl(str) {\n var regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/;\n return regexp.test(str);\n }", "title": "" }, { "docid": "c3a341db2760946249c2e02bbde3444e", "score": "0.6614426", "text": "function isAbsLink(url)\n{\n var retVal = false;\n if (url.length > 0 && (url.substring(0,7).toLowerCase()==\"http://\" || url.substring(0,8).toLowerCase()==\"https://\")){\n retVal=true;\n }\n return retVal;\n}", "title": "" }, { "docid": "dae8873be8fb100459cdcd4e501d1fdb", "score": "0.6609073", "text": "function isUrl(s) {\n var regexp = /^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$/\n return regexp.test(s);\n }", "title": "" }, { "docid": "4927a4d8b0318a0989ea3410b10d42ef", "score": "0.66082716", "text": "function urlValid(url)\n{\n let regexUrl1 = /^http:\\/\\/.+\\..+/;\n let regexUrl2 = /^https:\\/\\/.+\\..+/;\n\n if (!regexUrl1.test(url) && !regexUrl2.test(url))\n url = `http://${url}`;\n return (url);\n}", "title": "" }, { "docid": "5f8f4e2b948f59c85ce8afb400f6e5cc", "score": "0.65947944", "text": "checkURL(url) {\n this.search.checkURL(url);\n }", "title": "" }, { "docid": "8d1e6d347117a38619220da4a5213b9b", "score": "0.6594619", "text": "function url_check(parts){\n if(parts.length===8 && parts[5]==='upload' && parts[6][0]==='v' && parts[6].length===11){\n return basic;\n } else if(parts.length===9 && parts[5]==='upload' && parts[7][0]==='v' && parts[7].length===11) {\n return long;\n }else {\n logger.error(\"cloudinary url test, didn't recognize\", parts.join('/'))\n return unknown;\n }\n}", "title": "" }, { "docid": "03edbb913d04b0163d769db87e15cf8f", "score": "0.65797776", "text": "function isAnyOfTheseInTheUrl()\n{\n var returnValue = false;\n for(var x=0;x<arguments.length;x++)\n {\n if(location.href.match(arguments[x]))\n {\n returnValue = true;\n }\n }\n return returnValue\n}", "title": "" }, { "docid": "1f2c7cd9ee23d45a700b5bbfba5cfda8", "score": "0.65779996", "text": "function checkDomain(url) {\n // CONVERT LINK INTO OBJECT\n var link = parseUri(url);\n // CHECK THAT LINK IS FOR SECURE FACEBOOK SITE\n if ((link.protocol === 'https') && link.host.includes('facebook.com')) {\n return 'facebook';\n } else if ((link.protocol === 'https') && link.host.includes('twitter.com')) {\n return 'twitter';\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "79f88293b831d4f117633ae6990bd2c5", "score": "0.6570107", "text": "function isUrlValid(url) {\n\t return /^(https?|s?ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(url);\n\t}", "title": "" }, { "docid": "1abc5927bcb3501e4ad6b3572688ed91", "score": "0.6559427", "text": "function isABC() {\n\tvar result = false;\n\n\tif ( (location.href.indexOf('http://www.abc.es') != -1) ||\n\t\t (location.href.indexOf('http://www.abcdesevilla.es') != -1) ||\n\t\t (location.href.indexOf('http://212.81.129.25:8280') != -1) ||\n\t\t (location.href.indexOf('http://212.81.129.25:8281') != -1) ||\n\t\t (location.href.indexOf('http://sevilla-origin.abc.es') != -1) ||\n\t\t (location.href.indexOf('http://www-origin.abc.es/') != -1) ||\n\t\t (location.href.indexOf('http://n1abc10.abc.es') != -1) ||\n\t\t (location.href.indexOf('http://n2abc10.abc.es') != -1) ||\n\t\t (location.href.indexOf('http://n3abc10.abc.es') != -1) ||\n\t\t (location.href.indexOf('http://n4abc10.abc.es') != -1) ) {\n\t\t\tresult = true;\n\t}\n\t\n\treturn result;\n}", "title": "" }, { "docid": "e3f88f3703b32cf94dec6211c3cf1d15", "score": "0.6558263", "text": "function IsURL(url) {\n\n var strRegex = \"^((https|http|ftp|rtsp|mms)?://)\"\n + \"?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?\" //ftp的user@\n + \"(([0-9]{1,3}\\.){3}[0-9]{1,3}\" // IP形式的URL- 199.194.52.184\n + \"|\" // 允许IP和DOMAIN(域名)\n + \"([0-9a-z_!~*'()-]+\\.)*\" // 域名- www.\n + \"([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\\.\" // 二级域名\n + \"[a-z]{2,6})\" // first level domain- .com or .museum\n + \"(:[0-9]{1,4})?\" // 端口- :80\n + \"((/?)|\" // a slash isn't required if there is no file name\n + \"(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$\";\n var re=new RegExp(strRegex);\n return re.test(url);\n }", "title": "" }, { "docid": "05850a21288b31a8796bb1d57228982e", "score": "0.6553354", "text": "function validURL(str) {\n var pattern = new RegExp('^(https?:\\\\/\\\\/)?'+ // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|'+ // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))'+ // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*'+ // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?'+ // query string\n '(\\\\#[-a-z\\\\d_]*)?$','i'); // fragment locator\n return !!pattern.test(str);\n}", "title": "" }, { "docid": "60b3611ea90cc454c4bc72a090a57c9e", "score": "0.65531737", "text": "function checkUrl() {\n\t\t\t\t\tif (UriParameters.fromQuery(window.location.search).get(\"sap-ui-xx-asyncRouting\") === \"true\") {\n\t\t\t\t\t\tLog.warning(\"Activation of async view loading in routing via url parameter is only temporarily supported and may be removed soon\", \"MobileTarget\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "title": "" }, { "docid": "7bbbf3bc5c248c5bd21edf2444d317c8", "score": "0.6548412", "text": "function isValidURL(str) {\n let pattern = new RegExp('^((ft|htt)ps?:\\\\/\\\\/)?' + // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' + // domain name and extension\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n '(\\\\:\\\\d+)?' + // port\n '(\\\\/[-a-z\\\\d%@_.~+&:]*)*' + // path\n '(\\\\?[;&a-z\\\\d%@_.,~+&:=-]*)?' + // query string\n '(\\\\#[-a-z\\\\d_]*)?$', 'i'); // fragment locator\n\n return (pattern.test(str));\n}", "title": "" }, { "docid": "a492093e7e5dc61a3b28a0782f40c836", "score": "0.6541768", "text": "function isPostUrl(){\n let path = window.location.pathname;\n return ( path.substring(1).split(\"/\").length > 1 );\n }", "title": "" }, { "docid": "b66da5efb547707cb1f47a9e5f652a65", "score": "0.6537818", "text": "function is_url(str)\n{\n regexp = /^(?:(?:https?):\\/\\/)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:\\/\\S*)?$/;\n if (regexp.test(str)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "1def0f1eece7c4d45ef53134cf91c4c7", "score": "0.65374345", "text": "function hasUrlHelper (value) {\n for (var i = 0, len = types.length; i < len; i++) {\n if (value.indexOf('' + types[i] + '-url(') !== -1) return true\n }\n}", "title": "" }, { "docid": "e5066a9c52fa4c7a4afbff0b18b80072", "score": "0.6536871", "text": "function hasValidUrl (href) {\n return !!(href && href.length && pattern.test(href));\n }", "title": "" }, { "docid": "13e07bdf1084f8e2585d7c6862630ba9", "score": "0.6531417", "text": "function isUrl(s) {\n\tvar regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/\n\treturn regexp.test(s);\n}", "title": "" }, { "docid": "f8bd8cf770392f3ca0cd2004ac0f2629", "score": "0.65187544", "text": "function isUrl(s) {\n let regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-/]))?/\n return !s[0] === '#' || regexp.test(s)\n}", "title": "" }, { "docid": "4ce5d785753c9781744c9a656c3548b7", "score": "0.64942914", "text": "function isURL(urlOrPath) {\n return urlOrPath && !path.isAbsolute(urlOrPath) && !!url.parse(urlOrPath).protocol;\n}", "title": "" }, { "docid": "d39bcc03ce5ab83a8fad31d638b5584c", "score": "0.64934367", "text": "function validateUrl(str) {\r\n //var regexp = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/;\r\n var regexp = /^http:\\/\\/|(www\\.)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/;\r\n if (!regexp.test(str)) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "0ae0e767006bae15bb31956485441d5e", "score": "0.64932173", "text": "function checkURL() {\n if (document.URL.indexOf('admin') > -1) {\n // Do nothing, admin scripts will take care of this!\n } else if (document.URL.indexOf('basket') > -1) {\n manageBasket();\n showBasket();\n }\n else {\n var gets = window.location.search;\n if ((gets.indexOf('?id') > -1)) {\n var id = gets.split('=');\n showProduct(id[id.length-1]);\n } else {showProducts();}\n }\n }", "title": "" }, { "docid": "4e11cae3b8374b7596fc10f43e7fcfca", "score": "0.64922386", "text": "function validateUrl(value) {\n return /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test(value);\n}", "title": "" }, { "docid": "07f779e74d1c05fd2ec5b5b833b1a026", "score": "0.6484885", "text": "function checkImageInURL() {\n const imageInRegEx = new RegExp('photo=');\n\n return imageInRegEx.test(window.location.href);\n}", "title": "" }, { "docid": "36b50c5d4f0301d6085acc4fdb06e254", "score": "0.64785546", "text": "function IsUrlPath(strFilePath)\n{\n\tvar blnIs = false;\n\ttry\t\n\t{\n\t\tvar strUrlPrefix = \"\";\n\t\tif (strFilePath.length >= 6) \n\t\t{\n\t\t\tstrUrlPrefix = strFilePath.substring(0,5);\n\t\t\tif (strUrlPrefix.toUpperCase() == \"HTTP:\")\n\t\t\t\tblnIs = true;\n\t\t\tif (! blnIs) \n\t\t\t{\n\t\t\t\tstrUrlPrefix = strFilePath.substring(0,6);\n\t\t\t\tif (strUrlPrefix.toUpperCase() == \"HTTPS:\")\n\t\t\t\t\tblnIs = true;\n\t\t\t}\n\t\t}\n\t}\n\tcatch (e) {}\n\treturn blnIs;\n}", "title": "" }, { "docid": "16d00159e4e0627f3a55059486b78e67", "score": "0.6477685", "text": "function isSpUrl(urlToCheck) {\n return QUERY_URLS.find(url => urlToCheck.startsWith(url));\n}", "title": "" }, { "docid": "2ecae3596b92a6b86e17829e370729bf", "score": "0.64761996", "text": "function protocolIsApplicable(url) {\n var anchor = document.createElement('a');\n anchor.href = url;\n return APPLICABLE_PROTOCOLS.includes(anchor.protocol);\n}", "title": "" }, { "docid": "1f7ead9c3c126aa176ca6ba9e0ca0525", "score": "0.64757264", "text": "function isurl(str){\n // credit: http://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-an-url\n var pattern = new RegExp('^(https?:\\\\/\\\\/)?'+ // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.?)+[a-z]{2,}|'+ // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))'+ // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*'+ // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?'+ // query string\n '(\\\\#[-a-z\\\\d_]*)?$','i'); // fragment locator\n return pattern.test(str);\n }", "title": "" } ]
587e88738d764cd48db88121dec3eb1f
Starts a new game (starts a timer, opens the first cell).
[ { "docid": "855f1b8546acb81d0b0231cc3ac2b535", "score": "0.0", "text": "function startGame(startPosition) {\n if (gameStarted || gameStopped)\n return;\n\n gameStarted = true;\n\n time = +new Date();\n timer = window.setInterval(updateStatus, 1000);\n\n addMines(startPosition);\n\n eventListeners.onGameStarted();\n updateStatus();\n }", "title": "" } ]
[ { "docid": "820a4b53ce111393e10c430437843299", "score": "0.74829006", "text": "function start(){\n var time = Math.ceil((conf.columns * conf.rows)*0.25);\n \n var interval = setInterval(function(){\n controls.innerHTML = 'The game starts in ... ' + time + ' seconds';\n\n if(time == 0){\n clearNums();\n countDown();\n g.started = true;\n\n clearInterval(interval);\n } else time--;\n }, 1000);\n }", "title": "" }, { "docid": "8ca15a44de9ca8f9af33aa2fc19de0ba", "score": "0.73829544", "text": "function startGame() {\n gameActive = true;\n $('.accuracy span').css({color: '#063940'});\n \n var time = 30; // number of seconds to run the game\n \n // fills the board at start\n for (var i = 0; i < 9; i++) {\n addRow(true);\n }\n \n // timer that counts down by 1 second; ends game time runs out\n if (gameActive) {\n var timer = setInterval(function() {\n $('.time span').html(time);\n if (time > 0) {\n time--;\n } else {\n clearInterval(timer);\n endGame();\n }\n }, 1000);\n }\n }", "title": "" }, { "docid": "3116c6ab8db339f1fc0db004610064d5", "score": "0.7328594", "text": "function startGame() {\n isWin = false;\n timerCount = 10;\n // Prevents start button from being clicked when round is in progress\n startButton.disabled = true;\n renderBlanks()\n startTimer()\n}", "title": "" }, { "docid": "b6522d6c93c390e81ab8aa10376d2f85", "score": "0.7278797", "text": "function startGame() {\n gameArea.start();\n reset = false;\n gameOver = false;\n interval = setInterval(update, 1000/60);\n difficulty = 1;\n mapSize = 5;\n newGame();\n}", "title": "" }, { "docid": "31be7c8571164dea76884d65c850c2f0", "score": "0.72761184", "text": "function startGame() {\n\n console.log(\"start\");\n wholeGame.current().newRound();\n wholeGame.start = true;\n \tticBoard.sideLeft.style.display = 'block';\n \tticBoard.sideRight.style.display = 'block';\n ticBoard.sideLeft.style.opacity = '1';\n ticBoard.sideRight.style.opacity = '1';\n cleanBoard();\n update();\n}", "title": "" }, { "docid": "6d25c28e3568bdc32adbdfb47fdf5db5", "score": "0.7271069", "text": "function startGame() {\n initializeTimer();\n listen();\n animateMainCharacter();\n setInterval(function(){\n createRoadRectangle();\n }, 500);\n setInterval(function(){\n createClouds();\n }, 3500);\n setInterval(function(){\n createObstacle();\n }, 4000);\n }", "title": "" }, { "docid": "ae113f6448f3bcfbff48635dd33b19fa", "score": "0.72113425", "text": "function start() {\n const game = $('game');\n gdata.time = 0;\n gdata.score = 0;\n\n for (let h=0; h<gameH; h++) {\n const tr = $$('tr');\n game.appendChild(tr);\n\n for (let r=0; r<gameW; r++) {\n const td = $$('td');\n td.id = cell(h*gameW + r);\n tr.appendChild(td);\n }\n }\n\n for (let i=0; i<gameH*gameW; i++) {\n gdata.grid.push(false);\n }\n\n update();\n}", "title": "" }, { "docid": "da11b4ecc3e75c0cabf0e72d9fe3b732", "score": "0.7145987", "text": "function startGame() {\n // make game board\n makeGameBoard();\n\n gameover = false;\n score = 0;\n $('.score').text(score);\n\n // start gameplay\n startMoles();\n\n // timer for gameplay\n // set for 5 seconds\n setTimeout(function() {\n return gameend();\n }, 5000);\n }", "title": "" }, { "docid": "9a7deb393a8e20b4bf70b049821cb177", "score": "0.714067", "text": "function startGame() {\n timerCount = 121;\n startTimer();\n }", "title": "" }, { "docid": "2ec61eb7cb1aaba5bd1f46e3c34cba0c", "score": "0.7097478", "text": "function startNewGame() {\n if (!document.fullscreenElement) { p.wrapper.requestFullscreen(); }\n p.loadingWidth = 0;\n p.matrix = [];\n p.targets = [];\n p.clicked = [];\n p.ready = false;\n p.timeOfStart = 0;\n p.timeOfEnd = 0;\n clearTimeout(p.timeOut1);\n\n createMatrix();\n if (p.startGame) { startTimer(); }\n }", "title": "" }, { "docid": "dcae93ced30324fcc456d263fd2649ad", "score": "0.7067749", "text": "function startNewGame() {\n \n //set the grid cells to empty\n initGrid();\n\n //select the nextshape as falling shape\n selectShape();\n\n //reset the scoreboard\n scoreboard.reset();\n\n //start animation\n animate(-1);\n}", "title": "" }, { "docid": "5584661b3748eb9a31e0d8d3764a8755", "score": "0.7062596", "text": "function startGame() {}", "title": "" }, { "docid": "ad40bed17bed00d9e278ecaf547854b9", "score": "0.7032131", "text": "function startGame() {\n\tcurrRow = ROWS - 1;\n\tcurrStart = 0;\n\tcurrEnd = START_BLOCK_COUNT - 1;\n\tcurrDirection = Direction.RIGHT;\n\tprevStart = 0;\n\tprevEnd = 0;\n\tspeed = START_SPEED;\n\tlevel = 0;\n\twindowWidth = window.innerWidth;\n\twindowHeight = window.innerHeight;\n\tblockSize = calculateBlockSize();\n\tgridWidth = blockSize * COLUMNS;\n\tgridHeight = blockSize * ROWS;\n\tgrid = initGrid();\n\tdisplayScore();\n\t\n\tplay();\n}", "title": "" }, { "docid": "18688405b6b6f7bb7aa3b313420386b7", "score": "0.7005426", "text": "function gameStart() {\n\tif (gameTimer) clearTimeout(gameTimer);\n\tgameTimer=null;\n\tvar el=document.getElementById(mazeElementId);\n\tif (el) {\n\t\tel.style.display='block';\n\t\tif (window.focus) window.focus();\n\t\tif (setupComplete) {\n\t\t\tnewGame();\n\t\t}\n\t\telse {\n\t\t\tgameAutoStart=true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8ab0a7f0ada77a869259e42c976b7f67", "score": "0.69667035", "text": "function startNewGame(mpdf){\n\tif (mpdf != null){\n\t\tcurrentHuer = mpdf;\n\t}\n\tif (currentIteration == iterations){\n\t\troundSequence.push(returnData);\n\t\tgeneticHelper();\n\t}else{\n\t\t//if on level one start the main method after five seconds\n\t\tif (isLevel1()){\n\t\t\tconsole.log(\"Round: \"+ currentIteration);\n\t\t\tconsole.log(\"New Game!\");\n\t\t\tmovesMade = [];\n\t\t\tallUp();\n\t\t\tgetMoves(6000);\n\t\t\tsendKey = setTimeout(\"main()\", 4000);\n\t\t}else{\n\t\t\t//press enter then release enter\n\t\t\tPodium.keydown(13); \n\t\t\tsetTimeout(\"Podium.keyup(13)\",200);\n\t\t\tsetTimeout(function(){startNewGame(null);}, 250);\n\t\t}\t\n\t}\n}", "title": "" }, { "docid": "fb49365573904bb5df4843161fbaab65", "score": "0.6940198", "text": "function beginGame(){\n\tnewGame();\n\tstartGame();\n}", "title": "" }, { "docid": "6a6debaf4095690bc951e0974d24c0f4", "score": "0.6930985", "text": "startNewGame() {\n this.initAIPlayers();\n if (!this.inWx) {\n this.timer = setTimeout(this.updateRound.bind(this), 0); // invoke the first time\n }\n }", "title": "" }, { "docid": "5d849441fd4dc6f6d100a28e76a928ff", "score": "0.6909369", "text": "function new_game() {\n\n\t// Clear the grid down\n\tfor_each_cell( function(id) { rub_cell(id) });\n\n\n\t// Create new snake\n\tsnake = new Array();\n\t\n\tfor (var i=0; i<snake_default_start_size; i++) {\n\t\tvar x = midpoint[0] + snake_initial_orientation[0]*i;\n\t\tvar y = midpoint[1] + snake_initial_orientation[1]*i;\n\t\tsnake.push( coords_to_id(x,y) );\n\t\tink_cell( coords_to_id(x,y), \"black\" );\n\t}\n\n\tscore = 0;\n\tspeed = start_speed;\n\tgame_is_running = true;\n\n\tvelocity = new Array( 0, 1 ); // Start moving downwards\n\n\t// Fruit\n\tfruit.alive = false;\n\n\trunner = setInterval(\"update();\",speed);\n}", "title": "" }, { "docid": "73ee1bf5d16f4493f9b164482a559ead", "score": "0.6896439", "text": "function StartNewGame() {\n\tgame.div.removeChild(mainMenu);\n\tSetUpGameBoard();\n\tgame.div.appendChild(gameContainer);\n\tgame.StartGame();\n}", "title": "" }, { "docid": "0ba4d1d8529ebf7c0d1691db9d254778", "score": "0.6869688", "text": "function startNewGame () {\n\t\t// resets the game ; hides previous elements (prevent a bug) ; starts the countdown ; creates blank targets ; sort targets ; waits 4s (for countdown), then starts the game by starting gameRun function and starts the updateProgressBars function\n\treset();\n\thideElements(targets);\n\tcountdown();\n\tcreateBlankTargets(currentMode.totalTargets);\n\tsortTargets(targets, 0.5); // Use 0-1 to set the random percentages of \"good\" targets; 0-0%, 1-100%\n\tsetTimeout(function() {\n\t\tgameRun(currentMode.timeStart);\n\t\tgunPointer.style.display = \"block\";\n\t\tupdateProgressBars();\n\t}, 4000);\n}", "title": "" }, { "docid": "06a03df02929a1c3be8322d4135d915c", "score": "0.6861122", "text": "function start() {\n _height = document.querySelectorAll(\"#\" + table + \" tr\").length;\n _width = document.querySelectorAll(\"#\" + table + \" td\").length / _height;\n for (var i = 0; i < _height; i++) {\n _grid.push([]);\n for (var j = 0; j < _width; j++) {\n _grid[i][j] = \"g\";\n }\n }\n countDown();\n _countDown = setInterval(countDown, 1000);\n _game = setInterval(gameTick, 100);\n }", "title": "" }, { "docid": "82a47e152ebaaabd87251ce4a903b57a", "score": "0.68557054", "text": "function startGame() {\n start = setInterval(runGame, 100);\n}", "title": "" }, { "docid": "344558555c4c7aa13c0b2e5263e3f0c9", "score": "0.6853619", "text": "function newGame(){\n console.log(\"new game\");\n saveSessionValue(strings.scoreKey,0);\n saveSessionValue(strings.streakKey,0);\n\n resetTable();\n\n let numRows = minRows;\n let numCols = minCols;\n let numTiles = startTiles;\n let tilesToRemember = getTileToRemember(numRows,numCols, numTiles);\n\n buildTable(numRows, numCols, tilesToRemember);\n\n flashTilesToRemember(tilesToRemember);\n}", "title": "" }, { "docid": "1560cb4909703a1ae13a64fc2d21edba", "score": "0.6844459", "text": "function startGame() {\n myGameArea.start();\n createComponents();\n}", "title": "" }, { "docid": "5193a6152e484d7afb317ad0ee56d4c0", "score": "0.68187374", "text": "function startGame() {\n // asignWhoGoesFirst();\n startDisplay();\n hideBeforeGameButtons();\n showGamePlayButtons();\n showAllCounters();\n restartScores();\n displayStartScores();\n\n\n showPlayHasChanged();\n\n\n if (whoseTurnItIs === 2 && mode !== \"human\") {\n reportScore(\"gameStatus\", \"Computer will start play this time ...\")\n humanOrComputer();\n } else {\n\n }\n}", "title": "" }, { "docid": "9f1aac03f1048ab1b1881532d72cf70a", "score": "0.68092227", "text": "function startGame() {\n\t\t\ttry {\n\t\t\t\t// get inputs\n\t\t\t\t\tCONSTANTS.grid.x = Math.max(CONSTANTS.grid.min, Math.min(CONSTANTS.grid.max, Number(ELEMENTS.menu.x.value)))\n\t\t\t\t\tCONSTANTS.grid.y = Math.max(CONSTANTS.grid.min, Math.min(CONSTANTS.grid.max, Number(ELEMENTS.menu.y.value)))\n\t\t\t\t\tCONSTANTS.grid.z = Math.max(CONSTANTS.grid.min, Math.min(CONSTANTS.grid.max, Number(ELEMENTS.menu.z.value)))\n\n\t\t\t\t// resize\n\t\t\t\t\tresizeCanvas()\n\n\t\t\t\t// grid\n\t\t\t\t\tconst gridData = createGrid()\n\t\t\t\t\t\tSTATE.grid = gridData.grid\n\t\t\t\t\t\tSTATE.exteriorHexes = gridData.exteriorHexes\n\t\t\t\t\t\tSTATE.gridBorder = gridData.gridBorder\n\n\t\t\t\t// player\n\t\t\t\t\tSTATE.player = createPlayer()\n\t\t\t\t\tSTATE.blasts = {}\n\n\t\t\t\t// bases\n\t\t\t\t\tSTATE.bases = {}\n\t\t\t\t\tfor (let i in CONSTANTS.base.locations) {\n\t\t\t\t\t\tconst coordinates = CONSTANTS.base.locations[i].split(\",\")\n\t\t\t\t\t\tconst base = createBase(Number(coordinates[0]), Number(coordinates[1]), Number(coordinates[2]))\n\t\t\t\t\t\tSTATE.bases[base.id] = base\n\t\t\t\t\t}\n\n\t\t\t\t// asteroids\n\t\t\t\t\tSTATE.asteroids = {}\n\t\t\t\t\tfor (let i = 0; i < CONSTANTS.asteroid.startingCount; i++) {\n\t\t\t\t\t\tconst asteroid = createAsteroid()\n\t\t\t\t\t\tSTATE.asteroids[asteroid.id] = asteroid\n\t\t\t\t\t}\n\n\t\t\t\t// playing\n\t\t\t\t\tSTATE.playing = true\n\n\t\t\t\t// remove gameover state\n\t\t\t\t\tELEMENTS.body.removeAttribute(\"gameover\")\n\t\t\t\t\tELEMENTS.menu.start.blur()\n\t\t\t\t\tELEMENTS.menu.start.setAttribute(\"disabled\", true)\n\t\t\t} catch (error) {console.log(error)}\n\t\t}", "title": "" }, { "docid": "cc416c980bd59cc86164be357421280f", "score": "0.6808696", "text": "function startGame() {\n window.setInterval(gameLoop, 10);\n }", "title": "" }, { "docid": "09c01a4196f2c1eb3de6fbd25ea579e9", "score": "0.68053436", "text": "function gameStart() {\r\n\t// creating new game board\r\n\tboard = new Board(4);\r\n\r\n\t// spawn two initial tiles\r\n\tboard.spawnNew();\r\n\tboard.spawnNew();\r\n\r\n\t// displaying map\r\n\tdrawer.drawMap(board.map);\r\n\r\n\tgameStarted = true;\r\n\r\n\t// score refreshing\r\n\tdocument.querySelector(SCORE_QUERY).innerText = \"0\";\r\n\r\n\t// map opacity decreasing for 5s\r\n\tdocument.querySelector(TABLE_QUERY).style.transition = \"0s\";\r\n\tdocument.querySelector(TABLE_QUERY).style.opacity = \"1\";\r\n\r\n\t// game over text hiding\r\n\tdocument.querySelector(END_GAME_QUERY).style.display = \"none\";\r\n}", "title": "" }, { "docid": "3e5b1c673a3a3226bc3b939939fafeae", "score": "0.68029666", "text": "function startNewGame() {\n if (!document.fullscreenElement) { p.wrapper.requestFullscreen(); }\n if (!p.pointerLockIsLocked()) { p.wrapper.requestPointerLock(); }\n p.loadingWidth = 0;\n p.moveBall = false;\n p.ball = new Ball(p, p.width/2, p.height/2, p.props.radius, 'blue', p.props.timeOnChangeSpeed);\n p.aim = new Aim(p, p.width/2, p.height/2);\n if (p.startGame) { startTimer(); }\n }", "title": "" }, { "docid": "2b068a8bab372d58a600fa1389fa44ee", "score": "0.6800018", "text": "function startGame() {\n game.roundComplete = false;\n game.gameStart = true;\n\n resetArena();\n\n }", "title": "" }, { "docid": "97210c781ea3486bcf48d5c15c7a79c9", "score": "0.67916286", "text": "function startGame() { \n createEnemie();\n interval = setInterval(update,1000/60)\n }", "title": "" }, { "docid": "97210c781ea3486bcf48d5c15c7a79c9", "score": "0.67916286", "text": "function startGame() { \n createEnemie();\n interval = setInterval(update,1000/60)\n }", "title": "" }, { "docid": "9b109b00e4e2fabe186dccacceb40c72", "score": "0.6789299", "text": "function startGame() {\n gameArea.start();\n}", "title": "" }, { "docid": "9b109b00e4e2fabe186dccacceb40c72", "score": "0.6789299", "text": "function startGame() {\n gameArea.start();\n}", "title": "" }, { "docid": "0848564a3e94a56d0140c50f6f85edce", "score": "0.6771281", "text": "function startGame() {\n\tsetGrid(computer);\n\tsetGrid(player);\n\tuserInput();\n}", "title": "" }, { "docid": "467e37c0051ed79b1c2c787149827a3e", "score": "0.6768281", "text": "function launchGame(){\n\t\tisPlaying = true;\n\t\tchrono();\n\t}", "title": "" }, { "docid": "d131a66b60d6a836ee39c37c95007901", "score": "0.67630225", "text": "function startGame(){\n\tshuffle(myCards);\n\tinsertCard();\n\tcreateCardAction();\n\tcreateRating();\n\tstartTimer(true);\n\tcreateRestart();\n}", "title": "" }, { "docid": "b2d3d561b495a1ea009ceeb9bbf3d6a8", "score": "0.676097", "text": "function startGame() {\n\tuiScore.html(\"0\");\n\tuiStats.show();\n\t\n\t// Set up initial game settings\n\tplayGame = false;\n\t\n\t// Start the animation loop\n\tanimate();\n\t}", "title": "" }, { "docid": "90be882c9485ae7576f705d477ae8588", "score": "0.6753144", "text": "startGame() {\n\t\tthis.unlisten();\n\t\tnew GameScreen(4).show(this);\n\t}", "title": "" }, { "docid": "ed943ef6e4784ffe45a51d645c4c4c4d", "score": "0.6742551", "text": "function startGame(){\n\tgameArea.start();\n}", "title": "" }, { "docid": "dd041c0875524dd9a2c02c43142f8370", "score": "0.6727755", "text": "function startGame() {\n startBtn.classList.add('animated', 'rubberBand');\n startBtn.classList.add('on');\n window.setTimeout(function() {\n startBtn.classList.remove('animated', 'rubberBandt');\n startBtn.classList.remove('on');\n }, animationDuration);\n console.log(\"Game started\")\n\n setDifficulty(levels.round1)\n simonMemory = [];\n counterRound = 1;\n thisSequence = 0;\n roundStatus.innerHTML = 'ROUND ' + counterRound;\n newRound();\n allowClickEvent()\n}", "title": "" }, { "docid": "c571a9a1cc2ef28d2ed5347ef9d422ce", "score": "0.6726029", "text": "startGame() {\n if (this.game != undefined)\n return;\n this.gameDelay = -3;\n this.graph.repositionPieces(this.selectedTheme);\n this.redTurn = true;\n this.greenTurn = false;\n this.timeLeft = this.turnTime;\n this.movie = [];\n this.pieceMoves = [];\n this.game = new Game(this, \"human\", \"human\");\n }", "title": "" }, { "docid": "1fb76527032b3351c8556f97fe61f759", "score": "0.6723856", "text": "function initNewGame() {\n\tgameRunning = true;\n\trandomGenerator = createRandomNumberGenerator(gameOptions.seed);\n\tinitChessboard();\n\tgenerateRandomLevel();\n\trepositionAllFigures();\n\tnumberOfMoves = 0;\n\tcapturedFigures = [];\n\tupdatePossibleMoves();\n\tif (gameTimer == null) {\n\t\tgameTimer = createGameTimer();\n\t\tgameTimer.onChanged = updateTimeInStatusLine;\n\t}\n\tgameTimer.reset();\n\tgameTimer.start();\n\tupdateStatusLine();\n}", "title": "" }, { "docid": "0d5cdf216d72d648ca856bf27163c41d", "score": "0.6721705", "text": "function startGame(){\r\n\tif(taskId == 0){\r\n\t\t//Tell the browser to call updateGame() ever 100 milliseconds (updateInterval). \r\n\t\ttaskId = window.setInterval(updateGame, updateInterval); \r\n\t}\r\n}", "title": "" }, { "docid": "3d8cb661c28694e1a8b9a1fe03264646", "score": "0.6719778", "text": "function startGame() {\n // close modal windows if open\n modal.style.display = 'none'\n looseContainer.style.display = 'none'\n // remove the snake\n currentSnake.forEach(index => squares[index].classList.remove('snake'))\n // remove snake head\n squares[currentSnake[0]].classList.remove('snake-explode')\n squares[currentSnake[0]].classList.remove('brick')\n removeSnakeHead()\n // remove the apple\n removeApple()\n // reset the score to 0\n score = 0\n scoreDisplay.textContent = score\n // remove brick wall\n removeBricks()\n // stop the game and reset to default values\n clearInterval(timerId)\n currentSnake = [2, 1, 0]\n direction = 1\n intervalTime = 700\n // re add the class of snake to our new currentSnake\n currentSnake.forEach(index => squares[index].classList.add('snake'))\n // generate new apple\n generateApple()\n // set the timer to default\n timerId = setInterval(move, intervalTime)\n}", "title": "" }, { "docid": "c436273cde509df056c9471b107e6ee3", "score": "0.67173666", "text": "function startGame() {\n addGiants(startingGiantPosition)\n moveGiants()\n oilDripping()\n }", "title": "" }, { "docid": "fb8a6d725a3c1b19e291d0fee1a7dce8", "score": "0.67115855", "text": "startNewGame(){\n this.current_player = Math.floor(Math.random() * 2) + 1;\n this.other_player = (this.current_player === PLAYER1) ? PLAYER2 : PLAYER1;\n this.game_state = GAMESTATE['STARTED'];\n this.grid = new Array(9).fill(EMPTYBOX);\n this.winner = undefined;\n }", "title": "" }, { "docid": "4c1ef58df6d7ad9ad71930dfcabbf5aa", "score": "0.669976", "text": "function startGame() {\n scoreBoard.textContent = 0;\n timeUp = false;\n score = 0;\n pop();\n timer(15);\n // set in game timer, not visible yet\n setTimeout(()=> timeUp = true, 15000)\n}", "title": "" }, { "docid": "a9af91991f82a48847c0f8502215ad54", "score": "0.6692125", "text": "function startGame() {\n setInterval(incrementTime,1000)\n}", "title": "" }, { "docid": "dc7cb2b7f576c818901ccbf6bf5fb2b1", "score": "0.6681462", "text": "function runGame() {\n\tcheckClear();\n\tspawn();\n\texisting();\n\tcountDown();\n\tif (timer == 0) {\n\t\tgameOn = false;\n\t}\n}", "title": "" }, { "docid": "b29feed044182f7b537c062ef7aeafe6", "score": "0.6677511", "text": "function startGame() {\n \n // Checks each cell and only allows one click per game\n gameTileElements.forEach (gameTile => {\n gameTile.classList.remove(player1)\n gameTile.classList.remove(player2)\n gameTile.removeEventListener('click', handleClick)\n gameTile.addEventListener('click', handleClick, {once: true})\n })\n setBoardHoverClass()\n winningMessageElement.classList.remove('show')\n }", "title": "" }, { "docid": "70b30f7b5120ef0f1e7e021b3d041ff3", "score": "0.66684836", "text": "function initialStartGame(){\n clearInterval(timerID);\n startCountDown();\n startGame();\n }", "title": "" }, { "docid": "0aed9d5dc6a8254f3287dfd29e284137", "score": "0.66602445", "text": "function startTimer() {\n handle = setInterval(gameTimer, 1000);\n}", "title": "" }, { "docid": "c6a04d272f654a7eb8c9ff30dca61674", "score": "0.6656792", "text": "function start() {\n\ttetris.playGame();\n}", "title": "" }, { "docid": "3d401745dc92e54b7baa24ec6cbe8f13", "score": "0.663894", "text": "function startGame(){\n\tthis.game.state.start(\"Level\");\n}", "title": "" }, { "docid": "621594f40210fa7332ccb178be4daa5a", "score": "0.66301674", "text": "function startGame() {\n console.log('Starting game');\n interval = setInterval(updateGameState, tick); //does this work??\n generateMap();\n cells[0][0].health = 9; //infects first cell\n drawMap();\n}", "title": "" }, { "docid": "104231c3229ba8b260fa517a17a4334b", "score": "0.66291654", "text": "function start_new_game()\n{\n\t//I initialize a new game\n\tHANGMAN = new_hangman_game(HANGMAN);\n\t//I save the new variable in the localStorage\n\tsave_to_localstorage('HANGMAN', HANGMAN);\n\t//I show all the keyboard again\n\tshow_keyboard_letters();\n\t//I actually show the game\n\tshow_cur_game(HANGMAN);\n}", "title": "" }, { "docid": "47e94501d8f77fc3f648b49935ed632a", "score": "0.66230375", "text": "function startGame() {\n gameInProgress = true;\n canvas.fill(0); // Clears canvas\n words = wordCollection.Collection(); // Gets word list from 'words' module\n numRounds = 5;\n curRound = 0;\n turnTime = 90000;\n curTime = null;\n curDrawerID = null;\n io.emit('new word', `<b>Game Starting...</b>`);\n timer = setTimeout(nextRound, timeBeforeGame);\n}", "title": "" }, { "docid": "bbddc50728516f66507c15601c7b2eb8", "score": "0.66184795", "text": "function startGame(){\r\n target_number = Math.floor(Math.random()*900+100);\r\n target.style.animationPlayState = 'running';\r\n clock.style.animationPlayState = 'running';\r\n target.innerHTML = `Your target is: ${target_number}`;\r\n startTimer();\r\n }", "title": "" }, { "docid": "120436c9e16c11bb628ae37d5483356d", "score": "0.6614726", "text": "function startGame(){\n\tcurrentTurn = 0;\n\t\n\t//notification\n\tnotifyStatusLog(\"The game begins\");\n\n\tif(currentTurn == thisPlayerId){\n\t\tnotifyStatusLog(\"It's your turn\");\n\t}else{\n\t\tnotifyStatusLog(\"It's \" + getColorFromPlayerId(currentTurn) + \"'s turn now.\");\n\t}\n}", "title": "" }, { "docid": "ba7468c5c20e8d34abf42e1f0ab8aa9d", "score": "0.66132104", "text": "function beginGame() {\n if (game_active == true) return false;\n game_active = true;\n\n // if there is an active game I make it inactive.\n\n for (row=0; row<=5; row++) {\n gameboard[row] = [];\n for (col=0; col<=6; col++) {\n gameboard[row][col] = null;\n }\n }\n\n // 5. This is how the gameboard grid is created.\n\n drawBoard();\n active_player = 0;\n setUpTurn();\n }", "title": "" }, { "docid": "f1a164c134140fb31d9b83e5116f2d3e", "score": "0.6612241", "text": "startGame() {\n\t\tthis.completed = false;\n\t\tthis.gameOver = false;\n\t}", "title": "" }, { "docid": "bfa2ac162c1ea2302368b890a671974b", "score": "0.66019404", "text": "function startMiniGame(inName) {\n\n // Reset generic game-related variables.\n gameState.playerDirectionUp = false;\n gameState.playerDirectionDown = false;\n gameState.playerDirectionRight = false;\n gameState.playerDirectionLeft = false;\n gameState.playerAction = false;\n gameState.score = 0;\n document.getElementById(\"divStatusArea\").innerHTML = \"Score: \" +\n gameState.score;\n\n // Instantiate mini-game.\n if (inName == \"cosmicSquirrel\") {\n gameState.currentGame = new CosmicSquirrel();\n gameState.currentGame.init();\n } else if (inName == \"deathtrap\") {\n gameState.currentGame = new Deathtrap();\n gameState.currentGame.init();\n } else if (inName == \"refluxive\") {\n gameState.currentGame = new Refluxive();\n gameState.currentGame.init();\n }\n\n // Show the game and hide the game selection screen. Set the mode to indicate\n // mini-game in progress, and draw the console.\n gameState.currentMode = \"miniGame\";\n drawConsole();\n document.getElementById(\"divGameSelection\").style.display = \"none\";\n document.getElementById(\"divMiniGame\").style.display = \"block\";\n\n}", "title": "" }, { "docid": "4135cf0faa283fbfe94bea9108827b54", "score": "0.6601637", "text": "function startSpawning() {\n \"use strict\";\n \n var i, gameSprite;\n \n startTimer();\n startScore();\n playMusic();\n \n // starting animations\n animationStart(\"dj01\", \"dance\", \"SW\");\n sequenceStart(bartenderPath);\n \n // spawn sprites ( 10 seconds apart if room at bar)\n i = 0;\n counter = setInterval(function () {\n i = i + 1;\n \n gameSprite = gameSprites[getRandomGameSprite()];\n \n if (getEmptyCell(\"bar\") !== undefined) {\n spawnSprite(gameSprite);\n }\n \n // i = total number spawn attempts\n if (i === 30) {\n clearInterval(counter);\n }\n }, 10000);\n}", "title": "" }, { "docid": "b34d6e7c6ba55f123764c20bc1385f2e", "score": "0.65989566", "text": "startNewGame() {\n this.performAction('start_new_game');\n }", "title": "" }, { "docid": "3557bac2bc222a85398e348e0d17a944", "score": "0.659857", "text": "function startGame(){\n\t\tdocument.getElementById(\"startScreen\").style.display = \"none\";\n\t\tstartTimer();\n\t}", "title": "" }, { "docid": "549db14fe804394d7df98525b5892419", "score": "0.65935254", "text": "function startGame() {\r\n gameArea.start();\r\n player = new controller(10000000, 10000000);\r\n checkGen();\r\n loadStartingArea();\r\n}", "title": "" }, { "docid": "961c2f43538de59c14b1bd34fbe5eef5", "score": "0.65920174", "text": "function start_game( app_board, app_grid_size ) { \n app_board = create_board( app_board, app_grid_size ); \n return update_board( app_board, app_grid_size );\n }", "title": "" }, { "docid": "8df1742f29054a46c5ff5c6cecc6bee3", "score": "0.6584817", "text": "function start() {\n if (!gameStarted && isOn) {\n moves = [];\n for (var j = 0; j < 20; j++) {\n moves.push(Math.floor(Math.random() * 4));\n }\n \n gameStarted = true;\n document.getElementById(\"level\").innerHTML = (currIndex + 1 > 9) ? (currIndex + 1) : \"0\" + (currIndex + 1);\n logic();\n }\n\n }", "title": "" }, { "docid": "b19607da438d0198784ac781b8cbe3f5", "score": "0.65811753", "text": "function startGame() {\n currentSnake.forEach(index => squares[index].classList.remove('snake'))\n squares[appleIndex].classList.remove('apple')\n clearInterval(interval)\n score = 0\n randomApple()\n direction = 1\n scoreDisplay.innerText = score\n intervalTime = 1000\n currentSnake = [2,1,0]\n currentIndex = 0\n currentSnake.forEach(index => squares[index].classList.add('snake'))\n interval = setInterval(moveOutcomes, intervalTime)\n }", "title": "" }, { "docid": "0242850a61bfe123d1aa69cb297fbb1f", "score": "0.6577879", "text": "startNewRound() {\n this.isGameOver = false;\n this.currentTime = 0;\n this.movingTetromino = null;\n this.stateController.currentState = 'play';\n }", "title": "" }, { "docid": "72deffb0713ebf64e20b90619c262957", "score": "0.6554726", "text": "function startGame(){\n \t\t//chama a funcao para gerar o grid de cartas\n\t\tgridCartas();\n\n \t\tlet card = $('.card');\t\n \t\t//Zerar os movimentos\n \t\tmovesCount=0;\n\t\tmovimento = 0;\n\t\t$('.moves').html(movimento);\n\t\t//zerar o array após reiniciar o jogo.\n\t\topenCard.length = 0;\n \t\t//Chamada para iniciar o tempo de jogo\n \t\tstartTimer();\n \t\t//Funcao para abrir as cartas\n \t\tabrirCartas(card);\n \t}", "title": "" }, { "docid": "7e828b31937701bc7a58bbe4a4f312df", "score": "0.65520555", "text": "function StartGameOnClick () {\n console.log(\"Game has started!\");\n resetGameValues();\n game.state.start('Game1');\n}", "title": "" }, { "docid": "e01903ddc315bb713c69d44eef0f7795", "score": "0.6550671", "text": "function startGame() {\n console.log('Game started!');\n game = new Game(1,1);\n}", "title": "" }, { "docid": "333f29a69607acdd8bff2e9e3c89b41a", "score": "0.6549636", "text": "function start() {\r\n //showgamepage\r\n gotToGame();\r\n //check number of players selected in menu\r\n checkPlayers();\r\n //show number of boards depends on number of players\r\n showBoards();\r\n //null game atributes\r\n nullGame();\r\n //loops that places food energy and bombs\r\n foodPlaceLoop();\r\n bombPlaceLoop();\r\n energyPlaceLoop();\r\n //main game loop\r\n gameLoop();\r\n}", "title": "" }, { "docid": "3d0f7c2e58e4491bb33a1789c8af568e", "score": "0.6547103", "text": "function startGame() {\n console.log('Game Started');\n createCards();\n activateCards();\n init_Timer();\n flashCards();\n}", "title": "" }, { "docid": "40956f508ab8155487767a06f2312317", "score": "0.65430117", "text": "function startGame() {\n displayParaMessage(\"continue\");\n document.getElementById(\"points-system\").classList.remove(\"none\");\n updatePoints();\n resultContainer.classList.add(\"none\");\n cells.forEach( cell=> {\n cell.innerHTML = \"\";\n cell.classList.remove(\"disable-click\");\n cell.addEventListener('click', cellClicked);\n });\n}", "title": "" }, { "docid": "477117e92c675586a84fba68a2185dcc", "score": "0.6536723", "text": "function startGame() {\n}", "title": "" }, { "docid": "00847f45a77da23e08e70e94327ac3d3", "score": "0.6534869", "text": "function startGame() {\n xTurn = true;\n cells.forEach((cell) => {\n cell.classList.remove(xClass);\n cell.classList.remove(oClass);\n cell.removeEventListener(\"click\", handleclick);\n cell.addEventListener(\"click\", handleclick, { once: true });\n });\n winningMessageElement.classList.remove(\"show\");\n setHoverBoardClass();\n}", "title": "" }, { "docid": "f1470bad4a8a1301c54fb6ba93e2d69f", "score": "0.653036", "text": "function startNewRound(timePerRound){\r\n\r\n let timePerThisTurn=timePerRound;\r\n areYouReady=true;\r\n \r\n //Set up game for first step of the path\r\n player.setStartingPosition(Math.floor(safePaths[safePathindex][stepInPath]/10), safePaths[safePathindex][stepInPath]%10);\r\n movesThisTurn=0;\r\n updatePlayerOnBoard();\r\n playerAvatar.style.transition=\"transform 0.15s ease-in-out\";\r\n shakeTiles(safePaths[safePathindex][stepInPath],stepInPath);\r\n refreshTimeIndicator(timePerThisTurn);\r\n\r\n //Start the setInterval that controuls the turns in the round\r\n let timerThisTurn =setInterval(() => {\r\n \r\n movesThisTurn=0;\r\n fallFakeTiles(safePaths[safePathindex][stepInPath],safePaths[safePathindex][stepInPath+1]);\r\n stepInPath++;\r\n //if we get to the end of the path we win\r\n if(stepInPath===safePaths[safePathindex].length){\r\n clearInterval(timerThisTurn);\r\n setTimeout(()=>{\r\n win.play();\r\n gameWonWindow.style.visibility=\"visible\";\r\n timeInfo.innerHTML=(timePerRound-50)/1000;\r\n },800)\r\n }\r\n\r\n //If we are still not the end of the path\r\n else{\r\n checkIfPlayerIsAlive(safePaths[safePathindex][stepInPath],timerThisTurn);\r\n refreshTimeIndicator(timePerThisTurn);\r\n shakeTiles(safePaths[safePathindex][stepInPath],stepInPath);\r\n }\r\n \r\n\r\n }, timePerThisTurn);\r\n}", "title": "" }, { "docid": "ec9fb197810d854e8f94847b2e742926", "score": "0.6521093", "text": "function startGame() {\n //createTimer('100000');\n\n //startTimer();\n\n\n setInterval(function () {\n seconds = pad(++sec % 60);\n minutes = pad(parseInt(sec / 60, 10));\n $('#counter').html(minutes + \":\" + seconds);\n\n //start.loop = true;\n //start.play();\n }, 1000);\n }", "title": "" }, { "docid": "662c5761a053dc7a21b2e10d308782b1", "score": "0.6519353", "text": "function start_game(){\n if (!started){\n game();\n }\n}", "title": "" }, { "docid": "359cc1491a59bdab60c878c16a63e665", "score": "0.6515761", "text": "function StartGame() {\n\tconst cells = document.querySelectorAll('.cell');\n\tstartGame_btn.disabled = true;\n\tboard_tb.classList.remove('board-disabled')\n\n\tfor (var i=0; i<cells.length; i++) {\n\t\tcells[i].innerText='';\n\t\tcells[i].style.removeProperty('background-color');\n\t\tcells[i].addEventListener('click', TurnClick,false );\n\tgameStatus.innerHTML = 'This is turn of : player 1 (' + currentPlayer +')';\n\t\n\t}\n}", "title": "" }, { "docid": "ffaafaced2b55b546a8f561433fdefba", "score": "0.65143067", "text": "function startGame() {\n\n clearInterval(intervalId);\n\n // clear results\n correct = 0;\n incorrect = 0;\n unanswered = 0;\n questionCounter = 0;\n\n // show game section and timer\n $('#game').show();\n\n // empty results\n $('#results').empty();\n // hide start button\n $('#start').hide();\n\n // empty start over button\n $('#start-btn').empty()\n\n // ask first question\n showQuestion();\n}", "title": "" }, { "docid": "083aaf2710389d6e626b00ed9b8db771", "score": "0.650869", "text": "startGame() {\r\n this.activePlayer = this.players[0]\r\n this.activePlayerIndex = 0\r\n this.gameIsRunning = 1\r\n this.firstTurn = true\r\n this.playerTurn()\r\n }", "title": "" }, { "docid": "2b01a9790bd0ad88986589d304b43009", "score": "0.65085506", "text": "function startGame(){\n //set player into original place\n player.reset();\n //reset life to 5\n numLife = 5;\n lifeCount.textContent = numLife.toString();\n //reset score to 0\n numScore = 0;\n scoreCount.textContent = numScore.toString();\n //reset star to 0\n numStar = 0;\n starCount.textContent = numStar.toString();\n\n winGame = false;\n loseGame = false;\n\n //enable keys to move player\n enableKeys();\n //clear the enemies\n clearEnemies();\n //create 5 enemies\n makeEnemies(5);\n //new star\n star = new Item(0, rowH*2-25);\n //change the start button context\n startButton.textContent = \"restart\";\n pauseButton.textContent = \"pause\";\n}", "title": "" }, { "docid": "fa842ade92c09e071d29ac644882aa62", "score": "0.65074784", "text": "function startGame() {\n // set initial values for the global variables...\n\n // start the timers to draw new frames\n var timeBetweenPacmanFrames = 1000 / FPS; // 5 frames per second\n var timeBetweenGhostFrames = 1000 / (FPS - 1); // 4 frames per second \n pacmanTimer = setInterval(drawNewPacmanFrame, timeBetweenPacmanFrames);\n ghostTimer = setInterval(drawNewGhostFrame, timeBetweenGhostFrames);\n \n // turn on event handlers\n $(document).on('eventType', handleEvent);\n }", "title": "" }, { "docid": "f882195a4855ad5ce1795db955b946f8", "score": "0.6506902", "text": "function startGame() {\n document.getElementById(\"myTable\").style.display = \"block\";\n document.getElementById(\"startBTN\").style.display = \"none\";\n document.getElementById(\"restartBTN\").style.display = \"block\";\n document.getElementById(\"info\").style.display = \"none\";\n document.getElementById(\"ships\").style.display = \"block\";\n createGame();\n //console.log(compShips); // debugging purposes or to quickly win game\n}", "title": "" }, { "docid": "07b148ad492c2b9f474e31952c625371", "score": "0.6503756", "text": "function startGame () {\n currentGame.gameIsRunning = true;\n cancelAnimationFrame(animationFrameId); \n document.getElementById('game-intro').style.display = 'none';\n document.getElementById('game-over').style.display = 'none';\n document.getElementById('game-board').style.display = 'block';\n document.getElementById('game-buttons').style.display = 'inline';\n document.getElementById('kms').style.display = 'block';\n //Instantiate a new monkey\n currentCharacter = new Character ();\n currentGame.character = currentCharacter;\n currentGame.character.drawCharacter();\n musicGame.play();\n //Refersh the all Canvas\n updateCanvas();\n}", "title": "" }, { "docid": "581412c83f523491f3fde1c841054b0e", "score": "0.65028304", "text": "function startGame(){\n musicSound.play();\n currentSnake.forEach(index => {\n squares[index].classList.remove('snake');\n squares[index].classList.remove('head');\n });\n squares[appleIndex].classList.remove('apple');\n clearInterval(interval);\n score = 0;\n randomApple()\n direction = 1;\n scoreDisplay.innerText = score;\n intervalTime = 400;\n currentSnake = [2, 1, 0];\n currentIndex = 0;\n currentSnake.forEach(index => squares[index].classList.add('snake'));\n squares[currentSnake[0]].classList.add('head');\n interval = setInterval(moveOutcome, intervalTime);\n }", "title": "" }, { "docid": "3d0052061c001627b7e815b92301eded", "score": "0.64957076", "text": "function startGame() {\n\tshuffleCards();\n\tstopTimer();\n\tnumber = 0;\n\tmoves.innerHTML = number;\n\tstars.innerHTML = star.innerHTML + star.innerHTML + star.innerHTML;\n\tcloseModal();\n\tmatched = 0;\n}", "title": "" }, { "docid": "ed6ff5ee8ad172f88848824d1dbef746", "score": "0.64950305", "text": "function startNewGame() {\n showStuff('dealer2');\n hideStuff('result');\n hideStuff('newGame');\n playGame();\t\n}", "title": "" }, { "docid": "584bba02fad3ff6f27509d2e619b381d", "score": "0.64949876", "text": "function startGame() {\n curBoard = [];\n //create an actual game board\n for(let i=0; i<9; i++){\n curBoard.push('f'); //free slot\n }\n clearBoard();\n updateScreenScore();\n switchPlayers();\n winningIndex = null;\n curWinner = null;\n}", "title": "" }, { "docid": "1146fe78449ed3245412c0681215a8c0", "score": "0.64913017", "text": "function startGame() {\n if (isGameStarted.value) return;\n isGameStarted.value = true;\n\n POINTS_DISPLAY.innerText = \"Points: 0\";\n\n //Sets the players style to a pseudo random hex\n PLAYER_STYLE.backgroundColor = getHex()\n DOT_STYLE.backgroundColor = `black`\n\n //Spawns the player and dot\n playerSpawn()\n dotSpawn()\n\n //Sets the interval for spawning the dot\n spawnInterval = setInterval(dotSpawn, difficulty)\n\n //Sets the interval for checking for points\n checkForPointsInterval = setInterval(Points.incrementPoints, 10)\n\n COUNTDOWN.startCountdown();\n}", "title": "" }, { "docid": "edafa7b944010888332305667a4ee5b3", "score": "0.64900154", "text": "function beginGame() {\n if(game_active == true){return false};\n game_active = true;\n resetGrid();\n refreshGrid();\n}", "title": "" }, { "docid": "2f05ae568e9439d2e42f19a2665a9cb6", "score": "0.6485307", "text": "function startNewGame() {\n // remove all objects\n button = null;\n asteroids = 0;\n bullets = 0;\n\n // todo: make a transfer slower!\n //resetState();\n stateMenu = false;\n stateGame = true;\n\n //set up player variables\n playerScore = 0;\n playerLives = 3;\n\n // create game objects\n player = new Player();\n bullets = [];\n asteroids = [];\n\n currentFrame = frameCount;\n\n //while new cycle have not started yet and player lives is 0,\n // generate a value for random hint\n randomHint = Math.floor(random(hints.length - 1));\n if (debug) {\n console.log('Hint to show: ' + randomHint + '/' + hints.length);\n }\n\n}", "title": "" }, { "docid": "e2d9e282f051eb7ef392a9f9adb3e0fa", "score": "0.6483528", "text": "jumpToStart() {\n\t\tDISPLAY.clearAnimations();\n\t\tDISPLAY.resetPlayers();\n\n\t\tthis.showGameStartState();\n\t}", "title": "" }, { "docid": "706072db89214367e07cf5a89f0f0e65", "score": "0.6481878", "text": "function StartTimer() {\n timerRun = true;\n currentGameTimer = defaultGameTimer;\n}", "title": "" }, { "docid": "5c15e6a6a48d78bd01105e82b2c0782f", "score": "0.64814526", "text": "function startGame(board, pos) {\n if (!gIsManualMines) placeMines(board, gLevel.MINES, pos);\n setMinesNegsCount(board);\n printBoard(board);\n gGame.startTime = Date.now();\n gTimerInterval = setInterval(function () {\n document.querySelector('.timer').innerText = getGameRunTime();\n }, 1000);\n}", "title": "" }, { "docid": "d99b435685bf58291efc27dc75f7aa62", "score": "0.6480943", "text": "function startGame() {\n\t\t// hide seconds display\n\t\tdisplaySeconds.hide();\n\n\t\t// create lading page title\n\t\tvar startTitle = $(\"<h1>\");\n\t\tstartTitle.html(\"TRIVIA\");\n\t\t$(\"#container\").append(startTitle);\n\n\t\t// create landing page logo\n\t\tvar startIcon = $(\"<div class='fa fa-globe'>\");\n\t\t$(\"#container\").append(startIcon);\n\n\t\t// create landing page start button\n\t\tvar startButton = $(\"<button class='btn btn-start'>\");\n\t\tstartButton.html(\"Start Game\");\n\t\t$(\"#container\").append(startButton);\n\n\t\t// click event function on the start button\n\t\tstartButton.click(function() {\n\t\t\tquestionPage();\n\t\t\tdisplaySeconds.show();\n\t\t\tstartButton.hide();\n\t\t\tstartTitle.hide();\n\t\t\tstartIcon.css(\"top\", \"100px\");\n\t\t\tstartIcon.css(\"right\", \"0\");\n\n\t\t});\n\n\t} // ***** END START GAME function *****", "title": "" }, { "docid": "733a27eff696879a672b4bf024e58dbe", "score": "0.6477196", "text": "function startGame() {\n resetValues();\n startTimer();\n shuffleCards();\n updateCardDeck();\n}", "title": "" } ]
aee6ec04fef1026ec24330678d2f11d0
Draws the given range as a highlighted selection
[ { "docid": "0695ce91e834c5dcf9635163bf45b97b", "score": "0.74215096", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" } ]
[ { "docid": "a423975084b5afe6603210e36f13538f", "score": "0.7547659", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left, rightSide = display.lineSpace.offsetWidth - padding.right;\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left + \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px; height: \" + (bottom - top) + \"px\"));\n }\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") {\n var tmp = leftPos;\n leftPos = rightPos;\n rightPos = tmp;\n }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) {\n // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {\n start: start,\n end: end\n };\n }\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top) add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "4ceccefe4ab8899e551a427442727f1e", "score": "0.75189173", "text": "function drawSelectionRange(cm, range, output) {\n\t\t var display = cm.display, doc = cm.doc;\n\t\t var fragment = document.createDocumentFragment();\n\t\t var padding = paddingH(cm.display), leftSide = padding.left;\n\t\t var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\t\t var docLTR = doc.direction == \"ltr\";\n\n\t\t function add(left, top, width, bottom) {\n\t\t if (top < 0) { top = 0; }\n\t\t top = Math.round(top);\n\t\t bottom = Math.round(bottom);\n\t\t fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n\t\t }\n\n\t\t function drawForLine(line, fromArg, toArg) {\n\t\t var lineObj = getLine(doc, line);\n\t\t var lineLen = lineObj.text.length;\n\t\t var start, end;\n\t\t function coords(ch, bias) {\n\t\t return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n\t\t }\n\n\t\t function wrapX(pos, dir, side) {\n\t\t var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n\t\t var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n\t\t var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n\t\t return coords(ch, prop)[prop]\n\t\t }\n\n\t\t var order = getOrder(lineObj, doc.direction);\n\t\t iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n\t\t var ltr = dir == \"ltr\";\n\t\t var fromPos = coords(from, ltr ? \"left\" : \"right\");\n\t\t var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n\t\t var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n\t\t var first = i == 0, last = !order || i == order.length - 1;\n\t\t if (toPos.top - fromPos.top <= 3) { // Single line\n\t\t var openLeft = (docLTR ? openStart : openEnd) && first;\n\t\t var openRight = (docLTR ? openEnd : openStart) && last;\n\t\t var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n\t\t var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n\t\t add(left, fromPos.top, right - left, fromPos.bottom);\n\t\t } else { // Multiple lines\n\t\t var topLeft, topRight, botLeft, botRight;\n\t\t if (ltr) {\n\t\t topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n\t\t topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n\t\t botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n\t\t botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n\t\t } else {\n\t\t topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n\t\t topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n\t\t botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n\t\t botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n\t\t }\n\t\t add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n\t\t if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n\t\t add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n\t\t }\n\n\t\t if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n\t\t if (cmpCoords(toPos, start) < 0) { start = toPos; }\n\t\t if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n\t\t if (cmpCoords(toPos, end) < 0) { end = toPos; }\n\t\t });\n\t\t return {start: start, end: end}\n\t\t }\n\n\t\t var sFrom = range.from(), sTo = range.to();\n\t\t if (sFrom.line == sTo.line) {\n\t\t drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n\t\t } else {\n\t\t var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n\t\t var singleVLine = visualLine(fromLine) == visualLine(toLine);\n\t\t var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n\t\t var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n\t\t if (singleVLine) {\n\t\t if (leftEnd.top < rightStart.top - 2) {\n\t\t add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n\t\t add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n\t\t } else {\n\t\t add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n\t\t }\n\t\t }\n\t\t if (leftEnd.bottom < rightStart.top)\n\t\t { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n\t\t }\n\n\t\t output.appendChild(fragment);\n\t\t }", "title": "" }, { "docid": "c7de6e38c59bcf30b362df9dd630df86", "score": "0.75186044", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left, rightSide = display.lineSpace.offsetWidth - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "c7de6e38c59bcf30b362df9dd630df86", "score": "0.75186044", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left, rightSide = display.lineSpace.offsetWidth - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "c7de6e38c59bcf30b362df9dd630df86", "score": "0.75186044", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left, rightSide = display.lineSpace.offsetWidth - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "0ebbddfef847629d7dedfef2bb7d5c61", "score": "0.74924827", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "5c95658e245556a679ce9fa335de09a2", "score": "0.74881107", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "e1350269d6981c4519c84a650d960a3d", "score": "0.7455654", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n iterateBidiSections(getOrder(lineObj, doc.direction), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) { left = leftSide; }\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top); }\n }\n if (toArg == null && to == lineLen) { right = rightSide; }\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n { start = leftPos; }\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n { end = rightPos; }\n if (left < leftSide + 1) { left = leftSide; }\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "e1350269d6981c4519c84a650d960a3d", "score": "0.7455654", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n iterateBidiSections(getOrder(lineObj, doc.direction), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) { left = leftSide; }\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top); }\n }\n if (toArg == null && to == lineLen) { right = rightSide; }\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n { start = leftPos; }\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n { end = rightPos; }\n if (left < leftSide + 1) { left = leftSide; }\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "e1350269d6981c4519c84a650d960a3d", "score": "0.7455654", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n iterateBidiSections(getOrder(lineObj, doc.direction), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) { left = leftSide; }\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top); }\n }\n if (toArg == null && to == lineLen) { right = rightSide; }\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n { start = leftPos; }\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n { end = rightPos; }\n if (left < leftSide + 1) { left = leftSide; }\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "e1350269d6981c4519c84a650d960a3d", "score": "0.7455654", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n iterateBidiSections(getOrder(lineObj, doc.direction), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) { left = leftSide; }\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top); }\n }\n if (toArg == null && to == lineLen) { right = rightSide; }\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n { start = leftPos; }\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n { end = rightPos; }\n if (left < leftSide + 1) { left = leftSide; }\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "314cae13394d6dd4f87ad47a4daae59f", "score": "0.7446185", "text": "function drawSelectionRange(cm, range, output) {\r\n var display = cm.display, doc = cm.doc\r\n var fragment = document.createDocumentFragment()\r\n var padding = paddingH(cm.display), leftSide = padding.left\r\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right\r\n\r\n function add(left, top, width, bottom) {\r\n if (top < 0) { top = 0 }\r\n top = Math.round(top)\r\n bottom = Math.round(bottom)\r\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")))\r\n }\r\n\r\n function drawForLine(line, fromArg, toArg) {\r\n var lineObj = getLine(doc, line)\r\n var lineLen = lineObj.text.length\r\n var start, end\r\n function coords(ch, bias) {\r\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\r\n }\r\n\r\n iterateBidiSections(getOrder(lineObj, doc.direction), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\r\n var leftPos = coords(from, \"left\"), rightPos, left, right\r\n if (from == to) {\r\n rightPos = leftPos\r\n left = right = leftPos.left\r\n } else {\r\n rightPos = coords(to - 1, \"right\")\r\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp }\r\n left = leftPos.left\r\n right = rightPos.right\r\n }\r\n if (fromArg == null && from == 0) { left = leftSide }\r\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\r\n add(left, leftPos.top, null, leftPos.bottom)\r\n left = leftSide\r\n if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top) }\r\n }\r\n if (toArg == null && to == lineLen) { right = rightSide }\r\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\r\n { start = leftPos }\r\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\r\n { end = rightPos }\r\n if (left < leftSide + 1) { left = leftSide }\r\n add(left, rightPos.top, right - left, rightPos.bottom)\r\n })\r\n return {start: start, end: end}\r\n }\r\n\r\n var sFrom = range.from(), sTo = range.to()\r\n if (sFrom.line == sTo.line) {\r\n drawForLine(sFrom.line, sFrom.ch, sTo.ch)\r\n } else {\r\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line)\r\n var singleVLine = visualLine(fromLine) == visualLine(toLine)\r\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end\r\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start\r\n if (singleVLine) {\r\n if (leftEnd.top < rightStart.top - 2) {\r\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom)\r\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom)\r\n } else {\r\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom)\r\n }\r\n }\r\n if (leftEnd.bottom < rightStart.top)\r\n { add(leftSide, leftEnd.bottom, null, rightStart.top) }\r\n }\r\n\r\n output.appendChild(fragment)\r\n}", "title": "" }, { "docid": "14dc2077d5083d797048c18de592b8d6", "score": "0.74446476", "text": "function drawSelectionRange(cm, range, output) {\n\t var display = cm.display, doc = cm.doc;\n\t var fragment = document.createDocumentFragment();\n\t var padding = paddingH(cm.display), leftSide = padding.left;\n\t var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n\t function add(left, top, width, bottom) {\n\t if (top < 0) top = 0;\n\t top = Math.round(top);\n\t bottom = Math.round(bottom);\n\t fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n\t \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n\t \"px; height: \" + (bottom - top) + \"px\"));\n\t }\n\n\t function drawForLine(line, fromArg, toArg) {\n\t var lineObj = getLine(doc, line);\n\t var lineLen = lineObj.text.length;\n\t var start, end;\n\t function coords(ch, bias) {\n\t return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n\t }\n\n\t iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n\t var leftPos = coords(from, \"left\"), rightPos, left, right;\n\t if (from == to) {\n\t rightPos = leftPos;\n\t left = right = leftPos.left;\n\t } else {\n\t rightPos = coords(to - 1, \"right\");\n\t if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n\t left = leftPos.left;\n\t right = rightPos.right;\n\t }\n\t if (fromArg == null && from == 0) left = leftSide;\n\t if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n\t add(left, leftPos.top, null, leftPos.bottom);\n\t left = leftSide;\n\t if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n\t }\n\t if (toArg == null && to == lineLen) right = rightSide;\n\t if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n\t start = leftPos;\n\t if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n\t end = rightPos;\n\t if (left < leftSide + 1) left = leftSide;\n\t add(left, rightPos.top, right - left, rightPos.bottom);\n\t });\n\t return {start: start, end: end};\n\t }\n\n\t var sFrom = range.from(), sTo = range.to();\n\t if (sFrom.line == sTo.line) {\n\t drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n\t } else {\n\t var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n\t var singleVLine = visualLine(fromLine) == visualLine(toLine);\n\t var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n\t var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n\t if (singleVLine) {\n\t if (leftEnd.top < rightStart.top - 2) {\n\t add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n\t add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n\t } else {\n\t add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n\t }\n\t }\n\t if (leftEnd.bottom < rightStart.top)\n\t add(leftSide, leftEnd.bottom, null, rightStart.top);\n\t }\n\n\t output.appendChild(fragment);\n\t }", "title": "" }, { "docid": "14dc2077d5083d797048c18de592b8d6", "score": "0.74446476", "text": "function drawSelectionRange(cm, range, output) {\n\t var display = cm.display, doc = cm.doc;\n\t var fragment = document.createDocumentFragment();\n\t var padding = paddingH(cm.display), leftSide = padding.left;\n\t var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n\t function add(left, top, width, bottom) {\n\t if (top < 0) top = 0;\n\t top = Math.round(top);\n\t bottom = Math.round(bottom);\n\t fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n\t \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n\t \"px; height: \" + (bottom - top) + \"px\"));\n\t }\n\n\t function drawForLine(line, fromArg, toArg) {\n\t var lineObj = getLine(doc, line);\n\t var lineLen = lineObj.text.length;\n\t var start, end;\n\t function coords(ch, bias) {\n\t return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n\t }\n\n\t iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n\t var leftPos = coords(from, \"left\"), rightPos, left, right;\n\t if (from == to) {\n\t rightPos = leftPos;\n\t left = right = leftPos.left;\n\t } else {\n\t rightPos = coords(to - 1, \"right\");\n\t if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n\t left = leftPos.left;\n\t right = rightPos.right;\n\t }\n\t if (fromArg == null && from == 0) left = leftSide;\n\t if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n\t add(left, leftPos.top, null, leftPos.bottom);\n\t left = leftSide;\n\t if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n\t }\n\t if (toArg == null && to == lineLen) right = rightSide;\n\t if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n\t start = leftPos;\n\t if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n\t end = rightPos;\n\t if (left < leftSide + 1) left = leftSide;\n\t add(left, rightPos.top, right - left, rightPos.bottom);\n\t });\n\t return {start: start, end: end};\n\t }\n\n\t var sFrom = range.from(), sTo = range.to();\n\t if (sFrom.line == sTo.line) {\n\t drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n\t } else {\n\t var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n\t var singleVLine = visualLine(fromLine) == visualLine(toLine);\n\t var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n\t var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n\t if (singleVLine) {\n\t if (leftEnd.top < rightStart.top - 2) {\n\t add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n\t add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n\t } else {\n\t add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n\t }\n\t }\n\t if (leftEnd.bottom < rightStart.top)\n\t add(leftSide, leftEnd.bottom, null, rightStart.top);\n\t }\n\n\t output.appendChild(fragment);\n\t }", "title": "" }, { "docid": "14dc2077d5083d797048c18de592b8d6", "score": "0.74446476", "text": "function drawSelectionRange(cm, range, output) {\n\t var display = cm.display, doc = cm.doc;\n\t var fragment = document.createDocumentFragment();\n\t var padding = paddingH(cm.display), leftSide = padding.left;\n\t var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n\t function add(left, top, width, bottom) {\n\t if (top < 0) top = 0;\n\t top = Math.round(top);\n\t bottom = Math.round(bottom);\n\t fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n\t \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n\t \"px; height: \" + (bottom - top) + \"px\"));\n\t }\n\n\t function drawForLine(line, fromArg, toArg) {\n\t var lineObj = getLine(doc, line);\n\t var lineLen = lineObj.text.length;\n\t var start, end;\n\t function coords(ch, bias) {\n\t return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n\t }\n\n\t iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n\t var leftPos = coords(from, \"left\"), rightPos, left, right;\n\t if (from == to) {\n\t rightPos = leftPos;\n\t left = right = leftPos.left;\n\t } else {\n\t rightPos = coords(to - 1, \"right\");\n\t if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n\t left = leftPos.left;\n\t right = rightPos.right;\n\t }\n\t if (fromArg == null && from == 0) left = leftSide;\n\t if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n\t add(left, leftPos.top, null, leftPos.bottom);\n\t left = leftSide;\n\t if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n\t }\n\t if (toArg == null && to == lineLen) right = rightSide;\n\t if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n\t start = leftPos;\n\t if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n\t end = rightPos;\n\t if (left < leftSide + 1) left = leftSide;\n\t add(left, rightPos.top, right - left, rightPos.bottom);\n\t });\n\t return {start: start, end: end};\n\t }\n\n\t var sFrom = range.from(), sTo = range.to();\n\t if (sFrom.line == sTo.line) {\n\t drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n\t } else {\n\t var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n\t var singleVLine = visualLine(fromLine) == visualLine(toLine);\n\t var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n\t var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n\t if (singleVLine) {\n\t if (leftEnd.top < rightStart.top - 2) {\n\t add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n\t add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n\t } else {\n\t add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n\t }\n\t }\n\t if (leftEnd.bottom < rightStart.top)\n\t add(leftSide, leftEnd.bottom, null, rightStart.top);\n\t }\n\n\t output.appendChild(fragment);\n\t }", "title": "" }, { "docid": "94f414f01b89806d590e6157af4125bf", "score": "0.74435604", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "94f414f01b89806d590e6157af4125bf", "score": "0.74435604", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "94f414f01b89806d590e6157af4125bf", "score": "0.74435604", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "94f414f01b89806d590e6157af4125bf", "score": "0.74435604", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "94f414f01b89806d590e6157af4125bf", "score": "0.74435604", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "94f414f01b89806d590e6157af4125bf", "score": "0.74435604", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "94f414f01b89806d590e6157af4125bf", "score": "0.74435604", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }", "title": "" }, { "docid": "db693aaccf807ba92dce9131af8fe653", "score": "0.7439754", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc\n var fragment = document.createDocumentFragment()\n var padding = paddingH(cm.display), leftSide = padding.left\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0 }\n top = Math.round(top)\n bottom = Math.round(bottom)\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")))\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line)\n var lineLen = lineObj.text.length\n var start, end\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right\n if (from == to) {\n rightPos = leftPos\n left = right = leftPos.left\n } else {\n rightPos = coords(to - 1, \"right\")\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp }\n left = leftPos.left\n right = rightPos.right\n }\n if (fromArg == null && from == 0) { left = leftSide }\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom)\n left = leftSide\n if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top) }\n }\n if (toArg == null && to == lineLen) { right = rightSide }\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n { start = leftPos }\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n { end = rightPos }\n if (left < leftSide + 1) { left = leftSide }\n add(left, rightPos.top, right - left, rightPos.bottom)\n })\n return {start: start, end: end}\n }\n\n var sFrom = range.from(), sTo = range.to()\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch)\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line)\n var singleVLine = visualLine(fromLine) == visualLine(toLine)\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom)\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom)\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom)\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top) }\n }\n\n output.appendChild(fragment)\n}", "title": "" }, { "docid": "d33add730f28978235e86c073a43cea0", "score": "0.7428151", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "d33add730f28978235e86c073a43cea0", "score": "0.7428151", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "d33add730f28978235e86c073a43cea0", "score": "0.7428151", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "d33add730f28978235e86c073a43cea0", "score": "0.7428151", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "d33add730f28978235e86c073a43cea0", "score": "0.7428151", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "d33add730f28978235e86c073a43cea0", "score": "0.7428151", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "0a223a3163b05dae3eabeb5a089c335d", "score": "0.7411644", "text": "function drawSelectionRange(cm, range, output) {\n\t var display = cm.display, doc = cm.doc\n\t var fragment = document.createDocumentFragment()\n\t var padding = paddingH(cm.display), leftSide = padding.left\n\t var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right\n\n\t function add(left, top, width, bottom) {\n\t if (top < 0) { top = 0 }\n\t top = Math.round(top)\n\t bottom = Math.round(bottom)\n\t fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")))\n\t }\n\n\t function drawForLine(line, fromArg, toArg) {\n\t var lineObj = getLine(doc, line)\n\t var lineLen = lineObj.text.length\n\t var start, end\n\t function coords(ch, bias) {\n\t return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n\t }\n\n\t iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\n\t var leftPos = coords(from, \"left\"), rightPos, left, right\n\t if (from == to) {\n\t rightPos = leftPos\n\t left = right = leftPos.left\n\t } else {\n\t rightPos = coords(to - 1, \"right\")\n\t if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp }\n\t left = leftPos.left\n\t right = rightPos.right\n\t }\n\t if (fromArg == null && from == 0) { left = leftSide }\n\t if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n\t add(left, leftPos.top, null, leftPos.bottom)\n\t left = leftSide\n\t if (leftPos.bottom < rightPos.top) { add(left, leftPos.bottom, null, rightPos.top) }\n\t }\n\t if (toArg == null && to == lineLen) { right = rightSide }\n\t if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n\t { start = leftPos }\n\t if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n\t { end = rightPos }\n\t if (left < leftSide + 1) { left = leftSide }\n\t add(left, rightPos.top, right - left, rightPos.bottom)\n\t })\n\t return {start: start, end: end}\n\t }\n\n\t var sFrom = range.from(), sTo = range.to()\n\t if (sFrom.line == sTo.line) {\n\t drawForLine(sFrom.line, sFrom.ch, sTo.ch)\n\t } else {\n\t var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line)\n\t var singleVLine = visualLine(fromLine) == visualLine(toLine)\n\t var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end\n\t var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start\n\t if (singleVLine) {\n\t if (leftEnd.top < rightStart.top - 2) {\n\t add(leftEnd.right, leftEnd.top, null, leftEnd.bottom)\n\t add(leftSide, rightStart.top, rightStart.left, rightStart.bottom)\n\t } else {\n\t add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom)\n\t }\n\t }\n\t if (leftEnd.bottom < rightStart.top)\n\t { add(leftSide, leftEnd.bottom, null, rightStart.top) }\n\t }\n\n\t output.appendChild(fragment)\n\t}", "title": "" }, { "docid": "dff354ac2acc1646d9ac761ccbb815ba", "score": "0.74003613", "text": "function drawSelectionRange(cm, range$$1, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var fromPos = coords(from, dir == \"ltr\" ? \"left\" : \"right\");\n var toPos = coords(to - 1, dir == \"ltr\" ? \"right\" : \"left\");\n if (dir == \"ltr\") {\n var fromLeft = fromArg == null && from == 0 ? leftSide : fromPos.left;\n var toRight = toArg == null && to == lineLen ? rightSide : toPos.right;\n if (toPos.top - fromPos.top <= 3) { // Single line\n add(fromLeft, toPos.top, toRight - fromLeft, toPos.bottom);\n } else { // Multiple lines\n add(fromLeft, fromPos.top, null, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(leftSide, toPos.top, toPos.right, toPos.bottom);\n }\n } else if (from < to) { // RTL\n var fromRight = fromArg == null && from == 0 ? rightSide : fromPos.right;\n var toLeft = toArg == null && to == lineLen ? leftSide : toPos.left;\n if (toPos.top - fromPos.top <= 3) { // Single line\n add(toLeft, toPos.top, fromRight - toLeft, toPos.bottom);\n } else { // Multiple lines\n var topLeft = leftSide;\n if (i) {\n var topEnd = wrappedLineExtentChar(cm, lineObj, null, from).end;\n // The coordinates returned for an RTL wrapped space tend to\n // be complete bogus, so try to skip that here.\n topLeft = coords(topEnd - (/\\s/.test(lineObj.text.charAt(topEnd - 1)) ? 2 : 1), \"left\").left;\n }\n add(topLeft, fromPos.top, fromRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n var botWidth = null;\n if (i < order.length - 1 || true) {\n var botStart = wrappedLineExtentChar(cm, lineObj, null, to).begin;\n botWidth = coords(botStart, \"right\").right - toLeft;\n }\n add(toLeft, toPos.top, botWidth, toPos.bottom);\n }\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range$$1.from(), sTo = range$$1.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n}", "title": "" }, { "docid": "772ef0fb02dd92a3587f968197704983", "score": "0.7399772", "text": "function drawSelectionRange(cm, range, output) {\n\t var display = cm.display,\n\t doc = cm.doc;\n\t var fragment = document.createDocumentFragment();\n\t var padding = paddingH(cm.display),\n\t leftSide = padding.left;\n\t var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n\t function add(left, top, width, bottom) {\n\t if (top < 0) {\n\t top = 0;\n\t }\n\t top = Math.round(top);\n\t bottom = Math.round(bottom);\n\t fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\"));\n\t }\n\n\t function drawForLine(line, fromArg, toArg) {\n\t var lineObj = getLine(doc, line);\n\t var lineLen = lineObj.text.length;\n\t var start, end;\n\t function coords(ch, bias) {\n\t return _charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n\t }\n\n\t iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir) {\n\t var leftPos = coords(from, \"left\"),\n\t rightPos,\n\t left,\n\t right;\n\t if (from == to) {\n\t rightPos = leftPos;\n\t left = right = leftPos.left;\n\t } else {\n\t rightPos = coords(to - 1, \"right\");\n\t if (dir == \"rtl\") {\n\t var tmp = leftPos;leftPos = rightPos;rightPos = tmp;\n\t }\n\t left = leftPos.left;\n\t right = rightPos.right;\n\t }\n\t if (fromArg == null && from == 0) {\n\t left = leftSide;\n\t }\n\t if (rightPos.top - leftPos.top > 3) {\n\t // Different lines, draw top part\n\t add(left, leftPos.top, null, leftPos.bottom);\n\t left = leftSide;\n\t if (leftPos.bottom < rightPos.top) {\n\t add(left, leftPos.bottom, null, rightPos.top);\n\t }\n\t }\n\t if (toArg == null && to == lineLen) {\n\t right = rightSide;\n\t }\n\t if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) {\n\t start = leftPos;\n\t }\n\t if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) {\n\t end = rightPos;\n\t }\n\t if (left < leftSide + 1) {\n\t left = leftSide;\n\t }\n\t add(left, rightPos.top, right - left, rightPos.bottom);\n\t });\n\t return { start: start, end: end };\n\t }\n\n\t var sFrom = range.from(),\n\t sTo = range.to();\n\t if (sFrom.line == sTo.line) {\n\t drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n\t } else {\n\t var fromLine = getLine(doc, sFrom.line),\n\t toLine = getLine(doc, sTo.line);\n\t var singleVLine = visualLine(fromLine) == visualLine(toLine);\n\t var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n\t var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n\t if (singleVLine) {\n\t if (leftEnd.top < rightStart.top - 2) {\n\t add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n\t add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n\t } else {\n\t add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n\t }\n\t }\n\t if (leftEnd.bottom < rightStart.top) {\n\t add(leftSide, leftEnd.bottom, null, rightStart.top);\n\t }\n\t }\n\n\t output.appendChild(fragment);\n\t }", "title": "" }, { "docid": "1bde21b1f25bdae97711a65ebedee7e7", "score": "0.73894984", "text": "function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc\n var fragment = document.createDocumentFragment()\n var padding = paddingH(cm.display), leftSide = padding.left\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right\n var docLTR = doc.direction == \"ltr\"\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0 }\n top = Math.round(top)\n bottom = Math.round(bottom)\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")))\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line)\n var lineLen = lineObj.text.length\n var start, end\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos)\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\"\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1)\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction)\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\"\n var fromPos = coords(from, ltr ? \"left\" : \"right\")\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\")\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen\n var first = i == 0, last = !order || i == order.length - 1\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first\n var openRight = (docLTR ? openEnd : openStart) && last\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right\n add(left, fromPos.top, right - left, fromPos.bottom)\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\")\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\")\n botRight = docLTR && openEnd && last ? rightSide : toPos.right\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\")\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\")\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom)\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top) }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom)\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos }\n if (cmpCoords(toPos, start) < 0) { start = toPos }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos }\n if (cmpCoords(toPos, end) < 0) { end = toPos }\n })\n return {start: start, end: end}\n }\n\n var sFrom = range.from(), sTo = range.to()\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch)\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line)\n var singleVLine = visualLine(fromLine) == visualLine(toLine)\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom)\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom)\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom)\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top) }\n }\n\n output.appendChild(fragment)\n}", "title": "" }, { "docid": "4b04f5a1ed269724de75d6d9979927fe", "score": "0.67961836", "text": "highlightSelectedRange(editor) {\n const range = editor.getSelectedBufferRange();\n const marker = editor.markBufferRange(range, {invalidate: 'inside'});\n editor.decorateMarker(marker, {\n type: 'line',\n class: 'clang-expand-highlight'\n });\n\n return marker;\n }", "title": "" }, { "docid": "d5ef8d59b63655065c0d4dd0aaaafec5", "score": "0.6510404", "text": "function highlightSelected(){}", "title": "" }, { "docid": "c43b146fe78b34d7f4b8632f4fceed9a", "score": "0.6416275", "text": "function render_range(selection, i, max, opacity) {\n selection.slice(i, max).forEach(function(d) {\n path(d, foreground, color(d.State, opacity));\n });\n}", "title": "" }, { "docid": "99dfb276fc899acad5d2b7b85a2185e2", "score": "0.64063215", "text": "function render_range(selection, i, max, opacity) {\n\t\tselection.slice(i,max).forEach(function(d) {\n\t\tpath(d, foreground, color(d.group,opacity));\n\t\t});\n\t}", "title": "" }, { "docid": "9ebf2bcb5a0f1780cd29d00b7e42303d", "score": "0.63830876", "text": "function setSelection(rect)\r\n{\r\n oSelection.style.left = rect.x + \"px\";\r\n oSelection.style.top = rect.y + \"px\";\r\n oSelection.style.width = rect.w + \"px\";\r\n oSelection.style.height = rect.h + \"px\";\r\n}", "title": "" }, { "docid": "406a5053b87ffa457f79a0498101a731", "score": "0.6381338", "text": "function onRangeEvent(){\n changeRange(\"entrybox\"); \n paint();\n}", "title": "" }, { "docid": "61e4d04328cae3b824aced05b7780bbd", "score": "0.6369482", "text": "function updateRangeSelection() {\n\td3.selectAll('#details div.range').style('display', function() {\n\t\treturn (d3.select(this).classed(sn.runtime.basicChartInfo.parameters.aggregate.toLowerCase()) ? 'block' : 'none');\n\t});\n}", "title": "" }, { "docid": "b42448a04f7dc47e67d547947d195e16", "score": "0.63636637", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n var cursor = output.appendChild(elt(\"div\", \" \", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \" \", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "6e2e8648c41b7c8f6651d688eba00715", "score": "0.6349206", "text": "function updateSelectionRectangles() {}", "title": "" }, { "docid": "08c2ade4c93c773555c6d4d414d82895", "score": "0.6347227", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\");\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "1831574dd56e0f17bb036b206298175d", "score": "0.6333249", "text": "setSelectionRange(start, end) {\n if (!(start instanceof latte.DateTime))\n throw new latte.InvalidArgumentEx('start');\n if (!(end instanceof latte.DateTime))\n throw new latte.InvalidArgumentEx('end');\n // Swap check\n if (end.compareTo(start) < 0) {\n var tmp = start;\n start = end;\n end = tmp;\n }\n if (start.compareTo(this._viewStart) < 0)\n throw new latte.InvalidArgumentEx('start');\n if (end.compareTo(this._viewEnd.addHours(24)) > 0)\n throw new latte.InvalidArgumentEx('end');\n this.clearSelection();\n // Obtain selection rectangles\n var rects = this._rectanglesFor(start, end);\n // Add selection rectangles\n for (var i = 0; i < rects.length; i++) {\n var selection = $('<div>').addClass('selection');\n selection.rectangle(rects[i]);\n if (start.timeOfDay.totalMinutes == 0 && end.timeOfDay.totalMinutes == 0) {\n this._columnsGrid.prepend(selection);\n }\n else {\n this._timeSpans.append(selection);\n }\n }\n this._selectionStart = start;\n this._selectionEnd = end;\n }", "title": "" }, { "docid": "ec0b6166e5bd198e36c974465c3c163f", "score": "0.63191", "text": "_applySelection (): void {\n if (featureGetSelection && featureCreateRange) {\n let selection = this.editorState.selection\n\n if (!selection) {\n return\n }\n\n let range = document.createRange(),\n rangeStart: Position,\n rangeEnd: Position\n\n if (this._isRangeReversed(selection)) {\n rangeStart = selection.end\n rangeEnd = selection.start\n } else {\n rangeStart = selection.start\n rangeEnd = selection.end\n }\n\n let rangeStartRowElement = this._getRowElementByIndex(rangeStart.row),\n rangeEndRowElement = this._getRowElementByIndex(rangeEnd.row),\n side1, side2\n\n if (!rangeStartRowElement || !rangeEndRowElement) {\n return\n }\n\n // Set the range to the current cursor position to start with\n range.setStart(rangeStartRowElement, 0)\n range.collapse(true)\n\n function getRangeSide (node: Node, nodeStartColumn: number, sideColumn: number) {\n let side = null\n let nodeCharLength: number = 0\n // if (node instanceof Text) {\n if (node instanceof Text) {\n nodeCharLength = node.length\n }\n\n let nodeEndColumn = nodeStartColumn + nodeCharLength\n\n if (sideColumn >= nodeStartColumn && sideColumn <= nodeEndColumn) {\n // Found the text node where side column inside node\n side = {\n node,\n offset: sideColumn - nodeStartColumn\n }\n }\n // }\n\n return side\n }\n\n this._dfsTraverseNode((node: Node, row: number, column: number) => {\n if (node.childNodes.length === 0) {\n\n if (!side1 && row === rangeStart.row) {\n side1 = getRangeSide(node, column, rangeStart.column)\n if (side1) {\n range.setStart(side1.node, side1.offset)\n }\n }\n\n if (!side2 && row === rangeEnd.row) {\n side2 = getRangeSide(node, column, rangeEnd.column)\n if (side2) {\n range.setEnd(side2.node, side2.offset)\n }\n }\n\n if (side1 && side2) {\n return true\n }\n }\n })\n\n let sel = window.getSelection()\n sel.removeAllRanges()\n sel.addRange(range)\n }\n }", "title": "" }, { "docid": "fca59fb825c4fe7283aab59926f47e77", "score": "0.6311765", "text": "function selectRange( el, start, end ) {\n var sel = window.getSelection(),\n range = (window.getSelection().type!='None')? sel.getRangeAt(0) : document.createRange();\n\n if( start==\"start\" ) range.setStartBefore(el); \n else if( start) range.setStart(el, start);\n \n if( end==\"end\" ) range.setEndAfter(el)\n else if( end ) range.setEnd(el, end);\n\n sel.removeAllRanges();\n sel.addRange(range);\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.62986255", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.62986255", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.62986255", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.62986255", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.62986255", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.62986255", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.62986255", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "6632325fdcc16e7c467a86087326c4eb", "score": "0.6261713", "text": "_highlightRange(rect, options) {\n let div;\n let isPreview = options.isPreview;\n\n // take into account the scrolling position as mentioned in docs\n // https://developer.mozilla.org/en-US/docs/Web/API/element.getBoundingClientRect\n let styles = {\n display: 'block',\n position: 'absolute',\n backgroundColor: 'rgba(255, 255, 255, 0.7)',\n border: '2px solid rgb(102, 102, 102)',\n padding: '0',\n right: 'auto',\n direction: 'ltr',\n boxSizing: 'border-box',\n color: 'rgb(51, 51, 255)',\n fontFamily: 'Menlo, sans-serif',\n minHeight: '63px',\n zIndex: 10000,\n top: `${rect.top + window.scrollY}px`,\n left: `${rect.left + window.scrollX}px`,\n width: `${rect.width}px`,\n height: `${rect.height}px`\n };\n\n if (isPreview) {\n div = previewDiv;\n } else {\n this.hideLayer();\n div = layerDiv;\n this.hidePreview();\n }\n for (let prop in styles) {\n div.style[prop] = styles[prop];\n }\n let output = '';\n\n if (!isPreview) {\n output = '<span class=\\'close\\' data-label=\\'layer-close\\'>&times;</span>';\n }\n\n let template = options.template;\n\n if (template) {\n output += `<p class='template'><span>template</span>=<span data-label='layer-template'>${escapeHTML(template.name)}</span></p>`;\n }\n let view = options.view;\n let controller = options.controller;\n if (!view || !(view.object instanceof Component)) {\n if (controller) {\n output += `<p class='controller'><span>controller</span>=<span data-label='layer-controller'>${escapeHTML(controller.name)}</span></p>`;\n }\n if (view) {\n output += `<p class='view'><span>view</span>=<span data-label='layer-view'>${escapeHTML(view.name)}</span></p>`;\n }\n } else {\n output += `<p class='component'><span>component</span>=<span data-label='layer-component'>${classify(escapeHTML(view.name)).replace(/\\//g, '::')}</span></p>`;\n }\n\n let model = options.model;\n if (model) {\n output += `<p class='model'><span>model</span>=<span data-label='layer-model'>${escapeHTML(model.name)}</span></p>`;\n }\n div.innerHTML = output;\n\n for (let p of div.querySelectorAll('p')) {\n p.style.float = 'left';\n p.style.margin = 0;\n p.style.backgroundColor = 'rgba(255, 255, 255, 0.9)';\n p.style.padding = '5px';\n p.style.color = 'rgb(0, 0, 153)';\n }\n for (let p of div.querySelectorAll('p.model')) {\n p.style.clear = 'left';\n }\n for (let p of div.querySelectorAll('p span:first-child')) {\n p.style.color = 'rgb(153, 153, 0)';\n }\n for (let p of div.querySelectorAll('p span:last-child')) {\n p.style.color = 'rgb(153, 0, 153)';\n }\n\n if (!isPreview) {\n let cancelEvent = function(e) {\n e.preventDefault();\n e.stopPropagation();\n };\n for (let span of div.querySelectorAll('span.close')) {\n span.style.float = 'right';\n span.style.margin = '5px';\n span.style.background = '#666';\n span.style.color = '#eee';\n span.style.fontFamily = 'helvetica, sans-serif';\n span.style.fontSize = '14px';\n span.style.width = '16px';\n span.style.height = '16px';\n span.style.lineHeight = '14px';\n span.style.borderRadius = '16px';\n span.style.textAlign = 'center';\n span.style.cursor = 'pointer';\n span.style.opacity = '0.5';\n span.style.fontWeight = 'normal';\n span.style.textShadow = 'none';\n span.addEventListener('click', (e) => {\n cancelEvent(e);\n this.hideLayer();\n });\n span.addEventListener('mouseup', cancelEvent);\n span.addEventListener('mousedown', cancelEvent);\n }\n }\n\n this._addClickListeners(div, view, 'component');\n this._addClickListeners(div, controller, 'controller');\n this._addClickListeners(div, view, 'view');\n\n for (let span of div.querySelectorAll('p.template span:last-child')) {\n span.style.cursor = 'pointer';\n span.addEventListener('click', () => {\n if (view) {\n this.inspectViewElement(guidFor(view.object));\n } else if (options.element) {\n this.inspectElement(options.element);\n }\n });\n }\n\n\n if (model && model.object && ((model.object instanceof EmberObject) || typeOf(model.object) === 'array')) {\n this._addClickListeners(div, model, 'model');\n }\n }", "title": "" }, { "docid": "adce137c826ed4b8a2e399fa2de52a0f", "score": "0.6191788", "text": "function highlightMultiple(start, end, passage, id) {\n\n\n $(passage).find('#selection').contents().unwrap();\n if(start.is(end)) { // single element\n $(start).wrapAll(\"<span class='term rel\" + id + \"term' id='selection'/>\");\n } else { // if range of elements\n if($(passage).find('span').index(start) > $(passage).find('span').index(end)) { // swap if end is before start\n var temp = end;\n end = start;\n start = temp;\n }\n\n\n if(!start.parent().not($('#selection')).is(end.parent().not($('#selection')))) {\n // common parent element\n var common = end.parents().not($('#selection')).has(start).first();\n\n if(start.parent('.term').not(common).length) { // if word has a parent term\n start = $(common).children().has(start);\n // $(start).parent('.term');\n }\n\n if(end.parent('.term').not(common).length) {\n end = $(common).children().has(end);\n //end = $(end).parent('.term');\n }\n }\n // highlight range\n $(start).nextUntil(end.next()).andSelf().wrapAll(\"<span style='background-color: \"+backgroundcolor[id]+\"; border: 1px solid \"+bordercolor[id]+\";' class='term rel\" + id + \"term' id='selection' />\");\n\n }\n }", "title": "" }, { "docid": "c93be457c090e6e7450fc13a2901c075", "score": "0.6185037", "text": "function replaceRange(value, start, end) {\n\t\t\tvar anchor = context.anchor,\n\t\t\t\tpos = context.pos;\n\n\t\t\tcontext.anchor = start;\n\t\t\tcontext.pos = end;\n\t\t\tcontext.selection = value;\n\n\t\t\tcontext.anchor = anchor;\n\t\t\tcontext.pos = pos;\n\t\t}", "title": "" }, { "docid": "2e8d20955e9f33a46870b6bd148a1dd1", "score": "0.61629844", "text": "function selectionChange(e) {\n\t\t\t\t\tvar pointRng;\n\n\t\t\t\t\t// Check if the button is down or not\n\t\t\t\t\tif (e.button) {\n\t\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0)\n\t\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\n\t\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tendSelection();\n\t\t\t\t}", "title": "" }, { "docid": "56731f01df77911011639d3f81ffdb2e", "score": "0.612386", "text": "function drawSelection(selection) {\n selection.each(function(data) {\n var barSpacing = this.height / data.length;\n var barHeight = barSpacing - this.barPadding;\n var maxValue = d3.max(data);\n var widthScale = this.width / maxValue;\n\n d3.select(this).append('svg')\n .attr('height', this.height)\n .attr('width', this.width)\n .selectAll('rect')\n .data(data)\n .enter()\n .append('rect')\n .attr('y', function(d, i) {\n return i * barSpacing\n })\n .attr('height', barHeight)\n .attr('x', 0)\n .attr('width', function(d) {\n return d * widthScale\n })\n .style('fill', this.fillColor);\n });\n }", "title": "" }, { "docid": "14eb5e9e3938662c8839b3e6e73068b1", "score": "0.61051697", "text": "function handleSelection(startX,startY,endX,endY)\r\n {\r\n\tvar minX = Math.min(startX,endX);\r\n\tvar maxX = Math.max(startX,endX);\r\n\t\r\n\tvar minY = Math.min(startY,endY);\r\n\tvar maxY = Math.max(startY,endY);\r\n\t\r\n\tvar centerX = canvas.width/2;\r\n\tvar centerY = canvas.height/2;\r\n\t//var distanceFromCenter = Math.sqrt(Math.pow(,2) + Math.pow(,2));\r\n\tvar selectedRegion = new Object();\r\n\tselectedRegion.x = minX;\r\n\tselectedRegion.y = minY;\r\n\tselectedRegion.width = maxX-minX;\r\n\tselectedRegion.height = maxY-minY;\r\n\t\r\n\tregionToOctTreeNodes(selectedRegion,0); // x,y,width,height\r\n\t\r\n\thighlightSelectedNodes();\r\n }", "title": "" }, { "docid": "fcffa7b6eb508371c48354344bc58e16", "score": "0.61040545", "text": "_createSelectionFromRange(range) {\n if (!range) return Selection.nullSelection\n let inOneNode = isEqual(range.start.path, range.end.path)\n if (inOneNode) {\n if (range.start.isNodeCoordinate()) {\n // ATTENTION: we only create full NodeSelections\n // when mapping from the DOM to Model return new NodeSelection(range.containerId, range.start.getNodeId(), mode, range.reverse, range.surfaceId)\n return new NodeSelection(range.containerId, range.start.getNodeId(), 'full', range.reverse, range.surfaceId)\n } else {\n return this.createSelection({\n type: 'property',\n path: range.start.path,\n startOffset: range.start.offset,\n endOffset: range.end.offset,\n reverse: range.reverse,\n containerId: range.containerId,\n surfaceId: range.surfaceId\n })\n }\n } else {\n return this.createSelection({\n type: 'container',\n startPath: range.start.path,\n startOffset: range.start.offset,\n endPath: range.end.path,\n endOffset: range.end.offset,\n reverse: range.reverse,\n containerId: range.containerId,\n surfaceId: range.surfaceId\n })\n }\n }", "title": "" }, { "docid": "452faa0f770d5fed39f49b158839aab0", "score": "0.60883325", "text": "function render_range(selection, i, max, opacity) {\n selection.slice(i,max).forEach(function(d) {\n path(d, foreground, colorCanvas(selectedService==null?d.group:d[selectedService],opacity));\n // if (animationtime){\n // timel.stop();\n // animationtime = false;\n // return true\n // }\n });\n}", "title": "" }, { "docid": "f0a54c1db70971f99fc28b124a2ecc88", "score": "0.6083663", "text": "function selectionChange(e) {\r\n\t\t\t\tvar pointRng;\r\n\r\n\t\t\t\t// Check if the button is down or not\r\n\t\t\t\tif (e.button) {\r\n\t\t\t\t\t// Create range from mouse position\r\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\r\n\r\n\t\t\t\t\tif (pointRng) {\r\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\r\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0)\r\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\r\n\r\n\t\t\t\t\t\tpointRng.select();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else\r\n\t\t\t\t\tendSelection();\r\n\t\t\t}", "title": "" }, { "docid": "f0a54c1db70971f99fc28b124a2ecc88", "score": "0.6083663", "text": "function selectionChange(e) {\r\n\t\t\t\tvar pointRng;\r\n\r\n\t\t\t\t// Check if the button is down or not\r\n\t\t\t\tif (e.button) {\r\n\t\t\t\t\t// Create range from mouse position\r\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\r\n\r\n\t\t\t\t\tif (pointRng) {\r\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\r\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0)\r\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\r\n\r\n\t\t\t\t\t\tpointRng.select();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else\r\n\t\t\t\t\tendSelection();\r\n\t\t\t}", "title": "" }, { "docid": "8a6520aec5650cf03564469375346c04", "score": "0.60700464", "text": "function setSelectionRange( rangeStart, rangeEnd ){\n // Check which way we need to define the text range.\n if( this.createTextRange ){\n var range = this.createTextRange();\n range.collapse( true );\n range.moveStart( 'character', rangeStart );\n range.moveEnd( 'character', rangeEnd-rangeStart );\n range.select();\n }\n \n // Alternate setSelectionRange method for supporting browsers.\n else if( this.setSelectionRange ){\n this.focus();\n this.setSelectionRange( rangeStart, rangeEnd );\n }\n }", "title": "" }, { "docid": "c3224f65d0aa1facb0cf924485b74685", "score": "0.60387313", "text": "selectCallRange(editor, range) {\n editor.setSelectedBufferRange(range);\n return editor.getSelectedText();\n }", "title": "" }, { "docid": "e2913595abc784baddad7f720fc651d7", "score": "0.60273355", "text": "highlight() {\n this._box.highlight();\n }", "title": "" }, { "docid": "371db1892857d50db21407bc675f9f7e", "score": "0.6020468", "text": "function highlightSelection(e) \n{\n selection = window.getSelection();\n \n // Clear all highlights if requested\n if (clearBetweenSelections)\n {\n clearHighlightsOnPage();\n }\n \n //Skip this section if mouse event is undefined\n if (e != undefined)\n {\n \n //Ignore right clicks; avoids odd behavior with CTRL key\n if (e.button == 2)\n {\n return;\n }\n\n //Exit if CTRL key is held while auto highlight is checked on\n if(imedBool && e.ctrlKey)\n {\n return;\n }\n \n //Exit if CTRL key not held and auto highlight is checked off\n if(!imedBool && !e.ctrlKey)\n {\n return;\n }\n }\n \n if (selection.anchorNode.nodeType != 3) {\n return;\n }\n \n var selectedText = selection.toString().replace(/^\\s+|\\s+$/g, \"\");\n var testText = selectedText.toLowerCase();\n \n //Exit if selection is whitespace or what was previously selected\n if (selectedText == '' || lastText == testText)\n {\n return;\n }\n \n if (selection.anchorNode.nodeType == 3 && selection.toString() != '') { // text node\n var mySpan = document.createElement(\"span\");\n var prevSpan = document.getElementById(\"mySelectedSpan\");\n if (prevSpan != null) {\n prevSpan.removeAttribute(\"id\");\n }\n mySpan.id = \"mySelectedSpan\";\n var range = selection.getRangeAt(0).cloneRange();\n range.surroundContents(mySpan);\n }\n \n //Perform highlighting\n localSearchHighlight(selectedText, singleSearch);\n \n //Store processed selection for next time this method is called\n lastText = testText;\n}", "title": "" }, { "docid": "c21376b5ae12623ad5cef5590507bab9", "score": "0.6015863", "text": "function WalkontableCellRange(highlight, from, to) {\n this.highlight = highlight; //this property is used to draw bold border around a cell where selection was started and to edit the cell when you press Enter\n this.from = from; //this property is usually the same as highlight, but in Excel there is distinction - one can change highlight within a selection\n this.to = to;\n}", "title": "" }, { "docid": "6a72f68668089fa837dbc163a029f4cc", "score": "0.59932643", "text": "function selectionChange(e) {\n\t\t\t\tvar pointRng;\n\n\t\t\t\t// Check if the button is down or not\n\t\t\t\tif (e.button) {\n\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0) {\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tendSelection();\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "6a72f68668089fa837dbc163a029f4cc", "score": "0.59932643", "text": "function selectionChange(e) {\n\t\t\t\tvar pointRng;\n\n\t\t\t\t// Check if the button is down or not\n\t\t\t\tif (e.button) {\n\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0) {\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tendSelection();\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "6a72f68668089fa837dbc163a029f4cc", "score": "0.59932643", "text": "function selectionChange(e) {\n\t\t\t\tvar pointRng;\n\n\t\t\t\t// Check if the button is down or not\n\t\t\t\tif (e.button) {\n\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0) {\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tendSelection();\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "6a72f68668089fa837dbc163a029f4cc", "score": "0.59932643", "text": "function selectionChange(e) {\n\t\t\t\tvar pointRng;\n\n\t\t\t\t// Check if the button is down or not\n\t\t\t\tif (e.button) {\n\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0) {\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tendSelection();\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "6a72f68668089fa837dbc163a029f4cc", "score": "0.59932643", "text": "function selectionChange(e) {\n\t\t\t\tvar pointRng;\n\n\t\t\t\t// Check if the button is down or not\n\t\t\t\tif (e.button) {\n\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0) {\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tendSelection();\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "255ebc18ad28ccce40a3694de10eef4c", "score": "0.5986443", "text": "function TStylingRange() {}", "title": "" }, { "docid": "7f0d29f03d858a2793c9c468fe00142d", "score": "0.5986143", "text": "function highlight(event)\r\n\t\t{\r\n\t\t\tif(currentlySelectedButtonAction != 'highlight' || !down)\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tgraphics.clear();\r\n\r\n\t\t\twidth = mouseData.x - initialXMousePosition;\r\n\t\t\theight = mouseData.y - initialYMousePosition;\r\n\r\n\t\t\tgraphics.lineStyle(5, 0xFFFB33, 1);\r\n\t\t\tgraphics.drawRect(initialXMousePosition, initialYMousePosition, width, height);\r\n\t\t\tgraphics.interactive = true;\r\n\r\n // draws it on the main stage, doesnt matter because it gets erased anyways\r\n\t\t\tMBContainer.addChild(graphics);\r\n }", "title": "" }, { "docid": "7f41563a540f069e11311687f605926d", "score": "0.59650844", "text": "function applySelectionChanges() {\n setHeight();\n setWidth();\n setColor();\n setSelectionInfo(myDiagram.selection.first());\n}", "title": "" }, { "docid": "f441d67875e7619877c0f7994a33a6d0", "score": "0.5963732", "text": "function TStylingRange() { }", "title": "" }, { "docid": "0842e8ff0825550ba3bbeab4d826d3ea", "score": "0.59634364", "text": "function highlightMultiple(start, end, passage, id) {\n // ignore margins between elements\n\n $(passage).find('#selection').contents().unwrap();\n if(start.is(end)) { // single element\n $(start).wrapAll(\"<span class='term rel\" + id + \"term' id='selection'/>\");\n } else { // if range of elements\n if($(passage).find('span').index(start) > $(passage).find('span').index(end)) { // swap if end is before start\n var temp = end;\n end = start;\n start = temp;\n }\n \n \n if(!start.parent().not($('#selection')).is(end.parent().not($('#selection')))) {\n // common parent element\n var common = end.parents().not($('#selection')).has(start).first();\n \n if(start.parent('.term').not(common).length) { // if word has a parent term\n start = $(common).children().has(start);\n // $(start).parent('.term');\n }\n \n if(end.parent('.term').not(common).length) {\n end = $(common).children().has(end);\n //end = $(end).parent('.term');\n }\n }\n // highlight range\n $(start).nextUntil(end.next()).andSelf().wrapAll(\"<span class='term rel\" + id + \"term' id='selection' />\");\n }\n }", "title": "" }, { "docid": "d12fbc132be691966d4f3a490860ec45", "score": "0.5958349", "text": "function Selection(ranges,primIndex){this.ranges=ranges;this.primIndex=primIndex;}", "title": "" }, { "docid": "eeb159b2f0eb7ea01a9dfe413df80372", "score": "0.5929244", "text": "function setSelectionRange(rangeStart, rangeEnd) {\n // Check which way we need to define the text range.\n if (this.createTextRange) {\n var range = this.createTextRange();\n range.collapse(true);\n range.moveStart('character', rangeStart);\n range.moveEnd('character', rangeEnd - rangeStart);\n range.select();\n }\n\n // Alternate setSelectionRange method for supporting browsers.\n else if (this.setSelectionRange) {\n this.focus();\n this.setSelectionRange(rangeStart, rangeEnd);\n }\n }", "title": "" }, { "docid": "bdce7e7039eb51ab063bfa4ba5843a4d", "score": "0.5920599", "text": "function trackSelection(evt){\n if (evt && evt.which == 9){\n // do tabs my way, by restoring the selection\n // there's a flash of the browser's selection, but I don't see a way of avoiding that\n ret._nativeSelect(ret._nativeRange(el.bililiteRangeSelection));\n }else{\n el.bililiteRangeSelection = ret._nativeSelection();\n }\n }", "title": "" }, { "docid": "6331fc40d88d7febb52054b1b9013f5e", "score": "0.59121287", "text": "_updateSelection (): void {\n if (featureGetSelection && featureCreateRange) {\n let currentSelection = window.getSelection()\n\n if (!currentSelection.focusNode || !currentSelection.anchorNode) {\n return\n }\n\n let selectionStartPosition: ?Position = this._getSelectionStartNodePosition(),\n selectionEndPosition: ?Position = this._getSelectionEndNodePosition()\n\n if (selectionStartPosition && selectionEndPosition) {\n\n // let rangeStartColumn: number,\n // rangeEndColumn: number,\n // range = currentSelection.getRangeAt(0)\n\n // // Find the text content length for range start and end offset\n // let rangeStartOffset: number = this._getTextContentByOffset(range.startContainer, range.startOffset).length,\n // rangeEndOffset: number = this._getTextContentByOffset(range.endContainer, range.endOffset).length\n\n // if (this._isRangeReversed({\n // start: selectionStartPosition,\n // end: selectionEndPosition\n // })) {\n // rangeStartColumn = rangeEndOffset\n // rangeEndColumn = rangeStartOffset\n // } else {\n // rangeStartColumn = rangeStartOffset\n // rangeEndColumn = rangeEndOffset\n // }\n\n let startColumnOffset: number = this._getTextContentByOffset(currentSelection.anchorNode, currentSelection.anchorOffset).length,\n endColumnOffset: number = this._getTextContentByOffset(currentSelection.focusNode, currentSelection.focusOffset).length\n\n this.setSelection({\n start: {\n row: selectionStartPosition.row,\n column: selectionStartPosition.column + startColumnOffset\n },\n end: {\n row: selectionEndPosition.row,\n column: selectionEndPosition.column + endColumnOffset\n }\n })\n }\n }\n else {\n // TODO: add support for old IE\n }\n }", "title": "" }, { "docid": "dc2cc4d744e0d55ebd8e7f01b57cb3a8", "score": "0.59000087", "text": "function addHighlighting(position, color) {\n\ttoSel(position).style.background = color\n}", "title": "" }, { "docid": "985f8abf156a967c6c3ed963cd64cdd3", "score": "0.5889782", "text": "function changeRangeColor() {\n $('input[type=\"range\"]').mousemove(function() {\n var val = ($(this).val() - $(this).attr('min')) / ($(this).attr('max') - $(this).attr('min'));\n $(this).css('background-image',\n '-webkit-gradient(linear, left top, right top, '\n + 'color-stop(' + val + ', #62C462), '\n + 'color-stop(' + val + ', #DDE6D6)'\n + ')'\n );\n });\n}", "title": "" }, { "docid": "1b02c78371acc21ab4827c07a1215342", "score": "0.58781457", "text": "function highlight() {\n\n if (clickedElement) {\n context.fillStyle = 'blue';\n context.strokeRect(drawingCanvas.width + 100, drawingCanvas.height + 100, clickedElement.width, clickedElement.height);\n\n canvasRects.push(new CanvasRectangle(this.x, this.y, this.width, this.height, this.targetCanvas, 'blue', 'stroke'));\n this.highlightRect = canvasRects.length - 1;\n\n }\n\n}", "title": "" }, { "docid": "5e35fed92cd93b9025cf1366f116270f", "score": "0.5874861", "text": "highlight(){\n this.rect.setAttributeNS(null,\"stroke\", \"blue\");\n this.rect.setAttributeNS(null,\"stroke-width\", \"3\");\n }", "title": "" }, { "docid": "8008061757f5792cecc98d98ce883b5b", "score": "0.5847315", "text": "function highlight_code_range(code_section, fromLine, toLine, scroll){\n // Wrap each leftover piece of text in a span to handle highlighting a range of lines.\n code_section.find('code').contents().each(function(){\n if (!$(this).is('span')) {\n var newText = $(this).wrap('<span class=\"string\"></span>');\n $(this).replaceWith(newText);\n }\n });\n \n // Wrap code block lines in a div to highlight\n var highlightStart = code_section.find('.line-numbers').filter(function(){\n return parseInt(this.innerText.trim()) === fromLine; \n });\n var highlightEnd = code_section.find('.line-numbers').filter(function(){\n return parseInt(this.innerText.trim()) === toLine;\n });\n if(highlightEnd.length === 0){\n var lastLine = parseInt(code_section.find('.line-numbers').last().text().trim());\n // If the line number after the last line to highlight was a tag, then search for the next line number.\n while(highlightEnd.length === 0 && toLine < lastLine){\n toLine = toLine + 1;\n highlightEnd = code_section.find('.line-numbers').filter(function(){\n return parseInt(this.innerText.trim()) === toLine;\n });\n }\n }\n var range = highlightStart.nextUntil(highlightEnd);\n range.wrapAll('<div class=\"highlightSection\"></div>');\n\n if(scroll){\n var scrollTop = $('#code-column-content')[0].scrollTop;\n var position = range.position().top;\n var titleBarHeight = $('#code-column-title-container').outerHeight();\n $('#code-column-content').animate({scrollTop: scrollTop + position - titleBarHeight});\n } \n}", "title": "" }, { "docid": "3fa0cf32b8c23c8fc5093f3e886e8340", "score": "0.58011764", "text": "draw() {\n fill(this.highlighted ? 200 : 230);\n rect(this.x, this.y, this.width, this.height, this.height/9);\n // Draw the text\n textAlign(CENTER);\n textSize(this.height/1.6);\n text(this.text, this.x + this.width/2, this.y - this.height/6);\n\n fill(this.getColor());\n rect(this.x + 3, this.y + 3, this.width - 6, this.height - 6, this.height/9);\n }", "title": "" }, { "docid": "11ab591d25c848e688104d677491aa9d", "score": "0.5780127", "text": "function selectedRectangle(yValue) {\n noFill();\n strokeWeight(1);\n stroke(selectedBorder);\n rect(titleXTopLeft, yValue, rectSize, rectSize);\n}", "title": "" }, { "docid": "a7584258f86c4c0740a72abf41bce28c", "score": "0.57762843", "text": "function highlightSelection(){\n var $this = $(this);\n\n $this.select();\n}", "title": "" }, { "docid": "9033de52b7d52552e440ae2fa2424f6d", "score": "0.5755599", "text": "function displaySelected(svgRectangle, intensityLevel) {\n\t// FIXME: Really nasty hack; need a better way to do this:\n\tvar colour1 = \"#47EDFF\";\n\tvar colour2 = \"#36B8C7\";\n\tvar colour3 = \"#247B85\";\n\tvar selectedColour = colour1;\n\tif (intensityLevel == 2) {\n\t\tselectedColour = colour2;\n\t} else if (intensityLevel == 3) {\n\t\tselectedColour = colour3;\n\t} else if (intensityLevel > 3) {\n\t\tselectedColour = \"black\";\n\t}\n\tsvgRectangle.attr(\"stroke\", selectedColour).attr(\"fill\", selectedColour);\n}", "title": "" } ]
0b366ba2de85a0c26cff3607c3b93287
getFullName is a method
[ { "docid": "23604f6c71ec9e71099b2e6a4aded1fd", "score": "0.6888098", "text": "getFullName(){\n let fullname = `${this.firstname} ${this.lastname} is my fullname.`\n return fullname;\n }", "title": "" } ]
[ { "docid": "1dcf5e9b7cb64c2f9d3b69a91ce0a962", "score": "0.77962404", "text": "getFullName() {\n\t\treturn this.firstname + \" \" + this.lastname;\n\t}", "title": "" }, { "docid": "14d426622fd82b24cd99fd0660c37b2a", "score": "0.76517034", "text": "function getFullName() {\n return firstName + \" \" + lastName;\n }", "title": "" }, { "docid": "e9f060ba499ea8b9e4e07ec38be5d0b2", "score": "0.76512986", "text": "getFullName() {\n\t\treturn this.firstName + \" \" + this.lastName;\n\t}", "title": "" }, { "docid": "6232ac84da78cbd660da7269f28faa42", "score": "0.75298923", "text": "function getFullName(){\n return firstName + \" \" + secondName;\n}", "title": "" }, { "docid": "0fed4ebcf054505f19c8b6e32f37c110", "score": "0.7440297", "text": "getFullName(){\n return `${this.firstName} ${this.middleName} ${this.lastName}`;\n }", "title": "" }, { "docid": "7b1023e5254dab65ca9aae216ba36ac7", "score": "0.72652", "text": "get FullName() {\n return this.firstName + ' ' + this.lastName;\n }", "title": "" }, { "docid": "5c250525327e8bbc4791d4deadbe8233", "score": "0.7263662", "text": "fullname(){\n return this.first_name + ' ' + this.last_name;\n }", "title": "" }, { "docid": "c1c902a906c702f5880f0553c0fafaa4", "score": "0.7214018", "text": "get fullname () {\n return this._fullname\n }", "title": "" }, { "docid": "aaa43c096aca2eb2f29bfebbec93a125", "score": "0.72077006", "text": "getFullName() {\n return `${this.firstName} ${this.secondName} ${this.firstSurname} ${this.secondSurname}`;\n }", "title": "" }, { "docid": "eddfa25dc7862aa01db048d3b8e6f9ca", "score": "0.7205685", "text": "get fullName() {\n return this.namespace.fullName + \".\" + this.name;\n }", "title": "" }, { "docid": "58dcb6e9832c7a94e1cc75eca0ff91c9", "score": "0.71931493", "text": "function makeFullName () { \nreturn nameIntro + firstName + \" \" + lastName; \n}", "title": "" }, { "docid": "bd1986a4e1c9022b1d5aa84453548079", "score": "0.71861994", "text": "getFullName() {\n const fullName = `${this.firstName} ${this.lastName}`;\n return fullName;\n }", "title": "" }, { "docid": "a66875d8da7e070f95f28c5391bc2e92", "score": "0.7185253", "text": "function getFullName() {\n return `${firstName} ${lastName}`;\n }", "title": "" }, { "docid": "fe0ac111bb15882003df7cfc47abbda7", "score": "0.712262", "text": "function makeFullName(){\n return nameIntro + firstName + ' ' + lastName;\n }", "title": "" }, { "docid": "a3de4fc190b37c995c461236967fc645", "score": "0.7120312", "text": "getFullName() {\n let name = this.getName();\n if (this.parent) {\n const parent = this.parent.getFullName();\n if (parent !== null) {\n name = parent + '.' + name;\n }\n }\n return name;\n }", "title": "" }, { "docid": "baa0d7e7dd86b4167cffba443807ba0b", "score": "0.7111044", "text": "fullName()\n {\n return this.firstName+this.lastName\n }", "title": "" }, { "docid": "e7bacc19839b47adc05c50d64d09c72c", "score": "0.7077222", "text": "fullname() {\n console.log(\"Running again...\");\n if (this.name === \"\" || this.lastName === \"\") {\n return \"\";\n }\n return this.name + \" \" + this.lastName;\n }", "title": "" }, { "docid": "a0a5a75f00b49b8d1d0742aa1f3b1295", "score": "0.70425457", "text": "fullName() {\n return `${this.first_name} ${this.last_name}`;\n }", "title": "" }, { "docid": "45632e9311441d41ce7ce654b0a62b18", "score": "0.70387393", "text": "function getFullName() {\n // console.log(this.alert, 'this'); //\n // console.log(window.foo, 'window.foo');\n // console.log(this, 'this.foo');\n console.log(this, 'this');\n console.log(this.name, 'name');\n console.log(this.lastName, 'lastName');\n this.foo = 'lololo';\n}", "title": "" }, { "docid": "0ff61f8450930c9fb5c0d5263db2b2ca", "score": "0.7037107", "text": "function makeFullName () {\n return nameIntro + firstName + \" \" + lastName;\n }", "title": "" }, { "docid": "2c0fe72af4bab94f03871dc5256a4620", "score": "0.70268077", "text": "fullname() {\n return `${this.first_name} ${this.last_name}`;\n }", "title": "" }, { "docid": "b15360be26862183b9cfd97e956ea9f7", "score": "0.70197284", "text": "get fullName(){\n let preppedName = this.name.slice(0,1).toUpperCase() + this.name.slice(1);\n let preppedSurname = this.surname.slice(0,1).toUpperCase() + this.surname.slice(1);\n return `${preppedName} ${preppedSurname}`;\n }", "title": "" }, { "docid": "9d778f03ad76d7b43dfd62fe7b818e50", "score": "0.70189553", "text": "get fullName() {\n let parentName = this.parent && this.parent.fullName;\n if (parentName) {\n return parentName + '.' + this.name;\n }\n else {\n return this.name;\n }\n }", "title": "" }, { "docid": "be3c899101aeb57b97529b74b0b43996", "score": "0.6940543", "text": "fullName()\n {\n return this.name + \" \" + this.fatherName;\n }", "title": "" }, { "docid": "0bfc01dd5e4f0ab4cb023c40f47088d4", "score": "0.6932968", "text": "fullName() {\n if (this.middleName) {\n return `${this.firstName} ${this.middleName} ${this.lastName}`;\n }\n return `${this.firstName} ${this.lastName}`;\n }", "title": "" }, { "docid": "2f69d984d76d78ccf1b5c26944a6938c", "score": "0.69291836", "text": "fullName() {\n return this.firstName + \" \" + this.lastName;\n }", "title": "" }, { "docid": "968001101ff03ebb8dd85bd299af084b", "score": "0.69279027", "text": "function getFullName(fistName, lastName){\n // const fullName = fistName + \" \" + lastName;\n let fullName = '';\n for( const part of arguments ){\n fullName += part + \" \";\n }\n return fullName;\n}", "title": "" }, { "docid": "50454917423def02b7fe6e81f3fee388", "score": "0.687935", "text": "fullName() {\n return `${this.firstName} ${this.lastName}`\n }", "title": "" }, { "docid": "014bf266f36e3a5339b10ce35ad2fba3", "score": "0.6871121", "text": "function getFullName (name, surname) {\n return 'Your full name is ' + name + surname\n}", "title": "" }, { "docid": "5f9704885223e7afb876d155d77575a9", "score": "0.6858372", "text": "getFullName(){\n let fullname = `${this.firstname} ${this.lastname} is my fullname. And I teach ${this.subject}`\n return fullname;\n }", "title": "" }, { "docid": "38de22025a961a23e434d159b994e2db", "score": "0.684325", "text": "static getFullName(person) {\n\t\treturn `Hello ${person._firstName} ${person._lastName}`;\n\t}", "title": "" }, { "docid": "18937ebbc976bb0608cba4e013c5354a", "score": "0.68307424", "text": "function makeFullName() {\n return greeting + firstName + \" \" + lastName;\n }", "title": "" }, { "docid": "9fdd4ad72e6aa983dc08cff36b6d7065", "score": "0.68286043", "text": "outputFullname() {\n console.log('Running method');\n if (this.name === '') {\n return '';\n }\n return this.name + ' ' + 'Schwarzmüller';\n }", "title": "" }, { "docid": "7c8d2234b556f5106c406a5836fddf48", "score": "0.67559695", "text": "get fullName() {\n // this is just 'function fullName() {}' with 'function' dropped\n return `${person.firstName} ${person.lastName}`;\n }", "title": "" }, { "docid": "a8dacdb53e15dec5e7d89b5299545962", "score": "0.67514384", "text": "function getFullName(fname, lname) {\n return `${fname} ${lname}!!`;\n}", "title": "" }, { "docid": "6f81e75070a38058e202bd22bce3b0ee", "score": "0.67379767", "text": "get fullName () {\n return this.firstName + ' ' + this.lastName\n }", "title": "" }, { "docid": "e4027a78e17cf03503d43c379ec280e7", "score": "0.66909045", "text": "function makeFullName() {\n return `${nameIntro}${firstName} ${lastName}`;\n }", "title": "" }, { "docid": "90524091086c6cf724ef052695b6a54e", "score": "0.66795", "text": "getUserFullName (user) {\n return concat(user.firstname, user.lastname)\n }", "title": "" }, { "docid": "195cd5789448f97a9c8518d30ac7be00", "score": "0.6670098", "text": "set name(newFullName) {\n this.fullName = newFullName;\n }", "title": "" }, { "docid": "7edef0b051d33b30a174fe915518e34c", "score": "0.6629531", "text": "function memberFullName(member){\n var name = member.first_name;\n name += (member.middle_name?' '+member.middle_name:'');\n name += ' ' + member.last_name;\n return(name);\n}", "title": "" }, { "docid": "5075632332a437240e3af31373a30c63", "score": "0.66226774", "text": "function getFullName(first,last) {\n // console.log(arguments);\n let fullName='';\n for(const name of arguments){\n fullName=fullName+' '+name;\n }\n return fullName;\n}", "title": "" }, { "docid": "2ccdbeb18def4507ee5e19c0bb15597f", "score": "0.6616327", "text": "function fullName() {\n let firstName = 'Atik '\n let lastName = 'Rahman'\n let name = firstName + lastName\n return name\n}", "title": "" }, { "docid": "a7dcfcba60284b455268cf0f16471064", "score": "0.6601182", "text": "function getFullName(firstName, middleName, lastName) {\n if (middleName) {\n return firstName + \" \" + middleName + \" \" + lastName;\n } else {\n return firstName + \" \" + lastName;\n }\n}", "title": "" }, { "docid": "f25c92e1db42675138adea73bd4ace84", "score": "0.6579212", "text": "fullname() {\n return `Hello ${this.firstName} ${this.lastName}`\n }", "title": "" }, { "docid": "4d115a80307ed13461553ee0cd2dc8f9", "score": "0.65674245", "text": "function fullName(first, last){\n let wholeName = first + \" \" + last;\n return wholeName; // Or return first + \" \" + last;\n}", "title": "" }, { "docid": "7bceacd4c37a92c5b3ceeb95f8c59bfe", "score": "0.6552024", "text": "function getFullName(firstName, lastName) {\n return result = `${firstName} ${lastName}`;\n}", "title": "" }, { "docid": "072ca5c305629a2088bbf5263c807c38", "score": "0.65351516", "text": "function getFullName(firstName, lastName) {\n\n let fullName = '';\n for (const name of arguments) {\n fullName += name + ' '; // too much string addition lower the performance\n }\n return fullName;\n}", "title": "" }, { "docid": "71dd5a8da91ec16122cce90ca4ca7824", "score": "0.65117615", "text": "printCompleteName() {\n return `${this.firstName} ${this.lastName}`;\n }", "title": "" }, { "docid": "bab6b7de6436adfe185e564d5769650e", "score": "0.6505172", "text": "function fullName(name) {\n this.name = name;\n}", "title": "" }, { "docid": "3657abae3a27880ac966f400321bda0d", "score": "0.6500235", "text": "function getOwnerFullName(house) {\nreturn house.currentOwner.firstName + ' ' + house.currentOwner.lastName;\n}", "title": "" }, { "docid": "52a99567a59cbb718a0657bdc0c51a26", "score": "0.64970165", "text": "function fullName(firstName, lastName, middleName) {\n console.log(middleName);\n return firstName + lastName;\n}", "title": "" }, { "docid": "71a6ebe0c822fdeb4091cb29ce240c87", "score": "0.6493299", "text": "getNameWithStudentid() {\n return super.getFullName() + \"(\" +\n this.studentid +\")\";\n }", "title": "" }, { "docid": "7479d996bcac37e099e172e4f465c6f5", "score": "0.64778984", "text": "function getFirstName(fullName){ // getFirstName is a CallBack Function...\n fullName =fullName.split(\" \");\n return fullName[0];\n\n}", "title": "" }, { "docid": "4abc759a775868b15b5df6a9d7affd88", "score": "0.64761007", "text": "printBio(){\n const fullName =this.fullName();\n console.log(`${fullName} is a Detective`)\n }", "title": "" }, { "docid": "3f6be594dbfd24e87821472be5b2b019", "score": "0.6475613", "text": "function fullName(firstName, lastName) {\n return firstName + lastName;\n }", "title": "" }, { "docid": "9a580f94f5ec93b12448a23840c5f10c", "score": "0.6455691", "text": "function fullName(firstName, lastName) {\n return firstName + lastName;\n}", "title": "" }, { "docid": "28e6ad401b69429c11b6415863cfdb96", "score": "0.64491314", "text": "fullName() {\n console.log(`${this.firstName} ${this.lastName} FROM PROTOTYPE`);\n }", "title": "" }, { "docid": "047cc04ce903532cb653253d1a1d7607", "score": "0.64485353", "text": "function fullName (firstName, lastName) {\n return firstName + \" \" + lastName;\n}", "title": "" }, { "docid": "2b5b4520b5b09bfb922cf5e9b3e1476a", "score": "0.64083046", "text": "function showName(firstName, lastName){\n var nameIntro = \"Your name is \";\n\n function makeFullName(){\n return nameIntro + firstName + \" \" + lastName;\n }\n return makeFullName();\n}", "title": "" }, { "docid": "88a0d06ee16d6f2af5c08fffb77f6893", "score": "0.6406383", "text": "getName() {}", "title": "" }, { "docid": "b86dbdff4942edc4e186074313aa91e6", "score": "0.6400871", "text": "get fullName() {\n return this.firstName + ' ' + this.lastName\n }", "title": "" }, { "docid": "61887c94ebda71b6c276876d3da400b9", "score": "0.63866574", "text": "function fullName(firstName, lastName){\n return firstName + '' + lastName;\n}", "title": "" }, { "docid": "9b820bca8d8de1159489a426850cde56", "score": "0.63792837", "text": "function getFullName (person){\n let name = person.firstName + ' ' + person.sureName;\n if (useFormalName === true){ \n return 'Lord ' + name;\n }\n else {\n return name;\n }\n }", "title": "" }, { "docid": "e55293900f61cd1acb060aaa273a9c5c", "score": "0.6373492", "text": "function fullname(person) {\n return person.firstname + \" \" + person.lastname;\n}", "title": "" }, { "docid": "e95065e592a589ca2504c7b0b162814c", "score": "0.6361716", "text": "function fullName(firstName, lastName) {\n\n return firstName + ' ' + lastName;\n}", "title": "" }, { "docid": "cbd60bd1a14f1057b8ef4a5541f7f5f0", "score": "0.63399243", "text": "function showName(firstName,lastName){\n var nameIntro=\"your name is \";\n \n function makeFullName(){\n return nameIntro+ firstName + \" \" + lastName;\n }\n return makeFullName();\n console.log(showName(\"Shiva\", \"sharma\"))\n}", "title": "" }, { "docid": "9974aba0fc61875a01d783cdcb7f2d12", "score": "0.63269985", "text": "function myName() {\n return myName.rhiannon ;\n}", "title": "" }, { "docid": "60bb2429d99c44ab748c41327574f541", "score": "0.63065875", "text": "function fullNameAsPera(firstName, lastName) {\n let fullName = firstName + ' ' + lastName\n return fullName\n}", "title": "" }, { "docid": "8a9db6563d8d5ede8dbb177d52b13099", "score": "0.63046163", "text": "getShortname() {\n const fullname = this.getFullname();\n\n if(!fullname) {\n return '';\n }\n\n const nameParts = fullname.split(' ');\n const surname = nameParts[0];\n const name = nameParts[1] || null;\n const patronymic = nameParts[2] || null;\n\n let shortName = surname + ' ';\n\n if(name && name.slice) {\n shortName += name.slice(0, 1) + '.';\n }\n\n if(patronymic && patronymic.slice) {\n shortName += patronymic.slice(0, 1) + '.';\n }\n\n return shortName;\n }", "title": "" }, { "docid": "e8e9c51f9a208d1e5b5890a7592b4c9a", "score": "0.63009346", "text": "function fullName(first, last) {\n return first + last;\n}", "title": "" }, { "docid": "3db0bc56dedbeca915988ad57c204f17", "score": "0.6289901", "text": "function fullName(first, last) {\n\treturn first + ' ' + last;\n}", "title": "" }, { "docid": "8b31f09237407700c5f450963bdc8bd1", "score": "0.62789786", "text": "function fullName(firstName, lastName) {\n var firstName = \"Janet\";\n var lastName = \"Blohn\";\n return firstName + \" \" + lastName;\n }", "title": "" }, { "docid": "98b27370137b4786d6ab67c07b4bd5f9", "score": "0.62666714", "text": "get name() {\r\n return this._firstName + \" \" + this._lastname;\r\n }", "title": "" }, { "docid": "bb5b4898c2142d8378e1912a565d7f6d", "score": "0.6254225", "text": "function createFullName(firstName, lastName){\n console.log(firstName + ' ' + lastName);\n}", "title": "" }, { "docid": "189657bf4dc0c843b54c2fcc74fb1f87", "score": "0.6245748", "text": "function fullName(firstName,lastName){\n\n return(\"Your name is: \" +firstName+ \" \" +lastName+ \", have a good day!\");\n }", "title": "" }, { "docid": "d698ac1425d1175704e2502bf7311661", "score": "0.62228334", "text": "getName(){return \"\";}", "title": "" }, { "docid": "b0a2b43c6e9a5f81769f8ede854df365", "score": "0.62209195", "text": "displayName(){\n return `${this.first_name} / ${this.username}`\n }", "title": "" }, { "docid": "dcce85b3816f49aec8c7611d0a56762c", "score": "0.6216053", "text": "function getName(){\n return \"Nathalia\" ;\n}", "title": "" }, { "docid": "6cfbd94d1665839bbfb3a5857e9a6153", "score": "0.6211147", "text": "function fullName(person) {\n console.log(person.firstName + \" \" + person.lastName);\n}", "title": "" }, { "docid": "6cfbd94d1665839bbfb3a5857e9a6153", "score": "0.6211147", "text": "function fullName(person) {\n console.log(person.firstName + \" \" + person.lastName);\n}", "title": "" }, { "docid": "6cfbd94d1665839bbfb3a5857e9a6153", "score": "0.6211147", "text": "function fullName(person) {\n console.log(person.firstName + \" \" + person.lastName);\n}", "title": "" }, { "docid": "6cfbd94d1665839bbfb3a5857e9a6153", "score": "0.6211147", "text": "function fullName(person) {\n console.log(person.firstName + \" \" + person.lastName);\n}", "title": "" }, { "docid": "6cfbd94d1665839bbfb3a5857e9a6153", "score": "0.6211147", "text": "function fullName(person) {\n console.log(person.firstName + \" \" + person.lastName);\n}", "title": "" }, { "docid": "c51df0c8770467b135d30eb35d5d2962", "score": "0.6205373", "text": "function showName(firstName, lastName) {\n var nameIntro = \"Your Name is: \";\n\n function makeFullName() {\n return nameIntro + firstName + ' ' + lastName;\n }\n return makeFullName();\n}", "title": "" }, { "docid": "5a37bafb4723d4316185ccc11e2227b9", "score": "0.61897635", "text": "function getFirstName(fullName){\n return fullName.split(\" \")[0]\n}", "title": "" }, { "docid": "cd5ca9447f01de103c49bb1a55164979", "score": "0.61839557", "text": "function showName(firstName, lastName){\n\tvar nameIntro = \"Your name is\";\n\n\tfunction makeFullName(){ //This is an enclosure\n\t\treturn nameIntro + firstName + \"\" + lastName;\n\t}\n\n\treturn makeFullName();\n}", "title": "" }, { "docid": "1c5234434a58a3e37a7ffa42985ef5f3", "score": "0.61696064", "text": "function returnName() {\n return myName;\n}", "title": "" }, { "docid": "079d88a8af45a55de2b4142b5086d7d9", "score": "0.61544967", "text": "function fullName(first, last) {\n console.log(arguments[2])\n console.log(first)\n}", "title": "" }, { "docid": "934602617063a425bcef6caf151b357b", "score": "0.6151976", "text": "function myName () {\n return myName.sarah;\n}", "title": "" }, { "docid": "ef62e4bbd548eea71be45980c598f75b", "score": "0.61421156", "text": "get forename() {\n return data.forename;\n }", "title": "" }, { "docid": "6b6539ae21dcb85c3eccdacc2ac85baf", "score": "0.61325634", "text": "get basename() {\n return typeof this.path === 'string' ? path.basename(this.path) : undefined\n }", "title": "" }, { "docid": "e95a4eeb507901e0c760454998ea0022", "score": "0.6130846", "text": "function Person(first,last) {\n this.firstName = first;\n this.lastName = last;\n this.getFullName = function(){\n return this.firstName + \" \" + this.lastName;\n }\n}", "title": "" }, { "docid": "8db6decedcd5b27bf28688f55da09b81", "score": "0.61275905", "text": "function fullName (firstName, lastName) {\n return `${firstName} ${lastName}`;\n}", "title": "" }, { "docid": "3f516553961fa1fc635597f168dd048c", "score": "0.61235213", "text": "function lastNameCall(theLastName){\n\treturn someIntro + firstName + \" \" + theLastName;\n}", "title": "" }, { "docid": "61005cb11466e37495deff2eb426e787", "score": "0.6108043", "text": "function myName() {\n return myName.dan\n}", "title": "" }, { "docid": "b4e3dc96eb8a78462805a9f6aa770fa8", "score": "0.60995334", "text": "function myName(firstName, middleName, lastName) {\n return middleName;\n}", "title": "" }, { "docid": "f492788571f0fedb0e5a7f03fc5044b1", "score": "0.6097865", "text": "function myName(){\n return myName.rochelle;\n}", "title": "" }, { "docid": "ea343de3236fa016b690324c0e0346ac", "score": "0.6097215", "text": "function fullName(obj) {\r\n // Code Starts Here\r\n obj.fullName = obj.firstName + ' ' + obj.lastName;\r\n return obj.fullName;\r\n}", "title": "" }, { "docid": "fbbbd86b4a82f1a095f1060cccdcf4d3", "score": "0.6090272", "text": "fn () {\n return '/repo/' + this.full_name;\n }", "title": "" }, { "docid": "ad13b6d690b9094cd7d0a541b367db54", "score": "0.6086152", "text": "function fullName(first, last = 'Khan') {\n const name = first + ' ' + last;\n return name;\n}", "title": "" } ]
2b31758bb3daa90e461323a704bd0fc9
/ /empieza la funcion
[ { "docid": "cb73646c8baed22f61c9b89447e91061", "score": "0.0", "text": "function duplicados(x){\n var aux = \"vacio\";\n var arrayAux=[];\n var esDup = 0;\n var auxDup = 0;\n // primer recorrido al array \n for(var i = 0; i<=x.length;i++){\n //condicional para arrancar/sobreescribir el aux, y resetear el booleano esDup\n if(aux == \"vacio\" || aux != x[i]){\n aux = x[i];\n esDup = 0;\n console.log(aux);\n }\n //recorido para comparar el aux y en caso de que así sea esDup pasar a true\n for(var e = 0;e <= x.length;e++){\n //condicional para no chocar en posiciones entre 'i' y 'e'\n if(e!=i){\n if(aux==x[e]){\n esDup = 1;\n }\n }\n }\n\n //condicional para saber sí esDup cambio de valor al finalizar la comparacion\n if(esDup==1){\n console.log(\"hay duplicado: \" + aux);\n if(arrayAux.length==0){\n console.log(\"se le agrega primer dato al array\");\n arrayAux.push(aux);\n console.log(\"primer numero duplicado: \" + aux);\n esDup=0;\n }else{\n //recorido de validacion de los valores en array aux\n for(var u = 0; u <= arrayAux.length;u++){\n //condicional para ver si el dato encontrado ya se encuentra en el array aux\n if(aux == arrayAux[u]){\n auxDup = 1;\n }\n //condicinal al final del for para ver que hacer el dato que tiene aux\n if(u==arrayAux.length-1){\n if(auxDup==1){\n esDup=0;\n auxDup=0;\n }else{\n arrayAux.push(aux);\n \n }\n }\n }\n } \n }\n }\n \n console.log(\"los numeros duplicados son: \" + arrayAux);\n console.log(\"los mismos se repiten en las siguientes posiciones...\");\n \n //for anidado para mostrar la ubicacion y que datos se repiten\n \n for(var o = 0; o <= arrayAux.length-1;o++){\n var auxO = arrayAux[o];\n \n for(var a = 0; a <= x.length; a++){\n if(auxO == x[a]){\n console.log(\"El numero: \" + auxO + \" existe en los espacios: \" + a)\n } \n }\n }\n}", "title": "" } ]
[ { "docid": "9f1610cc8eb4774b5bc463f206305d7c", "score": "0.7699871", "text": "function berechneSchaltjahr() {\n \n}", "title": "" }, { "docid": "13df25260e4440a35d55566645faf853", "score": "0.740919", "text": "function mifuncion(){}", "title": "" }, { "docid": "07baaa7b10a2faddf5ad2c1b651b13e9", "score": "0.7198443", "text": "function miFuncion(){}", "title": "" }, { "docid": "07baaa7b10a2faddf5ad2c1b651b13e9", "score": "0.7198443", "text": "function miFuncion(){}", "title": "" }, { "docid": "1384fb6d4c258063018a5a8341df7e30", "score": "0.7125919", "text": "function miFuncionBacan(){\n //esto es lo que hace la funcion, se le llama cuerpo\n \n}", "title": "" }, { "docid": "31a11436df6e0f60c6211cdb6944581d", "score": "0.6865953", "text": "function fehlersuche2() {\n \n}", "title": "" }, { "docid": "df9393c6a6fdd0ac474c681b7eed250d", "score": "0.6768519", "text": "function ha(){}", "title": "" }, { "docid": "e0fd00b41a7a562166d16840c25ccb4d", "score": "0.66763455", "text": "function fehlersuche1() {\n \n}", "title": "" }, { "docid": "6a75c71fbf1d08f06fe7b3712ce29ff8", "score": "0.6538662", "text": "function nombrefuncionpordefinicion()\n{\n //cuerpo de la funciones\n}", "title": "" }, { "docid": "6b27bef00d7aa9a6d94452e8383d1e86", "score": "0.65292394", "text": "function fm(){}", "title": "" }, { "docid": "859e3c9c9722cfe128a9215cca70b299", "score": "0.6443363", "text": "function oc(){}", "title": "" }, { "docid": "86c16c8cfc3a00938e44e2e0086ca3cc", "score": "0.64043653", "text": "unaFuncion()\n {\n console.log('Soy una función')\n }", "title": "" }, { "docid": "b58939bef8483458b69110907e830f52", "score": "0.63906556", "text": "function miFuncion(){\n\n}", "title": "" }, { "docid": "24867db33be8ce628f4e33946eea0b66", "score": "0.6379745", "text": "function miFuncion(){\n}", "title": "" }, { "docid": "2f54f963ce103a653344353503b5f15c", "score": "0.63639396", "text": "function vancia() {\n // hace cosas\n}", "title": "" }, { "docid": "18c0894fb580c16a36160b94ec4e0373", "score": "0.63534635", "text": "function cadenadetexto(){\n\n}", "title": "" }, { "docid": "abb71e8a9e990038a72f0e2267074ddc", "score": "0.6348262", "text": "function fehlersuche3() {\n \n}", "title": "" }, { "docid": "c1e001e8a19ecaecf64f13136789b749", "score": "0.63155276", "text": "function preencheDados() {\n\n}", "title": "" }, { "docid": "9ea182da8010b5b3cbe215f977548323", "score": "0.6232747", "text": "function mostrar() {}", "title": "" }, { "docid": "6b2c3365475968136d6cb24401fef205", "score": "0.6215262", "text": "function ba(){}", "title": "" }, { "docid": "6b2c3365475968136d6cb24401fef205", "score": "0.6215262", "text": "function ba(){}", "title": "" }, { "docid": "2d86ba4f147bb619fba685ef3fa27b96", "score": "0.62077004", "text": "function Interfaz(){}", "title": "" }, { "docid": "2d86ba4f147bb619fba685ef3fa27b96", "score": "0.62077004", "text": "function Interfaz(){}", "title": "" }, { "docid": "f11d29c9dfe92cecc6acaeea968acb20", "score": "0.6206169", "text": "function hola(){}", "title": "" }, { "docid": "7ad248aa650608db6a91a71401ad8da8", "score": "0.62002605", "text": "function Interfaz() {}", "title": "" }, { "docid": "53eb89ca67eeb868302ec681be3cdafe", "score": "0.6193782", "text": "function va(){}", "title": "" }, { "docid": "7f5b965d5bfe2e826cdba8fe50456e8c", "score": "0.6188788", "text": "onwilsluiten() {\n \n }", "title": "" }, { "docid": "04d208924c93b08dc8d4da806e0439ef", "score": "0.61786246", "text": "function haceralgo(){\n\n}", "title": "" }, { "docid": "23560831a4c276cebedb540c642d124c", "score": "0.6169285", "text": "function rotw() { } // tag for name, should not be called\\", "title": "" }, { "docid": "e8ce04356d09e960d99226ddad04608b", "score": "0.6159958", "text": "function Interfaz() { }", "title": "" }, { "docid": "3d36a21d0d1d14717208afd1628882bc", "score": "0.61216795", "text": "function procesos(){\n\n\t}", "title": "" }, { "docid": "87afe3f67b13320be63e49c783cbd6b0", "score": "0.6120957", "text": "function forLooopEX2(){\n\n}", "title": "" }, { "docid": "62a1192cad355ea810d8407179e99d96", "score": "0.6098699", "text": "function Fc(){}", "title": "" }, { "docid": "3b4fa8e544a758444b139846b5395382", "score": "0.6095641", "text": "function rotn () {\n\n }", "title": "" }, { "docid": "34693e83e34e4ad73a6d02ea418a9ea3", "score": "0.60937434", "text": "function faireKlkChose() {\n console.log('je fais un truc');\n}", "title": "" }, { "docid": "4ac1c6a0742849827502792416447438", "score": "0.60521126", "text": "function objeto_params(){\n \n}", "title": "" }, { "docid": "b854aa5c9b58eed933101318d4fe0437", "score": "0.603056", "text": "function main() { \n /*RECUPERER L'ID PRODUIT*/ \n getId();\n/*RECUPERER LES ELEMENTS DEJA AJOUTEES AU PANIER*/\n recupStorage();\n /*CREATION D'UNE BALISE*/\n createImg();\n /*LOCALISATION*/\n localisation();\n /*CONNECTION A L'API , RECUPERATION DES DONNEES + REMPLISSAGE DES ELEMENTS*/\n fetcher();\n}", "title": "" }, { "docid": "7b37851c3848b04aad6fd337a885bdd9", "score": "0.6029179", "text": "function ki(){}", "title": "" }, { "docid": "19558b7fc0c1dc006426c14d7d62b08b", "score": "0.6006668", "text": "function saludo(nombre){\n console.log(`Funcion de tipo ${nombre}`);\n}", "title": "" }, { "docid": "0cf632124bbf6f61af8f89959b3ef7a5", "score": "0.6002968", "text": "function jadbOP() {\n}", "title": "" }, { "docid": "80b563b6fc82796b556929a95b78ec1d", "score": "0.5994778", "text": "function hb(){}", "title": "" }, { "docid": "7dcb699edef7c9a88bac9b8ecf91f7b9", "score": "0.5971683", "text": "function transferirDinero() {\n\n}", "title": "" }, { "docid": "5412cbec186d84761f7c0bb74ddbad34", "score": "0.5967879", "text": "function __func(){}", "title": "" }, { "docid": "8e9c4d5fb19f18c48ab13696d0b98f94", "score": "0.5967602", "text": "function valide() {\n\n}", "title": "" }, { "docid": "872d1338faeb3304f9954cb0e1e9e3ae", "score": "0.59661424", "text": "function Estudiante() {}", "title": "" }, { "docid": "9ad11a73ed68bd2560fd997f1ee02b82", "score": "0.5955811", "text": "function Look(){}", "title": "" }, { "docid": "69d52aa69a03d2c80818cf7f447f9adf", "score": "0.59511536", "text": "function co(){}", "title": "" }, { "docid": "5987d391f07f8b6d8705323237456001", "score": "0.5934247", "text": "function Orchestrator() {\n\n}", "title": "" }, { "docid": "890c5ee99aa1c61d15e99c75189f77fc", "score": "0.5926081", "text": "function novoRegistro() {\n\n}", "title": "" }, { "docid": "c35b9f8560f3f56b392257128a98420c", "score": "0.59260297", "text": "function telefono(){\n uno();\n dos();\n}", "title": "" }, { "docid": "21947b70fa7db0f23394c9b1b76aed4d", "score": "0.59206", "text": "function getFunzione() {\n return Programma;\n }", "title": "" }, { "docid": "138a939de8dc5b05c6c4bedc127503c5", "score": "0.5904716", "text": "function realizarTransfencia() {\n\n}", "title": "" }, { "docid": "f24b276158f1d13883d206168657d400", "score": "0.58948165", "text": "function EFatturaTest() {\n\n}", "title": "" }, { "docid": "cc4efd29a5fa15e862137a896aeb1f88", "score": "0.58851355", "text": "function parim() {\r\n\r\n}", "title": "" }, { "docid": "3073fa5f09bb18dc72baa68eea684298", "score": "0.5877562", "text": "function erakutsiEguna(){}", "title": "" }, { "docid": "b9b8b965688cc6376de2d2d6fdc957a2", "score": "0.586341", "text": "function UIPause () {}", "title": "" }, { "docid": "deaa33b63290f857c2d87208a92b5519", "score": "0.58527595", "text": "function pb(){}", "title": "" }, { "docid": "17a16190612be030a2ea7ea27194ae7c", "score": "0.58506423", "text": "function agregarotroProyecto()\n{\n agregarProyecto();\n\n}", "title": "" }, { "docid": "d6aa4852c18130f8ea757f1d1b269dcd", "score": "0.58469296", "text": "function utility() {}", "title": "" }, { "docid": "4012c67e739e656bdc032550cd3f8c20", "score": "0.5825234", "text": "function calculadora(){\n//conjunto de instrucciones \nconsole.log(\"soy metodo de la calculadora\");\n\nreturn(\"soy metodo de la calculadora!!\");\n}", "title": "" }, { "docid": "5518f5c4c98695b2435a6d236cf292bb", "score": "0.5816097", "text": "function s(){}", "title": "" }, { "docid": "9ed89ad1d8dc07bf1bd68dace1157984", "score": "0.58060634", "text": "alCargado(){\n \n }", "title": "" }, { "docid": "d7427687ed0b9244f077cd15e1184c93", "score": "0.5803442", "text": "function wn(){}", "title": "" }, { "docid": "7f027d7c0c6c503c15bb420bd060ad19", "score": "0.5802874", "text": "function neu() {\n\n}", "title": "" }, { "docid": "ae2e42eb55f6f04e843ae64956d9e08a", "score": "0.58018774", "text": "function e(){}", "title": "" }, { "docid": "ae2e42eb55f6f04e843ae64956d9e08a", "score": "0.58018774", "text": "function e(){}", "title": "" }, { "docid": "ae2e42eb55f6f04e843ae64956d9e08a", "score": "0.58018774", "text": "function e(){}", "title": "" }, { "docid": "ae2e42eb55f6f04e843ae64956d9e08a", "score": "0.58018774", "text": "function e(){}", "title": "" }, { "docid": "fc7df061d55d608e0f341abd5aafaf44", "score": "0.5787866", "text": "function Dr(){}", "title": "" }, { "docid": "249cd025d503b503cbf9cf2a9ba454b6", "score": "0.57742107", "text": "function contoh1() {\n console.log(\"ini contoh penulisan function javascript cara pertama\");\n}", "title": "" }, { "docid": "4a72d980b69d6f2a3b3fa3274d2f5f2f", "score": "0.5772883", "text": "function shhhh() {\n}", "title": "" }, { "docid": "af3a55bc1f994383151347ecd6d0001f", "score": "0.5771901", "text": "function chamasrc(){ \n caminhoImagens(); \n}", "title": "" }, { "docid": "014c11537639fb67490daff72144dfeb", "score": "0.5766936", "text": "function hasiBerriro(){\n hasieratu();\n erakutsiGaldera('Arrasate',1);\n\n}", "title": "" }, { "docid": "27c7d85f9c71e0ae9dee15b56e52c5f8", "score": "0.57499564", "text": "function so(){ console.log(\"so\")}", "title": "" }, { "docid": "4c836ad56639df9abf6873e9408d5f6d", "score": "0.5743177", "text": "function restauraValores() {\n\n}", "title": "" }, { "docid": "92bae36da1e14bf19af6ec772d5d6828", "score": "0.5739644", "text": "function la(){}", "title": "" }, { "docid": "db1eac0d05895a426b138dcb8a8bb60b", "score": "0.5722342", "text": "function com_irontec_zsugarH() {\r\n}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "526188664644f0c76267dd549a86c256", "score": "0.57149285", "text": "function r(){}", "title": "" }, { "docid": "b4df4bcb528f2825bdf04bfd1868ab18", "score": "0.5712043", "text": "function expreso() {\n molino()\n}", "title": "" } ]
ab2adc4b97307e996c12cf90cb54dae2
Diagnoal Checking. We first check from left to right. Then from right side to left.
[ { "docid": "e0c82b833fe03d6843d9ca3ee4cd7c6f", "score": "0.0", "text": "function diagnolWinCheck(color){\n // var button = $('tr')[lastIndex].cells[elementColIndex];\n let x = elementColIndex;\n let y = lastIndex;\n let hit = 0;\n let tempArr = [];\n\n //we use a temp array to store them and then reverse it on the first pass.\n while(x >=0 && y >=0){\n let button = $('tr')[y].cells[x].children.button\n // buttonSet.add(button);\n tempArr.push(button);\n x--;\n y--;\n }\n tempArr.reverse()\n\n x = elementColIndex +1;\n y = lastIndex +1;\n while(y <=5 && x<=6){\n let button = $('tr')[y].cells[x].children.button\n tempArr.push(button)\n x++;\n y++;\n }\n checkDiagWin(tempArr, color);\n //*****************End of first diagnol search*********** */\n x = elementColIndex;\n y = lastIndex;\n tempArr =[]\n hit = 0;\n while(x <=6 && y >=0){\n let button = $('tr')[y].cells[x].children.button\n tempArr.push(button);\n x++;\n y--;\n }\n tempArr.reverse()\n x = elementColIndex -1;\n y = lastIndex +1;\n while(y <=5 && x>=0){\n let button = $('tr')[y].cells[x].children.button\n tempArr.push(button);\n x--;\n y++;\n }\n checkDiagWin(tempArr,color);\n}", "title": "" } ]
[ { "docid": "f5d98864b200aafbd17e146a44187f5f", "score": "0.7302313", "text": "function check_diagonals() {\n var ltr = game_board[0][0] + game_board[1][1] + game_board[2][2];\n var rtl = game_board[0][2] + game_board[1][1] + game_board[2][0];\n switch (ltr) {\n case 3:\n win_game('Player 1');\n break;\n case -3:\n win_game('Player 2');\n break;\n }\n switch (rtl) {\n case 3:\n win_game('Player 1');\n break;\n case -3:\n win_game('Player 2');\n break;\n }\n}", "title": "" }, { "docid": "075934b896fef01f276c544931d4425a", "score": "0.725748", "text": "function check_diagonal() {\r\n for(let a = 0; a < 6; a++) {\r\n for(let b = 0; b < 7;b++) {\r\n if(char_arr[a][b] == 'X' || char_arr[a][b] == 'O') {\r\n check_north_east(a,b,char_arr[a][b]);\r\n check_north_west(a,b,char_arr[a][b]);\r\n check_south_east(a,b,char_arr[a][b]);\r\n check_south_west(a,b,char_arr[a][b]);\r\n if(is_diagonal) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "8928e9a8545f769f5edcb4440bdd86d5", "score": "0.7190115", "text": "function checkDiagonalR2L() {\n for (let i = 0; i < 5; i++) {\n if (!board[(i + 1) * 5 - (i + 1)].isMarked) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "a08a92cee84ae2674e6fc0cd1fff6b69", "score": "0.714421", "text": "function checkDiagonalL2R() {\n for (let i = 0; i < 5; i++) {\n if (!board[i * 5 + i].isMarked) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "cf2671eaf1a8aeac8ea801d9dd993b75", "score": "0.7075047", "text": "function check_diagonale(grid){\n for (var i=0;i<nb_column-3;i++)\n {\n for (var j=0;j<nb_lines-3;j++)\n {\n first_elem=grid[i][j];\n if (first_elem!=0)\n {\n different=false;\n for(var k=0;k<4;k++)\n {\n if(grid[i+k][j+k]!=first_elem){different=true;}\n }\n if(!different){return true;}\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "3abddc7612f05e6015c27e00f3f2cebd", "score": "0.6996479", "text": "function checkForDiagonal() {\n if (cardArray[0].value === cardArray[4].value && cardArray[0].value === cardArray[8].value && cardArray[0].value !== null) {\n return true\n }\n else if (cardArray[2].value === cardArray[4].value && cardArray[2].value === cardArray[6].value && cardArray[2].value !== null) {\n return true\n\n }\n }", "title": "" }, { "docid": "de7cb6a8b5ca9375785c323ef74e456d", "score": "0.6841747", "text": "function checkDiagonals2(marking) {\n\n\tmarking_count = 0;\n\tempty_count = 0;\n\tempty_tile_row = 0;\n \tempty_tile_col = 0; \n\n \tfor(var i=0, j=2; i<3; i++, j--) {\n\n\t\tif(array[i][j][0] == marking) {\n\t\t\tmarking_count++;\n\n\t\t} else if(array[i][j][1] == true) {\n\t\t\tempty_count++;\n\t\t\tempty_tile_row = i;\n \t\t\tempty_tile_col = j;\t\n\t\t}\t\t\t\n\t}\n\n\tif(marking_count == 2 && empty_count == 1) {\n\t\tmarkTile(empty_tile_row, empty_tile_col, 'O');\n\t\treturn true;\t\t\t\t\t\t\t\t\t \n\t}\n\n\treturn false;\n\n}", "title": "" }, { "docid": "8c3b0e811e15942a5d8714610abd1e60", "score": "0.683157", "text": "function checkDiagonal(divCheckX, divCheckO) {\n for (var i = 0; i < 2; i++) {\n var firstGrid = 0 + 2*i;\n var secondGrid = 4;\n var thirdGrid = 8 - 2*i;\n checkXO(divCheckX, divCheckO, firstGrid, secondGrid, thirdGrid);\n }\n}", "title": "" }, { "docid": "aab71a20b2736240d6f96b56d14a4961", "score": "0.68253267", "text": "function checkDiagonals() {\nlet firstDiagonalsResult = isTicTacToe(board[2][0],board[2][1],board[2][2]);\nlet secondDiagonalsResult = isTicTacToe(board[2][0],board[2][1],board[2][2]);\nlet thirdDiagonalsResult = isTicTacToe(board[2][0],board[2][1],board[2][2]);\n\n\tif(firstcheckDiagonalsResult != null){\n \treturn board[0][0];\n }\n else if(secondcheckDiagonalsResult != null){\n \treturn board[2][0];\n }\n else //if(thirdcheckDiagonalsResult != null){\n{\n\treturn null;\n }\n}", "title": "" }, { "docid": "65adb2993424377de59cf767783df710", "score": "0.6818663", "text": "function checkDiagonalMatch () {\n\tfor (var row = 0; row < 6;row++) {\n\t\tfor (var col = 0;col < 7; col++) {\n\t\t\tif (checkMatch(getColor(row,col),getColor(row-1,col+1),getColor(row-2,col+2),getColor(row-3,col+3)) ||\n\t\t\t\tcheckMatch(getColor(row,col),getColor(row+1,col+1),getColor(row+2,col+2),getColor(row+3,col+3))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "cc63f8676ad4565b219beb1e8ef4ed89", "score": "0.6771613", "text": "DirectionDetectDiag() {\n\n this.xright = 0;\n this.xleft = 0;\n this.yup = 0;\n this.ydown = 0;\n\n if (this.piece == \"Bishop\" || this.piece == \"Queen\" || this.piece == \"King\") {\n if (this.wantedposy - this.y < 0) {\n this.yup = 1;\n }\n if (this.wantedposy - this.y > 0) {\n this.ydown = 1;\n }\n if (this.wantedposx - this.x > 0) {\n this.xright = 1;\n }\n if (this.wantedposx - this.x < 0) {\n this.xleft = 1;\n }\n }\n if (this.xright + this.yup + this.ydown + this.xleft >= 2)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "1f65d769bfd19510145a263fa69f5267", "score": "0.6745468", "text": "function checkDiagonals1(marking) {\n\n\tvar marking_count = 0;\n\tvar empty_count = 0;\n\tvar empty_tile_row = 0;\n \tvar empty_tile_col = 0;\n\n\tfor(var i=0, j=0; i<3; i++, j++) {\n\n\t\tif(array[i][j][0] == marking) {\n\t\t\tmarking_count++;\n\n\t\t} else if(array[i][j][1] == true) {\n\t\t\tempty_count++;\n\t\t\tempty_tile_row = i;\n \t\t\tempty_tile_col = j;\t\n\t\t}\t\t\t\n\t}\n\n\tif(marking_count == 2 && empty_count == 1) {\n\t\tmarkTile(empty_tile_row, empty_tile_col, 'O');\t\n\t\treturn true;\t\t\t\t\t\t\t \n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "ade0603483f2c2e4a517f0a9fe07d84c", "score": "0.66745746", "text": "function diagonal() {\n if (board[0].value === board[4].value && board[4].value === board[8].value && board[0].value !== \" \") {\n return true;\n }\n else if (board[2].value === board[4].value && board[4].value === board[6].value && board[2].value !== \" \") {\n return true;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "4c95b136cf1d46ed58793ca96dae344e", "score": "0.6644883", "text": "function checkDiagnolConnection(checkForPlayer) {\n const retVal = false;\n //diagonally towards left\n for (let i = board.length - 1; i >= 3; i--) {\n for (let j = board[i].length - 1; j >= 0; j--) {\n if (board[i - 3] !== undefined && checkForPlayer === board[i][j] && board[i][j] === board[i - 1][j - 1] && board[i - 1][j - 1] === board[i - 2][j - 2] && board[i - 2][j - 2] === board[i - 3][j - 3]) {\n console.log(`left diagnol connect winner ${ currentplayer }`);\n return true;\n }\n }\n }\n //diagonally towards right\n for (let i = board.length - 1; i >= 3; i--) {\n for (let j = 0; j < board[i].length; j++) {\n if (board[i - 3] !== undefined && checkForPlayer === board[i][j] && board[i][j] === board[i - 1][j + 1] && board[i - 1][j + 1] === board[i - 2][j + 2] && board[i - 2][j + 2] === board[i - 3][j + 3]) {\n console.log(`right diagnol connect winner ${ currentplayer }`);\n return true;\n }\n }\n }\n return retVal;\n}", "title": "" }, { "docid": "2f6ff746790901bd2c8f7fc2e81f9abd", "score": "0.65939975", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n }", "title": "" }, { "docid": "c5797af1fed118c8e02d8fab36f2f9b7", "score": "0.6584331", "text": "checkDiagonal1(row, col) {\n const size = this.state.size;\n if (row === (size - col - 1)) {\n for (let i = 0; i < size; i++) {\n if (!this.state.selection[size * i + size - i - 1]) {\n console.log('- Bingo in diagonal 1? Fail at cell ' + (size * i + size - i - 1));\n return false;\n }\n }\n console.log('- Bingo in diagonal 1? Success!')\n return true;\n }\n }", "title": "" }, { "docid": "bf1b409d301852247e95a03253c15b4e", "score": "0.6564433", "text": "function checkDiagonals(gameObj){\r\n let player1 = 0;\r\n let player2 = 0;\r\n let diagonalStart = [14, 7, 0, 1, 2, 3]; //the bottom of each proper diagonal\r\n let diagonalSize = [4, 5, 6, 6, 5, 4]; //how many elements are in each diagonal\r\n for(let i = 0; i < 6; i++){\r\n for(let k = 0; k < diagonalSize[i]; k++){ //use diagonalStart[i] + k*8\r\n if(gameObj.board[diagonalStart[i] + k*8] === 1){\r\n //consequtive 1's\r\n player1++;\r\n player2 = 0;\r\n }else if(gameObj.board[diagonalStart[i] + k*8] === 3){\r\n //consequetive 3's (i.e. player 2)\r\n player2++;\r\n player1 = 0;\r\n }else{\r\n //then there was a 0 any run is gone\r\n player1 = 0;\r\n player2 = 0;\r\n }\r\n\r\n if(player1 > 3){\r\n return true;\r\n }\r\n if(player2 > 3){\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n\r\n player1 = 0;\r\n player2 = 0;\r\n let diagonalStartLeftUp = [3, 4, 5, 6, 13, 20]; //the begging of each proper diagonal (from the bottom rising)\r\n for(let i = 0; i < 6; i++){\r\n for(let k = 0; k < diagonalSize[i]; k++){ //use diagonalStartLeftUp[i] + k*6\r\n if(gameObj.board[diagonalStartLeftUp[i] + k*6] === 1){\r\n //consequtive 1's\r\n player1++;\r\n player2 = 0;\r\n }else if(gameObj.board[diagonalStartLeftUp[i] + k*6] === 3){\r\n //consequetive 3's (i.e. player 2)\r\n player2++;\r\n player1 = 0;\r\n }else{\r\n //then there was a 0 any run is gone\r\n player1 = 0;\r\n player2 = 0;\r\n }\r\n\r\n if(player1 > 3){\r\n return true;\r\n }\r\n if(player2 > 3){\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "bf1b409d301852247e95a03253c15b4e", "score": "0.6564433", "text": "function checkDiagonals(gameObj){\r\n let player1 = 0;\r\n let player2 = 0;\r\n let diagonalStart = [14, 7, 0, 1, 2, 3]; //the bottom of each proper diagonal\r\n let diagonalSize = [4, 5, 6, 6, 5, 4]; //how many elements are in each diagonal\r\n for(let i = 0; i < 6; i++){\r\n for(let k = 0; k < diagonalSize[i]; k++){ //use diagonalStart[i] + k*8\r\n if(gameObj.board[diagonalStart[i] + k*8] === 1){\r\n //consequtive 1's\r\n player1++;\r\n player2 = 0;\r\n }else if(gameObj.board[diagonalStart[i] + k*8] === 3){\r\n //consequetive 3's (i.e. player 2)\r\n player2++;\r\n player1 = 0;\r\n }else{\r\n //then there was a 0 any run is gone\r\n player1 = 0;\r\n player2 = 0;\r\n }\r\n\r\n if(player1 > 3){\r\n return true;\r\n }\r\n if(player2 > 3){\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n\r\n player1 = 0;\r\n player2 = 0;\r\n let diagonalStartLeftUp = [3, 4, 5, 6, 13, 20]; //the begging of each proper diagonal (from the bottom rising)\r\n for(let i = 0; i < 6; i++){\r\n for(let k = 0; k < diagonalSize[i]; k++){ //use diagonalStartLeftUp[i] + k*6\r\n if(gameObj.board[diagonalStartLeftUp[i] + k*6] === 1){\r\n //consequtive 1's\r\n player1++;\r\n player2 = 0;\r\n }else if(gameObj.board[diagonalStartLeftUp[i] + k*6] === 3){\r\n //consequetive 3's (i.e. player 2)\r\n player2++;\r\n player1 = 0;\r\n }else{\r\n //then there was a 0 any run is gone\r\n player1 = 0;\r\n player2 = 0;\r\n }\r\n\r\n if(player1 > 3){\r\n return true;\r\n }\r\n if(player2 > 3){\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "ed679283249711cbdb56564938c6fc9d", "score": "0.6561342", "text": "function checkDiags(operator) {\n var seqArr = []; //creating array of diagonals to be passed to checkForVictory\n var result = eval(\"columnIdx\" + operator + \"i\"); //works for both + and -\n for (var ci = 0; ci < totalNumOfCol; ci++) {\n //looping through all columns\n var checkCol = allColumns.eq(ci).index(); //grabbing the index of each column\n for (var ri = 0; ri < totalNumOfRow; ri++) {\n //looping through all rows\n if (eval(\"checkCol\" + operator + \"ri\") === result) {\n //comparing sum of row number and column index to the initial sum\n //works for both + and -\n seqArr.push(\n allColumns.eq(checkCol).children().eq(ri)\n ); //updates the diags array\n }\n }\n }\n return seqArr; //to be passed as argument to checkForVictory\n }", "title": "" }, { "docid": "724a1d2ce0784b18374af4c48a240634", "score": "0.65608144", "text": "function check_horizonal() {\r\n for(a = 0; a < 6; a++) {\r\n for(b = 0; b < 7; b++) {\r\n if(char_arr[a][b] == 'X' || char_arr[a][b] == 'O') {\r\n left_check(a,b,char_arr[a][b]);\r\n right_check(a,b,char_arr[a][b]);\r\n if(is_horizontal) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "6eabee4338c7e9a183e9e190a556ef32", "score": "0.6558941", "text": "function checkDiag(colIdx, rowIdx, vertOffset) {\n // lot's of boundaries to check\n if (colIdx > 3 || (vertOffset > 0 && rowIdx > 2) || (vertOffset < 0 && rowIdx < 3)) return null;\n return ( Math.abs(board[colIdx][rowIdx] + board[colIdx + 1][rowIdx + vertOffset] + board[colIdx + 2][rowIdx + (vertOffset * 2)] + board[colIdx + 3][rowIdx + (vertOffset * 3)]) === 4 ) ? board[colIdx][rowIdx] : null;\n }", "title": "" }, { "docid": "579078bb341877503de38d5e4f6225fb", "score": "0.6558043", "text": "isDiagonal(n){\n return this.getDirections(n).length == 2;\n }", "title": "" }, { "docid": "5dffb8b8c4cba3eeaae46ca91c8ceec5", "score": "0.6553267", "text": "checkDiagonal2(row, col) {\n const size = this.state.size;\n if (row === col) {\n for (let i = 0; i < size; i++) {\n if (!this.state.selection[size * i + i]) {\n console.log('- Bingo in diagonal 2? Fail at cell ' + (size * i + i));\n return false;\n }\n }\n console.log('- Bingo in diagonal 2? Success!');\n return true;\n }\n }", "title": "" }, { "docid": "c07ed492b75b55f0031877e0b3f4755d", "score": "0.65481603", "text": "function checkDiag(diag) {\n\t\tvar ch, old;\n\t\tvar d = diag%2 ? -1 : 1;\n\t\tfor (var i = -1; i < 2; i++) {\n\t\t\tch = game_board[4 + (3 + (-1)*d)*i];\n\t\t\tif ((ch === n || ch !== old) && i !== -1) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\told = ch;\n\t\t\t}\n\t\t}\n\t\tconsole.log(\"The diag is \" + diag);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "48f9d1ddb174efcdbc19d424405dec69", "score": "0.6528727", "text": "function isValidDiagonal(a, b) {\n\t\t return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t\t}", "title": "" }, { "docid": "48f9d1ddb174efcdbc19d424405dec69", "score": "0.6528727", "text": "function isValidDiagonal(a, b) {\n\t\t return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t\t}", "title": "" }, { "docid": "0e0664bfe8a97478ee287d3993db2cc3", "score": "0.6514021", "text": "function isValidDiagonal(a, b) {\n return (\n a.next.i !== b.i &&\n a.prev.i !== b.i &&\n !intersectsPolygon(a, b) &&\n locallyInside(a, b) &&\n locallyInside(b, a) &&\n middleInside(a, b)\n );\n }", "title": "" }, { "docid": "2625bb0f862c983226fd2ed3c4dd64b6", "score": "0.6500017", "text": "function isValidDiagonal(a, b) {\n\t return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t}", "title": "" }, { "docid": "2625bb0f862c983226fd2ed3c4dd64b6", "score": "0.6500017", "text": "function isValidDiagonal(a, b) {\n\t return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t}", "title": "" }, { "docid": "2625bb0f862c983226fd2ed3c4dd64b6", "score": "0.6500017", "text": "function isValidDiagonal(a, b) {\n\t return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t}", "title": "" }, { "docid": "2625bb0f862c983226fd2ed3c4dd64b6", "score": "0.6500017", "text": "function isValidDiagonal(a, b) {\n\t return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t}", "title": "" }, { "docid": "2625bb0f862c983226fd2ed3c4dd64b6", "score": "0.6500017", "text": "function isValidDiagonal(a, b) {\n\t return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t}", "title": "" }, { "docid": "04fa464e0d0abf6273f3393441a44110", "score": "0.6499614", "text": "function isValidDiagonal(a, b) {\n\t return equals(a, b) || a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n\t locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n\t}", "title": "" }, { "docid": "b875ff848e2d7166de632088d7dc9384", "score": "0.648883", "text": "function diagonal(){\n\t\t\tfor(var i = 0, j = 4; i <= 2 ; i = i + 2, j = j - 2) {\n\t\t\t\tif(state[i] !== \"E\" && state[i] == state[i + j] && state[i + j] === state[i + 2*j]) {\n\t\t\t\t game.winner = state[i]; //update the state result\n\t\t\t\t game.status= \"over\";\n\t\t\t\t game.bool= true;\n\t\t\t\t return true;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "71ecc488f53aadfd2d5d9258e0a4e132", "score": "0.647679", "text": "function isValidDiagonal ( a, b )\r\n {\r\n return equals( a, b ) || a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon( a, b ) &&\r\n locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\r\n }", "title": "" }, { "docid": "e6ebb4370a9ba6ba381abf2812ae22c0", "score": "0.6471571", "text": "function _check_diags(player) {\n if (_gameBoard[0][0] === player && _gameBoard[1][1] === player && _gameBoard[2][2] === player) {\n return true;\n } else if (_gameBoard[0][2] === player && _gameBoard[1][1] === player && _gameBoard[2][0] === player) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f506047cccd9076d2c8970d5abd01ab1", "score": "0.6441114", "text": "function isValidDiagonal( a, b ) {\n\n \treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n \t\t locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n }", "title": "" }, { "docid": "33c335ddac3c4fcd1cf501afbde8a3b7", "score": "0.64402825", "text": "function isValidDiagonal$1(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon$4(a, b) &&\n locallyInside$1(a, b) && locallyInside$1(b, a) && middleInside$1(a, b);\n}", "title": "" }, { "docid": "e9f68cefd0f790ef0d88ff7dfbe29999", "score": "0.6425489", "text": "function isValidDiagonal(a, b) {\n return (\n a.next.i !== b.i &&\n a.prev.i !== b.i &&\n !intersectsPolygon(a, b) &&\n locallyInside(a, b) &&\n locallyInside(b, a) &&\n middleInside(a, b)\n );\n }", "title": "" }, { "docid": "77b96f9f3bb4e7fc08e8a007bab19a8b", "score": "0.6415085", "text": "function checkDiagonalWin() {\n return auxCheckDiagonalWin(0);\n\n // change the columns\n function auxCheckDiagonalWin(column) {\n if (column < 5) {\n if (auxCheckDiagonalWin2(0, column)) {\n return true;\n }else{\n return auxCheckDiagonalWin(column + 1);\n }\n }\n }\n // change the rows\n function auxCheckDiagonalWin2(row, column) {\n if (row < 7) {\n if (auxCheckDiagonalWin3(row, column)) {\n return true;\n }else{\n return auxCheckDiagonalWin2(row + 1, column);\n }\n }else{\n return false;\n }\n }\n // check if there is a diagonal win\n function auxCheckDiagonalWin3(row, column) {\n if (equalColors(returnColor(row,column), returnColor(row+1,column+1) ,returnColor(row+2,column+2), returnColor(row+3,column+3))) {\n console.log('diagonal win');\n return true;\n }else if (equalColors(returnColor(row,column), returnColor(row-1,column+1) ,returnColor(row-2,column+2), returnColor(row-3,column+3))) {\n console.log('diagonal win');\n return true;\n }else {\n return false;\n }\n }\n\n}", "title": "" }, { "docid": "abc7070e15240e54b15d0f14d630800f", "score": "0.64090854", "text": "function isValidDiagonal(data, a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i &&\n !intersectsPolygon(data, a, a.i, b.i) &&\n locallyInside(data, a, b) && locallyInside(data, b, a) &&\n middleInside(data, a, a.i, b.i);\n}", "title": "" }, { "docid": "b3d713d1060cc7e31a919d95e9ee7865", "score": "0.64054674", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n}", "title": "" }, { "docid": "3f7863bc6fc6ad5e669a5b2ec630d800", "score": "0.6404053", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n }", "title": "" }, { "docid": "8223580705f9b569e9634f6d04896196", "score": "0.6400081", "text": "function isValidDiagonal(a, b) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "13a31baf96dfbbb159c171e8904abce4", "score": "0.639613", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "bcac8ed4a67dff427ddb6102599759ae", "score": "0.6379329", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n }", "title": "" }, { "docid": "787d93a1cda5dc0a667de166a5d5fc04", "score": "0.6379172", "text": "function checkDiagonalLeft(board, player, x, y) {\n next1 = board[x - 1][y + 1] == player;\n next2 = board[x - 2][y + 2] == player;\n next3 = board[x - 3][y + 3] == player;\n return next1 && next2 && next3;\n }", "title": "" }, { "docid": "ce72c1978c5be0d1cf8144689b7ec19a", "score": "0.63733464", "text": "function isValidDiagonal(a, b) {\n return equals(a, b) || a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "169a05ced099ae14bb27e3a0cd920953", "score": "0.6371069", "text": "function diagCheck2(){\n for(let col = 0; col < 4; col++){\n for(let row = 5; row > 2; row--){\n if(colorCheck(boardRow[row].children[col].style.backgroundColor, boardRow[row-1].children[col+1].style.backgroundColor,\n boardRow[row-2].children[col+2].style.backgroundColor, boardRow[row-3].children[col+3].style.backgroundColor)){\n return true;\n }\n }\n }\n}", "title": "" }, { "docid": "8f585dad6a763367dc7062ab5d33e4f4", "score": "0.63488966", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t\t locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n\t}", "title": "" }, { "docid": "8f585dad6a763367dc7062ab5d33e4f4", "score": "0.63488966", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t\t locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n\t}", "title": "" }, { "docid": "8f585dad6a763367dc7062ab5d33e4f4", "score": "0.63488966", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t\t locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n\t}", "title": "" }, { "docid": "b4179c2b8b5c4fe9b0f1c99ad6e1e8b7", "score": "0.6345991", "text": "function checkDiagonalPattern(bingoTable) {\n var patternFound = true;\n for(var i = 0; i < bingoTable.length; i++) {\n \n if((!bingoTable[i].rows[i].isCalledOut) || (!bingoTable[bingoTable.length - 1 - i].rows[i].isCalledOut)) {\n patternFound = false;\n break;\n }\n if(patternFound) {\n console.log(\"pattern found diagonal \");\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "62c2202474248cb64aada58f5bed5233", "score": "0.6336986", "text": "function checkKingDiagonals(row, col, team, limit) {\n let checkCol = col - 1;\n let checkRow = row + 1;\n enemyCount = 0;\n for (i = 0; i < limit; i++) {\n if (enemyCount < 1) {\n if (checkTile(checkRow, checkCol, team, \"bishop\") == true) {\n displayKingLine(checkRow, checkCol);\n checkCol--;\n checkRow++;\n }\n else {\n i = limit;\n }\n }\n }\n checkCol = col + 1;\n checkRow = row - 1;\n enemyCount = 0;\n for (i = 0; i < limit; i++) {\n if (enemyCount < 1) {\n if (checkTile(checkRow, checkCol, team, \"bishop\") == true) {\n displayKingLine(checkRow, checkCol);\n checkCol++;\n checkRow--;\n }\n else {\n i = limit;\n }\n }\n\n }\n\n\n\n\n // check descending diagonal (L->R)\n checkCol = col - 1;\n checkRow = row - 1;\n enemyCount = 0;\n for (i = 0; i < limit; i++) {\n if (enemyCount < 1) {\n if (checkTile(checkRow, checkCol, team, \"bishop\") == true) {\n displayKingLine(checkRow, checkCol);\n checkCol--;\n checkRow--;\n }\n else {\n i = limit;\n }\n }\n\n }\n checkCol = col + 1;\n checkRow = row + 1;\n enemyCount = 0;\n for (i = 0; i < limit; i++) {\n if (enemyCount < 1) {\n if (checkTile(checkRow, checkCol, team, \"bishop\") == true) {\n displayKingLine(checkRow, checkCol);\n checkCol++;\n checkRow++;\n }\n else {\n i = limit;\n }\n }\n\n }\n}", "title": "" }, { "docid": "631da46fe2f40b51b709ea24e9b8b3ff", "score": "0.6329693", "text": "function diagonalWinCheck(){\n for (row=0;row<=6;row++){\n for (col=0;col<=6;col++){\n if (colorMatch(returnColor(row,col),returnColor(row+1,col+1),returnColor(row+2,col+2),returnColor(row+3,col+3))){\n reportWin(row,col);\n console.log('Diag');\n return true;\n }\n else if (colorMatch(returnColor(row,col),returnColor(row-1,col+1),returnColor(row-2,col+2),returnColor(row-3,col+3))){\n reportWin(row,col);\n console.log('Diag');\n return true; \n }\n else{\n continue;\n }\n }\n }\n}", "title": "" }, { "docid": "0182e809f19245b74fedab5a323f59a7", "score": "0.6327685", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n }", "title": "" }, { "docid": "238321dfdc0390762b553f356f5ffff1", "score": "0.6326002", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon$3(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}", "title": "" }, { "docid": "9e53e960f78e8d34a42227bd685b4de6", "score": "0.631974", "text": "checkMajorDiags(player) {\r\n\r\n for (var i = 0; i < 3; i++) {\r\n for (var j = 0; j < 4; j++) {\r\n if (this.grid[i][j] == player && this.grid[i + 1][j + 1] == player && this.grid[i + 2][j + 2] == player && this.grid[i + 3][j + 3] == player) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "f774705248fcaca589ea99d551994668", "score": "0.6319272", "text": "function checkDiagonalWin()\r\n{\r\n for( var xPosition = 0; xPosition < gridWidth; xPosition++ )\r\n {\r\n\tfor( var yPosition = 0; yPosition < gridHeight; yPosition++ )\r\n\t{\r\n\t if( checkDiagonalWinFrom( xPosition, yPosition ) )\r\n\t {\r\n\t\treturn true;\r\n\t }\r\n\t}\r\n\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "64db2f5c5d82cb0d6ca5b3c979af274e", "score": "0.6316893", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n}", "title": "" }, { "docid": "64db2f5c5d82cb0d6ca5b3c979af274e", "score": "0.6316893", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n}", "title": "" }, { "docid": "64db2f5c5d82cb0d6ca5b3c979af274e", "score": "0.6316893", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n}", "title": "" }, { "docid": "64db2f5c5d82cb0d6ca5b3c979af274e", "score": "0.6316893", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n}", "title": "" }, { "docid": "64db2f5c5d82cb0d6ca5b3c979af274e", "score": "0.6316893", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n}", "title": "" }, { "docid": "b4f104644e29869c9bfcec995bb19874", "score": "0.6297913", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n\t}", "title": "" }, { "docid": "b4f104644e29869c9bfcec995bb19874", "score": "0.6297913", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n\t}", "title": "" }, { "docid": "b4f104644e29869c9bfcec995bb19874", "score": "0.6297913", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n\t}", "title": "" }, { "docid": "b4f104644e29869c9bfcec995bb19874", "score": "0.6297913", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) &&\n\t\t\tlocallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b );\n\n\t}", "title": "" }, { "docid": "2880223437dd1cd718876505e32458a2", "score": "0.6294564", "text": "function winCheck() {\n for (let x = 0; x < boardLength; x++) {\n for (let y = 0; y < boardLength; y++) {\n if (x < boardLength - 3 && board[y][x] != 0 && board[y][x + 1] == board[y][x]) {\n check4(x, y, 0, 2, 0, 3, \"horizontal\");\n }\n if (y < boardLength - 3 && board[y][x] != 0 && board[y + 1][x] == board[y][x]) {\n check4(x, y, 2, 0, 3, 0, \"vertical\");\n }\n if (x < boardLength - 3 && y < boardLength - 3 && board[y][x] != 0 && board[y + 1][x + 1] == board[y][x]) {\n check4(x, y, 2, 2, 3, 3, \"diagonal\");\n }\n if (x < boardLength - 3 && y > 2 && board[y][x] != 0 && board[y - 1][x + 1] == board[y][x]) {\n check4(x, y, -2, 2, -3, 3, \"diagonal\");\n }\n }\n }\n}", "title": "" }, { "docid": "5ae9b3b7d9ac3ab506c05a2f1c50e3b3", "score": "0.6288664", "text": "function isValidDiagonal$1(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon$1(a, b) && // dones't intersect other edges\n (locallyInside$1(a, b) && locallyInside$1(b, a) && middleInside$1(a, b) && // locally visible\n (area$1(a.prev, a, b.prev) || area$1(a, b.prev, b)) || // does not create opposite-facing sectors\n equals$1(a, b) && area$1(a.prev, a, a.next) > 0 && area$1(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "2de5fb9e90b2dd00223da004cce3a3ee", "score": "0.62811625", "text": "function isValidDiagonal( a, b ) {\n\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n\t\t\t( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n\t\t\t( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n\t\t\tequals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n\t}", "title": "" }, { "docid": "061a9f00f3d575e6805946a4b84b1bca", "score": "0.62803674", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n ( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n ( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}", "title": "" }, { "docid": "bada1e828982e34b8288824345146fd2", "score": "0.6275375", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "bada1e828982e34b8288824345146fd2", "score": "0.6275375", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "bada1e828982e34b8288824345146fd2", "score": "0.6275375", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "bada1e828982e34b8288824345146fd2", "score": "0.6275375", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "bada1e828982e34b8288824345146fd2", "score": "0.6275375", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "bada1e828982e34b8288824345146fd2", "score": "0.6275375", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "bada1e828982e34b8288824345146fd2", "score": "0.6275375", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" }, { "docid": "1fe6aaa89e52f8ec6cc4bea0710cd5ef", "score": "0.62743115", "text": "function testDiag() {\n var winner;\n var gamePiece = \"X\"; // TEST FOR X WINNER FIRST\n for (i = 1; i < 3; i++) { // LOOPS TWICE TO CHECK FOR X WINNER, THEN O WINNER\n winner = true;\n for (row = 1; (row < 4) && (winner === true); row++) {\n var thisRow = \"row\" + row;\n var idx = row - 1;\n winner = board[thisRow][idx] === gamePiece ? true : false;\n }\n if (winner === true) {\n return [true, 7];\n }\n\n var idx = 3;\n winner = true\n for (row = 1; (row < 4) && (winner === true); row++) {\n var thisRow = \"row\" + row;\n idx--;\n winner = board[thisRow][idx] === gamePiece ? true : false;\n }\n if (winner === true) {\n return [true, 8]; // gamePiece\n }\n gamePiece = \"O\"; // NOW LOOP AGAIN TO TEST FOR O WINNER\n }\n return winner;\n}", "title": "" }, { "docid": "832dfe532efd002e21e691c791c16c7e", "score": "0.6268198", "text": "function diagonalWin() {\n return didBackSlashDiagonalWin() || didForwardSlashDiagonalWin();\n}", "title": "" }, { "docid": "e46ba2dc13892dda7cd508e0d00bd04e", "score": "0.626572", "text": "function diag_guanyadora(row,col){\n if((row==0&&col==0)||(row==1&&col==1)||(row==2&&col==2)){\n if(array[0][0]!=0 && array[0][0]==array[1][1]&&array[0][0]==array[2][2]){\n return true;\n }\n }\n if((row==0&&col==2)||(row==1&&col==1)||(row==2&&col==0)){\n if(array[0][2]!=0 && array[0][2]==array[1][1]&&array[0][2]==array[2][0]){\n return true;\n }\n }else return false;\n}", "title": "" }, { "docid": "044a82e7b45c00f37e6aee0499b481c5", "score": "0.6242018", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n\t\t( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n\t\t( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n\t\tequals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}", "title": "" }, { "docid": "044a82e7b45c00f37e6aee0499b481c5", "score": "0.6242018", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n\t\t( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n\t\t( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n\t\tequals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}", "title": "" }, { "docid": "044a82e7b45c00f37e6aee0499b481c5", "score": "0.6242018", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n\t\t( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n\t\t( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n\t\tequals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}", "title": "" }, { "docid": "044a82e7b45c00f37e6aee0499b481c5", "score": "0.6242018", "text": "function isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n\t\t( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n\t\t( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n\t\tequals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}", "title": "" }, { "docid": "7a3a79fdba82b6865e7accd121c41760", "score": "0.62383443", "text": "function isDiagonal(array) {\n\n for (let i = 0; i < array.length; i++) {\n const nested = array[i]\n for (let j = 0; j < nested.length; j++) {\n if (j !== i && nested[j] !== 0) {\n return false\n }\n }\n }\n return true\n}", "title": "" }, { "docid": "0544b5c3f505a872a9ccaa28e6f85161", "score": "0.6231993", "text": "function diagonalChecks(board) {\n let matched = false;\n\n // Check from top left to bottom right\n for (let col = 0; col < 4; col++) {\n for (let row = 0; row < 3; row++) {\n if (\n coinMatchCheck(\n board[row][col],\n board[row + 1][col + 1],\n board[row + 2][col + 2],\n board[row + 3][col + 3]\n )\n ) {\n matched = true;\n }\n }\n }\n\n if (!matched) {\n // Check from bottom left to top right\n for (let col = 0; col < 4; col++) {\n for (let row = 5; row > 2; row--) {\n if (\n coinMatchCheck(\n board[row][col],\n board[row - 1][col + 1],\n board[row - 2][col + 2],\n board[row - 3][col + 3]\n )\n ) {\n matched = true;\n }\n }\n }\n }\n\n return matched;\n}", "title": "" }, { "docid": "3c245bc3be080d4f2d594e41edba6894", "score": "0.6219126", "text": "function isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals$a(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}", "title": "" } ]
497458f23010d9f1a67ff52dbcab5b3e
Function that returns the name of a planet
[ { "docid": "01d2bce5ac726b127e740c29fb687031", "score": "0.0", "text": "function searchPlanet(URL, target){\n \n $.ajax({\n url: URL,\n dataType: \"json\",\n success: function (data){\n \n $(target).append('<a href=\"planets.html\">'+ data.name + '</a>');\n }\n });\n}", "title": "" } ]
[ { "docid": "cd67b351878fc4706a2c69cf3a08e1c1", "score": "0.90570015", "text": "function getName() {\n\treturn planet.name;\n}", "title": "" }, { "docid": "a6adfe0faaef1a5702a4ba1f927eb5a9", "score": "0.76837444", "text": "function getPlanetName(id){\n var name;\n switch(id){\n case 1:\n name = 'Mercury'\n break;\n case 2:\n name = 'Venus'\n break;\n case 3:\n name = 'Earth'\n break;\n case 4:\n name = 'Mars'\n break;\n case 5:\n name = 'Jupiter'\n break;\n case 6:\n name = 'Saturn'\n break;\n case 7:\n name = 'Uranus'\n break;\n case 8:\n name = 'Neptune'\n }\n \n return name;\n}", "title": "" }, { "docid": "f44500ead79ddb9a0c07480d59567008", "score": "0.75356257", "text": "function getPlanetName(id){\n switch(id){\n case 1:\n return 'Mercury'\n case 2:\n return 'Venus'\n case 3:\n return 'Earth'\n case 4:\n return 'Mars'\n case 5:\n return 'Jupiter'\n case 6:\n return 'Saturn'\n case 7:\n return 'Uranus'\n case 8:\n return 'Neptune'\n }\n}", "title": "" }, { "docid": "58c2c6f5b77c42aeb8b315177acd193e", "score": "0.7227823", "text": "function showPlanetName(name)\n\t{\n\t\tshowDiv(\"planetName\");\n\t\tdocument.getElementById(\"planetName\").innerHTML = name;\n\t}", "title": "" }, { "docid": "b147abe68db096c120d3bd26371aae8b", "score": "0.7055389", "text": "function drawPlanetName(planet_ref,planet_name){\n fill(220,220,220);\n textFont(myFont);\n textSize(14);\n textAlign(CENTER);\n push();\n translate(windowWidth/2 + offset_x + planet_ref.xPosition(),windowHeight/2 + offset_y + planet_ref.yPosition()-14);\n scale(1/scale_factor);\n text(planet_name,0,0);\n pop();\n}", "title": "" }, { "docid": "fae2ccfae85d3a4b773d1cd4df57ed7f", "score": "0.6385482", "text": "getAgeDescription (planet) {\n const planetStr = planet[0].toUpperCase() + planet.slice(1);\n return `On ${planetStr} your age is ${this.getAge(planet)}`;\n }", "title": "" }, { "docid": "1d885df0c28e173fbd33b094b816a911", "score": "0.63547355", "text": "function logPlanetInfo(planet) {\n var message = planet.name + ' is ' + planet.distance + ' million miles from the sun.';\n console.log(message);\n}", "title": "" }, { "docid": "00fe1235492267e58fd933ebbb8e6aec", "score": "0.6289692", "text": "function PlanetPrediction (planetName:String, time:int){\n\tfor(var i:int; i<planet.length; i++){\n\t\tif(planet[i].name == planetName){\n\t\t\tvar predictedPosition = CalculateEllipsePosition(apoapsis[i], periapsis[i], eccentricity[i],inclination[i], sunPosition, angularVelocity[i], time);\n\t\t\treturn predictedPosition;\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "ed6eedbc65e77c4dec0e83020f3d80bd", "score": "0.6201534", "text": "function getPetName() {\n\tconst petName = 'Hal';\n\treturn petName;\n}", "title": "" }, { "docid": "cc92885970db0cf9fa8ab5077c665d66", "score": "0.61888057", "text": "function getName() {\n return 'Kalyani'\n}", "title": "" }, { "docid": "7192a0cdfbc96599f1551f92bcbdbfaa", "score": "0.61771363", "text": "function DOMManipulation(planets){\n\n //setting the name\n document.getElementById(\"planetName\").innerHTML = planets[0].name;\n \n console.log(planets);\n\n\n}", "title": "" }, { "docid": "b24019ebddbf5a926bfdb0de72c0b66f", "score": "0.61745554", "text": "function findPlanet(planet, cleanCombined) {\n for (let element of cleanCombined) {\n if (element.planet.toLowerCase() === planet.toLowerCase()) {\n if (element.people.length === 0) {\n return \"No famous people from this plant\";\n }\n return element.people;\n }\n }\n return \"Try planets in this universe\";\n}", "title": "" }, { "docid": "215835e235fa486d1292b3b59e0384e3", "score": "0.6105914", "text": "getName() { }", "title": "" }, { "docid": "bbe8ec8c2f3836e7ed06388f5c01aff5", "score": "0.60947186", "text": "function getName() {\n return \"Rahmat\";\n}", "title": "" }, { "docid": "512a61a188f5a575a1bf53312e25cced", "score": "0.6083205", "text": "function getName() {\n\treturn \"Jose Luis\";\n}", "title": "" }, { "docid": "1a6d019043739b79f135e5a13b63b0b6", "score": "0.6044633", "text": "function getName() { return name; }", "title": "" }, { "docid": "6d4ca2a9b21cc0448b72323345ffe461", "score": "0.60429317", "text": "function getPlanetNameAndClimate(planetId){\n if (planetId > 0 && planetId <= 60){\n return fetch(`https://swapi.co/api/planets/${planetId}/`)\n .then(resp => resp.json())\n .then(planet => {\n return {name: planet['name'], climate: planet['climate']}\n })\n }\n}", "title": "" }, { "docid": "88a0d06ee16d6f2af5c08fffb77f6893", "score": "0.59713185", "text": "getName() {}", "title": "" }, { "docid": "e850c40a39e159c5d66e96dcbe76dd88", "score": "0.59463435", "text": "function createPlanets(planet) {\n // Create a group to hold the moons\n planetsGroup[planet['id']] = new THREE.Object3D;\n planetsGroup[planet['id']].name = `group_${planet['id']}`;\n \n solarGroup.add(planetsGroup[planet['id']]);\n\n var spherePlanet = createAstro(planet['material'], planet['bump'], planet['radius'], planet['widthSegments'], planet['heightSegments'] );\n spherePlanet.name = planet['id'];\n spherePlanet.rotation.x = planet['angleRotation'];\n\n planetsGroup[planet['id']].add(spherePlanet);\n var angles = randomAround(planet['distanceSun']);\n planetsGroup[planet['id']].position.set(angles[0], 0, angles[1]);\n\n if(planet['moon'] > 0) {\n for(var i=0; i<planet['moon']; i++) {\n var sphereMoon = createAstro('moon_1024.jpg', '', planet['radiusMoon'], planet['widthSegments'], planet['heightSegments']);\n var angles = randomAround(planet['distancePlanet']);\n sphereMoon.position.set(angles[0], 0, angles[1]);\n sphereMoon.name = `moon_${i}`;\n planetsGroup[planet['id']].add(sphereMoon);\n }\n }\n\n if(planet['rings'] > 0) {\n var geometry = new THREE.RingGeometry(planet['radius']+5, planet['radius']+10, 40 );\n var texture = new THREE.TextureLoader().load(`images/${planet['ringMaterial']}`);\n var material = new THREE.MeshPhongMaterial( { map: texture, side: THREE.DoubleSide });\n var ring = new THREE.Mesh(geometry, material);\n planetsGroup[planet['id']].add(ring);\n }\n}", "title": "" }, { "docid": "d8ec90f0b53493e78747fbc2bbf00030", "score": "0.5900538", "text": "async renamePlanet(target, planet_id, name) {\n return new Promise(async (resolve, reject) => {\n this.contracts.delegator.tx\n .renamePlanet({ value: unitsToPico(1), gasLimit: GAS_LIMIT }, target, planet_id, name)\n .signAndSend(this.alice, (result) => {\n if (result.status.isInBlock || result.status.isFinalized) {\n resolve();\n }\n });\n });\n }", "title": "" }, { "docid": "466b0d719e3b633d68209e6afb2104f5", "score": "0.5873565", "text": "get_plant_name() {\n\t\tif(this.props.plant == null) {\n\t\t\treturn \"loading\"\n\t\t} else {\n\t\t\treturn this.props.plant.plant_name\n\t\t}\n\t}", "title": "" }, { "docid": "9301dfd63166e363d1d7e98181ca7e75", "score": "0.5865299", "text": "function createPlanetHTML(planet) {\n return `<div class='card col-sm-11 col-md-9 col-lg-7 col-xl-6 m-auto'>\n <div>\n <img src='img/${planet.name}.jpg' alt='${planet.name}'>\n </div>\n <h2>${planet.name}</h2>\n <p>${planet.description}</p>\n <h3>Planet Profile</h3>\n <ul>\n <li><strong>Diameter:</strong> ${planet.diameter}\n <li><strong>Mass:</strong> ${planet.mass}\n <li><strong>Moons:</strong> ${planet.moons}\n <li><strong>Surface Temperature:</strong> ${planet.temp}\n <li><strong>Orbit Period:</strong> ${planet.orbitDays} days (${planet.orbitYears} years)</li>\n </ul>\n <p>${planet.facts}</p>\n \n <p class='lead mt-3 mb-0'id='nasaLink'><em>For more information on ${planet.name}, here's what <a href='https://solarsystem.nasa.gov/planets/overview/' target='_blank'>NASA</a> has to say</p>\n </div>\n <div class='container text-center'>\n <a class='btn btn-info w-40 mt-3' href='index.html' role='button'>Go back to planet selection</a>\n </div>`\n }", "title": "" }, { "docid": "e7e9549224213e9b831b43455bca10de", "score": "0.5844335", "text": "function displayPopupPlanet(tip, para) {\n var calculate = [false, false, true, false, false, false, false, false];\n var ind = tip.pIndex - 1;\n if (tip.pIndex < 4) { ind--; }\n calculate[ind] = true;\n var TD = para.T + para.dT;\n var planet, sun;\n if (highPrecCalInTips) {\n planet = planetGeoVSOP(TD, tip.object, true);\n sun = {\n rGeo: planet.dSunEarth,\n lam2000: planet.lamSun2000,\n bet2000: planet.betSun2000\n };\n } else {\n var planets = planetPos(TD, calculate);\n planet = planets[ind];\n sun = planets[2];\n }\n var rHelio = planet.rHelio,\n rGeo = planet.rGeo;\n // ra and dec wrt J2000\n var rad_to_deg = 180 / Math.PI,\n rad_to_hr = 12 / Math.PI;\n var ra2000 = convertDM(planet.ra2000 * rad_to_hr, \"hm\");\n var dec2000 = convertDM(planet.dec2000 * rad_to_deg, \"dm\");\n // Topocentric Ra and Dec\n var cosLat = Math.cos(para.lat);\n var sinLat = Math.sin(para.lat);\n var raDec, topo;\n var LST = para.LST;\n if (\"nu\" in para) {\n LST = para.LAST;\n raDec = precessed_ra_dec(planet.ra, planet.dec, para.nu);\n planet.ra = raDec.ra;\n planet.dec = raDec.dec;\n topo = topoCentricEquatorial(rGeo * 149597870.7,\n planet.ra, planet.dec,\n LST, sinLat, cosLat);\n } else {\n topo = topoCentricEquatorial(rGeo * 149597870.7,\n planet.ra, planet.dec,\n LST, sinLat, cosLat);\n }\n // Correct for aberration of light\n var aber = { ra: topo.raTopo, dec: topo.decTopo };\n if (\"nu\" in para) {\n var aberpara = {\n T: TD,\n m: para.nu,\n LAST: para.LAST,\n cosLat: cosLat,\n sinLat: sinLat\n };\n aber = aberration(topo.raTopo, topo.decTopo, aberpara);\n }\n var raTopo = convertDM(aber.ra * rad_to_hr, \"hm\");\n var decTopo = convertDM(aber.dec * rad_to_deg, \"dm\");\n var p = precession_matrix(TD, -TD);\n if (\"nu\" in para) {\n // Remove nutation from the topocentric position first\n var inv_nu = {\n p11: para.nu.p11,\n p12: para.nu.p21,\n p13: para.nu.p31,\n p21: para.nu.p12,\n p22: para.nu.p22,\n p23: para.nu.p32,\n p31: para.nu.p13,\n p32: para.nu.p23,\n p33: para.nu.p33\n };\n raDec = precessed_ra_dec(topo.raTopo, topo.decTopo, inv_nu);\n // Now precessed to J2000.0\n raDec = precessed_ra_dec(raDec.ra, raDec.dec, p);\n } else {\n raDec = precessed_ra_dec(topo.raTopo, topo.decTopo, p);\n }\n var conNames = constellationAbbrNames();\n var conste = conNames[get_constellation(raDec.ra, raDec.dec)];\n var ra2000Topo = convertDM(raDec.ra * rad_to_hr, \"hm\");\n var dec2000Topo = convertDM(raDec.dec * rad_to_deg, \"dm\");\n // Elongation and fraction of planet illuminated\n var elongIllum = elongationPhase(planet, sun);\n var Elong = elongIllum.elongation;\n var illum = elongIllum.illuminated;\n // apparent magnitude\n var magPara = {\n object: tip.object,\n i: elongIllum.phaseAng,\n rHelio: rHelio,\n rGeo: rGeo,\n T: TD,\n planet: planet,\n sun: sun\n };\n var mag = planetMag(magPara);\n // angular size (arcsec)\n var ang1AU = {\n Mercury: 6.726865375887558,\n Venus: 16.68838398040351,\n Mars: 9.3468517633725,\n Jupiter: 192.785883944279362,\n Saturn: 160.579988754892298,\n Uranus: 69.938001009781189,\n Neptune: 67.897384309708713\n };\n var ang = ang1AU[tip.object] / rGeo;\n // Alt and Azimuth\n raDec = { ra: aber.ra, dec: aber.dec };\n var hor = ra_dec_to_alt_az(raDec, LST, cosLat, sinLat);\n var alt = (hor.alt + atmosphericRefraction(hor.alt, 101, 286)) * rad_to_deg;\n var azi = Math.atan2(hor.sinA, hor.cosA) * rad_to_deg + 180;\n alt = alt.toFixed(2) + \"&deg;\";\n azi = azi.toFixed(2) + \"&deg;\";\n // rise ans set\n var ra = [],\n dec = [];\n var T0 = TD - para.hours / 876600;\n calculate[2] = false; // no need to calculate the Sun's positions\n for (var i = 0; i < 25; i++) {\n planet = planetPos(T0 + i / 876600, calculate)[ind];\n ra[i] = planet.ra;\n dec[i] = planet.dec;\n }\n var tt = getTransitTime(para.LST0, para.lat, ra, dec, false);\n var Transit = tt.t + ' (' + tt.alt + ')';\n var alt1 = -0.009890199094634533; // -34' in radians\n var trs = getRiseSet(alt1, para.LST0, para.lat, ra, dec);\n var RiseSet = trs.rise + \" (\" + trs.azRise + \"), \" + trs.set;\n if (trs.rise == \"above\") {\n RiseSet = \"circumpolar\";\n }\n\n var tipText = \"#tip\" + para.loc + \"text\";\n var txt = \"<table>\";\n txt += '<tr><th colspan=\"2\">' + tip.object + '</th></tr>';\n txt += '<tr><td>Heliocentric Distance</td> <td>' + rHelio.toFixed(3) + ' AU</td></tr>';\n txt += '<tr><td>Geocentric Distance</td> <td>' + rGeo.toFixed(3) + ' AU</td></tr>';\n txt += '<tr><td>Angular Diameter</td> <td>' + ang.toPrecision(3) + '\"</td></tr>';\n txt += '<tr> <td>Elongation</td> <td>' + Elong + '</td></tr>';\n if (tip.pIndex < 5) {\n txt += '<tr><td>Illuminated</td> <td>' + illum + '</td></tr>';\n }\n txt += '<tr><td>Apparent Magnitude</td> <td>' + mag.toFixed(1) + '</td></tr>';\n txt += '<tr><td>Geocentric Ra, Dec (J2000)</td> <td>' + ra2000 + ', ' + dec2000 + '</td></tr>';\n txt += '<tr><td>Topocentric Ra, Dec (J2000)</td> <td>' + ra2000Topo + ', ' + dec2000Topo + '</td></tr>';\n if (\"nu\" in para) {\n txt += '<tr><td>App. Topo. Ra, Dec (of date)</td> <td>' + raTopo + ', ' + decTopo + '</td></tr>';\n txt += '<tr><td>Apparent Sidereal Time</td> <td>' + convertDM(para.LAST * 12 / Math.PI, \"hm\") + '</td></tr>';\n } else {\n txt += '<tr><td>Topocentric Ra, Dec (of date)</td> <td>' + raTopo + ', ' + decTopo + '</td></tr>';\n }\n txt += '<tr><td>Constellation</td><td>' + conste + '</td></tr>';\n txt += '<tr><td>Altitude, Azimuth</td> <td>' + alt + ', ' + azi + '</td></tr>';\n txt += '<tr><td>Rise (Azi), Set</td> <td>' + RiseSet + '</td></tr>';\n txt += '<tr><td>Upper Transit (Altitude)</td> <td>' + Transit + '</td></tr>';\n\n $(tipText).append(txt);\n}", "title": "" }, { "docid": "ca690e7b40470d05ab1fe2e125c09cb2", "score": "0.5838032", "text": "function Planet(name,distance,humans){\n this.name = name;\n this.distance = distance;\n this.humans = humans; \n}", "title": "" }, { "docid": "9491750648782461debca21dd2c445b4", "score": "0.58337724", "text": "function getName(){\n return\n {\n name: 'Natthakarn'\n };\n }", "title": "" }, { "docid": "67bcc2f3b98decc15e17aeb5daa30940", "score": "0.5815743", "text": "function helloWorld(planet) {\n console.log(this); \n return 'hi ' + planet//? \n}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "faaf766a6d380d37c6f2cdf21a0577c2", "score": "0.58149374", "text": "get name() {}", "title": "" }, { "docid": "67a03c5b9988a58ceedb7a97db20b45b", "score": "0.57993823", "text": "function GetName() {\n\treturn transform.gameObject.name;\n}", "title": "" }, { "docid": "ce49983ffbc9602fcfbd2f77db1d7c12", "score": "0.57803905", "text": "constructor(name,num) {\n this.name = name;\n this.planetNum = num;\n }", "title": "" }, { "docid": "ce49983ffbc9602fcfbd2f77db1d7c12", "score": "0.57803905", "text": "constructor(name,num) {\n this.name = name;\n this.planetNum = num;\n }", "title": "" }, { "docid": "4a7fa1f1c607ce824ddacbecd8857530", "score": "0.5773002", "text": "function InitPlanet(planet:GameObject, planetName:String, apo:float, peri:float, eccent:float,incl:float, sunPosition:Transform, angVel:float, rot:float,tag:String, timeStamp:int){\n\tvar planetPosition = CalculateEllipsePosition (apo, peri, eccent, incl, sunPosition, angVel, timeStamp);\n\tvar planetObject = Instantiate(planet,planetPosition, Quaternion.Euler(90,0,rot*timeStamp));\n\tplanetObject.name = planetName;\n\tplanetObject.gameObject.tag=tag;\n\tif(tag==\"Planet\"){\n\t\tstellarBody.Add(planetObject);\n\t}\n}", "title": "" }, { "docid": "2fd727a48f219f33a400ee42146c6dca", "score": "0.5768482", "text": "function getName() {\n return \"My name Azola\";\n}", "title": "" }, { "docid": "44b6df7fadad05f3cc3bdf647daf2ca3", "score": "0.5735834", "text": "function Planet(name, radius, posAngle) {\n 'use strict';\n this.name = name;\n this.radius = radius;\n this.posAngle = posAngle;\n}", "title": "" }, { "docid": "caa3ec81204c7b0e808b05b77165801b", "score": "0.57342345", "text": "function planetMag(para) {\n var i = para.i;\n var mag = 5*Math.LOG10E*Math.log(para.rHelio*para.rGeo);\n switch (para.object) {\n case \"Mercury\":\n mag += -0.6 + (((3.02e-6*i - 0.000488)*i + 0.0498)*i);\n break;\n case \"Venus\":\n if (i < 163.6){\n mag += -4.47 + ((0.13e-6*i + 0.000057)*i + 0.0103)*i;\n } else {\n mag += 0.98 -0.0102*i;\n }\n break;\n case \"Mars\":\n mag += -1.52 + 0.016*i;\n break;\n case \"Jupiter\":\n mag += -9.40 + 0.005*i;\n break;\n case \"Uranus\":\n mag += -7.19 + 0.002*i;\n break;\n case \"Neptune\":\n mag -= 6.87;\n break;\n case \"Saturn\":\n // this is from Astronomy on Personal Computer\n mag += -8.88 + 0.044*i;\n var deg_to_rad = Math.PI/180;\n var alp0 = (40.589 - 0.036*para.T)*deg_to_rad;\n var del0 = (83.537 - 0.004*para.T)*deg_to_rad;\n var cosAlp0 = Math.cos(alp0), sinAlp0 = Math.sin(alp0);\n var cosDel0 = Math.cos(del0), sinDel0 = Math.sin(del0);\n// var tmp1 = 30838057.5*para.T;\n// tmp1 -= 360*Math.floor(tmp1/360);\n// var W = (227.2037 + tmp1)*deg_to_rad;\n// var cosW = Math.cos(W), sinW = Math.sin(W);\n// var e1x = -cosW*sinAlp0 - sinW*sinDel0*cosAlp0;\n// var e1y = cosW*cosAlp0 - sinW*sinDel0*sinAlp0;\n// var e1z = sinW*cosDel0;\n// var e2x = sinW*sinAlp0 - cosW*sinDel0*cosAlp0;\n// var e2y = -sinW*cosAlp0 - cosW*sinDel0*sinAlp0;\n// var e2z = cosW*cosDel0;\n var e3x = cosDel0*cosAlp0;\n var e3y = cosDel0*sinAlp0;\n var e3z = sinDel0;\n var lam = para.planet.lam2000, bet = para.planet.bet2000;\n var Xgeo = para.planet.rGeo*Math.cos(bet)*Math.cos(lam);\n var Ygeo_ec = para.planet.rGeo*Math.cos(bet)*Math.sin(lam);\n var Zgeo_ec = para.planet.rGeo*Math.sin(bet);\n lam = para.sun.lam2000; bet = para.sun.bet2000;\n var X = Xgeo - para.sun.rGeo*Math.cos(bet)*Math.cos(lam);\n var Y_ec = Ygeo_ec - para.sun.rGeo*Math.cos(bet)*Math.sin(lam);\n var Z_ec = Zgeo_ec - para.sun.rGeo*Math.sin(bet);\n // convert to equatorial coordinates\n var cosEps = 0.917482139208287;\n var sinEps = 0.397776978008764;\n var Ygeo = cosEps*Ygeo_ec - sinEps*Zgeo_ec;\n var Zgeo = sinEps*Ygeo_ec + cosEps*Zgeo_ec;\n var Y = cosEps*Y_ec - sinEps*Z_ec;\n var Z = sinEps*Y_ec + cosEps*Z_ec;\n //var sx = Xgeo*e1x + Ygeo*e1y + Zgeo*e1z;\n //var sy = Xgeo*e2x + Ygeo*e2y + Zgeo*e2z;\n var sz = Xgeo*e3x + Ygeo*e3y + Zgeo*e3z;\n //var longI = Math.atan2(sy,sx);\n var absSinLatc = Math.abs(sz)/para.planet.rGeo;\n //sx = X*e1x + Y*e1y + Z*e1z;\n //sy = X*e2x + Y*e2y + Z*e2z;\n //var long_sun = Math.atan2(sy,sx);\n //var dlong = (long_sun - longI)/deg_to_rad;\n //var dlong_100 = 0.01*Math.abs(dlong-360*Math.floor((dlong+180)/360));\n mag += absSinLatc*(-2.6 + 1.25*absSinLatc);\n }\n return mag;\n}", "title": "" }, { "docid": "eb4c6436c452c868737253b38fe0d4af", "score": "0.5720524", "text": "function Planet(name){\n this.name = name;\n // other planets with which it is connected \n this.connection = [];\n this.checked = false; \n this.parent = null; \n\n this.getName = function () {\n return this.name;\n }\n\n}", "title": "" }, { "docid": "ac3eaa69920d810aa546a6f5b9253289", "score": "0.5683423", "text": "function myName(){\n return myName.georgia;\n}", "title": "" }, { "docid": "6e491b694d9ec2bc73effd17df6f20b7", "score": "0.56782585", "text": "function getName() {\n return name;\n }", "title": "" }, { "docid": "5fb8e2c9a91c151b8dfb15c75baf528d", "score": "0.5675586", "text": "function getPetName() {\n var petName = 'Bruno'\n return petName\n}", "title": "" }, { "docid": "bd22926e4ee8a9079366648878b09dc0", "score": "0.5668536", "text": "function getPetName() {\n var petName = 'Ceasar';\n return petName\n}", "title": "" }, { "docid": "cb7176f4149e64ca36ee8f9ea05e1bc4", "score": "0.56529903", "text": "function getPetName() {\n var petName = 'Hal';\n return petName;\n}", "title": "" }, { "docid": "d88a790a48956bc08ac1c71788a7362e", "score": "0.56023765", "text": "function getPlanetReference()\n\t{\n\t\treturn this.planet_reference.children[0];\n\t}", "title": "" }, { "docid": "c25c1c327aa650f7376feb3bbe60a4d7", "score": "0.5602034", "text": "function getName() {\n return name;\n }", "title": "" }, { "docid": "c25c1c327aa650f7376feb3bbe60a4d7", "score": "0.5602034", "text": "function getName() {\n return name;\n }", "title": "" }, { "docid": "a8aac52456301c3f561c3cc760a8c5ec", "score": "0.55872405", "text": "function getName() {\n return name;\n }", "title": "" }, { "docid": "08941d62ac0d890adf424141ed78efc8", "score": "0.55835205", "text": "function myName() {\n return getName();\n }", "title": "" }, { "docid": "8ddeb0df8728d3fd9386fd9b2086fb95", "score": "0.55666584", "text": "function planet(color, gas_giant, rings) {\n\t// We use this to refer to the object we are creating\n\t// This line sets the object's color property to the value supplied in the parameter\n\tthis.color = color;\n\t// We don't have to automatically assign properties from the parameters\n\t// In this case if the parameter gas_giant is true, we set the value to 'gas giant'\n\tif (gas_giant){\n\t\tthis.type = 'gas giant';\n\t}\n\telse {\n\t\tthis.type = 'terrestrial';\n\t}\n\tthis.rings = rings;\n}", "title": "" }, { "docid": "abf24536bfbebe8d5b15eec08f97bf21", "score": "0.55624694", "text": "function Planet(name, mass, Xvel, Yvel, color, size, Xpos, Ypos) {\n this.mass = mass;\n this.vel = [Xvel, Yvel];\n this.color = color;\n this.size = size;\n this.pos = [Xpos, Ypos];\n this.name = name;\n}", "title": "" }, { "docid": "a600e8458cf3b542d4366024456cee8d", "score": "0.5546332", "text": "function nameOfGlazing(glazing) {\n if (glazing === \"none\") return \"None\";\n if (glazing === \"sugarmilk\") return \"Sugar Milk\";\n if (glazing === \"vanillamilk\") return \"Vanilla Milk\";\n if (glazing === \"doublechocolate\") return \"Double Chocolate\";\n return \"\";\n}", "title": "" }, { "docid": "7d939c143a659b9883361edc6296f728", "score": "0.5531215", "text": "function addPlanetToPage(planetName) {\n // create a new element\n var planetElement = document.createElement(\"li\");\n planetElement.textContent = planetName;\n\n // Adding a class\n planetElement.classList.add(\"planet\");\n\n // add the new element to the page\n var planetListElement = document.querySelector(\".planets\");\n planetListElement.appendChild(planetElement);\n}", "title": "" }, { "docid": "3edd42ff0bdd3e6ec29504c1b02bc807", "score": "0.55249137", "text": "function getName() {\n let name = '';\n for (var i = 0; i < arguments.length; i++) {\n name += randomIndex(arguments[i]) + ' ';\n };\n return name;\n}", "title": "" }, { "docid": "b8477474382ea471663218e6baaf9cc9", "score": "0.550608", "text": "function generatePlanet(type = \"NORMAL\", planetSize = 200, tessellation = 60, minHeight = 1.0, maxHeight = 1.2) {\r\n return (type === \"NORMAL\")\r\n ? generateNormalPlanet(planetSize, tessellation, minHeight, maxHeight)\r\n : generateTilePlanet(type, planetSize, tessellation, minHeight, maxHeight);\r\n}", "title": "" }, { "docid": "acea9615ec393b3331a49de5dfd697d1", "score": "0.5493965", "text": "function Planet(radius, distance, orbitSpeed) {\n // Characteristics\n this.angle = random(TWO_PI);\n this.orbitSpeed = orbitSpeed;\n this.radius = radius;\n this.distance = distance;\n this.orbitingPlanets = [];\n this.v = createVector(0,0.1,1);\n this.v.mult(distance);\n var opt = random(0,1);\n // Behaviour\n this.spawnMoons = function(planets) {\n for (var i = 0; i < planets; i++) {\n var r = this.radius * 0.01;\n var d;\n var o;\n var opt = floor(random(0,2));\n if (opt === 0) {\n var d = random((this.radius + r)*2,(this.radius + r)*3);\n var o = 0.01;\n } else {\n var d = random((this.radius + r)*3.5,(this.radius + r)*4);\n var o = -0.005;\n }\n this.orbitingPlanets[i] = new Planet(r,d,o);\n }\n }\n this.orbit = function(){\n this.angle += this.orbitSpeed;\n for (var i = 0; i < this.orbitingPlanets.length; i++) {\n this.orbitingPlanets[i].orbit();\n }\n }\n this.show = function(){\n push();\n var v2 = new p5.Vector(1,0,1);\n var p = new p5.Vector();\n p = this.v.cross(v2);\n rotate(this.angle,[p.x,p.y,p.z]);\n translate(this.v.x,this.v.y,this.v.z);\n noStroke();\n sphere(this.radius,24,24);\n if(this.orbitingPlanets != null) {\n for (var i = 0; i < this.orbitingPlanets.length; i++) {\n this.orbitingPlanets[i].show();\n }\n }\n pop();\n }\n}", "title": "" }, { "docid": "be727f4cdb990d35d9e6a9932866ce40", "score": "0.54892164", "text": "function render_planet_data(planet, node_html){\n\tlet text_name = document.createElement(\"h3\");\n\tlet text_rotation_period = document.createElement(\"p\");\n\tlet text_orbital_period = document.createElement(\"p\");\n\tlet text_diameter = document.createElement(\"p\");\n\tlet text_climate = document.createElement(\"p\");\n\tlet text_gravity = document.createElement(\"p\");\n\tlet text_terrain = document.createElement(\"p\");\n\tlet text_surface_water = document.createElement(\"p\");\n\n\ttext_name.textContent = \"Name: \" + planet.name;\n\tnode_html.appendChild(text_name);\n\ttext_rotation_period.textContent = \"Rotation Period: \" + planet.rotation_period;\n\tnode_html.appendChild(text_rotation_period);\n\ttext_orbital_period.textContent = \"Orbital Period:\" + planet.orbital_period;\n\tnode_html.appendChild(text_orbital_period);\n\ttext_diameter.textContent = \"Diameter: \" + planet.diameter;\n\tnode_html.appendChild(text_diameter);\n\ttext_climate.textContent = \"Climate: \" + planet.climate;\n\tnode_html.appendChild(text_climate);\n\ttext_gravity.textContent = \"Gravity: \" + planet.gravity;\n\tnode_html.appendChild(text_gravity);\n\ttext_terrain.textContent = \"Terrain: \" + planet.terrain;\n\tnode_html.appendChild(text_terrain);\n\ttext_surface_water.textContent = \"Surface Water: \" + planet.surface_water;\n\tnode_html.appendChild(text_surface_water);\n}", "title": "" }, { "docid": "361a0f753043eefafcc36dcc3c6e4f37", "score": "0.5472087", "text": "function planetMag_astroOnPersonalComputer(para) {\n var io100 = 0.01*para.i;\n var mag = 5*Math.LOG10E*Math.log(para.rHelio*para.rGeo);\n switch (para.object) {\n case \"Mercury\":\n mag += -0.42 + io100*(3.8 - 2.73*io100 + 2*io100*io100);\n break;\n case \"Venus\":\n mag += -4.4 + io100*(0.09 + 2.39*io100 - 0.65*io100*io100);\n break;\n case \"Mars\":\n mag += -1.52 + 1.6*io100;\n break;\n case \"Jupiter\":\n mag += -9.4 + 0.5*io100;\n break;\n case \"Uranus\":\n mag -= 7.19;\n break;\n case \"Neptune\":\n mag -= 6.87;\n break;\n case \"Saturn\":\n mag -= 8.88;\n var deg_to_rad = Math.PI/180;\n var alp0 = (40.589 - 0.036*para.T)*deg_to_rad;\n var del0 = (83.537 - 0.004*para.T)*deg_to_rad;\n var cosAlp0 = Math.cos(alp0), sinAlp0 = Math.sin(alp0);\n var cosDel0 = Math.cos(del0), sinDel0 = Math.sin(del0);\n var tmp1 = 844*36525*para.T;\n tmp1 -= 360*Math.floor(tmp1/360);\n var tmp2 = 0.3*36525*para.T;\n tmp2 -= 360*Math.floor(tmp2/360);\n var W = (227.2037 + tmp1 + tmp2)*deg_to_rad;\n var cosW = Math.cos(W), sinW = Math.sin(W);\n var e1x = -cosW*sinAlp0 - sinW*sinDel0*cosAlp0;\n var e1y = cosW*cosAlp0 - sinW*sinDel0*sinAlp0;\n var e1z = sinW*cosDel0;\n var e2x = sinW*sinAlp0 - cosW*sinDel0*cosAlp0;\n var e2y = -sinW*cosAlp0 - cosW*sinDel0*sinAlp0;\n var e2z = cosW*cosDel0;\n var e3x = cosDel0*cosAlp0;\n var e3y = cosDel0*sinAlp0;\n var e3z = sinDel0;\n var lam = para.planet.lam2000, bet = para.planet.bet2000;\n var Xgeo = para.planet.rGeo*Math.cos(bet)*Math.cos(lam);\n var Ygeo_ec = para.planet.rGeo*Math.cos(bet)*Math.sin(lam);\n var Zgeo_ec = para.planet.rGeo*Math.sin(bet);\n lam = para.sun.lam2000; bet = para.sun.bet2000;\n var X = Xgeo - para.sun.rGeo*Math.cos(bet)*Math.cos(lam);\n var Y_ec = Ygeo_ec - para.sun.rGeo*Math.cos(bet)*Math.sin(lam);\n var Z_ec = Zgeo_ec - para.sun.rGeo*Math.sin(bet);\n // convert to equatorial coordinates\n var cosEps = 0.917482139208287;\n var sinEps = 0.397776978008764;\n var Ygeo = cosEps*Ygeo_ec - sinEps*Zgeo_ec;\n var Zgeo = sinEps*Ygeo_ec + cosEps*Zgeo_ec;\n var Y = cosEps*Y_ec - sinEps*Z_ec;\n var Z = sinEps*Y_ec + cosEps*Z_ec;\n var sx = Xgeo*e1x + Ygeo*e1y + Zgeo*e1z;\n var sy = Xgeo*e2x + Ygeo*e2y + Zgeo*e2z;\n var sz = Xgeo*e3x + Ygeo*e3y + Zgeo*e3z;\n var longI = Math.atan2(sy,sx);\n var absSinLatc = Math.abs(sz)/Math.sqrt(sx*sx+sy*sy+sz*sz);\n sx = X*e1x + Y*e1y + Z*e1z;\n sy = X*e2x + Y*e2y + Z*e2z;\n var long_sun = Math.atan2(sy,sx);\n var dlong = (long_sun - longI)/deg_to_rad;\n var dlong_100 = 0.01*Math.abs(dlong-360*Math.floor((dlong+180)/360));\n mag += absSinLatc*(-2.6 + 1.25*absSinLatc) + 4.4*dlong_100;\n }\n return mag;\n}", "title": "" }, { "docid": "f4a846fabb2e9f7254f77edf04d395ee", "score": "0.5453513", "text": "function planetPos(){\n var l, b, r;\n var values;\n\n //mercury\n values = Arguments.merCoordinates(ast.time);\n l = values[0]; b = values[1]; r = values[2];\n ast.mercuryLongitude = planetCoordinates(l, b, r, 'mer');\n\n //venus\n values = Arguments.venCoordinates(ast.time);\n l = values[0]; b = values[1]; r = values[2];\n ast.venusLongitude = planetCoordinates(l, b, r, 'ven');\n\n //Mars\n values = Arguments.marCoordinates(ast.time);\n l = values[0]; b = values[1]; r = values[2];\n ast.marsLongitude = planetCoordinates(l, b, r, 'mar');\n\n //Jupiter\n values = Arguments.jupCoordinates(ast.time);\n l = values[0]; b = values[1]; r = values[2];\n ast.jupiterLongitude = planetCoordinates(l, b, r, 'jup');\n\n //saturn\n values = Arguments.satCoordinates(ast.time);\n l = values[0]; b = values[1]; r = values[2];\n ast.saturnLongitude = planetCoordinates(l, b, r, 'sat');\n\n //uranus\n values = Arguments.uraCoordinates(ast.time);\n l = values[0]; b = values[1]; r = values[2];\n ast.uranusLongitude = planetCoordinates(l, b, r, 'ura');\n\n //neptune\n values = Arguments.nepCoordinates(ast.time);\n l = values[0]; b = values[1]; r = values[2];\n ast.neptuneLongitude = planetCoordinates(l, b, r, 'nep');\n\n //earth\n earthCoordinates();\n}", "title": "" }, { "docid": "fac30d9a1d8a503bb443c82cad71c8e2", "score": "0.5445167", "text": "function printName() {\n\treturn 'yash gupta';\n}", "title": "" }, { "docid": "8efc15e98675c3bd882a714004968c32", "score": "0.54406", "text": "ZonePlanet() {\n\t\tlet ai = new AIPlanetsObjective();\n\t\tai.ZonePlanet(this);\n\t\t}", "title": "" }, { "docid": "975654e9a13a795af4f1d7ad61eab60e", "score": "0.5438337", "text": "function drawPlanetOrbit(planet_ref){\n\tvar a = planet_ref.semi_major_axis;\n\tvar b = planet_ref.semi_minor_axis;\n\tvar N = planet_ref.asc_node_longitude;\n\tvar w = planet_ref.arg_perihelion;\n\tvar e = planet_ref.eccentricity;\n\tvar i = planet_ref.inclination;\n\tstroke(planet_ref.planet_color);\n\tnoFill();\n\tpush();\n\ttranslate(windowWidth/2 + offset_x,windowHeight/2+offset_y);\n\trotate((N+w));\n\tellipse(-a*e,0,2*a*cos(i),2*b)\n\tpop();\n\t\n}", "title": "" }, { "docid": "da04fa99a733977bf1d2b0c71231fd55", "score": "0.5405399", "text": "function capitalize(item) {\n var newPlanet = item.charAt(0).toUpperCase() + item.substr(1) ;\n return newPlanet;\n}", "title": "" }, { "docid": "7ffedec73462ff8032521da4acb9a594", "score": "0.5395092", "text": "checkNameAvailability(name){\n for (const key in this.planetList) {\n if (this.planetList.hasOwnProperty(key)) {\n let planetName = this.planetList[key].planet.inputs[PLANET('name').value];\n if (planetName == name){\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "90bad58b01b7c5924cd4027ecef979f6", "score": "0.53928745", "text": "function Planet(name,x,y,r,s,t,c, minX, maxX, minY, maxY){\n\tthis.planetName = name;\n\tthis.xC = x;\n\tthis.yC = y;\n\tthis.x = x;\n\tthis.y = y;\n\tthis.speed = s;\n\tthis.tAngle = t;\n\tthis.col = c;\n\tthis.minX = minX;\n\tthis.maxX = maxX;\n\tthis.minY = minY;\n\tthis.maxY = maxY;\n\tthis.radius = r;\n this.mass = r\n\tthis.bounceSet = [];\n\tthis.count = 0;\n this.startSpeed = s;\n}", "title": "" }, { "docid": "fd1a02c474b8f5aa610aa3cc014aee5d", "score": "0.538363", "text": "function printTable(planets) {\r\n for (const planet of planets) {\r\n table.innerHTML += `\r\n <tr>\r\n <td>${planet.name}</td>\r\n <td>${planet.gravity}</td>\r\n <td>${planet.climate}</td>\r\n <td>${planet.population}</td>\r\n </tr>\r\n `\r\n }\r\n}", "title": "" }, { "docid": "e0b4786d406e073a851448933cb8531d", "score": "0.53749055", "text": "function returnMyName() {\n return 'favio';\n}", "title": "" }, { "docid": "f6ed23d01c0395dff07c4e85569fff78", "score": "0.53696686", "text": "function makeName (org) {\n if (org.info.name === org.info.shortname) {\n return org.info.name;\n } else {\n return org.info.name + \" (\" + org.info.shortname + \")\";\n }\n}", "title": "" }, { "docid": "af5f3aedd51efd41f7cc8bf366bf1417", "score": "0.53662735", "text": "function getName(n) {\n if (typeof n === \"string\") {\n return n;\n }\n else {\n return n();\n }\n}", "title": "" }, { "docid": "69a4397f20c1c1b50b8c34d34882a8da", "score": "0.5363366", "text": "function characterName(nameObject) {\n switch(nameObject.race) {\n case 'Half-Orc':\n return \"Your name should be \" + nameObject.name;\n case 'Tiefling':\n return \"Your Abyssal name should be \" + nameObject.firstName + \" and your Virtue name should be \" + nameObject.virtue;\n default:\n return \"Your name should be \" + nameObject.firstName + \" \" + nameObject.surname;\n }\n }", "title": "" }, { "docid": "453a49a7612eb9933c07ef1e17a0b2c3", "score": "0.5335247", "text": "function getDisplayname(animal) {\n let num = (Math.floor(Math.random() * 10000) + 10000).toString().substring(1)\n let display = animal.replace(/\\s+/g, '-').toLowerCase() + \"-\" + num\n return display\n}", "title": "" }, { "docid": "cba42343d833b856fd7a2773802f639d", "score": "0.5327514", "text": "pName() {\n return this.Data.get('player.name', 'NoName')\n }", "title": "" }, { "docid": "10c3845e3cd3831d1c6615651b1fd89a", "score": "0.5318075", "text": "function selectplanet(event) {\r\n if (event.target.innerText === undefined) {\r\n props.changeplanets((prev) => [...prev, selectedplanet]);\r\n changeplanetselection(null);\r\n props.changerequestbody((prev) => {\r\n prev.planet_names[props.index] = null;\r\n return prev;\r\n });\r\n } else {\r\n props.planets.forEach((planet) => {\r\n if (planet.name === event.target.innerText) {\r\n props.changeplanets(\r\n props.planets.filter((item) => {\r\n return item.name !== event.target.innerText;\r\n })\r\n );\r\n props.changerequestbody((prev) => {\r\n prev.planet_names[props.index] = planet.name;\r\n return prev;\r\n });\r\n changeplanetselection(planet);\r\n changevehiclesdisplay(\"block\");\r\n }\r\n });\r\n }\r\n }", "title": "" }, { "docid": "abc04018bf9053bdd9b9895cce72ea2c", "score": "0.531474", "text": "function myName(){\n return \"Anggitri Sihombing\"\n}", "title": "" }, { "docid": "975e4b5b9a66b15dedb3d9938c751e91", "score": "0.53136575", "text": "function getName() {\n console.log('Himanshu');\n return 'Himanshu';\n}", "title": "" }, { "docid": "5ee565db8fc4210352e8dd40ce7c2093", "score": "0.53114784", "text": "function getFullName() {\n return `Israel ${lastName}`;\n}", "title": "" }, { "docid": "f8ad2013e359ecacc951814e982de7d1", "score": "0.529947", "text": "getName() {\r\n return \"Starting Point\";\r\n }", "title": "" }, { "docid": "75432d175c372fd95dd0294dc9dfca90", "score": "0.52976346", "text": "function nome (){\n return 'Beatriz'\n}", "title": "" }, { "docid": "16f2845fbf3e3a8b90ef0fbd5f86a79b", "score": "0.5292915", "text": "function getName(person) {\n return person.name;\n }", "title": "" }, { "docid": "155852200f471c4bd55aed72f8a4db20", "score": "0.52890384", "text": "function createOrbit(planet) {\n var curve = new THREE.EllipseCurve(\n 0, 0, // ax, aY\n planet['distanceSun'], planet['distanceSun'], // xRadius, yRadius\n 0, 2 * Math.PI, // aStartAngle, aEndAngle\n true, // aClockwise\n 0 // aRotation\n );\n var points = curve.getPoints( 100 );\n var geometry = new THREE.BufferGeometry().setFromPoints( points );\n var material = new THREE.LineBasicMaterial( { color : 0xffffff } );\n // Create the object to add to the scene\n var ellipse = new THREE.Line( geometry, material );\n ellipse.rotation.x = Math.PI / 2;\n solarGroup.add(ellipse);\n}", "title": "" }, { "docid": "cce1ef5f12f02b97ad4f8c9834a6a36c", "score": "0.52826273", "text": "function getTerritoryFullname(territory) {\n var territoryNumber = getTerritoryNumber(territory);\n if (territoryNumber == undefined || territoryNumber < 0 || territoryNumber > ccode_earth) {\n return undefined;\n }\n var idx = isofullname[territoryNumber].indexOf(' (');\n if (idx > 0) {\n return isofullname[territoryNumber].substr(0, idx);\n }\n return isofullname[territoryNumber];\n}", "title": "" }, { "docid": "cce1ef5f12f02b97ad4f8c9834a6a36c", "score": "0.52826273", "text": "function getTerritoryFullname(territory) {\n var territoryNumber = getTerritoryNumber(territory);\n if (territoryNumber == undefined || territoryNumber < 0 || territoryNumber > ccode_earth) {\n return undefined;\n }\n var idx = isofullname[territoryNumber].indexOf(' (');\n if (idx > 0) {\n return isofullname[territoryNumber].substr(0, idx);\n }\n return isofullname[territoryNumber];\n}", "title": "" }, { "docid": "5bc408e4b85ebec8aeeade3c80dc7be7", "score": "0.52791625", "text": "function car(carName) {\n switch (carName) {\n case \"Opel\": return \"Marca \" + carName + \" se produce in Germania.\";\n break\n case \"AlfaRomeo\": return \"Marca \" + carName + \" se produce in Italia.\";\n break\n case \"Renault\": return \"Marca \" + carName + \" se produce in Franta.\";\n break\n case \"Honda\": return \"Marca \" + carName + \" se produce in Japonia.\";\n break\n case \"Dacia\": return \"Marca \" + carName + \" se produce in Romania.\";\n break\n case \"Volga\": return \"Marca \" + carName + \" se produce in Rusia.\";\n break\n case \"Bentley\": return \"Marca \" + carName + \" se produce in Anglia.\";\n break\n default: return \"Marca este necunoscuta.\";\n }\n}", "title": "" }, { "docid": "ff6eb493439f6b333ba5cad0210a5483", "score": "0.52778816", "text": "function morning(name){\n return `Good morning ${name.toUpperCase()}`;\n}", "title": "" }, { "docid": "699843199fc0afd13a2c9a7e076b94d0", "score": "0.52765685", "text": "function getMyName() {\n //var myName = \"zerocaleb\";\n\treturn myName;\n}", "title": "" }, { "docid": "8f868cc90f85b9ab30e4e3a074fa145b", "score": "0.52763766", "text": "function selectPlanet() {\n planetselected = true;\n trackplanet = true;\n selectedplanetshortname = selectedplanet.name.replace(' planet', '');\n dist = calculateCameraDistance(selectedplanet.name);\n var pos = selectedplanet.position;\n camera.position.set(pos.x+dist, pos.y+(dist/10), pos.z);\n controls.update();\n camdistance = 1;\n camheight = 1;\n followPlanet();\n}", "title": "" }, { "docid": "238c6793c451e7a224a21abcdf3068b2", "score": "0.52624536", "text": "function getLegendTitle3() {\n switch (modeOfTravel) {\n case 'bicycle':\n return 'TO WORK IN CALGARY)';\n case 'drovealone':\n return 'TO WORK IN CALGARY)';\n case 'transit':\n return 'TO WORK IN CALGARY)';\n case 'walk':\n return 'TO WORK IN CALGARY)';\n case 'work_home':\n return 'HOME IN CALGARY)';\n case 'nowork':\n return 'IN CALGARY)';\n }\n}", "title": "" }, { "docid": "8ce2fe59b1e1fa0a1730aa2f4a6ea400", "score": "0.5259362", "text": "function Planete( planete,x,y,dist,planorb,nbsat ){\n \n // Call the super constructor.\n Corpsspatial.call(this,planete,x,y,dist,planorb,nbsat);\n \n // Store the name.\n this.inconstruction=true; \n this.centresolairex=x;\n this.centresolairey=y/2;\n this.cancelAnim=false; \n this.indice=0;\n var id=50;\n this.satellites =[];\n for (var s = 0;s<this.nbsat;s++)\n {\n //ici in ajoute un 0 pour nb de satellites, peu importe !!\n var sat = new Satellite(this,\"satellite\",0,0,0,0,id);\n id=id+250;\n this.satellites.push(sat);\n window.tableau.push(sat); \n \n }\n \n // Return this object reference.\n // return( this );\n \n }", "title": "" }, { "docid": "2b8c8f79d47a88e19681569c49a71c14", "score": "0.5259146", "text": "function planet_html(json, id)\n{\n\tvar title = \"Long press to edit\";\n\tif (json.name)\n\t{\n\t\ttitle = json.name;\n\t}\n\treturn '<div>' + title + '</div><div id=\"ident\" style=\"display:none;\">' + id +\n\t'</div>';\n}", "title": "" }, { "docid": "b6ae07cb04644481d35e46bf2667dfa0", "score": "0.5249891", "text": "function getPlanetWeight(planetName,Gs){\n planet = planetName;\n planetWeight = gravityCalc(Gs);\n // planetWeight = earthWeight * Gs;\n planetDropDown.value = planetName;\n returnMessage();\n updateView();\n}", "title": "" }, { "docid": "aca7bdd7add377cfd9aa85c1189237f1", "score": "0.52498823", "text": "getName() {\n return this.get(\"name\") || (this._target ? nameOf(classOf(this.getComputedType())) : \"\");\n }", "title": "" }, { "docid": "f4eac4d4448603bc8eea8fed78f490aa", "score": "0.52384317", "text": "function printName() {\n console.log(name);\n}", "title": "" }, { "docid": "a5bc1870815f2b01441f8866f462a1d1", "score": "0.52351487", "text": "function getPetName() {\n var petName = 'Mal'; \n return petName; \n}", "title": "" }, { "docid": "57d3520b6b8f84d5cd1d0790c429dc79", "score": "0.5225663", "text": "function getLegendTitle1() {\n switch (modeOfTravel) {\n case 'bicycle':\n return 'CYCLING TO WORK';\n case 'drovealone':\n return 'DRIVING ALONE TO WORK';\n case 'transit':\n return 'TAKING TRANSIT TO WORK';\n case 'walk':\n return 'WALKING TO WORK';\n case 'work_home':\n return 'WORKING FROM HOME';\n case 'nowork':\n return 'THAT ARE UNEMPLOYED';\n }\n}", "title": "" }, { "docid": "ecc025ee5571f994f57b23532ea32e77", "score": "0.52246994", "text": "function makePlanet (x, y, velocity, scale, image, type) {\n let Planet = {\n x: x,\n y: y,\n scale: scale,\n image: image,\n velocity: velocity,\n type: type,\n vx: () => Planet.velocity[0],\n vy: () => Planet.velocity[1],\n radius: () => Math.floor(Planet.scale / 2)\n }\n\n return Planet\n}", "title": "" }, { "docid": "b5838fe8b087455a76492110a41c8e67", "score": "0.5220353", "text": "function getLegendName(name){\n switch (name){\n case \"move\":\n return \"Moving\";\n break;\n case \"build\":\n return \"Building\";\n break;\n case \"search\":\n return \"Searching\";\n break;\n case \"break\":\n return \"Destroying\";\n break;\n case \"research\":\n return \"Researching\";\n break;\n default:\n return \"Other\"\n }\n}", "title": "" }, { "docid": "c2f23baa422df3ee9ea1a8ba7e6349e2", "score": "0.52128655", "text": "function planetCoordinates(l, b, r, planet){\n var t = ast.time/10;\n var lZero = 280.46645 + 36000.76983 * t + 0.0003032 * Math.pow(t,2); lZero = MyMath.fixDeg(lZero);\n var e = 0.016708617 - 0.000042037 * t - 0.0000001236 * Math.pow(t,2);\n var pi = 102.93735 + 1.71953 * t + 0.00046 * Math.pow(t,2);\n var m = 357.52910 + 35999.05030 * t - 0.0001559 * Math.pow(t,2) - 0.00000048 * Math.pow(t,3); m = MyMath.fixRad(m);\n var c = +(1.914600 - 0.004817 * t - 0.000014 * Math.pow(t,2)) * Math.sin(m)\n + (0.019993 - 0.000101 * t) * Math.sin(2 * m)\n + 0.000290 * Math.sin(3 * m);\n var xO = MyMath.fixRad(lZero + c);\n\n //put heliocentric position into the divs\n document.getElementById(planet + 'HL').innerHTML = 'L: ' + (Math.round(l * 1000) / 1000) + '°';\n document.getElementById(planet + 'HB').innerHTML = 'B: ' + (Math.round(b * 1000) / 1000) + '°';\n document.getElementById(planet + 'HR').innerHTML = 'R: ' + (Math.round(r * 1000) / 1000) + ' AU';\n\n var geo = toGeo(r, l, b, ast.earthR, ast.earthL, ast.earthB); // Geocentric position return d, x, y, z, newTime\n var d = geo[0]; //geocentric distance in AU\n var x = geo[1];\n var y = geo[2];\n var z = geo[3];\n var newTime = geo[4];\n\n //geo true Longitude\n var A = MyMath.radToDeg(Math.atan(y / x));\n if (x < 0){ A = A + 180;} //this is explained on page 7 \"the correct quadrant\"\n A = MyMath.fixDeg(A);\n\n //geo true Latitude\n var B = MyMath.radToDeg(Math.atan(z / Math.sqrt(Math.pow(x,2) + Math.pow(y,2))));\n\n //put geocentric position into the divs\n document.getElementById(planet + 'GL').innerHTML = 'L: ' + (Math.round(A * 1000) / 1000) + '°';\n document.getElementById(planet + 'GB').innerHTML = 'B: ' + (Math.round(B * 1000) / 1000) + '°';\n document.getElementById(planet + 'GR').innerHTML = 'Δ: ' + (Math.round(d * 1000) / 1000) + ' AU';\n\n //mean positions\n t = MyMath.jdToCent(ast.jD - newTime); //we calculate again with time correction\n\n var values;\n if (planet === 'mer'){ values = Arguments.merCoordinates(t);}\n else if (planet === 'ven'){ values = Arguments.venCoordinates(t);}\n else if (planet === 'mar'){ values = Arguments.marCoordinates(t);}\n else if (planet === 'jup'){ values = Arguments.jupCoordinates(t);}\n else if (planet === 'sat'){ values = Arguments.satCoordinates(t);}\n else if (planet === 'ura'){ values = Arguments.uraCoordinates(t);}\n else { values = Arguments.nepCoordinates(t);}\n l = values[0];\n b = values[1];\n r = values[2];\n\n geo = toGeo(r, l, b, ast.earthR, ast.earthL, ast.earthB);\n x = geo[1];\n y = geo[2];\n z = geo[3];\n\n //finally we will get the apparent positions\n A = MyMath.radToDeg(Math.atan(y / x));\n if (x < 0){ A = A + 180;}\n\n var ARad = MyMath.degToRad(A);\n B = MyMath.radToDeg(Math.atan(z / Math.sqrt(Math.pow(x,2) + Math.pow(y,2))));\n var BRad = MyMath.degToRad(B);\n\n var k = 20.49552;\n var deltaA = (- k * Math.cos(xO - ARad) + e * k * Math.cos(pi - ARad)) / Math.cos(BRad);\n deltaA = deltaA / 3600;\n var deltaB = - k * Math.sin(BRad) * (Math.sin(xO - ARad) - e * Math.sin(pi - ARad));\n deltaB = deltaB / 3600;\n\n A = A + deltaA + ast.nut; //apparent longitude\n B = B + deltaB;\n\n var alRad = MyMath.degToRad(A);\n var beRad = MyMath.degToRad(B);\n var obRad = MyMath.degToRad(ast.obl);\n document.getElementById(planet + 'AS').innerHTML = 'α: ' + MyMath.hMS(asc(alRad, beRad, obRad)); //apparent right ascension\n document.getElementById(planet + 'DC').innerHTML = 'δ: ' + MyMath.dMS(dec(alRad, beRad, obRad), true); //apparent declination\n\n return MyMath.fixDeg(A);\n}", "title": "" } ]
953cc2611566d6c2e7c70ec32dca80f2
This is an indicator function that can be called anytime to send alert to admin or on display to show all the ingredients that are running low on quantity;
[ { "docid": "bedaa5e032ddf7b145a08b9a90310218", "score": "0.7477062", "text": "sendAlertForLowRunningIngredients() {\n for (const [ingredient, availableQuantity] of this.#inventoryMap) {\n if (availableQuantity <= ingredient.thresholdAlertQuantity) {\n this.sendAlert(ingredient, availableQuantity);\n }\n }\n }", "title": "" } ]
[ { "docid": "c83d96a348aa47798d66c7dd352be4f4", "score": "0.714598", "text": "function lowInventory() {\n connection.query(\n 'SELECT * FROM products WHERE (stock_quantity) < 5',\n function (err, results) {\n // console.table(results);\n var table = new Table({ head: [chalk.blueBright(\"Item ID\"), chalk.magentaBright(\"Product Name\"), chalk.magentaBright(\"Price\"), chalk.magentaBright(\"Quantities\")] });\n for (var line of results) {\n var itemID = line.item_id;\n var itemName = line.product_name;\n var itemPrice = line.price;\n var itemQuant = line.stock_quantity;\n\n var object = [itemID, itemName, itemPrice, itemQuant]\n\n table.push(object)\n };\n console.log(chalk.bgMagenta.bold.whiteBright(\"\\n Products with Low Inventory \\n\"));\n console.log(\"\\n\" + chalk.whiteBright(table.toString()) + \"\\n\");\n inquirer.prompt({\n type: \"confirm\",\n name: \"moreAction\",\n message: \"Would you like to do something else?\"\n })\n .then((answers) => {\n if (answers.moreAction) {\n console.log(\"\\n\")\n initiateManager();\n } else if (!answers.moreAction) {\n console.log(\"\\nSee you next time! Have a Bamazon Day!\\n\");\n connection.end();\n process.exit(0);\n };\n });\n }\n );\n }", "title": "" }, { "docid": "912fa013dc1f78099065e503aa6844ea", "score": "0.71099025", "text": "function displayLowInventory() {\n\t// console.log('___ENTER displayLowInventory');\n\n\t// Construct the db query string\n\tqueryStr = 'SELECT * FROM Products WHERE ShoeQuantity < 100';\n\n\t// Make the db query\n\tconnection.query(queryStr, function(err, data) {\n\t\tif (err) throw err;\n\n\t\tconsole.log('Low Inventory Items (below 100): ');\n\t\tconsole.log('................................\\n');\n\n\t\tlet strOut = '';\n\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\tstrOut = '';\n\t\t\tstrOut += 'Item ID: ' + data[i].ItemID + ' // ';\n\t\t\tstrOut += 'Product Name: ' + data[i].ProductName + ' // ';\n\t\t\tstrOut += 'Department: ' + data[i].BrandName + ' // ';\n\t\t\tstrOut += 'Price: $' + data[i].Price + '\\n';\n\t\t\tstrOut += 'Quantity: ' + data[i].ShoeQuantity + '\\n';\n\n\t\t\tconsole.log(strOut);\n\t\t}\n\n\t \tconsole.log(\"---------------------------------------------------------------------\\n\");\n\n\t\t// End the database connection\n\t\tconnection.end();\n\t})\n}", "title": "" }, { "docid": "b02c580867310d193bd520aa932eb456", "score": "0.7088551", "text": "function insufficientQuantity() {\n console.log('-----------------------------------\\nSorry, we are either out of stock or have less than the quantity you have chosen!\\nPlease choose another item and/or quantity.\\n-----------------------------------');\n start();\n}", "title": "" }, { "docid": "905a3f86977d8d069fb0e2ffc4cbcde4", "score": "0.7086161", "text": "function lowInventory() {\n\tconnection.query(\"SELECT * FROM products WHERE stock_quantity<5;\", ( err, res ) => {\n\t\tif ( err ) throw err;\n\t\tif (res.length>0) {\n\t\t\tlet table = new Table({\n\t\t\t head: ['Item ID'.bold.cyan, 'Product Name'.bold.cyan, 'Price'.bold.cyan, 'Quantity available'.bold.cyan],\n\t\t\t colWidths: [10, 25, 10, 20]\n\t\t\t});\n\t\t\tfor ( let i = 0; i < res.length; i++ ) {\n\t\t\t\t\ttable.push([res[i].item_id, res[i].product_name, '$'+res[i].price, res[i].stock_quantity]);\n\t\t\t} \n\t\t\tconsole.log(table.toString());\n\t\t} else {\n\t\t\tconsole.log('There are no items to display')\n\t\t} \n\t\t\tnewAction();\n\t});\n}", "title": "" }, { "docid": "93f2aa55924c098b47901fd73d97065c", "score": "0.6964392", "text": "function lowInventory() {\n console.log(\"Displaying products with an inventory of less than 5 items... \\n\");\n connection.query(\"SELECT * FROM products WHERE STOCK_QUANTITY < 5\", [{\n\n }], (err, res) => {\n if (err) throw err;\n res.forEach(item => console.log(`\\n ${item.id} ${item.PRODUCT_NAME} QUANTITY: ${item.STOCK_QUANTITY}`));\n start();\n });\n}", "title": "" }, { "docid": "fa7160584280d5f21d1b4ed3ce2c649c", "score": "0.6923262", "text": "function displayLowInv() {\r\n\t\r\n\t// construct db query string\r\n\tqueryStr = 'SELECT * FROM products WHERE stock_quantity < 100';\r\n\r\n\t// make db query\r\n\tconnection.query(queryStr, function(err, data) {\r\n\t\tif (err) throw err;\r\n\r\n\t\tconsole.log('Low Inventory Items (below 100): ');\r\n\t\tconsole.log('................................\\n');\r\n\r\n\t\tvar strOut = '';\r\n\t\tfor (var i = 0; i < data.length; i++) {\r\n\t\t\tstrOut = '';\r\n\t\t\tstrOut += 'Item ID: ' + data[i].item_id + ' // ';\r\n\t\t\tstrOut += 'Product Name: ' + data[i].product_name + ' // ';\r\n\t\t\tstrOut += 'Department: ' + data[i].department_name + ' // ';\r\n\t\t\tstrOut += 'Price: $' + data[i].price + ' // ';\r\n\t\t\tstrOut += 'Quantity: ' + data[i].stock_quantity + '\\n';\r\n\r\n\t\t\tconsole.log(strOut);\r\n\t\t}\r\n\r\n\t \tconsole.log(\"---------------------------------------------------------------------\\n\");\r\n\r\n\t\t// End db connection\r\n\t\tconnection.end();\r\n\t})\r\n}", "title": "" }, { "docid": "10cadde5ac2a5a2fc4c8cefb7297a2e2", "score": "0.68750453", "text": "function viewLowInventory()\n{\n\tconnection.query(\"SELECT * FROM products\", function(err, result, fields) {\n\t\tif (err) throw err;\n\n\t\tvar anyLow = false;\n\t\t//Looks for the item the user wants in the database\n\t\tfor(i = 0; i < result.length; i++)\n\t\t{\n\t\t\t//If the item ID the user inputed matches one in the database\n\t\t\tif(result[i].stock_quantity < 5)\n\t\t\t{\n\t\t\t\tif(anyLow == false)\n\t\t\t\t{\n\t\t\t\t\tconsole.log(\"Low Inventory Products:\");\n\t\t\t\t}\n\t\t\t\tconsole.log(\"-------------------\");\n\t\t\t\tconsole.log(\"Item ID: \"+result[i].item_id);\n\t\t\t\tconsole.log(\"Product Name: \"+result[i].product_name);\n\t\t\t\tconsole.log(\"Dept. Name: \"+result[i].department_name);\n\t\t\t\tconsole.log(\"Price: $\"+result[i].price);\n\t\t\t\tconsole.log(\"Stock Quantity: \"+result[i].stock_quantity);\n\t\t\t\tanyLow = true;\n\t\t\t}\n\t\t}\n\n\n\t\t//If the item ID is invalid, say it's invalid\n\t\tif(!anyLow)\n\t\t{\n\t\t\tconsole.log(\"No Inventory Products Low\");\n\t\t}\n\n\t\t//Closes the connection to the database\n\t\tconnection.end();\n\t});\t\n}", "title": "" }, { "docid": "bd44c9b1971baf5654cefa795b6313b3", "score": "0.68401384", "text": "function lowInventory(){\n\n\tconnection.query(\"SELECT * FROM products WHERE StockQuantity < 10 ORDER BY StockQuantity ASC\", function(err, res){\n\n\t\tif (err) throw err;\n\n\t\tlogger();\n\t\t\n\t\tfor(q=0;q<res.length;q++){\n\n\t\t\tdisplayitem(q,res);\n\t\t\tline=\"\";\n\t\t}\n\n\t\tlogger();\n\n\t\tintro();\n\n\t});\n}", "title": "" }, { "docid": "aa4068dd6ac9f4ba5bdb282cd46efb90", "score": "0.683237", "text": "function viewLowInventory() {\n var query = \"SELECT * FROM products\";\n connection.query(query, function (err, res) {\n for (var i = 0; i < res.length; i++) {\n if (res[i].stock_quantity < 5) {\n\n console.log(\"\\nItem Number: \" + res[i].item_id + \"\\nProducts: \" + res[i].product_name + \"\\nDepartment: \" + res[i].department_name + \"\\nPrice: \" + res[i].price + \"\\nIn Stock: \" + res[i].stock_quantity + \"\\n\\n\");\n }\n }\n })\n}", "title": "" }, { "docid": "22bf57cf1f5d2c2f14ec4c498d24a38b", "score": "0.68004215", "text": "function lowInventory() {\n\n connection.query(\"SELECT product_name, stock_quantity FROM products WHERE stock_quantity < 6\", function (err, res) {\n if (err) throw err;\n\n if (!res.length) {\n console.log(\"\\nNO PRODUCTS CURRENTLY LOW ON INVENTORY\\n\");\n showMenu();\n } else {\n console.log(\"products with low inventory:\\n\");\n console.log(res);\n console.log(\"\\n\")\n showMenu();\n }\n })\n\n}", "title": "" }, { "docid": "73f65dd774b61ef25a91735caaeb0271", "score": "0.67754877", "text": "function lowInventory() {\n connection.query(\"select * from products where stock < 50\", function(\n err,\n res\n ) {\n if (err) throw err;\n // console.log(res);\n console.log(\"Welcome to Bamazon Manager Interface. Hail Satan.\");\n console.log(\n \"-----------------------------------------------------------------------\"\n );\n for (var i = 0; i < res.length; i++) {\n console.log(\n `ITEM ID:${res[i].id} ITEM NAME:${res[i].item} DEPARTMENT:${\n res[i].department\n } PRICE:$${res[i].price} STOCK:${res[i].stock}`\n );\n }\n start();\n });\n}", "title": "" }, { "docid": "f57722d37396a38e719bd3945c5b5410", "score": "0.67644244", "text": "function lowInventory() {\n conncection.query('SELECT itemID, productName , stockQuantity FROM ?? WHERE stockQuantity < 5', ['products'], (err, data) => {\n if (err) throw err;\n if (data.length > 0) {\n console.table(data)\n } else {\n console.log('No low inventory item has found!')\n }\n askAgain();\n })\n}", "title": "" }, { "docid": "c3fc3b5d13cbbce95f68a399c4246340", "score": "0.6742739", "text": "function lowInv() {\n connection.query(\n \"SELECT * FROM products WHERE stock_quantity<5\",\n function(err, res) {\n if (err) throw err;\n console.log(\"\\nItems with fewer than 5 remaining...\\n\");\n for (let i = 0; i < res.length; i++) {\n console.log(\"ID: \" + res[i].item_id + \", Name: \" + res[i].product_name + \", Price for Each: \" + res[i].price + \", # Available: \" + res[i].stock_quantity + \"\\n\");\n };\n begin();\n }\n );\n}", "title": "" }, { "docid": "37eeb0f76dfd206514de1aaf248202b0", "score": "0.67415184", "text": "function viewLow() {\n\tconnection.query('SELECT * FROM product WHERE stockQuantity < 15', function(err,rows,fields) {\n\t\tif (err) throw err;\n\t\tfor (var i = 0; i < rows.length; i++) {\n \t\tconsole.log(rows[i].itemID + \": \"+ rows[i].productName + \" || Price: $\" + rows[i].price + \" || Quantity: \" + rows[i].stockQuantity);\n \t\tconsole.log(\"---------------------------------------------------\");\n \t}\n\toptions();\n\t})\n}", "title": "" }, { "docid": "80aeae6a0253c990fc5bed1532d32d25", "score": "0.6740742", "text": "function queryLowInventory() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n console.log(\"item_id product_name price\");\n //console.log(\"------- --------------------------------- ------\");\n for (var i = 0; i < res.length ; i++) {\n if (res[i].stock_quantity < 5) {\n console.log(res[i].item_id + \" | \" + res[i].product_name + \" | \" + res[i].price + \" | \" + res[i].stock_quantity);\n }\n }\n console.log(\"-----------------------------------\");\n start()\n });\n}", "title": "" }, { "docid": "c747aed8c25719adbeb30993fa33c2ad", "score": "0.67181027", "text": "function viewLowInventory() {\n\t\tconnection.query('SELECT item_id, product_name, stock_quantity FROM products WHERE stock_quantity < 5', function(err, res){\n\t\t\tvar table = new Table({\n\t\t\t\thead: ['Product ID', 'Product Name', 'Quantity']\n\t\t\t});\n\t\n\t\t\tfor (var i =0; i < res.length; i++) {\n\t\t\t\ttable.push([res[i].item_id, res[i].product_name, res[i].stock_quantity])\n\t\t\t}\n\t\n\t\t\tconsole.log(table.toString());\n\t\n\t\t\twhatYouLikeToDo();\n\t\t})\n\t}", "title": "" }, { "docid": "6a5d8f09a110d29a22f437d79c4c9137", "score": "0.67164105", "text": "function viewLowInventory() {\n\tconnection.query(\n\t\t\"SELECT * FROM products WHERE stock_quantity <= 5\",\n\t\tfunction(err, res) {\n\t\t\tif (err) throw err;\n\t\t\tconsole.log(\n\t\t\t\t\"Here are all the products that have less than 5 in our inventory\"\n\t\t\t);\n\t\t\tconsole.table(res);\n\t\t\tmanageStore();\n\t\t}\n\t);\n}", "title": "" }, { "docid": "daaa0d1e85dd7848ec836bda9b64b906", "score": "0.6714529", "text": "function viewLowInv() {\n console.log(\"\")\n connection.query(\"SELECT * FROM products WHERE stock_quantity <= 5\", function (err, res) {\n if (err) throw err;\n // create a table for our items\n printTable(res)\n mainMenu()\n })\n}", "title": "" }, { "docid": "ba8a5a7bf05ed4057b3d00c4fcd48250", "score": "0.6711423", "text": "function lowQty() {\n console.log(\"ITEMS LOW ON STOCK\")\n // inquirer.prompt(questions).then(function (answer) {\n connection.query(\"SELECT * FROM products;\", function (err, res) {\n if (err) console.log(err);\n for (var i = 0; i < res.length; i++) {\n if (res[i].stock_qty < 6) {\n console.log(res[i].item_id + \" | \" + res[i].product_name + \" | \" + res[i].dept_name + \" | \" + res[i].stock_qty);\n }\n // else {\n // // if no stock is low\n // console.log(\"Sufficient stock available for all products\");\n // }\n }\n });\n}", "title": "" }, { "docid": "0129fbb83c7a19e28edf627376a32749", "score": "0.6672635", "text": "function lowInventory() {\n\n // Select all products from db\n let query = \"SELECT * FROM products\";\n\n connection.query(query, function(err, res) {\n if (err) throw err;\n\n // Create and style table constructor for \"cli-table3\"\n let table = new Table({\n head: [\n {hAlign: \"center\", content: \"Id:\".grey},\n {hAlign: \"center\", content: \"Item:\".grey}, \n {hAlign: \"center\", content: \"Department:\".grey}, \n {hAlign: \"center\", content: \"Price:\".grey}, \n {hAlign: \"center\", content: \"Stock\".grey}\n ],\n colWidths: [10, 40, 20, 10, 10],\n })\n\n // Iterate through products to determine if inventory count is lower than 5\n for (let i = 0; i < res.length; i ++) {\n if (res[i].stock_quantity < 5) {\n table.push(\n [\n {hAlign: \"center\", content: colors.white(res[i].item_id)}, \n {hAlign: \"left\", content: colors.cyan(res[i].product_name)}, \n {hAlign: \"center\", content: colors.yellow(res[i].department_name)}, \n {hAlign: \"center\", content: colors.green(\"$\" + res[i].price)}, \n {hAlign: \"center\", content: colors.magenta(res[i].stock_quantity)}\n ]\n );\n }\n }\n console.log(\"\\n\\n $ $ $ $ \".green + \" Bamazon Manager | Low Inventory \".white + \" $ $ $ $\\n\\n\".green);\n console.log(table.toString() + \"\\n\");\n managerPrompt(); \n });\n}", "title": "" }, { "docid": "fc7ed2a5e7835a7e9e3731f3e43381e5", "score": "0.66536915", "text": "function lowInventory() {\n console.log(\"Showing all products below 50 units...\");\n connection.query(\n \"SELECT product_name, stock_quantity FROM products WHERE stock_quantity < 50\",\n function(err, res) {\n console.log(\"Showing all Products with low inventory\");\n for (var i = 0; i < res.length; i++) {\n console.log(\n \"|| Product: \" + res[i].product_name +\n \"|| Available: \" + res[i].stock_quantity +\n \"---------------------------------------\"\n ); \n }\n runManager();\n });\n// function ends\n}", "title": "" }, { "docid": "98d9801d06ff8d0cf4c99ebe47bbcd6d", "score": "0.66511625", "text": "function viewLowInventory() {\n connection.query('SELECT item_id, product_name, stock_quantity,price from products where stock_quantity < 5', function(err, results, fields) {\n if (err) {\n console.log(err);\n } else {\n if (results.length == 0) {\n console.log(\"Inventory sufficient\");\n } else {\n console.table(results);\n\n }\n }\n });\n}", "title": "" }, { "docid": "24a8e2b6f656ccc0185e753caad18106", "score": "0.6648896", "text": "function viewLow() {\n connection.query('SELECT * FROM products WHERE stock_quantity < 5', function (error, results, fields) {\n if (error) throw error;\n for (var i = 0; i < results.length; i++) {\n console.log(`=======================================================================================\\nitem_id: ${results[i].item_id} \\nItem : ${results[i].product_name} \\nDepartment name: ${results[i].department_name} \\nPrice: ${results[i].price} \\nStock Quantity : ${results[i].stock_quantity}`);\n }\n });\n}", "title": "" }, { "docid": "6a0270c2750ddb036c304656d10ec171", "score": "0.66364205", "text": "function viewLowInventory() {\n shared.get(\"products\", function(products) {\n // filter the products array so that we only have items with a quantity less than 5\n products = products.filter((product) => {\n if (Number(product.stock_quantity) <= 5) {\n return product;\n }\n });\n shared.displayTable(products, [\"price\"]);\n shared.closeConnection();\n })\n}", "title": "" }, { "docid": "128b0e1fff0201401e2a38441a88aaa9", "score": "0.66339225", "text": "function lowInventory() {\n connection.query(\n 'SELECT * FROM products',\n function(err, response) {\n if (err) throw err;\n console.log('LOW INVENTORY ITEMS');\n for (i=0; i<response.length; i++) {\n if (response[i].stock_quantity < 5) {\n console.log('----------------');\n console.log('Product name: ' + response[i].product_name);\n console.log('Product ID: ' + response[i].id);\n console.log('Department: ' + response[i].department_name);\n console.log('Price: $' + response[i].price);\n console.log('Quantity in stock: ' + response[i].stock_quantity);\n }\n }\n }\n )\n}", "title": "" }, { "docid": "66eb67d5fc7f90592a91eda1a44796b9", "score": "0.663223", "text": "function viewLowStock() {\n\n // Select all products from products data base\n connection.query(\"SELECT * from products GROUP BY item_id HAVING stock_quantity <= 1\", function(err, res) {\n if (err) throw err;\n\n // Display CLI table with products\n // Create a table for CLI\n var table = new Table({\n head: ['ID', 'Product Name', 'Department', 'Price', 'Stock']\n , colWidths: [10, 20, 20, 10, 10]\n });\n\n // Push each row to CLI table\n for (i = 0; i < res.length; i++) {\n table.push([res[i].item_id, res[i].product_name, res[i].department_name, \"$\" + res[i].price, res[i].stock_quantity]);\n }\n\n // Display table to CLI\n console.log(table.toString() + \"\\n\");\n\n // Start the next function here to make question display on bottom of CLI\n giveOptions();\n });\n }", "title": "" }, { "docid": "75ce742ab57d734888a66897106ad68c", "score": "0.6631202", "text": "function lowInventory() {\n conn.query('SELECT * FROM products WHERE stock_quantity < 5', function (err, res) {\n if (err) throw err;\n\n if (!res.length) {\n console.log('\\nNo products at low inventory levels.\\n');\n conn.end();\n } else { \n console.log('\\n');\n console.table(res);\n start();\n }\n });\n}", "title": "" }, { "docid": "32b84d9d1876cff80486935d7d8129cf", "score": "0.66289365", "text": "function fnViewLowInventory(){\n\t\tmysql.getConnection(function(err, conn){\n\t\t if (err) throw err;\n\t\t var sql = \"SELECT * FROM products WHERE stock_quantity < 200\";\n\t\t conn.query(sql, function (err, result) {\n\t\t if (err) throw err;\n\t\t console.table(result);\n\t\t if(conn){\n\t\t\t \tconn.release();\n\t\t\t \tmysql.end();\n\t\t\t \t\n\t\t\t}\n\t\t\t});\n\n\t\t});\n\t}", "title": "" }, { "docid": "6128aba60b29ce350a85cd7b6ff0b886", "score": "0.66189283", "text": "function viewLowInventory(){\n var query = \"SELECT * FROM products WHERE stock_quantity < 5\"\n connection.query(query, (err, result) => {\n if(err) throw err;\n for(var i = 0; i < result.length; i++){\n console.log(`ID: ${result[i].productID} || Name: ${result[i].product_name} || Department: ${result[i].department_name} || Price: ${result[i].price} || Quantity: ${result[i].stock_quantity}`)\n }\n displayOptions();\n })\n}", "title": "" }, { "docid": "9c4156d097e6ea20a513bcf8cb74b95b", "score": "0.66128355", "text": "function displayLowInventory() {\n con.query(\"SELECT * FROM products WHERE stock_quantity <= 5\", function(err, resp){\n\n console.log(\"Here are all the products that are almost sold out:\")\n prettyDisplay(resp);\n // Return to menu\n mainMenu();\n });\n}", "title": "" }, { "docid": "498007026f439eb2778875b99ce4871b", "score": "0.6607509", "text": "function viewLowInv() {\n var query = \"SELECT * FROM products WHERE stock_quantity <= 5\";\n\n connection.query(query, function(err, res) {\n if (res.length > 0) {\n for (var i = 0; i < res.length; i++) {\n console.log(\"\\n\" + res[i].item_id + \" | \" + res[i].product_name + \" | \" + res[i].department_name + \" | \" + res[i].price + \" | \" + res[i].stock_quantity);\n console.log(\"-----------------------------------\");\n }\n } else {\n console.log(\"No products with low stock.\");\n }\n })\n go();\n}", "title": "" }, { "docid": "c6194822301ce08445bae9e121be2f7b", "score": "0.65958506", "text": "function viewLowInv() {\n console.log(\"\")\n console.log(\"Viewing Low Inventory\")\n console.log(\"\")\n\n connection.query(\"SELECT * FROM products\", function(err, res) {\n\n for (var i = 0; i < res.length; i++) {\n\n if (res[i].stock_quanity < 5) {\n\n console.log(res[i].item_id + \" | \" + res[i].product_name + \" | \" + res[i].department_name + \" | \" + res[i].price + \" | \" + res[i].stock_quanity);\n \n }\n else {\n console.log(\"No Low Stock\")\n }\n }\n connection.end();\n }); \n}", "title": "" }, { "docid": "84974381a269ab7e65432a5ca2d14457", "score": "0.65927655", "text": "function lowInventory() {\n console.log(\"Viewing items with low inventory, with 5 or less units.\\n\");\n connection.query(\"SELECT * FROM items WHERE stock_quantity <= 5\", function(err, res) {\n if (err) throw err;\n console.table(res);\n connection.end();\n})}", "title": "" }, { "docid": "0dfc5d5c482fb4cccb58a91dd7b0a0f1", "score": "0.6592671", "text": "function displayLowInventory() {\n connection.query(\"SELECT * FROM products WHERE stock_quantity< 5\", function (err, results) {\n if (err) throw err; \n var table = new Table ({\n chars: {'top': '═', 'top-mid': '╤', 'top-left': '╔', 'top-right': '╗'\n , 'bottom': '═', 'bottom-mid': '╧', 'bottom-left': '╚', 'bottom-right': '╝'\n , 'left': '║', 'left-mid': '╟', 'mid': '─', 'mid-mid': '┼'\n , 'right': '║', 'right-mid': '╢', 'middle': '│'\n },\n head: [\"Id\", \"Product Name\", \"Price\", \"Quantity\"]\n });\n for (var i = 0; i < results.length; i++) {\n table.push([results[i].item_id, results[i].product_name, '$' + results[i].price, results[i].stock_quantity]);\n }\n console.log(chalk.blue(\"Low Inventory Products\"));\n console.log(table.toString());\n connection.end();\n });\n }", "title": "" }, { "docid": "e1a66163458567f49a4d5f34ec5c551d", "score": "0.6589177", "text": "function viewLowInventory() {\n\n\tvar lowTable = new Table({\n\t head: ['ITEM ID', 'PRODUCT NAME', 'PRICE', 'QUANTITY']\n\t});\n\n\tvar query = \"SELECT item_id, product_name, price,stock_quantity FROM products WHERE stock_quantity < 5\"\n\tconnection.query(query, function(err, res){\n\t\tif (err) throw err;\n\n\t\tfor (var i = 0; i<res.length; i++) {\n\t\t\tlowTable.push( [res[i].item_id, res[i].product_name, res[i].price, res[i].stock_quantity] );\n\t\t}\n\n\t\tconsole.log();\n\t\tconsole.log(chalk.blue(' BAMAZON LOW INVENTORY'));\n\t\tconsole.log(chalk.blue(' ~~~~~~~~~~~~~~~~~~~~~'));\n\t\tconsole.log(lowTable.toString());\n\t\tconsole.log();\n\t\tdisplayOptions();\n\t});\n}", "title": "" }, { "docid": "ab16d380c9029e53d8907fac4ec86ac4", "score": "0.6578563", "text": "function viewLowInventory(){\n connection.query(\"SELECT * FROM products WHERE stock_quantity<6\", function(error, res){\n if (error) throw error;\n for (var i = 0; i < res.length; i++){\n console.log(res[i].item_id + \" | \" + res[i].product_name + \" | Price: $\" + res[i].price + \" | Units left: \" + res[i].stock_quantity);\n }\n console.log(\"--------------------------------\");\n listManagerOptions();\n });\n}", "title": "" }, { "docid": "ce61dd3a1a3183cc685b3ddbb24685b8", "score": "0.6576189", "text": "function viewLow() {\n connection.query('SELECT * FROM bamazon.products WHERE stock_quantity < 5', function (err, results, fields) {\n console.table(results);\n prompt();\n });\n}", "title": "" }, { "docid": "614d70a05ad902ad2e98858058e830e8", "score": "0.65743464", "text": "function lowInventory(){\n connection.query(\n 'SELECT item_id, product_name, stock_quantity FROM products WHERE stock_quantity < 5',\n function(error, response){\n if (error) throw error;\n // Check in place in case there are no products with < 5 quantity\n if (response.length < 1){\n console.log('All products are sufficiently stocked.');\n } else {\n for (var i=0; i < response.length; i++){\n console.log(`Product name: ${response[i].product_name} | Product id: ${response[i].item_id} | Quantity in Stock: ${response[i].stock_quantity} \\n`);\n }\n }\n promptNextAction();\n }\n );\n}", "title": "" }, { "docid": "5a321eea1584994ff4e3f1c4f5106715", "score": "0.6565322", "text": "function viewLowInventory() {\n //query database to show all products with stock_quantity less than 5\n var query =\n \"SELECT * FROM products Group By item_id HAVING stock_quantity < 5\";\n connection.query(query, function(err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.log(\n \"Item ID: \" +\n res[i].item_id +\n \" || Product Name: \" +\n res[i].product_name +\n \" || Department Name: \" +\n res[i].department_name +\n \" || Price: \" +\n res[i].price +\n \" || Stock Quantity: \" +\n res[i].stock_quantity\n );\n console.log(\"-----------------------------------\");\n }\n runMenu();\n });\n}", "title": "" }, { "docid": "6262abcfdd3ef6120d9473ae625cd895", "score": "0.65326756", "text": "function viewLowInventory() {\n\tconnection.query(\"SELECT * FROM products\", function(err, res) {\n\t\tvar rows = [];\n\t\tdbResults = res;\n\t\tfor (i = 0; i < res.length; i++) {\n\t\t\tif (res[i].stockQuantity <= 5) {\n\t\t\t\trows.push([res[i].itemID, res[i].productName, res[i].price, res[i].stockQuantity]);\n\t\t\t}\n\t\t}\n\n\t\tvar t2 = Table(header,rows,\n\t\t{\n\t\t\tborderStyle : 1,\n\t\t\tpaddingBottom : 0,\n\t\t\theaderAlign : \"center\",\n\t\t\talign : \"center\",\n\t\t\tcolor : \"white\"\n\t\t});\n\t\tconsole.log(t2.render());\n\t\tappStart()\n\t});\n}", "title": "" }, { "docid": "3eb93b23bdb2ff04b513cb24735c8ff2", "score": "0.6515006", "text": "function viewLowInventory() {\n var query = \"SELECT * FROM products WHERE stock_quantity < 6\";\n connection.query(query, (err, data) => {\n if (err) throw err;\n printTable(data);\n });\n}", "title": "" }, { "docid": "9cd3fe43b72facfee23219a517e7e436", "score": "0.65015465", "text": "function lowInventory() {\n // A query to select only products where stock_quantity < 20\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 20\", function (err, results) {\n if (err) throw err;\n \n console.table(results);\n // Log the results of the query to the console in a table\n \n // Ask if the user wants to do anything else\n playAgain();\n })\n}", "title": "" }, { "docid": "f97e5e7fd41396dd903f7b2361c28d80", "score": "0.6501005", "text": "function lowInventory() {\r\n connection.query(\"SELECT * FROM products\", function(err, res) {\r\n\r\n console.log(\"------------------------------\");\r\n console.log(\"Here is the list of the low inventory items:\");\r\n console.log(\"------------------------------\");\r\n\r\n for (var i = 0; i < res.length; i++) {\r\n if (res[i].stock_quantity < 5) {\r\n console.log(res[i].id + \" | \" + res[i].product_name + \" | \" + res[i].price + \" | \" + res[i].stock_quantity);\r\n }\r\n };\r\n console.log(\"------------------------------\");\r\n console.log(\"Do you want to check out something else?\");\r\n console.log(\"------------------------------\");\r\n start();\r\n });\r\n}", "title": "" }, { "docid": "f603fb69950504385186d401df8df172", "score": "0.6495976", "text": "function lowInventory() {\n\n connection.query(\"SELECT * FROM products\", function(err, data) {\n if (err) throw err\n\n console.log(\"Here is your low inventory. Consider submitting a replenishment order.\\n\")\n for ( let i=0; i<data.length; i++ ) {\n\n if ( data[i].quantity <=5 ) {\n\n var itemID = data[i].item_id,\n productName = data[i].product_name,\n departmentName = data[i].department_name,\n price = data[i].price,\n quantity = data[i].quantity\n\n console.log(\"ID: \", itemID)\n console.log(\"Product: \", productName)\n console.log(\"Department: \", departmentName)\n console.log(\"Price: $\" + price)\n console.log(\"Quanitity Available: \", quantity, \"\\n\")\n\n } \n }\n //This prompt takes the manager into a new inventory order, or back to the main task prompt.\n inquire.prompt([\n {\n type: \"confirm\",\n name: \"lowInventoryOrder\",\n message: \"Would you like to order more inventory now?\"\n }\n ]).then( function(response) {\n\n console.log(\"\\n\")\n\n if ( response.lowInventoryOrder ) {\n newInventory()\n } else management()\n })\n })\n}", "title": "" }, { "docid": "0079067205d4fa89357c64eff205d9d9", "score": "0.6480132", "text": "function viewLowInventory() {\n connection.query('SELECT * FROM products WHERE stock_quantity < 5', function (err, res) {\n if (err) throw err;\n\n if (res.length > 0) {\n console.log(' ');\n console.log('~~~~~~~~~~~~~~~ Products with lower than 5 stock ~~~~~~~~~~~~~~~')\n console.log('----------------------------------------------------------------------------------------------------')\n\n for (var i = 0; i < res.length; i++) {\n console.log(\"ID: \" + res[i].item_id + \" | \" + \"Product: \" + res[i].product_name + \" | \" + \"Department: \" + res[i].department_name + \" | \" + \"Price: \" + res[i].price + \" | \" + \"QTY: \" + res[i].stock_quantity);\n console.log('--------------------------------------------------------------------------------------------------')\n }\n console.log(' ');\n start();\n } else {\n console.log(' ');\n console.log('There are currently no products with an inventory lower than 5.');\n console.log(' ');\n start();\n }\n });\n}", "title": "" }, { "docid": "e419a7b040075118ac9894ea49ef61d3", "score": "0.6472215", "text": "function lowStock() {\n con.query('SELECT * FROM products WHERE stock_quantity < 5', function (error, results) {\n if (error) throw error;\n console.log(\n \"|-------------------------|!!LOW INVENTORY!!|-------------------------|\" + \"\\n\"\n );\n for (var i = 0; i < results.length; i++) {\n console.log(\"ID: \" + results[i].item_id + \" | \"\n + \"Product: \" + results[i].product_name + \" | \"\n + \"Department: \" + results[i].department_name + \" | \"\n + \"Price: \" + results[i].price + \" | \"\n + \"Quantity \" + results[i].stock_quantity + \"\\n\");\n }\n home();\n });\n}", "title": "" }, { "docid": "d55d56b9b254a3f663abc73089dea019", "score": "0.6469878", "text": "function loadLowInventory() {\n // selects all products with qty <= 5\n connection.query(\"SELECT * FROM products WHERE stock_quantity <= 5\", function(err, res) {\n if (err) throw err;\n // draw a table in terminal\n console.table(res);\n managerMenuLoad();\n });\n}", "title": "" }, { "docid": "0b7c377eeaa6cc09230e3cec7bf130ab", "score": "0.6465288", "text": "function showQuantity() {\n\tconsole.log(\"\\n We have \" + itemsInStock + \" in stock.\")\n \n //select the quantity to purchase\n\t selectQuantityToPurchase();\n}", "title": "" }, { "docid": "6383ca6a0588c3e60169268fbd755f41", "score": "0.6461092", "text": "function lowInventory() {\n // Using cli-table's method to create a table (via constructor function). \n var table = new Table({\n head: ['ITEM ID', 'PRODUCT NAME', 'DEPARTMENT NAME', 'ITEM PRICE', 'QUANTITY AVAILABLE'],\n colWidths: [10, 50, 30, 20, 20]\n });\n // Querying mysql for the inventory data. \n connection.query('SELECT * FROM products', function(error, response) {\n if (error) throw error;\n console.log('=========================================================');\n console.log('We are low on the following products.');\n console.log('=========================================================');\n // looping through the array of objects from the response and pushing the values into the new table.\n for (var i = 0; i < response.length; i++) {\n // if the stock quantity is 3 or less, execute the code below. \n if (response[i].stock_quantity <= 3) {\n // Pushing only items with stock quantity count of 3 or less.\n table.push(\n [response[i].item_id, response[i].product_name, response[i].department_name, response[i].price, response[i].stock_quantity]\n );\n }\n }\n // Calling on cli-table's method to console-log the table. \n console.log(table.toString());\n welcomeBamManager();\n });\n}", "title": "" }, { "docid": "262343eb4feb17c6781d284be07e1802", "score": "0.64517874", "text": "function viewLowInv(){\n connection.query('select * from products having stock <= 5',\n function(err,res){\n if(err) throw err;\n for(var i = 0; i < res.length; i++){\n // console.log(res)\n console.log(`ID: ${res[i].id} | Product: ${res[i].product_name} | Department: ${res[i].department_name} | Price: ${res[i].price} | Stock: ${res[i].stock}`);\n console.log('')\n };\n managerDisplay();\n }\n )\n}", "title": "" }, { "docid": "a0cfe6954ac2132154e9eaa19b136899", "score": "0.64497215", "text": "function lowInventory() {\n //Starts query to DB for all products\n connection.query(\"SELECT * FROM products\", function (err, res) {\n if (err) throw err;\n\n //Empty array that will be used by console.table\n var displayArr = [];\n\n //ForEach goes through each result from the DB\n res.forEach(function (obj) {\n if (obj.stock_quantity <= 50) {\n //Makes a new empty object\n var product = {};\n\n //Adds values to the object\n product.ID = obj.item_id;\n product.Name = obj.product_name;\n product.Department = obj.dept_name;\n product.Price = obj.price;\n product.Quantity = obj.stock_quantity;\n\n //Pushes object to the displayArr\n displayArr.push(product);\n }\n })\n\n //Display product table in console\n console.log(\"\\n\");\n if (displayArr.length === 0) {\n console.log(chalk.blue(\"\\n============================================================\"));\n console.table(chalk.blue(\"There are no products with low inventory.\"));\n console.log(chalk.blue(\"============================================================\\n\"));\n\n\n } else {\n console.table(displayArr);\n }\n\n //Calls prompt function\n inquirer.prompt([\n {\n type: \"list\",\n name: \"next_action\",\n message: \"Would you like to add more inventory for an item?\",\n choices: [\"Yes\", \"No\", \"Exit\"]\n }\n ]).then(function (res) {\n var action = res.next_action;\n\n switch (action) {\n case \"Yes\":\n console.log(chalk.green(\"\\n============================================================\"));\n console.log(chalk.green(\"You chose to Add Inventory\"));\n console.log(chalk.green(\"============================================================\\n\"));\n addInventory();\n break;\n case \"No\":\n whatAction();\n break;\n case \"Exit\":\n console.log(chalk.green(\"\\n============================================================\"));\n console.log(chalk.green(\"You chose to Exit the Manager Program\"));\n console.log(chalk.green(\"============================================================\\n\"));\n process.exit();\n break;\n }\n })\n })\n}", "title": "" }, { "docid": "3b662817d66169c162b067c360f71300", "score": "0.6432836", "text": "function lowInv() {\n connection.query('SELECT * FROM products WHERE stock_quantity < 10',\n function (err, res, fields) {\n if (err) {\n console.log(err);\n }\n for (var i = 0; i < res.length; i++) {\n console.log(spacer);\n console.log(\"Item ID: \" + res[i].item_id + bf +\n \"Product: \" + res[i].product_name + bf +\n \"Department: \" + res[i].department_name + bf +\n \"Price: \" + res[i].price + bf +\n \"Stock: \" + res[i].stock_quantity +bf);\n console.log(spacer);\n };\n prompt();\n });\n}", "title": "" }, { "docid": "68727606f322cc82018a1004881574de", "score": "0.6428569", "text": "function lowInventory() {\n\treturn new Promise(function(resolve, reject) {\n\t\tconnection.query('SELECT * FROM products WHERE stock_quantity < 5', funciton(err, res) {\n\t\t\tif (err) reject(err);\n\t\t\tresolve(res);\n\t\t});\n\t}).then(function(result) {\n\t\tlogInventory(result);\n\t}).then(function() {\n\t\tenterManagerBama();\n\t\t//catch errors\n\t}).catch(function(err) {\n\t\tconsole.log(err);\n\t\tconnection.destroy();\n\t});\n}", "title": "" }, { "docid": "4264019d4225fdd3a0363d4a7f2208c1", "score": "0.64113533", "text": "function viewLowInventory() {\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 5\", function(err, res) {\n if (err) throw err;\n console.log(\"\");\n console.log(\"Items with Low Inventory Level: Reorder Soon!\");\n console.log(\"\");\n \n for(i = 0; i < res.length; i++) {\n console.log(\"Item ID: \" + res[i].item_id);\n console.log(\"Product Name: \" + res[i].product_name);\n console.log(\"Department Name: \" + res[i].department_name);\n console.log(\"Price: $\" + res[i].price);\n console.log(\"Stock Quantity: \" + res[i].stock_quantity);\n console.log(\"\");\n console.log(\"------------------------------------------------------------\");\n }\n console.log(\"\");\n console.log(\"\");\n startMenu();\n })\n}", "title": "" }, { "docid": "a6c016f124e7fbaa6724676c65b9652a", "score": "0.6410765", "text": "notify() {\n this.displayAntsQuantity();\n }", "title": "" }, { "docid": "b64a877efb71be36f6f614d9b626ca73", "score": "0.640445", "text": "function lowInventory() {\n var query = \"SELECT * FROM products WHERE stock_quantity < 5\";\n connection.query(query, function(err, res) {\n console.log(\"\\n===================================================\");\n for (var i = 0; i < res.length; i++) {\n console.log(\"Item ID: \" + res[i].item_id + \"\\nProduct: \" + res[i].product_name +\n \"\\nStock: \" + res[i].stock_quantity + \"\\n===================================================\");\n }\n returnQuestion();\n });\n}", "title": "" }, { "docid": "444f6ee4275279e17f352cef06b55339", "score": "0.6403947", "text": "function lowInventory() {\n var productlist = [];\n connection.query(\"SELECT * FROM products WHERE stock_qty < 3\", function(err, res) {\n if (err)\n throw err;\n for (var i = 0; i < res.length; i++) {\n productlist.push(res[i]);\n }\n console.table(productlist);\n menu();\n });\n}", "title": "" }, { "docid": "6e32941ea323a564d5532bdba57588e9", "score": "0.6396066", "text": "getLowInventory(productTable) {\n let lowInventory = productTable.filter((data) => data.stock_quantity < 10)\n this.displayProductTable(lowInventory);\n }", "title": "" }, { "docid": "78f0b1f26e4cfb8b503fa0ca740a6bca", "score": "0.6366538", "text": "function viewLowInventory(){\n connection.query(\"SELECT * FROM products WHERE stock_quantity<5\", function(err, res) {\n if (err) throw err;\n console.log('Inventory less than 5: ');\n // ---[ START ] --- [ Create table of items from database ] ----\n var header = ['id#','product','quantity in stock']; // price header not listed\n var table = new Table( { head: header } );// create new table everytime, else table is appended too long. Need to refresh/recreate to remove \"sold out\" if applicable \n for (var i=0; i <res.length; i++){\n table.push([res[i].id, res[i].product_name, res[i].stock_quantity]);// pushes row onto table\n }\n console.log(table.toString());\n // ---[ END ] --- [ Create table of items from database ] ---- \n managerView(); //recursively call inquirer for next choice \n }); // end of connection query\n}", "title": "" }, { "docid": "19de92184e76ac72510dd6999563f5ce", "score": "0.6366292", "text": "function viewLow(){\n connection.query(\"SELECT * FROM products WHERE stock_quantity <= 5\", function(err, res) {\n if (err) throw err; \n console.log(\"\\nItem Catalog (Filter: Quantity <= 5):\");\n printInv(res);\n afterConnection();\n })\n}", "title": "" }, { "docid": "ea494d2aacf970ec2d7da95d919e4d70", "score": "0.63647103", "text": "function viewInventory() {\n var query = \"SELECT * FROM products WHERE stock_quantity < 5\";\n getTable(query);\n setTimeout(promptManagerTask, 500);\n console.log(\"\\n\");\n}", "title": "" }, { "docid": "ac52fccfca0b261cd59cb8f6a29a1d04", "score": "0.6362624", "text": "function viewLowInventory()\n{\n // Read the items from the database\n var query = \"SELECT * FROM products WHERE stock_qty<5\";\n connection.query(query, function(err, res) {\n printResult(res);\n // end the database connection\n connection.end();\n });\n}", "title": "" }, { "docid": "dccdbdf4b8e080588b147094de232eb4", "score": "0.6346772", "text": "function displayLowInventory() {\n // construct the db query string\n queryStr = \"SELECT * FROM products WHERE stock_quantity < 5\";\n\n //make the db query\n connection.query(queryStr, function(err, data){\n if (err) throw err;\n\n console.log(\"Low Inventory Items (below 5): \");\n console.log(\"------------------------------\\n\");\n\n\n var strOut = \"\";\n for (var i = 0; i < data.length; i++) {\n strOut = \"\";\n strOut += 'Item ID: ' + data[i].item_id + ' // ';\n\t\t\tstrOut += 'Product Name: ' + data[i].product_name + ' // ';\n\t\t\tstrOut += 'Department: ' + data[i].department_name + ' // ';\n\t\t\tstrOut += 'Price: $' + data[i].price + ' // ';\n\t\t\tstrOut += 'Quantity: ' + data[i].stock_quantity + '\\n';\n\n\t\t\tconsole.log(strOut); \n }\n\n console.log(\"---------------------------------------------------------------------------------------------------\\n\");\n\n //end db connection\n connection.end();\n })\n}", "title": "" }, { "docid": "c0f886fc359730ba4df24a450ab52ff8", "score": "0.6303385", "text": "function viewLowInventory() {\n // Connect to the database and select all items available for purchase from the 'products' table\n connection.query(\"SELECT * FROM products\",\n function (err, res) {\n // Assign a variable to create a new CLI-Table\n var table = new Table({\n head: [\"Item ID\", \"Product\", \"Department\", \"Price\", \"Number in Stock\"],\n colWidths: [10, 30, 30, 20, 20]\n });\n // Check for errors\n if (err) throw err;\n // If no errors...\n // Assign variable to track whether there are any items with low inventory\n var counter = 0;\n // Iterate through the items in the products table\n res.forEach(function (row) {\n // Check if the quantity in stock of any item is less than 5\n if (row.stock_quantity < 5) {\n // If it is, increment the low inventory counter\n counter++;\n // Push all items with low inventory to CLI-Table\n table.push([row.id, row.product_name, row.department_name, row.price, row.stock_quantity]);\n }\n // Else, do nothing, because we're only concerned with items having a low inventory \n })\n // Check whether the low inventory counter is equal to 0\n // If it is...\n if (counter === 0) {\n // Inventory levels are good\n console.log(\"Our inventory levels are sufficient.\");\n // Re-Invoke viewProducts to display inventory which then invokes the displayManagerOptions function to present user with management action options\n viewProducts();\n }\n // Otherwise...\n else {\n // Log the table of items with low inventory to the 'manager'\n console.log(table.toString());\n // Invoke the displayManagerOptions function to present user with management action options\n displayManagerOptions();\n }\n });\n}", "title": "" }, { "docid": "89a01b255685907d2402abc8bd1e915a", "score": "0.6297197", "text": "function lowInventory() {\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 5\", function(err, inventory) {\n if (err) throw err;\n\n let table = new Table({\n head: ['Item ID', 'Product', 'Department', 'Price', 'Stock Quantity'],\n colWidths: [10, 68, 16, 10, 16],\n })\n\n for (let i = 0; i < inventory.length; i++) {\n table.push([inventory[i].item_id, inventory[i].product_name, inventory[i].department_name, \"$\" + inventory[i].price, inventory[i].stock_quantity]);\n }\n console.log(`\\n${table.toString()}\\n\\n`);\n })\n mainMenuPrompt();\n}", "title": "" }, { "docid": "02b321989c1f6c1789c892816917e65e", "score": "0.6291135", "text": "function viewInventory()\n{\n //console.log(\"Show products\");\n connection.query(\"SELECT item_id, product_name, price, stock_quantity FROM products WHERE stock_quantity < 5\", function(error, response) \n {\n if (error) \n throw error;\n\n console.log(\"\\n\");\n\n if (response.length == 0)\n {\n\n console.log(\"No products with low inventory\");\n loopIt();\n }\n else \n {\n console.table(response);\n inquirer.prompt([\n {\n type: \"confirm\",\n message: \"\\nAdd inventory?: \",\n name: \"confirm\",\n default: true\n }\n ]).then(function(qtyresponse) \n {\n if (qtyresponse.confirm)\n {\n let queryIt = \"SELECT item_id, product_name, price, stock_quantity FROM products WHERE stock_quantity < 5\"\n addInventory(queryIt);\n } \n else\n loopIt();\n });\n }\n });\n}", "title": "" }, { "docid": "20453084c566583226e52fd01149f832", "score": "0.6247575", "text": "function lowInventory() {\n var query = \"SELECT * FROM products WHERE stock_quantity < 5\";\n connection.query(query, function (err, res) {\n if (err) throw err;\n\n displayTable(res)\n });\n}", "title": "" }, { "docid": "c400e0b71dc4531fbad8ede9230bd312", "score": "0.621676", "text": "function viewLowInventory() {\n // Clear the terminal\n console.reset();\n let lowInventoryThreshold = 5;\n db.getLowInventory(lowInventoryThreshold)\n .then( res => {\n // Create product table (nested arrays) with npm 'table' package\n let products = [[`${blueBG} ID ${blackBG}`, `${blueBG} Low Inventory Products ${blackBG}`, `${blueBG} Price ${blackBG}`, `${blueBG} Qty ${blackBG}`]];\n res.forEach(product => {\n let tableRow = [];\n tableRow.push(product.item_id);\n tableRow.push(product.product_name);\n tableRow.push(`$` + `${product.price.toLocaleString('en', dollarsFormat)}`.padStart(11));\n tableRow.push(product.stock_quantity);\n // Add new row to products array\n products.push(tableRow);\n });\n let tableConfig = {\n columns: { 0: { alignment: 'right' }, 3: { alignment: 'right' } }\n }\n // Print *beautiful* table to the console\n console.log(`\\n`);\n let productTable = table(products, tableConfig);\n console.log(productTable);\n })\n .then(() => {\n // Return to initial prompt when complete\n return initialize();\n })\n .catch(err => { throw err });\n}", "title": "" }, { "docid": "92d904255e202d244eb3092d18757edf", "score": "0.6202319", "text": "function queryLowInv() {\n\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 5\", function (err, res) {\n if (err) throw err;\n // Log all results of the SELECT statement\n // console.log(res);\n displayProducts(res);\n askToContinue();\n\n });\n}", "title": "" }, { "docid": "7623e5e682ff7a72579649012f311103", "score": "0.6193132", "text": "function lowInventory() {\n// console.log(\"in global.lowInventory\");\n var query = \"SELECT d.department_name \\\n ,p.item_code \\\n ,p.product_name \\\n ,p.stock_qty \\\n FROM product as p \\\n JOIN department as d \\\n ON p.department_id = d.department_id \\\n WHERE p.stock_qty < 5 \\\n ORDER BY d.department_name, p.product_name\";\n connection.query(query, function(err, res) {\n if(err) throw err;\n console.table(res);\n main();\n })\n }", "title": "" }, { "docid": "2ae8972189f1d73b5f5be4fd968ae0d9", "score": "0.61895055", "text": "function lowInventory() {\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 1000 ORDER BY stock_quantity ASC\", function (err, res) {\n if (err) throw err;\n console.table(res);\n customerCommands();\n })\n}", "title": "" }, { "docid": "c12bb1323056bffdeb519edc39a0d059", "score": "0.61823356", "text": "function viewInventory() {\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 5\", function (err, res) {\n console.log(\"\\nHere is a list of all items with an inventory count lower than five:\\n\".yellow)\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n console.table(res[i].item_id + \" | \" + res[i].product_name + \" | \" + \"$\" + res[i].price + \" | \" + res[i].stock_quantity + \" items in stock\")\n }\n prompt();\n })\n}", "title": "" }, { "docid": "a715c350ff27e35a53425dce7ca7c610", "score": "0.61473894", "text": "function increaseQuantity() {\n if (quantity >= maxAvailable) {\n setMaxAlert(true);\n } else {\n setQuantity(quantity + 1);\n updateSubtotal(price, farmID);\n }\n }", "title": "" }, { "docid": "92a304a1aa2766509dd0a97ab671ba62", "score": "0.61436224", "text": "function viewLowInventory() {\n //queries the items in the database with a quantity less than 5\n connection.query(\"SELECT * FROM products WHERE stock_quantity < 5\", function (err, res) {\n if (err) { throw err }\n else {\n console.log(\"---------------------------------\");\n //prints all of the items\n for (var i = 0; i < res.length; i++) {\n console.log(\"ID: \" + res[i].item_id + \" || Name: \" + res[i].product_name + \" || Department: \" + res[i].department_name + \" || Price: \" + res[i].price + \" || Quantity: \" + res[i].stock_quantity);\n }\n console.log(\"---------------------------------\");\n //goes back to the menu when finished\n menu();\n }\n });\n}", "title": "" }, { "docid": "419b636e7dd1393ec58283b10e42a72c", "score": "0.610243", "text": "function viewLowInventory() {\n\n // Query for MySQL to show stock that has less than 500 in stock\n var query = 'Select * FROM products WHERE stock_quantity < 500';\n\n connection.query(query, function (err, res) {\n\n if (err) throw err;\n\n for (var i = 0; i < res.length; i++) {\n\n // Displays data in a table\n console.table([\n {\n ID: res[i].id,\n Product: res[i].product_name,\n Department: res[i].department_name,\n Price: res[i].price,\n Stock: res[i].stock_quantity,\n },\n ]);\n }\n });\n // Prompts user to go back to main menu or exit app\n inquirer.prompt([\n {\n name: 'stayOrExit',\n type: 'list',\n message: '\\n\\nWhich action would you like to take?\\n',\n choices: ['Go Back to Main Menu', 'Exit']\n }\n ]).then(function (answer) {\n\n // Creates variables for user's input\n var managerAnswer = answer.stayOrExit;\n\n // If statements to choose which function to run\n if (managerAnswer === 'Go Back to Main Menu') {\n // Calls function to prompt manager\n promptManager();\n }\n else {\n // Ends connection and shows good-bye message\n connection.end();\n console.log('\\n\\nGood-bye!');\n }\n })\n}", "title": "" }, { "docid": "983501a8bb46ba3c207ae83406b6b3b3", "score": "0.6100891", "text": "function onIncreaseClick(){\n var current_val = parseInt($(\"#quantity\").text());\n var item_code = parseInt($($(this).parents()[2]).children(\"#item_code\").val());\n var new_val = current_val + 1;\n // check if item is in dispenser\n if (isItemInDispenser(item_code)) {\n if (new_val <= original_quantity) {\n $(\"#quantity\").text(new_val);\n $(\"#main_alert_text\").css(\"visibility\", \"hidden\");\n } else {\n $(this).unbind(\"click\");\n $(\"#decrease\").unbind(\"click\");\n // if yes, try to lock and then see\n tryLockItem(item_code, function(response) {\n $(\"#increase\").bind(\"click\", onIncreaseClick);\n $(\"#decrease\").bind(\"click\", onDecreaseClick);\n if (response.error) {\n $(\"#main_alert_text #main_alert_sub\").text('Outlet connectivity issues');\n return;\n }\n\n if (response.available) {\n $(\"#quantity\").text(new_val);\n $(\"#main_alert_text\").css(\"visibility\", \"hidden\");\n } else {\n $(\"#main_alert_text #main_alert_sub\").text('Only ' + current_val + ' items present.');\n $(\"#main_alert_text\").css(\"visibility\", \"visible\");\n $(\"#quantity\").text(current_val);\n }\n });\n }\n } else {\n // if no , then increase no.\n $(\"#quantity\").text(new_val);\n $(\"#main_alert_text\").css(\"visibility\", \"hidden\");\n }\n}", "title": "" }, { "docid": "a16cb68687b10da1bd6db216f41305b9", "score": "0.60814816", "text": "function viewInventory(){\n\t\tconnection.query(\"SELECT * FROM products WHERE stock_quantity < 5\", function(err, res) {\n\t\t if (err) {\n\t\t \tconsole.log(err)\n\t\t }else{\n\n\t\t\t for(var i = 0; i < res.length; i++){\n\n\t\t\t \tconsole.log(\"ID :\" + res[i].item_id);\n\t\t\t \tconsole.log(\"Product name :\" + res[i].product_name);\n\t\t\t \tconsole.log(\"Category :\" + res[i].department_name);\n\t\t\t \tconsole.log(\"Price :\" + res[i].price);\n\t\t\t \tconsole.log(\"Available Quantity:\" + res[i].stock_quantity);\n\t\t\t \tconsole.log(\"====================================\")\n\t\t\t } \n\t\t\t}\n\n\t\t // viewProduct();\n\n \t\t});\t\t\n\t\tconnection.end();\n\n\t}", "title": "" }, { "docid": "cd44986c3f9320f605f6f5c25c5a7025", "score": "0.60807574", "text": "function viewLowInvent() {\n connection.query(\"Select * FROM products WHERE stock_quantity < 20\", function(err,results){\n if (err) throw err;\n var choiceArray = [];\n var choiceId = [];\n for (var i = 0; i < results.length; i++) {\n choiceId.push(results[i].item_id);\n var id = results[i].item_id;\n var name = results[i].product_name;\n var price = results[i].price;\n var quant = results[i].stock_quantity;\n // what the user will be given to choose from \n var string = \"Item Number: \" + id + \" Product: \" + name + \" Price: $\" + price + \" Quantity Remaining: \" + quant;\n choiceArray.push(string);\n }\n console.log(\"Product Selection:\");\n console.log(\"Items with low stock remaining\");\n console.log(\"------------------\"); \n console.log(choiceArray); \n restartView();\n }); \n}", "title": "" }, { "docid": "870d0c0b15727f6a234905c61a04c7a7", "score": "0.60750663", "text": "checkStock() {\n Object.entries(this.state.order).forEach((item) => {\n const quantity = item.quantity\n const id = item[0]\n if (this.state.products[id].count < quantity) {\n this.setState({ isInStock: false })\n return;\n }\n this.setState({ isInStock: true })\n })\n }", "title": "" }, { "docid": "3cd290b30c88adfa01cc34e777eed3d2", "score": "0.60647625", "text": "function viewLowInventory() {\n console.log(chalk.blue.bold(\"Selecting all relevant products...\" + \"\\n\"));\n\n var viewLowInventoryQuery = \"SELECT * FROM products \";\n viewLowInventoryQuery += \"WHERE stock_quantity <= 5\";\n\n connection.query(viewLowInventoryQuery, function(err, res) {\n if (err) throw err;\n\n //Logging response\n console.table(res);\n console.log(\"\\n\");\n\n //End connection\n connection.end();\n });\n}", "title": "" }, { "docid": "c9a12f0b029aad55b9395f37a65817df", "score": "0.6059303", "text": "function low_inventory(connection){\n\tvar query = 'SELECT id, product_name, price, stock_quantity FROM bamazondb.products WHERE stock_quantity < ' + 5;\n\tconnection.query(query, function(err, res){\n //display database contents \n\t\tfor (var i = 0; i < res.length; i++) {\n \tcl(' Product ID#: '+ coloring.bold(res[i].id) + ' | Product Name: ' + coloring.bold(res[i].product_name) \n + ' | Price: $' + coloring.bold(res[i].price) + ' | Stock: ' + coloring.bold(coloring.red(res[i].stock_quantity)));\n \tcl(coloring.green('---------------------------------------------------------------------------------------------------------'));\n \t}\n //call function for user to buy product and passing connection as parameter\n menu_options(connection);\n });\n}", "title": "" }, { "docid": "9761c568f39ff8bdc5898fddde46fde4", "score": "0.6022718", "text": "validateQuantity() {\n for (var i = 0; i < this.state.productQuantity.length; i++) {\n if (this.state.productQuantity[i] < this.state.itemss[i].quantity)\n this.setState({ notAvailable: \"Items not in stock. Try decreasing the quantity\" });\n }\n if (this.state.notAvailable !== 'Items not in stock. Try decreasing the quantity') {\n this.gotoSavePage();\n }\n this.setState({ productQuantity: [] });\n\n }", "title": "" }, { "docid": "42813962fe6baf9427844ba8f2b646af", "score": "0.6021902", "text": "function handleQuantityError() {\n console.log(\"can't go bellow 0 \");\n }", "title": "" }, { "docid": "572187979af9810adad31fe6c6e99040", "score": "0.59906936", "text": "function displayLowInventory() {\n queryText = \"SELECT * FROM bamazon_db.product_t \" +\n \" WHERE stock_quantity < 5 ORDER BY product_id\";\n connection.query(queryText,\n function (err, res) {\n if (err) {\n throw err;\n console.log(err);\n }\n console.log(\" \");\n console.log(\" \");\n productTable.length = 0;\n for (let i = 0; i < res.length; i++) {\n productTable.push(\n [res[i].product_id,\n res[i].product_name,\n currencyFormatter.format(res[i].price, {\n code: 'USD'\n }),\n res[i].stock_quantity\n ]\n );\n }\n console.log(productTable.toString());\n console.log(\" \");\n console.log(\" \");\n inquireForMoreManaging();\n });\n}", "title": "" }, { "docid": "c3a10475ae1b05011742b87b40c0c73e", "score": "0.5989996", "text": "function queryLowItems() {\n data = [];\n var lowthreshold = 5;\n connection.query(\"SELECT * FROM products WHERE stock_quantity<?\", [lowthreshold], function (err, res) {\n if (err) {\n throw err;\n }\n else {\n if (res.length === 0) {\n console.log(\"\\n\" + \"There are no quantities less than 5\" + \"\\n\");\n idInput();\n }\n else {\n for (var i = 0; i < res.length; i++) {\n var fordata = {\n \"item_id\": res[i].item_id,\n \"product_name\": res[i].product_name,\n \"department_name\": res[i].department_name,\n \"price\": res[i].price,\n \"stock_quantity\": res[i].stock_quantity\n }\n data.push(fordata)\n }\n var columns = columnify(data, {\n columns: ['item_id', 'product_name', 'department_name', 'price', 'stock_quantity']\n })\n //display results in clean format\n console.log(\"\\n\" + columns + \"\\n\")\n idInput();\n }\n }\n });\n}", "title": "" }, { "docid": "ca557e1848b47a4f474c6b8367b4355b", "score": "0.5945495", "text": "function onSummary(event) {\n event.preventDefault();\n // Montre le bloc\n $('.hide-summary').show();\n\n var idProduct = $(\"#productList\").val();\n // Ajax\n $.get(getRequestUrl() + \"/productdetail\", {id: idProduct}, function (data) // Data est ce qui est présent dans la BDD\n {\n try {\n // 1. ON charge le localStorage\n var cart = loadDataFromDomStorage('cart');\n\n // 2. Variable permettant de savoir si il y a un produit dans le panier\n var productFound = false;\n\n // 3. On fait les controle, les opération, qu'on met en variabl pour le traitement au point 6.\n data.quantityChosen = parseFloat($(\"#quantity\").val());\n\n // 4. Gestion des exceptions\n // Récupération des quantités en stock\n var quantityInStock = data.quantityInStock;\n console.log(\"nombre de quantité en stock : \" + quantityInStock);\n\n // A/ Quantité plus en stocks\n if (quantityInStock <= 0) {\n throw new BasketException(\"Il n'y a plus de quantité disponible pour ce produits\")\n }\n\n // B/ Quantités demandées négatives\n if (data.quantityChosen <= 0) {\n throw new BasketException(\"Il faut ajouter au moins un produit\");\n }\n\n // C/ Si les quantités commandés sont supérieures à celles en stock\n if (data.quantityChosen > quantityInStock) \n {\n throw new BasketException(\"Nous n'avons pas assez de produits disponibles en stock.\")\n }\n\n // 5. On créé un tableau vide\n // Si le panier est vide on initialise un tableau vide\n // (le localstorage retourne la valeur null s'il n'existe pas)\n if (cart == null) \n {\n cart = [];\n }\n // TODO / A corriger à partir d'ici\n // Rassembler les quantités des produits similaires\n for (var i = 0; i < cart.length; i++) \n {\n // Si le produit a été trouvé \n if(cart[i].id == data.id)\n {\n // On met à jour sa quantité\n cart[i].quantityChosen += data.quantityChosen;\n \n // On vérifie que la quantité totale n'excède pas le stock\n // On lance une exception si elle la dépasse\n if (cart[i].quantityChosen > data.quantityInStock)\n {\n throw new BasketException(\"La quantité est supérieure au stock !\");\n }\n\n // On prévient que le produit a été trouvé\n productFound = true;\n\n // Et on arrête de parcourir le tableau car on a trouvé ce que l'on cherchait\n break;\n }\n }\n\n // Si le produit n'a pas été trouvé on l'ajoute au panier\n if (!productFound)\n {\n //On vérifie que la quantité totale n'excède pas le stock\n //On lance une exception si elle la dépasse\n if (data.quantityChosen > data.quantityInStock)\n {\n throw new BasketException(\"La quantité est supérieure au stock\");\n }\n\n cart.push(data);\n }\n //On cache le message d'erreur (au cas où il aurait été affiché suite à une erreur)\n this.hideFromError();\n\n //On met à jour la liste des produits dans le localstorage\n saveDataToDomStorage('cart', cart);\n\n // On charge le tableau avec la liste des produits sur la page\n // Boucle permettant d'afficher toutes les infos dans le tableau récap\n loadCart(cart);\n\n }\n catch (exception) //Correspond à l'exception attrapée\n {\n\n // SI une erreur a été trouvée, on l'affiche dans un message d'erreur\n showFormError(exception.message);\n }\n\n }, \"json\");\n}", "title": "" }, { "docid": "8c6e0686978d154d920e5d64f823b886", "score": "0.5880946", "text": "function displayResult(userList, responseJson, quantity) {\n //hiding progress bar\n $('.progress-bar').addClass('hide');\n //declaring variable of each lists calorie\n const energy1 = responseJson.hints[0].food.nutrients.ENERC_KCAL * quantity;\n //declaring varaible of total calories \n let totalCalorie = 0;\n //adding items to STORE array\n STORE.push({ ingredient: userList, quantity: quantity, energy: energy1 });\n //manipulating DOM\n $('.result-screen-divdiv').append(\n `<tr class=\"result-list\">\n <td><p>${responseJson.hints[0].food.label}</p></li>\n <td><p>${quantity}</p></li>\n <td><p>${responseJson.hints[0].food.nutrients.ENERC_KCAL * quantity} kcal</p></li>\n </tr>`\n )\n //for each loop through the energy calorie of each lists\n STORE.forEach(function (STORE) {\n totalCalorie += STORE.energy;\n });\n $('.js-total-calories').text(`${totalCalorie}`);\n}", "title": "" }, { "docid": "1105573e583ed38e91dabc1056775d63", "score": "0.5877771", "text": "AddIngredient() {\n\t\t\tthis.recipe.ingredients.push({\n\t\t\t\tquantity: 0,\n\t\t\t\tmeasurement: \"\",\n\t\t\t\tname: \"\",\n\t\t\t\topt: \"\"\n\t\t\t});\n\t\t\tthis.ingredients++;\n\t\t\tthis.recipe.numberOfIngreds++;\n\t\t\tthis.topStatus = \"<p class=\\\"success\\\">Added ingredient.</p>\";\n\t\t}", "title": "" }, { "docid": "4ec155aee16c0f0a8cd6403a8d600af8", "score": "0.586689", "text": "function viewLowInv() {\n var table = new Table({\n head: ['Item Id', 'Product Name', 'Price','Quantity'],\n colWidths: [10,30,10,10]\n });\n connection.query(`SELECT * FROM products WHERE stock_quantity <= 5;`, function (err, res) {\n if (err) {\n console.log(err);\n } else {\n for (i = 0; i < res.length; i++) {\n \n table.push(\n [res[i].item_id, res[i].product_name,res[i].price,res[i].stock_quantity]\n \n );\n }\n console.log(table.toString());\n inquirer.prompt([{\n type: \"list\",\n name: \"choice\",\n message: \"What's Next\",\n choices: [\"Main Menu\", \"EXIT\"]\n }]).then(function (user2) {\n if (user2.choice === \"EXIT\") {\n connection.end();\n } else if (user2.choice === \"Main Menu\") {\n start();\n }\n });\n }\n\n});\n}", "title": "" }, { "docid": "0ec5abbc813633668bb2073498cf1151", "score": "0.58583313", "text": "function calculateInventoryUsage(){\n\t// kb 3042748 add Status bars and confirmation messages \n var grid = View.panels.get('abBldgopsReportPartsInvertoryGrid');\n View.openProgressBar(View.getLocalizedString(this.z_PROGRESS_MESSAGE)); \n\ttry {\n\t\tWorkflow.callMethod('AbBldgOpsBackgroundData-calculateWorkResourceValues-CalculateInventoryUsageForMPSL');\n\t\tView.closeProgressBar();\n\t\tView.alert(getMessage('calculateAlertMessage'));\n\t\tgrid.refresh();\n\t\tView.panels.get('abBldgopsReportPartsInvertoryStorageLocationGrid').show(false);\n\t}catch(e){\n\t\tWorkflow.handleError(e);\n\t\tView.closeProgressBar();\n\t\treturn;\n\t}\n}", "title": "" }, { "docid": "1dc0b6a8f4514185b55db8aa06219706", "score": "0.58508104", "text": "function checkQuantity(bobQuan, bobId) {\n connection.query(\"SELECT quantity FROM products WHERE id = ?\", [bobId], function (err, res) {\n if (err) throw err;\n \n\n if (parseInt(bobQuan) > parseInt(res[0].quantity)) {\n console.log(chalk.red(\"Not that many in stock, please be less greedy!!\"));\n\n }\n else {\n upDateQuantity(bobQuan, bobId);\n }\n\n\n connection.end();\n })\n\n\n\n}", "title": "" }, { "docid": "1bb1355b2292a55249517e5fd265c67a", "score": "0.58481145", "text": "function lowStock() {\n console.log(colors.bgYellow.red(\"\\nSorry, we do not have enough stock of that item, would you like to buy all \" + totalStock + \"\\nType Y/y for YES, or N/n for NO\\n\"));\n prompt.get(yesorno, function (err, result) {\n if ((result.All).toLowerCase() === \"y\") {\n buyingStock = totalStock;\n buyStock();\n return null;\n } else if ((result.All).toLowerCase() === \"n\") {\n buySomething();\n return null;\n } else {\n console.log(\"Please enter Y/y or N/n\");\n lowStock();\n return null;\n }\n });\n }", "title": "" }, { "docid": "7e6fbb53ab0a4658ab6ff207b062c817", "score": "0.5847651", "text": "function quantity() {\n\n}", "title": "" }, { "docid": "037f2764f278975355bfe09fcdc608a7", "score": "0.584719", "text": "function low() {\n \n //capture search query\n var queryStr = \"SELECT * FROM products WHERE stock_quantity < 50\";\n\n connection.query(queryStr, function(err, data) {\n if (err) throw err;\n\n console.table(data);\n\n connection.end();\n \n })\n}", "title": "" }, { "docid": "a44abcc6149618e4711906e75deb42ea", "score": "0.5846271", "text": "function showQuantity() {\n connection.query(\"SELECT id, quantity FROM products\", function (err, res) {\n if (err) throw err;\n for (let j = 0; j < res.length; j++) {\n console.log(\n \"Id: \" +\n res[j].id +\n \" || Quantity Available : \" +\n res[j].quantity +\n \"\\n===================================\"\n );\n }\n }); \n}", "title": "" }, { "docid": "b43e44cc0b1e8acece48a9330f503fbe", "score": "0.58274186", "text": "function handleLowInv() {\n if ($(this).is(':checked')) {\n table.children(\"tr\").remove();\n getProducts(null, true);\n } else {\n table.children(\"tr\").remove();\n getProducts();\n }\n }", "title": "" }, { "docid": "2061f3b25d3439c8fcc89482cb4dbcb4", "score": "0.57985777", "text": "function checkQuantity() {\n let totalBottle = 0;\n let totalMagnum = 0;\n let totalVracVolume = 0;\n\n $('#quantity-info-details').html('');\n\n $(':input[name^=\\'qty_\\']').each((index, elem) => {\n const bottleId = $(elem).attr('name').substring(4);\n\n if (\"bouteille\" === $(\"input[name='type_\" + bottleId + \"']\").val().toLowerCase()) {\n totalBottle += parseInt($(elem).val());\n }\n\n if (\"magnum\" === $(\"input[name='type_\" + bottleId + \"']\").val().toLowerCase()) {\n totalMagnum += parseInt($(elem).val());\n }\n\n if (4 < $(\"input[name='volume_\" + bottleId + \"']\").val()) {\n totalVracVolume += parseInt($(elem).val()) * $(\"input[name='volume_\" + bottleId + \"']\").val();\n }\n });\n\n const totalProduct = totalBottle + totalMagnum;\n const magnumModulo = totalMagnum % 3;\n const bottleModulo = totalBottle % 6;\n\n if ((12 <= (totalBottle + totalVracVolume) || 12 < totalVracVolume) && 0 === magnumModulo && 0 === bottleModulo) {\n updateDeliveryFees();\n $('#info-quantity').removeClass('fail-card');\n $('#info-quantity').addClass('success-card');\n $(\"#basket-validation-button\").removeClass('basket-button-disabled');\n $(\"#basket-validation-button\").addClass('basket-button');\n } else {\n hideDeliveryFees();\n $('#info-quantity').removeClass('success-card');\n $('#info-quantity').addClass('fail-card');\n $(\"#basket-validation-button\").removeClass('basket-button');\n $(\"#basket-validation-button\").addClass('basket-button-disabled');\n\n let detailsMessage = \"\";\n\n if (6 < totalBottle && 0 < magnumModulo) {\n const magnumLeft = 3 - magnumModulo;\n detailsMessage += \"Il manque \" + magnumLeft + \" magnum(s) pour compléter le carton.<br>\"\n }\n\n if (6 < totalProduct && 0 < bottleModulo) {\n const bottleLeft = 6 - bottleModulo;\n detailsMessage += \"Il manque \" + bottleLeft + \" bouteille(s) pour compléter le carton.<br>\"\n }\n $('#quantity-info-details').html(detailsMessage);\n }\n}", "title": "" }, { "docid": "c44f8a2d7bfc124c5d5224d01e86d273", "score": "0.57960945", "text": "function GetSupplystatusOfItems(nameOfItems, amountOfItems, materialsNeeded){\n var output = \"\";\n for(var k=0;k<materialsNeeded.length;k++){\n if(amountOfItems[k] >= materialsNeeded[k]){\n output += \"<p style='color:green'>\" + nameOfItems[k] + \" has a sufficient supply.</br>In bank/pattern needs: \" + amountOfItems[k] + \"/\" + materialsNeeded[k] + \"</p>\";\n }\n else{\n output += \"<p style='color:red'>\" + (nameOfItems[k] + \" does not have a sufficient supply</br>In bank: \" + amountOfItems[k] + \"</br>The pattern needs: \" + materialsNeeded[k]+ \"</br>Still need: \"+(materialsNeeded[k] - amountOfItems[k])).toUpperCase() + \"</p>\";\n }\n }\n return output;\n}", "title": "" }, { "docid": "72d37b2881c071cb8e3d82ff9a497148", "score": "0.57888526", "text": "function start() {\n inquirer\n .prompt({\n name: \"Item Id\",\n type: \"rawlist\",\n message: \"What is the id of the product you want?\",\n choices: [1000,1001,1002,1003,1004,1005]\n })\n .then(function(answer) {\n // based on their answer, either no quantity or quantity functions\n if (choices = 1000) {\n noQuantity()\n }\n else if (choices = 1001) {\n noQuantity()\n \n } else if (choices = 1002) {\n \tquantityIn()\n \n } else if ( choices = 1003) {\n \tquantityIn()\n \n } else if ( choices = 1004) {\n \t noQuantity()\n \t\n \t} else if ( choices = 1005) {\n \t\tnoQuantity()\n \t} \n \n });\n}", "title": "" }, { "docid": "8cffc391460ede11de469b040290c12d", "score": "0.5786121", "text": "function viewLowInventory() {\n var query = (\"SELECT * FROM Products WHERE stock_quantity < 5\");\n connection.query(query, function(err, res) {\n // Error Handler\n if(err) throw err;\n\n // Show User message\n console.log('Inventory for Items < 5 In Stock is below...\\n');\n console.log(' ID | Product Name | Department Name | Price | In Stock');\n\n for (var i = 0; i < res.length; i++) {\n var item_id = res[i].item_id + ''; //convert to string \n var product_name = res[i].product_name + ''; //convert to string \n var department_name = res[i].department_name + ''; //convert to string \n var price = res[i].price + ''; //convert to string \n var stock_quantity = res[i].stock_quantity + ''; //convert to string \n console.log(' ' + item_id + ' ' + product_name + ' ' + department_name + ' ' + price + ' ' + stock_quantity);\n }//loop\n runSearch();\n connection.end(); // end the script/connection\n }); //close connection\n \n}//close low inventory", "title": "" } ]
1f74b0a366c34755eb2bc8a1b45c2f41
method for user input for game
[ { "docid": "e7d36681c690f0e28090bb6d48099148", "score": "0.62150586", "text": "userPlayer(game) {\n var flag = false;\n while (flag == false) {\n console.log(\"Enter the row value:\");\n let x = readline.questionInt('Enter the value of x within 1,2,3') - 1;\n let y = readline.questionInt('Enter the value of y within 1,2,3') - 1;\n if (game[x][y] == '-') {\n this.mark(game, x, y, 'X');\n flag = true;\n }\n else\n console.log(\"Please enter the correct choice\");\n }\n return game;\n }", "title": "" } ]
[ { "docid": "e632d036f712ad40d127896135c33663", "score": "0.7217519", "text": "function getInput(){\n\t\n\tconsole.log(\"get Game Info :\");\n\t// line: the input of the user \n\trl.on('line', (line) => {\n\t\t// gets the id of a game by name\n\t\tvar gameID = getGameID(line);\n\t\t\n\t\t// if the gameID doesnt exist = exit\n\t\tif (gameID === undefined) {\n\t\t\tconsole.log(\"game \\\"\"+line+\"\\\" not found\");\n\t\t}\n\t\telse {\n\t\t\t// else return info of game\n\t\t\tgetGameData(gameID.appid);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "6cf9c7634cd8c829b19910cd6888a2b7", "score": "0.71562225", "text": "function input()\n\t{\n\n\t}", "title": "" }, { "docid": "052349422d12a33284b4f52fe12e014e", "score": "0.70613015", "text": "systemInputFn(game) {}", "title": "" }, { "docid": "d64abf2ec4cc7709a5a3ff976794dd6e", "score": "0.699338", "text": "function startGame() {\n let answer = window.prompt(\"Make your first move\"); alert(\"your\");\n let userInput = (resp) => {\n console.log(\"What's your move?\"\n if(resp === \"attack\") {\n console.log(Math.random().toFixed(2));\n \n }\n }", "title": "" }, { "docid": "6e299ca13ceddbf19510866c1bb7a804", "score": "0.697563", "text": "inputMove() {\n let input = readlineSync.question(\n `Make a move ${this.currentPlayer.name} `\n );\n if (!input) {\n game.inputMove();\n console.log(\"input not error\");\n // input = readlineSync.question(`Make a move ${this.currentPlayer.name} `);\n } else if (input === \"Make America Great Again\") {\n GameOver();\n }\n game.showBoard();\n if (this.board.isValidMove(input, this.currentPlayer.sym)) {\n this.board.assignMove(input, this.currentPlayer.sym);\n } else {\n game.inputMove();\n }\n //Checks winning conditions\n if (this.board.findWinner()) {\n game.GameOver();\n }\n\n game.switchPlayer(this.currentPlayer);\n }", "title": "" }, { "docid": "bb31d698c23b9aaadba270b763607962", "score": "0.6913838", "text": "function gameStarts() {\n\n human_input_box();\n\n\n\n\n\n}", "title": "" }, { "docid": "86062c2b94ae803bd264a0cb9fbd245b", "score": "0.68288225", "text": "handleInput(input){\n if (input == 'left' && this.x > 0){\n this.x -= 101;\n }\n if (input == 'right' && this.x < 404){\n this.x += 101;\n }\n if (input == 'up' && this.y > 0){\n this.y -= 83;\n }\n if (input == 'down' && this.y < 400 ){\n this.y += 83;\n }\n if (this.y < 0 ){\n this.winner = true;\n }\n }", "title": "" }, { "docid": "7f849eb3e4c08c594dbf1a29b47b9754", "score": "0.67020303", "text": "function submit(){\n var input = getinput();\n if(input.toLowerCase() != ''){\n adddiv(\">> \" + $(\"#command_line\").val().toString());\n if(game_state === STARTPAGE){\n input = input.toLowerCase();\n if(input === \"help\"){\n adddiv('help');\n } else if(input === \"play\"){\n game_state = SETUP;\n adddiv('What is your name?');\n } else if(input === 'option'){\n adddiv('Options');\n }\n } else if(game_state === SETUP){\n \n if(player.name == \"\"){\n setupplayer(input);\n adddiv('Hello ' + player.name +'! Welcome to the World of Text RPG!\\nType in commands to play through.');\n sleep(900, function(){\n addline();\n adddiv(\"What class would you like to play?\");\n sleep(300, function(){\n adddiv_list([\"Warrior\", \"Mage\", \"Ranger\", \"Priest\"]);\n });\n });\n } else if(player.job.length == 0){\n if(player.setJob(input)){\n addline();\n adddiv(\"What race would you like to play?\");\n sleep(300, function(){\n adddiv_list([\"Human\", \"Skeleton\", \"Zombie\", \"Dragon\"]);\n });\n }\n } else if(player.race == undefined){\n if(player.setRace(input)){\n addline();\n adddiv(\"You start your adventure as a \" + \n toUpper(player.race.name + \" \" + player.job[0].name)\n + \".\");\n addline();\n player.hpnow = player.hp;\n player.mpnow = player.mp;\n showstats(player);\n generatemap();\n game_state = PLAY_NON_COMBAT;\n }\n }\n } else if(game_state === PLAY_NON_COMBAT){\n input = input.toLowerCase();\n if(input === \"map\"){\n showmap();\n } else if(input === \"exit\" || input === \"quit\"){\n adddiv('Goodbye');\n game_state = STARTPAGE;\n setwelcomepage();\n } else if(startWith(input,\"look\")){\n var name = input.substring(\"look \".length);\n if(name.length > 0){\n exa(name);\n }\n } else if(startWith(input, \"fight\")){\n var str = input.substring(\"fight \".length);\n game_state = COMBAT;\n drawCombat();\n } else if(input === \"room\"){\n let m = monsterAtPlayerRoom();\n var names = \"\";\n for(let i = 0; i < m.length; i++){\n names += m[i].name + \" level \" + m[i].level + \"\\n\";\n }\n if(names == ''){names = \"No monster in room.\";}\n addp(names);\n } else if(input == 'stat' || input == 'stats'){\n showstats(player);\n } else if(input == 'level up' || input =='l'){\n let total = 0;\n for(let i = 0; i < player.job.length; i++){\n total += player.job[i].level;\n }\n if(player.level > player.race.level + total){\n adddiv(\"Choose Race / Job to level up.\");\n if(player.race.level < player.race.maxlevel){\n adddiv(player.race.name);\n }\n for(let i = 0; i < player.job.length; i++){\n if(player.job[i].level < player.job[i].maxlevel){\n adddiv(player.job[i].name);\n }\n }\n game_state = LEVELUP;\n }\n }\n } else if(game_state === LEVELUP){\n input = input.toLowerCase();\n if(player.race.level < player.race.maxlevel && input === player.race.name){\n player.race.levelup();\n adddiv(toUpper(player.race.name) + \" is now level \" + player.race.level);\n game_state = PLAY_NON_COMBAT;\n } else {\n for(let i = 0; i < player.job.length; i++){\n if(player.job[i].name === input && player.job[i].level < player.job[i].maxlevel){\n player.job[i].levelup();\n adddiv(toUpper(player.job[0].name) + \" is now level \" + player.job[0].level);\n game_state = PLAY_NON_COMBAT;\n break;\n }\n }\n }\n }else if(game_state === COMBAT){\n input = input.toLowerCase();\n if(input === \"attack\" || input === \"a\"){\n fight(ATTACK);\n } else if(input === \"skill\" || input === \"spell\" || input === \"s\"){\n fight(SKILLSPELL);\n } else if(input === \"run\" || input === \"r\"){\n fight(RUNAWAY);\n }\n }\n aftersubmit();\n }\n}", "title": "" }, { "docid": "887a2a1cb5d29b95c4f1138c1800601e", "score": "0.6670833", "text": "function inputHandler() {\n // Start the game when user entered the first letter\n if (!gameStarted) {\n runClock();\n gameStarted = true;\n }\n\n const inputWord = inputEl.value.toLowerCase();\n\n // If the word entered by user is correct\n if (inputWord === word) {\n // Display a new word in the document\n displayWord();\n // Gift more time\n giftTime();\n // Update the user's score\n updateScore();\n // Clear the input field\n inputEl.value = '';\n }\n}", "title": "" }, { "docid": "ee03b85b937301df230024bd58f28b08", "score": "0.6669506", "text": "function input(event) {\n // Take Input from the Player\n // console.log(\"Input\");\n // console.log(\"Event type: \" + event.type);\n\n if (event.type === \"buttonOnClickEvent\") {\n switch (event.keyCode) {\n case 37:\n gamerInput = new GamerInput(\"Left\");\n break; //Left key\n case 38:\n gamerInput = new GamerInput(\"Up\");\n break; //Up key\n case 39:\n gamerInput = new GamerInput(\"Right\");\n break; //Right key\n case 40:\n gamerInput = new GamerInput(\"Down\");\n break; //Down key\n default:\n gamerInput = new GamerInput(\"None\"); //No Input\n }\n } else {\n gamerInput = new GamerInput(\"None\"); //No Input\n }\n console.log(\"Gamer Input :\" + gamerInput.action);\n}", "title": "" }, { "docid": "e30f84419e2d3ba1d01636a2f15d0351", "score": "0.665352", "text": "onInputChange(){\n\t\t\n\t\t// gestion de l'UI\n\t\tthis.UI.onInputChange();\n\t\t\n\t\tlet round = this.currentRound;\n\t\tlet input = this.getInput();\n\t\tlet answer = round.english;\n\t\t\n\t\t// si la taille de la saisie correspond à la taille de la réponse\n\t\tif (input.length == answer.replace(/\\s+/g, '').length) {\n\n\t\t\t// on compare les resultats, si ils sont égaux : le round est gagné; sinon : le round est perdu\n\t\t\tif (this.isInputValid()) this.onRoundWin(round);\n\t\t\telse this.onRoundLoose(round);\n\n\t\t\t// fin du round\n\t\t\tthis.onRoundEnd();\n\t\t\t\n\t\t\t// si le score est égal à 20 ou 0 : fin du jeu\n\t\t\tif (this.score == 20 || this.score == 0) {\n\t\t\t\tthis.onGameEnd();\n\t\t\t// sinon : nouveau round\n\t\t\t} else {\n\t\t\t\tthis.newRound(this.currentDifficulty);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "889fd045d15d8838da43560ade8a0496", "score": "0.662647", "text": "checkInputs(inputChar) {\n\t\tif (this.mode === 'Inputting') {\n\t\t\tconst tempString = this.userInput + inputChar;\n\n\t\t\tthis.userInput += inputChar;\n\t\t\tthis.showinputProgressCircles(tempString);\n\t\t\tthis.blocks.flashAndPlayAudio(inputChar);\n\n\t\t\t// Checking input one on one\n\t\t\tif (this.levelString.indexOf(tempString) === 0) {\n\t\t\t\t// console.log('So far good.');\n\n\t\t\t\t// If the player's input is completely same to this.levelString\n\t\t\t\tif (tempString === this.levelString) {\n\t\t\t\t\tthis.gameContinue();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.replayTimes > 0 ? this.replayCurrentLevel() : this.gameOver();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "56f7229d42acfa3741ff73943333c654", "score": "0.6615724", "text": "function userInput(str){\n\tlet commandType = str.split(\" \", 1).toString().toUpperCase();\n\tif (positionX == undefined && positionX == null && positionY == undefined && positionY == null) {\t\t\t\t\n\t\tif (str.indexOf(' ') >= 0) {\n\t\t\tlet strArray = str.split(',');\n\t\t\tlet posX = strArray[0].split(\" \")[1].toString();\n\t\t\tlet posY = strArray[1];\n\t\t\tlet direction = strArray[2];\t\t\n\t\t\tif (commandType == \"PLACE\") {\n\t\t\t\tplace(posX,posY,direction);\n\t\t\t\tconsole.log(\"place\");\n\t\t\t}else {\n\t\t\t\tconsole.log(\"error\");\n\t\t\t}\n\t\t}else {\n\t\t\talert(\"Please enter the PLACE command first\");\t\t\t\t\t\n\t\t}\t\n\t}else if (commandType == \"PLACE\" && positionX != undefined && positionX != null && positionY != undefined && positionY != null) {\n\t\tif (str.indexOf(' ') >= 0) {\n\t\t\tlet strArray = str.split(',');\n\t\t\tlet posX = strArray[0].split(\" \")[1].toString();\n\t\t\tlet posY = strArray[1];\n\t\t\tlet direction = strArray[2];\n\t\t\toldStyle(id);\t\t\n\t\t\tplace(posX,posY,direction);\n\t\t}else {\n\t\t\tconsole.log(\"error\");\n\t\t}\n\t}else {\n\t\tconsole.log(commandType);\n\t\tif (commandType == \"MOVE\") {\n\t\t\tmove();\n\t\t\tconsole.log(\"move\");\n\t\t}else if (commandType == \"LEFT\") {\n\t\t\tleft();\n\t\t\tconsole.log(\"left\");\n\t\t}else if (commandType == \"RIGHT\") {\n\t\t\tright();\n\t\t\tconsole.log(\"right\");\n\t\t}else if (commandType == \"REPORT\") {\n\t\t\treport();\n\t\t}else {\n\t\t\tconsole.log(\"error\");\n\t\t}\n\t}\n\t\t\t\t\n}", "title": "" }, { "docid": "efc8d594c9b9161cf235afee49cf06e4", "score": "0.66156715", "text": "handleInput(input) {\n if (input === 'left') {\n if (this.x > 0) {\n this.x -= this.horizontal\n }\n } else if (input === 'up') {\n if (this.y > 0) {\n this.y -= this.vertical;\n }\n } else if (input === 'right') {\n if (this.x < this.horizontal * 4) {\n this.x += this.horizontal;\n }\n } else if (input === 'down') {\n if (this.y < this.vertical * 4 ) {\n this.y += this.vertical;\n }\n }\n\n // check if player makes it to other side successfully\n if (this.y === -28) {\n this.score += 50;\n scoreboard.innerText = this.score;\n this.reset();\n }\n }", "title": "" }, { "docid": "333d206bb5139608728dc319ff7ce505", "score": "0.6598409", "text": "function processGameInput()\n{\n //Update \"level string\" based on numbers typed\n if(keyCodeJustPressed(48))\n lvlStr += \"0\";\n else if(keyCodeJustPressed(49))\n lvlStr += \"1\";\n else if(keyCodeJustPressed(50))\n lvlStr += \"2\";\n else if(keyCodeJustPressed(51))\n lvlStr += \"3\";\n else if(keyCodeJustPressed(52))\n lvlStr += \"4\";\n else if(keyCodeJustPressed(53))\n lvlStr += \"5\";\n else if(keyCodeJustPressed(54))\n lvlStr += \"6\";\n else if(keyCodeJustPressed(55))\n lvlStr += \"7\";\n else if(keyCodeJustPressed(56))\n lvlStr += \"8\";\n else if(keyCodeJustPressed(57))\n lvlStr += \"9\";\n\n //Process PLAYER input\n if(!heroSmart.moving && !heroKiller.moving)\n {\n //Handle SWIPE input!!\n swipeDirection = justSwiped();\n if(swipeDirection != \"None\") console.log(\"FINGER SWIPE: \" + swipeDirection);\n }\n}", "title": "" }, { "docid": "b765e133bd9252fca119175ec755e61e", "score": "0.65869915", "text": "function keyPress(){\n\t\tvar char = $(\"input\").val().toLowerCase();\n\t\tvar string = \"\";\n\t\t$(\"#input\").val(\"\");\n\n\t\tstring =guess( char, blankAnswer, answer );\n\t\tif (string != blankAnswer){\n\t\t\tupdate(string);\n\t\t\tblankAnswer = answer;\n\t\t\tif (blankAnswer === answer){\n\t\t\t\twin();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\twrongLetter(char);\n\t\t\tlives = lives--\n\t\t\tif (lives === 0){\n\t\t\t\tlose();\n\t\t\t}\n\t\t}\n}", "title": "" }, { "docid": "ef86eb58fdcbe687f62b85ed3363d2d3", "score": "0.6566393", "text": "function getUserInput() {\n\talphabetObject = {A: 0, B: 0, C: 0, D: 0, E: 0, F: 0, G: 0, H: 0, I: 0, J: 0, K: 0, L: 0, M: 0,\n\tN: 0, O: 0, P: 0, Q: 0, R: 0, S: 0, T: 0, U: 0, V: 0, W: 0, X: 0, Y: 0, Z: 0} //reset from previous user input\n\tstring = window.prompt(\"Hello! please enter the tile letters you have. It is recommended that you use an image to text program and paste its output string here\")\n\treturn sanitizeString(string);\n}", "title": "" }, { "docid": "6a8111f3c47967efa9cc049ca99075ce", "score": "0.65597034", "text": "function input() {\r\n index.rl.question(\"Input Length (m): \", (l) => {\r\n if (l > 0) {\r\n index.rl.question(\"Input Height (m):\",(h)=>{\r\n if (h > 0) {\r\n console.log(`\\nPyramid's volume is ${calculateRectangularPyramid(l,h)} m3\\n`);\r\n index.menu();\r\n } else {\r\n console.log(`Height must be number`);\r\n input();\r\n }\r\n })\r\n } else {\r\n console.log(`Length must be number`);\r\n input();\r\n }\r\n });\r\n}", "title": "" }, { "docid": "2fb4998c017f1a37bb41e1e53e0a26bb", "score": "0.65588063", "text": "function getPlayer(input){\n switch(input){\n case(draw):\n return \"draw\";\n case(willNum):\n return \"will\";\n case(lucasNum):\n return \"lucas\";\n }\n}", "title": "" }, { "docid": "8df23b83afcbfda6c351e5fe8a7f77d6", "score": "0.653095", "text": "function playGuess(){\n guess = input.value();\n console.log(guess);\n highLow();\n}", "title": "" }, { "docid": "71e43720e6ffa5bb026bd47770a4ba43", "score": "0.65281326", "text": "function dealInput(input) {\n\tinput = input.toUpperCase();\n\tinput = input.replace(/>/g, \"\");\t// remove all '>' characters\n\tconsole.log(input);\n\tinput = input.split(\" \");\n\tinput[0] = commandKey[input[0]];\n\tvar i = 0;\n\tswitch(input[i]) {\n\t\tdefault:\n\t\t\teventHandler.report([\"move\", \"from\", global_currentArea.name]);\n\t\t\tglobal_currentArea.move(input[i]);\n\t\t\tbreak;\n\t\t\n\t\tcase undefined:\n\t\t\tdisplay(\"I don't know what that is\");\n\t\t\tbreak;\n\t\t\n\t\tcase \"MOVE\":\n\t\t\teventHandler.report([\"move\", \"from\", global_currentArea.name]);\n\t\t\tglobal_currentArea.move(commandKey[input[i+1]]);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"KILL\":\n\t\t\tif(input.length < 3) {\n\t\t\t\tdisplay(\"Attack it with what?\");\n\t\t\t}\n\t\t\tfor(var a=0; a < global_currentArea.monsters.length; a++) {\n\t\t\t\tif(global_currentArea.monsters[a].name.toUpperCase() == input[i+1]) {\n\t\t\t\t\tif(input[i+2] == \"WITH\") {\n\t\t\t\t\t\ti = i + 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor(var b=0;b < player.items.length; b++) {\n\t\t\t\t\t\tif(input[i+2] == player.items[b].name.toUpperCase()) {\n\t\t\t\t\t\t\tglobal_currentArea.monsters[a].hp -= player.items[b].dp;\n\t\t\t\t\t\t\tdisplay(\"You did \" + player.items[b].dp + \" damge\");\n\t\t\t\t\t\t\teventHandler.report([\"attack\", global_currentArea.monsters[a].name]);\n\t\t\t\t\t\t\tadvanceTick();\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\tbreak;\n\t\t\t\n\t\tcase \"LOOK\":\n\t\t\tglobal_currentArea.look();\n\t\t\teventHandler.report([\"look\", global_currentArea.name]);\n\t\t\tbreak;\n\t\t\n\t\tcase \"PICK\":\n\t\t\tif(input[i+1] == \"UP\"){\n\t\t\t\ti = i + 1;\n\t\t\t}\n\t\t\tif(input[i+1] == \"ALL\") {\n\t\t\t\tfor(var a=0; a < global_currentArea.items.length; a++) {\n\t\t\t\t\tif(global_currentArea.items[a].pickable == true) {\n\t\t\t\t\t\tdisplay(\"You take the \" + global_currentArea.items[a].name);\n\t\t\t\t\t\tplayer.items.push(global_currentArea.items[a]);\n\t\t\t\t\t\teventHandler.report([\"pick\", global_currentArea.items[a].name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tglobal_currentArea.items = [];\n\t\t\t}\n\t\t\tfor(var a=0; a < global_currentArea.items.length; a++) {\n\t\t\t\tif(input[i+1] == global_currentArea.items[a].name.toUpperCase() && global_currentArea.items[a].pickable == true) {\n\t\t\t\t\tdisplay(\"You take the \" + global_currentArea.items[a].name);\n\t\t\t\t\tplayer.items.push(global_currentArea.items[a]);\n\t\t\t\t\teventHandler.report([\"pick\", global_currentArea.items[a].name]);\n\t\t\t\t\tglobal_currentArea.items.splice(a, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tadvanceTick();\n\t\t\tbreak;\n\t\t\n\t\tcase \"DROP\":\n\t\t\tfor(var a=0; a < player.items.length;a++) {\n\t\t\t\tif(input[i+1] == player.items[a].name.toUpperCase()) {\n\t\t\t\t\tglobal_currentArea.items.push(player.items[a]);\n\t\t\t\t\tdisplay(\"You drop the \" + player.items[a].name);\n\t\t\t\t\teventHandler.report([\"drop\", player.items[a].name]);\n\t\t\t\t\tplayer.items.splice(a,1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tadvanceTick();\n\t\t\tbreak;\n\t\t\n\t\tcase \"I\":\n\t\t\tfor(var a=0;a < player.items.length;a++) {\n\t\t\t\tdisplay(player.items[a].name);\n\t\t\t\teventHandler.report([\"inventory\"])\n\t\t\t}\n\t\t\tbreak;\n\t\t\n\t\tcase \"EXAMINE\":\n\t\t\tfor(var a=0; a<player.items.length;a++) {\n\t\t\t\tif(input[i+1] == player.items[a].name.toUpperCase()) {\n\t\t\t\t\tdisplay(\"You examine the \" + player.items[a].name);\n\t\t\t\t\tdisplay(player.items[a].examine);\n\t\t\t\t\teventHandler.report([\"examine\", player.items[a].name]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(var a=0; a<global_currentArea.items.length;a++) {\n\t\t\t\tif(input[i+1] == global_currentArea.items[a].name.toUpperCase()) {\n\t\t\t\t\tdisplay(\"You examine the \" + global_currentArea.items[a].name);\n\t\t\t\t\tdisplay(global_currentArea.items[a].examine);\n\t\t\t\t\teventHandler.report([\"examine\", global_currentArea.items[a].name]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(var a=0; a<global_currentArea.monsters.length;a++) {\n\t\t\t\tif(input[i+1] == global_currentArea.monsters[a].name.toUpperCase()) {\n\t\t\t\t\tdisplay(\"You examine the \" + global_currentArea.monsters[a].name);\n\t\t\t\t\tdisplay(global_currentArea.monsters[a].examine);\n\t\t\t\t\teventHandler.report([\"examine\", global_currentArea.monsters[a].name]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"EAT\":\n\t\t\tfor(var a=0;a<player.items.length;a++) {\n\t\t\t\tif(input[i+1] == player.items[a].name.toUpperCase() && player.items[a].edible == true) {\n\t\t\t\t\tdisplay(\"You eat the \" + player.items[a].name);\n\t\t\t\t\tif(player.hp + player.items[a].heal > player.maxHp) {\n\t\t\t\t\t\tdisplay(\"It restores \" + (player.items[a].heal - (player.hp + player.items[a].heal - player.maxHp)) + \" health\");\n\t\t\t\t\t\tplayer.hp = player.maxHp;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdisplay(\"It restores \" + player.hp + player.items[a].heal + \" health\");\n\t\t\t\t\t\tplayer.hp = player.hp + player.items[a].heal;\n\t\t\t\t\t}\n\t\t\t\t\teventHandler.report([\"eat\", player.items[a].name]);\n\t\t\t\t\tplayer.items.splice(a, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tadvanceTick();\n\t\t\tbreak;\n\t\t\n\t\tcase \"DRINK\":\n\t\t\tfor(var a=0;a<player.items.length;a++) {\n\t\t\t\tif(input[i+1] == player.items[a].name.toUpperCase() && player.items[a].drinkable == true) {\n\t\t\t\t\tdisplay(\"You drink the \" + player.items[a].name);\n\t\t\t\t\tif(player.hp + player.items[a].heal > player.maxHp) {\n\t\t\t\t\t\tdisplay(\"It restores \" + (player.items[a].heal - (player.hp + player.items[a].heal - player.maxHp)) + \" health\");\n\t\t\t\t\t\tplayer.hp = player.maxHp;\n\t\t\t\t\t\tconsole.log(1);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log(2);\n\t\t\t\t\t\tdisplay(\"It restores \" + (player.items[a].heal) + \" health\");\n\t\t\t\t\t\tplayer.hp = player.hp + player.items[a].heal;\n\t\t\t\t\t}\n\t\t\t\t\teventHandler.report([\"drink\", player.items[a].name]);\n\t\t\t\t\tplayer.items.splice(a, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tadvanceTick();\n\t\t\tbreak;\n\t\t\n\t\tcase \"THROW\":\n\t\t\tfor(var a=0; a<player.items.length;a++) {\n\t\t\t\tif(input[i+1] == player.items[a].name.toUpperCase()) {\n\t\t\t\t\tif(input[i+2].toUpperCase() == \"AT\") {\n\t\t\t\t\t\ti = i + 1;\n\t\t\t\t\t}\n\t\t\t\t\tfor(var b=0;b<global_currentArea.items.length;b++) {\n\t\t\t\t\t\tif(input[i+2] == global_currentArea.items[b].name.toUpperCase()) {\n\t\t\t\t\t\t\tdisplay(\"You throw the \" + player.items[a].name + \" at the \" + global_currentArea.items[b].name);\n\t\t\t\t\t\t\teventHandler.report([\"throw\", player.items[a].name, global_currentArea.items[b].name]);\n\t\t\t\t\t\t\tglobal_currentArea.items.push(player.items[a]);\n\t\t\t\t\t\t\tplayer.items.splice(a, 1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor(var b=0;b<global_currentArea.monsters.length;b++) {\n\t\t\t\t\t\tif(input[i+2] == global_currentArea.monsters[b].name.toUpperCase()) {\n\t\t\t\t\t\t\tdisplay(\"You throw the \" + player.items[a].name + \" at the \" + global_currentArea.monsters[b].name);\n\t\t\t\t\t\t\tglobal_currentArea.monsters[b].hp = global_currentArea.monsters[b].hp - player.items[a].dp;\n\t\t\t\t\t\t\tdisplay(\"It does \" + player.items[a].dp + \" damage\");\n\t\t\t\t\t\t\tglobal_currentArea.items.push(player.items[a]);\n\t\t\t\t\t\t\tplayer.items.splice(a, 1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tadvanceTick();\n\t\t\tbreak;\n\t\t\n\t\t\n\t}\n\treturn 0;\n}", "title": "" }, { "docid": "ebc49b2d6f520b0f9164bc7794825eea", "score": "0.65147835", "text": "function validateinput(startgame){\n\t startgame = this.startgame;\n\t startgame = startgame.toUpperCase();\n \n\t if (startgame === null) {\n\t\t alert('You did not enter any value')\n\t }\n\t else if (startgame === 'Y' || startgame === 'YES')\n {\n\t\t alert('Cool, Lets start');\n\t }\n\t else {\n\t\t alert('hmm.. Sorry about that - but still lets give a shot');\n\t }\n }", "title": "" }, { "docid": "7bd97b215a3a3007576c32ec3a6975a8", "score": "0.6509364", "text": "askNewGame() {\n\t\tthis.getInputs(\"would you like to play again?\\n(1) - Yes\\n(2) - No\\n\\n\").then((input) => {\n\t\t\tif (input == 1) { // start a new game if the user enters 1\n if (this.opponentType == 'Bot') {\n this.app.newGameVsBot();\n } else if (this.opponentType == 'Human') {\n this.app.newGameVsHuman();\n }\n\t\t\t} else if (input == 2) { // stop the process if the user enters 2\n\t\t\t\tthis.app.close();\n\t\t\t} else { // if the users input is invalid(not 1 or 2), inform them that their input wasn't valid and ask again\n\t\t\t\tprocess.stdout.write(\"\\nInvalid Response, try again\");\n\t\t\t\tthis.askNewGame();\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "897d73dee187864e688d571c8628cd49", "score": "0.65051556", "text": "function handleInput() {\n console.log(\"HANDING INPUT\")\n let inp = playerInput.value // the submitted player's answer\n let sol = verifySolution(inp) // verify this answer with currSolution\n console.log(sol)\n updateHealth(sol) // health updates\n newProblem() // update problem\n console.log(\"HI\")\n}", "title": "" }, { "docid": "c907584a2740641a92827081f65d9c58", "score": "0.64984834", "text": "handleInput(input){\n // Switch statement to alter the players movement according to each key presses\n // Conditional on each case to create boundaries i.e prevent player from moving offscreen\n switch (input) {\n case 'left':\n if(this.x > 0 ) {\n this.x -= this.length;\n break;\n }\n case 'up':\n if(this.y > this.height){\n this.y -= this.height;\n break;\n }\n case 'right':\n if(this.x < this.length * 4){\n this.x += this.length ;\n break;\n }\n case 'down':\n if(this.y < this.height * 4){\n this.y += this.height;\n break;\n }\n }\n }", "title": "" }, { "docid": "a6596bbd3b2eab59c1dc470d430739b9", "score": "0.6474405", "text": "function welcome() {\n\tinput = prompt(\"Welcome to Rock Paper Scissors lizard spock \\n \\n type 'r' for rock \\n \\n type 'p' for paper \\n \\n type 's' for scissors \\n \\n type 'l' for lizard \\n \\n type 'sp' for spock\" );\n} //make function to compare user input to computer input", "title": "" }, { "docid": "859955a97e6469b71593acababb52a6c", "score": "0.64737177", "text": "function Input(){\r\n player1Direction = 0;\r\n player2Direction = 0;\r\n if (keysPressed['38']) {//flecha superior\r\n player2Direction = -1;\r\n }\r\n if (keysPressed['40'] ) {//flecha inferior\r\n player2Direction = 1;\r\n }\r\n if(keysPressed['38'] && keysPressed['40']){\r\n player2Direction = 0;\r\n }\r\n // W y S (Jugador 1)\r\n if (keysPressed['87']) {//w\r\n player1Direction = -1;\r\n }\r\n if (keysPressed['83']) {//s\r\n player1Direction = 1;\r\n }\r\n if(keysPressed['83'] && keysPressed['87']){\r\n player1Direction = 0;\r\n }\r\n}", "title": "" }, { "docid": "fe1469b5a4b4fb11a278192e578f8474", "score": "0.6459645", "text": "handleKeyInput(userInput) {\n console.log(\"input: \" + userInput);\n \n if (this.game.started) {\n this.startMsg.style.visibility = \"hidden\";\n \n // ignore ctrl, shift, etc. key stroke\n if (/^[\\w~!@#$%^&*()_+=,.]$/.test(userInput)) {\n console.log(\"answer: \" + this.game.answer);\n if (this.game.updateGameData(userInput.toLowerCase())) {\n this.start();\n userInput = \"\"; // user won, so reset\n } else {\n if (this.game.remaining === 0) {\n userInput = \"\";\n }\n }\n this.updatePage(userInput);\n }\n } else {\n // the very initial state or user lost\n if (this.game.remaining === 0) {\n this.startMsg.style.visibility = \"hidden\";\n }\n this.start();\n }\n }", "title": "" }, { "docid": "cbcdc0bf0bccb59324d3459a06a0c795", "score": "0.64587563", "text": "function playerInput(input){\n\tif((input.key==\"ArrowLeft\") && (board[currentIndex[0]][currentIndex[1]-1] != \"0\") && (board[currentIndex[0]][currentIndex[1]-1] != \"#\")) {\n\t\t// move player to left open space\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]][currentIndex[1]-1] = \"p\";\n\t}else if((input.key==\"ArrowLeft\") && (board[currentIndex[0]][currentIndex[1]-1] == \"#\") && (board[currentIndex[0]][currentIndex[1]-2] != \"#\") && (board[currentIndex[0]][currentIndex[1]-2] != \"0\") ) {\n\t\t// move barrel to the left\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]][currentIndex[1]-1] = \"p\";\n\t\tboard[currentIndex[0]][currentIndex[1]-2] = \"#\";\n\t}else if((input.key==\"ArrowLeft\") && (board[currentIndex[0]][currentIndex[1]-1] == \"#\") && (board[currentIndex[0]][currentIndex[1]-2] == \"x\")) {\n\t\t// move barrel to the left and place on victory spot\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]][currentIndex[1]-1] = \"p\";\n\t\tboard[currentIndex[0]][currentIndex[1]-2] = \"#\";\n\t}else if((input.key==\"ArrowUp\") && (board[currentIndex[0]-1][currentIndex[1]] != \"0\") && (board[currentIndex[0]-1][currentIndex[1]] != \"#\")) {\n\t\t// move player up to open space\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]-1][currentIndex[1]] = \"p\";\n\t}else if((input.key==\"ArrowUp\") && (board[currentIndex[0]-1][currentIndex[1]] == \"#\") && (board[currentIndex[0]-2][currentIndex[1]] != \"#\") && (board[currentIndex[0]-2][currentIndex[1]] != \"0\")) {\n\t\t// move barrel up\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]-1][currentIndex[1]] = \"p\";\n\t\tboard[currentIndex[0]-2][currentIndex[1]] = \"#\";\n\t}else if((input.key==\"ArrowUp\") && (board[currentIndex[0]-1][currentIndex[1]] == \"#\") && (board[currentIndex[0]-2][currentIndex[1]] == \"x\")) {\n\t\t// move barrel up and place on victory spot\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]-1][currentIndex[1]] = \"p\";\n\t\tboard[currentIndex[0]-2][currentIndex[1]] = \"#\";\n\t}else if((input.key==\"ArrowRight\") && (board[currentIndex[0]][currentIndex[1]+1] != \"0\") && (board[currentIndex[0]][currentIndex[1]+1] != \"#\")) {\n\t\t// move player right to open space\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]][currentIndex[1]+1] = \"p\";\n\t}else if((input.key==\"ArrowRight\") && (board[currentIndex[0]][currentIndex[1]+1] == \"#\") && (board[currentIndex[0]][currentIndex[1]+2] != \"#\") && (board[currentIndex[0]][currentIndex[1]+2] != \"0\")) {\n\t\t// move barrel right\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]][currentIndex[1]+1] = \"p\";\n\t\tboard[currentIndex[0]][currentIndex[1]+2] = \"#\";\n\t}else if((input.key==\"ArrowRight\") && (board[currentIndex[0]][currentIndex[1]+1] == \"#\") && (board[currentIndex[0]][currentIndex[1]+2] == \"x\")) {\n\t\t// move barrel right and place on victory spot\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]][currentIndex[1]+1] = \"p\";\n\t\tboard[currentIndex[0]][currentIndex[1]+2] = \"#\";\n\t}else if((input.key==\"ArrowDown\") && (board[currentIndex[0]+1][currentIndex[1]] != \"0\") && (board[currentIndex[0]+1][currentIndex[1]] != \"#\")) {\n\t\t// move player down to open space\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]+1][currentIndex[1]] = \"p\";\n\t}else if((input.key==\"ArrowDown\") && (board[currentIndex[0]+1][currentIndex[1]] == \"#\") && (board[currentIndex[0]+2][currentIndex[1]] != \"#\") && (board[currentIndex[0]+2][currentIndex[1]] != \"0\")) {\n\t\t// move barrel down\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]+1][currentIndex[1]] = \"p\";\n\t\tboard[currentIndex[0]+2][currentIndex[1]] = \"#\";\n\t}else if((input.key==\"ArrowDown\") && (board[currentIndex[0]+1][currentIndex[1]] == \"#\") && (board[currentIndex[0]+2][currentIndex[1]] == \"x\")) {\n\t\t// move barrel down and place on victory spot\n\t\tboard[currentIndex[0]][currentIndex[1]] = \" \";\n\t\tboard[currentIndex[0]+1][currentIndex[1]] = \"p\";\n\t\tboard[currentIndex[0]+2][currentIndex[1]] = \"#\";\n\t} else if(input.key == \"Enter\"){ // start a new level by pressing enter\n\t\t$(\"#prompt\").text(\"New level starting...\");\n\t\t$(\"#restart\").empty();\n\t\tgameOver();\n\t\treturn; // break out of if statement\n\t} else if(input.key == \"r\"){ // restart the current level by pressing r\n\t\t$(\"#prompt\").text(\"Restarting this level...\");\n\t\t$(\"#restart\").empty();\n\t\tgameRestart();\n\t\treturn;\n\t}\n\t\n\tredisplayVictoryPoints();\n\trebuildMap();\n\tdisplayColour();\n\tvictory();\n}", "title": "" }, { "docid": "b57612ba55fa6eb3dd7a68ccc436f743", "score": "0.6447985", "text": "processInput(rawText){\n\t\t/*\n\t\tInputs can be one of three things:\n\t\t-direction to move, including secret ones that one work on a specific path on a specific room\n\t\t-puzzle answer\n\t\t-garbage\n\n\t\tPuzzle answers can only be applied to the room they're in, so first check that, then \n\t\t*/\n\t\tlet text = rawText.toLowerCase();\n\t\tlet words = text.split(\" \");\n\t\tvar msg = {message:<p>??? - Currently invalid input</p>}\n\n\t\tif(words[0]==='debug'){\n\t\t\tif(words[1]==='solve'){\n\t\t\t\tlet puzzleId = words[2].toUpperCase();\n\t\t\t\tthis.applyCorrectAnswer(puzzleId);\n\t\t\t\tmsg = {message:this.answerClearedMessage(puzzleId)};\n\t\t\t}else if(words[1]==='move'){\n\t\t\t\tlet roomId = words[2].toUpperCase();\n\t\t\t\tif(!componentExists(this.mapEngine.roomMap,roomId))\n\t\t\t\t\tmsg = {message:'invalid room Id ' + roomId}\n\t\t\t\telse{\n\t\t\t\t\tconsole.log(roomId)\n\t\t\t\t\tthis.player.moveRooms(roomId);\n\t\t\t\t\tmsg = this.processInput('look');\n\t\t\t\t}\n\t\t\t}else if(words[1].toLowerCase()==='th'){\n\t\t\t\tthis.mapEngine.setHiddenPaths(words[2]==='1')\n\t\t\t\tmsg = this.processInput('look');\n\t\t\t}else if(words[1]==='solveex'){\n\n\t\t\t\tlet puzzleIds = words[2].toUpperCase().split(',');\n\n\t\t\t\tfor(const id in this.mapEngine.puzzleMap)\n\t\t\t\t\tif(!(id in puzzleIds))\n\t\t\t\t\t\tthis.applyCorrectAnswer(id);\n\n\t\t\t\tmsg = {message:'Solved all puzzles except ' + words[2]};\t\t\t\t\n\t\t\t}\n\t\t}else{\n\t\t\tif(this.isValidPuzzleSolutionInRoom(text)){\n\t\t\t\tmsg = this.applyPuzzleSolutionInRoom(text);\n\t\t\t\tif(msg.message !== null)\n\t\t\t\t\treturn msg;\n\t\t\t};\n\t\t\tif(text==='attack'&&this.player.currentRoomId()===\"E2\" && !this.mapEngine.getRoom(\"E2\").attacked){\n\t\t\t\tmsg = {message:this.mapEngine.getRoom(\"E2\").render('attack')}\n\t\t\t}else if(text===\"look\"||text==='l'){\n\t\t\t\tmsg = {message:this.renderMessage('',this.player.currentRoomId())};\n\t\t\t}else if(text==='reset'){\n\t\t\t\tthis.resetStorage()\n\t\t\t\twindow.location.reload()\n\t\t\t\tmsg = {message:'game is resetting, window will reload'}\n\t\t\t}else if(this.mapEngine.movementEnabled && text in this.validDirections){\n\t\t\t\tlet direction \t= this.validDirections[text];\n\t\t\t\tlet moveDetails = this.canMove(this.player.currentRoomId(),direction)\n\n\t\t\t\tif(moveDetails.exists){\n\t\t\t\t\tif(!moveDetails.isLocked ){\n\t\t\t\t\t\tlet moveMessage = this.moveRooms(direction); \n\t\t\t\t\t\tmsg = {message:moveMessage};\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlet lockMsg = this.lockedMessage(this.player.currentRoomId(),direction);\n\n\t\t\t\t\t\tif(lockMsg.message!==null)\n\t\t\t\t\t\t\tmsg = lockMsg \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\n\t\treturn msg\n\t}", "title": "" }, { "docid": "e771866828be191a4e0234874c201073", "score": "0.6418938", "text": "function gameStep (input) {\n\tvar cmd = interpret(input); // parse the user input\n\tvar result = execute(cmd); // run the desired command\n\treport(result); // display the results on the screen\n}", "title": "" }, { "docid": "6a8a68612e2961781acfeca1ce6379cb", "score": "0.6401541", "text": "function playTheGame(userGuess) {\n // If the input is not a letter...\n if (game.alphabet.indexOf(userGuess) == -1) {\n alert(\"You must enter an alpha value; no other keys are allowed.\");\n \n // If the letter has already been guessed...\n } else if (game.alreadyGuessed(userGuess)) {\n alert(\"You have already guessed that letter; try a different one.\");\n \n // Guess the letter and update the document.\n } else {\n game.guessLetter(userGuess);\n checkWinCondition();\n game.printButtons();\n updateText();\n }\n}", "title": "" }, { "docid": "b9433ba8381e6e0a5e895ee47258e575", "score": "0.6383145", "text": "function playerPrompt(){\n let playerSelection = window.prompt('choose your weapon');\n //playerSelection = playerSelection.toLowerCase();\n // validateWeapon(playerSelection); \n return playerSelection;\n}", "title": "" }, { "docid": "aa7e6ec78d6cc34a3ba2ffe833a422b0", "score": "0.63824356", "text": "handleInput(key) {\r\n\r\n if (key == 'up' && this.y > topMargin && isGameStarted) {\r\n this.update(undefined, this.y - 84);\r\n\r\n } else if (key == 'down' && this.y < bottomMargin && isGameStarted) {\r\n this.update(undefined, this.y + 84);\r\n\r\n } else if (key == 'left' && this.x > leftMargin && isGameStarted) {\r\n this.update(this.x - 101, undefined);\r\n\r\n } else if (key == 'right' && this.x < rightMargin && isGameStarted) {\r\n this.update(this.x + 101, undefined);\r\n } else if (key == 'enter') {\r\n initFrogger();\r\n pressPlayElem.innerHTML = '&nbsp;';\r\n isGameStarted = true;\r\n\r\n }\r\n }", "title": "" }, { "docid": "a4efdbe1e6c459f955ddece3c8bf6bf2", "score": "0.63700235", "text": "handleInput(input) {\n switch(input) {\n case 'left':\n if (this.x > 0) {\n this.x -= this.step; \n }\n \n break;\n case 'up':\n if (this.y > this.jump) {\n this.y -= this.jump; \n }\n break;\n case 'right':\n if (this.x < this.step * 4) {\n this.x += this.step; \n }\n break;\n case 'down':\n if (this.y < this.jump * 4) {\n this.y += this.jump; \n }\n break;\n }\n\n }", "title": "" }, { "docid": "353dfd30c39b4f50c581d780cc275a37", "score": "0.63585013", "text": "function playGame(){\r\n let numberGuess = document.getElementById(\"number-guess\").value;\r\n dispalyResult(numberGuess);\r\n saveGuessHistory(numberGuess);\r\n displayHistory();\r\n}", "title": "" }, { "docid": "7d4aee8542ec12c286b2be5d15576101", "score": "0.6352143", "text": "commands() {\n const input = prompt('What do you want to explore?(F,R,or L)');\n\n}", "title": "" }, { "docid": "c62ad94f9286d8b369ce8a22376f3b35", "score": "0.63473856", "text": "function checkInput(input, question){\n\t$('#game').hide();\n\tif (input == question.answer) {\n\t\tconsole.log('Correct');\n\t\tprintFeedback(true, question);\n\t\tcorrectAns++;\n\t}else{\n\t\tconsole.log(\"Wrong\");\n\t\tprintFeedback(false, question);\n\t\twrongAns++;\n\t}\n}", "title": "" }, { "docid": "8c0d19f2e188136a6f51b470d7bd4393", "score": "0.63449913", "text": "handleInput(input) {\n switch(input) {\n case 'left':\n if (this.x > 0) {\n this.x -= this.step;\n }\n break;\n case 'up':\n if(this.y > 0) {\n this.y -= this.jump;\n }\n break;\n case 'right':\n if(this.x < this.step * 4) {\n this.x += this.step;\n }\n break;\n case 'down':\n if(this.y < this.jump * 4) {\n this.y += this.jump;\n }\n break;\n }\n }", "title": "" }, { "docid": "dc3e19ac3088962cc630c380996b6e10", "score": "0.63316095", "text": "function Input() {\n\t\n\t}", "title": "" }, { "docid": "ec6e5b88ad4da8b4524ba374cfb8964c", "score": "0.6327568", "text": "function keyboardInput(e) {\n\n var display = targets.keyDisplay;\n\n // enable focus for keyboard input\n targets.keyEnter.focus();\n\n // clear any input\n // handle 'c' as a reset call.\n if (e.keyCode === 99) {\n\n display.textContent = '';\n clicks = '';\n targets.playerGuess.value = clicks;\n keypadInit();\n\n }\n\n // handle 'enter' from the keyboard\n if (e.keyCode === 13) {\n\n targets.keyEnter.click();\n\n }\n\n if (clicks.length < numOfGuesses &&\n keypadDbls(\n String.fromCharCode(e.keyCode),\n clicks\n )) {\n\n // suppress any key clicks except for numbers.\n if (e.keyCode >= 48 && e.keyCode <= 57) {\n\n clicks.push(String.fromCharCode(e.keyCode));\n targets.playerGuess.value = clicks.join('');\n display.textContent = clicks.join('');\n\n }\n }\n }", "title": "" }, { "docid": "f5461586f43c672dcb011e899e54016f", "score": "0.63251007", "text": "function userPlayerInput(){\n var first = document.getElementById('firstName').value\n var last = document.getElementById('lastName').value\n getSpecificPlayer(first, last)\n findPlayerStats(first, last)\n}", "title": "" }, { "docid": "7a1fb5307a10454c23dff7bc32ea2e82", "score": "0.63241065", "text": "function inputEnter(e, input)\n{\n\tif(e.keyCode == 13)\n\t{\n\t\tpostOutput(input);\n\t\t//looks up if the commmand was valid and sends proper output\n\t\tinput = input.toLowerCase();\n\t\tvar commandOutput = command(currentPlayer, currentPlace, input)\n\t\tpostOutput(commandOutput);\n\t\tdocument.getElementById(\"consoleInput\").value = \"\";\n\t}\n}", "title": "" }, { "docid": "27fdc7eba1b640180fcc9ad619341162", "score": "0.63192964", "text": "function getInput(boardState = board.createBoard()) {\n console.log(`${currentPlayer.name}'s turn.`);\n //checkCoordinates is passed as a callback because getting user input from CLI happens asynchronously\n game.getMove(boardState, checkCoordinates);\n }", "title": "" }, { "docid": "ff4440260a27cb1a3212e3217fcc50d2", "score": "0.63175535", "text": "function playGame()\n{\n userGuess = document.getElementById(\"user-guess\").value;\n if (userGuess == secretNumber) changeDisplay(\"win\");\n else if (userGuess > secretNumber) changeDisplay(\"high\");\n else if (userGuess <secretNumber) changeDisplay(\"low\");\n else changeDisplay(\"error\");\n}", "title": "" }, { "docid": "5ed96ba1bff1fa71b66f2c1a252dd087", "score": "0.63121015", "text": "function runGame(gameType) {\n\n// Generate two random numbers between 1 and 25\n// Math.floor rounds down to the whole numbers\n// Math.random generates random numbers\n\n// So each time our run game function is called it will set the value of our answer box to an empty string in effect, it will empty it of whatever was there before.\ndocument.getElementById(\"answer-box\").value = \"\";\ndocument.getElementById(\"answer-box\").focus();\n\nlet num1 = Math.floor(Math.random() * 25) +1;\nlet num2 = Math.floor(Math.random() * 25) +1;\n\n// Here we are passing the game type into the function as an argument, we're checking the game type parameter if it's equal to addition then it's going to display our addition question. Otherwise, it will throw an error.\nif (gameType === \"addition\") {\n displayAdditionQuestion(num1, num2);\n} \nelse if (gameType === \"multiply\") {\n displayMultiplyQuestion(num1, num2);\n} \nelse if (gameType === \"subtract\") {\n displaySubtractQuestion(num1, num2);\n} \nelse if (gameType === \"division\") {\n displayDivisionQuestion(num1, num2);\n} else {\n alert(`Unknown game type ${gameType}`);\n throw `Unknown game type ${gameType}, aborting!`;\n}\n}", "title": "" }, { "docid": "b026c04811665a311e22451688cbc297", "score": "0.6305174", "text": "function playerPlay(){\n let playerInput = prompt(\"Type rock, paper, scissors ..\")\n return playerInput.toLowerCase()\n}", "title": "" }, { "docid": "3eae4aa7e832d3226f87abaaaf1ac379", "score": "0.6293873", "text": "function kataInputCheck() {\n whichRover = \"Kata\";\n var commands = document.getElementById(\"kata-command\");\n if (commands.value) {\n roverMove(commands.value.toUpperCase());\n } else {\n alert(\"No commands were entered!\");\n }\n}", "title": "" }, { "docid": "fe73c0b462bbac0018c37921a8c1b1f8", "score": "0.6290396", "text": "function playerPlay(){\n let userSelection = prompt('Choose rock , paper or scissor','scissors');\n \n \n return userSelection.toLowerCase();\n}", "title": "" }, { "docid": "650f8d6244760bb1185a96a3bde4ca74", "score": "0.6288108", "text": "function setInput(playerArr, canvas1, canvas2, canvas3, canvas4, canvas5, sound) {\n // create Input\n let input = document.createElement('input')\n input.type = 'text'\n input.setAttribute('maxlength', 3)\n document.body.append(input)\n // control Input\n let regex = new RegExp(/[a-zA-Z_]+/g)\n // enter highscore\n window.onkeypress = function(e) {\n let result = regex.test(e.key)\n if(result === false) {\n // clear error message\n canvas5.clearRect(245, 120, 110, 40)\n setErrorM(canvas5)\n } else {\n // clear error message\n canvas5.clearRect(245, 120, 110, 40)\n if(e.key === 'Enter') {\n // highscore list\n let name = input.value\n if(!name) {\n name = '---'\n }\n // player\n let player = {\n 'id': name.toUpperCase(),\n 'score': JSON.parse(localStorage.getItem('score'))\n }\n // top ten\n if(playerArr.length >= 10) {\n playerArr.pop()\n playerArr.push(player)\n } else {\n playerArr.push(player)\n localStorage.setItem('highscore', JSON.stringify(playerArr.sort((a, b) => {return b.score - a.score})))\n }\n // clear input\n document.body.removeChild(input)\n // restart game\n restartGame(canvas1, canvas2, canvas3, canvas4, canvas5, sound, highscore)\n }\n }\n }\n}", "title": "" }, { "docid": "88893f63886a669b1963a0baae14ab89", "score": "0.6286074", "text": "function userInput(argOne) {\n switch (argOne) {\n case 'spotify-this-song':\n spotifyThisSong();\n break;\n case 'my-tweets':\n twitterApi();\n break;\n case 'movie-this':\n myOMDB();\n break;\n // case 'do-what-it-says':\n // doAction();\n // break;\n }\n}", "title": "" }, { "docid": "a53d3e30307f70ad03dfa73b3d4517b9", "score": "0.62857985", "text": "function userColourInput() {\n $(\".quarter\").click(function () {\n htmlID = $(this).attr(\"id\");\n flashColour = $(this).attr(\"class\").split(\" \")[1];\n userInputOrder.push(htmlID);\n flashHighlightAndSound(htmlID, flashColour);\n // check user's input order\n if (!compareUserInputWithSimon()) {\n displayError();\n userInputOrder = [];\n }\n // occurs when user's length input is same as simon's\n if (\n userInputOrder.length === simonFlashOrder.length &&\n userInputOrder.length < numOfLevels\n ) {\n flashLevel++;\n userInputOrder = [];\n handleSimonSequence();\n }\n // checking for winners\n if (userInputOrder.length === numOfLevels) {\n $(\"#level\").text(\"Win\");\n }\n });\n }", "title": "" }, { "docid": "9ddaa5d914e711dea52fe0f459ace59e", "score": "0.62820876", "text": "function guess() {\n $('#stop').hide();\n\n var input = $('input').val();\n $('input').val(\"\");// clear input\n if (input.toUpperCase() == curSong.title.toUpperCase() ||\n input.toUpperCase() == curSong.artist_name.toUpperCase()) {\n\n correctAnswer(input);\n points++;\n\n console.log(\"CORRECT\");\n } else {\n wrongAnswer(input);\n console.log(\"WRONG\");\n }\n\n $('#points').text(points + \"/\" + (index+1));\n $('#controls').show();\n}", "title": "" }, { "docid": "d1f1cb737c83a9590210d0b2ff8bb853", "score": "0.62753254", "text": "function wrongGoodMessage(displayMessage) // will print \"Good!!\" when keystroke is in the string or \"Wrong!!\" when not, Also will print initial instructions when starting game\n{\n document.getElementById(\"user\").innerHTML = displayMessage;\n}", "title": "" }, { "docid": "58ffd2731815af2570bd1fa261b3a5d9", "score": "0.62741846", "text": "checkNameEntry(key){//\n if(key === 13 && this.layer == 4){//If enter pressed in win game menu\n if(this.inputBox.value().length>0 && this.inputBox.value() != null){//If anything entered in input box\n this.saveNameToStorage(this.inputBox.value());//Save the name entered\n this.inputBox.hide();//Hide inputbox\n this.inputBox = createInput('');//Reset inputbox\n this.inputBox.hide();//Hide inputbox\n this.layer = 2;//Change to leaderboard layer\n this.setupLeaderboard();//Setups up leaderboard\n }\n }\n }", "title": "" }, { "docid": "e5456582928cc55c49107e8aa04587ff", "score": "0.6269593", "text": "function youPicked() {\n //this function captures their response and prints their response appropriately\n let userChoice = document.getElementById(\"inputText\").value;\n userChoice = userChoice.toLowerCase();\n userChoiceGlobal = userChoice;\n if (userChoice==\"shoot\"&&userBulletCount==0) {\n userChoice=\"shield\";\n }\n if (userChoice==\"shoot\") {\n userChoiceGlobal=3;\n }\n if (userChoice==\"shield\") {\n userChoiceGlobal=2;\n }\n if (userChoice==\"reload\") {\n userChoiceGlobal=1;\n }\n if (userChoice==\"super shot\" && userBulletCount<5) {\n userChoiceGlobal=2;\n }\n if (userChoice==\"super shot\"&&userBulletCount>=5) {\n userChoiceGlobal=4;\n \n }\n if(userChoice != \"shoot\" && userChoice != \"shield\" && userChoice != \"reload\" && userChoice != \"super shot\"){\n document.getElementById(\"printUserOutput\").innerHTML = `Your input is ${userChoice}. You need to input either shoot, shield, reload, or super shot.`;\n }\n else {\n document.getElementById(\"printUserOutput\").innerHTML = \"You picked \" + userChoice;\n }\n}", "title": "" }, { "docid": "5b13361f8e7e950d15e36c62e899ffc5", "score": "0.626954", "text": "function input(player) {\n\t\t/*\n\t\t\t37: left\n\t\t\t38: up\n\t\t\t39: right\n\t\t\t40: down\n\t\t*/\n\t\tif (37 in keys) {\n\t\t\tplayer.x -= player.speed;\n\t\t\tplayer.direction = 'left';\n\t\t}\n\t\tif (39 in keys) {\n\t\t\tplayer.x += player.speed;\n\t\t\tplayer.direction = 'right';\n\t\t}\n\t\tif (38 in keys) {\n\t\t\tplayer.y -= player.speed;\n\t\t\tplayer.direction = 'up';\n\t\t}\n\t\tif (40 in keys) {\n\t\t\tplayer.y += player.speed;\n\t\t\tplayer.direction = 'down';\n\t\t}\n\n\t\t//finally the bullets (32 = spacebar)..\n\t\tif ( 32 in keys) {\n\t\t\tbullets[bullets.length] = new Box({\n\t\t\t\tx: player.x + player.width / 2,\n\t\t\t\ty: player.y + player.height / 2,\n\t\t\t\twidth:4,\n\t\t\t\theight: 4,\n\t\t\t\tcolor: '#e3dc01',\n\t\t\t\tspeed: 10,\n\t\t\t\tdirection: player.direction\n\t\t\t});\n\t\t\t// console.log('yes');\n\t\t}\n\t}", "title": "" }, { "docid": "e1937a87f054d0405746dc20b05fd1b8", "score": "0.6266638", "text": "handleInput(input) {\n // Prevents movement if game is paused\n if (this.isPaused == false) {\n // Calls on checkNextMove() method to check for legal moves.\n // All cases implement the checkMoveBlocked method to check for nonPlayable board spaces.\n let pos = this.checkNextMove();\n switch (input) {\n case 'up':\n if (pos.yUp) {\n this.player.moveUp(this.distMoveY);\n this.checkMoveBlocked();\n }\n break;\n case 'down':\n if (pos.yDown) {\n this.player.moveDown(this.distMoveY);\n this.checkMoveBlocked();\n }\n break;\n case 'right':\n if (pos.xRight) {\n this.player.moveRight(this.distMoveX);\n this.checkMoveBlocked();\n }\n break;\n case 'left':\n if (pos.xLeft) {\n this.player.moveLeft(this.distMoveX);\n this.checkMoveBlocked();\n }\n break;\n }\n }\n if (input == 'pause') {\n this.isPaused = !this.isPaused;\n }\n }", "title": "" }, { "docid": "9039199f6c61d0721369e9fd986ba5dd", "score": "0.62572044", "text": "static inputCase(answer){\r\n if(process.argv.length == 3)\r\n console.log('PLACE X,Y,DIR | MOVE| LEFT| RIGHT| REPORT| EXIT:');\r\n\r\n //if PLACE command is input\r\n if (answer.startsWith(\"PLACE\"))\r\n {\r\n answer=answer.replace(\"PLACE\",\"\"); \r\n if(answer.split(',') <= 2){\r\n console.log('Incorrect command. Correct commands are: PLACE X, Y, F | MOVE | LEFT | RIGHT | REPORT |EXIT');\r\n if(process.argv.length == 2)\r\n OperateToy.asyncReadLine(); \r\n }\r\n\r\n if(OperateToy.toy.validate(answer.split(',')[0],answer.split(',')[1],answer.split(',')[2]))\r\n OperateToy.toy.setRowsnColunns(parseInt(answer.split(',')[0]),parseInt(answer.split(',')[1]),answer.split(',')[2]);\r\n }\r\n //if MOVE command is input\r\n else if (answer ===\"MOVE\") {\r\n if(OperateToy.notEmptyToy())\r\n OperateToy.toy.move();\r\n else\r\n console.log('First place the robot by issuing PLACE X, Y, F ');\r\n }\r\n //if LEFT command is input\r\n else if (answer === \"LEFT\"){\r\n if(OperateToy.notEmptyToy())\r\n OperateToy.toy.Left();\r\n else\r\n console.log('First place the robot by issuing PLACE X, Y, F ');\r\n }\r\n //if RIGHT command is input\r\n else if (answer ===\"RIGHT\") {\r\n if(OperateToy.notEmptyToy())\r\n OperateToy.toy.Right();\r\n else\r\n console.log('First place the robot by issuing PLACE X, Y, F ');\r\n }\r\n //if REPORT command is input\r\n else if (answer === \"REPORT\"){\r\n if(OperateToy.notEmptyToy())\r\n OperateToy.toy.Report(); \r\n else\r\n console.log('First place the robot by issuing PLACE X, Y, F '); \r\n }\r\n //if EXIT command is input\r\n else if (answer == 'EXIT')\r\n return rl.close();\r\n //if incorrect commands are input\r\n else\r\n console.log('Incorrect command. Correct commands are: PLACE X, Y, F | MOVE | LEFT | RIGHT | REPORT |EXIT');\r\n if(process.argv.length == 2){\r\n OperateToy.asyncReadLine();\r\n } \r\n }", "title": "" }, { "docid": "dd45304c95f3ad769dc55e3c8a11fe04", "score": "0.6253727", "text": "function askForName() {\n candidateName = input.question(\"Enter your Name : \");\n}", "title": "" }, { "docid": "fa2f07873b3bcd897ffed01aa5010166", "score": "0.6250999", "text": "function guess() {\n\n game.input = Number(getId(\"guess\").value);\n\n if (game.running && checkValidInput()) {\n\n game.round--;\n if (game.input < game.target) {\n output.push(`${game.input} is to Low - Next Try`);\n writeResult(false);\n } else if (game.input > game.target) {\n output.push(`${game.input} is to high - Next Try`);\n writeResult(false);\n } else if (game.input == game.target) {\n output[1] = \"WIN - Try Again\";\n game.running = false;\n writeResult(true);\n } \n if (game.round == 0) {\n output[1] = \"Loose - Try Again\";\n game.running = false;\n writeResult(true);\n }\n \n } else if (game.running) {\n output.push(`Choose a Number between 1 and 100`);\n writeResult(false);\n } else {\n output[1] = `Game not started, Press the Play Button`\n readRounds();\n writeResult(true);\n }\n}", "title": "" }, { "docid": "a1830389bb8d9557285a3b72b0eabbdf", "score": "0.6228787", "text": "function engageInput(e) {\n // Initialize timer on first user input.\n if (!is_timer_start) {\n is_timer_start = true;\n }\n // Prohibit input if game is not started or if game in transition.\n if (!is_game_start) {\n return;\n }\n if (fading_in || fading_out) {\n return;\n }\n // Start game from title screen with any key and have player jump.\n if (onTitleScreen()) {\n player1.y_speed = init_y_speed + gravity * low_jump_multiplier;;\n startFromTitle();\n return;\n }\n\n /* MOVE RIGHT */\n if (e.code === 'ArrowRight' || e.code === 'KeyD') {\n if (!player1.on_right_wall) {\n // Virtual button condition: || (e.target.id === 'right_button' && is_mouse_down)\n player1.x_accel_right = init_x_accel;\n }\n }\n\n /* MOVE LEFT */\n else if (e.code === 'ArrowLeft' || e.code === 'KeyA') {\n if (!player1.on_left_wall) {\n // Virtual button condition: || (e.target.id === 'left_button' && is_mouse_down)\n player1.x_accel_left = -init_x_accel;\n }\n }\n\n /* JUMP */\n else if (e.code === 'Space' || e.code === 'ArrowUp' || e.code === 'KeyW') {\n // Virtual button condition: || (e.target.id === 'jump_button' && is_mouse_down)\n // NOTE: final condition onTitleScreen() makes it so player will jump on any key stroke while on title card.\n if (!player1.is_space_down && player1.canJump()) {\n // PLAYER ANIMATION: STRETCH\n //animateStretch();\n if (player1.is_on_wall) {\n player1.has_wall_jumped = true;\n }\n // ADD INITIAL Y VELOCITY\n player1.y_speed = init_y_speed;\n // PLAYER ANIMATION: SQUISH\n if (!player1.is_grounded) {\n //animateSquish();\n } // Player was just in the air\n }\n player1.is_grounded = false;\n player1.is_space_down = true;\n }\n\n /* USE PULSE */\n else if (e.code === 'ShiftRight' || e.code === 'KeyE') {\n if (!player1.using_pulse && player1.unlocked_pulse) { // multiple pulses?\n readyPulse();\n }\n }\n\n /* ZOOM IN */\n else if (e.code === 'Equal') {\n //zoom(zoom_factor); // Default is zoom_factor = 1.25;\n }\n\n /* ZOOM OUT */\n else if (e.code === 'Minus') {\n //zoom(1/zoom_factor);\n }\n\n // TODO: REMOVE AFTER TESTING !!!!\n else if (e.code === 'KeyN') {\n if (is_dark && !player1.using_torch) {\n player1.using_torch = true;\n readyHalo();\n }\n else {\n player1.using_torch = false;\n hideHalo();\n }\n }\n}", "title": "" }, { "docid": "cf88aed6d1024c554c0edfed354bae20", "score": "0.6215967", "text": "handleKeyInput(userInput) {\n console.log(\"input: \" + userInput);\n\n if (this.game.started) {\n this.startMsg.style.visibility = \"hidden\";\n\n // ignore ctrl, shift, etc. key stroke\n if (/^[\\w~!@#$%^&*()_+=,.]$/.test(userInput)) {\n console.log(\"answer: \" + this.game.answer);\n if (this.game.updateGameData(userInput.toLowerCase())) {\n this.start();\n userInput = \"\"; // user won, so reset\n } else {\n if (this.game.remaining === 0) {\n userInput = \"\";\n }\n }\n this.updatePage(userInput);\n }\n } else {\n // the very initial state or user lost\n if (this.game.remaining === 0) {\n this.startMsg.style.visibility = \"hidden\";\n }\n this.start();\n }\n }", "title": "" }, { "docid": "2e1b1805e73cd4ce75a0a55594c43b90", "score": "0.621208", "text": "function userPlay(){\n let choice = prompt(`Choose between Rock, Paper, and Scissors: `).toLowerCase(); //This line is a prompt to allow the user to make a choice\n return choice;\n}", "title": "" }, { "docid": "e334982b44bd713847186a43e0798139", "score": "0.6209634", "text": "function alphabetClicked(userClick) {\n var userInput = userClick.value.toLowerCase(); // Grab the letter that the user clicked.\n playTheGame(userInput); // Send the letter to playTheGame() function.\n}", "title": "" }, { "docid": "150085372a46370dec53eb651cb51f45", "score": "0.62067306", "text": "function checkUserInput(userChoice){\r\n //check if correct\r\n if(sequence[sequenceNum] == userChoice){\r\n sequenceNum ++;\r\n\r\n // sequence complete, update levels and get next colour\r\n if(sequenceNum == sequence.length){\r\n sequenceNum = 0;\r\n level ++;\r\n $(\"#level-title\").text(\"Level \"+ level);\r\n nextSequence();\r\n }\r\n }else {\r\n // change background\r\n $(\"body\").addClass(\"game-over\");\r\n setTimeout(function(){\r\n $(\"body\").removeClass(\"game-over\");\r\n }, 200);\r\n\r\n // play incorrect sound\r\n audio = new Audio(\"sounds/wrong.mp3\");\r\n audio.play();\r\n\r\n //show instructions on how to reset the game\r\n $(\"#level-title\").text(\"Game Over, Press Any Key to Restart\");\r\n gameOver = true;\r\n }\r\n}", "title": "" }, { "docid": "cffa6939b9a434884a30044ed33a27c6", "score": "0.6198373", "text": "function gamePlay(value) {\n\tvar letterCheck = /^[a-z]+$/;\n\t\tif (letterCheck.test(value) == false) {\n\t\t\tconsole.log(\"Only input a letter from A through Z\");\n\t\t}\n\t\telse if (userGuesses.indexOf(userInput) != -1) {\n\t\t\t\t\tdocument.querySelector('.wrong').play()\n\t \t\tdocument.querySelector('.newLetter').innerHTML = (\"You picked this letter already\");\n\t \t} \n\t \telse if(computerWord == currentWord) {\n\t \t\twins++;\n\t \t\tdocument.querySelector('.win').play()\n\t \t\tdocument.querySelector('.winner').innerHTML = (\"YOU WIN. NOM NOM NOM on \" + computerWord);\n\t\t \tgameReset();\n\t\t \tconsole.log(\"you win\");\n\t\t } \n\t\t else if (guesses == 1) {\n\t\t \tlosses++;\n\t\t \tdocument.querySelector('.lose').play()\n\t\t \tdocument.querySelector('.loser').innerHTML = (\"You don't get to eat any \" + computerWord);\n\t\t gameReset();\n\t\t } \n\t\t \t\telse if (computerWord.indexOf(userInput) == -1){\n\t\t\t\t\tguesses--;\n\t\t \tuserGuesses.push(userInput);\n\t \t\t}\n\t \t\telse {\n\t \t\t\tuserGuesses.push(userInput);\n\t \t\t}\n\t}", "title": "" }, { "docid": "e6159dc1d46c6f66a3aabd5620491e72", "score": "0.6195287", "text": "function keyPressed(event) {\n // console.log(typeof game!==\"undefined\");\n if (typeof game!==\"undefined\" && game.gameReady){\n document.getElementById(\"notStarted\").style.display = \"none\";\n let thisKey = String.fromCharCode(event.keyCode).toLowerCase();\n \n game.guessALetter(thisKey);\n game.updateUI();\n\n //guessed all\n if(game.guessedAll()){\n alert(\"you guessed it!\");\n //reset parameters and get a new word\n game.addWin();\n }\n //run out of live\n if(game.dies()){\n //confirm if want to start over again\n var retry = confirm(\"you died! :( Try again?\");\n if(retry){\n game = new Game();\n }else{\n //TODO show game over\n // document.getElementsByTagName(\"MAIN\")[0].style.display = \"none\";\n // $(\"main\").html(\"display\",\"none\");\n $(\"main\").load(\"gameover.html\");\n }\n }\n game.updateUI();\n }\n \n\n}", "title": "" }, { "docid": "bffd7548acc65ea8fc65560ff5debe73", "score": "0.6192667", "text": "takeInput(viewPort){\n switch(this.state){\n case 0: \n //free move state\n if (this.playerInput.a || this.playerInput.A) { \n this.hspd = -this.moveSpd;\n }\n if (this.playerInput.d || this.playerInput.D) {\n this.hspd = this.moveSpd;\n }\n\n break;\n\n case 1:\n //swing state\n break;\n }\n\n if(this.playerInput[' ']){\n if(this.playerInput.canJump || this.state === 1){\n this.vspd = this.jumpSpd * -this.game.gravDir;\n this.audioPlayer.playEffect('jump');\n \n this.playerInput.canJump = false;\n\n\n }\n if(this.state === 1){\n this.resetHook();\n }\n }\n //GravShift Code\n // if(this.playerInput.ArrowUp && this.playerInput.canInvert) {\n // this.game.gravDir = this.game.gravDir * -1;\n // this.playerInput.canInvert = false;\n // }\n \n //Debug tool\n if(this.playerInput['1']){\n this.debug = true;\n }\n if(this.playerInput['2']){\n this.debug = false;\n }\n }", "title": "" }, { "docid": "0c441fbe4ff8ad66c1112386ef3c3d55", "score": "0.6188769", "text": "function correctUserInput() {\n if(playerMoves.length === 20 && theSequence.length === 20) {\n celebration();\n }\n else if(playerMoves.length === theSequence.length) {\n $('.color-game-btn').css( 'cursor', 'default' );\n lengthenSequence();\n }\n else {\n userTurn = true;\n }\n}", "title": "" }, { "docid": "f86f52fa49ba844fe02b9b14d365668f", "score": "0.61884755", "text": "function askQuestion(question){\n // your code goes here\n}", "title": "" }, { "docid": "9225a5f6bb8b7a4a04539384fff932ad", "score": "0.618378", "text": "function playGame() {\n let numberGuess = document.getElementById(\"number-guess\").value;\n displayresult(numberGuess);\n saveGuessHistory(numberGuess);\n displayHistory();\n}", "title": "" }, { "docid": "a74873a348990f14ce5bb5b449f091e7", "score": "0.61829764", "text": "validateInput() {\n this.err.textContent = '';\n switch (this.props.view) {\n case 'practice':\n case 'practice2':\n if (this.input.value.toUpperCase() === this.props.prompt) {\n this.props.nextPractice(this.props.view);\n } else {\n this.err.textContent = 'One or more characters are incorrect';\n }\n break;\n case 'prompt':\n if (this.input.value < this.props.prompt.length) {\n this.err.textContent = `Input must be ${this.props.prompt.length} characters long.`;\n } else {\n this.props.logData.apply(null, this.getData());\n }\n break;\n case 'score':\n this.props.nextPractice(this.props.view);\n break;\n default:\n }\n }", "title": "" }, { "docid": "4c0637143de5d1b081eac2307649bfe0", "score": "0.61715156", "text": "function playGame() {\r\nconst usersChoice = \"bomb\"; // Variable to hold the users choice\r\ndetermineWinner(getUserChoice(usersChoice), getComputerChoice());\r\n}", "title": "" }, { "docid": "5df0f818967d7271e3a99d078ef7040c", "score": "0.6167788", "text": "function playerSelection() {\n let playerOptions = prompt(\"Choose: Rock, Paper or Scissor\");\n if (playerOptions == \"Rock\" || playerOptions == \"Paper\" || playerOptions == \"Scissor\") {\n return (playerOptions);\n } else {\n alert ('Invalid input! Reload the page and try again');\n }\n}", "title": "" }, { "docid": "f4c1801b5d3c0091758f9148ad0351c6", "score": "0.61646104", "text": "function playerName(){\r\n name = prompt(\"Please introduce your name\", \"Player name\");\r\n if (name != null || name.length <= 1) { \r\n areYouReady(); \r\n } else {\r\n startGame();\r\n }\r\n return name;\r\n}", "title": "" }, { "docid": "0fdbd4e2ee203e532283a5cb03cd5510", "score": "0.6162621", "text": "function convert_player_input(text_input) {\n let player_input\n if (text_input.toLowerCase() == \"rock\") {\n player_input = 0;\n }\n\n else if (text_input.toLowerCase() == \"paper\") {\n player_input = 1;\n }\n\n else if (text_input.toLowerCase() == \"scissors\") {\n player_input = 2;\n }\n\n return player_input\n}", "title": "" }, { "docid": "8c838e1a86c7eae5a497451f6020933b", "score": "0.6159046", "text": "updatePage(inputChar) {\n this.numWins.textContent = this.game.numWins;\n this.answer.textContent = this.game.ansDisplay.join(\"\");\n this.remaining.textContent = this.game.remaining;\n this.guessed.textContent += inputChar.toUpperCase();\n \n if (this.game.remaining === 0) {\n this.showAnswer();\n this.game.started = false;\n }\n }", "title": "" }, { "docid": "ee6b3cbc489a1c35c2c154e82e753933", "score": "0.6157468", "text": "function validInput() {\n\n }", "title": "" }, { "docid": "097b212f685cf9d45a23986851e55759", "score": "0.6150801", "text": "function askForAnswer() {\n candidateAnswer = input.question(\"Who was the first American woman in space? \");\n}", "title": "" }, { "docid": "0fc951be2e05c0b953729616f232fa60", "score": "0.61498123", "text": "function newGame() {\n mkDivs();\n chooseChar();\n}", "title": "" }, { "docid": "4683eed126f5309d94ff2c621b01daf1", "score": "0.61425734", "text": "function characterInput(){\n var upperCaseLetterInput = prompt(\"Please select upper case letter.\")\n var lowerCaseLetterInput = prompt(\"Please select lower case letter.\")\n var numberInput = prompt(\"Please select a number.\")\n var specialCharacterInput = prompt(\"Please select a special character.\")\n\n // Input from user choices. If true then include with characterInput\n if(upperCaseLetterInput === true){\n noInput = noInput + upperCaseLetter;\n }\n if(lowerCaseLetterInput === true){\n noInput = noInput + lowerCaseLetter;\n }\n if(numberInput === true){\n noInput = noInput + number;\n }\n if(specialCharacterInput === true){\n noInput = noInput + specialCharacter;\n }\n}", "title": "" }, { "docid": "ae9df212673c543a435970c4cd157c16", "score": "0.614186", "text": "function startGame() {\n const game = alert(\"Let's play a game!\");\n const userName = prompt(\"What is your name?\");\n}", "title": "" }, { "docid": "51de83231a7b2e1b281f63a6a218a1d1", "score": "0.61348605", "text": "function boardInput(position) {\n if(playerTurn === 2 && opponent === \"human\"){\n $(position).text(playerTwoSym);\n endOfMove(playerTwoSym);\n } else {\n $(position).text(playerOneSym);\n endOfMove(playerOneSym);\n if(opponent === \"computer\" && game != \"over\"){\n computerMove(opponent, playerTwoSym, winningSequence);\n endOfMove(playerTwoSym);\n }\n }\n }", "title": "" }, { "docid": "6befa1c0635eac438fd99782db785af8", "score": "0.61336184", "text": "function scorerPrompt(){\n\n console.log(`scoringAlgorithms:\\n 0) ${scoringAlgorithms[0].name}: Each letter worths 1 point. \\n 1)${scoringAlgorithms[1].name}: Vowels worth 3 point each \\n 2)${scoringAlgorithms[2].name}: Uses scrabble point system`);\n\n let usrInput = input.question('Please select one of the calculator: ');\n //usrInput = usrInput.toUpperCase();\n let innerInput = initialPrompt();\n\n if(usrInput == 0){\n console.log('Algorithm name: '+scoringAlgorithms[0].name);\n console.log('Scoring Algorithm result: '+scoringAlgorithms[0].scoringFunction(innerInput));\n }else if(usrInput == 1){\n console.log('Algorithm name: '+scoringAlgorithms[1].name);\n console.log('Scoring Algorithm result: '+scoringAlgorithms[1].scoringFunction(innerInput));\n }else if(usrInput == 2){\n console.log('Algorithm name: '+scoringAlgorithms[2].name);\n console.log('Scoring Algorithm result: '+scoringAlgorithms[2].scoringFunction(innerInput));\n }else{\n console.log('Please use number between 0 to 2');\n }\n\n}", "title": "" }, { "docid": "8c21c0625b5626c25f00823240f8f364", "score": "0.6132923", "text": "onInput(input) {}", "title": "" }, { "docid": "cf8672d7b5fce4b0f0a551f983110ab0", "score": "0.6130705", "text": "handleInput(input) {\n switch (input) {\n\n case 'move_left':\n if (this.x > 0) {\n this.x -= this.move_x;\n }\n break;\n\n case 'move_up':\n if (this.y > this.move_y) {\n this.y -= this.move_y;\n }\n break;\n\n case 'move_right':\n if (this.x < this.move_x * 3) {\n this.x += this.move_x;\n }\n break;\n\n case 'move_down':\n if (this.y < this.move_y * 4) {\n this.y += this.move_y;\n }\n break;\n }\n }", "title": "" }, { "docid": "72204cf94385254a05153a885c6a0f8b", "score": "0.6130487", "text": "function userPrompt() {\n getLength();\n getCharacterTypes();\n}", "title": "" }, { "docid": "027ab25ce471a5875449ca7bfd7f51f2", "score": "0.61299753", "text": "function drawInputBoard() {\n endCtx.fillStyle = \"#f5f5f5\";\n endCtx.fillRect(0, 0, gameOverCanvas.width, gameOverCanvas.height);\n endCtx.fillStyle = \"#a62c07\";\n endCtx.font = \"20px arcadeclassic\";\n endCtx.textAlign = \"center\";\n\n let cursor = inputBuffer.length < 5 ? \"|\" : \"\";\n endCtx.fillText(\n \"NAME:\" + inputBuffer + cursor,\n gameOverCanvas.width / 2,\n 130\n );\n endCtx.fillText(\n \"SCORE:\" + that.score.value,\n gameOverCanvas.width / 2,\n 180\n );\n endCtx.font = \"15px arcadeclassic\";\n endCtx.fillText(\"PRESS ENTER TO SAVE!\", gameOverCanvas.width / 2, 270);\n }", "title": "" }, { "docid": "7826a270e0bb32b6505d285bbb9bb65c", "score": "0.61289966", "text": "function getNameFromInput()/*used for name extraction from HTML input */ {\n playerName = document.getElementById('Name').value;\n playerName ? console.log(`Hello, ${playerName}! Do you have quescions?`) : console.log('Hello guest! Do you have quescions?');\n document.getElementById(\"yBtn\").disabled = false; //yes button activation for future actions\n document.getElementById(\"nBtn\").disabled = false; //no button activation for future actions\n}", "title": "" }, { "docid": "427f4dd04a262e40535ef3a5a0b585ad", "score": "0.6128889", "text": "function processInput(event) {\n playerGuess = String.fromCharCode(event.charCode);\n console.log(playerGuess);\n}", "title": "" }, { "docid": "948ced275dad705f60b33882b2157e06", "score": "0.61268526", "text": "function keyOfAProg1 (){\n if (userInput1.value === \"A\" && userInput2.value === \"E\" && userInput3.value === \"F#m\" && userInput4.value === \"D\") {\n playTada();\n getRandomRight();\n setTimeout(function(){init();}, 3000);\n } else { displayInc.className = 'red'\n playWrong();\n getRandomWrong();\n setTimeout(function(){tryAgain();}, 3000);\n}\n}", "title": "" }, { "docid": "9d88f24291b0588ae192c309de2f0b3c", "score": "0.6119966", "text": "function getTextButton(){\n let inText = document.getElementById('inTextId').value; //Get input from html input inTextId.\n document.getElementById('inTextId').value = ''; //Empty input from previous input.\n \n if(gameOver === false){ //lock input if game is over.\n addTextToOutput('<br>'+inText); //Display input.\n goToRoom(inText) //Send input to goToRoom. \n }\n}", "title": "" }, { "docid": "0ddc7dcb9883da809cec066e032adee4", "score": "0.61182356", "text": "function initialPrompt() {\n // get some user input specfically a word for us to score\n console.log(\"Let's play some scrabble! Enter a word:\");\n}", "title": "" }, { "docid": "eea6faf42c0117377d1ad9901b952ffc", "score": "0.6113935", "text": "function movieInput(){\n\tvar userInputMovie = \"Mr Nobody\";\n\tif(process.argv.length > 3){\n\t\tuserInputMovie = process.argv[3]\n\t}\n\tmovieInfo(userInputMovie);\n}", "title": "" }, { "docid": "f5460ad4afdf593a4b75c1554442ceaf", "score": "0.6112117", "text": "function handlePersonalInput(inputText) {\n var inputs = inputText.toLowerCase().split(/\\s+/);\n\n for (var i = 0; i < inputs.length - 1; i++) { // -1 at inputs.length to accommodate for double parameter formatting.\n \n if (inputs[i] === \"clear\") {\n if (clearCookieOfType(inputs[i+1])) {\n i++;\n }\n continue;\n }\n\n if (inputs[i] === \"export\") {\n if (exportItemOfType(inputs[i+1])) {\n i++;\n }\n continue;\n }\n\n if (inputs[i] === \"remove\") {\n if (tryRemoveFromSaveMy(inputs[i+1])) {\n i++;\n }\n continue;\n }\n\n if (inputs[i] === \"armor\") {\n if (tryAddingToArmors(inputs[i+1])) {\n i++;\n }\n continue;\n }\n\n if (tryAddingToChars(inputs[i], inputs[i + 1])) {\n i++;\n continue;\n }\n if (tryAddingToWeps(inputs[i], inputs[i+1])) {\n i++;\n }\n }\n refreshRanking();\n}", "title": "" }, { "docid": "6b0779d394ffbfe45ab26bf21155dcfa", "score": "0.6110363", "text": "handleInput(key){\n if ( key === 'left' ){\n \t\tthis.x = this.x - 100;\n \t\tif ( this.x < 0 ){\n \t\t\tthis.x = 0;\n \t\t};\n \t};\n \tif ( key === 'right' ){\n \t\tthis.x = this.x + 100;\n \t\tif ( this.x > 400 ){\n \t\t\tthis.x = 400;\n \t\t};\n \t};\n \tif ( key === 'up' ){\n \t\tthis.y = this.y - 90;\n \t\tif ( this.y < 0 ){\n \t\t\tthis.y = 400;\n \t\t\tthis.x = 200;\n this.score+=1000;\n \t\t};\n if (this.score === 10000){\n this.changeChar('catgirl');\n } else if(this.score === 20000){\n this.changeChar('horn');\n } else if (this.score === 30000){\n this.changeChar('pink');\n } else if (this.score === 40000){\n this.changeChar('princess');\n }\n \t};\n \tif ( key === 'down' ){\n \t\tthis.y = this.y + 90;\n \t\tif ( this.y > 400 ){\n \t\t\tthis.y = 400;\n \t\t};\n \t};\n }", "title": "" }, { "docid": "b46192b45762d0b95fe01e3b1a80540f", "score": "0.6098765", "text": "function startTheGame(){\n\tvar inputValue = $('#userInput').val();\n\t// If the number is NaN like (\"five\" instead of 5), then:\n\tif (isNaN(inputValue)) {\n\t\tinputValue = prompt(\"Please pick a number instead of a word: \", +\"\");\n\t}\n \twhile ((inputValue % 1) !== 0) {\n\t\tinputValue = prompt(\"pick a number that has no decimals: \", +\"\");\n\t}\n\t$(\"#refactor\").html(''); //clean everything before running the next;\n\t$(\"#refactor\").append(\"Playing Fizz-Buzz Game from 1 to \" + inputValue + \"<br/>\");\n\n\t//calling the function\n\t$(\"#refactor\").append(pickNumber(inputValue));\n}", "title": "" }, { "docid": "1e37dc5b4b16aa652b7eec2152acd8d1", "score": "0.6095951", "text": "function checkInput() {\n if (!gameTimer) {\n gameTimer = setInterval(decrementTimer, 1000);\n }\n if (id(\"timer\").textContent !== \"0\") {\n let playerInput = id(\"game-input\").value;\n if (playerInput[playerInput.length - 1] === \" \") {\n id(\"game-input\").value = \"\";\n let gameWords = id(\"game-words\").textContent;\n let targetWord = gameWords.split(\" \")[0];\n id(\"game-words\").textContent = gameWords.substring(gameWords.indexOf(\" \") + 1);\n if (targetWord + \" \" === playerInput) {\n score += targetWord.length / AVG_WORD_LENGTH;\n }\n }\n }\n }", "title": "" }, { "docid": "a1d9462d35071a1fb1f6b089ab293774", "score": "0.6094815", "text": "_interfaceManager(key){\n if(key == 'Enter' & this.game.over & !this.game.snake.alive){\n document.getElementById('level').disabled = true\n this.score.setUpHighScores()\n this.game.restart()\n this.run()\n \n } else if (key == 'Enter' & this.game.over & this.game.snake.alive){\n document.getElementById('level').disabled = true\n this.score.setUpHighScores()\n this.game.over = false\n } else if (key == 'Feedback'){\n this.feedback.send('Feedback', 'snake')\n document.getElementById('Feedback').value = ''\n document.getElementById('Feedback').placeholder='Thank you!'\n \n }\n\n }", "title": "" } ]
97b0eaf4ebd0e63f9bebfaaba2bbc25b
: MENU DE INCIDENCIAS
[ { "docid": "cbe395048ecee3fd95c1ff170c187c24", "score": "0.607742", "text": "function toggleI() {\n $('#menuIncidencias').toggle();\n}", "title": "" } ]
[ { "docid": "2e8cbe78d883e2dabfae587837e78e6d", "score": "0.7007516", "text": "function initMenu()\n{\n\tcore_ativaBotaoAdicionaLinha(\"../php/menutemas.php?funcao=alteraTags\",\"adiciona\");\n\tcore_carregando(\"ativa\");\n\tcore_ativaPainelAjuda(\"ajuda\",\"botaoAjuda\");\n\tpegaTags();\n}", "title": "" }, { "docid": "1dfbc9b3758fd33d4ca9a6145e2bd4b9", "score": "0.6867831", "text": "function initMenu()\n{\n\tif(!letraAtual){\n\t\tletraAtual = \"\";\n\t}\n\tativaBotaoAdicionaMapfile(\"adiciona\");\n\tativaBotaoVerificarOrfaos(\"semmapfiles\");\n\tativaBotaoUploadGvsig(\"uploadGvsig\");\n\n\tcore_carregando(\"ativa\");\n\tcore_carregando($trad(\"msgBuscaTemas\",i3GEOadmin.core.dicionario));\n\tcore_ativaPainelAjuda(\"ajuda\",\"botaoAjuda\");\n\tcore_pegaMapfiles(\"montaArvore()\",letraAtual);\n}", "title": "" }, { "docid": "7229b9af7604cb0affe5d25b956a128d", "score": "0.6851302", "text": "function ingresarmenu(ruta){\n show2();//reloj\n bienvenido(ruta);//bienvenido al ingresar menu\n \n }", "title": "" }, { "docid": "064c874cc489f9e3100eb1f7f703fa76", "score": "0.67400175", "text": "function initCercaAcquisto() {\n /*$('#menu').menu({\n classes: {\n \"ui-menu\": \"highlight\"\n },\n items: \".custom-item\"\n });*/\n inizializzaMenu();\n impostaCategoria('#menuCategoriaRicerca', '#menu');\n}", "title": "" }, { "docid": "d665d106bc125bd83f7889f055f91eba", "score": "0.66431254", "text": "function salvarMenu(){\n\t\teliminarObjeto( \"salvarMenu\" );\n\t\tYAHOO.util.Event.onContentReady( \"salvarMenu\" , salvarMenu );\n\t\tcargarContenido( \"listado\" , \"./contenidos/administracion/listadoMenu.php\" , \"proyecto=\" + document.getElementById(\"proyecto\").value , true );\n\t}", "title": "" }, { "docid": "d96ad4856b6df89bf173af0e939f1591", "score": "0.66162336", "text": "function loadMenu() {\n\tisPage = \"main\";\n\n\tvar content = document.getElementById(\"content\")\n\tcontent.innerHTML = \"\";\n\tvar pel = p(markup[0].description)\n\tpel.classList.add(\"ingress\")\n\tcontent.appendChild(pel)\n\tfor (var view of markup) {\n\t\tcontent.appendChild(generateMenuItem(view))\n\t}\n\tcontent.appendChild(generateMenyItem2(translations['T_HISTORY'], translations['T_HISTORY_SHORT'], 'history', loadHistory))\n\tcontent.appendChild(generateMenyItem2(translations['T_CONTACT'], translations['T_CONTACT_SHORT'], 'contact', loadContact))\n\t\n\tvar mainHeader = '<a onclick=\"loadInfo();\" id=\"home\">Norea Sverige</a>';\n\tvar header = document.getElementById(\"header\");\n\theader.innerHTML = mainHeader;\n\theader.style[\"border-bottom\"] = \"1px solid #774\";\n}", "title": "" }, { "docid": "0c4b8bab38fba72687850d26204e86a8", "score": "0.62812686", "text": "displayOnMenu() {\n var albufeirasID = document.getElementById('albufeiras');\n var elementLi = document.createElement(\"li\");\n elementLi.className = \"components toggle\";\n var elementA = document.createElement(\"a\");\n elementA.className = \"albufeiraName\"\n var name = this.nome.split(\".\")[0];\n var text = document.createTextNode(name.charAt(0).toUpperCase() + name.slice(1));\n elementLi.id = name.charAt(0).toUpperCase() + name.slice(1);\n elementA.appendChild(text);\n elementLi.appendChild(elementA);\n albufeirasID.appendChild(elementLi);\n\n elementLi.onclick = this.displayInformation(this);\n\n document.getElementById(\"backToMap\").onclick = this.reloadMap(this);\n \n }", "title": "" }, { "docid": "d05e209a0ffecc49d9d0ce772410ee70", "score": "0.62794256", "text": "function opcMenu()\r\n{\r\n // cargamos el contenido de la pagina de recursos humanos\r\n $(\"#col-md-12\").load(\"rrhh.php\");\r\n // mostramos las opciones del menu de recursos humanos\r\n $(\"#rrhh\").show();\r\n // cambianos el bacground y color de la letra del titulo del menu de recursos humanos\r\n $(\"#rrhh\").parent(\"li\").css(\"background\", \"none repeat scroll 0 0 rgb(126, 126, 126)\");\r\n $(\"#rrhh\").parent(\"li\").children(\"a\").css(\"color\", \"#E6E6E6\");\r\n // cambiamos el color del background del primer item del menu de recursos humanos y el color de la letra.\r\n $(\"#rrhh li\").first().css(\"background\", \"none repeat scroll 0 0 rgb(126, 126, 126)\");\r\n $(\"#rrhh li a\").first().css(\"color\", \"#E6E6E6\");\r\n // escuchamos el menu para que cuendo se haga clic en uno de los items este habra la pagina correspondiente.\r\n $(\".navi li a\").on(\"click\", mostrarPagina);\r\n $(\".navi li a\").on(\"touch\", mostrarPagina);\r\n}", "title": "" }, { "docid": "8efb1684d96d781801e530c372c27529", "score": "0.62652963", "text": "function cambioSelectArbolMenu(){\n\t\t\n\t\t// Obtiene la proyecto seleccionada\n\t\tvar objProyecto = document.getElementById( \"proyectoArbol\" );\n\t\t\t seqProyecto = objProyecto.options[ objProyecto.selectedIndex ].value;\n\t\t\n\t\tvar txtParametros = \"proyecto=\" + seqProyecto + \"&\";\n\t\t\t\ttxtParametros += \"seqEditar=0\";\n\t\t\n\t\t// Muestra los nodos padres para que se seleccione uno al crear una opcion de menu\n\t\tcargarContenido('formulario', './contenidos/administracion/formularioMenu.php', txtParametros, true );\n\t\t\n\t\tllenarArbolMenu(); // instancia el objeto arbol y lo muestra\n\t\t\n\t}", "title": "" }, { "docid": "9eb9122cc22694c59e5c77ccdb6a05ba", "score": "0.6247752", "text": "function createCookingMenu(){\r\n addDevMenu(coccionMenu); \r\n const menuCoccion = Menu.buildFromTemplate(coccionMenu);\r\n Menu.setApplicationMenu(menuCoccion);\r\n}", "title": "" }, { "docid": "6187feb6a8c8a0dd5ab7298b401ee188", "score": "0.6216444", "text": "function getContextMenuCapitulo(){\n\t\n\tvar contextMenu;\n\tocultaContextMenu();\n\n\tif( hasPermisoEditarDerecho(\"DI\")){\n\t\tcontextMenu =[\n {\n\t\t\t'Ficha Técnica':{ \n\t\t\tonclick:getMenuFichaTecnica,\n\t\t\ticon: 'img/icon_ficha_tecnica.png'\n\t\t\t},\n//\t\t\t'Cabeceras Comerciales':{\n//\t\t\tonclick:getMenuCabeceraComercial,\n//\t\t\ticon: 'img/icon_sale.png'\n//\t\t\t},\n\t\t\t'Nuevo Derecho':{\n\t\t\tonclick:getMenuNuevoDerecho,\n\t\t\ticon: 'img/icon_new.png'\n\t\t\t}\n\t\t},\n\n jQuery.contextMenu.separator,\n {\n 'Cerrar':{title:'Cerrar'} \n }\n ];\n\t}else{\n\t\tcontextMenu =[\n {\n 'Ficha Técnica':{ \n onclick:getMenuFichaTecnica,\n \t icon: 'img/icon_ficha_tecnica.png'\n }\n },\n\n jQuery.contextMenu.separator,\n {\n 'Cerrar':{title:'Cerrar'} \n }\n ];\n\t}\n\t\n\treturn contextMenu;\n}", "title": "" }, { "docid": "1f1fb5c66cdcc7b79faa01bf7935e868", "score": "0.6216313", "text": "function serviceMenuPage() {\n generateServiceMenuPageHeader();\n generateServiceMenuPageMainContent();\n}", "title": "" }, { "docid": "187c0e718bd21ac203fdc9edb876208a", "score": "0.6208897", "text": "function getContextMenuCapituloComercial(){\n\t\n\tvar contextMenu;\n\tocultaContextMenu();\n\n\tif( hasPermisoEditarDerecho(\"DC\")){\n\t\tcontextMenu =[\n {\n 'Ficha Técnica':{ \n onclick:getMenuFichaTecnica,\n \t icon: 'img/icon_ficha_tecnica.png'\n },\n 'Nuevo Derecho':{\n \tonclick:getMenuNuevoDerecho,\n\t \ticon: 'img/icon_new.png'\n }\n },\n\n jQuery.contextMenu.separator,\n {\n 'Cerrar':{title:'Cerrar'} \n }\n ];\n\t}else{\n\t\tcontextMenu =[\n {\n 'Ficha Técnica':{ \n onclick:getMenuFichaTecnica,\n \t icon: 'img/icon_ficha_tecnica.png'\n }\n },\n\n jQuery.contextMenu.separator,\n {\n 'Cerrar':{title:'Cerrar'} \n }\n ];\n\t}\n\t\n\treturn contextMenu;\n}", "title": "" }, { "docid": "dda1a3035c0a5e0cc37abe05fd4bdd3e", "score": "0.6179954", "text": "function ocultoAlInicio() {\n // login\n $(\".loginError\").hide();\n $(\".logout\").hide();\n // secciones\n $(\"#catalogo\").hide();\n $(\"#administrador\").hide();\n $(\"#vendedor\").hide();\n $(\"#reportes\").hide();\n // menu principal\n $(\"#spanCatalogo\").hide();\n $(\"#spanVentas\").hide();\n $(\"#spanAdministracion\").hide();\n $(\"#spanReportes\").hide();\n}", "title": "" }, { "docid": "88effa9c5a5f901f90a0c1dae97f7df8", "score": "0.61389583", "text": "function menu_repositorio()\n{\n\t$(\"#\"+$(\".bread_menu\").attr(\"title\")).addClass(\"selecionado-ml\");\n\t$(\"#\"+$(\"#controle_anos\").attr(\"title\")).addClass(\"selecionado-ms\");\n}", "title": "" }, { "docid": "60c6dc18dd67aac86aac22bbe30f0739", "score": "0.6137141", "text": "function fromMenu(data) {\n var items = data.items;\n var totalVenta = data.totalVenta; // Monto original\n var cliente = data.cliente;\n var moneda = data.moneda;\n var aPagar = data.aPagar; // Convertido a la moneda seleccionada\n var descuento = data.descuento; // Descuentos otorgados\n var tipo = data.tipo; // Efectivo, debito, credito\n var vuelto = data.vuelto; // Solo sirve si entrego de la caja por otra moneda que no sea pesos\n var movimiento = {};\n var movimientos = [];\n var detalles = [];\n var detalle = {};\n var cuenta = '';\n var globals = $cookieStore.get('globals');\n var usuario = globals.currentUser.id;\n\n movimientos.push(MovimientoVenta.movimiento(items[0].cuenta, totalVenta - descuento, items[0].comentarios));\n\n if (data.aCuenta) {\n // Genera Entrada a clientes\n movimiento = MovimientoClientes.movimiento(totalVenta - descuento, cliente, globals.currentUser.id);\n } else if(tipo === '0'){\n // Genera Entrada a caja\n if (moneda.idMoneda !== 1) {\n // detalles de moneda a nivel de caja\n movimiento = MovimientoMonedas.movimiento(totalVenta - descuento,cliente, usuario, moneda.idMoneda, aPagar, moneda.cotizacion)\n }else{\n movimiento = MovimientoCaja.movimiento(totalVenta - descuento, globals.currentUser.id, 'Almacen, ingreso a Caja');\n\n }\n } else if(tipo==='1' || tipo==='2'){\n //Entrada a Bancos\n if(tipo==='1'){\n movimiento = MovimientoDebito.movimiento( totalVenta - descuento, cliente, usuario);\n }else{\n movimiento = MovimientoCredito.movimiento( totalVenta - descuento, cliente, usuario);\n }\n }\n\n movimientos.push(movimiento);\n\n\n // Entrego el cambio de moneda extrangera\n // Esto es un movimiento negativo de caja\n if(moneda.idMoneda !== 1 && vuelto!=0){\n // Genera Salida a caja\n movimiento = MovimientoMonedasVuelto.movimiento(vuelto);\n movimientos.push(movimiento);\n\n // Genera Salida a caja\n movimiento = MovimientoCaja.movimiento(vuelto * -1, usuario, 'Sobrante moneda extranjera');\n movimientos.push(movimiento);\n }\n\n\n // Genera descuento\n\n if(descuento > 0){\n movimientos.push(MovimientoDescuentos.movimiento(descuento));\n }\n console.log(movimientos);\n //saveMovimientos(movimientos);\n\n }", "title": "" }, { "docid": "cabd2067545d512e8a03b47748a32e8c", "score": "0.61071324", "text": "function initMenu(){\n}", "title": "" }, { "docid": "cd5ec8233835e396374edf42ab92d5ee", "score": "0.6065484", "text": "function getContextMenuPrograma(){\n\t\n\tvar contextMenu;\n\tocultaContextMenu();\n\n\tif( hasPermisoEditarDerecho(\"DI\")){\n\t\n\t\t// Primero busco el estado de la adquisición\n\t\t// Si es baja, no presento la opción de Ventanas de Programas\n\t\tif (this.target.attributes[\"estadoAdquisicion\"].value == ESTADO_ADQUISICION_ACTIVA){\n\t\t\tcontextMenu =[\n \t\t {\n \t\t 'Ficha Técnica':{ \n \t\t onclick:getMenuFichaTecnica,\n \t\t icon: 'img/icon_ficha_tecnica.png'\n \t\t },\n// \t\t 'Cabeceras Comerciales':{\n// \t\t \tonclick:getMenuCabeceraComercial,\n// \t\t \ticon: 'img/icon_sale.png'\n// \t\t },\n \t\t 'Ventanas de Programas':{\n \t\t \tonclick:getMenuVentanasProgramas,\n \t\t \ticon: 'img/icon_vent_novig.png'\n \t\t },\n \t\t 'Nuevo Derecho':{\n \t\t \tonclick:getMenuNuevoDerecho,\n \t\t \ticon: 'img/icon_new.png'\n \t\t },\n \t\t 'Aplicar plantilla':{\n \t\t \tonclick:getMenuAplicarPlantillaDerecho,\n \t\t \ticon: 'img/icon_briefcase.png'\n \t\t }\n \t\t },\n \t\t\n \t\t jQuery.contextMenu.separator,\n \t\t {\n \t\t 'Cerrar':{title:'Cerrar'} \n \t\t }\n \t\t ];\t\t\t\n\t\t}else{\n\t\t\tcontextMenu =[\n\t\t {\n\t\t 'Ficha Técnica':{ \n\t\t onclick:getMenuFichaTecnica,\n\t\t icon: 'img/icon_ficha_tecnica.png'\n\t\t },\n//\t\t 'Cabeceras Comerciales':{\n//\t\t \tonclick:getMenuCabeceraComercial,\n//\t\t \ticon: 'img/icon_sale.png'\n//\t\t },\n\t\t 'Nuevo Derecho':{\n\t\t \tonclick:getMenuNuevoDerecho,\n\t\t \ticon: 'img/icon_new.png'\n\t\t }\n\t\t },\n\t\t\n\t\t jQuery.contextMenu.separator,\n\t\t {\n\t\t 'Cerrar':{title:'Cerrar'} \n\t\t }\n\t\t ];\n\t\t}\n\t}else{\n\t\tcontextMenu =[\n \t {\n \t 'Ficha Técnica':{ \n \t onclick:getMenuFichaTecnica,\n\t icon: 'img/icon_ficha_tecnica.png'\n \t }\n// \t \t,\n// \t 'Cabeceras Comerciales':{\n// \t \tonclick:getMenuCabeceraComercial,\n//\t \ticon: 'img/icon_sale.png'\n// \t }\n \t },\n \t\n \t jQuery.contextMenu.separator,\n \t {\n \t 'Cerrar':{title:'Cerrar'} \n \t }\n \t ];\n\t}\n\treturn contextMenu;\n}", "title": "" }, { "docid": "7fe415d269b4abd73163bc31e91b2555", "score": "0.6018336", "text": "function addMenu (){\n document.getElementById(menu.position).innerHTML = menuHTML;\n }", "title": "" }, { "docid": "cbb6ade37fb4dbe56e68af249b13243c", "score": "0.60010505", "text": "function caricaMenu(typePiatto)\r\n{\r\nvar text = \"\";\r\nvar i;\r\nvar ca=\"pippo\";\r\n\r\nif(typePiatto==2)\r\n\tpiatti=secondi;\r\nelse\r\n\tif(typePiatto==3)\r\n\t\tpiatti=contorni;\r\n\telse\r\n\t\tif(typePiatto==4)\r\n\t\t\tpiatti=dessert;\r\n\t\telse\r\n\t\t\tpiatti=primi;\r\n\r\n\tfor (i = 0; i < piatti.length; i++) {\r\n\t\ttext=text+\"<div class='col-md-2 col-sm-3 col-xs-3'><div class='panel panel-primary' onclick='caricaDesc(\"+i+\",\"+typePiatto+\");blockMenuConfirm();'>\"\r\n\t\ttext=text+\"<div class='panel-heading'></div><div class='panel-body'><img src='img/\"+piatti[i]+\".jpg' class='img-responsive' style='with:100%' alt='Image'></div>\"\r\n\t\ttext=text+\"<div class='panel-footer'>\"+piatti[i]+\"</div></div></div>\";\r\n\t}\r\n\tdocument.getElementById(\"menu\").innerHTML = text;\r\n}", "title": "" }, { "docid": "49d78e6ae893a3bcb2f044f4a0238cd6", "score": "0.5990955", "text": "showMenu() {\n let me = this.icn3dui\n if (me.bNode) return\n\n if ($('#' + me.pre + 'mnlist')[0] !== undefined) $('#' + me.pre + 'mnlist')[0].style.display = 'block'\n if ($('#' + me.pre + 'mnLogSection')[0] !== undefined)\n $('#' + me.pre + 'mnLogSection')[0].style.display = 'block'\n if ($('#' + me.pre + 'cmdlog')[0] !== undefined) $('#' + me.pre + 'cmdlog')[0].style.display = 'block'\n //if($(\"#\" + me.pre + \"title\")[0] !== undefined) $(\"#\" + me.pre + \"title\")[0].style.display = \"block\";\n }", "title": "" }, { "docid": "18e336c54ef338b0beef0cd3db61ca40", "score": "0.59905416", "text": "function _showMenuItems() {\n\t\t// Dash and OrgAdmin view for admins\n\t\tif (DATAPORTEN.isSuperAdmin() || DATAPORTEN.isOrgAdmin()) {\n\t\t\tPAGE_DASHBOARD.init();\n\t\t\t$('#menuDashboard').removeClass('hidden').fadeIn();\n\t\t\t$('#menuDashboard').trigger('click');\n\t\t\t//\n\t\t\tPAGE_ORG_ADMIN.init();\n\t\t\t$('#menuOrgAdmin').removeClass('hidden').fadeIn();\n\t\t}\n\t\t// View for SuperAdmins\n\t\tif (DATAPORTEN.isSuperAdmin()) {\n\t\t\tPAGE_SUPER_ADMIN.init();\n\t\t\t$('#menuSuperAdmin').removeClass('hidden').fadeIn();\n\t\t}\n\n\t}", "title": "" }, { "docid": "c78b704685a2587415ec7b331d83d42f", "score": "0.59873974", "text": "function main()\n{\n\t\tshowMenus();\n}", "title": "" }, { "docid": "2f05acf5601642781fd89fd7749bc526", "score": "0.59854436", "text": "ofertasDominio(idDominio,nomeDominio,logoDominio){\n \n \n $(\".sidemenu nav ul li\").removeClass(\"ativo\");\n $(\"#menuImoveis\").addClass(\"ativo\");\n\n this._content.html(`\n \n <div class=\"container\">\n \n <div class=\"row view-principal\" view-name=\"view-principal\">\n <div class=\"col-12 wow fadeInUp\">\n <h1>Ofertas do domínio: <b>${nomeDominio}</b></h1>\n <p>\n <img src=\"${app.urlCdn}/${logoDominio}\" style=\"width:200px;\" />\n </p>\n \n\n <div class=\"row\">\n <div class=\"col-xl-7 col-lg-7 col-md-7 col-sm-7 col-12 offset-xl-5 offset-lg-5 offset-md-5 offset-sm-5\" style=\"padding-right:0px;\">\n \n \n\n <a href=\"javascript:void(0)\" style=\"float: right;\" onclick=\"app.adicionarOfertas()\" class=\"btn btn-primary\" title=\"Adicionar nova oferta\">\n <i class=\"fa fa-plus\"></i> Adicionar\n </a>\n\n\n\n <!-- BUSCA AVULSA -->\n <div class=\"busca-avulsa\">\n <div class=\"input-group mb-3\">\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">\n <i class=\"fa fa-search\" aria-hidden=\"true\"></i>\n </span>\n </div>\n <input type=\"text\" class=\"form-control\" placeholder=\"Faça uma pesquisa\" onkeyup=\"app.filtrotabela();\" id=\"filtroTabela\">\n </div>\n </div>\n <!-- BUSCA AVULSA -->\n \n </div>\n </div>\n <div class=\"table-responsive\">\n \n <table class=\"table table-striped\">\n\n <thead>\n <th>#</th>\n <th></th>\n\n <th>Views</th>\n <th>Cliques</th>\n <th>Compras</th>\n\n <th>Nome</th>\n <th>Tipo</th>\n <th><i class=\"fa fa-calendar\"></i> Início</th>\n <th>Valor</th>\n <th>CashBack</th>\n <th>Origem</th>\n <th style=\"width:190px;\">Ações</th>\n </thead>\n\n <tbody id=\"conteudoTabela\">\n ${this.carregandoTabela}\n </tbody>\n\n </table>\n\n </div>\n \n <div class=\"text-right\">\n <a href=\"javascript:void(0)\" onclick=\"app.adicionarOfertas()\" class=\"btn btn-primary\" title=\"Adicionar nova oferta\">\n <i class=\"fa fa-plus\"></i> Adicionar\n </a>\n\n \n \n </div>\n\n\n </div>\n </div>\n\n </div>\n\n `);\n\n this.animarTransicao();\n\n\n }", "title": "" }, { "docid": "85503c0a4493f4a57210a193774ca9ee", "score": "0.59718806", "text": "function mostrarPantallaCodificar(){\n let pantallaInicio= document.getElementById(\"bienvenida\"); \n pantallaInicio.style.display=\"none\";\n let pantallaCodificar= document.getElementById(\"pantallaCodificar\");\n pantallaCodificar.style.display=\"block\";\n let margen= document.getElementById(\"margen\");\n margen.style.display=\"block\";\n let menubotones= document.getElementById(\"menu\");\n menubotones.style.display=\"block\";\n \n }", "title": "" }, { "docid": "e89235790c6338d90ee3b59aca2daa78", "score": "0.59688675", "text": "function listenerArbolMenu(){\n\t\tllenarArbolMenu();\n\t\teliminarObjeto( \"listenerArbolMenu\" );\n\t\tYAHOO.util.Event.addListener(\"proyectoArbol\", \"change\", cambioSelectArbolMenu );\n\t\tYAHOO.util.Event.onContentReady( \"listenerArbolMenu\" , listenerArbolMenu );\n\t}", "title": "" }, { "docid": "db8cd7aa56ba60ac21e17bfbaee7ed04", "score": "0.5964353", "text": "function setComposeLabelsAndMenuItems() {\n // To field.\n document.l10n.setAttributes(\n document.getElementById(\"menu_showToField\"),\n \"show-to-row-main-menuitem\",\n { key: SHOW_TO_KEY }\n );\n document.l10n.setAttributes(\n document.getElementById(\"addr_toShowAddressRowMenuItem\"),\n \"show-to-row-extra-menuitem\"\n );\n document.l10n.setAttributes(\n document.getElementById(\"addr_toShowAddressRowButton\"),\n \"show-to-row-button\",\n { key: SHOW_TO_KEY }\n );\n\n // Cc field.\n document.l10n.setAttributes(\n document.getElementById(\"menu_showCcField\"),\n \"show-cc-row-main-menuitem\",\n { key: SHOW_CC_KEY }\n );\n document.l10n.setAttributes(\n document.getElementById(\"addr_ccShowAddressRowMenuItem\"),\n \"show-cc-row-extra-menuitem\"\n );\n document.l10n.setAttributes(\n document.getElementById(\"addr_ccShowAddressRowButton\"),\n \"show-cc-row-button\",\n { key: SHOW_TO_KEY }\n );\n\n // Bcc field.\n document.l10n.setAttributes(\n document.getElementById(\"menu_showBccField\"),\n \"show-bcc-row-main-menuitem\",\n { key: SHOW_BCC_KEY }\n );\n document.l10n.setAttributes(\n document.getElementById(\"addr_bccShowAddressRowMenuItem\"),\n \"show-bcc-row-extra-menuitem\"\n );\n document.l10n.setAttributes(\n document.getElementById(\"addr_bccShowAddressRowButton\"),\n \"show-bcc-row-button\",\n { key: SHOW_BCC_KEY }\n );\n}", "title": "" }, { "docid": "0b94173e0970e82996f24ff354975aff", "score": "0.5943397", "text": "function ativaMenu(){\r\n const menuMobile = document.querySelector('[data-link-menu]');\r\n\r\n //Toggle ativa caso não tenha e desativa caso tenha.\r\n menuMobile.classList.toggle('ativo');\r\n\r\n }", "title": "" }, { "docid": "2c6385c5920e0febebcde45fe6cf9bbf", "score": "0.5942013", "text": "function getContextMenuProgramaComercial(){\n\t\n\tvar contextMenu;\n\tocultaContextMenu();\n\n\tif( hasPermisoEditarDerecho(\"DC\")){\n\t\n\t\tcontextMenu =[\n\t {\n\t 'Ficha Técnica':{ \n\t onclick:getMenuFichaTecnica,\n\t icon: 'img/icon_ficha_tecnica.png'\n\t },\n//\t 'Cabeceras Comerciales':{\n//\t \tonclick:getMenuCabeceraComercial,\n//\t \ticon: 'img/icon_sale.png'\n//\t },\n\t 'Nuevo Derecho':{\n\t \tonclick:getMenuNuevoDerecho,\n\t \ticon: 'img/icon_new.png'\n\t }\n\t },\n\t\n\t jQuery.contextMenu.separator,\n\t {\n\t 'Cerrar':{title:'Cerrar'} \n\t }\n\t ];\n\t}else{\n\t\tcontextMenu =[\n \t {\n \t 'Ficha Técnica':{ \n \t onclick:getMenuFichaTecnica,\n\t icon: 'img/icon_ficha_tecnica.png'\n \t },\n// \t 'Cabeceras Comerciales':{\n// \t \tonclick:getMenuCabeceraComercial,\n//\t \ticon: 'img/icon_sale.png'\n// \t }\n \t },\n \t\n \t jQuery.contextMenu.separator,\n \t {\n \t 'Cerrar':{title:'Cerrar'} \n \t }\n \t ];\n\t}\n\treturn contextMenu;\n}", "title": "" }, { "docid": "7fdea3c83cae77858e23ab7d0162520e", "score": "0.5938676", "text": "function showMenu() {\n console.log(\"\\n\\n------------------------------------------------\");\n console.log(\"You can perform the following actions: \");\n for(let i = 0; i < MENU.length; i++) {\n console.log(`\\t${MENU[i].text}`);\n }\n}", "title": "" }, { "docid": "406b4856d4ee8bd1417d22d990b39318", "score": "0.59271234", "text": "function onOpen() {\n \n var menuEntries = [ {name: \"Gerar Proposta\", functionName: \"executeDocument\"}];\n //var email = [ {name: \"Enviar email\", functionName: \"sendEmail\"}];\n ss.addMenu(\"Proposta\", menuEntries);\n \n}", "title": "" }, { "docid": "21ae7f15d755acf059d0a5fbc89fe36b", "score": "0.592268", "text": "function construirNavegacionMenu(indice) {\n\n\t/*Funcion para la navegacion del menu*/\n\tvar delay=750;\n\tvar partes=Listado_ejercicios[indice].split(\"_\");\n\tvar leccion=partes[0];\n\tif(leccion.indexOf(\"index.\")!=-1)\n\t\tleccion=\"L1\";\n\n\tvar html_exer=\"<li onclick='cambiarNavegacionArriba(\"+indice+\")' style='cursor: pointer'><img src='../img/flecha_2.png'/></li>\";\n\tvar ejercicios=Barra_ejercicios[leccion];\n\tfor (var e=inicio,temp_html=\"\";e<finale;e++)\n\t\t{\n\n\t\t\ttemp_html=ejercicios[e].split(\"*\");\n\t\t\thtml_exer=html_exer+\"<li ><a href=\"+temp_html[0]+\">\"+temp_html[1]+\"</a></li>\"\n\t\t\t\n\t\t}\n\thtml_exer=html_exer+\"<li onclick='cambiarNavegacionAbajo(\"+indice+\")' style='cursor: pointer'><img src='../img/flecha_1.png'/></li>\"\n\t//$(\"ul li#exercises ul li:nth-child(\"+ejercicios.length+\") a\").css(\"background\",\"url(../img/flecha_1.png)\")\n\tvar html_nav=\"<ul>\"+\n\t\t\t \t\"<li><a href='index.html'>HOME</a></li>\"+\n\t\t\t \"<li id='unit'><a href='#'>UNIT</a>\"+\n\t\t\t \t\"<ul>\"+\n\t\t\t \t\"<li><a href='#'>UNIT 1</a></li>\"+\n\t\t\t \t\t\t// \"<li><a href='../../Unit2/index.html'>UNIT 2</a></li>\"+\n\t\t\t // \"<li><a href='#'>UNIT 3</a></li>\"+\n\t\t\t /*\"<li><a href='../../Unit4/index.html'>UNIT 4</a></li>\"+\n\t\t\t \"<li><a href='../../Unit5/index.html'>UNIT 5</a></li>\"+*/\n\t\t\t \"</ul>\"+\n\t\t\t \"</li>\"+\n\t\t\t \"<li id='lesson'><a href='#'>LESSON</a>\"+\n\t\t\t \t\"<ul>\"+\n\t\t\t \t\"<li><a href='L1_goals.html'>LESSON 1</a></li>\"+\n\t\t\t \t\t\t\"<li><a href='L2_goals.html'>LESSON 2</a></li>\"+\n\t\t\t \"<li><a href='L3_goals.html'>LESSON 3</a></li>\"+\n\t\t\t \"</ul>\"+\n\t\t\t \"</li>\"+\n\t\t\t \"<li id='exercises'>\"+\n\t\t\t \t\"<a href='#'>EXERCISES</a>\"+\n\t\t\t \t\"<ul>\"+html_exer+\"</ul><div id=\\\"barra\\\"></div>\"+\n\t\t\t \"</li>\"+\n\t\t\t /*\"<li id='games'><a href='#'>GAMES</a>\"+\n\t\t\t \t\"<ul>\"+\n\t\t\t \t\"<li><a href='#'>GAME 1</a></li>\"+\n\t\t\t \t\t\t\"<li><a href='#'>GAME 2</a></li>\"+\n\t\t\t \"<li><a href='#'>GAME 3</a></li>\"+\n\t\t\t \"</ul>\"+\n\t\t\t \"</li>\"+\n\t\t\t \"<li><a href='#''>HELP</a></li>\"+*/\n\t\t\t \"</ul>\";\n\n\tdocument.getElementsByTagName(\"nav\")[0].innerHTML=html_nav;\n\n\t//$(\"#depurar\").html(\"depuracion: \"+(finale - inicio)/ejercicios.length)\n\n\t$(\"div#barra\").css(\"height\",(((finale - inicio)/ejercicios.length)*548)+\"px\");\n\n\t$(\"li#exercises ul\").mouseover(function() {\n\n\t\t$(\"div#barra\").css(\"display\",\"block\");\n\t\toff=$(\"div#barra\").css(\"top\");\n\t\tt=parseInt(off);\n\n\t})\n\n\t$(\"li#exercises ul\").mouseout(function() {\n\n\t\t$(\"div#barra\").css(\"display\",\"none\");\n\n\t})\n\t//$(\"nav\").html(html_nav);\n\n}", "title": "" }, { "docid": "9d43e73f367e7be29025654c14de0917", "score": "0.591935", "text": "function mainMenuItem(){\n overviewMenuItem();\n}", "title": "" }, { "docid": "aeaf7aafad7e59f9566bcfe580973dad", "score": "0.59191895", "text": "function MenuAdmin(m, id){\n\tif(m == \"clicked: nuevo\"){\n\t\tNuevoAdmin();\n\t}else if(m == \"clicked: eliminar\"){\n\t\tEliminarAdmin();\n\t}else if(m == \"clicked: editar\"){\n\t\tEditarAdmin();\n\t}\n}", "title": "" }, { "docid": "009765685be7dcbe2333f0500b2204b0", "score": "0.59173363", "text": "function switchMenus()\n\t\t{\n\t\t\tif (document.getElementById('barista').style.display != \"none\") \n\t\t\t{\n\t\t\t\tdocument.getElementById('menu' ).style.paddingLeft=\"7%\";\n\t\t\t\tdocument.getElementById('barista').style.display=\"none\";\n\t\t\t\tdocument.getElementById('ementa' ).style.display=\"inline\";\n\t\t\t\tdocument.getElementById('jogos' ).style.display=\"inline\";\n\t\t\t\tdocument.getElementById('voltar' ).style.display=\"inline\";\n\t\t\t\tdocument.getElementById('conta' ).style.display=\"inline\";\n\t\t\t\tdocument.getElementById('musica' ).style.display=\"inline\";\t\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('menu' ).style.paddingLeft=\"0%\";\t\n\t\t\t\tdocument.getElementById('ementa' ).style.display=\"none\";\n\t\t\t\tdocument.getElementById('jogos' ).style.display=\"none\";\n\t\t\t\tdocument.getElementById('voltar' ).style.display=\"none\";\n\t\t\t\tdocument.getElementById('conta' ).style.display=\"none\";\n\t\t\t\tdocument.getElementById('musica' ).style.display=\"none\";\n\t\t\t\tdocument.getElementById('barista').style.display=\"inline\";\n\t\t\t};\n\t\t}", "title": "" }, { "docid": "c975acfd575dd8649032917f1a769713", "score": "0.59062344", "text": "function createSpreadsheetMenu() {\n var ui = SpreadsheetApp.getUi();\n ui.createMenu('ConsultorasMK')\n .addItem('Atualizacao', 'consultorasMK')\n .addToUi();\n}", "title": "" }, { "docid": "6e2d4b1265524f82507fd9917b88566f", "score": "0.5902873", "text": "function MenuComponerCategoria(id){\n\t$.contextMenu({\n selector: '#'+id, \n callback: function(key, options) {\n var m = key;\n $componer.EventosMenu(m, id);\n },\n items: {\n \t\"incluir\": {name: \"Incluir Selecciones\", icon: \"add\", accesskey: \"i\"}\n }\n });\n}", "title": "" }, { "docid": "b02aef2c594817c217ccbf74fe7c39a8", "score": "0.58994555", "text": "function verSubmenu(indice) {\n $(\"#contenido\").empty();\n for (row in menu[indice].submenus) {\n $(\"#contenido\").append('<div class=\"col s6 m4 l4\">' +\n '<div class=\"col s10 offset-s1 padding_submenus\" >' +\n '<div class=\"s12 center-align background_submenus_title\">' + menu[indice].submenus[row] + '</div>' +\n '<div class=\"s12 center-align background_submenus\"><a href=\"' + menu[indice].jsp[row] + '\"><i class=\"medium material-icons white-icon\">' + menu[indice].iconosSubmenus[row] + '</i></a><br></div>' +\n '</div>' +\n '</div>'\n );\n }\n}", "title": "" }, { "docid": "a9f8beb10d64669ea5eb7d4b03ab13fe", "score": "0.5897652", "text": "function MainMenu() {\n\t\n\t\n\tvar searchValue = Ext.getCmp('frmLogin').getValues().myki;\n\tTopUpStoreRef.load().filter('myki', searchValue);\n\t\n\tExt.getCmp('navView').push(Ext.create('a2.view.Main'));\n}", "title": "" }, { "docid": "87949a121d50776d7b03f3a8cfea0d1b", "score": "0.58883786", "text": "function configurarMenuBotaoJogar() {\n $('#jogar.botaoMenu').click(function(){\n menuPrincipal.hide();\n menuGravidade.fadeIn();\n });\n }", "title": "" }, { "docid": "6d51ecba7ac1c9afb1562965811ffdfb", "score": "0.58877724", "text": "function populateSubMenu(item, index) {\n \n chrome.contextMenus.create({\n \"title\": item.url,\n \"id\": index+\"_\",\n \"parentId\": \"MainMenu2\",\n \"contexts\":[\"editable\"]\n });\n\n chrome.contextMenus.create({\n \"title\": item.url,\n \"id\": index+\"\",\n \"parentId\": \"MainMenu\",\n \"contexts\":[\"editable\"]\n });\n\n}", "title": "" }, { "docid": "873ab7cfb9f88fe0ad9f66d333ffb6f3", "score": "0.5887172", "text": "function IPALEM_menuChange(event){\n\tvar menu = document.getElementById(\"IPALEM_menu\");\n\tipalem_global.menuIndex = new Array(menu.selectedIndex,menu.label);\n}", "title": "" }, { "docid": "8c2658930f69fa0d30dae196c53ff623", "score": "0.588425", "text": "function on_tool_menu_showing(){\r\n var doc = document.getElementById(\"content\").contentDocument;\r\n var menu = document.getElementById('kaizou-commands').firstChild;\r\n for (var i=0; i<menu.childNodes.length; i++)\r\n if (menu.childNodes.item(i).id.match(\"kaizou-tool-edit\")){\r\n if(doc.kaizou_started){\r\n menu.childNodes.item(i).hidden = false;\r\n }else{\r\n menu.childNodes.item(i).hidden = true;\r\n } \r\n }else{\r\n if(doc.kaizou_started){\r\n menu.childNodes.item(i).hidden = true;\r\n }else{\r\n menu.childNodes.item(i).hidden = false;\r\n } \r\n }\r\n}", "title": "" }, { "docid": "9441a5b8c1cf89e0e499043f05fbd045", "score": "0.58671325", "text": "function ctrlMenuLateral() {\n const menu = document.getElementById('menu-lateral');\n // Cambio la clase del menu\n menu.classList.toggle('menu-collapse');\n menu.classList.toggle('menu-expand');\n}", "title": "" }, { "docid": "663e4592c4a79841545b18cb69bbe99f", "score": "0.5866817", "text": "function clickedMenuItem() {\n\tshowTable(); // ripristino la tabella\n $('#formDatePicker').show();\n deleteClass_selected_fromMainmenu();\n //cancello tutto ad eccezione di quella delle ore:\n nascondi();\n $('td:nth-child(1),th:nth-child(1)').show();\n}", "title": "" }, { "docid": "203def0fbe243c251d92cd423a047963", "score": "0.58464366", "text": "function LoadMenu()\r\n{\r\n document.getElementById(\"submenu_\"+activeSubmenuItem).style.color = \"white\";\r\n document.getElementById(\"ActiveSubmenuItemIcon_\"+activeSubmenuItem).style.visibility = \"visible\";\r\n if(self.name.lastIndexOf(\"&\") == -1) {\r\n self.name = \"news=1&library=0&community=0&account=0&\";\r\n }\r\n FillMenuArray();\r\n InitializeMenu();\r\n}", "title": "" }, { "docid": "a7da39edf90112e6d0a4ad4f9bbeb4d1", "score": "0.58436704", "text": "function menu(){\n console.log(\"ENTRADA en menu\");\n\n var encabezado = document.getElementsByTagName(\"h1\");\n encabezado[0].innerHTML=this.innerHTML;\n \n document.title=this.innerHTML;\n }", "title": "" }, { "docid": "dcbcd30293e7f86f8301c823e6b5feb7", "score": "0.5832638", "text": "function onOpen() {\n DocumentApp.getUi() // Or DocumentApp or SlidesApp or FormApp.\n .createMenu('Custom Menu')\n .addItem('Exquiro', 'doGet')\n .addToUi();\n}", "title": "" }, { "docid": "32a8865b527f979d80d8b4b23dc03227", "score": "0.582977", "text": "function Menu(){\n\n if(menupresentation==1){\n MenuPresentation();\n } else if(menuselect==1){\n MenuSelect();\n } else if(menuplay==1){\n MenuPlay();\n } else if(menuregle==1){\n MenuRegle();\n } else if(menucontrole==1){\n MenuControle();\n } else if(menucredits==1){\n MenuCredits();\n } else if(menuperdu==1){\n MenuPerdu();\n }\n}", "title": "" }, { "docid": "f98f75b93fc915f01018824f109726bf", "score": "0.5827664", "text": "function habilitaTelaItem() {\n if (cliente != null) {\n document.getElementById(\"menu_painel\").style.display=\"none\";\n document.getElementById(\"selectCliente\").style.display = \"none\";\n document.getElementById(\"addItens\").style.display = \"block\";\n document.getElementById(\"informatacaoCliente\").style.display = \"block\";\n document.getElementById(\"infoNome\").value = cliente.PAR_A_RAZAOSOCIAL;\n selectProdutoCliente(cliente, \"produto_orcamento\", \"precoProduto\", \"unidadeProduto\", \"dlgproduto\");\n } else {\n Materialize.Toast.removeAll();\n Materialize.toast('Por favor selecione o cliente', 4000);\n }\n }", "title": "" }, { "docid": "d30885284767388a6a71b27518ff621e", "score": "0.5825554", "text": "function InitializeMenu()\r\n{\r\n for(menuItemName in menu[0]) {\r\n if(menu[0][menuItemName] == \"0\") {\r\n document.getElementById(menuItemName+\"_Submenu\").style.visibility = \"hidden\";\r\n document.getElementById(menuItemName+\"_Submenu\").style.display = \"none\";\r\n document.getElementById(menuItemName+\"_Lights\").style.visibility = \"visible\";\r\n document.getElementById(menuItemName+\"_Extend\").style.backgroundImage = \"url(\" + IMAGES + \"/general/plus.gif)\";\r\n }\r\n else {\r\n document.getElementById(menuItemName+\"_Submenu\").style.visibility = \"visible\";\r\n document.getElementById(menuItemName+\"_Submenu\").style.display = \"block\";\r\n document.getElementById(menuItemName+\"_Lights\").style.visibility = \"hidden\";\r\n document.getElementById(menuItemName+\"_Extend\").style.backgroundImage = \"url(\" + IMAGES + \"/general/minus.gif)\";\r\n }\r\n }\r\n}", "title": "" }, { "docid": "1774f0cd874a0c50e9e9ef9b4b175cb0", "score": "0.58251137", "text": "function menu() {\n //Je fais apparaitre le fond prune\n document.getElementById('blocMiddle').className ='blocMiddleOn';\n\n //Je fais disparaitre le bloc \"frise\"\n var frise = document.getElementById('frise');\n frise.style.display = \"none\";\n\n ////Apparition du btn croix\n //var btnOff = document.getElementById('btnOff');\n //btnOff.style.display = \"block\";\n\n //J'ajoute le contenu\n contenu();\n}", "title": "" }, { "docid": "270fdaee0b743276d1bce3055bfb2770", "score": "0.582015", "text": "function activarOpcionMenu() {\n var id = $('#navbar li.active').attr('id');\n $('#' + id).removeClass('active');\n $('#btn-articulos').addClass('active');\n}", "title": "" }, { "docid": "e47be5538a23f1c7f016cab1f409122b", "score": "0.5817767", "text": "function showMenu(top, left,options,deliverable) {\n $(\"<div id='menu' ></div>\").addClass(\"deliverableContextMenu\").css({ \"top\": top-10, \"left\": left-10 }).appendTo(\"#pageFrame\");\n // Declare an event handler for when you leave the menu\n $(\"#menu\").mouseleave(closeMenu);\n // load the options into the meu table\n loadOptions(options,deliverable);\n }", "title": "" }, { "docid": "5e98c5ba328449bcf0eedf24d4cfbbdc", "score": "0.58132803", "text": "function _mainMenuOnClick(event) {\n $(event.delegateTarget).parent().find('.active').removeClass('active');\n $(event.delegateTarget).addClass('active');\n $('.main-menu-content').hide();\n const contentSelector = `#${$(event.delegateTarget).data('target')}`;\n $(contentSelector).show();\n}", "title": "" }, { "docid": "7e401d1b76d38d514435820b267371da", "score": "0.58125174", "text": "function showMenuAccessKeys(){\n\t$(\"#menu\").html(menuAccessKeys);\n\tak.each(function() {\n\t\t$(this).attr('accesskey', $(this).data('ak'))\n\t})\n\t\n}", "title": "" }, { "docid": "0f7529d1536d6858fb04a489baf02d6d", "score": "0.58084965", "text": "function menuWhere(menu)\n\t{ \n\t// executa menu selecionado\n\tMENUSER[menu].acao();\n\t\n\t\n\t// seta o home\n\tif(menu == \"home\")\n\t\t{\n\t\tvar home = '<a onClick=\"menuWhere(\\'home\\');\"><img src=\"/img/ui/menu_home.png\" align=\"absmiddle\" title=\"'+MENUSER['home'].descrp+'\"></a>';\n\t\t$('#menu_top_home').html(home);\n\t\t\n\t\t// limpa modulo se for home\n\t\t$('#menu_top_modules').html(\"\");\n\t\treturn true;\n\t\t}\n\t\t\n\t// seta modulo\n\tvar modulo = '<a onClick=\"menuWhere(\\''+menu+'\\');\">'+MENUSER[menu].descrp+'</a>';\t\t\t\t\n\t$('#menu_top_modules').html(modulo);\n\t}", "title": "" }, { "docid": "4a871cc3eb2a24ea9e904a740e78dcd7", "score": "0.5807319", "text": "function menuPrincipal () {\n\t\n\t$(\"#empresas\").click(function(e){\n\t\te.preventDefault();\n\t\t$(\"#mostrar\").load(\"vistaEmpresa/submenuEmpresas.php\");\n \n\t});\n\n $(\"#ajustes\").click(function(e){\n\t\te.preventDefault();\n\t\t $(\"#mostrar\").load(\"php/submenuAjustes.php\");\n\t}); \n// FUNCION PARA CERRAR SESION \n\n\t$(\"#logaut\").click(function(e){\n\t\te.preventDefault();\n\tdocument.location.href=\"logaut.php\"\n\n\t});\n\n\t$(\"#selecciones\").click(function(e){\n\t\te.preventDefault();\n\t $(\"#mostrar\").load(\"vistaSelecciones/submenuSelecciones.php\");\n\t /* $(\"#selecciones\").css(\"background-color\",\"#BEC2C4\");*/\n\t \n\t}); \t\t\n\n\t}// FIN FUNCION", "title": "" }, { "docid": "2a8a7bf267285ced212b073901edccf3", "score": "0.58015895", "text": "function init() {\n\t\t_showMenuItems();\n\t}", "title": "" }, { "docid": "7fb37f41fe3b93a92d4ac7583d082de0", "score": "0.58010846", "text": "function drawMenu() {\n menu.forEach((item) => {\n item.show(); \n });\n}", "title": "" }, { "docid": "fdb44f400b3e48eb10a18fbe071fec43", "score": "0.57903147", "text": "function sair(opc){\r\n\t//console.log('Saindo...');\r\n\tswitch(opc){\r\n\t\tcase 1 : menuPrincipal = false;\r\n\t\tbreak;\r\n\t\tcase 2 : menuRelatorio = false;\r\n\t\tbreak;\r\n\t\tcase 3 : menuCompra = false;\r\n\t\tbreak;\r\n\t\tcase 4 : menuVendas = false;\r\n\t\tbreak;\r\n\t}\r\n\treturn(0);\r\n}", "title": "" }, { "docid": "3a4edfb58b386b85d489cd65b5d55698", "score": "0.57873017", "text": "function createMenu() {\n \n var loginScreen = document.getElementById('blackScreen');\n \n if (loginScreen)\n loginScreen.parentNode.removeChild(loginScreen);\n \n var lista = document.createElement('ul');\n lista.id = \"toolsList\";\n \n var container = document.getElementById('toolsMenu');\n container.appendChild(lista);\n \n \n \n with (moduli) {\n menuItems.each(function(item){\n if (menuItems.lastElement() === item)\n createMenuEntry(item, true);\n else\n createMenuEntry(item);\n });\n }\n \n /* Setto gli handler per il menu */\n setHandlerMenu();\n \n /* Setto gli handler per l'editor */\n addEditorEvent();\n \n document.getElementById('mainTable').style.display = \"\";\n DP.pipeElements.addFinalPipeElement();\n }", "title": "" }, { "docid": "14d5194f5beae7fd98609d11aeab4ec1", "score": "0.5782279", "text": "function createProductsMenu(){\r\n addDevMenu(productosMenu); \r\n const menuProductos = Menu.buildFromTemplate(productosMenu);\r\n Menu.setApplicationMenu(menuProductos);\r\n}", "title": "" }, { "docid": "377f68cbbc40f0aed227a0238ddfac76", "score": "0.5779072", "text": "function ocultarMenuDAD() {\n var menu = $(\"#MenuElementosDAD\");\n var botonMenu = $(\"#botonMenuDAD\");\n menu.hide();\n botonMenu.show();\n}", "title": "" }, { "docid": "38031865adf3837031a9e57d28637def", "score": "0.57767236", "text": "function loadMenuItem(){\n\tvar gebruikersnaam = window.sessionStorage.getItem(\"huidigeGebruiker\");\n\tvar url = \"restservices/gebruiker?Q1=\" + gebruikersnaam;\n\t\t$.ajax({\n\t\t\turl : url,\n\t\t\tmethod : \"GET\",\n\t\t\tbeforeSend : function(xhr) {\n\t\t\t\tvar token = window.sessionStorage.getItem(\"sessionToken\");\n\t\t\t\txhr.setRequestHeader('Authorization', 'Bearer ' + token);\n\t\t\t},\n\t\t\tsuccess : function(data) {\n\t\t\t\t$(data).each(function (index) {\n\t\t\t\t\tdocument.getElementById('gebruikersnaammenu').innerHTML = this.voornaam;\n\t\t\t\t\t\n\t\t\t\tif (this.role == \"admin\"){\n\t\t\t\t\tvar adminli = '<li><a href=\"ingredient-wijzigen.html\">Ingrediënt wijzigen</a></li>';\n\t\t\t\t\t$(\".autouser li:last-child\").before (adminli);\n\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tfail : function() {\n\t\t\t\tconsole.log(\"Failed\");\n\t\t\t},\n\t\t});\n}", "title": "" }, { "docid": "ba00af49e25f1cbf34ffe9c97ff38df9", "score": "0.5765717", "text": "function initContextMenus()\n{\n new Proto.Menu(\n {\n selector : '.level',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu(\n {\n selector : '.competency',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu(\n {\n selector : '.level_NA',\n className : 'menu desktop',\n menuItems : addMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu(\n {\n selector : '.level_NA_PL',\n className : 'menu desktop',\n menuItems : addMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n\n paras.each(Element.hide);\n }\n });\n new Proto.Menu(\n {\n selector : '.competency_NA',\n className : 'menu desktop',\n menuItems : addMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n\n new Proto.Menu(\n {\n selector : '.level_IP',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu(\n {\n selector : '.competency_IP',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu(\n {\n selector : '.level_NA_IP',\n className : 'menu desktop',\n menuItems : addMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n\n paras.each(Element.hide);\n }\n });\n\n new Proto.Menu(\n {\n selector : '.level_NA_PL_IP',\n className : 'menu desktop',\n\n menuItems : addMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n\n new Proto.Menu(\n {\n selector : '.competency_NA_IP',\n className : 'menu desktop',\n menuItems : addMenuItems,\n // array of menu items\n beforeShow : function(e)\n {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n}", "title": "" }, { "docid": "7f5551fbeefe4f9a9e85e6da0dea89e0", "score": "0.5764248", "text": "function getContextMenuDerechoComercial(){\n\t\n\tvar contextMenu;\n\tocultaContextMenu();\n\n\tif( hasPermisoEditarDerecho(\"DC\")){\n\t\tcontextMenu =[\n \t{\n \t 'Resumen Derecho':{ \n \t onclick:getMenuResumenDerechoComercial,\n \t \ticon: 'img/icon_detail.png' \n \t },\n \t 'Editar Derecho':{ \n \t \tonclick:getMenuEditarDerecho,\n \t \ticon: 'img/icon_edit.png' \n \t }\n \t},\n \tjQuery.contextMenu.separator,\n \t{\n \t 'Cerrar':{title:'Cerrar'} \n \t}\n \t];\n\t}else{\n\t\tcontextMenu =[\n \t{\n \t 'Resumen Derecho':{ \n \t onclick:getMenuResumenDerechoComercial,\n \t \ticon: 'img/icon_detail.png' \t \n \t },\n \t 'Consultar Derecho':{ \n \t \tonclick:getMenuEditarDerecho,\n \t \ticon: 'img/icon_detail.png' \n \t }\n \t},\n \tjQuery.contextMenu.separator,\n \t{\n \t 'Cerrar':{title:'Cerrar'} \n \t}\n \t];\n\t}\n\t\n\treturn contextMenu\n}", "title": "" }, { "docid": "a237a26c9466e52be364e9f4e8018d74", "score": "0.57640296", "text": "function install_menu() {\n var config = {\n name: 'wanikani_judegement_settings',\n submenu: 'Settings',\n title: 'Judgement Day',\n on_click: open_settings\n };\n wkof.Menu.insert_script_link(config);\n }", "title": "" }, { "docid": "6e7502dc02fd7379bf53fe0363338058", "score": "0.5763498", "text": "function menucatalogo()\n{\n $(\".logeo .menulogin li a\").removeClass(\"active\");\n $(\".navegacion .menu li a\").removeClass(\"active\");\n $(this).addClass(\"active\");\n seccioncatalogo();\n}", "title": "" }, { "docid": "2a9054ac39dc77f4d6a05f4dd78868d4", "score": "0.57614446", "text": "function menuGoster() {\n // oyunu durdur\n oyunuDurdur();\n // canvası gizle\n canvas.style.display = \"none\";\n // son ekranı gizle\n oyunSonuEkrani.style.display = \"none\";\n // menuyu göster\n menu.style.display = \"\";\n}", "title": "" }, { "docid": "bb6ebc143c2ab8e7c1f4a0b003ff32b5", "score": "0.5753292", "text": "getMenu({context, entities}) {\n return db.getMenu(context.pageID).then((result) => {\n return result;\n });\n }", "title": "" }, { "docid": "57ae213bb5af7f604672aa163a706124", "score": "0.57401526", "text": "function salirMenu() {\n if (confirm(\"¿Esta seguro de que quiere salir al menu?\")) {\n for (var mini in Game.global.control) {\n mini.haGanado = false\n }\n this.music.stop();\n Game.state.start('Menu');\n }\n }", "title": "" }, { "docid": "31ef1e73336d257c39cdd337e3f33e96", "score": "0.5737915", "text": "function click_lyrMenu_1_조회() {\n\n var args = {\n param: \"&argModel_cd=\" + l_current.param,\n target: [\n\t\t\t\t\t{\n\t\t\t\t\t type: \"GRID\",\n\t\t\t\t\t id: \"grdData_을지목록\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t type: \"GRID\",\n\t\t\t\t\t id: \"grdData_세부내역서\"\n\t\t\t\t\t}\n\t\t\t\t]\n };\n gw_com_module.objRetrieve(args);\n \n }", "title": "" }, { "docid": "7ab526930c69cb3d1d9ba9c0a3e81cba", "score": "0.57378685", "text": "showMenu() {\n this.mainMenu = !this.mainMenu;\n }", "title": "" }, { "docid": "ccf51489f945f1d18584d2077164918f", "score": "0.5723189", "text": "function click_lyrMenu_조회(ui) {\n\n processRetrieve({});\n\n }", "title": "" }, { "docid": "ccf51489f945f1d18584d2077164918f", "score": "0.5723189", "text": "function click_lyrMenu_조회(ui) {\n\n processRetrieve({});\n\n }", "title": "" }, { "docid": "b72717609ebd3b020a804836e855b02d", "score": "0.57142323", "text": "function opcaoMenu(){\n switch(contador % 2) {\n case 1:\n menu.style.marginLeft = '-32%';\n \n contador = 0;\n \n break;\n \n case 0:\n menu.style.marginLeft = '0%';\n \n contador = 1;\n \n break;\n \n default:\n console.log('Erro na aplicacao!');\n break;\n \n }\n }", "title": "" }, { "docid": "7976849a2314de2cb44ac7cea42dc315", "score": "0.5713279", "text": "function getMainMenu() {\n\tinTuto = false;\n\tinLab = false;\n\n\tmainLayer.add(tutorielH);\n\tmainLayer.add(tutorielB);\n\tmainLayer.add(recitH);\n\tmainLayer.add(recitB);\n\tmainLayer.add(laboratoireH);\n\tmainLayer.add(laboratoireB);\n\tmainLayer.add(conceptH);\n\tmainLayer.add(conceptB);\n\tmainLayer.add(fr_w);\n\tmainLayer.add(en_w);\n\tmainLayer.add(trait);\n\n\tactionLayer.add(tutoriel);\n\tactionLayer.add(recit);\n\tactionLayer.add(laboratoire);\n\tactionLayer.add(concept);\n\n\tmainLayer.draw();\n\tactionLayer.draw();\n}", "title": "" }, { "docid": "29a494e3ee070d16b10cf9a5e957345a", "score": "0.5710933", "text": "function leftmenu (){\n\tdocument.write(\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='module_menu'>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div><div><div><h3>Informations</h3><ul class='menu'><li ><a href='map.html'>Consultez le plan d'accès</a></li><li><a href='registration.html'>Mettez en ligne votre CV</a></li></ul>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div></div></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='module'>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div><div><div><h3>Votre Compte</h3><ul class='menu'><li class='item53'><a href='registration.html'>Créer un compte exposants</a></li><li><a href='registration.html'>Créer un compte visiteurs</a></li></ul>\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div></div></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='module'>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div><div><div><h3>Style</h3><ul class='menu'><li><a href='javascript:setActiveStyleSheet(\\\"css1\\\")'>Style 1</a></li><li> <a href='javascript:setActiveStyleSheet(\\\"css2\\\")'>Style 2</a></li><li><a href='javascript:setActiveStyleSheet(\\\"css3\\\")'>Style 3</a></li></ul>\t\t\t\t</div></div></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='module_menu'>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div><div><div><h3>Partenaires</h3><ul class='menu'><a href='http://www.chezmoicamarche.org'><img src='images/afij.jpg' /></a><a href='http://www.chezmoicamarche.org'><img src='img/apec.jpg' /></a><a href='http://www.chezmoicamarche.org'><img src='img/anpe.jpg' /></a><a href='http://www.chezmoicamarche.org'><img src='img/placeojeunes.jpg' /></a><br /><br /><li><a href='links.html'>Liste des écoles partenaires</a></li></ul><br />\t\t\t\t\t</div></div></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div><div class='module'>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div><div><div><h3>Identification</h3>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id='connected'></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<script>document.getElementById('connected').innerHTML = manageConnection();</script>\t\t\t\t\t\t\t\t\t</div></div></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\");\n}", "title": "" }, { "docid": "535c2fa9317fe60b463c3e18f198d4eb", "score": "0.5710688", "text": "function autenticacaoVendaFacede() {\r\n const situacao = autenticacaoLogin()\r\n VETORCODIGOITENSVENDA = []\r\n\r\n if (\r\n JSON.parse(situacao).tipo == 'Administrador' ||\r\n JSON.parse(situacao).tipo == 'Comum'\r\n ) {\r\n document.getElementById('janela2').innerHTML = telaVenda()\r\n pausarAtalhos()\r\n atalhosTeclaVenda()\r\n $('#submenu').slideUp(1000)\r\n setTimeout(function () {\r\n document.getElementById('mensagemSubMenu').innerHTML =\r\n '<p>Para liberar o menu pressione duas vezes a tecla \"B\" ou clique no botão abaixo!<br/>Pressione \"L\" para pesquisar produtos pelo nome.</p><button onclick=\"liberarSubMenu();\" type=\"button\" class=\"btn btn-outline-dark\"><span class=\"fas fa-list-ul iconsTam\"></span> Menu <span class=\"fas fa-caret-down iconsTam\"></span></button>'\r\n }, 1000)\r\n socketCodigoBarrasRealTime();\r\n } else {\r\n mensagemDeErro('Usuário não autorizado!')\r\n }\r\n}", "title": "" }, { "docid": "9bac11d02df3c0f1e4e791f992f8214e", "score": "0.57079047", "text": "function openMenu(evento, menuNome) {\r\n var i, x, tablinks;\r\n x = document.getElementsByClassName(\"menu\");\r\n for (i = 0; i < x.length; i++) {\r\n x[i].style.display = \"none\";\r\n }\r\n tablinks = document.getElementsByClassName(\"tablink\");\r\n for (i = 0; i < x.length; i++) {\r\n tablinks[i].className = tablinks[i].className.replace(\" red\", \"\");\r\n }\r\n document.getElementById(menuNome).style.display = \"block\";\r\n evento.currentTarget.firstElementChild.className += \" red\";\r\n }", "title": "" }, { "docid": "089e81204215924036c435867795eb96", "score": "0.570761", "text": "function menu() {\n inEnd = false;\n inStart = true;\n blubsi = new Blubsi(null);\n}", "title": "" }, { "docid": "8fac35620a73b99914c9e216ce68a22d", "score": "0.5705986", "text": "['getMenu'](sessionId, context, cb, entities) {\n\t\t\n\t\t\t//context.menuitems = 'Chinese, Japanese, Indian, Spanish, American'\n\t\t\tcontext.menuitems=menu_format;\n\t\t\tisMenuImagesSent=true;\n\t\t\n\t\t\n\t\tcb(context)\n\t}", "title": "" }, { "docid": "005abf4ac09654b5b02a78a2cb8e0b79", "score": "0.5705863", "text": "function enableMenu(){\n\tvar subhtml=window.lang.translate('select idevice for restore');\n\t\n\t$(\"#menu_div h4 a\").html(subhtml);\n\t$(\"#menu_div\").removeClass(\"ui-state-disabled\");\n\t$(\"#menu_div\").removeClass(\"ui-icon-myarrow-r\");\n}", "title": "" }, { "docid": "fb089639edf95baf98d12c442c202a17", "score": "0.5705485", "text": "function showLoggedInMenu() {\n $('div#loggedinmenu').css('display','inline');\n $('#menu').menu();\n }", "title": "" }, { "docid": "ed68715abfde67b9c6a75528230fc96b", "score": "0.5704955", "text": "function showMenu(items) {\n var menu = {\n '': { title: '-= Animal Guesser =-' },\n };\n for (var i in items) menu[i] = getMenuItem(items[i]);\n Pixl.menu(menu);\n }", "title": "" }, { "docid": "ce1f49c9b26170f8541c68ee01a2b591", "score": "0.5703465", "text": "function mostrarMenuDAD()\n{\n var menu = $(\"#MenuElementosDAD\");\n var botonMenu = $(\"#botonMenuDAD\");\n botonMenu.hide();\n menu.show();\n}", "title": "" }, { "docid": "33c44b72d6bf06b2f41c47d3bb004772", "score": "0.5703381", "text": "function menu_inicio(){\n $('#inicio').attr(\"disabled\", true); \n $(\"#entrar\").attr(\"disabled\", false);\n $(\"#generar\").attr(\"disabled\", false);\n $(\"#celda_ale\").attr(\"disabled\",true);\n $(\"#celda_act\").attr(\"disabled\",true);\n $(\"#compruebo_celdas\").attr(\"disabled\",true);\n $(\"#compongo_binario\").attr(\"disabled\",true);\n $(\"#resuelvo\").attr(\"disabled\",true);\n\n $(\"#inicio\").css('background', color_des);\n $(\"#entrar\").css('background',color_act);\n $(\"#generar\").css('background',color_act);\n $(\"#celda_ale\").css('background', color_des);\n $(\"#celda_act\").css('background', color_des);\n $(\"#compruebo_celdas\").css('background', color_des);\n $(\"#compongo_binario\").css('background', color_des);\n $(\"#resuelvo\").css('background', color_des);\n\n $(\"#pausa\").attr(\"disabled\", true);\n $(\"#pausa\").css('background', color_des);\n $(\"#reiniciar\").attr(\"disabled\", true);\n $(\"#reiniciar\").css('background', color_des);\n return\n}", "title": "" }, { "docid": "b14dc1da4adc7451b97336100c33fd1e", "score": "0.57006156", "text": "function menuOnclick() {\n \"use strict\";\n $('#verhuizen').click(function() { localStorage.categorie = \"verhuizen\"; });\n $('#samenwonen').click(function() { localStorage.categorie = \"samenwonen\"; });\n $('#housewarming').click(function() { localStorage.categorie = \"housewarming\"; });\n $('#home').click(function() { selectLinesMenu(\"home\"); });\n $('#overons').click(function() { selectLinesMenu(\"overons\"); });\n $('#hoeWerktHet').click(function() { selectLinesMenu(\"hoeWerktHet\"); });\n $('#contact').click(function() { selectLinesMenu(\"contact\"); });\n $('#homeLogo').click(function() { selectLinesMenu(\"home\"); });\n}", "title": "" }, { "docid": "598f36022360bd71239c4e70e2e5c162", "score": "0.56981415", "text": "function changeMenu(){\n document.getElementById('dataList').style.display = 'table';\n document.querySelector('div.content').classList.add('top-left');\n document.querySelector('div.title').style.display = 'inline-block';\n document.querySelector('div.links').style.display = 'inline-block';\n document.querySelector('div.title').classList.add('title-small');\n document.querySelector('div.title-small').classList.remove('title');\n}", "title": "" }, { "docid": "c0c8057d95d8dfbb35586585b09a4d11", "score": "0.5695922", "text": "function obtenerMenu(role){\n let menu= [\n {\n titulo: 'Principal',\n icono: 'md mdi-gauge',\n submenu: [\n { titulo: 'Dashboard', url: '/dashboard'},\n { titulo: 'ProgressBar', url: '/progress'},\n { titulo: 'Gráficas', url: '/graficas1'},\n { titulo: 'Promesas', url: '/promesas'},\n { titulo: 'RxJs', url: '/rxjs'},\n ]\n },\n {\n titulo: 'Mantenimiento',\n icono: 'md mdi-folder-lock-open',\n submenu: [\n // { titulo: 'Usuarios', url: '/usuarios'},\n { titulo: 'Hospitales', url: '/hospitales'},\n { titulo: 'Médicos', url: '/medicos'}\n ]\n }\n ];\n if (role === 'ADMIN_ROLE'){\n menu[1].submenu.unshift({ titulo: 'Usuarios', url: '/usuarios'});\n }\n return menu;\n}", "title": "" }, { "docid": "fbadcb4dd17b8410a509f9b8cded1442", "score": "0.5695786", "text": "function llenarArbolMenu(){\n\t\t// Obtiene la proyecto seleccionada\n\t\tvar objProyecto = document.getElementById( \"proyectoArbol\" );\n\t\t\t seqProyecto = objProyecto.options[ objProyecto.selectedIndex ].value;\n\t\t\n\t\t// Instancia el objeto TreeView sobre el div arbolMenu\n\t\tvar objArbol = new YAHOO.widget.TreeView(\"arbolMenu\");\n\t\t \n\t\t// Carga dinamicamente los hijos del arbol\n\t\t// se ejecuta cuando se intenta expandir uno de los nodos\n\t\tobjArbol.setDynamicLoad( obtenerHijosArbolMenu ); \n\t\t\n\t\t// cuando se hace click en un nodo del arbol se ejecuta esta funcion\n\t\tobjArbol.subscribe(\n\t\t\t\t\"labelClick\", \n\t\t\t\tfunction( objNodo ){ \n\t\t\t\t\tvar txtParametros = \"proyecto=\" + objNodo.data.proyecto + \"&\";\n\t\t\t\t\t\t\ttxtParametros += \"seqEditar=\" + objNodo.data.padre;\n\t\t\t\t\tcargarContenido('formulario', './contenidos/administracion/formularioMenu.php', txtParametros, true );\n\t\t\t\t}\t\n\t\t)\t\n\t\n\t\tvar objRaiz = objArbol.getRoot(); // obtiene el primer nodo del arbol \n\t \n\t\t// valores para el nodo raiz\n\t\tvar objConfiguracionNodo = { \n\t\t \tlabel: \"Opciones de Menu\",\n\t\t \tproyecto: seqProyecto,\n\t\t\tpadre: 0\n\t\t}; \n\t\t\n\t\t// Instancia el objeto raiz\n\t\tvar objPrimerNodo = new YAHOO.widget.TextNode( objConfiguracionNodo, objRaiz , true);\n\t\t\n\t\tobjArbol.render(); // dibuja el arbol ( en este caso no es necesario un objArbol.show() )\n\t\t\n\t}", "title": "" }, { "docid": "77b5c3ce53c500eba05e8329fb1f40fd", "score": "0.56926614", "text": "function showMenu(){\n\t$(\"#menu\").html(menu);\n\tak = $('[accesskey]').each(function() {\n\t\t$(this).data('ak', $(this).attr('accesskey')).removeAttr('accesskey')\n\t})\n\t\t\n}", "title": "" }, { "docid": "702dfa1173ac4087a7bc032a97767f73", "score": "0.5689628", "text": "function loadMainOptions() {\n var html = '<ul class=\"context-menu-items\">';\n html += '<li class=\"context-menu-item\"><a id=\"createdirectory\" class=\"context-menu-link\">Create Directory</a></li>';\n html += '<li class=\"context-menu-item\"><a id=\"createfile\" class=\"context-menu-link\">Create File</a></li><hr>';\n html += '<li class=\"context-menu-item\"><a id=\"paste\" class=\"context-menu-link\">Paste </a></li></ul>';\n $('.context-menu').html(html);\n}", "title": "" }, { "docid": "ba6ddb13bafaae8248030e7be362bf41", "score": "0.56895274", "text": "function afficherCacherSousMenu(numSM)\n{ \t\n\t\n\t\t\tfor (var i = 0; i<6; i++) \n \t\t{\n \t\t\tif (smTab[i]!=numSM)\n \t\t\t{\n \t\t\t\tif (smTab[i]!='sm0' && smTab[i]!='sm5')\n \t\t\t\t\tdocument.getElementById(smTab[i]).style.display='none';\n \t\t\t\t\tdocument.getElementById(smTab[i]).parentNode.style.backgroundColor='rgb(218,66,44)';\n \t\t\t}\n \t\t}\n\t\t\tif(document.getElementById(numSM).style.display=='none' || first)\n \t\t{\n \t\t\tif (numSM!='sm0' && numSM!='sm5')\n \t\t\t\tdocument.getElementById(numSM).style.display='inline';\n \t\t\tdocument.getElementById(numSM).parentNode.style.backgroundColor='black';\n first=0;\n \t\t}\n \t else\n \t\t{ \n \t\t\tif (numSM!='sm0' && numSM!='sm5')\n \t\t\t{\n \t\t\t\tdocument.getElementById(numSM).style.display='none';\n \t\t\t\tdocument.getElementById(numSM).parentNode.style.backgroundColor='rgb(218,66,44)';\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tdocument.getElementById(numSM).parentNode.style.backgroundColor='black';\n \t\t\t}\n \t\t}\n\n}", "title": "" }, { "docid": "cf4e6ca8d9fec3a50aed64b74cafe78c", "score": "0.5689463", "text": "function _mVx_Menu_ouvrir(_element_declencheur) { \r\n\t\r\n\tmVx_masquerCombos();\r\n\tif(_element_declencheur.parent.parent == null) {\r\n\t\t/* si on est dans la barre de menu horizontal */\r\n\t\tif(this.ancre.type == MenuHorizontal) { \r\n\t\t\t/****** by EM ****** ajouté dans cette version */\r\n\t\t\tif(mVx_ie && mVx_ie_version >= 5.5) {\r\n\r\n\t\t\t\tif (Menu_Horizontal_Application == true) {\r\n\t\t\t\t\t/*************************************/\r\n\t\t\t\t\t/* QUE POUR LES APPLICATIONS !!!!!!! */\r\n\t\t\t\t\tthis.getObjetHTML().style.left = (document.getElementById(\"zoneMenus\").offsetLeft + _element_declencheur.getObjetHTML().offsetLeft) + \"px\";\r\n\t\t\t\t\t/*************************************/\r\n\t\t\t\t} else {\r\n\t\t\t\t\t/*************************************/\r\n\t\t\t\t\t/* Menu Horizontal normal !!! */\r\n\t\t\t\t\t/*this.getObjetHTML().style.left = (24 + document.getElementById(\"zoneMenus\").offsetLeft + _element_declencheur.getObjetHTML().offsetLeft) + \"px\";*/\r\n\t\t\t\t\t/* correction le 12/02/2007 pour resoudre le décalage du niveau 1 vers la droite suite modif pour ecran 1024 */\r\n\t\t\t\t\tthis.getObjetHTML().style.left = (0 + document.getElementById(\"zoneMenus\").offsetLeft + _element_declencheur.getObjetHTML().offsetLeft) + \"px\";\r\n\t\t\t\t\t/*************************************/\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthis.getObjetHTML().style.left = _element_declencheur.getObjetHTML().offsetLeft + \"px\";\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar Decalage = \"\";\r\n\t\t\tif(mVx_ie && mVx_ie_version >= 5.5) {\r\n\t\t\t\tvar ozoneMenus = document.getElementById(\"zoneMenus\");\r\n\t\t\t\t/* Pour IE car il ne voit pas la hauteur du div !!!! */\r\n\t\t\t\tDecalage = (fDomOffset (ozoneMenus, 'offsetTop') + 16) + \"px\";\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tDecalage = (document.getElementById(\"zoneMenus\").offsetTop + 16) + \"px\";\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\tthis.getObjetHTML().style.top = Decalage;\r\n\t\t\t/********************/\r\n\t\t\t\r\n\t\t\tif(mVx_ie && mVx_ie_version >= 5.5) {\r\n\t\t\t\t/* V1\r\n\t\t\t\tthis.getIframeHTML().style.left = (_element_declencheur.getObjetHTML().offsetLeft + 25) + \"px\";\r\n\t\t\t\t*/\r\n\t\t\t\tthis.getIframeHTML().style.left = this.getObjetHTML().style.left;\r\n\t\t\t\t\r\n\t\t\t\t/* Ajouté dans cette version */\r\n\t\t\t\tthis.getIframeHTML().style.top = this.getObjetHTML().style.top;\r\n\t\t\t\t/********************/\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* si on est dans la barre de menu vertical niveau 1 */\r\n\t\telse {\r\n\r\n\t\t\t/****** by EM ******\r\n\t\t\tCf article http://msdn.microsoft.com/library/default.asp?url=/workshop/author/css/overview/measurementandlocation.asp !!!!!\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tvar Decalage = \"\";\r\n\t\t\tif(mVx_ie && mVx_ie_version >= 5.5) {\r\n\t\t\t\t/* Pour IE car il ne voit pas la largeur de la colonne de gauche !!!! */\r\n\t\t\t\tvar onomDIVGauche = document.getElementById(nomDIVGauche);\t\r\n\t\t\t\tDecalage = (fDomOffset (onomDIVGauche, 'offsetLeft') + document.getElementById(nomDIVGauche).offsetWidth) + \"px\";\r\n\t\t\t} else {\r\n\t\t\t\t/* \r\n\t\t\t\tmodif 2008_07_21 ajout de test version FireFox/3.X\r\n\t\t\t\t*/\r\n\t\t\t\tvar firefox = navigator.userAgent;\r\n\t\t\t\tif(firefox.match(\"Firefox/3.\")!=null){\r\n\t\t\t\t\tDecalage = document.getElementById(nomDIVGauche).parentNode.offsetLeft + document.getElementById(nomDIVGauche).offsetWidth + \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tDecalage = document.getElementById(nomDIVGauche).offsetLeft + document.getElementById(nomDIVGauche).offsetWidth + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t\t/********************/\r\n\t\t\t\r\n\t\t\tthis.getObjetHTML().style.left = Decalage;\r\n\r\n\r\n\t\t\t/*\r\n\t\t\tthis.getObjetHTML().style.top = (_element_declencheur.getObjetHTML().offsetTop + mVx_style_top_menuv + mVx_decalage_sousMenu_top) + \"px\";\r\n\t\t\t*/\r\n\r\n\t\t\t/****** by EM ********/\r\n\t\t\tvar DecalageTop = \"\";\r\n\t\t\tif(mVx_ie && mVx_ie_version >= 5.5) {\r\n\t\t\t\t/* Pour IE car il ne voit pas la largeur de la colonne de gauche !!!! */\r\n\t\t\t\tDecalageTop = (fDomOffset (onomDIVGauche, 'offsetTop') + _element_declencheur.getObjetHTML().offsetTop - 1) + \"px\";\r\n\t\t\t} else {\r\n\t\t\t\t/* \r\n\t\t\t\tmodif 2008_07_21 ajout de test version FireFox/3.X\r\n\t\t\t\t*/\r\n\t\t\t\tvar firefox = navigator.userAgent;\r\n\t\t\t\tif(firefox.match(\"Firefox/3.\")!=null){\r\n\t\t\t\t\tDecalageTop = (document.getElementById(nomDIVGauche).parentNode.offsetTop + _element_declencheur.getObjetHTML().offsetTop) -1+ \"px\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tDecalageTop = (document.getElementById(nomDIVGauche).offsetTop + _element_declencheur.getObjetHTML().offsetTop) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.getObjetHTML().style.top = DecalageTop;\r\n\t\t\t/********************/\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\t/* menu horizontal*/\r\n\t\tif(this.ancre.type == MenuHorizontal) {\r\n\t\t\tthis.getObjetHTML().style.left = (_element_declencheur.parent.getObjetHTML().offsetLeft +_element_declencheur.parent.getObjetHTML().offsetWidth + mVx_decalage_sousMenu_left) + \"px\";\r\n\t\t\tthis.getObjetHTML().style.top = (_element_declencheur.parent.getObjetHTML().offsetTop + _element_declencheur.getObjetHTML().offsetTop) + \"px\";\r\n\r\n\t\t\tif(mVx_ie && mVx_ie_version >= 5.5) {\r\n\t\t\t\t/* V1\r\n\t\t\t\tthis.getIframeHTML().style.left = (_element_declencheur.parent.getObjetHTML().offsetLeft + _element_declencheur.parent.getObjetHTML().offsetWidth + mVx_decalage_sousMenu_left) + \"px\";\r\n\t\t\t\t*/\r\n\t\t\t\tthis.getIframeHTML().style.left = this.getObjetHTML().style.left;\r\n\t\t\t\t/* V1\r\n\t\t\t\tthis.getIframeHTML().style.top = (_element_declencheur.parent.getObjetHTML().offsetTop+_element_declencheur.getObjetHTML().offsetTop) + \"px\";\r\n\t\t\t\t*/\r\n\t\t\t\tthis.getIframeHTML().style.top = this.getObjetHTML().style.top;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* Sous menu vertical niveau 2 et plus */\r\n\t\telse {\r\n\t\t\t//alert(_element_declencheur.parent.id + \" : \" + this.getObjetHTML().style.left + \" <--- \" + _element_declencheur.parent.getObjetHTML().offsetLeft + \" \" + _element_declencheur.parent.getObjetHTML().offsetWidth + \" \" + mVx_decalage_sousMenu_left);\r\n\t\t\tthis.getObjetHTML().style.left = (_element_declencheur.parent.getObjetHTML().offsetLeft + (_element_declencheur.parent.getObjetHTML().offsetWidth) + mVx_decalage_sousMenu_left) + \"px\";\r\n\t\t\tthis.getObjetHTML().style.top = (_element_declencheur.parent.getObjetHTML().offsetTop + _element_declencheur.getObjetHTML().offsetTop + mVx_decalage_sousMenu_top) + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t/* apparition du sous menu*/\r\n\tthis.getObjetHTML().style.zIndex= mVx_zIndex_haut;\r\n\tthis.getObjetHTML().style.visibility= \"visible\";\r\n\t\r\n\t/* La frame devient visible et masque la listBox que pour IE !!!!! */\r\n\tif(mVx_ie && mVx_ie_version >= 5.5) {\r\n\t\tthis.getIframeHTML().style.left = this.getObjetHTML().style.left;\r\n\t\tthis.getIframeHTML().style.top = this.getObjetHTML().style.top;\r\n\t\tthis.getIframeHTML().style.visibility= \"visible\";\r\n\t\tthis.getIframeHTML().style.zIndex = mVx_zIndex_haut - 1;\r\n\t\tthis.getIframeHTML().style.width = this.getObjetHTML().offsetWidth;\r\n\t\tthis.getIframeHTML().style.height = this.getObjetHTML().offsetHeight;\r\n\t}\r\n}", "title": "" }, { "docid": "218fe1a0d26bc8466a3afb3ac5715640", "score": "0.5685886", "text": "function showAsideAttivitaComponenteNormativa(){\n\t\n\tvar idTipo = $('#comboTipoNormativa option:selected').val();\n\tvar idTipoDescrizione = $('#comboTipoNormativa option:selected').text();\n\t\n\tif(idTipo == 1){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getCircolariInpsAssociateAsideList', 'acNormativaAsideDiv', null, 'initProcessoCircolariInps');\n\t}\n\tif(idTipo == 2){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getNoteDecretiAssociateAsideList', 'acNormativaAsideDiv', null, 'initProcessoNoteDecreti');\n\t}\n\tif(idTipo == 3){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getMessaggiInpsAssociateAsideList', 'acNormativaAsideDiv', null, 'initProcessoMessaggiInps');\n\t}\n\tif(idTipo == 4){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getLeggiDecretiAssociateAsideList', 'acNormativaAsideDiv', null, 'initProcessoLeggiDecreti');\n\t}\n\t\n\t\n\t//loadDiv('/CruscottoAuditAtpoWebWeb/getNormativeACAssociateAsideList?idClasse=1&idTipo='+idTipo, 'acNormativaAsideDiv', null, 'initAttivitaComponenteNormativa');\n\t\n\t$('.modalAttivitaComponenteNormativa').css(\"display\", \"block\");\n\tjQuery('.menu-sx-levelone-facility.add').animate({marginRight:'0'}, 400);\n\t if(contOne){\n\t\t jQuery('.menu-sx-levelone-facility.add').animate({marginRight:'0'}, 400);\n\t\t contOne = false;\n\t }else{\n\t \n\t\t $('.modalAttivitaComponenteNormativa').css(\"display\", \"none\");\n\t contOne = true;\n\t }\n\t \n\t $('#titoloACAside').text('ASSOCIAZIONE ATTIVITA COMPONENTE - NORMATIVA (' + idTipoDescrizione + ')');\n\t\n}", "title": "" }, { "docid": "359cc22c8ea3c52b33d94fb520655025", "score": "0.56856185", "text": "function seleccionarArbolCCostos()\r\n{\r\n myDiv=document.getElementById('menuActCCostos');\r\n myDiv.innerHTML = \" \";\r\n tree=new dhtmlXTreeObject(\"menuActCCostos\",\"100%\",\"100%\",0);\r\n tree.setImagePath(\"../../../../fastmedical_front/imagen/icono/tree/\");\r\n tree.attachEvent(\"onClick\", function(){\r\n clickVerCcostos(tree.getSelectedItemId(),tree.getSelectedItemText());\r\n document.getElementById(\"divBotonNew\").style.visibility='visible';\r\n document.getElementById(\"divBotonEditar\").style.visibility='visible';\r\n document.getElementById(\"divBotonEliminar\").style.visibility='visible';\r\n disableNuevoItem();\r\n return true;\r\n }\r\n )\r\n tree.loadXML(\"../../../../carpetaDocumentos/arbol_centroCostos.xml\");\r\n tree.openAllItems(0);\r\n document.getElementById(\"txtArbol\").value=\"Activo\";\r\n}", "title": "" }, { "docid": "9cf99f0e867aac684979005d6a5a3f61", "score": "0.5683545", "text": "function inicializar()\n{\n/* OPCION HOME */\n\n var home;\n home=$(\"#home\");\n home.click(menuhome);\n menuhome();\n $(\".navegacion .menu li a#home\").addClass(\"active\");\n\n\n/* OPCION CATALOGO */\n\n var catalogo;\n catalogo=$(\"#catalogo\");\n catalogo.click(menucatalogo);\n\n\n/* OPCION OFERTAS */\n\n var ofertas;\n ofertas=$(\"#ofertas\");\n ofertas.click(menuofertas);\n\n\n/* OPCION CONTACTO */\n\n var contacto;\n contacto=$(\"#contacto\");\n contacto.click(menucontacto);\n\n\n/* OPCION LOGIN */\n\n var login;\n login=$(\"#login\");\n login.click(menulogin);\n}", "title": "" }, { "docid": "69efa2fd59af2e089e7e0b62c1b9e6ba", "score": "0.5679087", "text": "function navigation_select() {\n if (Data.navigation.filter != null) {\n if (Data.navigation.filter.placeholder != null) {\n var t;\n // Ajout du placeholder pour application de sa taille\n Data.navigation.filter.dropdownlist.appendChild(\n Data.navigation.filter.placeholder\n );\n t = Data.navigation.filter.placeholder.getElementsByClassName(\n 'epjs_option'\n )[0];\n // Ouverture du menu hors de la zone visible\n Data.navigation.filter.button.tag.style.width = '';\n Data.navigation.filter.dropdown.style.position = 'absolute';\n Data.navigation.filter.dropdown.style.transform =\n 'translate(-9000px, 0)';\n Data.navigation.filter.container.setAttribute('data-open', 'true');\n Data.navigation.filter.placeholder.style.display = 'inline-block';\n t.removeAttribute('data-disabled');\n Data.navigation.filter.container.style.maxWidth =\n Data.navigation.filter.placeholder.offsetWidth + 60 + 'px';\n // Fermeture du menu\n Data.navigation.filter.container.removeAttribute('data-open');\n Data.navigation.filter.dropdown.style.position = '';\n Data.navigation.filter.dropdown.style.transform = '';\n Data.navigation.filter.dropdown.style.minWidth =\n Data.navigation.filter.container.offsetWidth + 'px';\n Data.navigation.filter.dropdown.style.width =\n Data.navigation.filter.container.offsetWidth + 'px';\n // Suppression du placeholder apres le calcul\n t.setAttribute('data-disabled', true);\n Data.navigation.filter.dropdownlist.removeChild(\n Data.navigation.filter.placeholder\n );\n } else {\n Data.navigation.filter.container.style.maxWidth = '';\n }\n }\n }", "title": "" } ]
63b82e75aecb1dccaf91036169d319be
Context may be "window", "page", "div", or "local"/null Result is in "div" coords
[ { "docid": "f55e72867bc77ea1da7343de252a3e05", "score": "0.6487488", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = getRect(cm.display.sizer);\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = getRect(cm.display.lineSpace);\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" } ]
[ { "docid": "2a6f9e93b2a142fd41ee157609d175e7", "score": "0.6911539", "text": "function fromCoordSystem(cm,coords,context){if(context==\"div\"){return coords;}var left=coords.left,top=coords.top;// First move into \"page\" coordinate system\nif(context==\"page\"){left-=pageScrollX();top-=pageScrollY();}else if(context==\"local\"||!context){var localBox=cm.display.sizer.getBoundingClientRect();left+=localBox.left;top+=localBox.top;}var lineSpaceBox=cm.display.lineSpace.getBoundingClientRect();return{left:left-lineSpaceBox.left,top:top-lineSpaceBox.top};}", "title": "" }, { "docid": "2a6f9e93b2a142fd41ee157609d175e7", "score": "0.6911539", "text": "function fromCoordSystem(cm,coords,context){if(context==\"div\"){return coords;}var left=coords.left,top=coords.top;// First move into \"page\" coordinate system\nif(context==\"page\"){left-=pageScrollX();top-=pageScrollY();}else if(context==\"local\"||!context){var localBox=cm.display.sizer.getBoundingClientRect();left+=localBox.left;top+=localBox.top;}var lineSpaceBox=cm.display.lineSpace.getBoundingClientRect();return{left:left-lineSpaceBox.left,top:top-lineSpaceBox.top};}", "title": "" }, { "docid": "a28b2b8665959d5c4b7c707d5b64804d", "score": "0.6604793", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "fc08fe373944cf21fbaf17a08ab9b120", "score": "0.65747607", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX(doc(cm));\n top -= pageScrollY(doc(cm));\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "fc08fe373944cf21fbaf17a08ab9b120", "score": "0.65747607", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX(doc(cm));\n top -= pageScrollY(doc(cm));\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "46dc888a4f015fd22b3659d2c0b96719", "score": "0.65680045", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }", "title": "" }, { "docid": "4021b9a2e0400b8acf8308900011c465", "score": "0.6563145", "text": "function fromCoordSystem(cm, coords, context) {\r\n if (context == \"div\") return coords;\r\n var left = coords.left, top = coords.top;\r\n // First move into \"page\" coordinate system\r\n if (context == \"page\") {\r\n left -= pageScrollX();\r\n top -= pageScrollY();\r\n } else if (context == \"local\" || !context) {\r\n var localBox = cm.display.sizer.getBoundingClientRect();\r\n left += localBox.left;\r\n top += localBox.top;\r\n }\r\n\r\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\r\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\r\n }", "title": "" }, { "docid": "05212b404a14f2a1218304d8ab40a394", "score": "0.6560656", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "05212b404a14f2a1218304d8ab40a394", "score": "0.6560656", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "a0f21263e165e1715f46aab0962c9cee", "score": "0.65533197", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") {\n return coords;\n }\n var left = coords.left,\n top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return { left: left - lineSpaceBox.left, top: top - lineSpaceBox.top };\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "919f05ed0249c876d358d88d28f61969", "score": "0.6552844", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "cd40f961fed49babeccab7ce18517a46", "score": "0.65482414", "text": "function fromCoordSystem(cm, coords, context) {\n\t if (context == \"div\") return coords;\n\t var left = coords.left, top = coords.top;\n\t // First move into \"page\" coordinate system\n\t if (context == \"page\") {\n\t left -= pageScrollX();\n\t top -= pageScrollY();\n\t } else if (context == \"local\" || !context) {\n\t var localBox = cm.display.sizer.getBoundingClientRect();\n\t left += localBox.left;\n\t top += localBox.top;\n\t }\n\t\n\t var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n\t return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n\t }", "title": "" }, { "docid": "cd40f961fed49babeccab7ce18517a46", "score": "0.65482414", "text": "function fromCoordSystem(cm, coords, context) {\n\t if (context == \"div\") return coords;\n\t var left = coords.left, top = coords.top;\n\t // First move into \"page\" coordinate system\n\t if (context == \"page\") {\n\t left -= pageScrollX();\n\t top -= pageScrollY();\n\t } else if (context == \"local\" || !context) {\n\t var localBox = cm.display.sizer.getBoundingClientRect();\n\t left += localBox.left;\n\t top += localBox.top;\n\t }\n\t\n\t var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n\t return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n\t }", "title": "" }, { "docid": "e50c4181d8881c3b858ba82cf169562e", "score": "0.6537112", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }", "title": "" }, { "docid": "9f037038ddeeda30d84d9260634272ab", "score": "0.64976156", "text": "function fromCoordSystem(cm, coords, context) {\r\n if (context == \"div\") { return coords }\r\n var left = coords.left, top = coords.top\r\n // First move into \"page\" coordinate system\r\n if (context == \"page\") {\r\n left -= pageScrollX()\r\n top -= pageScrollY()\r\n } else if (context == \"local\" || !context) {\r\n var localBox = cm.display.sizer.getBoundingClientRect()\r\n left += localBox.left\r\n top += localBox.top\r\n }\r\n\r\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\r\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\r\n}", "title": "" }, { "docid": "c169c1054387015700c5fc5e530fad41", "score": "0.6490691", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX()\n top -= pageScrollY()\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect()\n left += localBox.left\n top += localBox.top\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c169c1054387015700c5fc5e530fad41", "score": "0.6490691", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX()\n top -= pageScrollY()\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect()\n left += localBox.left\n top += localBox.top\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c169c1054387015700c5fc5e530fad41", "score": "0.6490691", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX()\n top -= pageScrollY()\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect()\n left += localBox.left\n top += localBox.top\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c169c1054387015700c5fc5e530fad41", "score": "0.6490691", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX()\n top -= pageScrollY()\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect()\n left += localBox.left\n top += localBox.top\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c169c1054387015700c5fc5e530fad41", "score": "0.6490691", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX()\n top -= pageScrollY()\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect()\n left += localBox.left\n top += localBox.top\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c169c1054387015700c5fc5e530fad41", "score": "0.6490691", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX()\n top -= pageScrollY()\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect()\n left += localBox.left\n top += localBox.top\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c169c1054387015700c5fc5e530fad41", "score": "0.6490691", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX()\n top -= pageScrollY()\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect()\n left += localBox.left\n top += localBox.top\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "c436618fdba897cb9104f976b0067b03", "score": "0.64835495", "text": "function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n}", "title": "" }, { "docid": "bc58b6296d94e05bbcd49902ac4cdc95", "score": "0.64419997", "text": "function fromCoordSystem(cm, coords, context) {\n\t if (context == \"div\") { return coords }\n\t var left = coords.left, top = coords.top\n\t // First move into \"page\" coordinate system\n\t if (context == \"page\") {\n\t left -= pageScrollX()\n\t top -= pageScrollY()\n\t } else if (context == \"local\" || !context) {\n\t var localBox = cm.display.sizer.getBoundingClientRect()\n\t left += localBox.left\n\t top += localBox.top\n\t }\n\n\t var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n\t return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n\t}", "title": "" }, { "docid": "19502bc2a319ac99eef86ff4be2af08e", "score": "0.6439698", "text": "function fromCoordSystem(cm, coords, context) {\n\t if (context == \"div\") { return coords }\n\t var left = coords.left, top = coords.top\n\t // First move into \"page\" coordinate system\n\t if (context == \"page\") {\n\t left -= pageScrollX()\n\t top -= pageScrollY()\n\t } else if (context == \"local\" || !context) {\n\t var localBox = cm.display.sizer.getBoundingClientRect()\n\t left += localBox.left\n\t top += localBox.top\n\t }\n\t\n\t var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect()\n\t return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n\t}", "title": "" }, { "docid": "d5d1fca1dbaf6abafd97aa9bff573fa1", "score": "0.59547234", "text": "function getStatusArea(context) {\n var box = context.statusArea || context.div || null;\n if (box) return box;\n let dom = context.dom;\n if (!dom && typeof document !== 'undefined') {\n dom = document;\n }\n if (dom) {\n var body = dom.getElementsByTagName('body')[0];\n box = dom.createEvent('div');\n body.insertBefore(box, body.firstElementChild);\n context.statusArea = box;\n return box;\n }\n return null;\n}", "title": "" }, { "docid": "8fb0817182721e57db09c678734175f9", "score": "0.58906424", "text": "function GetLocalCoords(elem, ev)\n{\n var ox = 0, oy = 0;\n var first;\n var pageX, pageY;\n\n // Walk back up the tree to calculate the total page offset of the\n // currentTarget element. I can't tell you how happy this makes me.\n // Really.\n while (elem != null)\n {\n ox += elem.offsetLeft;\n oy += elem.offsetTop;\n elem = elem.offsetParent;\n }\n\n if (ev.hasOwnProperty('changedTouches'))\n {\n first = ev.changedTouches[0];\n pageX = first.pageX;\n pageY = first.pageY;\n }\n else\n {\n pageX = ev.pageX;\n pageY = ev.pageY;\n }\n\n return { 'x': pageX - ox, 'y': pageY - oy };\n}", "title": "" }, { "docid": "39640890c15589fc112bd1fca1ba3f82", "score": "0.58659816", "text": "function getCoords(elem) { // кроме IE8-\n var box = elem.getBoundingClientRect();\n\n return {\n top: box.top + pageYOffset,\n left: box.left + pageXOffset\n };\n}", "title": "" }, { "docid": "39640890c15589fc112bd1fca1ba3f82", "score": "0.58659816", "text": "function getCoords(elem) { // кроме IE8-\n var box = elem.getBoundingClientRect();\n\n return {\n top: box.top + pageYOffset,\n left: box.left + pageXOffset\n };\n}", "title": "" }, { "docid": "365e529f49c6c62e03a30c1c1ed6d35b", "score": "0.5822902", "text": "function getCoords(elem) { \n var box = elem.getBoundingClientRect();\n return {\n top: box.top + pageYOffset,\n left: box.left + pageXOffset\n } \n }", "title": "" }, { "docid": "5a1b554f84127b660febcd025573dbf6", "score": "0.57735634", "text": "function get_current_position(container, event) {\n var offset = container.offset(),\n posX = event.offsetX ?\n event.offsetX : event.pageX - offset.left,\n posY = event.offsetY ?\n event.offsetY : event.pageY - offset.top;\n if($.browser.chrome) {\n // alert(1);\n // called for chrome and MS Edge\n } else if ($.browser.mozilla) {\n // alert(2);\n // called for Mozilla and IE\n // detect if IE, msie > 0 for IE browsers\n var msie = window.navigator.userAgent.indexOf(\"MSIE \");\n // keep old values as it is if IE\n if (msie <= 0) {\n var orig_event = event.originalEvent;\n if (orig_event) {\n event = orig_event;\n }\n posX = event.layerX ? event.layerX : event.offsetX;\n posY = event.layerY ? event.layerY : event.offsetY;\n }\n } else if ($.browser.msie) {\n // alert(3);\n // should be called for IE but not being called\n }\n posX = roundTo(posX, 2);\n posY = roundTo(posY, 2);\n return [posX, posY];\n }", "title": "" }, { "docid": "5f51b9ee07f312093e94def04ad7a5fe", "score": "0.5673197", "text": "function findObjectCoords(mouseEvent)\n {\n var obj = self.canvas;\n var obj_left = 0;\n var obj_top = 0;\n \n while (obj.offsetParent)\n {\n obj_left += obj.offsetLeft;\n obj_top += obj.offsetTop;\n obj = obj.offsetParent;\n }\n\n if (mouseEvent)\n {\n //FireFox\n self.xpos = mouseEvent.pageX;\n self.ypos = mouseEvent.pageY;\n }\n else\n {\n //IE\n self.xpos = window.event.x + document.body.scrollLeft - 2;\n self.ypos = window.event.y + document.body.scrollTop - 2;\n }\n\n self.xpos -= obj_left;\n self.ypos -= obj_top;\n self.ypos += document.body.scrollTop;\n self.xpos += document.body.scrollLeft;\n }", "title": "" }, { "docid": "3e9a8a44bbe489cfe2a07769f09afdad", "score": "0.56414485", "text": "function findAbsolutePosX(obj)\n{\n var curleft = 0;\n if (document.getElementById || document.all)\n {\n while (obj.offsetParent)\n {\n curleft += obj.offsetLeft;\n if (obj.offsetParent != document.body)\n curleft -= obj.offsetParent.scrollLeft;\n obj = obj.offsetParent;\n }\n }\n else if (document.layers)\n curleft += obj.x;\n var isWindowContainedInDivFrame = window.parentAccesible && false;\n return (isWindowContainedInDivFrame ? parent.Ext.WindowMgr.getActive().x+curleft : curleft);\n}", "title": "" }, { "docid": "1507bc70a0f37793b545f24e0688ad85", "score": "0.56376755", "text": "function findPosition(obj){\n var curleft = 0;\n var curtop = 0;\n\n if (obj.offsetParent) {\n do {\n curleft += obj.offsetLeft;\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n\n return {X:curleft, Y:curtop};\n }\n }", "title": "" }, { "docid": "5a28b8a479a100e70c43db9068837ce1", "score": "0.5606513", "text": "function intoCoordSystem(cm,lineObj,rect,context,includeWidgets){if(!includeWidgets){var height=widgetTopHeight(lineObj);rect.top+=height;rect.bottom+=height;}if(context==\"line\"){return rect;}if(!context){context=\"local\";}var yOff=_heightAtLine(lineObj);if(context==\"local\"){yOff+=paddingTop(cm.display);}else{yOff-=cm.display.viewOffset;}if(context==\"page\"||context==\"window\"){var lOff=cm.display.lineSpace.getBoundingClientRect();yOff+=lOff.top+(context==\"window\"?0:pageScrollY());var xOff=lOff.left+(context==\"window\"?0:pageScrollX());rect.left+=xOff;rect.right+=xOff;}rect.top+=yOff;rect.bottom+=yOff;return rect;}// Coverts a box from \"div\" coords to another coordinate system.", "title": "" }, { "docid": "5a28b8a479a100e70c43db9068837ce1", "score": "0.5606513", "text": "function intoCoordSystem(cm,lineObj,rect,context,includeWidgets){if(!includeWidgets){var height=widgetTopHeight(lineObj);rect.top+=height;rect.bottom+=height;}if(context==\"line\"){return rect;}if(!context){context=\"local\";}var yOff=_heightAtLine(lineObj);if(context==\"local\"){yOff+=paddingTop(cm.display);}else{yOff-=cm.display.viewOffset;}if(context==\"page\"||context==\"window\"){var lOff=cm.display.lineSpace.getBoundingClientRect();yOff+=lOff.top+(context==\"window\"?0:pageScrollY());var xOff=lOff.left+(context==\"window\"?0:pageScrollX());rect.left+=xOff;rect.right+=xOff;}rect.top+=yOff;rect.bottom+=yOff;return rect;}// Coverts a box from \"div\" coords to another coordinate system.", "title": "" }, { "docid": "09dfddf95cd3300f4d3d3534b835cdf6", "score": "0.5583607", "text": "function currentPosition() {\n const position = $(event.target).position();\n coords = getCoords(position.top, position.left);\n return coords;\n }", "title": "" }, { "docid": "1f6cb9ce876005587da4899c8369b8e5", "score": "0.55189383", "text": "function mousePosition(evt) {\n // IE:\n if (window.event && window.event.contentOverflow !== undefined) {\n return {\n x: window.event.offsetX,\n y: window.event.offsetY\n };\n } // Webkit:\n\n\n if (evt.offsetX !== undefined && evt.offsetY !== undefined) {\n return {\n x: evt.offsetX,\n y: evt.offsetY\n };\n } // Firefox:\n\n\n var wrapper = evt.target.parentNode.parentNode;\n return {\n x: evt.layerX - wrapper.offsetLeft,\n y: evt.layerY - wrapper.offsetTop\n };\n }", "title": "" }, { "docid": "18c3c46c99aeff8118d403b06bceef4d", "score": "0.5513837", "text": "function findGlobalPosX(obj, container)\n{\n var curtop = 0;\n if (document.getElementById || document.all)\n {\n while (obj.offsetParent)\n {\n curtop += obj.offsetLeft;\n obj = obj.offsetParent;\n }\n\n if (obj.document!=null && obj.document.parentWindow != null && obj.document.parentWindow.frameElement)\n curtop += findGlobalPosX(obj.document.parentWindow.frameElement)\n }\n else if (document.layers)\n curtop += obj.y;\n\n return curtop;\n}", "title": "" }, { "docid": "66c8c47965c5e34ea4406ca512ff4656", "score": "0.5490409", "text": "function getCoordinates(element) {\r\n\t\r\n\tif(element == null) console.log('element is null');\r\n\telse {\r\n\t\tvar box = element.getBoundingClientRect();\r\n\t\tvar top_coordinate = box.top + pageYOffset;\r\n\t\tvar right_coordinate = box.right + pageXOffset;\r\n\r\n\t\treturn {\r\n\t\t\ttop: top_coordinate,\r\n\t\t\tright: right_coordinate,\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "8895c1363d548801160aa30d9d40d98f", "score": "0.5486855", "text": "function findContextCoord(col) {\n let xPos = \"0px\";\n let yPos = \"0px\";\n for (const el of contextShow) {\n if (el.name === col) {\n xPos = el.xPos;\n yPos = el.yPos;\n }\n }\n return xPos, yPos;\n }", "title": "" }, { "docid": "ed31f372208f0a1ac8b4adbbe5e59adf", "score": "0.5482601", "text": "function getPointerPositionInDocument(eventObject) {\n\t eventObject = eventObject || getEventObject(eventObject);\n\t var x = eventObject.pageX || (eventObject.clientX +\n\t (document.documentElement.scrollLeft || document.body.scrollLeft));\n\t var y= eventObject.pageY || (eventObject.clientY +\n\t (document.documentElement.scrollTop || document.body.scrollTop));\n\t //x and y now contain the coordinates of the mouse relative to the document origin\n\t return {'x':x,'y':y};\n\t}", "title": "" }, { "docid": "414a437e5ad7f79acde052ba97640d6c", "score": "0.547948", "text": "function point_it(event){\n pos_x = event.clientX - document.getElementById(\"left\").offsetWidth;\n pos_y = event.clientY;\n \n //alert(\"Hello World - px \" + pos_x+ \" py \"+ pos_y);\n}", "title": "" }, { "docid": "b81c8f50c847a58bd3f6b4b6f6b0b03a", "score": "0.54733807", "text": "getPosition() {\n var xPosition = 0;\n var yPosition = 0;\n var el = this.id;\n while (el) {\n if (el.tagName == \"BODY\") {\n // deal with browser quirks with body/window/document and page scroll\n var xScrollPos = el.scrollLeft || document.documentElement.scrollLeft;\n var yScrollPos = el.scrollTop || document.documentElement.scrollTop;\n \n xPosition += (el.offsetLeft - xScrollPos + el.clientLeft);\n yPosition += (el.offsetTop - yScrollPos + el.clientTop);\n } else {\n xPosition += (el.offsetLeft - el.scrollLeft + el.clientLeft);\n yPosition += (el.offsetTop - el.scrollTop + el.clientTop);\n }\n \n el = el.offsetParent;\n }\n return {\n x: xPosition,\n y: yPosition\n };\n }", "title": "" }, { "docid": "2d70cc4f1bbed08322b32f8ad75feabc", "score": "0.5459401", "text": "function getCoords(elem) {\n\tvar box = elem.getBoundingClientRect();\n\n\tvar body = document.body;\n\tvar docEl = document.documentElement;\n\n\tvar scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n\n\tvar clientLeft = docEl.clientLeft || body.clientLeft || 0;\n\n\tvar left = box.left + scrollLeft - clientLeft;\n\n\treturn Math.round(left);\n}", "title": "" }, { "docid": "2a6e68274d169c732d696515a9dc04a4", "score": "0.54431176", "text": "function findPos(obj) {\n // C&P from http://www.quirksmode.org/js/findpos.html\n var myDocument = obj.ownerDocument;\n var DocBox = myDocument.documentElement.getBoundingClientRect();\n var box = obj.getBoundingClientRect();\n return [box.left - DocBox.left, box.top - DocBox.top];\n}", "title": "" }, { "docid": "ed7ae5e3a97a17241c79918a94a97586", "score": "0.5402971", "text": "function findPos(obj) {\r\n\t var curleft = 0;\r\n\t var curtop = 0;\r\n\t if (obj.offsetParent) {\r\n do {\r\n\t\t\t curleft += obj.offsetLeft;\r\n\t\t\t curtop += obj.offsetTop;\r\n } while (obj = obj.offsetParent);\r\n }\r\n return [curleft,curtop];\r\n }", "title": "" }, { "docid": "8cd233c26175b2d242c756ae69d11e05", "score": "0.5401432", "text": "function Q(e,t){var n={left:0,top:0};if(e instanceof HTMLElement)n.left=e.offsetLeft,n.top=e.offsetTop;else{var o=fn(e).offset(),i=t.offset();o&&i&&(n.left=o.left-i.left,n.top=o.top-i.top)}return n}", "title": "" }, { "docid": "09aeadb552df1bcdb7ea85ed82cf99ae", "score": "0.5395337", "text": "function findPos(obj) {\n var curleft = curtop = 0;\n if (obj.offsetParent) {\n do {\n curleft += obj.offsetLeft;\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n }\n return {left: curleft,top: curtop};\n }", "title": "" }, { "docid": "8d33c00bf061dd274f9883d561a9e165", "score": "0.53881276", "text": "function getCoords(elem) {\n let box = elem.getBoundingClientRect();\n\n let body = document.body;\n let docEl = document.documentElement;\n\n let scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\n let scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n\n let clientTop = docEl.clientTop || body.clientTop || 0;\n let clientLeft = docEl.clientLeft || body.clientLeft || 0;\n\n let top = box.top + scrollTop - clientTop;\n let left = box.left + scrollLeft - clientLeft;\n let right = box.right + scrollLeft - clientLeft;\n let bottom = box.bottom + scrollTop - clientTop;\n\n return {\n top: Math.round(top),\n left: Math.round(left),\n right: Math.round(right),\n bottom: Math.round(bottom),\n width: box.width,\n height: box.height\n };\n }", "title": "" }, { "docid": "9dc0e6a31c3bc7bd8cfab55c93e736a5", "score": "0.53856933", "text": "function localCoordinates(event, target) {\n var box;\n\n target = target || event.target;\n box = target.getBoundingClientRect();\n\n return {\n x: Math.max(0, Math.min(1, (event.clientX - box.left) / box.width)),\n y: Math.max(0, Math.min(1, (event.clientY - box.top) / box.height)),\n box: box\n };\n }", "title": "" }, { "docid": "9dc0e6a31c3bc7bd8cfab55c93e736a5", "score": "0.53856933", "text": "function localCoordinates(event, target) {\n var box;\n\n target = target || event.target;\n box = target.getBoundingClientRect();\n\n return {\n x: Math.max(0, Math.min(1, (event.clientX - box.left) / box.width)),\n y: Math.max(0, Math.min(1, (event.clientY - box.top) / box.height)),\n box: box\n };\n }", "title": "" }, { "docid": "b1a12dc431c8bee95d11e4a4859a996d", "score": "0.53763175", "text": "function captureMousePosition(e)\n{\n\n if (document.layers)\n {\n xMousePos = e.pageX;\n yMousePos = e.pageY;\n } else if (document.all)\n {\n xMousePos = window.event.x + document.body.scrollLeft;\n yMousePos = window.event.y + document.body.scrollTop;\n } else if (document.getElementById)\n {\n xMousePos = e.pageX;\n yMousePos = e.pageY;\n }\n}//function", "title": "" }, { "docid": "0d8270470865c3f147d34e9c08d8b090", "score": "0.5376001", "text": "function getPosition(canvas,event) {\n\tvar bounds = canvas.getBoundingClientRect();\n\t\t//getBoundingClientRect() returns the size of the element and its position relative to the viewport\n\treturn {\t//both elements are returned\n\t\tx: event.clientX - bounds.left,\n\t\t\t//gets the x coordinate of the mouse click (event)\n\t\t\t//takes into account the left-horizontal relative position of the canvas in relation to the viewport\n\t\ty: event.clientY - bounds.top\n\t\t\t//gets the y coordinate of the mouse click (event)\n\t\t\t//takes into account the top-vertical relative position of the canvas in relation to the viewport\t\n\t};\n}", "title": "" }, { "docid": "05f5ab43cf68261b48de4ed950f2bd4b", "score": "0.53759754", "text": "function find_pos(obj) {\n\t\t\tvar current_left = 0, current_top = 0;\n\t\t\tif (obj.offsetParent) {\n\t\t\t\tdo {\n\t\t\t\t\tcurrent_left += obj.offsetLeft;\n\t\t\t\t\tcurrent_top += obj.offsetTop;\n\t\t\t\t} while (obj = obj.offsetParent);\n\t\t\t\treturn { x: current_left, y: current_top };\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}", "title": "" }, { "docid": "0e2a33ffd5e1c00afd39bdd04b7d2c24", "score": "0.5375854", "text": "function localCoordinates(event, target) {\n var box;\n \n target = target || event.target;\n box = target.getBoundingClientRect();\n\n return {\n x: Math.max(0, Math.min(1, (event.clientX - box.left) / box.width)),\n y: Math.max(0, Math.min(1, (event.clientY - box.top) / box.height)),\n box: box\n };\n }", "title": "" }, { "docid": "ebe59abdc00cba34892815e152e3542b", "score": "0.5359681", "text": "function trouverPosition(element) {\n var x = y = 0;\n if(element.offsetParent) {\n x = element.offsetLeft;\n y = element.offsetTop;\n while(element = element.offsetParent) {\n x += element.offsetLeft;\n y += element.offsetTop;\n }\n }\n return {'x':x, 'y':y};\n }", "title": "" }, { "docid": "730995843cdd77844605b7e6f2a018c8", "score": "0.53528464", "text": "function getPosition(element) {\n var xPosition = 0;\n var yPosition = 0;\n\n while (element) {\n xPosition += (element.offsetLeft - element.scrollLeft + element.clientLeft);\n yPosition += (element.offsetTop - element.scrollTop + element.clientTop);\n element = element.offsetParent;\n }\n return { x: xPosition, y: yPosition };\n }", "title": "" }, { "docid": "bd180aa38cc9018e86c2461b5bfe1461", "score": "0.5344047", "text": "function findPos(obj) {\n var curleft = 0, curtop = 0;\n if (obj.offsetParent) {\n do {\n curleft += obj.offsetLeft;\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return { x: curleft, y: curtop };\n }\n return undefined;\n }", "title": "" }, { "docid": "067419c246ed1222278f83b46e1d88e0", "score": "0.5336361", "text": "translateEventCoordinates(event) {\n var x = event.clientX; // x coordinate of a mouse pointer\n var y = event.clientY; // y coordinate of a mouse pointer\n var rect = event.target.getBoundingClientRect();\n var canvas = this.htmlcanvas;\n x = ((x - rect.left) - canvas.width/2)/(canvas.width/2);\n y = (canvas.height/2 - (y - rect.top))/(canvas.height/2);\n\n return {\n x: x,\n y: y\n };\n }", "title": "" }, { "docid": "4705060f8d343e4ba6762a063afbacbf", "score": "0.5323392", "text": "function findPos(obj) {\r\n\tvar curleft = 0;\r\n\tvar curtop = 0;\r\n\tvar tmpObj = obj;\r\n\tif (tmpObj.offsetParent) {\r\n\t\tif (typeof(tmpObj.offsetLeft)!='undefined') {\r\n\t\t\tcurleft = tmpObj.offsetLeft;\r\n\t\t}\r\n\t\tif (typeof(tmpObj.offsetTop)!='undefined') {\r\n\t\t\tcurtop = tmpObj.offsetTop;\r\n\t\t}\r\n\t\ttmpObj = tmpObj.offsetParent;\r\n\t\twhile (tmpObj) {\r\n\t\t\tif (typeof(tmpObj.offsetLeft)!='undefined') {\r\n \t\t\t curleft += tmpObj.offsetLeft;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (typeof(tmpObj.offsetTop)!='undefined') {\r\n\t\t\t curtop += tmpObj.offsetTop;\r\n\t\t\t}\r\n\t\t\t\r\n \t\t tmpObj = tmpObj.offsetParent;\r\n\t\t}\r\n\t}\r\n\ttmpObj = obj;\r\n\tif (tmpObj) {\r\n\t\tif (typeof(tmpObj.scrollLeft)!='undefined') {\r\n\t\t\tcurleft -= tmpObj.scrollLeft;\r\n\t\t}\r\n\t\tif (typeof(tmpObj.scrollTop)!='undefined') {\r\n\t\t\tcurtop -= tmpObj.scrollTop;\r\n\t\t}\r\n\t\ttmpObj = tmpObj.parentNode;\r\n\t\twhile(tmpObj && tmpObj != window && tmpObj!=document && tmpObj != document.documentElement && tmpObj != document.body) {\r\n\t\t\tif (typeof(tmpObj.scrollLeft)!='undefined' && tmpObj.scrollLeft >= 1) {\r\n\t\t curleft -= tmpObj.scrollLeft;\r\n\t\t\t}\r\n\t\t\tif (typeof(tmpObj.scrollTop)!='undefined' && tmpObj.scrollTop >= 1) {\r\n\t\t\t curtop -= tmpObj.scrollTop;\r\n \t\t }\r\n\t\t\ttmpObj = tmpObj.parentNode;\r\n\t\t}\r\n\t}\r\n\treturn [curleft,curtop];\r\n}", "title": "" }, { "docid": "edc661023e83b1bf87c5433c2a34fd66", "score": "0.532333", "text": "function getCoords(el,event) {\n var ox = el.scrollLeft - el.offsetLeft,\n oy = el.scrollTop - el.offsetTop;\n while(el=el.offsetParent){\n ox += el.scrollLeft - el.offsetLeft;\n oy += el.scrollTop - el.offsetTop;\n }\n return {x:event.clientX + ox , y:event.clientY + oy};\n}", "title": "" }, { "docid": "cf156b2fc1a3fe83430f804f0361717d", "score": "0.5308432", "text": "function getCoords(e) {\n if (e.offsetX) {\n // Works in Chrome / Safari (except on iPad/iPhone)\n return { x: e.offsetX, y: e.offsetY };\n }\n else if (e.layerX) {\n // Works in Firefox\n return { x: e.layerX, y: e.layerY };\n }\n else {\n // Works in Safari on iPad/iPhone\n //alert((e.pageX-cb_canvas.offsetLeft) +\":\"+ (e.pageY-cb_canvas.offsetTop));\n return {x:e.pageX,y:e.pageY};\n }\n }", "title": "" }, { "docid": "7de7add6bce80829e19163d7526feafa", "score": "0.53039545", "text": "function global2local(obj, screen){\n var scoords={\n x: obj.x-screen.x,\n y: obj.y-screen.y,\n }\n return scoords\n}", "title": "" } ]
4bcadb22dd0a4c5ebbbca492db3ab174
class methods......................... updateProgress() checks device location and offers guidance.
[ { "docid": "96ae64e75a1871f4fa1d781f14c7480e", "score": "0.7618147", "text": "async updateProgress() {\n console.log('Start game.updateProgress()');\n const checkTarget = this.target;\n var result = {\n progressText: 'I dunno',\n deviceLocation: null,\n };\n\n function successFunction(position) {\n function isInside(device, bounds) {\n console.log(`Start isInside device: ${JSON.stringify(device)}`);\n console.log(`Start isInside bounds: ${JSON.stringify(bounds)}`);\n const ans =\n device.latitude > bounds.South &&\n device.latitude < bounds.North &&\n device.longitude > bounds.West &&\n device.longitude < bounds.East;\n return ans;\n }\n\n result.deviceLocation = {\n latitude: position.coords.latitude,\n longitude: position.coords.longitude,\n };\n\n console.log(result.deviceLocation.latitude);\n console.log(result.deviceLocation.longitude);\n result.progressText = isInside(result.deviceLocation, checkTarget)\n ? 'Congratulations - you found this location!'\n : 'Keep looking!';\n console.log(\n `Result:${result.progressText} for ${JSON.stringify(\n result.deviceLocation,\n )}`,\n );\n document.querySelector('#two').innerHTML = result.progressText;\n }\n\n function errorFunction(err) {\n const s = `ERROR(${err.code}): ${err.message}`;\n console.warn(s);\n result.progressText = err.message;\n console.log(result.progressText);\n document.querySelector('#two').innerHTML = result.progressText;\n }\n\n const geolocationOptions = {\n enableHighAccuracy: true,\n timeout: 5000,\n maximumAge: 0,\n };\n\n console.log('Call browser getCurrentPosition()');\n navigator.geolocation.getCurrentPosition(\n successFunction,\n errorFunction,\n geolocationOptions,\n );\n\n return await result;\n }", "title": "" } ]
[ { "docid": "b84ba003101f57931adf940028a6e83a", "score": "0.72694355", "text": "function progressLocation() {\n currentLocation.progress();\n}", "title": "" }, { "docid": "00e3ff397d5c30534b67b8bd085f65bc", "score": "0.64683366", "text": "function displayLocation(loc) \r\n{\r\n\tcurrentTries = 0;\t\r\n\tstartGPSProgress();\r\n\tmyLocation = loc;\r\n\tgetByLatitudeLongitude();\r\n}", "title": "" }, { "docid": "9e1b78e2beed39a0437f7ab826b093a3", "score": "0.6436254", "text": "function startGPSQueryProgress() {\r\n\ttry {\t\r\n\t\tdocument.getElementById(\"progressBar\").style.display = \"block\";\r\n\t\tprogress = 0;\r\n\t\tstate = states.PREPARING;\r\n\t\tupdateProgress();\r\n\t} catch(e) {alert(e);};\r\n}", "title": "" }, { "docid": "3db493f1329d722badc5e59cbb2183d1", "score": "0.63756484", "text": "function startGPSProgress() {\r\n\ttry {\t\r\n\t\tdocument.getElementById(\"progressBar\").style.display = \"block\";\r\n\t\tprogress = 0;\r\n\t\tstate = states.GPS;\r\n\t\tupdateProgress();\r\n\t} catch(e) {alert(e);};\r\n}", "title": "" }, { "docid": "8dbcd87b80373c6035a0f58430cb8af4", "score": "0.6260583", "text": "function trackLocation() {\r\n\tif (navigator.geolocation) {\r\n\tconfirm(\"Track Location\")\r\n\tvar options = {watch:true,enableHighAccuracy:true,frequency:500};\r\n\tnavigator.geolocation.watchPosition(onSuccess,onError,options);\r\n } else {\r\n\tdocument.getElementById('showLocation').innerHTML = \"Geolocation is not supported by this browser.\";\r\n }\r\n}", "title": "" }, { "docid": "2b33477f870969b03dc5a809aac9fddf", "score": "0.62590456", "text": "function geolocate() {\n button.classList.add(\"busy\");\n navigator.geolocation.getCurrentPosition(showLocationPopup, showLocateError, {\n maximumAge: 0,\n timeout: 30000,\n enableHighAccuracy: true\n });\n }", "title": "" }, { "docid": "435099b0d9f07e698bc3eeb7a0869006", "score": "0.62495345", "text": "function updateProgress() {\n\t\t// Update the controls\n\t\tcontroller.getPlayer().getControlAdaptor().updateProgress();\n\t\t// Store our own current time of the player because iPhone throws aways the current time before we need it\n\t\tif ($U.core.Device.isPhone() && $U.core.Device.isIOS() || ($U.core.Device.isIOS3x())) {\n\t\t\t$U.core.Player.setCurrentTime($U.core.Player.player.currentTime);\n\t\t}\n\t}", "title": "" }, { "docid": "672867593026f2573c08fef084971351", "score": "0.6240116", "text": "function geoSuccess(position) \n{\n SpinnerStop();\n SendCloudLocation( position.coords.latitude, position.coords.longitude );\n// showAlert( \"Lat:Long \" + position.coords.latitude + \":\" + position.coords.longitude, \"Location Determined.\" );\n \n navigator.notification.confirm(\n \"Lat:Long \" + position.coords.latitude + \":\" + position.coords.longitude, // message\n HandleLocationBack, // callback to invoke with index of button pressed\n 'Location Acquired', // title\n ['ok'] ); // buttonLabels\n \n \n \n/* \n alert('Latitude: ' + position.coords.latitude + '\\n' +\n 'Longitude: ' + position.coords.longitude + '\\n' +\n 'Altitude: ' + position.coords.altitude + '\\n' +\n 'Accuracy: ' + position.coords.accuracy + '\\n' +\n 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\\n' +\n 'Heading: ' + position.coords.heading + '\\n' +\n 'Speed: ' + position.coords.speed + '\\n' +\n 'Timestamp: ' + position.timestamp + '\\n');\n*/ \n}", "title": "" }, { "docid": "8f05988aefa15bb281e3a7f8327eca13", "score": "0.61996746", "text": "function updateLocationInbackgroundiOS(e) {\n\t\n\tvar credentials = Alloy.Globals.getCredentials();\n\tif (credentials.userId == null || credentials.userId == \"\" || credentials.userId == 0) {\n\t\treturn;\n\t}\n\tvar diff = 0;\n\tvar curTime = new Date().getTime();\n\tvar setTime = Ti.App.Properties.getString('locationUpdate', \"\");\n\tif (setTime != \"\") {\n\t\tdiff = curTime - setTime;\n\t}\n\t\n\tif (diff == 0 || diff > 3000000) {\n\t\tvar curLatitude = e.latitude;\n\t\tvar curLongitude = e.longitude;\n\t\t\n\t\tif (curLatitude != null && curLatitude != undefined && curLatitude != 0) {\n\t\t\tgeocode(curLatitude, curLongitude);\n\t\t}\n\n\t}\n\n}", "title": "" }, { "docid": "995f3166990ec7663151b5e3ddd86d77", "score": "0.61508286", "text": "function updateLocation(position){\n\n\t\tif(nearbyItems === null){\n\t\t\tupdateNearbyItems(position, DISTANCE_TO_VISIBLE_IMAGE);\n\t\t}\n\t\tconsole.log(\"Got new Position\");\n\t\tif(lastKnownPosition === null){\n\t\t\t//console.log(\"Setting lastKnownPosition\");\n\t\t\tlastKnownPosition = position;\n\t\t}else{\n\t\t\tvar distanceSinceLastSearch = distanceBetween(position.coords.latitude, position.coords.longitude, lastKnownPosition.coords.latitude, lastKnownPosition.coords.longitude);\n\t\t\t//console.log(distanceSinceLastSearch);\n\t\t\tif(distanceSinceLastSearch > 5){ //Only loop the list if we have moved 5 meters\n\t\t\t\t//console.log(\"distanceSinceLastSearch: \" + distanceSinceLastSearch);\n\t\t\t\tlastKnownPosition = position;\n\t\t\t\tupdateNearbyItems(position, DISTANCE_TO_VISIBLE_IMAGE);\n\t\t\t}\n\t\t}\n\t\t//$(\"#longitude\").text(position.coords.longitude);\n\t\t//$(\"#latitude\").text(position.coords.latitude);\n\t\t//$(\"#accuracy\").text(position.coords.accuracy);\n\t}", "title": "" }, { "docid": "49abf92d66d526676734301890d800f4", "score": "0.61485434", "text": "function GeoLocation() {\n\n var watchID = null;\n var geoID = null;\n var geoLocationFixed = false;\n\n var lastCheckedPosition;\n var locationEventCount = 0;\n var timerID;\n\n /*\n configure here!\n */\n var options = {\n maxWait: 20000, //in millisecs\n desiredAccuracy: 20, //in meters\n timeout: 20000, //in millisecs, usually same as maxWait\n maximumAge: 300000, // use 0 for current locations only,\n enableHighAccuracy: true // high accuracy\n };\n\n\n if (!navigator.geolocation) {\n var msg = \"your browser and / or OS do not support geo location, app will not work!\"\n if (insidecordova) {\n var msg = \"your device does not support geo location, app will not work!\"\n navigator.notification.alert(msg, function () {\n app.exitApp()\n }, \"geo location error\", \"exit\")\n } else {\n alert.log(msg);\n }\n }\n\n this.startWatchingGeo = function () {\n if (config.debugMode)\n console.log(\"geo: starting up...\");\n geoLocation.locateMe();\n geoID = window.setInterval(geoLocation.locateMe, config.gpsUpdateInterval);\n }\n\n this.stopWatchingGeo = function () {\n if (geoID != null) {\n window.clearInterval(geoID);\n geoID = null;\n }\n }\n\n this.locateMe = function () {\n locationEventCount = 0;\n if (watchID == null) {\n if (config.debugMode)\n console.log(\"geo: searching position\");\n// geoLocation.useLastPosition();\n geoLocation.stillInProgress = true;\n geoLocation.getPrecise();\n }\n }\n\n\n this.geoSuccess = function (position) {\n\n geoLocationFixed = true;\n geoLocation.updateClient({longitude: position.coords.longitude, latitude: position.coords.latitude});\n if (config.debugMode)\n console.log('geo: accurate position found');\n }\n\n\n this.updateClient = function (position) {\n// utils.message(\"position updated\");\n if(config.debugMode)\n console.log(\"position updated\");\n\n viewModel.setGeo(position.longitude, position.latitude);\n\n\n }\n\n this.geoProgress = function (position) {\n\n geoLocation.updateClient({longitude: position.coords.longitude, latitude: position.coords.latitude});\n if (config.debugMode)\n console.log('geo: coarse position found');\n }\n\n\n this.geoError = function (msg) {\n\n\n if (msg.code == 1) {//PositionError.PERMISSION_DENIED) {\n notification.addNotification(\"GPS deactivated!\", \"please turn on GPS localization or enable GPS for app. Currently app is not allowed to use GPS.\");\n return;\n }\n\n if (msg.code == 2) {//PositionError.POSITION_UNAVAILABLE) {\n console.log(\"geo: error: position unavailable\");\n }\n\n if (msg.code == 3) {// PositionError.TIMEOUT) {\n }\n console.log(\"geo: error: timeout\");\n }\n\n// this.useLastPosition = function () {\n// if (config.debugMode)\n// console.log('geo: using last stored position.');\n// }\n\n\n this.checkAccuracy = function (position) {\n lastCheckedPosition = position;\n locationEventCount += 1;\n // ignore first event unless it's the only one received:\n // some devices send a cached location even when maximumAge is set to zero\n if ((position.coords.accuracy <= options.desiredAccuracy) && (locationEventCount > 1)) {\n clearTimeout(timerID);\n navigator.geolocation.clearWatch(watchID);\n watchID = null;\n geoLocation.foundPosition(position);\n } else {\n geoLocation.geoProgress(position);\n }\n };\n\n this.giveUp = function () {\n navigator.geolocation.clearWatch(watchID);\n watchID = null;\n if (lastCheckedPosition) {\n geoLocation.foundPosition(lastCheckedPosition);\n } else {\n console.log(\"giving up without finding accurate position...\");\n }\n };\n\n this.error = function (error) {\n clearTimeout(timerID);\n navigator.geolocation.clearWatch(watchID);\n watchID = null;\n geoLocation.geoError(error);\n };\n\n this.foundPosition = function (position) {\n geoLocation.geoSuccess(position);\n\n };\n\n\n this.getPrecise = function () {\n watchID = navigator.geolocation.watchPosition(geoLocation.checkAccuracy, geoLocation.error, options);\n\n timerID = setTimeout(geoLocation.giveUp, options.maxWait);\n }\n\n}", "title": "" }, { "docid": "bbbb5934856eb57de4f18a66770408b0", "score": "0.61323726", "text": "function trackLocation() {\r\n if (navigator.geolocation) {\r\n\t navigator.geolocation.watchPosition(showPosition);\r\n\t } else {\r\n\t\t document.getElementById('showLocation').innerHTML = \"Geolocation is not supported by this browser.\";} // track location\r\n navigator.geolocation.watchPosition(getDistanceFromPoint); // for calculating distance\r\n}", "title": "" }, { "docid": "f67129760bb799276b85f8bad804372d", "score": "0.610006", "text": "function progress(update) {\n handleProgress(update);\n }", "title": "" }, { "docid": "cba1c2c4385093396894ee8c193b5997", "score": "0.6084629", "text": "update(progress) {\n\tthrow \"this method is abstract and should be overwritten by the implementing class\";\n }", "title": "" }, { "docid": "dba5713644b5a2880883701ea646a05b", "score": "0.60727143", "text": "update() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(position => {\n let cords = [position.coords.longitude, position.coords.latitude];\n\n this.updateForecast(cords);\n this.updateCapitals();\n });\n } else {\n alert('Location access is limited !!');\n }\n }", "title": "" }, { "docid": "595e6a7f337503b79452c9cf26274bcb", "score": "0.6061152", "text": "function trackFunction() {\n navigator.geolocation.getCurrentPosition(updateLocationData, errorOccured, posOptions);\n }", "title": "" }, { "docid": "125c03458c17aea6829484cac6cc3ffe", "score": "0.604602", "text": "function updateProgress() {\n return true;\n}", "title": "" }, { "docid": "a5d8abc05e1b5877c546fe1034ba3876", "score": "0.5994778", "text": "_getlocation () {\n this.watchID = navigator.geolocation.watchPosition((position) => {\n var lat = parseFloat(position.coords.latitude)\n var long = parseFloat(position.coords.longitude)\n\n var initialRegion={\n latitude: lat,\n longitude: long,\n latitudeDelta: LATITUDE_DELTA,\n longitudeDelta: LONGTITUDE_DELTA\n }\n\n\n if (this.state.prevPosition != this.state.markerPosition){\n this.setState({initialPosition: initialRegion})\n this.setState({markerPosition: initialRegion})\n }\n this.setState({prevPosition: initialRegion})\n },\n (error) => alert(JSON.stringify(error)),\n {enableHighAccuracy: true, timeout: 1000, distanceFilter: 0})\n }", "title": "" }, { "docid": "35ecdc857fc11e957e79d9820166f767", "score": "0.5994339", "text": "function getLocationUpdate(){\n \n if(navigator.geolocation){\n \n // timeout at 60000 milliseconds (60 seconds)\n var options = {timeout:60000};\n geoLoc = navigator.geolocation;\n watchID = geoLoc.watchPosition(showLocation, errorHandler, options);\n } else {\n alert(\"Sorry, browser does not support geolocation!\");\n }\n}", "title": "" }, { "docid": "ff86bb7dd38068520e8daf4c8f487c10", "score": "0.5975334", "text": "initLocationTracking() {\n\t\tLocation.watchPositionAsync({\n\t\t\tenableHighAccuracy: true,\n\t\t\ttimeInterval: 900000,\n\t\t\tdistanceInterval: 2000\n\t\t}, (position) => {\n\t\t\t// Ensure location state is set\n\t\t\tif (!this.state.lat || !this.state.lon) { return }\n\n\t\t\t// Initialise location variables\n\t\t\tlet outingLat = parseFloat(position.coords.latitude).toFixed(3);\n\t\t\tlet outingLon = parseFloat(position.coords.longitude).toFixed(3);\n\n\t\t\t// Check location doesn't match hermit hole\n\t\t\t// as API accuracy can be low\n\t\t\tif (outingLat == this.state.lat && \n\t\t\t\t\toutingLon == this.state.lon) { \n\t\t\t\t// Set outing to false & return\n\t\t\t\tthis.setState({outing: false})\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update only if not already on outing\n\t\t\t// to avoid duplicate sunshine sessions\n\t\t\tif (this.state.outing) { return }\n\n\t\t\t// Otherwise, set outing to true & increment sunshine sessions\n\t\t\tthis.setState({outing: true})\n\t\t\tthis.setState({sunshineSessions: parseInt(this.state.sunshineSessions) + 1});\n\t\t\tAsyncStorage.setItem('@store:sunshineSessions', this.state.sunshineSessions.toString());\n\n\t\t\t// Update goal percentage\n\t\t\tthis.updateGoalPercentage();\n\t\t});\n\t}", "title": "" }, { "docid": "7335563c0ef968f19f08863da2bbce58", "score": "0.5973735", "text": "function reinitLocation(callback) {\r\n //inits google map's api used to calculate distance between user and job\r\n geocoder = new google.maps.Geocoder();\r\n\r\n var city = jobComponent.location;\r\n if (geocoder) {\r\n geocoder.geocode({\r\n 'address': city\r\n }, function(results, status) {\r\n\r\n\r\n if (status == google.maps.GeocoderStatus.OK) {\r\n\r\n var location = results[0].geometry.location,\r\n latUser = location.lat(),\r\n longUser = location.lng();\r\n\r\n\r\n const j = jobComponent.products.length;\r\n\r\n for (let i = 0; i < j; i++) {\r\n\r\n\r\n var tempLat = jobComponent.products[i].lat;\r\n var tempLong = jobComponent.products[i].long;\r\n jobComponent.products[i].distance = distance(tempLat, tempLong, latUser, longUser).toFixed(1);\r\n\r\n }\r\n\r\n\r\n\r\n //if warning text was shown from previous failure it will slowly go away\r\n $(\"#warningText\").hide(\"slow\");\r\n } else {\r\n //if user didint input viable city name will send warning text\r\n $(\"#warningText\").show();\r\n }\r\n\r\n\r\n });\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "4e832abe5315819d1a7189a3d63b89c5", "score": "0.59688395", "text": "function detectLocation () {\n hideLayouts()\n $(\"#loadingBar\").show()\n if (!window.navigator) {\n alert(\"Sorry! You don't have this functionality available\")\n } else {\n navigator.geolocation.getCurrentPosition(function (location) {\n $(\"#loadingBar\").hide()\n displayLocation(location)\n }, errorNavigation)\n }\n }", "title": "" }, { "docid": "86b0c81f09d1dbd028ea6ae68b22cf20", "score": "0.593468", "text": "function watchLocation() {\n watchId = navigator.geolocation.watchPosition(\n displayLocation, \n displayError,\n {enableHighAccuracy: true, timeout: 3000}); \n}", "title": "" }, { "docid": "fc33b36777f3b7a0f16f0f2029f98a51", "score": "0.5919868", "text": "function updateProgress(){\n\t\tpercentageComplete_ = progress_.length > 0 ? (((api_.getCurrentQuestion() - initialQuestion_) / (numberOfQuestions_ - initialQuestion_)) * 100).toFixed(0) : 0;\n\n\t\t$(\"#questionnaire-percentage-complete\").html(percentageComplete_);\n\t\t$(\"#questionnaire-progress-bar\").css(\"width\", percentageComplete_ + \"%\");\n\t}", "title": "" }, { "docid": "d3e7a40e384b7dcb053570c4d60b180e", "score": "0.59059227", "text": "async function locationHandler() {\n let locText = await getLocation();\n currentlat = locText.coords.latitude;\n document.getElementById(\"device-lat\").innerHTML = \"This device's Latitude : \" + currentlat.toFixed(6);\n currentlon = locText.coords.longitude;\n document.getElementById(\"device-long\").innerHTML = \"This device's Longitude : \" + currentlon.toFixed(6);\n\n locationsArray.forEach(function (value) {\n if (isInside(value.Latitude, value.Longitude)) {\n document.getElementById(\"locationAnswer\").innerHTML = value.Name;\n const utterance = new SpeechSynthesisUtterance();\n utterance.text = `Hello from Krishna, Congratulations! You have reached ${value.Name}`;\n window.speechSynthesis.speak(utterance);\n error = false;\n }\n\n // locationsArray.forEach(function (value) {\n // if (isInside(value.Latitude, value.Longitude)) {\n // document.getElementById(\"locationAnswer\").innerHTML = value.Name;\n // let utterance = new SpeechSynthesisUtterance(\"Hello from Krishna, Congratulations! You have reached \"+value.Name);\n // speechSynthesis.speak(utterance);\n // error = false;\n // }\n });\n\n // In case of any error where if the device is not 30m range it displays error.\n\n // if (error) {\n // // document.getElementById(\"error-message\").innerHTML = \"You're not in any specified areas\";\n // // let utterance = new SpeechSynthesisUtterance(\"You're not in any specified areas\");\n // // speechSynthesis.speak(utterance);\n // let innerHTML = \"You're not in any specified areas\";\n // document.getElementById(\"error-message\").innerHTML = innerHTML;\n // const utterance = new SpeechSynthesisUtterance(innerHTML);\n // //utterance.text = `Sorry,You're not in the radius range.`;\n // window.speechSynthesis.speak(utterance);\n // } else{\n // document.getElementById(\"error-message\").innerHTML = \"\";\n // }\n\n if (error) {\n document.getElementById(\"error-message\").innerHTML = \"You are not in the range of the location.\";\n let utterance = new SpeechSynthesisUtterance(\"You are not in the range of the location.\");\n speechSynthesis.speak(utterance);\n } else {\n document.getElementById(\"error-message\").innerHTML = \"\";\n }\n}", "title": "" }, { "docid": "e151301532f37b13e2fc340f5d01c854", "score": "0.5885071", "text": "function onGeoSuccess(position) {\n document.getElementById('geolocation').innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' + 'Longitude: ' + position.coords.longitude;\n myLat = position.coords.latitude;\n myLng = position.coords.longitude;\n latlng = new google.maps.LatLng(myLat, myLng);\n cordova.plugin.pDialog.setProgress(60);\n\n StartData();\n}", "title": "" }, { "docid": "c466a9163ec7b0bb8c6748c319d0ec35", "score": "0.58828324", "text": "function getLocation() \n{\n\t if (navigator.geolocation) \n\t\t{\n\t navigator.geolocation.watchPosition(showPosition,error,options);\n\t } \n\t\telse \n\t\t{\n document.getElementById('latlon').innerHTML = \"Geolocation is not supported by this browser.\";\n\t\t}\t\n}", "title": "" }, { "docid": "a1a3fa32aa7dccd401591b410aa9f60d", "score": "0.58661413", "text": "function watchPosition(){\n console.log(\"I'm inside watchPosition function\");\n\n function success(position) {\n\n console.log('Latitude: ' + position.coords.latitude + '\\n' +\n 'Longitude: ' + position.coords.longitude + '\\n' +\n 'Altitude: ' + position.coords.altitude + '\\n' +\n 'Timestamp: ' + position.timestamp + '\\n');\n\n current_lat=position.coords.latitude;\n current_lon=position.coords.longitude;\n\n friend_list.calculateAllDistances();\n friend_list.sortByDistance();\n friend_list.createList();\n }\n\n function error(error) {\n console.warn(`ERROR(${error.code}): ${error.message}`);\n var errorMessage;\n\n switch(error.code) {\n case error.PERMISSION_DENIED:\n console.log(\"User denied the request for Geolocation.\");\n\n errorMessage=\"<div style='margin-top:20px' class='alert alert-warning alert-dismissible fade show' role='alert'>\";\n errorMessage+=\"<button type='button' class='close' data-dismiss='alert' aria-label='close'> <span aria-hidden='true'>&times;</span> </button>\";\n errorMessage+=\"Non hai dato i permessi per la posizione.</div>\";\n $(\"#page\").prepend(errorMessage);\n break;\n case error.POSITION_UNAVAILABLE:\n console.log(\"Location information is unavailable.\");\n\n errorMessage=\"<div style='margin-top:20px' class='alert alert-warning alert-dismissible fade show' role='alert'>\";\n errorMessage+=\"<button type='button' class='close' data-dismiss='alert' aria-label='close'> <span aria-hidden='true'>&times;</span> </button>\";\n errorMessage+=\"Posizione non disponibile.</div>\";\n $(\"#page\").prepend(errorMessage);\n break;\n case error.TIMEOUT:\n // console.log(\"The request to get user location timed out.\");\n // errorMessage=\"<div style='margin-top:20px' class='alert alert-warning alert-dismissible fade show' role='alert'>\";\n // errorMessage+=\"<button type='button' class='close' data-dismiss='alert' aria-label='close'> <span aria-hidden='true'>&times;</span> </button>\";\n // errorMessage+=\"Timeout - Posizione non disponibile. Assicurati di aver attivato il GPS.</div>\";\n // $(\"#page\").prepend(errorMessage);\n break;\n case error.UNKNOWN_ERROR:\n console.log(\"An unknown error occurred.\");\n break;\n }\n }\n\n\n var options = {\n enableHighAccuracy: true,\n timeout: 10*1000,\n maximumAge: 50*1000\n };\n\n id=navigator.geolocation.watchPosition(success, error, options);\n}", "title": "" }, { "docid": "295aa21f6a95cfc4b9a2f75cc4a4595b", "score": "0.586195", "text": "function updateCurrentLocation (self){\n populateInfoWindow(self.marker, largeInfoWindow);\n getFourSquareInfo(self);\n animateMarker(self.marker, self.model.locationList());\n self.model.currentLocation(self);\n self.model.displayLocation(true);\n}", "title": "" }, { "docid": "7c0c6cdf286eaf55e2cd99b2183c4096", "score": "0.5858325", "text": "function updateLocation()\n {\n Logger.log(\"ImageGalleryIndexWidget::updateLocation()\");\n }", "title": "" }, { "docid": "afe1773b62b9237109836406dbb0f3a2", "score": "0.5847436", "text": "function showProgressUpdate(progressHint) {\n\tconsole.log(progressHint.progress);\n}", "title": "" }, { "docid": "dbb2bc5b832e62738bab81e8a38ceeef", "score": "0.5845333", "text": "function geoPosition() {\n kony.print(\"\\n\\n---in geo position---\\n\\n\");\n\n function geoSuccessCallBack(position) {\n lat = position.coords.latitude;\n lon = position.coords.longitude;\n if (lat == null) lat = 0;\n if (lon == null) lon = 0;\n kony.print(\"latitutde:-\" + lat);\n kony.print(\"longitude:-\" + lon);\n kony.application.dismissLoadingScreen();\n if (kony.os.deviceInfo().name == \"android\") updatedLocLatest();\n else updatedLoc();\n }\n\n function geoErrorCallBack(positionerror) {\n kony.print(\"Error occured while retrieving the data:-\\n\" + \"Error code:\" + positionerror.code + \" : \" + positionerror.message);\n kony.application.dismissLoadingScreen();\n }\n //var positionoptions1={};\n var positionoptions = new Object();\n //var positionoptions={};\n positionoptions.enablehighaccuracy = true;\n positionoptions.timeout = 10000;\n positionoptions.maximumage = 1000;\n watchFlag = false;\n //kony.application.showLoadingScreen(\"loadingscreen\",\"Loading...\",constants.LOADING_SCREEN_POSITION_FULL_SCREEN, true, false,null);\n try {\n kony.location.getCurrentPosition(geoSuccessCallBack, geoErrorCallBack, positionoptions);\n } catch (exception) {\n alert(\"Exception is ::\" + exception.message);\n }\n}", "title": "" }, { "docid": "d8bce12a2cb30b1c11a405457a225b3f", "score": "0.5840485", "text": "function UpdateLocation() {\n\trefreshLocationTimer = setTimeout(UpdateLocation, 20*1000);\n\tjQuery.get('file:///private/var/mobile/Documents/myLocation.txt', function(appdata) {\n//\tjQuery.get('myLocation.txt', function(appdata) {\n\t\tvar myvar = appdata;\n\t\tvar substr = appdata.split('\\n');\n\t\tvar templatitude=(substr[0]).split('=');\n\t\tvar templongitude=(substr[1]).split('=');\n\t\tvar latitude = $.trim(templatitude[1]);\n\t\tvar longitude = $.trim(templongitude[1]);\n\n\t\tif ((prevlatitude != latitude) || (prevlongitude != longitude)) {\n\t\t\tif (latitude < 0) { textLat = Math.round(latitude*100)/100 + \"\\u00B0\" + \"S\"; }\n\t\t\telse if (latitude > 0){ textLat = Math.round(latitude*100)/100 + \"\\u00B0\" + \"N\"; }\n\t\t\telse { textLat = Math.round(latitude*100)/100 + \"\\u00B0\"; }\n\t\t\tif (longitude < 0) { textLong = Math.round(longitude*100)/100 + \"\\u00B0\" + \"W\"; }\n\t\t\telse if (longitude > 0) { textLong = Math.round(longitude*100)/100 + \"\\u00B0\" + \"E\"; }\n\t\t\telse { textLong = Math.round(longitude*100)/100 + \"\\u00B0\"; }\n\t\t\tprevlatitude = latitude;\n\t\t\tprevlongitude = longitude;\n\t\t\tsearchWoeid(latitude, longitude); // SUCCESS\n\t\t}\n}).fail(function() {\n\tclearTimeout(refreshLocationTimer); // No myLocation.txt file, stop GPS mode.\n\tgps = false;\n\tTextColor = \"TextColorGrey\";\n\tweatherRefresherTemp(zip);\n});\n}", "title": "" }, { "docid": "9c0dafde6b86306115393671ffa7078d", "score": "0.58280534", "text": "updateLocation(location) {\n this.setState({\n ready: false\n }, () => {\n getNearbyPokemonInBounds(location)\n .then(data => {\n this.setState({\n nearbyPokemon: data,\n ready: true\n });\n })\n .catch(err => {\n this.setState({\n error: true\n });\n console.log(\"Error fetching pokemon\", err);\n });\n });\n }", "title": "" }, { "docid": "aabaeef40893b0f07e69e223eb1e933d", "score": "0.58239543", "text": "function trackingUpdate(position) {\n try {\n var currentPos = new T5.Geo.Position(\n position.coords.latitude, \n position.coords.longitude),\n accuracy = position.coords.accuracy / 1000;\n \n self.trigger('locationUpdate', position, accuracy);\n\n // if this is the initial tracking update then \n // create the overlay\n if (initialTrackingUpdate) {\n // if the geolocation annotation has not \n // been created then do that now\n if (! locationOverlay) {\n locationOverlay = new T5.Geo.UI.LocationOverlay({\n pos: currentPos,\n accuracy: accuracy\n });\n\n // if we want to display the location annotation, t\n // then put it onscreen\n locationOverlay.update(self.getTileLayer());\n self.setLayer('location', locationOverlay);\n } // if\n\n // TODO: fix the magic number\n var targetBounds = T5.Geo.B.createBoundsFromCenter(\n currentPos, \n Math.max(accuracy, 1));\n \n self.gotoBounds(targetBounds);\n }\n // otherwise, animate to the new position\n else {\n // update location annotation details\n locationOverlay.pos = currentPos;\n locationOverlay.accuracy = accuracy;\n\n // tell the location annotation to update \n // it's xy coordinate\n locationOverlay.update(self.getTileLayer());\n\n // pan to the position\n self.panToPosition(\n currentPos, \n null, \n T5.easing('sine.out'));\n } // if..else\n\n initialTrackingUpdate = false;\n }\n catch (e) {\n COG.Log.exception(e);\n }\n } // trackingUpdate", "title": "" }, { "docid": "dacef60d7528c6ab58408c713a4c93e9", "score": "0.5816245", "text": "function watchPosition(successCallback,failureCallback)\n{ \n //var positionoptions1 = {};//maximumage: 3000};\n var positionoptions={};\n positionoptions.enableHighAccuracy=true;\n positionoptions.timeout=20000;\n positionoptions.maximumAge=1000;\n positionoptions.minimumTime=2000;\n positionoptions.minimumDistance=2;\n //watchFlag = true;\n var watchID=null;\n try\n {\n watchID = kony.location.watchPosition (successCallback,failureCallback, positionoptions);\n }catch(err)\n {\n //alert(err.message);\n }\n return watchID;\n}", "title": "" }, { "docid": "472f37ac0203a9334554725284d2b5b5", "score": "0.58115643", "text": "function geoPosition(successCallback,failureCallback)\n{\n //var positionoptions1={};\n var positionoptions={};\n positionoptions.enableHighAccuracy=true;\n positionoptions.timeout=10000;\n positionoptions.maximumAge=1000;\n //watchFlag = false;\n try\n {\n kony.location.getCurrentPosition(successCallback, failureCallback,positionoptions);\n }\n catch(exception)\n {\n alert(\"Exception is ::\"+exception.message);\n }\n}", "title": "" }, { "docid": "f6e063a9b96b092a7ddf6bd71be44985", "score": "0.58024156", "text": "function updateInformation() {\n navigator.geolocation.getCurrentPosition(\n function (pos) {\n updateSalah({\n lat: pos.coords.latitude,\n lon: pos.coords.longitude\n });\n updateWeather({\n lat: pos.coords.latitude,\n lon: pos.coords.longitude\n });\n }\n );\n }", "title": "" }, { "docid": "1899f874cf099aed6531746f9af9d6b4", "score": "0.5797248", "text": "function getLocation() {\r\n\r\n if (navigator.geolocation) {\r\n\r\n navigator.geolocation.watchPosition(showPosition, showError);\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "93398b5bcdbbb139c58ee9508195b5d1", "score": "0.5789619", "text": "function checkGPSLocationToUpdateMap()\n{\n\tfn_debug(\"checkGPSLocationToUpdateMap begin\");\n\t\n\tfn_debug(\"checkGPSLocationToUpdateMap, gGPSLocation is \" + gGPSLocation);\n\tfn_debug(\"updateLocationStatus \" + gGPSLocation);\n\t\n\t//gGPSLocation = \"31.241462,121.490893,50\"; //外滩\n\t//处理一下GPS LocationListenerImpl发过来的GPS数据\n\tindex1 = gGPSLocation.indexOf(\",\");\n\tlatitude = gGPSLocation.substring(0, index1);\n\tindex2 = gGPSLocation.indexOf(\",\", index1+1);\n\tlongitude = gGPSLocation.substring(index1+1, index2);\n\taccuracy = gGPSLocation.substring(index2+1, gGPSLocation.length);\n\n\tupdateLocationStatus('GPS定位:经度' + latitude + ',纬度' + longitude + ',定位精度' + accuracy + '米');\n\tupdateLocationMap(latitude, longitude);\n\t\n\tfn_debug(\"checkGPSLocationToUpdateMap end\");\n}", "title": "" }, { "docid": "d9c5e08f60ff0e8ef99e78af701f2aa8", "score": "0.5771036", "text": "update () {\n if (MANUAL_MODE) {\n return;\n }\n\n navigator && navigator.geolocation && navigator.geolocation.getCurrentPosition(({ coords }) => {\n LOCATION.longitude = coords.longitude;\n LOCATION.latitude = coords.latitude;\n if (UPDATE_CALLBACK) {\n UPDATE_CALLBACK(LOCATION);\n }\n });\n }", "title": "" }, { "docid": "3ff9407c0c037ba18ca20d37538c3374", "score": "0.5754203", "text": "function onSuccessPM(location) {\n console.log(\"Inside location success call\");\n //location recording time\n var locationTime = Date(location.timestamp);\n var lat = location.coords.latitude;\n var long = location.coords.longitude;\n //build map with current latitude and longitude\n buildMapSearch(lat, long);\n }", "title": "" }, { "docid": "0609b7cf72fd13649e7307a9feaf2041", "score": "0.5748718", "text": "function getLocation()\n{\n console.log(\"getLocation()\");\n if (navigator.geolocation)\n {\n console.log(\"setting callback function\");\n //navigator.geolocation.getCurrentPosition(showPosition,null,{ maximumAge: 500, timeout: 6000, enableHighAccuracy: true});\n // enable permanent watching on location\n navigator.geolocation.watchPosition(showPosition,null, { maximumAge: 500, timeout: 6000, enableHighAccuracy: true});\n }\n else\n {\n console.log(\"no geolocation supported\");\n alert(\"Geolocation is not supported by this browser.\");\n }\n}", "title": "" }, { "docid": "468b4c6194df4cd145dea06ed898a247", "score": "0.57396156", "text": "function HandleConfirmLocation(buttonIndex) \n{\n // buttonIndex = 0 if dialog dismissed, i.e. back button pressed (do nothing).\n // buttonIndex = 1 if 'Yes' to use location information.\n // buttonIndex = 2 if 'No'\n if( buttonIndex == 1 )\n {\n // Request location...\n SpinnerStart( \"Please wait\", \"Acquiring location information...\" );\n \n// var options = {maximumAge: 0, timeout: 10000, enableHighAccuracy:true};\n// var options = { timeout: 31000, enableHighAccuracy: true, maximumAge: 90000 };\n// navigator.geolocation.getCurrentPosition(geoSuccess, geoError, options);\n navigator.geolocation.getCurrentPosition(geoSuccess, geoError, {timeout:10000});\n\n }\n \n // No: Do not use location information so return to main menu immediately...\n if( buttonIndex == 2 )\n {\n reg.handleBackKey();\n } \n}", "title": "" }, { "docid": "b737e0a47015dbbfc84f4aa5de6b3695", "score": "0.5737591", "text": "function search_cur_location(){\n //get the current location....\n console.log(\"In search_cur_Location\");\n //function getLocation() {\n console.log(\"In get Loacation\");\n if (\"geolocation\" in navigator) {\n navigator.geolocation.getCurrentPosition(function(position) {\n \n// console.log (\"in get position\")\n// console.log(position.coords.latitude);\n getData(position.coords.latitude, position.coords.longitude)\n \n \n });\n } else {\n alert('no geolocation');\n }\n //}\n \n \n }", "title": "" }, { "docid": "7d789b944c460582ac937f24eef8457e", "score": "0.5736907", "text": "updateProgress () {\n\t\t\tif (this.syncSteps > 0 && this.syncStepsTaken > 0 && this.syncProgress < 100) {\n\t\t\t\tthis.syncProgress = parseInt(this.syncStepsTaken / this.syncSteps * 100);\n\t\t\t}\n\n\t\t\t// console.log(`${this.syncProgress}% sync progress , ${this.syncSteps} sync steps, ${this.syncStepsTaken} steps taken, ${this.inProgress} in progress, ${this.syncEndpoints} endpoints, ${this.sync.length} syncs length`);\n\n\t\t\tlet vm = this;\n\t\t\tlet completeDelay = 6000;\n\t\t\tif (Platform.is.cordova) {\n\t\t\t\tcompleteDelay = 6000;\n\t\t\t}\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tif ((vm.syncProgress >= 100 && vm.syncSteps > 0 && !vm.syncComplete && vm.syncEndpoints > 0)\n\t\t\t\t\t|| (vm.syncProgress === 0 && vm.inProgress === 0 && vm.syncSteps === 0 && !vm.syncComplete)\n\t\t\t\t) {\n\n\t\t\t\t\t/* Dont fire complete event until sync is 100% complete */\n\t\t\t\t\tif (vm.syncSteps > 0 && vm.syncStepsTaken < vm.syncSteps) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconsole.log('sync completed');\n\t\t\t\t\tvm.syncComplete = true;\n\t\t\t\t\tvm.syncMessage = `Completed sync.`;\n\n\t\t\t\t\tvm.$store.commit('lastSync');\n\n\t\t\t\t\t/* Update db sync times for all items */\n\t\t\t\t\tvm.posters.forEach((item) => {\n\t\t\t\t\t\tvm.$store.commit('dbSyncTime', {\n\t\t\t\t\t\t\tname: item\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tvm.subPosters.forEach((item) => {\n\t\t\t\t\t\tvm.$store.commit('dbSyncTime', {\n\t\t\t\t\t\t\tname: item\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tvm.tertiaryPosters.forEach((item) => {\n\t\t\t\t\t\tvm.$store.commit('dbSyncTime', {\n\t\t\t\t\t\t\tname: item\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\n\t\t\t\t\tEvents.$emit('sync:complete');\n\t\t\t\t\tToast.create.positive({\n\t\t\t\t\t\thtml: `Synced ${vm.syncTotal + vm.syncStepsTaken} items.`,\n\t\t\t\t\t\ttimeout: 1000\n\t\t\t\t\t});\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tvm.$router.push('dashboard');\n\t\t\t\t\t},2200);\n\n\t\t\t\t}\n\t\t\t}, completeDelay);\n\n\t\t}", "title": "" }, { "docid": "ed5b04ce4b4e0245e391e4d57890dc3c", "score": "0.57342815", "text": "function _getGPS() {\n function _success(position) {\n _position.gps = position.coords;\n $('body > section > header > menu > a .icon').removeClass('waiting');\n _updateSearch();\n }\n\n function _error() {\n _position.gps = false;\n }\n\n if (window.navigator.geolocation !== undefined) {\n _positionWatch = window.navigator.geolocation.watchPosition(_success, _error);\n }\n }", "title": "" }, { "docid": "0de022c3fdca1fe92edf863974af7cfa", "score": "0.57339394", "text": "function updateDistanceCallback(position, callback)\n{\n\t// Done in the background. no message is required\n\tupdateDbDistanceCallback.currentPosition = position;\n\n\tdb_updateAllMetersDistance(position, getGpsDistance, function() {\n\t\tif(callback)\n\t\t\tcallback();\n\t});\n}", "title": "" }, { "docid": "8a01ab66467f2bd1f76af1f4444cc977", "score": "0.5727545", "text": "function onDeviceReady() {\n //reset the locErrorShow message for no location, so that a user will only see the no location message once each session. \n locErrorShown=false;\n\n\n //clear old intervals that were running\n //logout();\n logout();\n setupWatch(10000);\n\n if(navigator.network.connection.type== \"none\"){\n userOffline();\n }\n\n\n navigator.geolocation.getCurrentPosition(onSuccess, onError);\n }", "title": "" }, { "docid": "1a194a2fa02783137b09d4a294b6ede2", "score": "0.572149", "text": "function updateProgressBar(msg, complete) {\n // Incrementally update the progress bar, or in the case of complete being present, set to 100\n if (typeof complete === \"undefined\")\n percent += Math.ceil((100 - percent) * .05);\n else\n percent = 100;\n\n // Update the percent text and show the progress relative to the width (we adjust 6 pixels to keep the bar from breaking)\n jQuery(\".LoadingWrap .perc\").html(percent + \"%\");\n\n // 435px is the full width, 415px is the difference between start and finish. I calculate the distance to animate by getting the difference of percent.\n jQuery(\".LoadingWrap .LoadingBar\").stop().animate({ backgroundPosition: \"(-\" + (435 - (415 * (percent / 100))) + \"px 0)\" }, 400);\n }", "title": "" }, { "docid": "9c0aa1b0a82b5f584343dbbb2a47c931", "score": "0.5717959", "text": "function onSuccess(position) {\n distance= calcCrow(position.coords.latitude,position.coords.longitude,Number(guide1.getPointsLat(index)),Number(guide1.getPointsLng(index)));\n var Gpos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\n if(!(google.maps.geometry.poly.isLocationOnEdge(Gpos, polyLine,0.001)))\n {\n window.plugins.toast.show(\"Recalculate\", 'long', 'bottom');\n var desti = guide1.getDestination(); \n guide1.clear(); guide1.calculate((position.coords.latitude+\",\"+position.coords.longitude),desti,config.getLocomotion());\n index=0;\n step1=0;\n step2=0;\n distance=4;\n polyLine=map1.getPolyLine();\n }\n if((step1==0)&&(distance<=0.025))\n {\n sendMessageToSerial(guide1.getManeuvers(index),3);\n step1=1;\n }\n else if((step2==0)&&(distance<=0.05))\n {\n sendMessageToSerial(guide1.getManeuvers(index),2);\n step2=1;\n }\n else if(distance<=0.1)\n {\n sendMessageToSerial(guide1.getManeuvers(index),1);\n index++;\n step1=0;\n step2=0;\n \n }\n }", "title": "" }, { "docid": "dba5c7b914f1f5e9c34fb7914c3f1327", "score": "0.57169884", "text": "function updateProgress() {\r\n\tprogress++;\r\n\tswitch(state) {\r\n\tdefault: \t\t\t// states.READY\r\n\t\treturn;\r\n\tcase states.DOWNLOADING:\t\t\r\n\t\tif (progress > DOWNLOADMAX) {\r\n\t\t\thandleTimeout();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttimeout = window.setTimeout(updateProgress, DELAY);\r\n\t\tdocument.getElementById('progress').style.width = Math.round(100*progress/DOWNLOADMAX) + \"%\";\r\n\t\tbreak;\r\n\tcase states.PREPARING:\r\n\t\tif (progress > MAXPREPARE) {\r\n\t\t\tstopTimeout();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttimeout = window.setTimeout(updateProgress, DELAY);\r\n\t\tdocument.getElementById('progress').style.width = Math.round(100*progress/MAXPREPARE) + \"%\";\r\n\t\tbreak;\r\n\tcase states.GPS:\r\n\t\tif (progress > DOWNLOADMAX) {\r\n\t\t\thandleGPSTimeout();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttimeout = window.setTimeout(updateProgress, DELAY);\r\n\t\tdocument.getElementById('progress').style.width = Math.round(100*progress/DOWNLOADMAX) + \"%\";\r\n\t\tbreak;\r\n\t}\t\r\n}", "title": "" }, { "docid": "613f7922fc721be815b4b9a136199af8", "score": "0.57117206", "text": "function getLocation()\n{\n if (navigator.geolocation)\n {\n navigator.geolocation.getCurrentPosition(SetLocation);\n }\n else\n {\n document.getElementById('lat_label').innerHTML = \"Error\"; \n document.getElementById('lng_label').innerHTML = \"Error\"; \n }\n}", "title": "" }, { "docid": "3c3e2a49d80624e8c5a69eca6d9a50a6", "score": "0.570711", "text": "function updateProgress(e){\n\t if(e.lengthComputable){\n\t\tvar percentComplete = ((e.loaded/e.total) * 100).toFixed(2);\n\t\tif(typeof(thisObject.preloader)!==\"undefined\" && typeof(thisObject.preloader.target)!==\"undefined\"){\n\t\t\tconsole.log(thisObject.preloader.target + \" - percentage complete : \" + percentComplete);\n\t\t\tif((thisObject.preloader.type).toLowerCase()==\"progressbar\"){\n\t\t\t\tdoc(thisObject.preloader.target,\"<div style='width:100%; text-align:center; background:#eee; border:0px solid #ccc;'>\\\n\t\t\t\t\t\t\t\t\t\t\t <div style='height:100%; width:\"+Math.floor(percentComplete)+\"%; background:\"+thisObject.preloader.background.color+\";'>\\\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;\\\n\t\t\t\t\t\t\t\t\t\t\t </div>\\\n\t\t\t\t\t\t\t\t\t\t </div>\");\n\t\t\t}\n\t\t}\n\t }else{\n\t\tconsole.log(\"Unable to compute progress information since the total size is unknown\");\n\t\t//<!-- div style='position:absolute; width:100%; height:auto; text-align:center; font-size:14px; color:#777;'>\"+percentComplete+\"%</div -->\\\n\t }\n\t}", "title": "" }, { "docid": "cd46221d8d19964d2ae6f08c6d97b95c", "score": "0.56966144", "text": "function trackLocation() {\r\n if (navigator.geolocation) {\r\n navigator.geolocation.watchPosition(showPosition);\r\n } else {\r\n\t\talert(\"geolocation is not supported by this browser\");\r\n }\r\n}", "title": "" }, { "docid": "937003bc67ce8b573e0eed1d18a555b3", "score": "0.5681757", "text": "function updateCompletionStatus(){\n\t\tvar c = complete();\n\t\tif(c == ROWS * COLS){\n\t\t\tstatusP.innerHTML = \"Great Success!\";\n\t\t} else {\n\t\t\tvar p = ((100 / (ROWS * COLS)) * c) >> 0;\n\t\t\tstatusP.innerHTML = p + \"% Complete\";\n\t\t}\n\t}", "title": "" }, { "docid": "4ca6ecd1d8dfb01441c3ed271a0ffb74", "score": "0.56803846", "text": "function startGeoLocationWatcher() {\n\t\tconsole.log(\"startGeoLocationWatcher\");\n\t if (navigator.geolocation) {\n\t \t\n\t \tvar options = {\n\t \t\ttimeout: 15000,\n\t \t\tmaximumAge: 0,\n\t \t\tenableHighAccuracy: true,\n\t \t};\n\t \t\n\t watchId = navigator.geolocation.watchPosition(onSuccessCallback, onErrorCallback, options);\n\t \n\t function onSuccessCallback(position) {\n\t \t\n\t \tconsole.log(position);\n \n var orderedList = strollPlaces.getListOrderedByDistance(position.coords);\n \n console.log(orderedList[0].distance);\n\n var activePlaces = strollPlaces.getActivePlaces(position.coords);\n\n console.log(activePlaces);\n\n if( activeInfoPopup === false && activePlaces.length > 0) {\n \n activeInfoPopup = true;\n renderInfoPopupContent(strollPlaces.getById(activePlaces[0].id));\n tau.openPopup(\"#place-info-popup-id\");\n \n console.log((document.hidden) ? \"app hidden\" : \"app visible\");\n\n if (tizen.power.isScreenOn() === false) {\n watchActivation = true;\n tizen.power.turnScreenOn();\n } else {\n activateApp();\n }\n }\n\n\t\t\t\t// Render information on the watch screen\n renderPlaceListContent(orderedList);\n renderNextPlaceContent(orderedList[0]);\n\t \t\n\t }\n\t \n\t function onErrorCallback(error) {\n\n\t\t\t\tconsole.log(error);\n\n\t\t\t\tvar message = \"An unknown error occurred.\";\n\n\t \tswitch (error.code) {\n\t\t\t\t\tcase error.PERMISSION_DENIED:\n\t\t\t\t\t\tmessage = \"User denied the request for Geolocation.\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase error.POSITION_UNAVAILABLE:\n\t\t\t\t\t\tmessage = \"Location information is unavailable.\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase error.TIMEOUT:\n\t\t\t\t\t\tmessage = \"The request to get user location timed out.\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase error.UNKNOWN_ERROR:\n\t\t\t\t\t\tmessage = \"An unknown error occurred.\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\trenderGeneralInfoPopupText(message);\n\t\t\t\t//setStopStateTracker();\n\t }\n\t \n\t } else {\n console.log(\"Geolocation is not supported.\");\n\t\t\trenderGeneralInfoPopupText(\"Geolocation is not supported.\");\n\t\t\t//setStopStateTracker();\n\t }\n\t\t\n\t}", "title": "" }, { "docid": "ab3c2dcafe060c352d13b2cb5672ffea", "score": "0.5661184", "text": "function getCurrentLocation() {\n navigator.geolocation.getCurrentPosition(function (posData) {\n currentPos.lat = posData.coords.latitude;\n currentPos.lng = posData.coords.longitude;\n accuracy = posData.coords.accuracy;\n //if the programming is starting for the first time, set the last position to the current\n if (countTime < TIME_INTERVAL) {\n lastPos.lat = posData.coords.latitude;\n lastPos.lng = posData.coords.longitude;\n }\n }, function () {\n //If geolocation API can't get coordinates\n showAlert(\"Could not generate current coordinates\");\n });\n}", "title": "" }, { "docid": "324c9dee287df3021d0880ceefb2811c", "score": "0.5653605", "text": "isLocationAvailable(time) {\n }", "title": "" }, { "docid": "682e5b6145201df024f4f6674de12db9", "score": "0.5651733", "text": "function updateProgress() {\n renderProgress()\n STORE.currentQuestion++;\n}", "title": "" }, { "docid": "d805e81cfec359c1bc8e3c06978ed2ec", "score": "0.5651018", "text": "function initDistCheck() {\r\n $.when(getLocationData(getDistanceFromAPI)).done(function() {\r\n\r\n });\r\n}", "title": "" }, { "docid": "730ce5a022f11bcdcfa44a7207f5077f", "score": "0.5650431", "text": "function progress() {\n lightControl.progress();\n laneN.progress();\n laneE.progress();\n laneS.progress();\n laneW.progress();\n}", "title": "" }, { "docid": "bc1d8f710bef23ff5cf34af158a099b1", "score": "0.5649389", "text": "componentDidUpdate() {\n (async () => {\n let { status } = await Location.requestForegroundPermissionsAsync();\n if (status !== 'granted') {\n setErrorMsg('Permission to access location was denied');\n return;\n }\n let location = await Location.getCurrentPositionAsync({});\n this.setState({ location: location });\n });\n }", "title": "" }, { "docid": "f11db036d29a0298a197b4c9e0328488", "score": "0.5648586", "text": "updateJobProgress() {\n Craft.cp.trackJobProgress(false, true)\n }", "title": "" }, { "docid": "5225c878d7a164ce52fad5a5bcd5391d", "score": "0.56456804", "text": "function updateDeviceWaiting () {\n\t\t\tvar data = {\n\t\t\t\tuid: '555',\n\t\t\t\tname: 'สมหมาย',\n\t\t\t\tcarLicense: 'ดก-4448',\n\t\t\t\tlat: 13.456, \n\t\t\t\tlng: 100.11243256,\n\t\t\t\tdistance: 4564,\n\t\t\t\tdetail: '',\n\t\t\t\tpassengerID: '0001',\n\t\t\t\tstatus: 5\n\t\t\t};\n\t\t\t$.ajax({\n\t\t\t url : \"service/device/updateStatus\",\n\t\t\t type: \"POST\",\n\t\t\t data : data,\n\t\t\t success: function(data){\n\t\t\t \t//console.log(data)\n\t\t\t }\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "c7a9cf7be5ac30742d4ea8526c5d374b", "score": "0.5645639", "text": "function updateProgress()\n{\n\tconst quantity = document.getElementById(\"quantityInput\").value;\n\tconst goal = document.getElementById(\"goalInput\").value;\n\tconst errorLabel = document.getElementById(\"progressValidationLabel\");\n\n\tif(checkValues(quantity,goal,errorLabel))\n\t{\n\t\t//Updates the width of the colored div in order to show the progress\n\t\tlet newProgress;\n\t\tif(Number(quantity) != 0)\n\t\t\tnewProgress = Number(quantity) / Number(goal);\n\t\telse\n\t\t\tnewProgress = 0;\n\t\t\n\t\tconst progressBar = document.getElementById(\"mainProgressBar\");\n\t\tconst progressDiv = progressBar.getElementsByClassName(\"progress\");\n\n\t\tif(progressDiv != null)\n\t\t\tprogressDiv[0].style.width = (newProgress * 100) + \"%\"; \n\n\t\t//Updates de progress label\n\t\tconst progressLabel = document.getElementById(\"progressLabel\");\n\t\tprogressLabel.innerHTML = \"Actual progression: \" + quantity +\"/\" + goal + \": \" + (newProgress * 100) + \"%\";\n\t}\n}", "title": "" }, { "docid": "ba59f950cc58615ade85ffbc45012e4f", "score": "0.564559", "text": "function updateProgress() {\r\n ui.controls.progress.attr('value', currentTrack.currentTime);\r\n }", "title": "" }, { "docid": "30aa4aa0a19d485a3ca5ccf04091822f", "score": "0.56439024", "text": "function checkLocation() {\n //If site not already Allowed to use location, will trigger browser alert asking for permission.\n if (navigator.geolocation){\n navigator.geolocation.getCurrentPosition(function(position) {\n //If granted permission, startLocation becomes user position.\n startLocation.lat = position.coords.latitude,\n startLocation.lng = position.coords.longitude\n\n //Google geocoder is used to find approximate zip code to put into Search box of Filter\n const geocoder = new google.maps.Geocoder();\n geocoder.geocode({ location: startLocation }, (results, status) => {\n if (status === \"OK\") {\n const zip = results[0].address_components[6].long_name;\n searchLocationInput.value = zip;\n initDefaultMap();\n } else {\n alert(\"Unable to use location at this time.\")\n }\n })\n },\n //Runs if you click Use My Location while browser has Location Services blocked\n () => {alert(\"Your web browser has blocked using your location. Please enable to use your current location.\")}\n )\n // !navigator.geolocation only the case when using a browser not capable of geolocation\n } else {\n alert(\"Your web browser does not support geolocation.\")\n }\n}", "title": "" }, { "docid": "c3a737639f2e0d35ab2727121037219b", "score": "0.56403726", "text": "function locateMe() {\n // Throw an error if no update is received every 30 seconds\n var options = { timeout: 30000 };\n watchID = navigator.geolocation.watchPosition(onGeoSuccess, onGeoError, options);\n }", "title": "" }, { "docid": "3ecfc21271c0f3a2a36bbb8584ebfade", "score": "0.5634589", "text": "_getLocation() {\n (async () => {\n let { status } = await Location.requestPermissionsAsync();\n if (status !== 'granted') {\n this.state({loading : \"loading\"})\n }\n let location = await Location.getCurrentPositionAsync({});\n this.setState({\n latitude: location.coords.latitude,\n longitude: location.coords.longitude,\n latitudeDelta: 0.0022,\n longitudeDelta: 0.0000,\n })\n // show a location marker\n let action = { type: \"LOcationFocused\"}\n this.props.dispatch(action)\n })();\n }", "title": "" }, { "docid": "d6b033f1d0db7f102c513c6980483e6a", "score": "0.56266594", "text": "function getLocation() {\n if (navigator.geolocation) {\n if (i < quest.length)\n {\n navigator.geolocation.getCurrentPosition(thePosition);\n }\n else\n {\n x.innerHTML = \"You finished the quest\";\n }\n } \n else { \n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n}", "title": "" }, { "docid": "af5a227e42706d78da94f5cce047ee70", "score": "0.5616616", "text": "function progress(update) {\n\t\t\tdeferred.progress(update);\n\t\t}", "title": "" }, { "docid": "bbd70ee12e813a22f6fe081dbfb7e92b", "score": "0.56075865", "text": "function gotLocation(response) {\n if (response && response.coords) {\n latitude = response.coords.latitude;\n longitude = response.coords.longitude;\n accuracy = response.coords.accuracy;\n\n address.geolocation = response.coords;\n address.fire(\"location\", address.geolocation);\n\n fetchLocation();\n }\n else\n noLocation();\n }", "title": "" }, { "docid": "27bccafb26f1650a3cb917ca83ed0ec7", "score": "0.56059486", "text": "function updateTimezoneLocationInformation() {\n\tif (!(selectedLocation.lat() == 0 || selectedLocation.lng() == 0)) {\n\t\tdocument.getElementById(\"timezone_stream\").innerHTML = \"<img class='spinner' src='images/spinner.gif' alt='...' title='Loading timezone information'/>\";\n\t\tgetTimezone(selectedLocation);\n\t}\n}", "title": "" }, { "docid": "25f15f6e60d6d147b2f2e79f78b692d8", "score": "0.5600275", "text": "function main() {\n var prev = false;\n\n setInterval(function() {\n var close = board.objectDetected();\n\n if (board.gpsDataAvailable()) {\n LOCATION = board.getGpsLocation();\n } else {\n console.log(\"No GPS data available...\")\n }\n if (LOCATION && close && !prev) { report(); }\n\n prev = close;\n }, 1000);\n}", "title": "" }, { "docid": "7c9bca73dc6e11da25a5ca662816b702", "score": "0.55989945", "text": "function exeCurrentLocation(callback) {\n\n getCurrentPositionByBaiduMap(callback);\n\n // Get location by Baidu Geolocation service\n function getCurrentPositionByBaiduMap(callback) {\n var geolocation = new BMap.Geolocation();\n geolocation.enableSDKLocation();\n geolocation.getCurrentPosition(function (r) {\n if (this.getStatus() == BMAP_STATUS_SUCCESS) {\n console.log(\"# Get location by Baidu Map Geolocation\");\n callback(r.point.lat, r.point.lng);\n } else {\n console.warn(\"# Failed to get location by Baidu Map Geolocation\");\n getCurrentPositionByGeolocation(callback);\n }\n }, { enableHighAccuracy: true });\n }\n\n // If failed again, try HTML5 Geolocation\n function getCurrentPositionByGeolocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n function(position) {\n console.log(\"# Get location by HTML5 Geolocation\");\n callback(position.coords.latitude, position.coords.longitude);\n },\n function(error) {\n console.warn(\"# Failed to get location by HTML5 Geolocation, message: \" + error.message);\n getCurrentPositionByIP(callback);\n },\n {\n enableHighAcuracy: false,\n timeout: 5000,\n maximumAge: 60000\n });\n } else {\n console.warn(\"# Failed to get location by HTML5 Geolocation, not supported.\");\n getCurrentPositionByIP(callback);\n }\n }\n\n // If failed again, try IPInfo.io\n function getCurrentPositionByIP(callback) {\n // http://api.jquery.com/jQuery.get/\n $.get(\"http://ipinfo.io\",\n function(response) {\n if (response.loc) {\n console.log(\"# Get location by IP\");\n var location = response.loc;\n var locationArr = location.split(\",\");\n callback(locationArr[0], locationArr[1]);\n return;\n } else {\n console.error(\"# Failed to get location by IP.\");\n }\n },\n \"jsonp\").fail(function() {\n console.error(\"# Failed to get location by IP.\");\n });\n }\n}", "title": "" }, { "docid": "9a71ff662f9b754f15d9b7ea995248ad", "score": "0.55943143", "text": "updateProgress(){\n this.uploadStatus = (this.uploadProgress / this.uploadTotal) * 100;\n this.progressStyle = 'width: ' + this.uploadStatus + '%;';\n this.progressWrapperStyle = 'margin-top:10px; margin-bottom:none;'\n if(this.uploadStatus === 100){\n app.libLink = \"window.location.href='http://www.openalbum.us/library?lib=\" + app.library + \"'\";\n app.libLink2 = \"http://www.openalbum.us/library?lib=\" + app.library;\n app.cb2Style = '';\n app.progressWrapperStyle = \"display: none;\";\n app.progressStyle = \"display: none;\";\n }\n }", "title": "" }, { "docid": "f3638d2cf7ad589a6b89259c8e5367a5", "score": "0.5592742", "text": "function updateCurrentLocation()\n{\n /*var onSuccess = function(position) {\n currentLocation = {};\n \n currentLocation[\"latitude\"] = position.coords.latitude;\n currentLocation[\"longitude\"] = position.coords.longitude;\n };\n\n function onError(error) {\n }\n \n navigator.geolocation.getCurrentPosition(onSuccess, onError);*/\n \n}", "title": "" }, { "docid": "5ddc6db007bd39f158ac7e040508b080", "score": "0.55845034", "text": "function Gsp$Progress$_checkProgress() {\n\tif (_onProgressStartCallback != null)\n\t\t_onProgressStartCallback();\n\n\tGsp.Gallery.GetCurrentStatus(_galleryId, this._onFeedbackReceived, this._onFeedbackFailed, this);\n}", "title": "" }, { "docid": "66d1b268885a9cb795942d2f5e1cc0dc", "score": "0.5582897", "text": "checkCampaignProgress(){\n\n\n }", "title": "" }, { "docid": "dddf0e743c1c5b9cd3036ab0b61b2985", "score": "0.5576265", "text": "function geolocate() {\r\n if (navigator.geolocation) {\r\n console.log(navigator.geolocation);\r\n navigator.geolocation.getCurrentPosition(function (position) {\r\n var geolocation = new google.maps.LatLng(\r\n position.coords.latitude, position.coords.longitude);\r\n var circle = new google.maps.Circle({\r\n center: geolocation,\r\n radius: position.coords.accuracy\r\n });\r\n localStorage.setItem('Current', JSON.stringify(geolocation));\r\n console.log(position);\r\n autocomplete.setBounds(circle.getBounds());\r\n $(\".geo\").removeAttr(\"disabled\");\r\n });\r\n initializeStart('txtStartLocation');\r\n initializeEnd('txtDestination');\r\n }\r\n else {\r\n $.gritter.add({\r\n title: 'It seems there is something wrong !',\r\n text: 'Your GPS looks disabled, Please enable it first',\r\n sticky: true,\r\n class_name: 'bg-info',\r\n time: '400'\r\n });\r\n }\r\n}", "title": "" }, { "docid": "595e55dd3095cbf9db32bbe72354036a", "score": "0.5576115", "text": "function getPosition() {\n\t\n\t//change time box to show updated message\n\t$('#time').val(\"Getting data...\");\n\t\n\t//instruct location service to get position with appropriate callbacks\n\tnavigator.geolocation.getCurrentPosition(successPosition, failPosition);\n}", "title": "" }, { "docid": "1c8e2b12e0a96461c979a836bad720f2", "score": "0.5569151", "text": "function success(pos) {\n lat = pos.coords.latitude;\n long = pos.coords.longitude;\n localBrews()\n }", "title": "" }, { "docid": "69f9023773a26c03b462e5f5d57b145d", "score": "0.5566485", "text": "function getLocalisation() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Check if Geolocation is supported\r\n\tinit();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Initialize the user interface\r\n\tdocument.getElementById(\"loader\").style.visibility = \"visible\";\t\t\t// Display loader\r\n\tnavigator.geolocation.getCurrentPosition(success, fail);\t\t\t\t\t// Get current position\r\n}", "title": "" }, { "docid": "8109bf1dfca60ad2b349d196b3a34e02", "score": "0.55660737", "text": "function getLocation (){\n\t\t\n\t\t//on success\n\t var newPosition = function(p){ \n\t position = p; \n\t var lat = position.coords.latitude;\n\t var lng = position.coords.longitude;\n\t var newLocation = lng + ' ' + lat; // the var name location screwed everything up\n\t \tlocationNote(newLocation, ip);\n\n\t }\n\t\n\t // on error\n\t var positionError = function(error){ \n//\t feedback(error); \n\t\t\tvar browser = BrowserDetect.browser;\n\t\t\t\n\t\t\tswitch(browser){\n\t\t\t\n\t\t\t\tcase \"Chrome\":\n\t\t\t\talert(\"Oops! We can't see where you are...\");\n\t\t\t\talert(\"Please go to chrome://settings/content and switch your Location preference to 'Ask me when a site tries to track my physical location.' Then, reload this page and select 'Allow'. Happy browsing!\")\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Safari\":\n\t\t\t\talert(\"Oops! We can't see where you are...\")\n\t\t\t\talert(\"Please select 'Allow' when Safari asks to share your current location.\")\n\t\t\t\tbreak;\t \n\t\t\t\t\n\t\t\t}\n\n\t }\n\t\n\t // get location from the browser\n\t navigator.geolocation.getCurrentPosition(newPosition,positionError);\t\n\t \n\t}", "title": "" }, { "docid": "2360b50af136a72553e52b1dad693aa1", "score": "0.5565341", "text": "function getPosition() {\n\twatchID = navigator.geolocation.watchPosition(successPosition, failPosition, locationOptions);\n\t//add the lat and long into an array for use with creating a finished map\n}", "title": "" }, { "docid": "e7d9641cece96381a19b8c9ced6c5e67", "score": "0.55641025", "text": "function updateAdmissionsText(progress){\n }", "title": "" }, { "docid": "5c1a768671d44a03b47954e6ffb8053e", "score": "0.55620736", "text": "function checklocationEnabled() {\n document.addEventListener(\"deviceready\", onDeviceReady, false);\n function onDeviceReady() {\n\n cordova.plugins.diagnostic.isLocationEnabled(function (enabled) {\n console.log(\"Location is \" + (enabled ? \"enabled\" : \"disabled\"));\n if (!enabled) { \n alert(\"Please turn on your GPS and set it to \\\"High Accuracy\\\" mode\");\n cordova.plugins.diagnostic.switchToLocationSettings();\n }\n }, function (error) {\n alert(\"The following error occurred: \" + error);\n \n });\n\n }\n}", "title": "" }, { "docid": "d5452392390047e567237fda9f72fc04", "score": "0.55619746", "text": "listenForlocation() {\n // get device location data\n // navigator.geolocation.getCurrentPosition((position) => {\n // var initialPosition = JSON.stringify(position);\n // // console.log(initialPosition);\n // // this.setState({\n // // position: initialPosition\n // // });\n // },\n // (error) => Alert.alert(error.message),\n // {enableHighAccuracy: true, timeout: 20000, maximumAge: 1000}\n // );\n // this.watchID = navigator.geolocation.watchPosition((position) => {\n // // var lastPosition = JSON.stringify(position);\n // // this.setState({\n // // position: lastPosition\n // // });\n // });\n }", "title": "" }, { "docid": "b05454b68c20dbf9ff937c315eb93bc8", "score": "0.5561453", "text": "function updateDistances(callback, DbUpdated)\n{\n\t$(\"#iWarning\").html(\"\");\n\tgetLocation(function(position) {\n\t\t\n\t\tvar distance=0;\n\t\tif(position)\n\t\t{\n\t\t\tdistance=999999; // force update if no latestPosition or unabel to parse it\n\t\t\tif(!DbUpdated) {\t// no need to calculate distances if new DB\n\t\t\t\t\n\t\t\t\tif(sessionStorage.latestPosition)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tlatestPosition = JSON.parse(sessionStorage.latestPosition);\n\t\t\t\t\t\tdistance = getPositionsDistance(latestPosition, position);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// if JSON parse fails, do nothing\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\t\t\t\n\t\t} else {\t// no position\n\t\t\t$(\"#iWarning\").html(\"*** מיקום נוכחי אינו זמין ***\");\n\t\t\tsessionStorage.latestPosition=\"\";\n\t\t}\n\n\t\t\n\t\tif(distance>50)\n\t\t{\n\t\t\tsessionStorage.latestPosition = JSON.stringify(position);\n\t\t\tupdateDistanceCallback(position, callback);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(callback)\n\t\t\t\tcallback();\n\t\t}\n\t});\n}", "title": "" }, { "docid": "635e6f59f7520f63675e35539ff8397a", "score": "0.5559663", "text": "function updateStatus() {\n percent += 1;\n for (var i = (2500000 * (percent-1)); i < (2500000 * percent); i++) {\n blorb[i] = Math.floor(Math.random() * 256);\n };\n\n if (!(percent % 10)) {\n postMessage({id: id, message: percent + '% completion'});\n };\n \n if (percent >= 100) {\n // we're done, so...\n finishWork();\n }\n}", "title": "" }, { "docid": "0c212c3ed58a559307e8b22959c80f6e", "score": "0.5556674", "text": "function onLocationFound(e) {\n console.log(\n 'Geolocation successful: ' + e.latlng +\n ', Accuracy: ' + e.accuracy\n );\n}", "title": "" }, { "docid": "8829c38e9d859f63d4bb9b110f6733e9", "score": "0.55541104", "text": "function getLocation() {\n navigator.geolocation.watchPosition(showLocation);\n\n function showLocation(position) {\n userLat = position.coords.latitude;\n userLng = position.coords.longitude;\n document.querySelector(\"#currentLocSelect\").style.opacity = \"100%\";\n document.querySelector(\"#currentLocSelect\").disabled = false;\n }\n}", "title": "" }, { "docid": "c8cbd462dc7f12813bf368c7565acadc", "score": "0.554726", "text": "function findlocation(){\n var options = {\n enableHighAccuracy: true,\n timeout: 5000,\n maximumAge: 0\n };\n\n function error(err) {\n console.warn(`ERROR(${err.code}): ${err.message}`);\n };\n\n function success(pos) {\n var crd = pos.coords;\n lat = crd.latitude;\n long = crd.longitude;\n current_location = {lat, long};\n initMap();\n findEntriesNearMe();\n };\n navigator.geolocation.watchPosition(success, error, options);\n }", "title": "" }, { "docid": "eac77a06a5a1dd14da72943889b3e03c", "score": "0.5544064", "text": "getLocation(){ \n if(this.state.gettingLocation){\n return toast('Getting location...')\n }\n this.setState({gettingLocation:true},()=>{\n Geolocation.getCurrentPosition(\n (position) => {\n this.setState({\n latitude:position.coords.latitude,\n longitude:position.coords.longitude\n },()=>{\n this.googleReverseGeo()\n })\n },\n (error) => {\n // See error code charts below.\n console.log(error.code, error.message);\n this.setState({gettingLocation:false})\n toast('Location request timeout please try turning off and switch on your location gps')\n },\n { enableHighAccuracy: true, timeout: 15000, maximumAge: 10000 }\n );\n })\n \n }", "title": "" }, { "docid": "5026b360e0453698f39a43c4930cbafb", "score": "0.55439675", "text": "function updatePosition(position)\r\n{\r\n thePosition =\r\n {\r\n lat: position.coords.latitude,\r\n lng: position.coords.longitude\r\n };\r\n\r\n getMap(thePosition);\r\n\r\n removeMarkers();\r\n /*Current location of the user will be marked with a green marker*/\r\n var marker = new google.maps.Marker\r\n ({\r\n position: thePosition,\r\n map: map,\r\n icon: 'http://maps.google.com/mapfiles/ms/icons/green-dot.png',\r\n title: 'Your current location'\r\n });\r\n\r\n\r\n gmarkers.push(marker);\r\n infowindow = new google.maps.InfoWindow();\r\n google.maps.event.addListener(marker, 'click', function() {\r\n infowindow.setContent('Your current location');\r\n infowindow.open(map, this);\r\n });\r\n\r\n /*A call to nearbySearch function returns the result with the type requested*/\r\n service = new google.maps.places.PlacesService(map);\r\n service.nearbySearch({\r\n location: thePosition,\r\n radius: 500,\r\n type: ['parking']\r\n }, callback);\r\n\r\n} //End of update function", "title": "" }, { "docid": "b375c1a77695de617cb0b54bf2912a78", "score": "0.55436033", "text": "function updatePosition() {\n if (positionRequestExecutes === false && gpsLatitude != undefined\n && gpsLongitude != undefined) {\n positionRequestExecutes = true;\n updatePositionStartTime = new Date().getTime();\n $.ajax({\n type : \"POST\",\n url : \"../rest/mobile/update_player_position\",\n data : \"latitude=\" + gpsLatitude + \"&longitude=\" + gpsLongitude + \"&accuracy=\" + gpsAccuracy\n + \"&playerId=\" + playerId + \"&speed=\" + gpsSpeed + \"&heading=\" + gpsHeading,\n timeout : 5000,\n success : function() {\n latencyCount++;\n latencyTotal += new Date().getTime() - updatePositionStartTime;\n // console.log(\"Count: \" + latencyCount + \" Latenz: \" +\n // (latencyTotal / latencyCount));\n positionRequestExecutes = false;\n }\n });\n };\n}", "title": "" }, { "docid": "ece58cd9f8ed7b35d28f29048caffe52", "score": "0.554251", "text": "function getLocation(){\n if(navigator.geolocation){\n var options = { //Esto no esta funcionando.. :(\n enableHighAccuracy: true\n }\n navigator.geolocation.getCurrentPosition(getPos,getFail,options);\n } else {\n alert('Browser do not support location');\n }\n }", "title": "" }, { "docid": "a7533b80aa3a9c56ba2c718bf3ec899e", "score": "0.5538176", "text": "function updateLocation() {\n pikePlace.avePerCust = 0;\n displayAllLocations();\n//not exactly like this, but similar to this when form is attached\n}", "title": "" }, { "docid": "827a102d4f98481e609038c8cfda4527", "score": "0.5535754", "text": "function main() {\n try {\n testDevice();\n getCurrentLocation();\n countTime += REFRESH_RATE;\n report();\n\n var index = isPredefined();\n console.log(\"Index: \" + index);\n if (index >= 0) {\n\n //load a page only if we've moved from a previous waypoint to another position: static;\n if (!isEqual(waypointsArr[index].coords, lastPos)) {\n lastPos.lat = waypointsArr[index].coords.lat;\n lastPos.lng = waypointsArr[index].coords.lng;\n $(siteLoader).empty(); //remove current content of siteloader\n\n //create a new embed object with the location's url\n var embed = \"<object id='siteBox' data= \" + waypointsArr[index].url + \" frameborder='0'\" +\n \" style='display: block; height: auto; width: 100%;'></object>\";\n //insert into the page\n $(siteLoader).html(embed);\n }\n\n } else {\n\n //if the current location is >30m beyond the last or the first location is not defined, generate a map\n if (!isInRange(lastPos, currentPos) || countTime === REFRESH_RATE) {\n //update the current location to the current\n lastPos.lat = currentPos.lat;\n lastPos.lng = currentPos.lng;\n //clear the siteloader and load the new google maps object\n $(siteLoader).empty();\n initMap();\n }\n }\n\n //alert if accuracy is beyond WAYPOINT_RADIUS\n if (accuracy > WAYPOINT_RADIUS) {\n showAlert(\"Accuracy is within a \" + Math.round(accuracy) + \"m radius\");\n }\n\n } catch (e) {\n errorHandler(e);\n }\n\n}", "title": "" } ]
1656ec9aaaa06319a05b619685ac6cc8
Since 2.4.0. Input: SDMXJSON flat flavor Options (ovalue, ostatus) added in 2.4.2
[ { "docid": "7d32b0cda212437e133a92dff265356c", "score": "0.50210845", "text": "function fromSDMX(sdmx, options){\n\tif(typeof sdmx!==\"object\" || !sdmx.hasOwnProperty(\"dataSets\") || Object.prototype.toString.call(sdmx.dataSets) !== \"[object Array]\"){\n\t\treturn null;\n\t}\n\n\t//Only support for flat format with 1 dataset\n\tif(sdmx.dataSets.length!==1){\n\t\treturn null;\n\t}\n\t//Only flat flavor is supported (no series)\n\tif(!sdmx.dataSets[0].hasOwnProperty(\"observations\")){ //better to look for dataset with \"action\": \"Information\"?\n\t\treturn null;\n\t}\n\n\tif(typeof options===\"undefined\"){\n\t\toptions={\n\t\t\tovalue: false, //array\n\t\t\tostatus: false //array\n\t\t};\n\t}else{\n\t\tif(typeof options.ovalue!==\"boolean\"){\n\t\t\toptions.ovalue=false;\n\t\t}\n\t\tif(typeof options.ostatus!==\"boolean\"){\n\t\t\toptions.ostatus=false;\n\t\t}\n\t}\n\n\tvar\n\t\tmeta=sdmx.structure,\n\t\tdata=sdmx.dataSets[0].observations, //assuming one dataset and flat flavor\n\t\tattr=meta.attributes.observation,\n\t\tdim=meta.dimensions\n\t;\n\n\tif(!dim.hasOwnProperty(\"observation\")){\n\t\treturn null;\n\t}\n\t//series not null or empty {}?\n\tif(dim.hasOwnProperty(\"series\") && (dim.series!==null || Object.keys(dim.series).length) ){\n\t\treturn null;\n\t}\n\n\tvar\n\t\tid=[],\n\t\tsize=[],\n\t\tdimension={},\n\t\tstatusId=[],\n\t\trole={ time: [], geo: [] /*, metric: [] no metric so far*/ },\n\t\tassignStatus=function(){}, //void unless there's status info\n\n\t\tgetValueIndex=function(jsonstat, indices){\n\t\t\tvar size=jsonstat.size;\n\n\t\t\t//If metadata at the dataSet level, indices.length<size.length: difference must be filled with 0\n\t\t\tfor( var j=size.length-indices.length; j--; ){\n\t\t\t\tindices.push(0);\n\t\t\t}\n\n\t\t\tfor( var i=0, ndims=size.length, num=0, mult=1; i<ndims; i++ ){\n\t\t\t\tmult*=( i>0 ) ? size[ndims-i] : 1;\n\t\t\t\tnum+=mult*indices[ndims-i-1];\n\t\t\t}\n\n\t\t\treturn num;\n\t\t},\n\t\tgetDimInfo=function(o){\n\t\t\tdimension[o.id]={ label: o.name };\n\n\t\t\tif(o.hasOwnProperty(\"role\")){\n\t\t\t\tswitch(o.role){\n\t\t\t\t\tcase \"REF_AREA\": role.geo.push(o.id); break;\n\t\t\t\t\tcase \"TIME_PERIOD\": role.time.push(o.id); break;\n\t\t\t\t\t//case \"UNIT_MEASURE\": attribute\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tObject.defineProperty(dimension[o.id], \"category\", {\n\t\t\t\tvalue: { index: [], label: {} },\n\t\t\t\twritable: true,\n\t\t\t\tenumerable: true\n\t\t\t});\n\n\t\t\tid.push(o.id);\n\t\t\tsize.push(o.values.length);\n\n\t\t\tvar cat=dimension[o.id].category;\n\t\t\to.values.forEach(function(v){\n\t\t\t\tcat.index.push(v.id);\n\n\t\t\t\tObject.defineProperty(cat.label, v.id, {\n\t\t\t\t\tvalue: v.name,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tenumerable: true\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\tself=sdmx.header.links.find(function(e){return e.rel===\"request\";}),\n\t\tstatusPos=attr.findIndex(function(e){return e.id===\"OBS_STATUS\";})\n\t;\n\n\tif(statusPos!==-1){\n\t\t//any status value?\n\t\tif(!attr[statusPos].values.length){\n\t\t\tstatusPos=-1;\n\t\t}else{\n\t\t\tstatusId=attr[statusPos].values;\n\t\t}\n\t}\n\n\t//Metadata: obs level\n\tdim.observation.forEach(getDimInfo);\n\n\t//Metadata: dataset level [constant dimensions]\n\t//Even though in OECD's API \"Dimensions and attributes with only one requested value are not yet moved to dataset level even though the draft specification (see example message) would allow this\"\n\tif(dim.hasOwnProperty(\"dataSet\")){\n\t\tdim.dataSet.forEach(getDimInfo);\n\t}\n\n\t//Void dataset\n\tvar stat={\n\t\tversion: \"2.0\",\n\t\tclass: \"dataset\",\n\t\tupdated: sdmx.header.prepared || null, //Not exactly the same thing... but publicationYear and publicationPeriod usually missing\n\t\tsource: sdmx.header.sender.name || null, //Not exactly the same thing...\n\t\tlabel: meta.name || null,\n\t\tid: id,\n\t\tsize: size,\n\t\tdimension: dimension,\n\t\tvalue: options.ovalue ? {} : []\n\t};\n\n\tif(self){\n\t\tstat.link={\n\t\t\talternate: [\n\t\t\t\t{\n\t\t\t\t\ttype: \"application/vnd.sdmx.data+json\",\n\t\t\t\t\thref: self.href\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t}\n\n\t//No metric so far (metric treatment in SDMX/JSON-stat completely different)\n\tif(role.geo.length+role.time.length>0){\n\t\tif(!role.time.length){\n\t\t\tdelete role.time;\n\t\t}\n\t\tif(!role.geo.length){\n\t\t\tdelete role.geo;\n\t\t}\n\t\tstat.role=role;\n\t}\n\n\t//Keep status labels in extension (Eurostat-like)\n\tif(statusPos!==-1){\n\t\tstat.status=options.ostatus ? {} : [];\n\t\tstat.extension={ status: { label: {} } };\n\t\tstatusId.forEach(function(e){\n\t\t\tstat.extension.status.label[e.id]=e.name;\n\t\t});\n\n\t\tassignStatus=(options.ostatus) ?\n\t\t\tfunction(){\n\t\t\t\tvar statusVal=data[ndx][statusPos];\n\t\t\t\tif(statusVal!==null){\n\t\t\t\t\tstat.status[ getValueIndex(stat, posArr) ] = statusId[ statusVal ].id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t:\n\t\t\tfunction(){\n\t\t\t\tvar statusVal=data[ndx][statusPos];\n\t\t\t\tstat.status[ getValueIndex(stat, posArr) ] = statusVal===null ? null : statusId[ statusVal ].id;\n\t\t\t}\n\t\t;\n\t}\n\n\t//Data+Status\n\tstatusPos++; //index 1 instead of 0 because obs array has value in pos 0.\n\tfor(var ndx in data){\n\t\tvar posArr=ndx.split(\":\");\n\n\t\tif(!options.ovalue || data[ndx][0]!==null){\n\t\t\tstat.value[ getValueIndex(stat, posArr) ] = data[ndx][0];\n\t\t}\n\n\t\tassignStatus();\n\t}\n\n\t//When array, padding with nulls if last values/status not set\n\tvar k;\n\tif(!options.ovalue){\n\t\tfor( k=size.reduce(function(a, b){ return a * b;})-stat.value.length; k--; ){\n\t\t\tstat.value.push(null);\n\t\t}\n\t}\n\tif(!options.ostatus && stat.hasOwnProperty(\"status\")){\n\t\tfor( k=size.reduce(function(a, b){ return a * b;})-stat.status.length; k--; ){\n\t\t\tstat.status.push(null);\n\t\t}\n\t}\n\n\treturn stat;\n}", "title": "" } ]
[ { "docid": "f8d23b4c277a220d61868e31ce4b7203", "score": "0.5769016", "text": "static JsonToOptions(jsonOpt) {\n\t\tconst options = {\n\t\t};\n\t\tif (typeof jsonOpt === 'string' && jsonOpt.length) {\n\t\t\tconst tmpOpt = JSON.parse(jsonOpt);\n\t\t\tconst smartWidgetAlias = SmartWidgets.getAlias();\n\t\t\tif (typeof tmpOpt[smartWidgetAlias] != 'undefined') {\n\t\t\t\t// lets decompress options...\n\t\t\t\tconst optArr = tmpOpt[smartWidgetAlias].split('-');\n\t\t\t\tconst customProp = SmartPolygons.getCustomProperties();\n\t\t\t\tlet index = 1;\n\t\t\t\tfor (let prop of customProp) {\n\t\t\t\t\tif (optArr[index] != '.') {\n\t\t\t\t\t\toptions[SmartWidgets.customProp2Param(prop)] = optArr[index];\n\t\t\t\t\t}\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tSmartPolygons.convertNumericProps(options);\n\t\t\t\toptions.alias = optArr[0];\n\t\t\t\treturn options;\n\t\t\t}\n\t\t\tconst aliasKey = `--${SmartPolygons.getAlias()}-`;\n\t\t\tfor (let key in tmpOpt) {\n\t\t\t\tconst paramName = key.replace(aliasKey, '');\n\t\t\t\toptions[SmartWidgets.customProp2Param(paramName)] = tmpOpt[key];\n\t\t\t}\n\t\t\tSmartPolygons.convertNumericProps(options);\n\t\t\treturn options;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ca67ffb0b9eedbf40b5504e3c6021f4d", "score": "0.5514224", "text": "get normalizedOptions() {\n // default: { ruleName: true }\n const DefaultRuleConfigValue = {};\n if (typeof this.kernelFilterRule.options === \"boolean\" || this.kernelFilterRule.options === undefined) {\n return DefaultRuleConfigValue;\n }\n else {\n return this.kernelFilterRule.options;\n }\n }", "title": "" }, { "docid": "69beec4941107eac8685a8e190d4ec42", "score": "0.5443451", "text": "function jsonValue() {\n function jsonObject() {\n var o = {}, t = state.tokens.next;\n advance(\"{\");\n if (state.tokens.next.id !== \"}\") {\n for (;;) {\n if (state.tokens.next.id === \"(end)\") {\n error(\"E026\", state.tokens.next, t.line);\n } else if (state.tokens.next.id === \"}\") {\n warning(\"W094\", state.tokens.curr);\n break;\n } else if (state.tokens.next.id === \",\") {\n error(\"E028\", state.tokens.next);\n } else if (state.tokens.next.id !== \"(string)\") {\n warning(\"W095\", state.tokens.next, state.tokens.next.value);\n }\n if (o[state.tokens.next.value] === true) {\n warning(\"W075\", state.tokens.next, \"key\", state.tokens.next.value);\n } else if ((state.tokens.next.value === \"__proto__\" &&\n !state.option.proto) || (state.tokens.next.value === \"__iterator__\" &&\n !state.option.iterator)) {\n warning(\"W096\", state.tokens.next, state.tokens.next.value);\n } else {\n o[state.tokens.next.value] = true;\n }\n advance();\n advance(\":\");\n jsonValue();\n if (state.tokens.next.id !== \",\") {\n break;\n }\n advance(\",\");\n }\n }\n advance(\"}\");\n }\n\n function jsonArray() {\n var t = state.tokens.next;\n advance(\"[\");\n if (state.tokens.next.id !== \"]\") {\n for (;;) {\n if (state.tokens.next.id === \"(end)\") {\n error(\"E027\", state.tokens.next, t.line);\n } else if (state.tokens.next.id === \"]\") {\n warning(\"W094\", state.tokens.curr);\n break;\n } else if (state.tokens.next.id === \",\") {\n error(\"E028\", state.tokens.next);\n }\n jsonValue();\n if (state.tokens.next.id !== \",\") {\n break;\n }\n advance(\",\");\n }\n }\n advance(\"]\");\n }\n\n switch (state.tokens.next.id) {\n case \"{\":\n jsonObject();\n break;\n case \"[\":\n jsonArray();\n break;\n case \"true\":\n case \"false\":\n case \"null\":\n case \"(number)\":\n case \"(string)\":\n advance();\n break;\n case \"-\":\n advance(\"-\");\n advance(\"(number)\");\n break;\n default:\n error(\"E003\", state.tokens.next);\n }\n }", "title": "" }, { "docid": "98232f85779eef2fc0675df91a1c4391", "score": "0.54152364", "text": "function getDataOptions(options) {\n return (!options || typeof JSON.parse !== 'function') ? {} : options;\n }", "title": "" }, { "docid": "de6277854d82efb192c4fe71dd1d8fc1", "score": "0.5408918", "text": "validateJSON_() {\n if (this.tetheringConfigToSet_ === '') {\n this.invalidJSON_ = false;\n return;\n }\n\n try {\n const parsed = JSON.parse(this.tetheringConfigToSet_);\n // Check if the parsed JSON is object type by its constructor\n if (parsed.constructor === ({}).constructor) {\n this.invalidJSON_ = false;\n return;\n }\n this.invalidJSON_ = true;\n } catch (e) {\n this.invalidJSON_ = true;\n }\n }", "title": "" }, { "docid": "b5d3bedcd0b521625b2dc09a6f1d1792", "score": "0.5408548", "text": "function msf_get_options() {\n\n\turl = 'action=getoptions&exploit=' + $('exploit').value + \"&payload=\" + $('payload').value;\n\t\t\n\tmsf_request(url, 'options', null);\n\t\n}", "title": "" }, { "docid": "833df6523d2fbc4e69f03077ef44e1f3", "score": "0.53746235", "text": "inversJsonBoolean(selected) {\n if (selected === 'no') {\n return { select: true };\n } else {\n return { select: false };\n }\n }", "title": "" }, { "docid": "f87694b31764a972a54cd83a21063f38", "score": "0.53361917", "text": "function initOptions(options) {\n\n return _.assign({}, options, {\n // 'upgradeAll' is a type of an upgrade so if it's set, we set 'upgrade' as well\n upgrade: options.upgrade || options.upgradeAll,\n // convert silent option to loglevel silent\n loglevel: options.silent ? 'silent' : options.loglevel,\n // add shortcut for any keys that start with 'json'\n json: _(options)\n .keys()\n .filter(_.partial(_.startsWith, _, 'json', 0))\n .some(_.propertyOf(options))\n });\n}", "title": "" }, { "docid": "4a688b1780235080d392982f0590700a", "score": "0.53255254", "text": "function generateValidJson(input)\n{\n var output = {};\n\n if (input.name !== null && input.name !== undefined) output.name = input.name;\n else return null;\n if (input.shortName !== null && input.shortName !== undefined) output.shortName = input.shortName;\n else output.shortName = input.name;\n if (input.code !== null && input.code !== undefined) output.code = input.code;\n if (input.description !== null && input.description !== undefined) output.description = input.description;\n if (input.formName !== null && input.formName !== undefined) output.formName = input.formName;\n if (input.domainType !== null && input.domainType !== undefined) {\n if (input.domainType === \"Aggregate\") output.domainType = \"AGGREGATE\";\n if (input.domainType === \"Tracker\") output.domainType = \"TRACKER\";\n } else return null;\n \n if (input.valueType !== null && input.valueType !== undefined) {\n if (input.valueType === 'Number') output.type = \"int\";\n else if (input.valueType === 'Text') output.type = \"string\";\n else if (input.valueType === 'Yes/No') output.type = \"bool\";\n else if (input.valueType === 'Yes only') output.type = \"trueOnly\"; \n else if (input.valueType === 'Date') output.type = \"date\";\n else if (input.valueType === 'User Name') output.type = \"username\";\n else return null;\n } else return null;\n // Set the number/text type fields.\n if (output.type === \"int\"){\n if (input.numberType !== null && input.numberType !== undefined){\n if (input.numberType === \"Number\") output.numberType = \"number\";\n else if (input.numberType === \"Integer\") output.numberType = \"int\";\n else if (input.numberType === \"Positive Integer\") output.numberType = \"posInt\";\n else if (input.numberType === \"Negative Integer\") output.numberType = \"negInt\";\n else if (input.numberType === \"Positive or Zero Integer\") output.numberType = \"zeroPositiveInt\";\n else if (input.numberType === \"Unit Inteval'\") output.numberType = \"unitInterval\";\n else if (input.numberType === \"Percentage\") output.numberType = \"percentage\";\n else return null;\n } else return null;\n } else if (output.type === \"string\"){\n if (input.textType !== null && input.textType !== undefined){\n if (input.textType === \"Text\") output.textType = \"text\";\n else if (input.textType === \"Long text\") output.textType = \"longText\";\n else return null\n } else return null; \n }\n\n if (input.valueType !== null && input.valueType !== undefined){\n if (input.valueType === \"Number\" || input.valueType === \"Yes/No\"){\n if (input.aggregateOperator === \"Sum\") output.aggregationOperator = \"sum\";\n else if (input.aggregateOperator === \"Average\") output.aggregationOperator = \"average\";\n else if (input.aggregateOperator === \"Count\") output.aggregationOperator = \"count\";\n else if (input.aggregateOperator === \"Standard deviation\") output.aggregationOperator = \"stddev\";\n else if (input.aggregateOperator === \"Variance\") output.aggregationOperator = \"variance\";\n else if (input.aggregateOperator === \"Min\") output.aggregationOperator = \"min\";\n else if (input.aggregateOperator === \"Max\") output.aggregationOperator = \"max\";\n else output.aggregationOperator = \"sum\";\n } else output.aggregationOperator = \"sum\";\n } else return null;\n\n if (output.type === \"int\"){\n if (input.storeZero !== null && input.storeZero !== undefined && input.storeZero !== \"Yes\") output.zeroIsSignificant = true; \n else output.zeroIsSignificant = false; \n } else {\n output.zeroIsSignificant = false; \n }\n if (input.url !== null&& input.url !== undefined) output.url = input.url;\n if (output.domainType === \"AGGREGATE\"){\n if (input.catComb !== null && input.catComb !== undefined) {\n output.categoryCombo = input.catComb;\n } else output.categoryCombo = catCombDefault;\n } else output.categoryCombo = catCombDefault;\n \n if (input.optSet !== null && input.optSet !== undefined) output.optionSet = input.optSet;\n if (input.optSetCom !== null && input.optSetCom !== undefined) output.commentOptionSet = input.optSetCom;\n if (input.legendSet !== null && input.legendSet !== undefined) output.legendSet = input.legendSet;\n\n //TODO\n\n output.aggregationLevel = input.aggregationLevel;\n \n\n if (input.aggregationLevel) output.aggregationLevels = input.aggregationLevels;\n else output.aggregationLevel = []; \n \n if ((input.rationale !== null && input.rational !== undefined) || (input.unitOfMeasure !== null && input.unitOfMeasure !== undefined)){\n output.attributeValues = [];\n if (input.rationale !== null && input.rationale !== undefined) {\n rat = {};\n rat.value = input.rationale;\n rat.attribute = {};\n rat.attribute.id = \"AhsCAtM3L0g\";\n rat.attribute.name = \"Rationale\";\n rat.attribute.created = \"2011-12-24T11:24:22.575+0000\";\n rat.attribute.lastUpdated = \"2011-12-24T11:24:22.575+0000\";\n output.attributeValues.push(rat);\n }\n if (input.unitOfMeasure !== null && input.unitOfMeasure !== undefined){\n rat = {};\n rat.value = input.unitOfMeasure;\n rat.attribute = {};\n rat.attribute.id = \"Y1LUDU8sWBR\";\n rat.attribute.name = \"Unit of measure\";\n rat.attribute.created = \"2011-12-24T11:24:22.575+0000\";\n rat.attribute.lastUpdated = \"2011-12-24T11:24:22.575+0000\";\n output.attributeValues.push(rat);\n }\n }\n\n // Possible bug in DHIS2?\n // The system does add the dataElementGroup when creating a new element.\n // The old editor has the same behavior.\n // The dataElementGroups are adde in an update of the system.\n output.dataElementGroups = [];\n if (input.dataGroup !== null && input.dataGroup !== undefined) output.dataElementGroups.push(input.dataGroup);\n if (input.trackerData !== null && input.dataGroup !== undefined) output.dataElementGroups.push(input.trackerData);\n\n output.dataSets = [];\n output.externalAccess = false;\n output.items = [];\n return angular.toJson(output);\n}", "title": "" }, { "docid": "a41ef83b33b7feb48794147cae2adb20", "score": "0.5286893", "text": "function getOpts(status) {\n status = JSON.parse(atob(status));\n\n const ret = {\n zoom: status.zoo,\n center: status.cen\n }\n delete status.zoo;\n delete status.cen;\n ret.status = status;\n\n return ret;\n}", "title": "" }, { "docid": "df5eae43ec3acde399afc91bc5b5d20a", "score": "0.5261408", "text": "function jsonFormatOptions(/* key, value */)\n\t{\n\t\toptions = {};\n\t\toptions.SPACES = (spaces || options.SPACES);\n\n\t\t //----------------------------------------------\\\\\n\t\t //----- process replacer specified as object -----\\\\\n\t\t//--------------------------------------------------\\\\\n\t\tif (getType(replacer) == 'Object')\n\t\t{\n\t\t\tvar optionsString = '';\n\t\t\tObject.keys(replacer).forEach(function(key)\n\t\t\t{\t\t\t\t\t\t\t\t//add directly to options\n\t\t\t\tif (/(include|exclude|extract)/.test(key))\n\t\t\t\t\toptions[key] = EZ.toArray(replacer[key], ', ');\n\n\t\t\t\telse if (!replacer[key])\t//add key to string\n\t\t\t\t\toptionsString += ' *' + key;\n\n\t\t\t\telse\t\t\t\t\t\t//add key=value to string\n\t\t\t\t\toptionsString += ' *' + key + '=' + replacer[key];\n\t\t\t});\n\t\t\treplacer = optionsString.trim();\n\t\t}\n\t\t //----------------------------------------------------------------\\\\\n\t\t //----- process replacer argument as String, Array or Function -----\\\\\n\t\t//--------------------------------------------------------------------\\\\\n\t\tswitch (getType(replacer))\n\t\t{\n\t\t\tcase 'Function':\n\t\t\t\treplacerFunctions = [replacer];\n\n\t\t\t/* jshint ignore:start*/\t//FALL-thru\n\t\t\tcase 'String':\t\t\t\t\t\t//convert comma/space delimited String to Array\n\t\t\t/* jshint ignore:end */\n\t\t\t\treplacer = replacer.split(/\\s*[, ]\\s*/);\n\n\t\t\t/* jshint ignore:start*/\t//FALL-thru\n\t\t\tcase 'Array':\t\t\t\t\t\t//process extract properties and EZ options\n\t\t\t/* jshint ignore:end */\n\t\t\t{\t\t\t\t\t\t\t\t\t//for each Array item . . .\n\t\t\t\treplacer.forEach(function(item)\n\t\t\t\t{\n\t\t\t\t\tif (typeof(item) == 'function')\n\t\t\t\t\t\treplacerFunctions.push(item);\t//replacer function\n\t\t\t\t\telse if (typeof(item) != 'string' || !item)\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t//extract property or EZ option\n\t\t\t\t\tvar results = item.match(/([+-]?)(\\*?)(\\w*)=?(\\w*)/);\n\t\t\t\t\tif (!results) return;\n\n\t\t\t\t\tvar pre = results[1] || '';\n\t\t\t\t\tvar star = results[2] || '';\n\t\t\t\t\tvar key = results[3] || 'SCRIPT';\t//blank key\n\t\t\t\t\tvar text = results[4] || '';\n\t\t\t\t\tvar number = results[4] || 0;\n\t\t\t\t\tif (star)\t\t\t\t\t\t//----- EZ options start with * -----\\\\\n\t\t\t\t\t{\n\t\t\t\t\t\tkey = key.toUpperCase();\n\t\t\t\t\t\tvar defaultValue = EZ.json.options[key];\n\t\t\t\t\t\toptions[key] = typeof(defaultValue) == 'boolean' ? pre != '-'\n\t\t\t\t\t\t\t\t\t : typeof(defaultValue) == 'number' ? Number(number)\n\t\t\t\t\t\t\t\t\t : typeof(defaultValue) == 'string' ? text\n\t\t\t\t\t\t\t\t\t : '';\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t//----- extract property key name -----\\\\\n\t\t\t\t\telse if (pre == '+')\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude = include || [];\n\t\t\t\t\t\tinclude.push(key);\t\t\t//...explicit include if startes with \"+\"\n\t\t\t\t\t}\n\t\t\t\t\telse if (pre == '-')\n\t\t\t\t\t{\n\t\t\t\t\t\texclude = exclude || [];\n\t\t\t\t\t\texclude.push(key);\t\t\t//...explicit exclude if starts with \"-\"\n\t\t\t\t\t}\n\t\t\t\t\telse if (pre === '')\n\t\t\t\t\t{\n\t\t\t\t\t\textract = extract || [];\n\t\t\t\t\t\textract.push(key);\t\t\t//...add to extract list if no +/- prefix\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\toptions.SPACES = (spaces || EZ.json.options.SPACES);\t//non-zero non-blank required\n\t\tif (!isNaN(options.SPACES) && options.SPACES <= 0)\n\t\t\toptions.SPACES = EZ.json.options.SPACES\n\n\t\tEZ.json.stringify.options = 'format options:';\n\t\tif (options.REPEAT)\n\t\t{\n\t\t\tvar repeatName = (typeof(options.REPEAT) == 'string') ? options.REPEAT : '_[repeat]';\n\t\t\toptions.include = [repeatName];\n\t\t}\n\n\t\toptions.SCRIPT = options.SCRIPT || false;\n\t\tObject.keys(EZ.json.options).forEach(function(key)\n\t\t{\n\t\t\tif (!(key in options)) \t\t\t\t\t//set default for any non-specified options\n\t\t\t{\n\t\t\t\tvar defVal = EZ.json.options[key];\t//for boolean, true if option can be implicitly\n\t\t\t\tif (typeof(defVal) == 'boolean')\t//... enabled -and- ALL or SCRIPT is true\n\t\t\t\t\tdefVal = defVal && (options.ALL || options.SCRIPT)\n\t\t\t\telse if (typeof(defVal) == 'number' && options.ALL === false)\n\t\t\t\t\tdefVal = 0;\t\t\t\t\t\t//for numeric, 0 if ALL explictly set false\n\t\t\t\toptions[key] = defVal;\n\t\t\t}\n\t\t\tif (options[key] || options[key] === 0)\n\t\t\t\tEZ.json.stringify.options += ' ' + key + '=' + options[key];\n\t\t});\n\t}", "title": "" }, { "docid": "3cb9639e7eb2c2966da672f2eb985812", "score": "0.5248174", "text": "function parseOptions(sysArgs) {\n const argParser = createParser();\n const args = argParser.parseArgs(sysArgs);\n let options = {};\n if (args.config) {\n if (fs_1.default.existsSync(args.config)) {\n options = JSON.parse(fs_1.default.readFileSync(args.config, { encoding: 'utf-8' }));\n }\n else if (args.config === `./${DefaultConfig}`) {\n if ((args.input || '').length === 0) {\n throw new Error(`No input is given, and the file ${DefaultConfig} doesn't exist.\nFor help, run ng-openapi-gen --help`);\n }\n }\n else {\n throw new Error(`The given configuration file doesn't exist: ${args.config}.`);\n }\n }\n const props = ng_openapi_gen_schema_json_1.default.properties;\n for (const key of Object.keys(args)) {\n let value = args[key];\n if (key === 'config' || value == null) {\n // This is the only option that is not from the configuration itself, or not passed in\n continue;\n }\n const desc = props[key];\n if (desc.type === 'array') {\n value = (value || '').trim().split(',').map((v) => v.trim());\n }\n else if (value === 'true') {\n value = true;\n }\n else if (value === 'false') {\n value = false;\n }\n if (desc.type === 'number' && typeof value === 'string') {\n value = parseInt(value, 10);\n }\n if (value !== undefined) {\n options[key] = value;\n }\n }\n if (options.input == undefined || options.input === '') {\n throw new Error('No input (OpenAPI specification) defined');\n }\n return options;\n}", "title": "" }, { "docid": "2479653e8c8b8769584155854ce30c4d", "score": "0.5221817", "text": "function JSONParseReviver(key, value) {\n if (key === \"stageId\" || key === \"id\" && !_.isNumber(value)) {\n return +value;\n }\n // booleans get auto-converted??\n else if (key === \"selected\" && !_.isBoolean(value)) {\n return (value.toLowerCase() === \"true\")\n }\n\n return value;\n}", "title": "" }, { "docid": "6bb65e51206e9e7c8a4c3a801f32ec2e", "score": "0.5217555", "text": "function extractSchema(value)\n{\n\t//console.log(\"Extract schema valueType \"+ gb_value_types.length + \" units \" + gb_value_units.length + \"data type \" + gb_datatypes.length);\n\n\tvar attributes = [];\n\tvar f = \"\"; // identified format\n//\tconsole.log(\"valore processato \" + value);\n\t\n\tif(ORION_CB == 'Antwerp' && flagAntwerp ){\n\t//console.log(\"extract antw\");\n\t\tattributes= parseAntwerpJSON(value);\n\t}\n\telse{\n\t//console.log(\"extractorion\");\n\t\tattributes = parseOrionJSON(value);\n\t}\n\t// console.log(\"attributes \"+JSON.stringify(attributes));\n\treturn {\"format\": \"json\", \"attr\": attributes};\n}", "title": "" }, { "docid": "63125adeeab44e87ead9c88c2bcdc6a7", "score": "0.520297", "text": "parseODataJSON(json) {\n let result = json;\n if (hOP(json, \"d\")) {\n if (hOP(json.d, \"results\")) {\n result = json.d.results;\n }\n else {\n result = json.d;\n }\n }\n else if (hOP(json, \"value\")) {\n result = json.value;\n }\n return result;\n }", "title": "" }, { "docid": "0951a8ee6792da8f60c6862b3c00cff8", "score": "0.5183754", "text": "readValue(object) {\n return Util.Object.readValue(object, this.searchService.optionsField);\n }", "title": "" }, { "docid": "ee1226c014ad8dfd4411d84e256c9934", "score": "0.5155302", "text": "parseOptionsProp(newValue) {\n if (newValue)\n this.innerOptions = JSON.parse(newValue);\n }", "title": "" }, { "docid": "3acce3f47b00d080e6db1223709235e8", "score": "0.5149685", "text": "parseODataJSON(json) {\n let result = json;\n if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__[\"hOP\"])(json, \"d\")) {\n if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__[\"hOP\"])(json.d, \"results\")) {\n result = json.d.results;\n }\n else {\n result = json.d;\n }\n }\n else if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__[\"hOP\"])(json, \"value\")) {\n result = json.value;\n }\n return result;\n }", "title": "" }, { "docid": "83df18c401703dbaa7c480b2731133cf", "score": "0.51399845", "text": "_transformOptionsValuesToDefaultTypes() {\n for (const key in this.settings) {\n if (this.settings.hasOwnProperty(key)) {\n const value = this.settings[key];\n\n // Convert the strings 'true' and 'false' to booleans\n if (value === 'true' || value === 'false') {\n this.settings[key] = value === 'true';\n }\n\n // Convert numbers in options to strings\n //TODO Only transform the values of type 'Number' to 'String' if it's a currency number (so that we can have big numbers). Do not convert other numbers (ie. `historySize`)\n if (typeof value === 'number') {\n this.settings[key] = value.toString();\n }\n }\n }\n }", "title": "" }, { "docid": "8cfdb918d3350ac63cf7bffc27787910", "score": "0.5041139", "text": "jsonOption(jsonOption) {\n let filename, startKey, data;\n if(jsonOption.indexOf(':') !== -1){\n filename = jsonOption.substring(0, jsonOption.indexOf(':'));\n startKey = jsonOption.substring(jsonOption.indexOf(':')+1);\n } else {\n filename = jsonOption;\n startKey = null;\n }\n if(!fileExists(filename)){\n this.ui.writeError('JSON file does not exist: ' + filename);\n return process.exit(1);\n }\n\n data = JSON.parse(readFile(filename));\n\n if(startKey) {\n if(!data.hasOwnProperty(startKey)){\n this.ui.writeError('key does not exist in json: ' + startKey);\n return process.exit(1);\n }\n data = data[startKey];\n }\n\n return data;\n }", "title": "" }, { "docid": "7055934fd58459ec772cbc9a6b26e03b", "score": "0.50169784", "text": "function flatten_swagger_json(obj) {\n\t\tconst temp = {\n\t\t\tvalidate_error_messages: [],\n\t\t\tpaths: {},\n\t\t\tversion: '-'\n\t\t};\n\t\tif (obj) {\n\t\t\ttemp.validate_error_messages = obj['x-validate_error_messages']; \t// copy the error messages\n\t\t\ttemp.version = obj.info ? obj.info.version : '-';\t\t\t\t\t// copy version\n\t\t\tfor (let route in obj.paths) {\n\t\t\t\tfor (let method in obj.paths[route]) {\n\t\t\t\t\tconst lc_route = route ? route.toLowerCase() : null;\n\t\t\t\t\tconst lc_method = method ? method.toLowerCase() : null;\n\t\t\t\t\tif (!temp.paths[lc_route]) { temp.paths[lc_route] = {}; }\t// init\n\t\t\t\t\ttemp.paths[lc_route][lc_method] = {};\t\t\t\t\t\t// init\n\n\t\t\t\t\t// grab/build body validation format\n\t\t\t\t\tif (obj.paths[route][method].requestBody) {\n\t\t\t\t\t\tconst ref = obj.paths[route][method].requestBody.content['application/json'].schema.$ref;\n\t\t\t\t\t\tif (ref) {\t\t\t\t\t\t\t\t\t\t\t// if using reference schema syntax, dereference first\n\t\t\t\t\t\t\ttemp.paths[lc_route][lc_method].body = resolve_ref(ref, obj);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttemp.paths[lc_route][lc_method].body = obj.paths[route][method].requestBody.content['application/json'].schema;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tflatten_obj(temp.paths[lc_route][lc_method].body, obj, 0);\n\t\t\t\t\t}\n\n\t\t\t\t\t// grab/build query validation format\n\t\t\t\t\tif (obj.paths[route][method].parameters) {\n\t\t\t\t\t\tconst param_obj = obj.paths[route][method].parameters;\n\t\t\t\t\t\tfor (let i in param_obj) {\n\t\t\t\t\t\t\tif (param_obj[i].$ref) {\t\t\t\t\t\t// if using reference param syntax, dereference first\n\t\t\t\t\t\t\t\tparam_obj[i] = resolve_ref(param_obj[i].$ref, obj);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst name = param_obj[i].name;\n\t\t\t\t\t\t\tif (name && param_obj[i].in === 'query') {\n\t\t\t\t\t\t\t\tif (!temp.paths[lc_route][lc_method].query) {\t\t\t// init\n\t\t\t\t\t\t\t\t\ttemp.paths[lc_route][lc_method].query = {\t\t\t// build the same object structure found in the openapi body spec\n\t\t\t\t\t\t\t\t\t\ttype: 'object',\n\t\t\t\t\t\t\t\t\t\trequired: [],\t\t\t\t\t\t// populated later\n\t\t\t\t\t\t\t\t\t\tproperties: {}\t\t\t\t\t\t// populated later\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\tif (param_obj[i].schema.$ref) {\t\t\t\t// if using reference schema syntax, dereference first\n\t\t\t\t\t\t\t\t\ttemp.paths[lc_route][lc_method].query.properties[name] = resolve_ref(param_obj[i].schema.$ref, obj);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttemp.paths[lc_route][lc_method].query.properties[name] = param_obj[i].schema;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (param_obj[i].required === true) {\n\t\t\t\t\t\t\t\t\ttemp.paths[lc_route][lc_method].query.required.push(name);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tflatten_obj(temp.paths[lc_route][lc_method].query, obj, 0);\n\t\t\t\t\t\t\t}\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\treturn temp;\n\t}", "title": "" }, { "docid": "5a81602ba2b20bb0c5b0fd313fbaa785", "score": "0.5010929", "text": "getFieldsVariationOptions() {\n let subfields = this.props.fieldDefinitions[this.props.fieldName].field_variations;\n if(Object.keys(subfields).length === 1) {\n return null;\n }\n let options = {};\n Object.keys(subfields).forEach(function(k) {\n options[k] = TacoStr.human(k);\n });\n return options;\n }", "title": "" }, { "docid": "965b70c452b8f9d47d5f0016fbc16f9a", "score": "0.50106883", "text": "static get parseOptionTypes() {\n return {\n ...super.parseOptionTypes,\n fakeWorker: 'Boolean',\n };\n }", "title": "" }, { "docid": "1dc081be16b63da0fce6ff5aa9b88460", "score": "0.50104266", "text": "function incomingOptions()\n{\n var viewData = VIEW_DATA[CURRENT_VIEW.name];\n\n var returnObj = {};\n \n if(viewData.hasOwnProperty('option')) {\n\tfor(let i=0; i < viewData.option.length; i++) {\n\t var optionSplit = viewData.option[i].split(',');\n\t returnObj[optionSplit[0]] = optionSplit.slice(1);\n\t}\n }\n\n return(returnObj);\n}", "title": "" }, { "docid": "b6ad27e869e5b38dd35ee66dea0e6949", "score": "0.5008318", "text": "function jsonToOptions(json, selected) {\n\toptions = \"\";\n\tfor (let i = 0; i < json.length; i++) {\n\t\toption = json[i];\n\t\tif (selected && option == selected) {\n\t\t\toptions += \"<option selected='selected' value='\" + option + \"'>\" + option + \"</option>\";\n\t\t}\n\t\telse {\n\t\t\toptions += \"<option value='\" + option + \"'>\" + option + \"</option>\";\n\t\t}\n\t}\n\treturn options;\n}", "title": "" }, { "docid": "156da7ce02269707b2802cebe54365ae", "score": "0.5005043", "text": "function n$1z(t){const o=t.toJSON();return o.attachmentTypes&&(o.attachmentTypes=o.attachmentTypes.join(\",\")),o.keywords&&(o.keywords=o.keywords.join(\",\")),o.globalIds&&(o.globalIds=o.globalIds.join(\",\")),o.objectIds&&(o.objectIds=o.objectIds.join(\",\")),o.size&&(o.size=o.size.join(\",\")),o}", "title": "" }, { "docid": "3ca8ce2cd538ac95e854c845c869b509", "score": "0.49870077", "text": "function defaultOptions(property) {\n var type = property.get('__displayType__');\n var values = property.get('__possibleValues__');\n var name = property.get('name');\n var title = property.get('title');\n /* eslint complexity: [2, 24] */\n\n var inputOptions = {\n type: 'text',\n name: name,\n label: title || name\n }; // @see customOptions for enum complex \"object\" type,\n // a.k.a \"object\" or \"arrayofobject\" type has enum values defined.\n // Other cases (e.g., nested object type) are not support yet.\n\n switch (type) {\n case 'arrayofstring':\n inputOptions.input = _TextBoxSet.default;\n inputOptions.params = {\n itemType: 'string'\n };\n break;\n\n case 'arrayofnumber':\n inputOptions.input = _TextBoxSet.default;\n inputOptions.params = {\n itemType: 'number'\n };\n break;\n\n case 'arrayofinteger':\n inputOptions.input = _TextBoxSet.default;\n inputOptions.params = {\n itemType: 'integer'\n };\n break;\n\n case 'arrayofobject':\n inputOptions.input = _TextBoxSet.default;\n inputOptions.params = {\n itemType: property.get('items').type\n };\n break;\n\n case 'arrayofref-id':\n inputOptions.input = _TextBoxSet.default;\n inputOptions.params = {\n itemType: property.get('items').format\n };\n break;\n\n case 'boolean':\n inputOptions.input = _BooleanSelect.default;\n break;\n\n case 'integer':\n case 'number':\n inputOptions.to = convertStringToNumber;\n break;\n\n case 'reference':\n inputOptions.type = 'select';\n inputOptions.options = getChoices(values);\n break;\n\n case 'image':\n inputOptions.readOnly = true;\n\n inputOptions.from = function (value) {\n return _underscoreWrapper.default.isEmpty(value) ? '' : _StringUtil.default.localize('user.profile.image.image_set', 'courage'); //TODO\n };\n\n break;\n\n case 'password':\n inputOptions.type = 'password';\n break;\n\n case 'date':\n inputOptions.type = 'date';\n break;\n\n case 'uri':\n case 'country-code':\n case 'country_code':\n case 'language-code':\n case 'language_code':\n case 'email':\n case 'locale':\n case 'timezone':\n case 'string':\n case 'object':\n //default input options\n break;\n\n default:\n throw new Error('unknown type: ' + type);\n }\n\n return inputOptions;\n } // Sets nonbasic inputOptions, such as an array with possible values", "title": "" }, { "docid": "430195a140dff7142a370d86868cfb1e", "score": "0.49830678", "text": "function defaultOptions(property) {\n const type = property.get('__displayType__');\n const values = property.get('__possibleValues__');\n const name = property.get('name');\n const title = property.get('title');\n /* eslint complexity: [2, 24] */\n\n const inputOptions = {\n type: 'text',\n name: name,\n label: title || name\n };\n\n // @see customOptions for enum complex \"object\" type,\n // a.k.a \"object\" or \"arrayofobject\" type has enum values defined.\n // Other cases (e.g., nested object type) are not support yet.\n\n switch (type) {\n case 'arrayofstring':\n inputOptions.input = __WEBPACK_IMPORTED_MODULE_3__inputs_TextBoxSet__[\"a\" /* default */];\n inputOptions.params = { itemType: 'string' };\n break;\n case 'arrayofnumber':\n inputOptions.input = __WEBPACK_IMPORTED_MODULE_3__inputs_TextBoxSet__[\"a\" /* default */];\n inputOptions.params = { itemType: 'number' };\n break;\n case 'arrayofinteger':\n inputOptions.input = __WEBPACK_IMPORTED_MODULE_3__inputs_TextBoxSet__[\"a\" /* default */];\n inputOptions.params = { itemType: 'integer' };\n break;\n case 'arrayofobject':\n inputOptions.input = __WEBPACK_IMPORTED_MODULE_3__inputs_TextBoxSet__[\"a\" /* default */];\n inputOptions.params = { itemType: property.get('items').type };\n break;\n case 'arrayofref-id':\n inputOptions.input = __WEBPACK_IMPORTED_MODULE_3__inputs_TextBoxSet__[\"a\" /* default */];\n inputOptions.params = { itemType: property.get('items').format };\n break;\n case 'boolean':\n inputOptions.input = __WEBPACK_IMPORTED_MODULE_2__inputs_BooleanSelect__[\"a\" /* default */];\n break;\n case 'integer':\n case 'number':\n inputOptions.to = convertStringToNumber;\n break;\n case 'reference':\n inputOptions.type = 'select';\n inputOptions.options = getChoices(values);\n break;\n case 'image':\n inputOptions.readOnly = true;\n inputOptions.from = function (value) {\n return __WEBPACK_IMPORTED_MODULE_0__util_underscore_wrapper__[\"default\"].isEmpty(value) ? '' : __WEBPACK_IMPORTED_MODULE_1__util_StringUtil__[\"default\"].localize('user.profile.image.image_set', 'courage'); //TODO\n };\n break;\n case 'password':\n inputOptions.type = 'password';\n break;\n case 'date':\n inputOptions.type = 'date';\n break;\n case 'uri':\n case 'country-code':\n case 'country_code':\n case 'language-code':\n case 'language_code':\n case 'email':\n case 'locale':\n case 'timezone':\n case 'string':\n case 'object':\n //default input options\n break;\n default:\n throw new Error('unknown type: ' + type);\n }\n return inputOptions;\n}", "title": "" }, { "docid": "85b215d8cc720a2022352d6ca72caa57", "score": "0.49714154", "text": "function getDefaultOpts (simple) {\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n description: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n description: 'Parses simple line breaks as <br> (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n description: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n description: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n description: 'Support for HTML Tag escaping. ex: \\<div>foo\\</div>',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n description: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n description: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n description: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}", "title": "" }, { "docid": "832b01c12d1482d5320e029c1c3e2f54", "score": "0.49710095", "text": "stringifyFlags() {\n Object.keys(this.flags).forEach((name) => {\n const flag = this.flags[name];\n if (flag == null) {\n return;\n }\n switch (typeof this.flags[name]) {\n case 'string':\n case 'number':\n this.flags[name] = flag + '';\n break;\n case 'boolean':\n break;\n case 'object':\n if (Array.isArray(flag)) {\n this.flags[name] = flag.join(',');\n break;\n }\n else if (flag instanceof Date) {\n this.flags[name] = flag.toISOString();\n break;\n // This used to be (flag instanceof Duration) but this stopped working and I'm not sure why.\n // I had a similar problem with SfdxError in command here:\n // https://github.com/forcedotcom/cli-packages/pull/75\n }\n else if (flag.constructor.name === 'Duration') {\n this.flags[name] = flag.quantity + '';\n break;\n }\n else if (ts_types_1.isFunction(flag.toString)) {\n this.flags[name] = flag.toString();\n break;\n }\n // intentional fallthrough\n default:\n throw new core_1.SfdxError(`Unexpected value type for flag ${name}`, 'UnexpectedFlagValueType');\n }\n });\n }", "title": "" }, { "docid": "8aecac27f0ac74dc3b6c823c591084dc", "score": "0.49674138", "text": "static get jsonSchema() {\n return {\n type: 'object',\n required: ['name', 'address1', 'email', 'city', 'country', 'postcode', 'phone', 'order_details', 'amount', 'shipping', 'currency', 'order_details'],\n\n properties: {\n id: { type: 'integer' },\n name: { type: 'string' },\n address1: { type: 'string' },\n address2: { type: 'string' },\n city: { type: 'string' },\n state: { type: 'string' },\n phone: { type: 'string' },\n email: { type: 'string' },\n postcode: { type: 'string' },\n country: { type: 'string', minLength: 2, maxLength: 2 },\n customer_reference_id: { type: 'string' },\n amount: { type: 'float' },\n shipping: { type: 'float'},\n order_details: { type: 'object' },\n currency: { type: 'string', minLength: 3, maxLength: 3 },\n stripe_id: { type: 'string'},\n shipped: { type: 'boolean' }\n }\n }\n }", "title": "" }, { "docid": "a9e9ff5892af2e6ac2a00b39a5e6e322", "score": "0.49643373", "text": "function jsonExtractFilter(value)\n\t\t{\n\t\t\tvar includeKeys = [];\n\t\t\tvar excludeKeys = [];\n\t\t\tif (extract.length > 0 || exclude.length > 0)\n\t\t\t{\t\t\t\t\t\t\t\t//if extracted keys specified\n\t\t\t\tfor (var key in value)\t\t\t//for enumerated keys...\n\t\t\t\t{\n\t\t\t\t\tif (key.substr(0,4) == '____' && key.substr(-4) == '____')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (exclude.indexOf(key) != -1)\n\t\t\t\t\t\t\texcludeKeys.push(key);\t//...explicit omit\n\t\t\t\t\t}\n\t\t\t\t\telse if (include.indexOf(key) != -1)\n\t\t\t\t\t\tincludeKeys.push(key);\t\t//...explicit keep\n\n\t\t\t\t\telse if (exclude.indexOf(key) != -1)\n\t\t\t\t\t\texcludeKeys.push(key);\t\t//...explicit omit\n\n\t\t\t\t\telse if (extract.indexOf(key) == -1\n\t\t\t\t\t&& extract.length > 0)\n\t\t\t\t\t\texcludeKeys.push(key);\t\t//...implicit omit\n\t\t\t\t}\n\t\t\t}\n\t\t\textract.concat(include).forEach(function(key)\n\t\t\t{\t\t\t\t\t\t\t\t\t//for all specified keys...\n\t\t\t\tif (!(key in value)\t\t\t\t\t//not enumerable\n\t\t\t\t&& typeof value[idx] != EZ.undefined) \t//but exists\n\t\t\t\t\tincludeKeys.push(key);\t\t\t//...add\n\t\t\t});\n\n\t\t\tif (!includeKeys.length && !excludeKeys.length)\n\t\t\t\treturn value;\t\t\t\t//bail if value good \"as is\"\n\n\t\t\tvar extactKeys = Object.keys(value);\n\t\t\texcludeKeys.forEach(function(key)\n\t\t\t{\t\t\t\t\t\t\t\t//remove excluded from enumerated\n\t\t\t\tvar idxKey = extactKeys.indexOf(key);\n\t\t\t\tif (idxKey != -1 && includeKeys.indexOf(key) == -1)\n\t\t\t\t\textactKeys.splice(idxKey,1);\n\t\t\t})\n\n\t\t\tvar isEmpty = true, clone = {};\n\t\t\textactKeys.concat(includeKeys).forEach(function(key)\n\t\t\t{\t\t\t\t\t\t\t\t//clone value from enumerated list\n\t\t\t\ttry\t\t\t\t\t\t\t//plus included keys\n\t\t\t\t{\n\t\t\t\t\tclone[key] = value[key];\n\t\t\t\t\tif (key != '____properties____')\n\t\t\t\t\t\tisEmpty = false;\n\t\t\t\t}\n\t\t\t\tcatch(e)\n\t\t\t\t{\n\t\t\t\t\tvoid(0);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn !isEmpty ? clone \t\t//return clone if not empty\n\t\t\t\t\t\t\t: undefined;\t//otherwise, return undefined\n\t\t}", "title": "" }, { "docid": "bf80376ae21d199d90a982eac7171cd3", "score": "0.49632472", "text": "function o$Z(e,t){const o=e.toJSON();return o.objectIds&&(o.objectIds=o.objectIds.join(\",\")),o.orderByFields&&(o.orderByFields=o.orderByFields.join(\",\")),!o.outFields||null!=t&&t.returnCountOnly?delete o.outFields:-1!==o.outFields.indexOf(\"*\")?o.outFields=\"*\":o.outFields=o.outFields.join(\",\"),o.outSpatialReference&&(o.outSR=o.outSR.wkid||JSON.stringify(o.outSR.toJSON()),delete o.outSpatialReference),o.dynamicDataSource&&(o.layer=JSON.stringify({source:o.dynamicDataSource}),delete o.dynamicDataSource),o}", "title": "" }, { "docid": "c0f7fc708a0e9f9190db140c615ab30e", "score": "0.49628878", "text": "static _stripOptions(props) {\n return Object.assign({}, props, { sigma: undefined });\n }", "title": "" }, { "docid": "403b31e553b69fd4cd976870adbf8dec", "score": "0.49578807", "text": "validateItem(item){// create a generic schema item\nlet tmp=new JSONOutlineSchemaItem;for(var key in tmp){// only set what the element from spec allows into a new object\nif(typeof item[key]!==typeof void 0){tmp[key]=item[key]}}return tmp}", "title": "" }, { "docid": "215b363ef0f002727b022fdd12a8cdf9", "score": "0.4956602", "text": "_getOptions() {\n return {};\n }", "title": "" }, { "docid": "7b8491bdbacbd36f6494dc4a46930118", "score": "0.4941491", "text": "function parseServerOptions(jhConfig, jdl) {\n if (!jdl) {\n jdl = new JDLObject();\n }\n for (let option of [UnaryOptions.SKIP_CLIENT, UnaryOptions.SKIP_SERVER, UnaryOptions.SKIP_USER_MANAGEMENT])\n if (jhConfig[option] === true) {\n jdl.addOption(new JDLUnaryOption({\n name: option,\n value: jhConfig[option]\n }));\n }\n return jdl;\n}", "title": "" }, { "docid": "ce91442335aee89fd156776db1af59d4", "score": "0.4928488", "text": "function getDefaultOpts(simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n description: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n description: 'Parses simple line breaks as <br> (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n description: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n description: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n description: 'Support for HTML Tag escaping. ex: \\<div>foo\\</div>',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n description: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n description: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n description: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n\n var ret = {};\n\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n\n return ret;\n }", "title": "" }, { "docid": "134805d31d77528897c7ae291058ca71", "score": "0.4924655", "text": "function parseOptions() {\n\tparseOption('repo');\n\tparseOption('milestone');\n\tparseOption('sprintSize');\n}", "title": "" }, { "docid": "af6834c1b8e99d200ddcca71c0e48a6c", "score": "0.49189067", "text": "function getUIOptions() {\n let options = new Object();\n\n /*\n * Get shooting settings from UI\n */\n // Exposure mode\n options.exposureProgram = EXPOSURE_PROGRAM_IDX[actions.mode.checked];\n\n // ISO\n options.iso = $('input[name=\"iso\"]:checked').val();\n // Shutter speed\n if (options.exposureProgram == 4) {\n options.shutterSpeed = $('input[name=\"shutter\"]:checked').val();\n } else if (options.exposureProgram == 1) {\n options.shutterSpeed = $('input[name=\"manual_shutter\"]:checked').val();\n }\n\n // White balance mode\n if (shootSetting.specifyColorTemp) {\n options.whiteBalance = WHITE_BALANCE_SUPPORT_COLOR_TEMPERATURE_VAL;\n } else {\n options.whiteBalance = $('input[name=\"wb\"]:checked').val();\n }\n\n // Color temperature\n options._colorTemperature = $('input[name=\"colortemp\"]:checked').val();\n\n // Exposure compensation\n options.exposureCompensation = $('input[name=\"ev\"]:checked').val();\n\n // Filter\n options._filter = $('input[name=\"option\"]:checked').val();\n\n /*\n * Filtering setting items\n */\n let memberfilter = new Array();\n memberfilter.push('exposureProgram');\n if (typeof options.iso != 'undefined') {\n memberfilter.push('iso');\n }\n if (typeof options.shutterSpeed != 'undefined') {\n memberfilter.push('shutterSpeed');\n }\n if (typeof options.whiteBalance != 'undefined') {\n memberfilter.push('whiteBalance');\n }\n if (typeof options._colorTemperature != 'undefined') {\n memberfilter.push('_colorTemperature');\n }\n if (typeof options.exposureCompensation != 'undefined') {\n memberfilter.push('exposureCompensation');\n }\n if (typeof options._filter != 'undefined') {\n memberfilter.push('_filter');\n }\n let setOptions = JSON.stringify(options, memberfilter, '\\t');\n options = JSON.parse(setOptions);\n\n return options;\n}", "title": "" }, { "docid": "829486aee8c0ee82297946ac0a0eb1d0", "score": "0.49175364", "text": "preFormOptions() {\n return JSON.parse(JSON.stringify(this.formOptions))\n }", "title": "" }, { "docid": "957938cdf9df21643b0878a79b24a1a8", "score": "0.49173993", "text": "tryAsJson(value) {\n try {\n if (!(0, _utils.isDefined)(value) || typeof value === 'object') {\n return {\n isValid: true,\n value\n };\n } else if (typeof value === 'string' && value.startsWith('{')) {\n return {\n isValid: true,\n value: JSON.parse(value)\n };\n }\n\n return {\n isValid: false\n };\n } catch (e) {\n return {\n isValid: false\n };\n }\n }", "title": "" }, { "docid": "41c409d4a27412dba7742ed1e8ec1f44", "score": "0.4917254", "text": "loadOptions(inOptions) {\n const options = {...this.options};\n\n if(typeof inOptions === \"number\") {\n inOptions = {size: inOptions};\n } else if(typeof inOptions !== \"object\") {\n throw new TypeError(\"Invalid options argument provided.\")\n }\n\n if(inOptions.size !== undefined) {\n if(typeof inOptions.size !== \"number\" || inOptions.size < 1) {\n throw new TypeError(\"Invalid size argument provided.\");\n }\n options.size = inOptions.size;\n }\n\n if(inOptions.scheme !== undefined) {\n if(typeof inOptions.scheme === \"string\") {\n inOptions.scheme = [inOptions.scheme];\n }\n if(!Array.isArray(inOptions.scheme) || inOptions.scheme.length < 1) {\n throw new TypeError(\"Invalid scheme argument provided.\");\n }\n inOptions.scheme.forEach(scheme => {\n if(!Palettee.schemes.includes(scheme)) {\n throw new TypeError(`Invalid scheme \"${scheme}\" provided.`);\n }\n })\n options.scheme = inOptions.scheme;\n }\n\n if(inOptions.format !== undefined) {\n if(!Palettee.formats.includes(inOptions.format)) {\n throw new TypeError(\"Invalid format argument provided.\");\n }\n options.format = inOptions.format;\n }\n\n return options;\n }", "title": "" }, { "docid": "727db4397e8212084052ef2502ff58e1", "score": "0.49126664", "text": "ConvertAddressJson() {\n\n // region\n Object.keys(arData.region).forEach(item => {\n let option = {\n id: item,\n type: \"region\",\n name: this.$t(\"region.\" + item),\n path: \"\"\n };\n this.searchBoxAddress.options.push(option);\n });\n //city\n Object.keys(arData.city).forEach(item => {\n let option = {\n id: item,\n type: \"city\",\n name: this.$t(\"city.\" + item),\n path: ` (${this.$t(\"region.\" + item.substring(0, 2))}) `\n };\n this.searchBoxAddress.options.push(option);\n });\n //district\n Object.keys(arData.district).forEach(item => {\n if (item != \"null\" && item != null) {\n let option = {\n id: item,\n type: \"district\",\n name: this.$t(\"district.\" + item),\n path: ` (${this.$t(\"city.\" + item.substring(0, 4))} , ${this.$t(\n \"region.\" + item.substring(0, 2)\n )}) `\n };\n this.searchBoxAddress.options.push(option);\n }\n });\n }", "title": "" }, { "docid": "a881057bfceb62980b35f885e47d4922", "score": "0.49117458", "text": "function jsonFilter(key, value) {\n if (typeof value === \"function\") {\n //to make sure all environments format functions the same way\n return value.toString()\n //remove all leading and trailing whitespace\n .replace(/(^\\s+|\\s+$)/mg, '')\n //remove new line characters\n .replace(/\\n/mg, '')\n //replace , and 0 or more spaces with \", \"\n .replace(/,\\s*/mg, ', ')\n //insert space between ){\n .replace(/\\)\\{/mg, ') {')\n ;\n }\n return value;\n }", "title": "" }, { "docid": "835034137d92842a6e15f2c981547a21", "score": "0.49114126", "text": "function deserializeValue(value) {\n try {\n return value ? value == \"true\" || (value == \"false\" ? false : value == \"null\" ? null : +value + \"\" == value ? +value : /^[\\[\\{]/.test(value) ? $.parseJSON(value) : value) : value;\n } catch (e) {\n return value;\n }\n }", "title": "" }, { "docid": "64be37ba70496a79d10942d362936f0c", "score": "0.4910714", "text": "function getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n describe: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n describe: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n describe: 'Parses simple line breaks as <br> (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n describe: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n describe: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n describe: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n describe: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n describe: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n describe: 'Support for HTML Tag escaping. ex: \\<div>foo\\</div>',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n describe: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n describe: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',\n type: 'boolean'\n },\n ellipsis: {\n defaultValue: true,\n describe: 'Replaces three dots with the ellipsis unicode character',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n describe: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n describe: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n describe: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}", "title": "" }, { "docid": "22f92732e62e95235fb67d05dc9e66fe", "score": "0.4910714", "text": "function getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n description: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n description: 'Parses simple line breaks as <br> (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n description: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n description: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n description: 'Support for HTML Tag escaping. ex: \\<div>foo\\</div>',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n description: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n description: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n description: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}", "title": "" }, { "docid": "22f92732e62e95235fb67d05dc9e66fe", "score": "0.4910714", "text": "function getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n description: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n description: 'Parses simple line breaks as <br> (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n description: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n description: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n description: 'Support for HTML Tag escaping. ex: \\<div>foo\\</div>',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n description: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n description: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n description: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}", "title": "" }, { "docid": "22f92732e62e95235fb67d05dc9e66fe", "score": "0.4910714", "text": "function getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n description: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n description: 'Parses simple line breaks as <br> (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n description: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n description: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n description: 'Support for HTML Tag escaping. ex: \\<div>foo\\</div>',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n description: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n description: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n description: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}", "title": "" }, { "docid": "2621a402cc230668f1c87d54397e83c2", "score": "0.4902419", "text": "function geojsonMarkerOptions(feature) {\n return {\n\n radius: feature.properties.mag*5,\n fillColor: getColor(feature.properties.mag),\n color: \"#000\",\n weight: 1,\n opacity: 1,\n stroke: true,\n fillOpacity: 1\n }\n }", "title": "" }, { "docid": "95dea798afc605859d7f2c11d7b22a20", "score": "0.48933837", "text": "getPassJSON() {\n return Object.assign({}, this.fields, { formatVersion: 1 });\n }", "title": "" }, { "docid": "4b08afcb13d96000d2a1421a9cd11b07", "score": "0.48911136", "text": "@wire(getObjectInfo, { objectApiName: CONTACT_OBJECT })\n accObjectInfo({data, error}) {\n if(data) {\n let optionsValues = [];\n // map of record type Info\n const rtInfos = data.recordTypeInfos;\n\n // getting map values\n let rtValues = Object.values(rtInfos);\n\n for(let i = 0; i < rtValues.length; i++) {\n if(rtValues[i].name !== 'Master') {\n optionsValues.push({\n label: rtValues[i].name,\n value: rtValues[i].recordTypeId\n })\n }\n }\n\n this.options = optionsValues;\n }\n else if(error) {\n window.console.log('Error ===> '+JSON.stringify(error));\n }\n }", "title": "" }, { "docid": "b93493379201f1aa3fb64df0fc4bc7a7", "score": "0.48886934", "text": "function miniJSONify(o, exc) {\n if (typeof o === 'undefined') {\n return 'undefined';\n } else if (o == null) {\n return 'null';\n } else if (typeof o == 'string') {\n return \"'\" + o + \"'\";\n } else if (typeof o == 'number') {\n return \"\" + o;\n } else if (typeof o == 'boolean') {\n return \"\" + o;\n } else if (typeof o == 'object') {\n if (o instanceof Array) {\n var s = null;\n for (var i = 0; i < o.length; ++i) {\n s = (s == null ? '' : (s + ', ')) + miniJSONify(o[i], exc);\n }\n return '[' + (s?s:'') + ']';\n } else {\n exc = exc || {};\n var s = null;\n for (var k in o) {\n if (exc[k])\n continue;\n if (k != undefined && typeof(o[k]) != 'function') {\n s = (s == null ? '' : (s + ', ')) + k + ': ' + miniJSONify(o[k], exc);\n }\n }\n return '{' + (s?s:'') + '}';\n }\n } else {\n return (typeof o);\n }\n}", "title": "" }, { "docid": "3a032b47588e974c9f11a20f7278f0a1", "score": "0.48848972", "text": "function geojsonMarkerOptions(feature) {\n return {\n\n radius: feature.properties.mag*5,\n fillColor: color(feature.properties.mag),\n color: \"#000\",\n weight: 1,\n opacity: 1,\n stroke: true,\n fillOpacity: 1\n }\n }", "title": "" }, { "docid": "4c8663bebbd17d0c4a75889c9dd520e4", "score": "0.48848933", "text": "function jsonFilter(key, value) {\n if (typeof value === \"function\") {\n //to make sure all environments format functions the same way\n return value.toString()\n //remove all leading and trailing whitespace\n .replace(/(^\\s+|\\s+$)/mg, '')\n //remove new line characters\n .replace(/\\n/mg, '')\n //replace , and 0 or more spaces with \", \"\n .replace(/,\\s*/mg, ', ')\n //insert space between ){\n .replace(/\\)\\{/mg, ') {')\n ;\n }\n return value;\n}", "title": "" }, { "docid": "5497cd186484c0bacb1213714e22d5a3", "score": "0.48843154", "text": "function FValOptions(mandatory, min, max, deflt, validValues){\n\n var OPTIONS={};\n OPTIONS['mandatory'] = (( mandatory == true || mandatory ==false ) ? mandatory : false );\n OPTIONS['min'] = (( min != undefined && isNumeric( min ) ) ? min : 0 );\n OPTIONS['max'] = (( max != undefined && isNumeric( max ) ) ? max : 255 );\n OPTIONS['default'] = (( deflt != undefined ) ? deflt : '' );\n OPTIONS['validValues']= (( validValues != undefined ) ? validValues : '' );\n return OPTIONS;\n\n}", "title": "" }, { "docid": "c74e271c585de6fc07c492c4685683a6", "score": "0.4882407", "text": "cleanOptions() {\n let defaultOptions = {\n suffix: _1.LoadersConstants.Suffix,\n verbose: true\n };\n this._options = includes_1.Tools.DeepMergeObjects(defaultOptions, this._options !== null ? this._options : {});\n }", "title": "" }, { "docid": "2160ba408230f1fbd94f9cb136e07758", "score": "0.48803538", "text": "function json_value() {\n\n function json_object() {\n var brace = next_token;\n var object = empty();\n advance(\"{\");\n if (next_token.id !== \"}\") {\n (function next() {\n if (next_token.quote !== \"\\\"\") {\n warn(\"unexpected_a\", next_token, next_token.quote);\n }\n advance(\"(string)\");\n if (object[token.value] !== undefined) {\n warn(\"duplicate_a\", token);\n } else if (token.value === \"__proto__\") {\n warn(\"bad_property_a\", token);\n } else {\n object[token.value] = token;\n }\n advance(\":\");\n json_value();\n if (next_token.id === \",\") {\n advance(\",\");\n return next();\n }\n }());\n }\n advance(\"}\", brace);\n }\n\n function json_array() {\n var bracket = next_token;\n advance(\"[\");\n if (next_token.id !== \"]\") {\n (function next() {\n json_value();\n if (next_token.id === \",\") {\n advance(\",\");\n return next();\n }\n }());\n }\n advance(\"]\", bracket);\n }\n\n switch (next_token.id) {\n case \"{\":\n json_object();\n break;\n case \"[\":\n json_array();\n break;\n case \"true\":\n case \"false\":\n case \"null\":\n advance();\n break;\n case \"(number)\":\n if (!rx_JSON_number.test(next_token.value)) {\n warn(\"unexpected_a\");\n }\n advance();\n break;\n case \"(string)\":\n if (next_token.quote !== \"\\\"\") {\n warn(\"unexpected_a\", next_token, next_token.quote);\n }\n advance();\n break;\n case \"-\":\n advance(\"-\");\n advance(\"(number)\");\n break;\n default:\n stop(\"unexpected_a\");\n }\n }", "title": "" }, { "docid": "2c1aa2910307be219e7001f220dd9ee0", "score": "0.48777294", "text": "function jsonFilter(key, value) {\n\t if (typeof value === \"function\") {\n\t //to make sure all environments format functions the same way\n\t return value.toString()\n\t //remove all leading and trailing whitespace\n\t .replace(/(^\\s+|\\s+$)/mg, '')\n\t //remove new line characters\n\t .replace(/\\n/mg, '')\n\t //replace , and 0 or more spaces with \", \"\n\t .replace(/,\\s*/mg, ', ')\n\t //insert space between ){\n\t .replace(/\\)\\{/mg, ') {')\n\t ;\n\t }\n\t return value;\n\t}", "title": "" }, { "docid": "262e6738ae168357f4f1e76075bf543e", "score": "0.48703605", "text": "function r$1o(r,o={}){var l;const a=r instanceof o$1J?r:new o$1J(r,o),t={type:null==(l=null==o?void 0:o.ignoreUnknown)||l?a.apiValues:String,readOnly:null==o?void 0:o.readOnly,json:{type:a.jsonValues,read:(null==o||!o.readOnly)&&{reader:a.read},write:{writer:a.write}}};return void 0!==(null==o?void 0:o.default)&&(t.json.default=o.default),void 0!==(null==o?void 0:o.name)&&(t.json.name=o.name),d$1Y(t)}", "title": "" }, { "docid": "c369552b2c8a2b58521c9d0c78145c3c", "score": "0.48697105", "text": "static serializeOptions(opts) {\n return {\n rooms: [...opts.rooms],\n except: opts.except ? [...opts.except] : [],\n flags: opts.flags,\n };\n }", "title": "" }, { "docid": "91fab8510028b711a88918d3a9ba28c4", "score": "0.48674136", "text": "function atribuirEstados(json,combo){ \n\tfor(var i=0;i<json.length;i++){\n\t\tcombo.options[combo.length] = new Option( json[i].siglaEstado,json[i].idEstado );\n\t}\n}", "title": "" }, { "docid": "d6d2370483e1814bf066f70138aab7a6", "score": "0.48321962", "text": "set json(value) {\n const { directory = {}, package : pkg = {} } = value;\n this.directory = directory;\n this.package = pkg;\n }", "title": "" }, { "docid": "c881fd767061d16291e345ef7e562d1c", "score": "0.48307925", "text": "function flatternObject(options, params) {\n\t\t\tfor (let i in params) {\n\t\t\t\tif (Object.hasOwnProperty.call(params, i)) {\n\t\t\t\t\tif (!Object.hasOwnProperty.call(options, i)) {\n\t\t\t\t\t\tif (typeof (params[i]) === 'object') {\n\t\t\t\t\t\t\tflatternObject(options, params[i]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toptions[i] = params[i];\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}", "title": "" }, { "docid": "32bcb7548d76c15e9ca0fc9cb1483775", "score": "0.48149", "text": "getJSON() {\n return this.clone(File, \"$value\", false).usingParser(new _pnp_odata__WEBPACK_IMPORTED_MODULE_2__[\"JSONParser\"]())(Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_2__[\"headers\"])({ \"binaryStringResponseBody\": \"true\" }));\n }", "title": "" }, { "docid": "d49782babbd86e0384882f9f8e5d50e6", "score": "0.48110977", "text": "function stdopts (opts) {\n opts = opts || {}\n opts.keys = opts.keys !== false //default keys to true\n opts.values = opts.values !== false //default values to true\n return opts\n }", "title": "" }, { "docid": "78414196f59b057787557aa5855bff16", "score": "0.481105", "text": "function IsJSON(annotationOptions) {\n return function (object, propertyName) {\n MetadataStorage_1.defaultMetadataStorage.addValidationMetadata({\n type: ValidationTypes_1.ValidationTypes.IS_JSON,\n sanitize: false,\n object: object,\n propertyName: propertyName,\n groups: annotationOptions && annotationOptions.groups ? annotationOptions.groups : undefined,\n message: annotationOptions && annotationOptions.message ? annotationOptions.message : undefined,\n always: annotationOptions && annotationOptions.always ? annotationOptions.always : undefined,\n each: annotationOptions && annotationOptions.each ? annotationOptions.each : undefined\n });\n };\n}", "title": "" }, { "docid": "3d0e9942831861f15909a39462603b6d", "score": "0.4801366", "text": "getDefaultSettings() {\n return new Promise((resolve, reject) => {\n let schema = this._options.publicOptions.schema\n\n jsf.option({\n failOnInvalidTypes: false,\n useDefaultValue: true,\n useExamplesValue: true,\n requiredOnly: false,\n fillProperties: true\n })\n\n function addRequiredFlag(schema) {\n schema._meta = schema._meta || { type: null }\n\n if (schema.properties) {\n schema.required = Object.keys(schema.properties)\n\n for (let prop in schema.properties) {\n schema.properties[prop] = addRequiredFlag(schema.properties[prop])\n }\n } else {\n if (schema.type === 'array') {\n if (schema.items.properties) {\n schema.items.required = Object.keys(schema.items.properties)\n schema.items._meta = schema.items._meta || { type: null }\n\n if (schema.items.type === 'object') {\n for (let prop in schema.items.properties) {\n schema.items.properties[prop] = addRequiredFlag(schema.items.properties[prop])\n }\n }\n } else if (Array.isArray(schema.items)) {\n for (let item of schema.items) {\n if (item.type === 'object') {\n for (let prop in item.properties) {\n item.required = Object.keys(item.properties)\n item._meta = item._meta || { type: null }\n\n item.properties[prop] = addRequiredFlag(item.properties[prop])\n }\n }\n }\n }\n }\n }\n\n return schema\n }\n\n try {\n schema = addRequiredFlag(schema)\n let obj = jsf.generate(schema)\n\n resolve(obj)\n } catch (err) {\n reject(err)\n }\n })\n }", "title": "" }, { "docid": "82d05e86eb50315120299261d7899b3f", "score": "0.47994897", "text": "function addOptionals(geojson, settings){\n if(settings.crs && checkCRS(settings.crs)) {\n if(settings.isPostgres)\n geojson.geometry.crs = settings.crs;\n else\n geojson.crs = settings.crs;\n }\n if (settings.bbox) {\n geojson.bbox = settings.bbox;\n }\n console.log(settings.extraGlobal)\n if (settings.extraGlobal) {\n geojson.properties = {};\n for (var key in settings.extraGlobal) {\n geojson.properties[key] = settings.extraGlobal[key];\n }\n }\n }", "title": "" }, { "docid": "0cca21b04be7fdf394cc57faa834d652", "score": "0.4784824", "text": "function getDefaultOpts (simple) {\n\t 'use strict';\n\n\t var defaultOptions = {\n\t omitExtraWLInCodeBlocks: {\n\t defaultValue: false,\n\t describe: 'Omit the default extra whiteline added to code blocks',\n\t type: 'boolean'\n\t },\n\t noHeaderId: {\n\t defaultValue: false,\n\t describe: 'Turn on/off generated header id',\n\t type: 'boolean'\n\t },\n\t prefixHeaderId: {\n\t defaultValue: false,\n\t describe: 'Specify a prefix to generated header ids',\n\t type: 'string'\n\t },\n\t ghCompatibleHeaderId: {\n\t defaultValue: false,\n\t describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n\t type: 'boolean'\n\t },\n\t headerLevelStart: {\n\t defaultValue: false,\n\t describe: 'The header blocks level start',\n\t type: 'integer'\n\t },\n\t parseImgDimensions: {\n\t defaultValue: false,\n\t describe: 'Turn on/off image dimension parsing',\n\t type: 'boolean'\n\t },\n\t simplifiedAutoLink: {\n\t defaultValue: false,\n\t describe: 'Turn on/off GFM autolink style',\n\t type: 'boolean'\n\t },\n\t excludeTrailingPunctuationFromURLs: {\n\t defaultValue: false,\n\t describe: 'Excludes trailing punctuation from links generated with autoLinking',\n\t type: 'boolean'\n\t },\n\t literalMidWordUnderscores: {\n\t defaultValue: false,\n\t describe: 'Parse midword underscores as literal underscores',\n\t type: 'boolean'\n\t },\n\t strikethrough: {\n\t defaultValue: false,\n\t describe: 'Turn on/off strikethrough support',\n\t type: 'boolean'\n\t },\n\t tables: {\n\t defaultValue: false,\n\t describe: 'Turn on/off tables support',\n\t type: 'boolean'\n\t },\n\t tablesHeaderId: {\n\t defaultValue: false,\n\t describe: 'Add an id to table headers',\n\t type: 'boolean'\n\t },\n\t ghCodeBlocks: {\n\t defaultValue: true,\n\t describe: 'Turn on/off GFM fenced code blocks support',\n\t type: 'boolean'\n\t },\n\t tasklists: {\n\t defaultValue: false,\n\t describe: 'Turn on/off GFM tasklist support',\n\t type: 'boolean'\n\t },\n\t smoothLivePreview: {\n\t defaultValue: false,\n\t describe: 'Prevents weird effects in live previews due to incomplete input',\n\t type: 'boolean'\n\t },\n\t smartIndentationFix: {\n\t defaultValue: false,\n\t description: 'Tries to smartly fix indentation in es6 strings',\n\t type: 'boolean'\n\t },\n\t disableForced4SpacesIndentedSublists: {\n\t defaultValue: false,\n\t description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n\t type: 'boolean'\n\t },\n\t simpleLineBreaks: {\n\t defaultValue: false,\n\t description: 'Parses simple line breaks as <br> (GFM Style)',\n\t type: 'boolean'\n\t },\n\t requireSpaceBeforeHeadingText: {\n\t defaultValue: false,\n\t description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n\t type: 'boolean'\n\t },\n\t ghMentions: {\n\t defaultValue: false,\n\t description: 'Enables github @mentions',\n\t type: 'boolean'\n\t },\n\t ghMentionsLink: {\n\t defaultValue: 'https://github.com/{u}',\n\t description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n\t type: 'string'\n\t },\n\t encodeEmails: {\n\t defaultValue: true,\n\t description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n\t type: 'boolean'\n\t }\n\t };\n\t if (simple === false) {\n\t return JSON.parse(JSON.stringify(defaultOptions));\n\t }\n\t var ret = {};\n\t for (var opt in defaultOptions) {\n\t if (defaultOptions.hasOwnProperty(opt)) {\n\t ret[opt] = defaultOptions[opt].defaultValue;\n\t }\n\t }\n\t return ret;\n\t}", "title": "" }, { "docid": "bdf97f57e44ccf894c268d5eb17e2742", "score": "0.47847995", "text": "function ExtraOptions(){}", "title": "" }, { "docid": "d8d1eb1dbb96d8dd7d899c717daa564e", "score": "0.47817498", "text": "function convertSwagger(source, options){\n var apiInfo = clone(source,false);\n apiInfo.resources = {};\n\n /** Sort the paths before doing other stuff **/\n\n for (var p in apiInfo.paths) {\n for (var m in apiInfo.paths[p]) {\n if(apiInfo.paths[p][m].order === undefined) {\n apiInfo.paths[p][m].order = 10000;\n }\n }\n }\n\n for (var p in apiInfo.paths) {\n // console.log(apiInfo.paths[p]); // THIS HAS THE TAGS \n\n for (var m in apiInfo.paths[p]) {\n if (m != 'parameters') {\n var sMethod = apiInfo.paths[p][m];\n\n if(sMethod.tags !== undefined) {\n if(!doesArrayIncludeArrayValue(sMethod.tags, options.hideTags)) {\n var ioMethod = {};\n ioMethod.path = p;\n ioMethod.op = m;\n ioMethod.order = apiInfo.paths[p][m].order;\n\n var sMethodUniqueName = (sMethod.operationId ? sMethod.operationId : m+'_'+p).split('/').join('_');\n sMethodUniqueName = sMethodUniqueName.split(' ').join('_'); // TODO {, } and : ?\n\n \n \n var tagName = 'Default';\n if (sMethod.tags && sMethod.tags.length>0) {\n tagName = sMethod.tags[0];\n }\n if (!apiInfo.resources[tagName]) {\n apiInfo.resources[tagName] = {};\n if (apiInfo.tags) {\n for (var t in apiInfo.tags) {\n var tag = apiInfo.tags[t];\n if (tag.name == tagName) {\n apiInfo.resources[tagName].description = tag.description;\n apiInfo.resources[tagName].externalDocs = tag.externalDocs;\n }\n }\n }\n }\n if (!apiInfo.resources[tagName].methods) apiInfo.resources[tagName].methods = {};\n apiInfo.resources[tagName].methods[sMethodUniqueName] = ioMethod;\n }\n }\n }\n }\n }\n delete apiInfo.paths; // to keep size down\n delete apiInfo.definitions; // ditto\n\n return apiInfo;\n}", "title": "" }, { "docid": "dff172ec0af293be04dfe384326aa545", "score": "0.47794804", "text": "function getDataAttributeOptions(reference) {\n return keys.reduce(function (acc, key) {\n var valueAsString = (reference.getAttribute(\"data-tippy-\".concat(key)) || '').trim();\n\n if (!valueAsString) {\n return acc;\n }\n\n if (key === 'content') {\n acc[key] = valueAsString;\n } else {\n try {\n acc[key] = JSON.parse(valueAsString);\n } catch (e) {\n acc[key] = valueAsString;\n }\n }\n\n return acc;\n }, {});\n}", "title": "" }, { "docid": "7e55077d8b24ca3382a408b0c07dac8d", "score": "0.4778808", "text": "function serializeApiOptions(options) {\n var optionString = \"\";\n for(var option in options) {\n optionString = optionString + \"&\" + option + \"=\" + options[option];\n }\n return optionString;\n }", "title": "" }, { "docid": "c3ffda60827d6b5af41274bc6b447684", "score": "0.47754246", "text": "function JsonProcessor() {\n\n}", "title": "" }, { "docid": "9893f1c0845a6baac34d618947eae6ec", "score": "0.4767645", "text": "function ExtraOptions() {}", "title": "" }, { "docid": "bcc2fce2626e404911984e1ca3183c9c", "score": "0.47613096", "text": "function deserializeValue(value) {\n\t try {\n\t return value ? value == \"true\" || (value == \"false\" ? false : value == \"null\" ? null : +value + \"\" == value ? +value : /^[\\[\\{]/.test(value) ? $.parseJSON(value) : value) : value;\n\t } catch (e) {\n\t return value;\n\t }\n\t }", "title": "" }, { "docid": "c2948fd36bb04321d5cd105745dd179f", "score": "0.47520006", "text": "setOptions(newValue, typeMap) {\n const values = algorithm_1.toArray(newValue || []);\n const types = typeMap || {};\n if (coreutils_1.JSONExt.deepEqual(values, this._options) &&\n coreutils_1.JSONExt.deepEqual(types, this._typeMap)) {\n return;\n }\n if (values.length) {\n this._options = values;\n this._typeMap = types;\n this._orderedTypes = Private.findOrderedTypes(types);\n this._subsetMatch = true;\n }\n else {\n this._options = [];\n this._typeMap = {};\n this._orderedTypes = [];\n }\n this._stateChanged.emit(undefined);\n }", "title": "" }, { "docid": "f543f7dcbd3586a25b969793a9bf3e73", "score": "0.47508225", "text": "function deserializeValue(value) {\n\t try {\n\t return value ? value == \"true\" || (value == \"false\" ? false : value == \"null\" ? null : +value + \"\" == value ? +value : /^[\\[\\{]/.test(value) ? $.parseJSON(value) : value) : value;\n\t } catch (e) {\n\t return value;\n\t }\n\t }", "title": "" }, { "docid": "f543f7dcbd3586a25b969793a9bf3e73", "score": "0.47508225", "text": "function deserializeValue(value) {\n\t try {\n\t return value ? value == \"true\" || (value == \"false\" ? false : value == \"null\" ? null : +value + \"\" == value ? +value : /^[\\[\\{]/.test(value) ? $.parseJSON(value) : value) : value;\n\t } catch (e) {\n\t return value;\n\t }\n\t }", "title": "" }, { "docid": "4b9491038ae31808659d5fae306a66f5", "score": "0.47444868", "text": "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "title": "" }, { "docid": "4b9491038ae31808659d5fae306a66f5", "score": "0.47444868", "text": "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "title": "" }, { "docid": "4b9491038ae31808659d5fae306a66f5", "score": "0.47444868", "text": "function createOptions(options){var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true;});return object;}", "title": "" }, { "docid": "650d494dd63ca387a1536f45ff100240", "score": "0.4739719", "text": "addSampleValue(state, sampleValue) {\r\n state.nodeOBSampleValue = sampleValue\r\n // check if it is an allOf obj or a regular obj\r\n // should move function to JSONEditor\r\n // should use type to check if allOf, Obj or TaxElem\r\n if (state.currentFile.file[state.isSelected][\"allOf\"]) {\r\n for (let i in state.currentFile.file[state.isSelected][\"allOf\"]) {\r\n if (state.currentFile.file[state.isSelected][\"allOf\"][i][\"type\"]) {\r\n state.currentFile.file[state.isSelected][\"allOf\"][i][\"x-ob-sample-value\"] = sampleValue;\r\n }\r\n }\r\n } else {\r\n state.currentFile.file[state.isSelected][\"x-ob-sample-value\"] = sampleValue;\r\n }\r\n }", "title": "" }, { "docid": "3dfcabae35fa7805fa218d4461a867f2", "score": "0.47386068", "text": "function ccc_generateOptionsFromAnalyzerState(report) {\n\n var vizPropsImplied = exports.propsImpliedDefault();\n\n var options = report.reportDoc.getChartOptions().attributes;\n for(var i = 0, L = options.length; i < L; i++) {\n var option = options[i];\n var name = option.nodeName;\n if(!exports.isIgnoredChartOption(name)) {\n var value = option.nodeValue;\n\n // Value conversions\n switch(name) {\n // boolean\n case \"autoRange\":\n case \"autoRangeSecondary\":\n case \"showLegend\":\n value = (value === \"true\");\n break;\n\n case \"sizeByNegativesMode\":\n value = ccc_convertSizeByNegativesMode(value);\n break;\n\n // lower-cased strings\n case \"legendPosition\":\n case \"displayUnits\":\n case \"displayUnitsSecondary\":\n case \"backgroundFill\":\n case \"labelStyle\":\n case \"legendStyle\":\n case \"multiChartRangeScope\":\n case \"emptyCellMode\":\n if(value) value = value.toLowerCase();\n break;\n\n case \"maxChartsPerRow\":\n value = parseFloat(value);\n break;\n }\n\n vizPropsImplied[name] = value;\n }\n }\n\n return vizPropsImplied;\n }", "title": "" }, { "docid": "eb63dd4709bc126fa6549abd02ba4dee", "score": "0.47361463", "text": "function cleanObjectforJSON( _attr ){\n\tvar output = {};\n\t\n\tfor( var ref in _attr ){\n\t\tvar value = _attr[ref];\n\t\tvar type = typeof value;\n\t\t\n\t\tif( type === 'boolean' || type === 'number' || type === 'string' || value instanceof Array ){\n\t\t\toutput[ref] = _attr[ref];\n\t\t} else if( type == 'object' ){\n\t\t\toutput[ref] = cleanObjectforJSON( value );\n\t\t}\n\t}\n\t\n\treturn output;\n}", "title": "" }, { "docid": "b75d6c07e233771cfd6ad1443130c19a", "score": "0.47329476", "text": "async getStatusOptions() {\n const status = await this.getStatus()\n const options = []\n for (const key in status) {\n options.push({label: status[key].label, value: status[key].code, translate: status[key].translate})\n }\n\n return options\n }", "title": "" }, { "docid": "7cd7a39f396297e34e7a8bebe897c948", "score": "0.47318682", "text": "function jsonFilter(key, value) {\n\tif (typeof value === 'function') {\n\t\t// to make sure all environments format functions the same way\n\t\treturn value.toString()\n\t\t\t// remove all leading and trailing whitespace\n\t\t\t.replace(/(^\\s+|\\s+$)/mg, '')\n\t\t\t// remove new line characters\n\t\t\t.replace(/\\n/mg, '')\n\t\t\t// replace , and 0 or more spaces with \", \"\n\t\t\t.replace(/,\\s*/mg, ', ')\n\t\t\t// insert space between ){\n\t\t\t.replace(/\\)\\{/mg, ') {');\n\t}\n\treturn value;\n}", "title": "" }, { "docid": "65cd47ca1334b41d191b5447c420db37", "score": "0.4727791", "text": "function json_value() {\n let negative;\n if (next_token.id === \"{\") {\n return (function json_object() {\n const brace = next_token;\n const object = empty();\n const properties = [];\n brace.expression = properties;\n advance(\"{\");\n if (next_token.id !== \"}\") {\n (function next() {\n let name;\n let value;\n if (next_token.quote !== \"\\\"\") {\n warn(\n \"unexpected_a\",\n next_token,\n next_token.quote\n );\n }\n name = next_token;\n advance(\"(string)\");\n if (object[token.value] !== undefined) {\n warn(\"duplicate_a\", token);\n } else if (token.value === \"__proto__\") {\n warn(\"bad_property_a\", token);\n } else {\n object[token.value] = token;\n }\n advance(\":\");\n value = json_value();\n value.label = name;\n properties.push(value);\n if (next_token.id === \",\") {\n advance(\",\");\n return next();\n }\n }());\n }\n advance(\"}\", brace);\n return brace;\n }());\n }\n if (next_token.id === \"[\") {\n return (function json_array() {\n const bracket = next_token;\n const elements = [];\n bracket.expression = elements;\n advance(\"[\");\n if (next_token.id !== \"]\") {\n (function next() {\n elements.push(json_value());\n if (next_token.id === \",\") {\n advance(\",\");\n return next();\n }\n }());\n }\n advance(\"]\", bracket);\n return bracket;\n }());\n }\n if (\n next_token.id === \"true\"\n || next_token.id === \"false\"\n || next_token.id === \"null\"\n ) {\n advance();\n return token;\n }\n if (next_token.id === \"(number)\") {\n if (!rx_JSON_number.test(next_token.value)) {\n warn(\"unexpected_a\");\n }\n advance();\n return token;\n }\n if (next_token.id === \"(string)\") {\n if (next_token.quote !== \"\\\"\") {\n warn(\"unexpected_a\", next_token, next_token.quote);\n }\n advance();\n return token;\n }\n if (next_token.id === \"-\") {\n negative = next_token;\n negative.arity = \"unary\";\n advance(\"-\");\n advance(\"(number)\");\n negative.expression = token;\n return negative;\n }\n stop(\"unexpected_a\");\n}", "title": "" }, { "docid": "9366780a581fc6945b5b72f34fa70dc5", "score": "0.47263592", "text": "getItemSchema(requested=\"item\"){var schema={$schema:\"http://json-schema.org/schema#\",title:this.title,type:\"object\",properties:{}},obj;if(\"item\"==requested){obj=new JSONOutlineSchemaItem}else{// current object definition but without the outline\nobj={file:this.file,id:this.id,title:this.title,author:this.author,description:this.description,license:this.license,metadata:this.metadata};// support this as fallback\nif(\"outline\"==requested){obj.items=this.items}}for(var key in obj){let props={title:key,type:\"string\",value:obj[key]};switch(key){case\"file\":case\"id\":case\"title\":case\"author\":case\"description\":case\"license\":case\"location\":// @todo break parent out into selector\ncase\"parent\":props.component={name:\"paper-input\",valueProperty:\"value\",properties:{required:!0}};break;case\"indent\":case\"order\":props.component={name:\"paper-input\",valueProperty:\"value\",properties:{required:!0},attributes:{type:\"number\"}};case\"metadata\":case\"items\":props.type=\"array\";props.items={type:\"object\",properties:{key:{title:\"key\",type:\"string\",component:{name:\"paper-input\",valueProperty:\"value\",properties:{required:!0}}},value:{title:\"value\",type:\"string\",component:{name:\"paper-input\",valueProperty:\"value\",properties:{required:!0}}}}};break;default:console.log(key);break;}schema.properties[key]=props}return schema}", "title": "" }, { "docid": "b4b2ef152da0e9b584ef5490e1f0ba63", "score": "0.47238192", "text": "'toJSON'() {\n var val = this.get();\n //var tval = tof(val);\n var tval = typeof val;\n if (tval == 'string') {\n return '\"' + val + '\"';\n } else {\n return val;\n }\n }", "title": "" }, { "docid": "edaf79d973ecf87fe065eb1fa1f8794f", "score": "0.4719079", "text": "function coerceSettings (obj) {\n const booleanFields = [\n 'enforce_admins',\n 'required_linear_history',\n 'allow_force_pushes',\n 'allow_deletions'\n ];\n for (const prop in obj) {\n if (prop.match(/url/)) {\n // remove 'url' HATEOAS properties\n delete obj[prop];\n } else if (booleanFields.includes(prop)) {\n // flatten object with enabled property into boolean\n const enabled = obj[prop].enabled;\n obj[prop] = enabled;\n } else {\n if (typeof obj[prop] === 'object') {\n coerceSettings(obj[prop]);\n }\n }\n }\n}", "title": "" }, { "docid": "38aaf993968d55d21448e276f237cb05", "score": "0.4713869", "text": "function parseField(targetField, inboundJson, defaultValue, jsonStyle) {\n\n //First check if the inbound field is even there.\n //If not, we may be building a summary node instead full\n if (inboundJson === undefined) {\n targetField.value = defaultValue;\n return;\n }\n\n\n if (jsonStyle === undefined) {\n jsonStyle = \"Services\"; // default is Drupal Services style nodes\n }\n\n switch (jsonStyle) {\n\n case \"Services\":\n\n parseFieldServices(targetField, inboundJson, defaultValue);\n break;\n\n case \"JSONDoc\":\n parseFieldJSONDocument(targetField, inboundJson, defaultValue);\n break;\n\n default:\n throw new CMSModelException(\"Bad jsonStyle in field parser: \" + jsonStyle);\n\n }\n\n }", "title": "" }, { "docid": "7bb2506d08a4b8b922566ed5004e14a6", "score": "0.47136188", "text": "importOptions(){\n loadJSONFile(d => this.loadOptions(d));\n }", "title": "" }, { "docid": "519193f5deb67194390d90a8fbe28053", "score": "0.47115344", "text": "options(opts) {\n input = opts.input;\n }", "title": "" }, { "docid": "3f6022eece079dcae57e6db40e4b775b", "score": "0.47072637", "text": "function massageOverrides(input) { // 77\n\tvar overrides = { views: input.views || {} }; // the output. ensure a `views` hash // 78\n\tvar subObj; // 79\n // 80\n\t// iterate through all option override properties (except `views`) // 81\n\t$.each(input, function(name, val) { // 82\n\t\tif (name != 'views') { // 83\n // 84\n\t\t\t// could the value be a legacy View-Option-Hash? // 85\n\t\t\tif ( // 86\n\t\t\t\t$.isPlainObject(val) && // 87\n\t\t\t\t!/(time|duration|interval)$/i.test(name) && // exclude duration options. might be given as objects // 88\n\t\t\t\t$.inArray(name, complexOptions) == -1 // complex options aren't allowed to be View-Option-Hashes // 89\n\t\t\t) { // 90\n\t\t\t\tsubObj = null; // 91\n // 92\n\t\t\t\t// iterate through the properties of this possible View-Option-Hash value // 93\n\t\t\t\t$.each(val, function(subName, subVal) { // 94\n // 95\n\t\t\t\t\t// is the property targeting a view? // 96\n\t\t\t\t\tif (/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(subName)) { // 97\n\t\t\t\t\t\tif (!overrides.views[subName]) { // ensure the view-target entry exists // 98\n\t\t\t\t\t\t\toverrides.views[subName] = {}; // 99\n\t\t\t\t\t\t} // 100\n\t\t\t\t\t\toverrides.views[subName][name] = subVal; // record the value in the `views` object // 101\n\t\t\t\t\t} // 102\n\t\t\t\t\telse { // a non-View-Option-Hash property // 103\n\t\t\t\t\t\tif (!subObj) { // 104\n\t\t\t\t\t\t\tsubObj = {}; // 105\n\t\t\t\t\t\t} // 106\n\t\t\t\t\t\tsubObj[subName] = subVal; // accumulate these unrelated values for later // 107\n\t\t\t\t\t} // 108\n\t\t\t\t}); // 109\n // 110\n\t\t\t\tif (subObj) { // non-View-Option-Hash properties? transfer them as-is // 111\n\t\t\t\t\toverrides[name] = subObj; // 112\n\t\t\t\t} // 113\n\t\t\t} // 114\n\t\t\telse { // 115\n\t\t\t\toverrides[name] = val; // transfer normal options as-is // 116\n\t\t\t} // 117\n\t\t} // 118\n\t}); // 119\n // 120\n\treturn overrides; // 121\n}", "title": "" }, { "docid": "d2418fecc9a44364a0386ca3ea935382", "score": "0.47031173", "text": "function parse_value(value) {\n if (typeof(value) == \"string\" || value instanceof String) {\n try {\n\t value = JSON.parse(value);\n } catch (e) {\n\t if (value[0] == \"{\" && value[value.length - 1] == \"}\")\n\t reactive.catchable_error(\"Failed to parse JSON\", undefined);\n\t let raw_value = value.toLowerCase().trim();\n\n\t if (raw_value == \"true\") {\n\t value = true;\n\t } else if (raw_value == \"false\") {\n\t value = false;\n\t } else {\n\t let num = Number(raw_value);\n\n\t if (!isNaN(num)) {\n\t value = num;\n\t }\n\t }\n }\n }\n return value;\n}", "title": "" }, { "docid": "0eead8f49a9896d1ec7108b980f054a5", "score": "0.47026706", "text": "styledJSON(data) {\n if (process.stdout.isTTY) {\n const cardinal = require('cardinal');\n const theme = require('cardinal/themes/jq');\n return cardinal.highlight(JSON.stringify(data, null, 2), {theme});\n }\n\n return JSON.stringify(data, null, 2);\n }", "title": "" }, { "docid": "045a2095166519a19fc781dba8740951", "score": "0.47009656", "text": "function processOptions(vObj, bIgnoreLazy) {\n\n\t\t\tassert(\n\t\t\t\t(typeof vObj === 'string' && vObj) ||\n\t\t\t\t(typeof vObj === 'object' && typeof vObj.name === 'string' && vObj.name),\n\t\t\t\t\"reference either must be a non-empty string or an object with a non-empty 'name' and an optional 'url' property\");\n\n\t\t\tif ( typeof vObj === 'object' ) {\n\t\t\t\tif ( vObj.url ) {\n\t\t\t\t\tregisterModulePath(vObj.name, vObj.url);\n\t\t\t\t}\n\t\t\t\treturn (vObj.lazy && bIgnoreLazy !== true) ? undefined : vObj.name; // expl. check for true to allow usage in Array.prototype.map below\n\t\t\t}\n\n\t\t\treturn vObj;\n\t\t}", "title": "" } ]
da4906c56d99710ab2de195804e4b045
return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check
[ { "docid": "5de93e7833412360f2fcacb215bb3f75", "score": "0.5483503", "text": "function orientIfSure(px, py, rx, ry, qx, qy) {\n const l = (ry - py) * (qx - px);\n const r = (rx - px) * (qy - py);\n return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0;\n}", "title": "" } ]
[ { "docid": "372242ba17890397fc5e246c12432267", "score": "0.69255245", "text": "_getOrientation(p, q, r) {\n // Algorithm from https://www.geeksforgeeks.org/orientation-3-ordered-points/\n // eslint-disable-next-line\n let val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\n if(val === 0) {\n return \"colinear\";\n }\n\n return val > 0 ? \"clockwise\" : \"counterclockwise\";\n }", "title": "" }, { "docid": "8895ca2165aa2c8d65f4ccbf19a65850", "score": "0.66014004", "text": "function orientation() {\n\tif (w < h) {\n\t\treturn w;\n\t} else {\n\t\treturn h;\n\t}\n}", "title": "" }, { "docid": "276a45430f98705c93a5dd22e45c97df", "score": "0.6495275", "text": "function orientation(p1, p2, p3){\n var slopeA = (p2.y - p1.y)/(p2.x - p1.x);\n var slopeB = (p3.y - p2.y)/(p3.x - p1.x);\n\n // if(slopeA === slopeB){\n // return \"collinear\";\n // } else if (slopeA < slopeB){\n // return \"counterclockwise\";\n // } else {\n // return \"clockwise\";\n // }\n\n //this is refactored as:\n return (p2.y - p1.y)*(p3.x - p2.x) - (p3.y - p2.y)*(p2.x - p1.x); // need to figure out how these are the same\n}", "title": "" }, { "docid": "ca3dcface249f4258491290d0e30258a", "score": "0.6489648", "text": "function orientation(p, q, r) {\r\n return (q[1] - p[1]) * (r[0] - p[0]) - (q[0] - p[0]) * (r[1] - p[1]);\r\n}", "title": "" }, { "docid": "f60651af1d862b448e2d2614e33c9813", "score": "0.6482687", "text": "function orientation(px, py, qx, qy, rx, ry)\n{\n // See https://www.geeksforgeeks.org/orientation-3-ordered-points/ \n // for details of below formula. \n const val = (qy - py) * (rx - qx) -\n (qx - px) * (ry - qy);\n\n return Math.sign(val);\n}", "title": "" }, { "docid": "066acf9e9b253aef27feab65f9e4a93a", "score": "0.64168954", "text": "function orientation(p, q, r) {\n const [px, py] = p;\n const [qx, qy] = q;\n const [rx, ry] = r;\n const k = (qy - py) * (rx - qx) - (qx - px) * (ry - qy);\n\n if (k === 0) return 0;\n return k > 0 ? 1 : -1;\n}", "title": "" }, { "docid": "32a5caf6dd3b35a5b22a316abda4fb2c", "score": "0.63935816", "text": "IsCorrectOrientation() {\n for (let i=0; i<this.orientation.length;i++){\n if (this.orientation[i] !== this.solvedOrientation[i]) return false\n }\n return true\n }", "title": "" }, { "docid": "3351d6edc1ed3872321614ddb28c5c74", "score": "0.6373293", "text": "get isOnSide() {\n const ori = this.exif.image.Orientation;\n return (ori >= 5 && ori <= 8);\n }", "title": "" }, { "docid": "f3a44d02c84b43d5acf6b4b438cc5564", "score": "0.63050276", "text": "function validateOrientation(){\n\t\t\n\t\tif(g_temp.orientation == null)\n\t\t\tthrow new Error(\"Wrong orientation, please set panel orientation before run\");\n\t\t\n\t}", "title": "" }, { "docid": "84ff58ae6edb7dc1402379a9acd4067e", "score": "0.6271102", "text": "function c(){var e=s();return 90===M._viewrotation||270===M._viewrotation?P(e):e}", "title": "" }, { "docid": "dcd582d53ae04ce41b28c64cb134959b", "score": "0.5997911", "text": "function orient(p, q, r) {\n var o = (q[1] - p[1]) * (r[0] - q[0]) - (q[0] - p[0]) * (r[1] - q[1]);\n return o > 0 ? 1 :\n o < 0 ? -1 : 0;\n}", "title": "" }, { "docid": "ce89485a0ff750e3169e3cf4264ae3e8", "score": "0.59470016", "text": "get orientation() {\n return this.i.as;\n }", "title": "" }, { "docid": "aea88b0b64b54170020718dd031e56db", "score": "0.5841286", "text": "get orientation() {\n return (\n super.orientation || (this[state$1] && this[state$1].orientation) || \"both\"\n );\n }", "title": "" }, { "docid": "04d8ee0e0acbc7c77b3a358d4e62d292", "score": "0.583252", "text": "getIsPortrait() {\n return this.rect.height > this.rect.width;\n }", "title": "" }, { "docid": "423184bb204f9cb226e5bf8fee6111c6", "score": "0.58130276", "text": "function orient(data, p, q, r) {\n var o = (data[q + 1] - data[p + 1]) * (data[r] - data[q]) - (data[q] - data[p]) * (data[r + 1] - data[q + 1]);\n return o > 0 ? 1 :\n o < 0 ? -1 : 0;\n}", "title": "" }, { "docid": "d827219b0d7cb05de40f0aff98c74b51", "score": "0.57687753", "text": "function delaunator_orient(rx, ry, qx, qy, px, py) {\n const sign = orientIfSure(px, py, rx, ry, qx, qy) ||\n orientIfSure(rx, ry, qx, qy, px, py) ||\n orientIfSure(qx, qy, px, py, rx, ry);\n return sign < 0;\n}", "title": "" }, { "docid": "7f2efc2cd3bbd5cb51700bda7711a8c0", "score": "0.57085806", "text": "function getOrientation() {\n var $d = $d || $(document),\n orientation = window.orientation || (($d.width() > $d.height()) ? 90 : 0);\n\n return (orientation == -90 || orientation == 90) ? 'landscape' : 'portrait';\n}", "title": "" }, { "docid": "0976fff52f1516275862f6c6a2c3b3c8", "score": "0.57073283", "text": "Sign( v2 ) {\n\n let clockwise = 1;\n let anticlockwise = -1;\n\n if ( this.y * v2.x > this.x * v2.y ) {\n return anticlockwise;\n } else {\n return clockwise;\n };\n }", "title": "" }, { "docid": "af84a710be21a7b57273d2fb797b12c6", "score": "0.5693478", "text": "@computed\n get sideCenterAngles() {\n const sideSum = this.windowDimensions.width + this.windowDimensions.height;\n const topBottom = this.windowDimensions.width / sideSum * Math.PI;\n const leftRigth = Math.abs(topBottom - Math.PI);\n return { topBottom, leftRigth };\n }", "title": "" }, { "docid": "d29737ef40a3b25b0cf8f22df2d1ea3a", "score": "0.56771106", "text": "getOrientation() {\n return this.model ? this.model.getOrientation() : null;\n }", "title": "" }, { "docid": "a372049a1aad50b86ddc3e4cd9a254c3", "score": "0.56539786", "text": "get orientation() {\n return this.skeleton.orientation;\n }", "title": "" }, { "docid": "a372049a1aad50b86ddc3e4cd9a254c3", "score": "0.56539786", "text": "get orientation() {\n return this.skeleton.orientation;\n }", "title": "" }, { "docid": "a372049a1aad50b86ddc3e4cd9a254c3", "score": "0.56539786", "text": "get orientation() {\n return this.skeleton.orientation;\n }", "title": "" }, { "docid": "2f240808dfd8a620c34b60976118afd5", "score": "0.5645281", "text": "calculateRotation() {\n const extentFeature = this._extentFeature;\n const coords = extentFeature.getGeometry().getCoordinates()[0];\n const p1 = coords[0];\n const p2 = coords[3];\n const rotation = Math.atan2(p2[1] - p1[1], p2[0] - p1[0]) * 180 / Math.PI;\n\n return -rotation;\n }", "title": "" }, { "docid": "fb121e5b782bb545b0cd98d02263ad1b", "score": "0.56431085", "text": "function skeleton_orientation(rotation, time) {\n\t//Browser.print(\"Ortientation changed\\n\");\n\tvar orientation;\n\tcountO++;\n\tif(countO>20){\n\t\tcountO = 0;\n\t}else{\n\t\treturn;\n\t}\n for(var i=0; i<rotation.length; ++i){\n\t\tif(i==XNJOINTS.XN_SKEL_HEAD){\n\t\t\torientation = rotation[i];\n\t\t\tvar angle = orientation.angle*180/3.14*orientation.y;\n\t\t\tif(angle<min_angle){\n\t\t\t\t//print(\"MinOrientation: \"+orientation+\" Angle:\"+angle);\n\t\t\t\tmin_angle = angle;\n\t\t\t}else if(angle>max_angle){\n\t\t\t\t//print(\"MaxOrientation: \"+orientation+\" Angle:\"+angle);\n\t\t\t\tmax_angle = angle;\n\t\t\t}\n\t\t\t//if(angle<-3)print(\"Min\");\n\t\t\t//else if(angle>3)print(\"Max\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ffce3114f387c33bb6f5bc2972f81c5d", "score": "0.5626097", "text": "avancer(){\n if(this.orientation === 'N'){\n if(this.y < this.limite_y) this.y += 1\n } else if(this.orientation === 'E'){\n if(this.x < this.limite_x) this.x += 1\n } else if(this.orientation === 'W'){\n if(this.x > 0) this.x -= 1\n } else if(this.orientation === 'S'){\n if(this.y > 0) this.y -= 1\n }\n }", "title": "" }, { "docid": "0f657ad514eab1f9bbe37fb1f308e8bf", "score": "0.560993", "text": "function opposite(orientation) {\n\treturn((orientation+4)%8);\n}", "title": "" }, { "docid": "2ae34694cba537c7880cd88a9c9291db", "score": "0.55594003", "text": "function isLandscape() {\n return Math.abs(getAngle() / 90) !== 1;\n }", "title": "" }, { "docid": "895941fd1316ccefb40e54eab24c750a", "score": "0.5541476", "text": "function getOrientation() {\n var elem = document.documentElement;\n return elem && elem.clientWidth / elem.clientHeight < 1.1 ? \"portrait\" : \"landscape\";\n}", "title": "" }, { "docid": "6ef09a12375b4ed1920ac12668ba2a1d", "score": "0.5521546", "text": "function orientIfSure(px, py, rx, ry, qx, qy) {\n var l = (ry - py) * (qx - px);\n var r = (rx - px) * (qy - py);\n return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0;\n }", "title": "" }, { "docid": "0ec4b10f196646db10d77021db253f42", "score": "0.5515832", "text": "getHintSide(point) {\n const { angle } = this.getPolarPosition(point);\n const { topBottom, leftRigth } = this.sideCenterAngles;\n const right = leftRigth / 2;\n const bottom = right + topBottom;\n const left = bottom + leftRigth;\n const top = left + topBottom;\n let side = 'right';\n if (angle > right) side = 'bottom';\n if (angle > bottom) side = 'left';\n if (angle > left) side = 'top';\n if (angle > top) side = 'right';\n return side;\n }", "title": "" }, { "docid": "e31e432d2f0ba7417f7b359ade973f2b", "score": "0.55097497", "text": "get normalOrientation() {\n return this._normalOrientation;\n }", "title": "" }, { "docid": "9ea22ed328800fd305dabf11e7dab0fd", "score": "0.55067134", "text": "function orient(rx, ry, qx, qy, px, py) {\n var sign = orientIfSure(px, py, rx, ry, qx, qy) || orientIfSure(rx, ry, qx, qy, px, py) || orientIfSure(qx, qy, px, py, rx, ry);\n return sign < 0;\n }", "title": "" }, { "docid": "db4ec72d9dc3ba45435aa89678e9cb71", "score": "0.5365336", "text": "function determineDirection(deltaX, deltaY) {\n if(deltaX != 0) {\n angle = 180.0 / Math.PI * Math.atan(deltaY/deltaX);\n }\n //alert(\"angle: \"+angle);\n //postive x is to the right\n //positive y is down\n direction = \"e\";\n if(deltaX > 0 && deltaY > 0) {\n if(angle <= 22.5) {\n direction = \"e\";\n } else if(angle <= 67.5) {\n direction =\"se\"\n } else {\n direction = \"s\";\n }\n } else if(deltaX < 0 && deltaY > 0) {\n if(angle >= -22.5) {\n direction = \"w\";\n } else if(angle >= -67.5) {\n direction = \"sw\";\n } else {\n direction = \"s\";\n }\n } else if(deltaX < 0 && deltaY < 0) {\n if(angle < 22.5) {\n direction = \"w\";\n } else if(angle < 67.5) {\n direction = \"nw\";\n } else {\n direction = \"n\";\n }\n\n } else if(deltaX > 0 && deltaY < 0) {\n if(angle >= -22.5) {\n direction = \"e\";\n } else if(angle >= -67.5) {\n direction = \"ne\";\n } else {\n direction = \"n\";\n }\n } else if(deltaX == 0){\n if(deltaY > 0){\n direction = \"s\";\n } else if(deltaY < 0) {\n direction =\"n\";\n }\n } else if(deltaY == 0){\n if(deltaX > 0) {\n direction = \"e\";\n } else if(deltaX < 0) {\n direction = \"w\";\n }\n }\n\n return direction;\n}", "title": "" }, { "docid": "02294b8c677531fe40360e217d7774df", "score": "0.5365098", "text": "function orientIfSure(px, py, rx, ry, qx, qy) {\n const l = (ry - py) * (qx - px);\n const r = (rx - px) * (qy - py);\n return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0;\n }", "title": "" }, { "docid": "226a183462cdadf2a803c08cf15e447c", "score": "0.53568935", "text": "function i(n){return n&&\"upperLeft\"===n.originPosition}", "title": "" }, { "docid": "226a183462cdadf2a803c08cf15e447c", "score": "0.53568935", "text": "function i(n){return n&&\"upperLeft\"===n.originPosition}", "title": "" }, { "docid": "b387fa8bdb25ac3e5ea3067c2a6c7ad6", "score": "0.53555846", "text": "function chooseOrientation(width, height) {\n if (width < height) {\n return \"horizontal\";\n } else if (height < width) {\n return \"vertical\";\n } else {\n return randomGenerator(2) === 0 ? \"horizontal\" : \"vertical\";\n }\n}", "title": "" }, { "docid": "da10e93f2a4e0762530424acc4ff81cd", "score": "0.53509796", "text": "function isPortrait() {\n return !isLandscape();\n }", "title": "" }, { "docid": "fe58a3b17d0a465b51f429c73c5295c3", "score": "0.53379685", "text": "get orientation() {\n return this._orientation;\n }", "title": "" }, { "docid": "fe58a3b17d0a465b51f429c73c5295c3", "score": "0.53379685", "text": "get orientation() {\n return this._orientation;\n }", "title": "" }, { "docid": "fe58a3b17d0a465b51f429c73c5295c3", "score": "0.53379685", "text": "get orientation() {\n return this._orientation;\n }", "title": "" }, { "docid": "fe58a3b17d0a465b51f429c73c5295c3", "score": "0.53379685", "text": "get orientation() {\n return this._orientation;\n }", "title": "" }, { "docid": "63c568db4b0321119159314a0fa8fa14", "score": "0.533477", "text": "determineSymmetry(){\n for(var x=0;x<this.mapSize;x++){\n for(var y=0;y<=this.mapSize/2;y++){\n if(this.rc.map[y][x]!=this.rc.map[this.mapSize-y-1][x])\n return 1;\n }\n }\n return 0;\n }", "title": "" }, { "docid": "336456d8b7b4143ca2568473622a46ea", "score": "0.53337896", "text": "isValid() {\n return this.sides == 4\n && this.segments.every((segment, i) => segment.formsRightAngle(this.segments[(i + 1) % 4]));\n }", "title": "" }, { "docid": "1d70aeaefd0e67ff69302d9d29dfe83f", "score": "0.5317285", "text": "function determineOrientationIndex (orientation) {\n var o = orientation\n var index\n switch (o) {\n case 'A':\n case 'P':\n index = 1\n break;\n case 'L':\n case 'R':\n index = 0\n break;\n case 'S':\n case 'I':\n index = 2\n break;\n default:\n console.assert(false, ' OBLIQUE NOT SUPPORTED')\n break;\n }\n return index\n}", "title": "" }, { "docid": "21e17306a8a623d471e0d93840b20645", "score": "0.52910686", "text": "get orientation() {\n return this[state].orientation;\n }", "title": "" }, { "docid": "6b5cc7dfc4d0ee461c41b189580d1b96", "score": "0.52782136", "text": "function judgeAngle(angle) {\n if (angle > 0 && angle < 90) {\n return \"Acute angle\"\n } else if (angle === 90) {\n return \"Right angle\"\n } else if (angle > 90 && angle < 180) {\n return \"Obtuse angle\"\n } else if (angle === 180) {\n return \"Straight line\"\n }\n}", "title": "" }, { "docid": "569a54c26b393b13a9f80dfa705e84a3", "score": "0.52630544", "text": "arg() {\n if (this.equalTo(0)) {\n return undefined;\n }\n\n if (this.re < 0 && y == 0) {\n return Math.PI;\n }\n\n return 2 * Math.atan(this.im / (this.abs() + this.re));\n }", "title": "" }, { "docid": "0d3ff075bf56ed1fb8bc39396425dd32", "score": "0.5262916", "text": "get isVertical() { return this.orientation === VERTICAL; }", "title": "" }, { "docid": "fe34a31241c3e802caaf731924b5a3f9", "score": "0.5252563", "text": "get isPortrait()\n {\n if (window.innerWidth < window.innerHeight)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "3bd16f505acbfe3d8270c0856eb3419d", "score": "0.5252028", "text": "function orientar(actual,cardinal) {\r\n\tvar sig_menor = new coord();\r\n\tsig_menor.x = 0;\r\n\tsig_menor.y = 0; \r\n\t//El valor mas largo posible (dimension de la matriz)\r\n\tvar sig_menor_val = X*Y;\r\n\tvar sig_dir = cardinal;\r\n\t//Si al frente esta disponible seguir\r\n\tif ((maze[actual.y][actual.x].walls & cardinal) != 0){\r\n\t\tvar sig_temp = new coord();\r\n\t sig_temp = coordVecina(actual, cardinal); \r\n\t if(chequear_esquina(sig_temp)){\r\n\t \tsig_menor = sig_temp;\r\n\t \tsig_menor_val = maze[sig_menor.y][sig_menor.x].distancia;\r\n\t }\r\n\t}\r\n \r\n\tfor (var i = 0; i<cardinales.length; i++) {\r\n\t\tvar dir = cardinales[i];\r\n \t//Si la direccion es accesible\r\n \tif ((maze[actual.y][actual.x].walls & dir) != 0) { \r\n \t\t//definimos la coord para la direccion\r\n \t\tvar dirCoord = new coord();\r\n \t\tdirCoord = coordVecina(actual, dir);\r\n \t\t//Chequeo Direcciones disponibles\r\n \t\tif (chequear_esquina(dirCoord)) {\r\n \t\t//Si este direccion es más óptima que continuar recto\r\n \t\tif (maze[dirCoord.y][dirCoord.x].distancia < sig_menor_val) {\r\n \t\t\t//actualiza el sig menor valor disponible\r\n \t\t\tsig_menor_val = maze[dirCoord.y][dirCoord.x].distancia;\r\n \t\t\t//actualiza el valor de sig menor a la direccion\r\n \t\t\tsig_menor = dirCoord;\r\n \t\t\tsig_dir = dir;\r\n \t\t\tconsole.log(\"Siguente direccion posible del for: \" + sig_dir);\r\n \t\t}\r\n \t\t}\r\n \t}\r\n \t}\r\n \tconsole.log(\"Cardinal actual: \" + cardinal);\r\n \treturn sig_dir;\r\n}", "title": "" }, { "docid": "82107e6d031fd629a6ce5b3634a68bd4", "score": "0.5250764", "text": "function checkSide(d) {\n if (side == 0) {\n side = d;\n }\n else {\n return !side || side * d < 0;\n }\n return false;\n }", "title": "" }, { "docid": "e58de6b8533b8d791c7c5fb8d4263e14", "score": "0.52498245", "text": "function getEraserRightSide(x,y,s){\n\tvar result=\"M\"+x+\" \"+y+\",\";\n\tresult=result+\"S\"+(x-s/3)+\" \"+y+\" \"+(x-s*2/3)+\" \"+(y+s/3)+\",\";\n\tresult=result+\"L\"+(x-s*2/3)+\" \"+(y+s*5/6)+\",\";\n\tresult=result+\"L\"+(x-s*7/9)+\" \"+(y+s)+\",\";\n\tresult=result+\"S\"+(x-s/2)+\" \"+(y+s)+\" \"+(x+s/6)+\" \"+(y+s/3)+\",\";\n\tresult=result+\"L\"+x+\" \"+(y+s/2)+\",\";\n\tresult=result+\"Z\";\n\t\t\n\treturn result;\n}", "title": "" }, { "docid": "e1de731065184c2df610b49a147abcbe", "score": "0.5244885", "text": "function getOrientation() {\n return window.screen.orientation.angle;\n}", "title": "" }, { "docid": "0f3e6c13cac81293146695e529525dfb", "score": "0.5240932", "text": "function orient(rx, ry, qx, qy, px, py) {\n const sign = orientIfSure(px, py, rx, ry, qx, qy) ||\n orientIfSure(rx, ry, qx, qy, px, py) ||\n orientIfSure(qx, qy, px, py, rx, ry);\n return sign < 0;\n}", "title": "" }, { "docid": "baabada0a7bccf1bfeed3d3be60deb58", "score": "0.52341926", "text": "get eulerAngles() {\n const out = new Vector3_1$5.Vector3();\n // if the input quaternion is normalized, this is exactly one. Otherwise, this acts as a correction factor for the quaternion's not-normalizedness\n const unit = this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n // this will have a magnitude of 0.5 or greater if and only if this is a singularity case\n const test = this.x * this.w - this.y * this.z;\n if (test > 0.4995 * unit) {\n // singularity at north pole\n out.x = Math.PI / 2;\n out.y = 2 * Math.atan2(this.y, this.x);\n out.z = 0;\n }\n else if (test < -0.4995 * unit) {\n // singularity at south pole\n out.x = -Math.PI / 2;\n out.y = -2 * Math.atan2(this.y, this.x);\n out.z = 0;\n }\n else {\n // no singularity - this is the majority of cases\n out.x = Math.asin(2 * (this.w * this.x - this.y * this.z));\n out.y = Math.atan2(2 * this.w * this.y + 2 * this.z * this.x, 1 - 2 * (this.x * this.x + this.y * this.y));\n out.z = Math.atan2(2 * this.w * this.z + 2 * this.x * this.y, 1 - 2 * (this.z * this.z + this.x * this.x));\n }\n out.x *= types_1$7.RAD2DEG;\n out.y *= types_1$7.RAD2DEG;\n out.z *= types_1$7.RAD2DEG;\n // ensure the degree values are between 0 and 360\n out.x = Scalar_1$5.Scalar.Repeat(out.x, 360);\n out.y = Scalar_1$5.Scalar.Repeat(out.y, 360);\n out.z = Scalar_1$5.Scalar.Repeat(out.z, 360);\n return out;\n }", "title": "" }, { "docid": "02b5190b68b924b7c7cbaa4813a16f1e", "score": "0.52233815", "text": "function ArithGeoII(arr) { \nvar arithM = true\nvar arithG = true\n for (var i=0 ; i<arr.length -2 ; i++) {\n if (arr[i+1]-arr[i] !== arr[i+2]-arr[i+1]) { arithM = false}\n if (arr[i+1]/arr[i] !== arr[i+2]/arr[i+1]) { arithG = false} \n }\n if (arithM === true) {return \"ArithM\"}\n if (arithG === true) {return \"ArithG\"}\n return -1 \n}", "title": "" }, { "docid": "d7c13de49d1b213d4aab7c40b7ff4e61", "score": "0.51991934", "text": "function getShapeDirection(points) {\n var center = getCenterPoint(points);\n var pos1Rad = getRad(center, points[0]);\n var pos2Rad = getRad(center, points[1]);\n return pos1Rad < pos2Rad && pos2Rad - pos1Rad < Math.PI || pos1Rad > pos2Rad && pos2Rad - pos1Rad < -Math.PI ? 1 : -1;\n }", "title": "" }, { "docid": "61e4579d0799fdbdad9fa1f1056c61e7", "score": "0.51926893", "text": "function compass(dir) {\n if (dir <= 11.25) {\n return \"N\";\n }\n if (dir > 11.25 && dir <= 33.75) {\n return \"NNE\";\n }\n if (dir > 33.75 && dir <= 56.25) {\n return \"NE\";\n }\n if (dir > 56.25 && dir <= 78.75) {\n return \"ENE\";\n }\n if (dir > 78.75 && dir <= 101.25) {\n return \"E\";\n }\n if (dir > 101.25 && dir <= 123.75) {\n return \"ESE\";\n }\n if (dir > 123.75 && dir <= 146.25) {\n return \"SE\";\n }\n if (dir > 146.25 && dir <= 168.75) {\n return \"SSE\";\n }\n if (dir > 168.75 && dir <= 191.25) {\n return \"S\";\n }\n if (dir > 191.25 && dir <= 213.75) {\n return \"SSW\";\n }\n if (dir > 213.75 && dir <= 236.25) {\n return \"SW\";\n }\n if (dir > 236.25 && dir <= 258.75) {\n return \"WSW\";\n }\n if (dir > 258.75 && dir <= 281.25) {\n return \"W\";\n }\n if (dir > 281.25 && dir <= 303.75) {\n return \"WNW\";\n }\n if (dir > 303.75 && dir <= 326.25) {\n return \"NW\";\n }\n if (dir > 326.25 && dir <= 348.75) {\n return \"NNW\";\n }\n if (dir > 348.75) {\n return \"N\";\n }\n}", "title": "" }, { "docid": "1f5fd321b537b4cef077d7a99be9d173", "score": "0.5191187", "text": "function getRightAscension(Ls) { return m.atan2(sin(Ls) * cos(e), cos(Ls)); }", "title": "" }, { "docid": "be863edeb5f891abbcd477a0284dc575", "score": "0.51779497", "text": "isVertical() {\r\n return !this.isHorizontal();\r\n }", "title": "" }, { "docid": "6ad43a34225f0c0f8b1dd03c33a71755", "score": "0.5174073", "text": "getSide() { return 0; }", "title": "" }, { "docid": "6ad43a34225f0c0f8b1dd03c33a71755", "score": "0.5174073", "text": "getSide() { return 0; }", "title": "" }, { "docid": "7dc8458c64d8352f42eba4eaadd19d04", "score": "0.5172667", "text": "function getOrientationX(tabCamera) {\n return tabCamera[6];\n}", "title": "" }, { "docid": "826a34d0d56226f835178db899b7e298", "score": "0.5167141", "text": "function inclination(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}", "title": "" }, { "docid": "b2c99d260aede32c8b2fde184004b769", "score": "0.51657647", "text": "function orient(rx, ry, qx, qy, px, py) {\n const sign = orientIfSure(px, py, rx, ry, qx, qy) ||\n orientIfSure(rx, ry, qx, qy, px, py) ||\n orientIfSure(qx, qy, px, py, rx, ry);\n return sign < 0;\n }", "title": "" }, { "docid": "61b1a03e5a4f182e8a654d803fbbb4d9", "score": "0.5162686", "text": "static get ColorToOrientation() {\n return {\n 'w' : [0,1,0],\n 'y' : [0,-1,0],\n 'g' : [0,0,1],\n 'b' : [0,0,-1],\n 'r' : [1,0,0],\n 'o' : [-1,0,0],\n }\n }", "title": "" }, { "docid": "8b5d6fe2819be364fb3a164346ebd109", "score": "0.51551944", "text": "function axisAlignedOrientation(orientation) {\n if (!Math.sign) {\n Math.sign = function(x) {\n return ((x > 0) - (x < 0)) || +x;\n };\n }\n\n var rotation = MyAvatar.orientation;\n var getForward = Quat.getForward(rotation);\n\n var sign = {\n x: Math.sign(getForward.x),\n y: Math.sign(getForward.y),\n z: Math.sign(getForward.z)\n };\n\n var newObj = {\n x: Math.abs(getForward.x),\n y: Math.abs(getForward.y),\n z: Math.abs(getForward.z)\n };\n\n var keys = Object.keys(newObj);\n\n function getLargest(obj) {\n var largestKey = \"x\";\n keys.forEach(function (key) {\n if (newObj[largestKey] < newObj[key]) {\n largestKey = key;\n }\n });\n return largestKey;\n }\n\n var largestKey = getLargest(newObj);\n keys.splice(keys.indexOf(largestKey), 1);\n\n var finalObj = {};\n finalObj[largestKey] = sign[largestKey];\n keys.forEach(function (key) {\n finalObj[key] = 0;\n });\n var finalRotation = Quat.fromVec3Degrees(finalObj);\n\n return [finalRotation, finalObj];\n}", "title": "" }, { "docid": "7abf32af451f0f07f8515345e01fb2db", "score": "0.5150919", "text": "function GestureJudge() {\n \n var Xav = Yav = Zav = 0;\n var theta, phi;\n \n Xav = average(d1);\n Yav = average(d2);\n Zav = average(d3);\n theta = PolarAngle(Xav, Yav);\n phi = AzimuthalAngle(Xav, Yav, Zav);\n if (phi <= 10) {\n return 32;\n } else if ( phi <= 40 ) {\n if (theta <= 135 && theta > 45)\n return 38;\n else if (theta <= 225 && theta > 135)\n return 37;\n else if (theta <= 270 && theta > 225)\n return 40;\n else if ((theta <= 45 || theta > 270) && theta >= 0)\n return 39;\n } else\n return -1;\n }", "title": "" }, { "docid": "b411c14e87a1d283484b113b10e597e1", "score": "0.5140125", "text": "function rotationCtrl(dir){\n // make sure fingers won't go into weird position. T\n //I think this doctors the direction object for each rotation to prevent large shifts\n for (var i = 0, length = dir.length; i < length; i++) {\n if (dir[i] >= 0.8) {\n dir[i] = 0.8;\n }\n \n }\n return dir;\n }", "title": "" }, { "docid": "116f8d9bfb015050f5625431210cd900", "score": "0.5138292", "text": "function right_angle(base,perpendicular){\n function square(num){\n return num**2;\n }\n hyp= square(base)+square(perpendicular);\n hypotenuse=hyp**0.5;\n document.write(\"Hypertenuse : \"+hypotenuse);\n}", "title": "" }, { "docid": "1ca1f62624acf139683c56402885111c", "score": "0.5117663", "text": "is_inverted() {\n let v1 = [\n points[this.p_2d_idx[1]] - points[this.p_2d_idx[0]],\n points[this.p_2d_idx[1] + 1] - points[this.p_2d_idx[0] + 1]\n ];\n let v2 = [\n points[this.p_2d_idx[2]] - points[this.p_2d_idx[1]],\n points[this.p_2d_idx[2] + 1] - points[this.p_2d_idx[1] + 1]\n ];\n return v1[0] * v2[1] - v1[1] * v2[0] < 0;\n }", "title": "" }, { "docid": "d36bb4969b0326a738144b89a0b0f21b", "score": "0.51125586", "text": "get rotatedWidth() {\n return this.isOnSide ? this.width : this.height;\n }", "title": "" }, { "docid": "534c1a7a442b0c07d66dc5f2b5bbe766", "score": "0.51052344", "text": "get mode(): any {\n if(this.degrees >= 1){\n return Math.sqrt(this.degrees - 1);\n }\n return undefined;\n }", "title": "" }, { "docid": "b849311bd2df996cef2af959c7ff2858", "score": "0.5094881", "text": "isLandscape () {\n\n return ( window.orientation === 90 || window.orientation === -90 );\n\n }", "title": "" }, { "docid": "6c836e94174ea611738c73353a520ad4", "score": "0.50903493", "text": "function quadrant(theta) {\n if (theta < 90) {\n return 1;\n } else if (theta < 180) {\n return 2;\n } else if (theta < 270) {\n return 3;\n } else {\n return 4;\n }\n}", "title": "" }, { "docid": "0313bb98fa13ec0a18fd75507cba0ccd", "score": "0.50825423", "text": "function getThingCardinalPosition(thing){\n\t var degree = getThingPosition2DinDegree(thing);\n\t if (degree <= 22.5 || degree > (360-22.5))\n\t return 'N';\n\t if (degree <= (45+22.5) && degree > 22.5)\n\t return 'NW';\n\t if (degree <= (90+22.5) && degree > (45+22.5))\n\t return 'W';\n\t if (degree <= (135+22.5) && degree > (90+22.5))\n\t return 'SW';\n\t if (degree <= (180+22.5) && degree > (135+22.5))\n\t return 'S';\n\t if (degree <= (225+22.5) && degree > (180+22.5))\n\t return 'SE';\n\t if (degree <= (270+22.5) && degree > (225+22.5))\n\t return 'E';\n\t if (degree <= 315+22.5 && degree > (270+22.5))\n\t return 'NE';\n\t}", "title": "" }, { "docid": "2317c8d5449ba5278df553f03b5e6d88", "score": "0.50814253", "text": "getDirectionVector() {\n\t\treturn {x: -Math.sin(this.orientation), y: Math.cos(this.orientation)};\n\t}", "title": "" }, { "docid": "9ee54d818e392449c85ae28c8b0502b3", "score": "0.5079585", "text": "function isPortrait()\n{\n\n\tswitch (window.orientation)\n\t{\n\t\tcase 0:\n\t\tcase 180:\n\t\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "495dd5845378868e390f2a0d1f878267", "score": "0.5079096", "text": "function checkOtherFrancky(idOrientation, idCurrentFranckyPositionX, idFranckyPositionX, idCurrentFranckyPositionY, idFranckyPositionY) {\r\n\r\n // Get the orientation & X informations & Y informations\r\n // ---------------------------------------------------------------------------\r\n var orientation = document.getElementById(idOrientation).innerHTML;\r\n var intCurrentPosX = parseInt(document.getElementById(idCurrentFranckyPositionX).innerHTML, 10);\r\n var intPosX = parseInt(document.getElementById(idFranckyPositionX).innerHTML, 10);\r\n var intCurrentPosY = parseInt(document.getElementById(idCurrentFranckyPositionY).innerHTML, 10);\r\n var intPosY = parseInt(document.getElementById(idFranckyPositionY).innerHTML, 10);\r\n\r\n\r\n if (orientation == 'East') {\r\n\r\n if ((intPosX == intCurrentPosX + 1) && (intPosY == intCurrentPosY)) {\r\n return false;\r\n }\r\n\r\n } else if (orientation == 'West') {\r\n\r\n if ((intPosX == intCurrentPosX - 1) && (intPosY == intCurrentPosY)) {\r\n return false;\r\n }\r\n\r\n } else if (orientation == 'North') {\r\n\r\n if ((intPosY == intCurrentPosY + 1) && (intPosX == intCurrentPosX)) {\r\n return false;\r\n }\r\n\r\n } else if (orientation == 'South') {\r\n\r\n if ((intPosY == intCurrentPosY - 1) && (intPosX == intCurrentPosX)) {\r\n return false;\r\n }\r\n }\r\n\r\n // End of function\r\n // -----------------------------------\r\n return true;\r\n\r\n}", "title": "" }, { "docid": "0992c2f4b8ca4eaef777e8a9cafa881c", "score": "0.5079029", "text": "function rightAscension(l,b){return atan(sin(l)*cos(e)-tan(b)*sin(e),cos(l));}", "title": "" }, { "docid": "e18803a08abde6cf5fb6e3bccd01c87e", "score": "0.50716925", "text": "function checkEyeShoulderRatio() {\n\t// Pose will look like [{part:'nose',position: {x: 0,y:0},score:.99}]\n\t// 1\tleftEye\n\t// 2\trightEye\n\t// 5\tleftShoulder\n\t// 6\trightShoulder\n}", "title": "" }, { "docid": "22fa3f7c453c8b935dd199f685cce07b", "score": "0.506723", "text": "get rotatedHeight() {\n return this.isOnSide ? this.height : this.width;\n }", "title": "" }, { "docid": "fd6989228b68a0381bd6fd740f9c8835", "score": "0.50622505", "text": "function points_right() {\n return direction == 1 || direction == 2;\n }", "title": "" }, { "docid": "28bae248e8fc6ffc0beb53518e6211d9", "score": "0.5062217", "text": "function orient2D(ax, ay, bx, by, cx, cy) {\n return determinant2D(ax - cx, ay - cy, bx - cx, by - cy);\n}", "title": "" }, { "docid": "5455c5bb8562de6b7db6b3f021c1c5cd", "score": "0.50564337", "text": "function NorthorSouth()\n{\n\tif(y == 0){\n\t\tconsole.log(\"nothing in the y\")\n\t}else{\n\t\t//only hit if x is not zero.\n\t\tif(y > 0){\n\t\t\tconsole.log('North :' + y);\n\t\t}else{\n\t\t\tconsole.log('South :' + y);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d33148759c68b767e6189799304cfff9", "score": "0.5056069", "text": "static GiveOppositeFaceOrientation(coordinate) {\n coordinate = coordinate.map(val => -val);\n return coordinate;\n }", "title": "" }, { "docid": "64fa45ee5b6ae9b5e0a7227400599d5b", "score": "0.5056053", "text": "function validateOrientation(id, value){\n if((value >= 0) && (value <= 360)) {\n newOrientation = value;\n } else {\n document.getElementById(\"orientation\" + id).value = \"\";\n alert(\"Invalid orientation value\");\n }\n}", "title": "" }, { "docid": "3196aed52a3bdd021cb5c800f6d5e9fa", "score": "0.50548923", "text": "get angle() {\r\n // Since y values increase going downwards in computer graphics, the y value difference must be negated to get the correct angle in a regular math coordinate system.\r\n return Math.atan2(this.firstPoint.y - this.lastPoint.y, this.lastPoint.x - this.firstPoint.x);\r\n }", "title": "" }, { "docid": "8f5c3424fb2fb976c21cd9e834163501", "score": "0.50542086", "text": "function getRotatedI(paramJ) {\n return paramJ;\n}", "title": "" }, { "docid": "65861160b7457ef34e8293fc41554ebe", "score": "0.5050229", "text": "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "title": "" }, { "docid": "65861160b7457ef34e8293fc41554ebe", "score": "0.5050229", "text": "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "title": "" }, { "docid": "65861160b7457ef34e8293fc41554ebe", "score": "0.5050229", "text": "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "title": "" }, { "docid": "65861160b7457ef34e8293fc41554ebe", "score": "0.5050229", "text": "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "title": "" }, { "docid": "65861160b7457ef34e8293fc41554ebe", "score": "0.5050229", "text": "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "title": "" }, { "docid": "65861160b7457ef34e8293fc41554ebe", "score": "0.5050229", "text": "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "title": "" }, { "docid": "22e5bf80ec8d5a3fee80aa8cb316f156", "score": "0.5048183", "text": "function getOrientationZ(tabCamera) {\n return tabCamera[8];\n}", "title": "" }, { "docid": "ac33b46a313ef832b4373f6164ac8738", "score": "0.5035928", "text": "function findAngle(angle){\n if (angle < 90)\n {return \"Acute angle\"}\n \n if (angle == 90)\n {return \"Right angle\"}\n\n if (90 < angle < 180)\n {return \"Btuse angle\"}\n\n if (angle == 180)\n {return \"Stright angle\"}\n}", "title": "" } ]
52073b48d79ae033a90b6a76906dafd8
Performs equality by iterating through keys on an object and returning false when any key has values which are not strictly equal between the arguments. Returns true when the values of all keys are strictly equal.
[ { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.0", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\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\n\t return true;\n\t}", "title": "" } ]
[ { "docid": "119ce444b94eb3fc782b58dd7f7c9388", "score": "0.6678906", "text": "function equalForKeys(a, b, keys) {\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 }", "title": "" }, { "docid": "e8e3e5b52552b2b5fc1f9b47b22b9696", "score": "0.6581117", "text": "function vaildateKeys(obj, expectedKeys) {\r\n\r\n //console.log(Object.entries(obj));\r\n //console.log(typeof expectedKeys);\r\n \r\n for (let i=0; i < expectedKeys.length; i++) {\r\n if(!obj.hasOwnProperty(expectedKeys[i])){\r\n \r\n return false;\r\n }\r\n }\r\n if(Object.keys(obj).length != expectedKeys.length){\r\n \r\n return false;\r\n }\r\n return true;\r\n \r\n // if(Object.keys(obj) == expectedKeys){\r\n // return true;\r\n // } else{\r\n // return false;\r\n // }\r\n \r\n}", "title": "" }, { "docid": "8a0f49942f79ffcebde2d7b9f30b89b1", "score": "0.65805364", "text": "function equals() {\n for (var index = 0, length = arguments.length; index < length - 1;) {\n // Apply the comparison function left-to-right until all the provided\n // arguments have been consumed.\n if (!eq(arguments[index], arguments[index += 1], [])) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "3fb404b2d34cdb17b8923d1e471c99f9", "score": "0.64627224", "text": "objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n }", "title": "" }, { "docid": "956d68ffabcd25736db0d0ad9972e77f", "score": "0.6362852", "text": "function checkKeysAreDiff(keys_data) {\n for (let i = 0; i < keys_data.length; i++) {\n for (let j = 0; j < keys_data.length; j++) {\n if( i!=j && keys_data[i].value == keys_data[j].value)\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "173a74ceb2fec38df939df00f2f0058c", "score": "0.62829655", "text": "function eqObjects(object1, object2){\n //if the length of object1 is equal to the length of object2\n if (Object.keys(object1).length === Object.keys(object2).length){\n //loop through object keys\n for(let key of Object.keys(object1) ){\n //compare both objects values for the key\n if(Array.isArray(object1[key]) && Array.isArray(object2[key])){\n //implement eqArrays function to support array value comparisons\n if (!eqArrays(object1[key],object2[key])){\n return false; \n }\n }\n \n }\n return true;\n }\n return false; \n}", "title": "" }, { "docid": "ed769bcefd4a181af62831f84ab194d7", "score": "0.6210318", "text": "function objectEq(prev, next) {\n var prevKeys = Object.keys(prev || {}),\n nextKeys = Object.keys(next || {});\n\n if (prevKeys.length !== nextKeys.length) {\n return false;\n }\n\n return nextKeys.every(function(key) {\n return prev[key] === next[key];\n });\n}", "title": "" }, { "docid": "1a562d955bcd090212c81b6df65f9bcf", "score": "0.61998296", "text": "function _equal(thing1, thing2) {\n\t\tif(typeof thing1 == typeof thing2) {\n\t \tif(typeof thing1 != \"object\") { // its a simple object\n\t return thing1 == thing2;\n\t } else {\n\t if(thing1 && (thing1.length !== undefined)) {\n\t \t if(thing1.length == thing2.length) {\n\t for(var i = 0, iL = thing1.length; i < iL; i++) {\n\t if(!_equal(thing1[i], thing2[i])) { \n\t return false;\n\t }\n\t } \n\t return true;\n\t } \n\t } else {\n\t // compare key values in each object\n\t for(var key in thing1) {\n\t if(!_equal(thing1[key], thing2[key])) { \n\t return false;\n\t }\n\t }\n\t // make sure have the same amount of keys\n\t var l1 = 0;\n\t var l2 = 0;\n\t for(var key in thing1) {\n\t l1++;\n\t }\n\t for(var key in thing2) {\n\t l2++;\n\t }\n\t return l1 == l2;\n\t }\n\t }\n\t }\n\t return false;\n\t}", "title": "" }, { "docid": "a3bbbbb8ed03dc0b73e10c66b2eba42b", "score": "0.615382", "text": "function objEquals(obj1, obj2)\r\n{\r\n //get the key arrays of both objects\r\n let keys1 = Object.keys(obj1);\r\n let keys2 = Object.keys(obj2);\r\n\r\n //objects must have the same number of properties\r\n if(keys1.length !== keys2.length)\r\n {\r\n return false;\r\n }\r\n\r\n for (let i = 0; i < keys1.length; i++)\r\n {\r\n //all properties must be the same\r\n if(keys1[i] !== keys2[i])\r\n {\r\n return false;\r\n }\r\n //the values of all properties must be the same\r\n if(JSON.stringify(obj1[keys1[i]]) !== JSON.stringify(obj2[keys2[i]]))\r\n {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "8be74aa635cc20a7bffad26cb00a49ec", "score": "0.61367005", "text": "function hasSamePair(object_1, object_2){\n for (var key_i in object_1){\n for (var key_j in object_2){\n \n if ((key_j == key_i) && (object_1[key_i] == object_2[key_j])) {\n return true;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "c8634e465f8702f34cf0a82e98ed5943", "score": "0.6119455", "text": "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}", "title": "" }, { "docid": "0b958fb38a86a3bf7ec783a883c1b240", "score": "0.6081117", "text": "function mapsAreEqual(inputKeys, inputMap, outputMap) {\n const outputKeys = Object.keys(outputMap);\n if (inputKeys.length !== outputKeys.length) {\n return true;\n }\n for (let i = 0, n = inputKeys.length; i <= n; i++) {\n let key = inputKeys[i];\n if (key !== outputKeys[i] || inputMap[key] !== outputMap[key]) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "7d2d059230a6aff097ee71a1e941df79", "score": "0.60441685", "text": "function verifyAllKeysAreSet(obj,arr) {\n var valueAreSet = false;\n var objProperties = Object.getOwnPropertyNames(obj);\n objProperties = objProperties.sort();\n arr = arr.sort();\n return objProperties.toString() === arr.toString();\n\n}", "title": "" }, { "docid": "dbbf4763ccf40f54503be8e052f966da", "score": "0.6023311", "text": "function objectEquals(x, y) {\n if (typeof(x) === 'number') {\n x = x.toString();\n }\n if (typeof(y) === 'number') {\n y = y.toString();\n }\n if (typeof(x) != typeof(y)) {\n return false;\n }\n\n if (Array.isArray(x) || Array.isArray(y)) {\n return x.toString() === y.toString();\n }\n\n if (x === null && y === null) {\n return true;\n }\n\n if (typeof(x) === 'object' && x !== null) {\n x_keys = Object.keys(x);\n y_keys = Object.keys(y);\n if (x_keys.sort().toString() !== y_keys.sort().toString()) {\n console.error('Object do not have the same keys: ' +\n x_keys.sort().toString() + ' vs ' +\n y_keys.sort().toString()\n );\n return false;\n }\n equals = true;\n for (key of x_keys) {\n equals &= objectEquals(x[key], y[key]);\n }\n return equals;\n }\n return x.toString() === y.toString();\n }", "title": "" }, { "docid": "c776cab96dad84a17441a5a0d5462a0c", "score": "0.6022898", "text": "function mapsAreEqual(inputKeys, inputMap, outputMap) {\n var outputKeys = Object.keys(outputMap);\n if (inputKeys.length !== outputKeys.length) {\n return true;\n }\n for (var i = 0, n = inputKeys.length; i <= n; i++) {\n var key = inputKeys[i];\n if (key !== outputKeys[i] || inputMap[key] !== outputMap[key]) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "781fe94a1d7cd2e73a3c2223ee4b9f82", "score": "0.60119367", "text": "function isEqual(a, b) {\n if (typeof a === 'function' && typeof b === 'function') {\n return true;\n }\n if (a instanceof Array && b instanceof Array) {\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0; i !== a.length; i++) {\n if (!isEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (isObject(a) && isObject(b)) {\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = Object.keys(a)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var key = _step3.value;\n\n if (!isEqual(a[key], b[key])) {\n return false;\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3['return']) {\n _iterator3['return']();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n return true;\n }\n return a === b;\n}", "title": "" }, { "docid": "781fe94a1d7cd2e73a3c2223ee4b9f82", "score": "0.60119367", "text": "function isEqual(a, b) {\n if (typeof a === 'function' && typeof b === 'function') {\n return true;\n }\n if (a instanceof Array && b instanceof Array) {\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0; i !== a.length; i++) {\n if (!isEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (isObject(a) && isObject(b)) {\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = Object.keys(a)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var key = _step3.value;\n\n if (!isEqual(a[key], b[key])) {\n return false;\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3['return']) {\n _iterator3['return']();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n return true;\n }\n return a === b;\n}", "title": "" }, { "docid": "b59ff68f927c6c2b5ac3ea15b554400e", "score": "0.6008037", "text": "function key_value_match(object1, object2) {\n\tvar keys = Object.keys(object1);\n\tvar keys2 = Object.keys(object2);\n\tfor (var i = 0; keys.length > i; i++) {\n\t\tif (object1[keys[i]] == object2[keys[i]]) {\n\t\t\treturn console.log(true)\n\t\t}\n\t}\n\tconsole.log(false)\n}", "title": "" }, { "docid": "9888076302d37be2d96fc1b6e4672500", "score": "0.6002141", "text": "function objectEq(a, b) {\n var akeys = Object.keys(a),\n bkeys = Object.keys(b),\n r;\n\n if (akeys.length !== bkeys.length) {\n return false;\n }\n\n r = true;\n\n detectRecursion(a, b, function () {\n var i, len, key;\n\n for (i = 0, len = akeys.length; i < len; i++) {\n key = akeys[i];\n if (!b.hasOwnProperty(key)) {\n r = false;break;\n }\n if (!eq(a[key], b[key])) {\n r = false;break;\n }\n }\n });\n\n return r;\n}", "title": "" }, { "docid": "caa346efce38ea5466321cd791609054", "score": "0.59693646", "text": "function matchObjects(object1, object2) {\n\tfor (var key in object1) {\n\t\tif (object2[key] == object1[key]) {\n\t\t\tconsole.log(\"Do these two objects share a key-value pair?\");\n\t\t\treturn true;\n\t\t}\n\t}\n\tconsole.log(\"Do these two objects share a key-value pairs?\");\n\treturn false;\n\n}", "title": "" }, { "docid": "1fad2dd6f0fac8e8016c8cd416a41b97", "score": "0.5953586", "text": "function isEqual(dict, other) {\n var dictKeys = keys(dict);\n var otherKeys = keys(other);\n\n if (dictKeys.length !== otherKeys.length) {\n return false;\n }\n\n var _iterator7 = _createForOfIteratorHelper(dictKeys),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var key = _step7.value;\n\n if (dict[key] !== other[key]) {\n return false;\n }\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n return true;\n }", "title": "" }, { "docid": "12aceb13d45ae6351680104b6a681d29", "score": "0.5948809", "text": "function compareObjects(left, right) {\n var left_keys = Object.keys(left);\n var right_keys = Object.keys(right);\n if (!compareArrays(left_keys, right_keys)) {\n return false;\n }return left_keys.every(function (key) {\n return compare(left[key], right[key]);\n });\n}", "title": "" }, { "docid": "5c979eed190afccb7500a3801bc4107b", "score": "0.5944575", "text": "function keyValueMatch(object1, object2) {\n\n\tvar tally = [];\n\n\tfor (var i = 0; i < Object.keys(object1).length; i++) {\n\n\t\tif (Object.keys(object1)[i] != Object.keys(object2)[i]) {\n\t\t\ttally.push(\"false\");\n\t\t} else {\n\t\t\tif (Object.values(object1)[i] == Object.values(object2)[i]) {\n\t\t\t\ttally.push(\"true\");\n\t\t\t} else {\n\t\t\t\ttally.push(\"false\");\n\t\t\t}\n\t\t} \n\t}\n\n\t\tif (tally.includes(\"true\")) {\n\t\t\tconsole.log(\"true\");\n\t\t\treturn true\n\t\t} else {\n\t\t\tconsole.log(\"false\");\n\t\t\treturn false\n\t\t} \n\t\t}", "title": "" }, { "docid": "d52f56844c2cafd38d98f9a57f3cdbbb", "score": "0.5917033", "text": "function _is_same(a, b){\n\t//bark('typeof(a, b): ' + typeof(a) + ',' + typeof(b));\n\n\tvar ret = false;\n\tif( a == b ){ // atoms, incl. null and 'string'\n\t //bark('true on equal atoms: ' + a + '<>' + b);\n\t ret = true;\n\t}else{ // is list or obj (ignore func)\n\t if( typeof(a) === 'object' && typeof(b) === 'object' ){\n\t\t//bark('...are objects');\n\t\t\n\t\t// Null is an object, but not like the others.\n\t\tif( a == null || b == null ){\n\t\t ret = false;\n\t\t}else if( Array.isArray(a) && Array.isArray(b) ){ // array equiv\n\t\t //bark('...are arrays');\n\t\t \n\t\t // Recursively check array equiv.\n\t\t if( a.length == b.length ){\n\t\t\tif( a.length == 0 ){\n\t\t\t //bark('true on 0 length array');\n\t\t\t ret = true;\n\t\t\t}else{\n\t\t\t ret = true; // assume true until false here\n\t\t\t for( var i = 0; i < a.length; i++ ){\n\t\t\t\tif( ! _is_same(a[i], b[i]) ){\n\t\t\t\t //bark('false on diff @ index: ' + i);\n\t\t\t\t ret = false;\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t }\n\n\t\t}else{ // object equiv.\n\n\t\t // Get unique set of keys.\n\t\t var a_keys = Object.keys(a);\n\t\t var b_keys = Object.keys(b);\n\t\t var keys = a_keys.concat(b_keys.filter(function(it){\n\t\t\treturn a_keys.indexOf(it) < 0;\n\t\t }));\n\t\t \n\t\t // Assume true until false.\n\t\t ret = true;\n\t\t for( var j = 0; j < keys.length; j++ ){ // no forEach - break\n\t\t\tvar k = keys[j];\n\t\t\tif( ! _is_same(a[k], b[k]) ){\n\t\t\t //bark('false on key: ' + k);\n\t\t\t ret = false;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }else{\n\t\t//bark('false by default');\n\t }\n\t}\n\t\n\treturn ret;\n }", "title": "" }, { "docid": "1e631611a22c0fd4434a57283780ba10", "score": "0.5906868", "text": "function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n }", "title": "" }, { "docid": "8666af53340fea2f680609799ba88ba4", "score": "0.5904767", "text": "function isEqual(dict, other) {\n const dictKeys = keys(dict);\n const otherKeys = keys(other);\n\n if (dictKeys.length !== otherKeys.length) {\n return false;\n }\n\n for (const key of dictKeys) {\n if (dict[key] !== other[key]) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "8b9a959ed3fb638bee92e9cfc22aafb0", "score": "0.5899276", "text": "function deepEquals(a,b) {\n // handle nulls\n if(a === null || b === null) {\n return a === b;\n }\n // handle different types\n if(typeof a !== typeof b) {\n return false;\n }\n // handle primitves\n if(typeof a != 'object') {\n return a === b;\n }\n // objects - if different keys, !equal\n if(!arrayEquals(Object.keys(a),Object.keys(b))) {\n return false;\n } \n // loop through keys, comparing values\n return Object.keys(a).every(key => {\n \treturn deepEquals(a[key],b[key]); \n });\n}", "title": "" }, { "docid": "bf79120a1f6e87417cb575c53af656af", "score": "0.5872116", "text": "function looseEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (_typeof(a) !== _typeof(b)) {\n return false;\n }\n\n var validTypesCount = [isDate(a), isDate(b)].filter(Boolean).length;\n\n if (validTypesCount > 0) {\n return validTypesCount === 2 ? a.getTime() === b.getTime() : false;\n }\n\n validTypesCount = [isFile(a), isFile(b)].filter(Boolean).length;\n\n if (validTypesCount > 0) {\n return validTypesCount === 2 ? a === b : false;\n }\n\n validTypesCount = [(0, _array.isArray)(a), (0, _array.isArray)(b)].filter(Boolean).length;\n\n if (validTypesCount > 0) {\n return validTypesCount === 2 ? a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i]);\n }) : false;\n }\n\n validTypesCount = [isObject(a), isObject(b)].filter(Boolean).length;\n\n if (validTypesCount > 0) {\n /* istanbul ignore if: this if will probably never be called */\n if (validTypesCount === 1) {\n return false;\n }\n\n var aKeysCount = (0, _object.keys)(a).length;\n var bKeysCount = (0, _object.keys)(b).length;\n\n if (aKeysCount !== bKeysCount) {\n return false;\n }\n\n if (aKeysCount === 0 && bKeysCount === 0) {\n return String(a) === String(b);\n } // Using for loop over `Object.keys()` here since some class\n // keys are not handled correctly otherwise\n\n\n for (var key in a) {\n if ([a.hasOwnProperty(key), b.hasOwnProperty(key)].filter(Boolean).length === 1 || !looseEqual(a[key], b[key])) {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "be796909386ec8b0203755b2efb5bcc5", "score": "0.5858747", "text": "function deepEqual(x, y) {\n const ok = Object.keys,\n tx = typeof x,\n ty = typeof y;\n return x && y && tx === \"object\" && tx === ty\n ? ok(x).length === ok(y).length &&\n ok(x).every((key) => deepEqual(x[key], y[key]))\n : x === y;\n }", "title": "" }, { "docid": "c7a6d3bd694db8a8ed90d5400a20d996", "score": "0.5848135", "text": "function keyValueMatch (object1, object2){\r\n\tfor (var key in object1){\r\n\t\tif (object1[key] == object2[key]) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "92db87b18c2264afb9961be915a6e1e0", "score": "0.5831417", "text": "function looseEqual(a, b) {\n if (a === b) {\n return true\n }\n let aValidType = isDate(a)\n let bValidType = isDate(b)\n if (aValidType || bValidType) {\n return aValidType && bValidType ? a.getTime() === b.getTime() : false\n }\n aValidType = isArray(a)\n bValidType = isArray(b)\n if (aValidType || bValidType) {\n return aValidType && bValidType\n ? a.length === b.length && a.every((e, i) => looseEqual(e, b[i]))\n : false\n }\n aValidType = isObject(a)\n bValidType = isObject(b)\n if (aValidType || bValidType) {\n /* istanbul ignore if: this if will probably never be called */\n if (!aValidType || !bValidType) {\n return false\n }\n const aKeysCount = keys(a).length\n const bKeysCount = keys(b).length\n if (aKeysCount !== bKeysCount) {\n return false\n }\n for (const key in a) {\n const aHasKey = a.hasOwnProperty(key)\n const bHasKey = b.hasOwnProperty(key)\n if ((aHasKey && !bHasKey) || (!aHasKey && bHasKey) || !looseEqual(a[key], b[key])) {\n return false\n }\n }\n }\n return String(a) === String(b)\n}", "title": "" }, { "docid": "a58d9890c161c05ef87d70b8e592da28", "score": "0.583045", "text": "function keyValue(obj1, obj2){\n //The fuction should check to see if the objects share a k:v pair\n for (var key in obj1){\n if(obj1[key] === obj2[key]) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "0d8e87aa3edf92f7c4ac76a9c10cea81", "score": "0.5822998", "text": "function recsAreEqual(r1, r2) {\n if (typeof r1 === 'object' && typeof r2 === 'object') {\n const keys1 = Object.keys(r1);\n const keys2 = Object.keys(r2);\n return keys1.count === keys2.count &&\n keys1.every(key => r1[key] === r2[key]);\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "c8d396d1d517d4cb945b025d2147b214", "score": "0.5822532", "text": "function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "c8d396d1d517d4cb945b025d2147b214", "score": "0.5822532", "text": "function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "ff85f06495b0350da1877591b81123c0", "score": "0.5807162", "text": "function isEqual(dict, other) {\n const dictKeys = keys(dict);\n const otherKeys = keys(other);\n if (dictKeys.length !== otherKeys.length) {\n return false;\n }\n for (const key of dictKeys) {\n if (dict[key] !== other[key]) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "ff85f06495b0350da1877591b81123c0", "score": "0.5807162", "text": "function isEqual(dict, other) {\n const dictKeys = keys(dict);\n const otherKeys = keys(other);\n if (dictKeys.length !== otherKeys.length) {\n return false;\n }\n for (const key of dictKeys) {\n if (dict[key] !== other[key]) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "ff85f06495b0350da1877591b81123c0", "score": "0.5807162", "text": "function isEqual(dict, other) {\n const dictKeys = keys(dict);\n const otherKeys = keys(other);\n if (dictKeys.length !== otherKeys.length) {\n return false;\n }\n for (const key of dictKeys) {\n if (dict[key] !== other[key]) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "b3563210d64168e57cd78ebcabe08c6c", "score": "0.5800275", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "title": "" }, { "docid": "2e5e02a657581539a32bdd3dc317edfd", "score": "0.57880586", "text": "function deepEqual(a, b) {\n if (a === b) return true; // Strict comparison for primitive values\n \n if (typeof a == \"object\" && typeof b == \"object\") {\n if (a == null || b == null) return false; // null also returns typeof object\n const aKeys = Object.keys(a), bKeys = Object.keys(b);\n\n // Check whether they have same set of keys\n if (aKeys.length != bKeys.length) return false;\n\n for (let i=0; i<aKeys.length; i++) {\n if (aKeys[i] != bKeys[i]) return false;\n if (deepEqual(a[aKeys[i]], b[bKeys[i]])) continue;\n else return false;\n }\n return true;\n } \n return false;\n\n}", "title": "" }, { "docid": "804bca4e0db320c9ca2d23d3fb95aaaf", "score": "0.5785105", "text": "function isEqual(dict, other) {\n const dictKeys = keys(dict);\n const otherKeys = keys(other);\n if (dictKeys.length !== otherKeys.length) {\n return false;\n }\n for (const key of dictKeys) {\n if (dict[key] !== other[key]) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "e6c06ca09e640ab4f5588d7ec7cbcb83", "score": "0.5777098", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n }", "title": "" }, { "docid": "3a9c689cee7fd713e26f68572e7dd249", "score": "0.5775723", "text": "function equals(o1, o2) {\n if (o1 === o2)\n return true;\n if (o1 === null || o2 === null)\n return false;\n if (o1 !== o1 && o2 !== o2)\n return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n if (t1 == t2 && t1 == 'object') {\n if (Array.isArray(o1)) {\n if (!Array.isArray(o2))\n return false;\n if ((length = o1.length) == o2.length) {\n for (key = 0; key < length; key++) {\n if (!equals(o1[key], o2[key]))\n return false;\n }\n return true;\n }\n }\n else {\n if (Array.isArray(o2)) {\n return false;\n }\n keySet = Object.create(null);\n for (key in o1) {\n if (!equals(o1[key], o2[key])) {\n return false;\n }\n keySet[key] = true;\n }\n for (key in o2) {\n if (!(key in keySet) && typeof o2[key] !== 'undefined') {\n return false;\n }\n }\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "94b866c55918e0df63473b827e8ef404", "score": "0.57729834", "text": "function deepEqual(a, b) {\n\n // Si la variable es de tipo object, iteramos sobre el arreglo verificando que ambos objects tengan\n // la misma cantidad de keys. Si es asi, llamamos de forma recursiva a deepEqual pero con los values\n // correspondientes a la key de esa iteración.\n // Si en cualquier punto de la iteración los values no son iguales, retorna false.\n if ((typeof a === 'object') || (typeof b === 'object')) {\n\n if (Object.keys(a).length === Object.keys(b).length) {\n\n for (const i of Object.keys(a)) {\n if (deepEqual(a[i], b[i]) === false) return false\n }\n\n return true\n }\n\n return false\n }\n else {\n if (a === b) {\n return true;\n }\n false\n return false;\n }\n}", "title": "" }, { "docid": "36809ba9bb87827235ff3953c28230c0", "score": "0.5729331", "text": "function deepEqual (a, b) {\n console.log(\"######################\")\n //if a is 'exactly' equal to b, return true\n if (a === b){\n console.log(\"Here's a and b\");\n console.log(a);\n console.log(b);\n console.log(\"a === b :D EZ\");\n return true;\n };\n\n // if a is equal to null or a is not an object...\n // or b equals null, or b is not an object, return false.\n\n // the reason we check both is because typeof null returns an object:D\n if (a == null || typeof a != \"object\" ||\n b == null || typeof b != \"object\") {\n console.log(\"Something is null or not object\");\n console.log(\"Here's a and b\");\n console.log(a);\n console.log(b);\n return false;\n };\n\n //assign the keys a to keys a, same for b\n let keysA = Object.keys(a), keysB = Object.keys(b)\n console.log(\"Here's a and b:\")\n console.log(keysA)\n console.log(keysB)\n\n // if both lists are not the same length, return false\n if (keysA.length != keysB.length) {\n console.log(\"Looks like they arenet the same length\");\n return false;\n }\n\n // for every key listed in keysA...\n for (let key of keysA) {\n // if key has no counterpart in keysB or...\n // a.key or b.key is a list that has no counterpart, return false\n if (!keysB.includes(key) || !deepEqual(a[key], b[key])) return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "3f0969b47933c5156476acb0bc63207c", "score": "0.5725391", "text": "function objectsEqual(firstObject, secondObject) {\n var firstKeys = Object.keys(firstObject).sort();\n var secondKeys = Object.keys(secondObject).sort();\n var i;\n\n for (i = 0; i < firstKeys.length; i += 1) {\n var firstKey = firstKeys[i];\n var secondKey = secondKeys[i];\n\n if (firstObject[firstKey] !== secondObject[secondKey] ||\n firstKey !== secondKey) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "6bbf651412c39a2fb18b067d98023771", "score": "0.5719615", "text": "function deepEqual(obj_1, obj_2) {\n // base case\n if(obj_1 === obj_2) return true;\n\n // return false if not object or null\n if(typeof obj_1 !== \"object\" || obj_1 === null ||\n typeof obj_2 !== \"object\" || obj_2 === null)\n return false;\n\n // compare lengths, return false if lengths are not equal at the end\n var aLength = 0;\n var bLength = 0;\n\n for(var keys in obj_1)\n aLength++;\n\n for(var keys in obj_2) {\n bLength++;\n\n // check if keys are the same\n if((keys in obj_1) === false) return false;\n\n // check properties now (via recursion)\n if(deepEqual(obj_1[keys], obj_2[keys]) === false) return false;\n }\n\n // check whether lengths are the same\n if(aLength !== bLength) return false;\n\n // if all conditions are met, return true\n return true;\n}", "title": "" }, { "docid": "ffc246f3fa72091b1822201261e2b3ea", "score": "0.5714263", "text": "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (areBothNaN(a, b))\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "600e9fa2f3b90b95904bc89c5a6fea8e", "score": "0.5701257", "text": "function objectsEqual(obj1, obj2) {\n if (obj1 === obj2) return true;\n\n let keys1 = Object.keys(obj1);\n let keys2 = Object.keys(obj2);\n let i;\n\n if (keys1.length !== keys2.length) return false;\n\n for (i = 0; i < keys1.length; i += 1) {\n if (obj1[keys1[i]] !== obj2[keys2[i]]) {\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "b09ad49c3eb156026e7d89f074d94058", "score": "0.5696177", "text": "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n var length, i, keys;\n\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;\n\n return true;\n } // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n\n\n var it;\n\n if (hasMap && a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n\n it = a.entries();\n\n while (!(i = it.next()).done) if (!equal(i.value[1], b.get(i.value[0]))) return false;\n\n return true;\n }\n\n if (hasSet && a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n\n return true;\n } // END: Modifications\n\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;\n\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; // END: fast-deep-equal\n // START: react-fast-compare\n // custom handling for DOM elements\n\n\n if (hasElementType && a instanceof Element) return false; // custom handling for React/Preact\n\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n continue;\n } // all other properties should be traversed as usual\n\n\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n } // END: react-fast-compare\n // START: fast-deep-equal\n\n\n return true;\n }\n\n return a !== a && b !== b;\n} // end fast-deep-equal", "title": "" }, { "docid": "df43d9ef5ea5f6ac716714811d0e515c", "score": "0.5695025", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a)\n var isObjectB = isObject(b)\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a)\n var isArrayB = Array.isArray(b)\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a)\n var keysB = Object.keys(b)\n return keysA.length === keysB.length && keysA.every(function(key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n return false\n }\n } catch (error) {\n return false\n }\n } else if (!isObject && !isObjectB) {\n return String(a) == String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "e7ca6f3678bad0d5190d4a5b7e1dcdfd", "score": "0.5686485", "text": "function object_key_check(object /*, key_1, key_2... */)\n {\n // First check if provided variable is object\n if (typeof object !== 'object') {\n return false;\n }\n\n // Get object keys and set current level\n var keys = Array.prototype.slice.call(arguments, 1);\n var current = object;\n\n // Iterate over keys\n for (var i = 0; i < keys.length; i++) {\n\n // Check if current key exists\n if (typeof current[keys[i]] === 'undefined') {\n return false;\n }\n\n // Check if all but last keys are for object\n if (i < (keys.length - 1) && typeof current[keys[i]] !== 'object') {\n return false;\n }\n\n // Go one step down\n current = current[keys[i]];\n }\n\n // If we reached this point all keys from path\n return true;\n }", "title": "" }, { "docid": "886214786def0d3ea2ee6a69aa3c73b2", "score": "0.5683514", "text": "function deepEqual(a, b) {\n if (a === b) return true;\n \n if (a == null || typeof a != \"object\" ||\n b == null || typeof b != \"object\") return false;\n \n let keysA = Object.keys(a), keysB = Object.keys(b);\n \n if (keysA.length != keysB.length) return false;\n \n for (let key of keysA) {\n if (!keysB.includes(key) || !deepEqual(a[key], b[key])){\n return false;\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "ce1bd4c20f9636cd99cffe25001f69de", "score": "0.56617695", "text": "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(a instanceof Date&&b instanceof Date){return a.getTime()===b.getTime();}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "title": "" }, { "docid": "9c859d6e9b6ae25866032e07b674b429", "score": "0.56588125", "text": "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "9c859d6e9b6ae25866032e07b674b429", "score": "0.56588125", "text": "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "9c859d6e9b6ae25866032e07b674b429", "score": "0.56588125", "text": "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "8ea1ca5a6201e4871b2f26253d80eb26", "score": "0.56498367", "text": "function looseEqual(a, b) { if (a === b) { return true; } var isObjectA = isObject(a); var isObjectB = isObject(b); if (isObjectA && isObjectB) { try { var isArrayA = Array.isArray(a); var isArrayB = Array.isArray(b); if (isArrayA && isArrayB) { return a.length === b.length && a.every(function (e, i) { return looseEqual(e, b[i]); }); } else if (_instanceof(a, Date) && _instanceof(b, Date)) { return a.getTime() === b.getTime(); } else if (!isArrayA && !isArrayB) { var keysA = Object.keys(a); var keysB = Object.keys(b); return keysA.length === keysB.length && keysA.every(function (key) { return looseEqual(a[key], b[key]); }); } else {/* istanbul ignore next */return false; } } catch (e) {/* istanbul ignore next */return false; } } else if (!isObjectA && !isObjectB) { return String(a) === String(b); } else { return false; } }", "title": "" }, { "docid": "a0bee319ce507517c3d07dc528cd47d1", "score": "0.56374276", "text": "function deepEqual (value1, value2) {\n if (value1 === value2) {\n return true\n } else if (typeof value1 === 'object' && typeof value2 === 'object' && value1 != null && value2 != null) {\n return Object.keys(value1).filter((key) => Object.keys(value2).includes(key)).every((key) => {\n return deepEqual(value1[key], value2[key])\n })\n }\n return false\n}", "title": "" }, { "docid": "1f2a695727aa3f6f3de9ca22ed12c506", "score": "0.5637349", "text": "isAllKeysInObject(arr, obj) {\r\n\t\t \tfor (let key in arr) {\r\n\t\t \t\tif (!obj.hasOwnProperty(arr[key])) {\r\n\t\t \t\t\treturn false;\r\n\t\t \t\t}\r\n\t\t \t}\r\n\r\n\t\t \treturn true;\r\n\t\t }", "title": "" }, { "docid": "b9323fb18e267d0a447a2bf394492844", "score": "0.56370306", "text": "allKeysMatch() {\n const { cursors } = this;\n // Note that result is true if only one cursor, so start comparison\n // from second position.\n for( let i = 1; i < cursors.length; i++ ) {\n if( cursors[i].primaryKey != cursors[i - 1].primaryKey ) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "754f63061846005921fe3b5b6b9f5f23", "score": "0.5624461", "text": "function isEqual(a, b) {\n var i;\n\n if (a === b) {\n return true;\n } else if (isArray(a) && isArray(b) && a.length === b.length) {\n for (i = 0; i < a.length; i++) {\n if (!isEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n } else if (isObject(a) && isObject(b) && !isArray(a) && !isArray(b)) {\n var akeys = Object.keys(a);\n var bkeys = Object.keys(b);\n if (!isEqual(akeys, bkeys)) {\n return false;\n }\n\n for (i = 0; i < akeys.length; i++) {\n if (!isEqual(a[akeys[i]], b[akeys[i]])) {\n return false;\n }\n }\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "433084b3b277b51a08634ce675e9d590", "score": "0.5617875", "text": "function matching_pair(object1, object2){\r\n\tvar keys = Object.keys(object1);\r\n\tfor (var i = 0; i < keys.length; i++){\r\n\t\tif (object1[keys[i]] == object2[keys[i]]){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "7d791f10ee9200865b02038b6ae2233e", "score": "0.56174254", "text": "function equalTo() {\n for (let key in tests.equal_to) {\n if (key !== input) {\n return tests.equal_to[key];\n }\n }\n }", "title": "" }, { "docid": "03c838a3c57da44ad80008ea157e1f0c", "score": "0.56170344", "text": "function shallowCompare(from, to) {\n return Object.keys(from).every(function (key) { return from[key] === to[key]; });\n }", "title": "" }, { "docid": "7cd89a1dae782442108e7457c085f2ea", "score": "0.5595395", "text": "function ShallowEquals(objA, objB) {\n if (Object.is(objA, objB))\n return true;\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null)\n return false;\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length)\n return false;\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]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" }, { "docid": "86d27b7e8b3a80be028eda26f842db5d", "score": "0.5591354", "text": "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "title": "" } ]
4070afe359df5a7aef9c9267c8643075
The render is only returning if there is any event in the state. If there isn't, it returns null but, every time the state is changed (e.g. the promise is treated and the events are set in the state), the render runs again
[ { "docid": "8f1fac7a34ddd15dfaf4abd27b81fbfa", "score": "0.6557522", "text": "render () {\n if(this.state.events.length >0){\n return (\n <EventListPrinter\n events={this.state.events}\n navigator={this.props.screenProps.rootNavigation}/>\n )\n } else {\n return null;\n }\n }", "title": "" } ]
[ { "docid": "472794e908d8224177409573e244eb06", "score": "0.6053929", "text": "componentDidMount () {\n getEvents().then((e) => {\n this.setState({\n events: e\n })\n });\n }", "title": "" }, { "docid": "ab0df22ef589912b4f9c2d5669fe7e2c", "score": "0.6037762", "text": "render() {\n return (\n <div>\n {\n // Only Frist time, Bring All tag names from server\n !this.state.isTagNames\n ? (<Query query={this.TAGNAMES_REQUEST_QUERY}\n onCompleted={data => {\n const alignTags = data.tagNames.tags.sort(\n function(a, b) {\n return b.events.length - a.events.length;\n });\n this.setState({\n isTagNames: true,\n allTags: alignTags,\n });\n }}>\n {({loading, error, data}) => {\n if (loading) return 'Loading...';\n if (error) return this.props.history.push('/error');\n return <div/>;\n }}\n </Query>)\n : (<Grid container justify=\"space-between\"\n style={{padding: '2% 5% 0 5%'}}>\n <Grid item xs={12}>\n <EventlistFilters filterNames={this.state.allTags}\n onCreate={this.HandlerTagName}/>\n </Grid>\n <Grid item xs={12}>\n <EventCardsQuery pageSize={this.eventListPageSize}\n isRecommended={false}\n selectedTagIds={this.state.selectedTagIds}\n />\n </Grid>\n </Grid>)\n }\n </div>\n );\n }", "title": "" }, { "docid": "4ea2a361ed91262b93043d9d12b87144", "score": "0.60150707", "text": "componentDidMount() {\n var self = this;\n eventService.getEvents(this.state.date).then(function (result) {\n self.setState({ events: result.data})\n self.setState({show:true})\n }).catch(function (error){\n if (error.response){\n if(error.response.status===404){\n self.setState({show:false})\n var text=\"You have no events on selected date to display.\";\n NotificationManager.info(text);\n }\n\n }\n\n });\n\n }", "title": "" }, { "docid": "1abde8d9c7096f0672fe7dc73b2f6cb8", "score": "0.6014575", "text": "render(){\n const context = {\n otherMembers: this.state.members,\n name: this.state.name,\n skiArena: this.state.skiArena,\n owner: this.eventData.owner,\n isOwner: this.state.isOwner,\n isPrivate: this.state.isPrivate,\n description: this.state.description,\n addMember: this.toggleAddMemberModal,\n username: this.context.user.username,\n deleteUser: this.deleteUser,\n startDate: this.state.startDate,\n endDate: this.state.endDate,\n updateEventData: this.updateEventData\n }\n return(\n this.state.isLoading ? <Loader /> :\n (!this.state.eventFound) ?\n (<Page404 />\n ) : (\n <AppContext.Provider value={context}>\n <EventHeader />\n <Members \n title='Wezmą udział:'\n />\n <SmallIconButton\n type='fixed'\n onClick={this.toggleSettings}\n ><FiSettings /></SmallIconButton>\n {this.state.isAddMemberOpen && <Modal eventId={this.eventData.id} closeModalFn={this.toggleAddMemberModal} render={AddUser} />}\n {this.state.isMenuOpen && <ContextMenu items={this.availableSettings} onClick={this.toggleSettings} />}\n </AppContext.Provider>\n ))\n }", "title": "" }, { "docid": "7a0bd3daa31d92a4b0b18a1f69fe6bbc", "score": "0.593218", "text": "getRenderFromState() {\n if (this.state &&\n (this.state.requirementList || this.state.getRequirementsByProjectId) &&\n (this.state.clockedTime || this.state.getTime)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a839d97b7985edba16b9bcefb3730ae0", "score": "0.5928007", "text": "componentDidMount(){\n console.log('mounting the event view');\n this.addListeners();\n console.log(this.state.event);\n this.refreshView();\n }", "title": "" }, { "docid": "c309526e04cf3962d537823cf8e6dd06", "score": "0.57611984", "text": "render() {\n return (this.props.ready && this.props.groupsReady && this.props.hangoutsReady && this.props.attendeesReady) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "0623a122f49f16ed8da25a996e352f40", "score": "0.5746741", "text": "render() {\n return(\n <div>\n <SearchForm\n eventSearch={this.state.eventSearch}\n handleFormSubmit={this.handleFormSubmit}\n handleInputChange={this.handleInputChange}\n />\n <EventSearchResultContainer\n eventData={this.state.eventData} />\n </div>\n \n );\n }", "title": "" }, { "docid": "fcf9e7703e3e1019e858096eebebdb01", "score": "0.5690144", "text": "render() {\n return(\n <div>\n Events\n </div>\n );\n }", "title": "" }, { "docid": "123b0c593b379ea0e5dcfa9f5b08976d", "score": "0.56526476", "text": "render() {\n return this.props.ready ? (\n this.renderComponent()\n ) : (\n <Loader active>Getting data</Loader>\n );\n }", "title": "" }, { "docid": "fdc8c62ad40caed8007d7ead58099e89", "score": "0.56213397", "text": "selectRender(){\n switch(this.props.pickState){\n case PICKABLE:\n return this.renderPickable();\n case ONGOING:\n return this.renderOngoing();\n case COMPLETED:\n return this.renderCompleted();\n default:\n return null;\n }\n }", "title": "" }, { "docid": "d1423dfb8f951ba6624841f2b53cd405", "score": "0.5588535", "text": "render() {\n return (this.state.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "61478a9a5382356fae1c6c0889f49f0c", "score": "0.5584277", "text": "renderEvents(event) {\n var handle = event.handle.slice(1, event.handle.length);\n if(selectedTruck == event.name){\n return <div onClick={ this.handleClick.bind(this, event) } className=\"selected event-item\"><Link to={\"/eventview/\" + handle} key={event._id} > <EventItem event={event} /></Link></div>\n } else {\n return <div key={event._id} onClick={ this.handleClick.bind(this, event) } className=\"not-selected event-item\"><Link to={\"/eventview/\" + handle} key={event._id} > <EventItem event={event} /></Link></div>\n }\n }", "title": "" }, { "docid": "db221ca8351997e60111c4be473e5057", "score": "0.5576943", "text": "render() {\n return (\n <div>\n <h1>Re-vents</h1>\n </div>\n );\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "48f5718880a6bf344d311cfa2bafbb7d", "score": "0.55689025", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "title": "" }, { "docid": "4120af5c7e6f4c487519895dfbb80804", "score": "0.5560645", "text": "function refetchEvents() { // can be called as an API method\n\t\tfetchAndRenderEvents();\n\t}", "title": "" }, { "docid": "4120af5c7e6f4c487519895dfbb80804", "score": "0.5560645", "text": "function refetchEvents() { // can be called as an API method\n\t\tfetchAndRenderEvents();\n\t}", "title": "" }, { "docid": "74c7bd0881d9793f3388f67cc1cc6b7e", "score": "0.55485046", "text": "render() {\n\n var edit_id = this.props.survey.edit_id;\n\n var surveyRender = !this.state.isCompleted ? (\n <Survey.Survey\n json={this.props.survey.json}\n showCompletedPage={false}\n onComplete={(e) => this.onCompleteComponent(e, edit_id)}\n />\n ) : null;\n var onCompleteComponent = this.state.isCompleted ? (\n <div>{/*The component after onComplete event*/}</div>\n ) : null;\n return (\n <div>\n {surveyRender}\n {onCompleteComponent}\n </div>\n );\n\n }", "title": "" }, { "docid": "ec42d76ea8f99650c132a2e78aa11426", "score": "0.5519072", "text": "flaggedEmailsViewRender() {\n if (this.props.emails.isFetchingEmail && this.props.emails.emailsArray.length === 0) {\n this.loadingViewRender();\n } else {\n return (\n <div>\n <h1 style={{paddingTop:'60px', textAlign:'center'}}>You Have {this.props.emails.emailsArray.length} New Alerts</h1>\n <FlaggedEmailList\n state={ this.props.emails }\n callbacks={ this.callbacks }\n userSession={ this.props.userSession }\n />\n </div>\n );\n }\n }", "title": "" }, { "docid": "4e7586d52f50f5a6f46698bc514dfe00", "score": "0.55109227", "text": "componentDidMount() {\n this.props.getAvailableEvents()\n }", "title": "" }, { "docid": "10582064ea162c1faa3465e8622b633a", "score": "0.5508543", "text": "render() {\n return (\n <div>\n <h2>Scoreboard</h2>\n <StatusMessages ref={this.statusMessages}></StatusMessages>\n\n <div className=\"grid\">\n {this.generateBoard()}\n </div>\n {(!this.eventLive) ? <h4 id=\"no-event\">No Active Event</h4> : null}\n </div>\n );\n }", "title": "" }, { "docid": "0d8094df0f0846ed4bcb357a2d1a5de8", "score": "0.54830134", "text": "render() {\n\n var dataFetched = this.state.dataFetched;\n return (\n <div>\n <button onClick={()=>{console.log(this.state)}}>console log state</button>\n <Header />\n <Nav />\n {dataFetched ? <PendingConnectionsView users={this.state.pendingConnectionsIncoming} /> : ''}\n {dataFetched ? <SuggestedConnectionsView users={this.state.suggestedConnections} /> : ''}\n\n\n {/*{dataFetched ? <SuggestedConnectionsView user={this.state} />: ''}\n\n {console.log('this.state.dataFetched: ', this.state.dataFetched)}*/}\n {/*<button onClick={()=>{console.log(this.state)}}>console log state</button>*/}\n </div>\n )\n }", "title": "" }, { "docid": "6cba9ba62f53de3d3b593a5eb8df3872", "score": "0.5482337", "text": "componentDidMount() {\n this.fetchEvents();\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bd9d690344373207c32c364076c9640d", "score": "0.5474215", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "d26f0fc68d20596620a23e00146c376e", "score": "0.5470434", "text": "componentDidMount() {\n this.props.requestEvents();\n }", "title": "" }, { "docid": "fae6b3617db67915bb937d8a1a8d8d3f", "score": "0.54641247", "text": "render() {\n return (this.props.ready) ? this.renderPage(this.getStores()) : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "776ad1bede3c924c4aa5949e6b3f2e7e", "score": "0.54610246", "text": "componentDidMount(){\r\n axios.get(backend+'/events')\r\n .then((response) => {\r\n console.log(\"in events\");\r\n console.log(response.data);\r\n //update the state with the response data\r\n this.setState({\r\n events : this.state.response.data\r\n });\r\n });\r\n }", "title": "" }, { "docid": "81c2ba720b91e3129518e6c3726df81f", "score": "0.5460904", "text": "renderPromise() {\n return PromiseHelpers.makePromise(this, 'renderStateClean', null, null, SmoConfig.demonPollTime);\n }", "title": "" }, { "docid": "e84cf4d6de64e984270349e054703ec3", "score": "0.5448909", "text": "function refetchEvents() { // can be called as an API method\n clearEvents();\n fetchAndRenderEvents();\n }", "title": "" }, { "docid": "a6126fb1244742dad789be7b7528fb3c", "score": "0.54447275", "text": "render() {\n\t\t// inject new state into 'sub' prop of SubscribeToState's HOC children\n\t\tthis.observable.emitEvent(APP_STATE_CHANGED, this.state);\n\t}", "title": "" }, { "docid": "b811316c3e8080f8b5bc8cde6a025381", "score": "0.54403985", "text": "componentDidMount() {\r\n this.getEvents();\r\n }", "title": "" }, { "docid": "67ddc65325088aba69c28f6c817a5579", "score": "0.54384816", "text": "render() {\n return (this.props.ready) ? this.renderPage() : (\n <Container>\n <Loader text='Getting data'/>\n </Container>\n );\n }", "title": "" }, { "docid": "0e95859d7ff488539cc890412a585ab1", "score": "0.54318696", "text": "render() {\n return (this.props.ready) ? this.renderPage() : <Loader inverted active>Getting data</Loader>;\n }", "title": "" }, { "docid": "e1d7d20bb85827e07331e2f13e039079", "score": "0.542778", "text": "render() {\n if (!this.state.hasSubmittedQuiz) {\n const question = this.state.question\n return (\n <div id={question.id}>\n <Prompt prompt={question.prompt} />\n <Answers\n answers={question.answers}\n handleClick={this.handleClick}\n handleSubmit={this.handleSubmit}\n />\n </div>\n )\n } else if (this.state.hasSubmittedQuiz && this.state.hasSubmittedTopics) {\n return (\n <SourcesMenu\n handleClick={this.handleClick}\n handleChange={this.handleChange}\n sourceNames={this.state.sourceNames}\n sources={this.state.sources}\n />\n )\n } else {\n return <Topics handleClick={this.handleClick} />\n }\n }", "title": "" }, { "docid": "ae2f4297e52eae6cd5e7b400cf325be8", "score": "0.5424044", "text": "render() {\n\t\tconst { name, description, time} = this.state.event;\n\t\tconst eventId = this.props.match.params.id;\n\t\tconst bars = this.state.bars.map((bar) => {\n\n\t\t\treturn (\n\t\t\t\t<Link to={`/events/${eventId}/bars/${bar.id}`} key={bar.id} >{bar.name}<br /></Link>\n\t\t\t)\n\t\t})\n\t\tconst attendees = this.state.attendees.map((user, i) => {\n\t\t\tconsole.log(user)\n\t\t\tconsole.log(user.image);\n\t\t\treturn <img src={user.image} key={i} title={user.name}/>\n\t\t})\n\n\t\tattendees.unshift(<img src={this.state.ownerImage} title={this.state.ownerName}/>)\n\n\t\tif (this.state.deleted) {\n\t\t\treturn <Redirect to={'/events'} />\n\t\t}\n\n\t\treturn (\n\t\t\t<main>\n\t\t\t<div className=\"single-event-container\">\n\t\t\t<h1>{name}</h1>\n\t\t\t<div className=\"single-event\">\n\t\t\t\t<div className=\"event-info\">\n\n\t\t\t\t\t<h4>Description:</h4>\n\t\t\t\t\t<p>{description}</p>\n\t\t\t\t\t<h4>Start Time:</h4>\n\t\t\t\t\t{/* <p>{time}</p> */}\n <p><em>{moment(time).format('dddd, MMMM Do, YYYY')}</em></p>\n {/* <p><em>{moment(time).format('@ h:mm a')}</em></p> */}\n\t\t\t\t\t<p><em>{moment.parseZone(time).format('@ h:mm a ')}</em></p>\n\t\t\t\t\t{Number(this.props.user.id) === this.state.ownerId && <button onClick={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tthis.deleteEvent(eventId);\n\t\t\t\t\t}} > Delete This Event </button>}\n\t\t\t\t\t{Number(this.props.user.id) === this.state.ownerId && <Link to={`/events/${eventId}/edit`} {...this.props}><button>Edit Event</button> </Link>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"bar-info\">\n\t\t\t\t\t<h4>Bars:</h4>\n\t\t\t\t\t<p>{bars}</p>\n\t\t\t\t\t{Number(this.props.user.id) === this.state.ownerId && <Link to={`/events/${eventId}/addBar`} {...this.props}><button>Add Bars</button> </Link>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"attendees-info\">\n\t\t\t\t\t<h4>Attending:</h4>\n\t\t\t\t\t<div className=\"attendees\">{attendees}</div>\n\t\t\t\t\t{Number(this.props.user.id) === this.state.ownerId &&<Link to={`/events/${eventId}/user-search`} {...this.props} ><button>Add Users</button> </Link>}\n\t\t\t\t\t{Number(this.props.user.id) === this.state.ownerId &&<Link to={`/events/${eventId}/user-delete`} {...this.props} ><button>Remove Users</button> </Link>}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t\t<EventsBar {...this.props} />\n\t\t</main>\n\t\t);\n\t}", "title": "" }, { "docid": "bfb7e8249c97ff3f43286621fe2d4984", "score": "0.5419031", "text": "_joinEvent() {\n if(this.state.request){\n Object.values(this.state.request).map((request,i) =>{\n //console.log(request);\n //console.log(JSON.stringify(request) +'index = '+ i);\n if (request.event_name == this.state.postEventName && request.user_id == firebase.auth().currentUser.uid ){\n Alert.alert(\"You have already sent a request!\");\n return this.setState({exists: true})\n }\n })\n\n }\n if(this.state.exists == false)\n {\n Alert.alert(\"Join Event?\", this.props.profile.username +\"\\n\"+\"are you sure you want to join\\n\" + this.state.postEventName +\"?\",\n [\n {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},\n {text: 'Continue', onPress: () => this._sendRequest(this.props.auth.uid)},\n ],\n { cancelable: true })\n }\n }", "title": "" }, { "docid": "cfc41739faedb6a849be84cac3a81aea", "score": "0.53814363", "text": "renderContent() {\n\t\tswitch (this.props.user) {\n\t\t\tcase null:\n\t\t\t\treturn <div>Waiting</div>; // show nothing while the state is unknown\n\t\t\tcase false:\n\t\t\t\treturn (\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"/auth/google\">Login</a>\n\t\t\t\t\t</li>\n\t\t\t\t); // state is known, and it's empty\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"/api/logout\">Logout</a>\n\t\t\t\t\t</li>\n\t\t\t\t); // state returned true\n\t\t}\n\t}", "title": "" }, { "docid": "0c6d40805c62a84984b0f7778d369e19", "score": "0.53661376", "text": "componentDidMount() {\n this.props.retrieveEvents()\n }", "title": "" }, { "docid": "638bff27479226d00843b9046e706dc2", "score": "0.5363935", "text": "updatePromise() {\n return PromiseHelpers.makePromise(this, 'renderStateRendered', null, null, SmoConfig.demonPollTime);\n }", "title": "" }, { "docid": "0212332493924f370956916c11e3d35c", "score": "0.53565824", "text": "componentDidMount() {\n this.loadNextEvent();\n console.log();\n }", "title": "" }, { "docid": "7902ce813e68ac841ae1c0107b6758b5", "score": "0.5340985", "text": "render() {\n if (this.state.editing) {\n return this.renderForm();\n } else {\n return this.renderDisplay();\n }\n }", "title": "" }, { "docid": "635e584ff7863aa9c1a3b52c86fe5691", "score": "0.53307277", "text": "render() {\n // console.log(Teams.dumpAll());\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "635e584ff7863aa9c1a3b52c86fe5691", "score": "0.53307277", "text": "render() {\n // console.log(Teams.dumpAll());\n return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "1178ba1e1e7032a2679eab9b0bc030a6", "score": "0.53299963", "text": "render() {\n console.log(this.state.joinedUsers)\n if (this.state.users[0]) {\n return (\n\n <div className=\"day-range-grid\">\n <div>\n {this.state.users[0].first_name + ' ' + this.state.users[0].last_name}'s Poll\n </div>\n <div>\n {this.mappedMeetingRange()}\n </div>\n </div>\n )\n } else {\n return <div>LOADING...</div>\n }\n }", "title": "" }, { "docid": "69cac6c9c656ccfef6698020279c2bc4", "score": "0.5316527", "text": "render() {\n console.log('in documentInsert_edit_modal, render this.state.editDocumentInsertCompleted, this.props.agreementId: ', this.state.editDocumentInsertCompleted, this.props.agreementId);\n return (\n <div>\n {this.state.editDocumentInsertCompleted ? this.renderPostEditDeleteMessage() : this.renderEditDocumentForm()}\n </div>\n );\n }", "title": "" }, { "docid": "4acc34f821910f42d3d3a9cb41d90455", "score": "0.5303149", "text": "render() {\n return (this.props.ready) ? this.security() : <Loader active>Getting data</Loader>;\n }", "title": "" }, { "docid": "bb6434d011af31a97a4338085dff3819", "score": "0.52944076", "text": "render() {\r\n const {date, eventId, starTime, endTime, location, eventTitle, handleMouseEnterToItem, handleShow, interest} = this.props;\r\n const istoday = moment().format(\"YYYY-MM-DD\") === date.format(\"YYYY-MM-DD\");\r\n const diff = moment.duration(date.diff(moment())).asHours() < 0;\r\n const isfutureday = moment.duration(date.diff(moment())).asHours() > 0;\r\n console.log(`EventItem-template ${istoday && 'isToday'}` +\r\n (diff & !istoday ? ' isPastday' : (isfutureday ? ' isFutureday' : ' nono')));\r\n\r\n return(\r\n <div className = {`EventItem-template ${istoday && 'isToday'}` +\r\n (diff & !istoday ? ' isPastday' : (isfutureday ? ' isFutureday' : ' nono'))} onMouseOver = {() => handleMouseEnterToItem(eventId)} onClick = {() => handleShow(eventId, interest)}>\r\n <div className = {`EventItem-time ${interest && 'isInterest'}`}>\r\n {starTime.substring(0,5)} - {endTime.substring(0,5)}\r\n </div>\r\n <div className = \"EvnetItem-location\">\r\n {location}\r\n </div>\r\n <div className = \"EventItem-title\">\r\n {eventTitle}\r\n </div>\r\n\r\n </div>\r\n );\r\n }", "title": "" }, { "docid": "582f3fda43883b008bc4045910ecced4", "score": "0.5290583", "text": "function renderEvents(){\n renderAllDayEvents();\n renderTimedEvents();\n}", "title": "" }, { "docid": "6ae0a2324f5d0f5c1cbe6b99f319f370", "score": "0.5277728", "text": "componentWillReceiveProps(nextProps) {\n fetch(baseURL + '/events/createdBy/' + this.props.user.email)\n .then((response) => response.json())\n .then((responseJson) => {\n //console.log('active events are =========>', responseJson);\n //this.props.saveCreatedEvents(responseJson);\n this.setState({ activeEventsByCreator: responseJson });\n })\n .then(() => {\n return fetch(`${baseURL}/events/${this.props.user.id}`);\n })\n .then((response) => response.json())\n .then((responseJson) => {\n this.setState({ invitedEventsByParticipantId: responseJson });\n })\n .catch((error) => {\n console.error(error);\n });\n }", "title": "" }, { "docid": "f737e0d318aa477c8948d082f5f26e32", "score": "0.52748096", "text": "render() {\n return (this.props.ready && this.props.ready2 && this.props.ready3) ? this.renderPage() : <Loader active>\n Getting data\n </Loader>;\n }", "title": "" }, { "docid": "8a8374917cbe7f452b1f4ea08e1993a6", "score": "0.52698916", "text": "renderedCallback() {\n console.log('Executing renderedCallback');\n \n if(this.isRendered){\n return;\n }\n \n athleteList()\n .then(result => {\n console.log(' athleteList success');\n this.renderSports(result);\n this.isRendered = true;\n })\n .catch(error => {\n console.log(' athleteList error');\n let myTitle = `Error loading athletes`;\n let myMessage = `Please reload or contact the administrator `;\n this.triggerToast(myTitle,myMessage,'error');\n this.error = error;\n });\n \n }", "title": "" }, { "docid": "7f67b0050a2b1a49795ecf740defa9e3", "score": "0.52472186", "text": "componentDidMount() {\n\n\t\tAPI.findEventById(this.state.eventId)\n\t\t\t.then((data) => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tevent: data.data\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((err) => console.log(err));\n\n\t\tAPI.findUserEventByUserIdEventId(this.state.userId, this.state.eventId)\n\t\t\t.then((res) => {\n\t\t\t\tif (res.data) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tattend: true,\n\t\t\t\t\t\ttext: 'Attending'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (!res.data) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tattend: false,\n\t\t\t\t\t\ttext: 'Attend'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch((err) => console.log(err));\n\t}", "title": "" }, { "docid": "86f473a8d47ca83576304a80ffa27b75", "score": "0.5242522", "text": "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "title": "" }, { "docid": "86f473a8d47ca83576304a80ffa27b75", "score": "0.5242522", "text": "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "title": "" }, { "docid": "86f473a8d47ca83576304a80ffa27b75", "score": "0.5242522", "text": "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "title": "" }, { "docid": "86f473a8d47ca83576304a80ffa27b75", "score": "0.5242522", "text": "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "title": "" }, { "docid": "9e1e24dd352551e609f25ef2101de31e", "score": "0.52363414", "text": "function refetchEvents() { // can be called as an API method\r\n\t\tclearEvents();\r\n\t\tfetchAndRenderEvents();\r\n\t}", "title": "" }, { "docid": "9e1e24dd352551e609f25ef2101de31e", "score": "0.52363414", "text": "function refetchEvents() { // can be called as an API method\r\n\t\tclearEvents();\r\n\t\tfetchAndRenderEvents();\r\n\t}", "title": "" }, { "docid": "3eca2687fc503539e857b5a804316151", "score": "0.5236324", "text": "render() {\n let currentlyVisibleContent = null;\n if (this.state.formVisibleOnPage) {\n currentlyVisibleContent = <NewTicketForm onNewTicketCreation={this.props.onNewTicketCreation}/>;\n } else {\n currentlyVisibleContent = <ConfirmationQuestions onTroubleshootingConfirmation={this.handleTroubleshootingConfirmation} />;\n }\n return (\n <div>\n {currentlyVisibleContent}\n </div>\n );\n }", "title": "" }, { "docid": "7d89f42146a6d4c663ace392c25a8f7d", "score": "0.523074", "text": "fetchEvents({commit, dispatch}, payload = {}) {\n\n // Set loading is true\n commit('setEventLoading', payload.themeOption.loadingColor)\n\n // Setup header for list view\n commit('setEventListHeader', {trans: payload.trans})\n\n\n const params = fn.generateParams(payload)\n const URL = `/api/events${params}`\n\n axios.get(URL).then((response) => {\n if (response.data.events) {\n commit('setEvents', response.data.events)\n commit('setTotalEvents', response.data.total)\n commit('setEventLoading', false)\n }\n }).catch(error => {\n dispatch('initializeError', error)\n })\n }", "title": "" }, { "docid": "daf600d0629a40355f35b9bd1be2cc53", "score": "0.5230012", "text": "function renderEvents(events) {\n events.forEach(e => {\n renderEvent(e)\n });\n}", "title": "" }, { "docid": "06dcbee545758341f1da1e7c44a0625b", "score": "0.52218986", "text": "function renderNextState(e) {\n e = ((e != null) ? e : EVENT_NEXT);\n //console.log(\"Next state call \" + e + \":\" + (new Date().getSeconds()));\n\n if (rendering_state == STATE_INIT) {\n //console.log(\"Init \" + (new Date().getSeconds()));\n byId('btn-verify').disabled = true;\n byId('btn-verify').className = 'verify button disabled';\n showStatus(false);\n showProgressBar(true);\n byId('pgb-verify').style.width='0%';\n rendering_state = STATE_BUSY;\n rendering_timer = setTimeout(renderNextState, 100);\n verification_timer = setTimeout(verification_callback, 100);\n return;\n }\n\n if (e < EVENT_BUSY || e == EVENT_ERR) {\n //console.log(\"We have answer \" + (new Date().getSeconds()));\n clearInterval(verification_timer);\n clearTimeout(rendering_timer);\n verification_status = e;\n document.getElementById('pgb-verify').style.width = '100%';\n rendering_state = STATE_COMPLETED;\n rendering_Timer = setTimeout(renderNextState, 1500);\n return;\n }\n\n if (rendering_state == STATE_BUSY) {\n //console.log(\"Still busy \" + (new Date().getSeconds()));\n var pgb = document.getElementById('pgb-verify');\n var width = parseInt(pgb.style.width);\n if (width < 90) {\n width += 1;\n }\n pgb.style.width = width + '%';\n rendering_timer = setTimeout(renderNextState, 100);\n return;\n }\n\n if (rendering_state == STATE_COMPLETED) {\n //console.log(\"Completed \" + (new Date().getSeconds())); \n renderAll();\n byId('btn-verify').disabled = false;\n byId('btn-verify').className = 'verify button'; \n rendering_state = STATE_NONE;\n return;\n }\n}", "title": "" }, { "docid": "717f9e3a8f208ae8721ed9e52b21b4fe", "score": "0.5221437", "text": "preRender() {\n return Promise.resolve(this);\n }", "title": "" }, { "docid": "0edde0ff35f27c9e2e0f4cc205c8f642", "score": "0.5212382", "text": "renderResultsContainer() {\n if (this.state.showingResult) { //if we want to see results\n return (\n <View>\n <View>{this.renderSearchResults()}</View>\n </View>\n );\n } else {//if we are not ready to see results\n return <View></View>;\n }\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.5202412", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.5202412", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.5202412", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.5202412", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.5202412", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "80c8ff312f6fa2a13500efd18019ba7b", "score": "0.5200736", "text": "postRender() {\n return Promise.resolve(this);\n }", "title": "" } ]
c0b1ec02e31f969a6f8ac45707bb031c
route middleware to ensure user is logged in
[ { "docid": "31934b2b9f8fad85d1a4b5fe2f439701", "score": "0.0", "text": "function isLoggedIn(req, res, next) {\n const apiError = new APIError({\n message: \"Unauthorized\",\n status: httpStatus.UNAUTHORIZED,\n stack: undefined\n })\n\n if (req.isAuthenticated()) return next()\n\n return next(apiError)\n}", "title": "" } ]
[ { "docid": "63ded34f1474a5504ccec949d247bff1", "score": "0.7949742", "text": "function isLoggedIn(req, res, next) {\n if(req.isAuthenticated()) {//is there a cookie that can be verified?\n return next() //go on the next route, allow the action\n } else { //if not verified\n res.redirect('/')\n }\n}", "title": "" }, { "docid": "849cf85f18fd0bef355317d5c1358e11", "score": "0.788337", "text": "function isLoggedIn(request, response, next) {\n if(request.isAuthenticated()) {\n console.log('user is authenticated');\n next();\n } else {\n console.log('not authenticated');\n response.redirect('/');\n }\n }", "title": "" }, { "docid": "7e8eb7a1d67cc02f2585b84da16d01a9", "score": "0.78777814", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()) return next();\n else res.redirect('/');\n}", "title": "" }, { "docid": "faa9915f10efbb148d09c7cf2e03f64b", "score": "0.78251314", "text": "function isLoggedIn(req, res, next){\n \n //isAuthenticated comes with passport. \n \n if (req.isAuthenticated()){\n //proceed with code inside the route\n return next();\n }\n \n res.send(\"Not logged in!!\");\n \n}", "title": "" }, { "docid": "b44edd1793b9a31dfee7843136d2e49d", "score": "0.7807173", "text": "function isLoggedIn(request, response, next) {\n\n // if user is authenticated in the session, carry on \n if (request.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n response.redirect('/');\n}", "title": "" }, { "docid": "d26051da959c6ae9d4cd9c5977a4b99e", "score": "0.7802435", "text": "function isLoggedIn(req, res, next) {\r\n if (req.isAuthenticated())\r\n return next();\r\n res.redirect('/');\r\n}", "title": "" }, { "docid": "404d7a91e269c4a7a6188dd9a4010754", "score": "0.77906954", "text": "function isLoggedIn(req, res, next){\n if (req.isAuthenticated()){\n return next();\n }\n return res.redirect('/');\n }", "title": "" }, { "docid": "099f15f9aed4295778e3ad42c04af2ae", "score": "0.77862716", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n // if logged in, proceed to route\n return next();\n }\n // else redirect to login\n res.redirect('/login');\n}", "title": "" }, { "docid": "5e7742cc5e12aa53f6a30e06cff315c5", "score": "0.77804863", "text": "function isLoggedIn(request, response, next) {\n if(request.isAuthenticated()){\n return next();\n }\n\n response.redirect('/login');\n}", "title": "" }, { "docid": "c7d774c6f732eee9481c1d161a4b4276", "score": "0.77715355", "text": "function isLoggedIn(req, res, next) {\r\n if (req.isAuthenticated())\r\n return next();\r\n return res.redirect('/');\r\n}", "title": "" }, { "docid": "f114b17a6ecdb847fa19defb91fef40f", "score": "0.7755749", "text": "function isLoggedIn(req, res, next) {\n console.log('prework loggin')\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "78563f9cf16db125e8ba8c6646782a65", "score": "0.7755571", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/signin');\n }", "title": "" }, { "docid": "78563f9cf16db125e8ba8c6646782a65", "score": "0.7755571", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/signin');\n }", "title": "" }, { "docid": "b5b253a9dc8e4aef97940545337d026b", "score": "0.7754914", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) return next();\n res.redirect('/');\n }", "title": "" }, { "docid": "cb60d5e8fac0eb1ebcba0e173d2d6e77", "score": "0.7747805", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n }", "title": "" }, { "docid": "41a0126d902fa722a5fa2a16017a6f46", "score": "0.7737005", "text": "function loggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next() // return next \n }\n res.redirect('/login') // redirects anon user who tries to access the create, edit delete page\n }", "title": "" }, { "docid": "41a0126d902fa722a5fa2a16017a6f46", "score": "0.7737005", "text": "function loggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next() // return next \n }\n res.redirect('/login') // redirects anon user who tries to access the create, edit delete page\n }", "title": "" }, { "docid": "35a3ca677b83cda8c07edf8843a6e18d", "score": "0.7719187", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n\n}", "title": "" }, { "docid": "459ad9b0f9c32ab2e4f0a65c53086f20", "score": "0.77154326", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n}", "title": "" }, { "docid": "459ad9b0f9c32ab2e4f0a65c53086f20", "score": "0.77154326", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n}", "title": "" }, { "docid": "459ad9b0f9c32ab2e4f0a65c53086f20", "score": "0.77154326", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n}", "title": "" }, { "docid": "459ad9b0f9c32ab2e4f0a65c53086f20", "score": "0.77154326", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n}", "title": "" }, { "docid": "7dbd4e6f5df47f71f667887d1caa1579", "score": "0.7714458", "text": "function isLoggedIn(req, res, next){\r\n\tif(req.isAuthenticated())\r\n\t\t{next();}\r\n else{\r\n\tres.redirect('/');\r\n}\r\n}", "title": "" }, { "docid": "798a9e274a6c0784f61ab9cba061702a", "score": "0.77111095", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n } \n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "9c8e187bb89e63aa0b68f650d7316b13", "score": "0.7709735", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/'); \n}", "title": "" }, { "docid": "11c9b7168e35b2d2c46c4f1b488a2d0d", "score": "0.7705613", "text": "function isLoggedIn(req, res, next) {\n if (isUserIdSetInCookie(req)) {\n helper.clearRouteUrl(res);\n return next();\n }\n res.redirect('/_/');\n}", "title": "" }, { "docid": "4c3ef213c62332edbd76e734b693a42f", "score": "0.7696668", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n}", "title": "" }, { "docid": "92de53823d350dd5c12dd58deedc17f4", "score": "0.76951414", "text": "function isLoggedIn(req, res, next){\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect(\"/\");\n}", "title": "" }, { "docid": "05fed408567d99838fef30d587e2c9f2", "score": "0.7688696", "text": "function isLoggedIn(req, res, next) {\n console.log(\"yes\");\n if (req.isAuthenticated())\n return next();\n else{res.redirect('/');}\n}", "title": "" }, { "docid": "8cd55e03e4996bec9fa2adb044852acf", "score": "0.7688404", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n }", "title": "" }, { "docid": "49ae1db77fb62265b44f3c1fda497b67", "score": "0.768829", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n } else {\n res.redirect('/');\n }\n }", "title": "" }, { "docid": "4b372863364d61b34941d75ec6d3588f", "score": "0.7685521", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n }", "title": "" }, { "docid": "5f70b61fac6c5756b677afe2d4575356", "score": "0.7683931", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n }", "title": "" }, { "docid": "24a1a82723b520f8d3ba523ba170ca1b", "score": "0.76812977", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n \n res.redirect('/');\n}", "title": "" }, { "docid": "71c64699722784c2c85bd9f0581e81f3", "score": "0.7680731", "text": "function login_required(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/login');\n }", "title": "" }, { "docid": "44d930c3e59cc9f383a0030fafdb92e2", "score": "0.7677631", "text": "function isLoggedIn (req, res, next) {\n if (req.isAuthenticated()) return next()\n res.redirect('/')\n}", "title": "" }, { "docid": "42e6692b5682c8bfc033074ab5bbcc70", "score": "0.76754856", "text": "function isLoggedIn(req,res, next){\n if (req.isAuthenticated()){\n return next();\n }\n //if not logged in, redirect to some place//\n res.redirect('/');\n}", "title": "" }, { "docid": "113e3d461ab1d41a1e9a1bbaa4b1f21c", "score": "0.7675235", "text": "function isLoggedIn(req, res, next){\n \n if(req.isAuthenticated()){\n \n return next();\n }\n \n res.redirect(\"/login\");\n }", "title": "" }, { "docid": "65c97aefd53ecf0974235880eb7b5132", "score": "0.7671602", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect('/');\n}", "title": "" }, { "docid": "65c97aefd53ecf0974235880eb7b5132", "score": "0.7671602", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect('/');\n}", "title": "" }, { "docid": "3f683a7bf652dc68d7a9dc64cfad5f19", "score": "0.76710296", "text": "function isLoggedIn(req, res, next){\r\n if(req.isAuthenticated()){\r\n return next();\r\n }\r\n res.redirect(\"/login\");\r\n}", "title": "" }, { "docid": "37612ed72c39979941caea924463fadf", "score": "0.7670762", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n }", "title": "" }, { "docid": "900f024f31af936802e3ccd70e4f9451", "score": "0.7669672", "text": "function isLoggedIn(req,res,next) {\n if (req.isAuthenticated()) return next()\n res.redirect('/')\n}", "title": "" }, { "docid": "e78d295e8c21d85e9e0c6bbdb7db0fa9", "score": "0.76678455", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "e78d295e8c21d85e9e0c6bbdb7db0fa9", "score": "0.76678455", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "e78d295e8c21d85e9e0c6bbdb7db0fa9", "score": "0.76678455", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "fbcddbf6e88876ad100d69835da08eae", "score": "0.7664968", "text": "function isLoggedIn(req, res, next) {\n if (req.user && req.user.id) {\n next();\n } else {\n res.redirect(\"/login\");\n }\n}", "title": "" }, { "docid": "782d23f764ab8fd05ef09539001030a9", "score": "0.76618016", "text": "function isLoggedIn(req,res,next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "cc642842232e74ebe7dc5b582e851ca4", "score": "0.7654208", "text": "function isLoggedIn(req, res, next) {\n // check is user is authenticated\n if (req.isAuthenticated()) {\n return next();\n }\n // otherwise redirect to home page\n res.redirect('/');\n}", "title": "" }, { "docid": "8c2238891af9c6448ff72c576bd19bd0", "score": "0.7653382", "text": "function isLoggedIn(req, res, next){\n // if user is authenticated, then ok\n if(req.isAuthenticated()){\n return next();\n }\n\n // if not authenticated, take them back to the home page \n res.redirect('/');\n }", "title": "" }, { "docid": "535d1a3030bf1a7cefb08a02dc62ee1e", "score": "0.76525736", "text": "isLoggedIn ( req, res, next ) {\n\n if ( req.isAuthenticated() ) {\n\n next()\n\n\n } else {\n\n req.flash( \"error\", \"You need to be logged in to do that\" )\n\n res.redirect( \"/login\" )\n\n\n }\n }", "title": "" }, { "docid": "0a23ea14a40508f0fee7c2d22b020bff", "score": "0.7652278", "text": "function isLoggedIn (request, response, next) {\n if (request.user) {\n next();\n } else {\n response.redirect('/node/login');\n }\n }", "title": "" }, { "docid": "06db68d6a137b074154d14ec7b842f39", "score": "0.76514244", "text": "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n {\n return next();\n\n }\n // if they aren't redirect them to the home page\n res.redirect('/');\n }", "title": "" }, { "docid": "ccc604fd89d7a36aa33f79d3e124a004", "score": "0.7650298", "text": "function isLoggedIn (req,res,next){\n if(req.user){\n next();\n } else {\n res.send(req.isAuthenticated())\n }\n }", "title": "" }, { "docid": "292d177b89777fe5edf4cd9746c79ff5", "score": "0.76491827", "text": "function isLoggedIn(req, res, next) {\nif (req.isAuthenticated())\nreturn next();\n\nres.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "d7dfcba0d4efe0ad543ae1d84898da76", "score": "0.7648823", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "380e9c4f25e2345839002bb32c4e5857", "score": "0.76462424", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n \n return next();\n \n res.redirect('/signin');\n }", "title": "" }, { "docid": "2204e0b69043dafa031cf1ed7ecd7a60", "score": "0.7644554", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n \n}", "title": "" }, { "docid": "82cd83034dd5cae70b870235ebdd91a2", "score": "0.7644432", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n //res.redirect('/');\n return next();\n}", "title": "" }, { "docid": "50b2331e54f37fa066743fa66a7d9d49", "score": "0.76431185", "text": "function isLoggedIn(req, res, next) {\n if(req.isAuthenticated()) return next()\n res.redirect('/users/login')\n}", "title": "" }, { "docid": "50b2331e54f37fa066743fa66a7d9d49", "score": "0.76431185", "text": "function isLoggedIn(req, res, next) {\n if(req.isAuthenticated()) return next()\n res.redirect('/users/login')\n}", "title": "" }, { "docid": "afb8df6c0d0c862157d9e11df1a28c9c", "score": "0.76429164", "text": "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n // if they aren't redirect them to the home page\n res.redirect('/');\n}// end isLoggedIn()s", "title": "" }, { "docid": "800cab26ff5dd881ba8fe329c0bcaa60", "score": "0.76367784", "text": "function loggedIn(req, res, next) {\r\n if (req.user) {\r\n next();\r\n } else {\r\n res.send({ redirect: \"/user/login\" });\r\n }\r\n}", "title": "" }, { "docid": "d75d9c85ed93da64f0fa92a8ee23fea7", "score": "0.7632759", "text": "function isLoggedIn(req,res,next){\n req.user? next():res.sendStatus(401);\n }", "title": "" }, { "docid": "7b90edf33f54b48a06e0d81a3728273b", "score": "0.76325357", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n }", "title": "" }, { "docid": "63fb12f3ff72a580f52c072b6d603472", "score": "0.7627515", "text": "function loggedIn(req, res, next) {\n // If Auth successful\n if (req.isAuthenticated()){\n return next();\n }\n res.redirect('/'); // Redirect to index page\n}", "title": "" }, { "docid": "f921b42b14247b768a7e58122ac61c85", "score": "0.7626564", "text": "function isLoggedIn(req, res, next){\n if (req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "349a4c3878745d9f1cc7366ee1b02e88", "score": "0.76204896", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "349a4c3878745d9f1cc7366ee1b02e88", "score": "0.76204896", "text": "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "title": "" }, { "docid": "8ed946fe09a0f6b3d655a625aa01df7b", "score": "0.7619511", "text": "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/');\n}", "title": "" }, { "docid": "67f6ff80b1a6291ea2077692deae99cf", "score": "0.7616938", "text": "function loggedIn(req, res, next) {\n if (req.user) {\n next();\n } else {\n res.redirect('/');\n // next();\n }\n}", "title": "" }, { "docid": "4a1710c31994952e2831bd1fb836a161", "score": "0.76159316", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "4a1710c31994952e2831bd1fb836a161", "score": "0.76159316", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "afbf012420439573c623437f78e70cd3", "score": "0.7615133", "text": "function isLoggedIn(req,res,next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect('/');\n }", "title": "" }, { "docid": "167280170a9e1cd0130ebcb5a2949764", "score": "0.7613378", "text": "function isLoggedIn(req,res,next){\n if(req.isAuthenticated()){\n return next();\n } \n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "22a52f1d209442efe1fe7f920e73ed31", "score": "0.7610205", "text": "function ensureLoggedIn(req, res, next) {\n debugger;\n if (!req.user) {\n return next({ status: 401, message: \"Unauthorized\" });\n } else {\n return next();\n }\n}", "title": "" }, { "docid": "4914e776597823481c3b63f72ac10ec6", "score": "0.7609723", "text": "ensureAuthenticated(req, res, next) {\n if (!req.user){\n req.flash(\"notice\", \"You must be signed in to do that.\")\n return res.redirect(\"/users/sign_in\");\n } else {\n next();\n }\n }", "title": "" }, { "docid": "7fcdf4bb3f22cc44e5424878907d6c95", "score": "0.76088744", "text": "function isLoggedIn(req,res,next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "7fcdf4bb3f22cc44e5424878907d6c95", "score": "0.76088744", "text": "function isLoggedIn(req,res,next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "7fcdf4bb3f22cc44e5424878907d6c95", "score": "0.76088744", "text": "function isLoggedIn(req,res,next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "7fcdf4bb3f22cc44e5424878907d6c95", "score": "0.76088744", "text": "function isLoggedIn(req,res,next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "title": "" }, { "docid": "e3d7a6eb588490bf526eab1ff59fa1db", "score": "0.76044846", "text": "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect('/login');\n}", "title": "" } ]
19304397ee09435d92817f4ba3496554
Para cargar el combo de tipo de incidencias
[ { "docid": "3da9e90f81c795b738a7230382c624bb", "score": "0.58030283", "text": "function cargar_tipoincidencias() {\n $.ajax({\n type: 'POST',\n dataType: 'json',\n url: \"./scripts_php/tipoincidencias_listar.php\",\n async: false,\n error: function(xhr, status, error) {\n //mostraríamos alguna ventana de alerta con el error\n },\n success: function(data) {\n //obtenemos el mensaje del servidor, es un array!!!\n //var mensaje = (data[\"mensaje\"]) //o data[0], en función del tipo de array!!\n jQuery.noticeAdd({\n text: 'Cargado el listado de tipo de incidencias',\n stay: false,\n type: 'succes'\n });\n $(\"#tipoincidencia\").empty();\n $.each(data, function() {\n $(\"#tipoincidencia\").append($('<option></option>').val(this.id_incidencia).html(this.tipo));\n });\n },\n complete: {\n //si queremos hacer algo al terminar la petición ajax\n }\n });\n }", "title": "" } ]
[ { "docid": "bdca3c9f844d0a7b7e728645ed45b244", "score": "0.67147696", "text": "function CargarDistrito() {\n //se selecciona la tabla\n var db = database.ref(\"distrito\");\n db.once(\"value\", function (snapshot) {\n if (snapshot.exists()) {\n snapshot.forEach(function (data) {\n //capturamos la informacion\n var cod = data.key;\n var nom = data.val().nombre;\n //creamos un elemento\n var options = document.createElement(\"option\");\n //agreganos el nombre y el codigo al option\n options.text = nom;\n options.value = cod;\n //agregamos los options al combo\n cboDistrito.add(options);\n });\n }\n });\n}", "title": "" }, { "docid": "f2b6e7d9d8ca664dee221f99c97b4267", "score": "0.66387033", "text": "function cargarTipoUso(id, numero) {\r\n\t// Consultar listado de extras definido\r\n\t$.ajax({\r\n\t\turl : '../TipoUsoController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"encontrarTodos\",\r\n\t\t\t\"tipoObjeto\" : tipoObjeto\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (data) {\r\n\t\t\tvar listadoTipoUso = data.listadoTipoUso;\r\n\t\t\t$(\"#tipo_uso\" + numero).html(\"<option value=''>Seleccione una opcion</option>\");\r\n\t\t\t$.each(listadoTipoUso, function (index) {\r\n\t\t\t\t$(\"#tipo_uso\" + numero).append(\"<option value='\" + listadoTipoUso[index].codigo + \"' source='\" + listadoTipoUso[index].codigo + \"'>\" + listadoTipoUso[index].nombre + \"</option>\");\r\n\t\t\t});\r\n\t\t\t$(\"#tipo_uso\" + numero.toString()).val(id).attr('required', 'required');\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "0ba4d051a4124425055b672f12cd6b60", "score": "0.6579221", "text": "function cargarCboExistencias(){\n\t\tabrirCargando();\n\t\tvar opc = 'CC_07';\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\tdata:'opc='+opc,\n\t\t\turl: 'bd/bd_operaciones.php',\n\t\t\tsuccess: function(rpta){\t\t\t\t\n\t\t\t\t$('#cboTipoExistencia').html(rpta);\n\t\t\t\tfuncionSelect('#cboTipoExistencia');\n\t\t\t\tcerrarCargando();\n\t\t\t\treturn true;\t\t\n\t\t\t},\n\t\t\terror: function(rpta){\n\t\t\t\talert(rpta);\n\t\t\t\tcerrarCargando();\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "082b028513af2190d593406a295693af", "score": "0.6487351", "text": "function cargarCgg_dhu_tipo_becaCtrls(){\n if(inRecordCgg_dhu_tipo_beca){\n txtCdtbc_codigo.setValue(inRecordCgg_dhu_tipo_beca.get('CDTBC_CODIGO'));\n txtCdtbc_nombre.setValue(inRecordCgg_dhu_tipo_beca.get('CDTBC_NOMBRE'));\n txtCdtbc_abreviatura.setValue(inRecordCgg_dhu_tipo_beca.get('CDTBC_ABREVIATURA'));\n cbxCdhu_tipo_beca.setValue(inRecordCgg_dhu_tipo_beca.get('CDTBC_ESTADO_BECA'));\n isEdit = true;\n habilitarCgg_dhu_tipo_becaCtrls(true);\n //cbxCdhu_tipo_beca.setVisible(true);\n\n }}", "title": "" }, { "docid": "3ab98cb84cb1e4be79b86b9807a88a5e", "score": "0.64522815", "text": "function cargarCgg_res_tipo_solicitud(inCodigo){\n gsCgg_res_tramite_comite.reload({params:{\n inCrcom_codigo:inCodigo,\n format:\"JSON\"\n\n }\n });\n }", "title": "" }, { "docid": "ec1e8bab8992d3c7b2312433e3e6e657", "score": "0.64403015", "text": "function CargarCombo(atrCombo) {\r\n\ttry {\r\n\t\tvar select = $('#' + atrCombo.nombreCombo);\r\n\t\tselect.append($('<option/>', {\r\n\t\t\tvalue : '',\r\n\t\t\ttext : atrCombo.mensaje\r\n\t\t}));\r\n\t\t$.getJSON(atrCombo.url, function(json) {\r\n\t\t\tjson.forEach(function(item, num) {\r\n\t\t\t\tselect.append($('<option/>', {\r\n\t\t\t\t\tvalue : eval('item.' + atrCombo.campo),\r\n\t\t\t\t\ttext : eval('item.' + atrCombo.valor)\r\n\t\t\t\t}));\r\n\t\t\t});\r\n\t\t});\r\n\t} catch (e) {\r\n\t\tconsole.log('error-> ' + e);\r\n\t}\r\n}", "title": "" }, { "docid": "032972fe40dda8fe6271717484299fe4", "score": "0.6376921", "text": "function cmbtingkat(typ){\n var u = dir7;\n var d = 'aksi=cmb'+mnu7+'&departemen='+$('#departemenS').val();\n ajax(u,d).done(function (dt){\n var out='';\n if(dt.status!='sukses'){\n out+='<option value=\"\">'+dt.status+'</option>';\n }else{\n $.each(dt.tingkat, function(id,item){\n out+='<option value=\"'+item.replid+'\">'+item.tingkat+'</option>';\n });\n if(typ=='filter'){\n $('#tingkatS').html(out);\n viewTB('rekapitulasipenerimaansiswa');\n // cmbsubtingkat('filter');\n }else{\n $('#subtingkatTB').html(out);\n }\n }\n });\n }", "title": "" }, { "docid": "7ee986cfe3de8e619d03bbbb19f43e4b", "score": "0.63613474", "text": "function ObtenerTipoContacto() {\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'Clientes/ObtenerTipoContacto',\n\t\tdataType: 'json',\n\t\tasync: false,\n\t\tsuccess: function (response) {\n\t\t\t$('#inTipoContacto').empty();\n\t\t\t$.each(response, function (index, item) {\n\t\t\t\t$('#icTipoContacto').append(\"<option value='\" + item.intiddetallecatalogo + \"'>\" + item.strvalor + \"</option>\")\n\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "7d3993b62dcfa3f9f0c5966559b1abfb", "score": "0.6351646", "text": "function cargarSelect(){\n llenarCiudadReporte();\n llenarTipoReporte();\n}", "title": "" }, { "docid": "8b0979d2bfda60d4a3b50ad2bc1f67f2", "score": "0.6349275", "text": "function cargarEstatus() {\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'Clientes/ObtenerEstatus',\n\t\tdataType: 'json',\n\t\tasync: false,\n\t\tsuccess: function (response) {\n\t\t\t$('#inEstatus').empty();\n\t\t\t$.each(response, function (index, item) {\n\t\t\t\t$('#inEstatus').append(\"<option value='\" + item.intiddetallecatalogo + \"'>\" + item.strvalor + \"</option>\")\n\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "876f807795d31c12ee66327a6d65ec5d", "score": "0.63075584", "text": "function loadComboAcceso(combo){\n limpiarCombo(combo);\n activarCombos(combo);\n \n var canal = document.getElementById(\"cbCanal\");\n var optioncalnal = canal.options ;\n var cboAcc = document.getElementById(\"cbAcc\");\n var cboAcceso = document.getElementById(\"cbAcceso\");\n \n //--busca la primera coincidencia con acceso\n for(var i=0;i<cboAcc.length;i++){\n if(cboAcc.item(i).value == optioncalnal.value && optioncalnal.value !=\"\" ){\n \n var oOption = document.createElement(\"OPTION\");\n cboAcceso.options.add(oOption);\n oOption.innerText = cboAcc.item(i).innerText;\n oOption.value = cboAcc.item(i).value;\n break;\n }\n }\n\n //--busca si existen otras-\n for(var i=0;i<cboAcc.length;i++){\n \n if(cboAcc.item(i).value != optioncalnal.value && optioncalnal.value !=\"\"){\n \n var oOption = document.createElement(\"OPTION\");\n \n cboAcceso.options.add(oOption);\n oOption.innerText = cboAcc.item(i).innerText;\n oOption.value = cboAcc.item(i).innerText;\n \n }\n }\n \n set('frmGenerarFichero.statusAcceso',\"1\");\n }", "title": "" }, { "docid": "14bb2ceefd56d8101914ee2f7711409e", "score": "0.6293594", "text": "function cargarOpciones()\n{\n // primera opcion - regiones de voronoi\n var el = document.createElement(\"option\")\n el.textContent = \"Regiones de Voronoi\"\n el.value = 0\n select.appendChild(el)\n let i = 0\n // otras opciones - rutas\n for (var [k, v] of Object.entries(rutasjson))\n {\n rutas.push(v);\n var el = document.createElement(\"option\")\n el.textContent = k\n el.value = i+1\n select.appendChild(el)\n i++\n }\n}", "title": "" }, { "docid": "044e0cf83795211c4dfb960720f70d0c", "score": "0.6282546", "text": "function cargarCboTipoDocumento(valorDefecto){\n\t\topc = 'CC_TD';\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\tdata:'opc='+opc,\n\t\t\turl: urlGeneral,\n\t\t\tsuccess: function(rpta){\n\t\t\t\t$('#cboDocumento').html(rpta);\n\t\t\t\t$('#cboDocumento').val(valorDefecto);\n\t\t\t\tcerrarCargando();\n\t\t\t\treturn true;\t\t\n\t\t\t},\n\t\t\terror: function(rpta){\n\t\t\t\talert(rpta);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "be0d3b9e1292a6ca3fc0990af26500c9", "score": "0.6269309", "text": "function cargarCboEspecialidades2(combo){\n\t\tabrirCargando();\t\t\n\t\topc = 'CC_E_05';\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\tdata:'opc='+opc,\n\t\t\turl: urlGeneral,\n\t\t\tsuccess: function(rpta){\n\t\t\t\t$(combo).html(rpta);\n\t\t\t\tcerrarCargando();\n\t\t\t\treturn true;\t\t\n\t\t\t},\n\t\t\terror: function(rpta){\n\t\t\t\talert(rpta);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "c0d088af71e50c6bbbb577f0893fb2fd", "score": "0.6249866", "text": "function cargarTipoVehiculo(id, numero, tasaProductoId) {\r\n\r\n\t// Consultar listado de tipos de Vehiculo\r\n\t$.ajax({\r\n\t\turl : '../TipoVehiculoController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : tipoObjeto,\r\n\t\t\t\"tasaProductoId\" : tasaProductoId,\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (data) {\r\n\t\t\tvar listadoTipoVehiculo = data.listadoTipoVehiculo;\r\n\t\t\t$(\"#tipo_vehiculo\" + numero).html(\"\");\r\n\t\t\t$(\"#tipo_vehiculo\" + numero).append(\"<option value=''>Seleccione una opcion</option>\");\r\n\t\t\t$.each(listadoTipoVehiculo, function (index) {\r\n\t\t\t\t$(\"#tipo_vehiculo\" + numero).append(\"<option value='\" + listadoTipoVehiculo[index].codigo + \"' source='\" + listadoTipoVehiculo[index].codigo + \"'>\" + listadoTipoVehiculo[index].nombre + \"</option>\");\r\n\t\t\t});\r\n\t\t\t$(\"#tipo_vehiculo\" + numero.toString()).val(id).attr('required', 'required');\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "5bc28d4e719b54a650645b9488ec9fef", "score": "0.62435675", "text": "function cargoTypesAjax() {\r\n\t\tvar type;\r\n vmsService.vmsApiService(function(response) {\r\n if (response) {\r\n type = '<option value=\"\" selected>-- Select --</option>';\r\n $.each(response, function(i, val) {\r\n type += '<option value=\"' + val.id + '\">' + val.desc + '</option>';\r\n });\r\n $('#cargoType').html(type);\r\n } else {\r\n nsCore.showAlert(nsCargo.error);\r\n }\r\n }, nsCargo.cargoTypes, 'GET', null);\r\n }", "title": "" }, { "docid": "6185f774207f0808d654a48c61df10e7", "score": "0.6241445", "text": "function loadDocType() {\n $.ajax({\n type: \"POST\",\n url: VIS.Application.contextUrl + \"PaymentAllocation/GetDocType\",\n dataType: \"json\",\n success: function (data) {\n var result = JSON.parse(data);\n if (result) {\n $cmbDocType.empty();\n $cmbDocType.append(\"<option value= 0 >Select</option>\");\n for (var i = 0; i < result.length; i++) {\n docType = VIS.Utility.Util.getValueOfString(result[i].DocType);\n c_DocType_ID = VIS.Utility.Util.getValueOfInt(result[i].C_DocType_ID);\n $cmbDocType.append(\" <option value=\" + c_DocType_ID + \">\" + docType + \"</option>\");\n }\n }\n else {\n $cmbDocType.append(\"<option value= 0 >Select</option>\");\n }\n $cmbDocType.prop('selectedIndex', 0);\n },\n error: function (er) {\n console.log(er);\n }\n });\n }", "title": "" }, { "docid": "feed863a13135f297d23fd5006c026d5", "score": "0.6226635", "text": "function listarComboTipoDocumento(){\n $.ajax({\n type:'POST',\n dataType: 'JSON',\n url:url+'Pacientes/CtrlRegistroPaciente/ListarComboTipoDocumento',\n data:{\"\":\"\"}\n }).done(function(e){\n $.each(e,function(i,v){\n $('#SlcTipoDocumento').append('<option value=\"'+v.idTipoDocumento+'\">'+v.descripcionTdocumento+'</option>');\n })\n }).fail(function(){\n console.log(\"\");\n })\n}", "title": "" }, { "docid": "63acbde819b463e35d60d44922a6a99c", "score": "0.62210304", "text": "function buscarCodigosUs(codigo, type){\n\n\t \tif(type == 'create'){\n\t \t\tvar estado = 'estado_registrar',\n\t\t \t\tciudad = 'ciudad_registrar',\n\t\t \t\tmunicipio = 'municipio_registrar',\n\t\t \t\tcolonia = 'colonia_registrar';\n\t \t}else if(type == 'edit'){\n\t \t\tvar estado = 'estado_actualizar',\n\t\t \t\tciudad = 'ciudad_actualizar',\n\t\t \t\tmunicipio = 'municipio_actualizar',\n\t\t \t\tcolonia = 'colonia_actualizar';\n\t \t}\n\n\t \tbuscarCodigos(codigo,estado,ciudad,municipio,colonia);\n\t \n }", "title": "" }, { "docid": "d7ad05a688698c34161db720ef6d67b4", "score": "0.6204024", "text": "function carrega_tipo_opcao(key){\n var retorno = '';\n $.each(resultTipoOpcao, function (i, obj){\n retorno += ' <option value=\"'+obj['id']+'\">'+obj['nome']+'</option>';\n });\n $('div#div_pergunta_'+key).find('select#pergunta_tipo_opcao').html(retorno);\n }", "title": "" }, { "docid": "3296e37179a768c0023dfc3bb6c72865", "score": "0.6193224", "text": "function atribuirCidades(jsonCid,combo){ \n\t \n\tfor(var i=0;i<jsonCid.length;i++){ \n\t\tcombo.options[combo.length] = new Option(jsonCid[i].nomeCidade,jsonCid[i].idCidade);\n\t}\n\n}", "title": "" }, { "docid": "6840ce415d75ceb089808dafefba1427", "score": "0.6180648", "text": "function cmbtahunajaran(typ,thn){\n u=dir3;\n d='aksi=cmbtahunajaran'+(thn!=''?'&replid='+thn:'');\n ajax(u,d).done(function(dt){\n var out='';\n if(dt.status!='sukses'){\n out+='<option value=\"\">'+dt.status+'</option>';\n }else{\n $.each(dt.tahunajaran, function(id,item){\n out+='<option '+(item.repld==thn?'selected':'')+' value=\"'+item.replid+'\">'+item.tahunajaran+' - '+(parseInt(item.tahunajaran)+1)+'</option>';\n });\n }\n if(typ=='filter'){ // filter\n $('#tahunajaranS').html(out);\n viewTB();\n }else{ // form\n $('#tahunajaranTB').val(dt.tahunajaran[0].tahunajaran);\n $('#tahunajaranH').val(dt.tahunajaran[0].replid);\n }\n });\n }", "title": "" }, { "docid": "dbcca77ff8425b0bc364e8da4c524776", "score": "0.6177111", "text": "function LoadComBox_BanMien_Baocaoxuat() {\n try {\n var config = { namesql: \"TB_Export_LstLoadByCode\", callback: \"f_result_combobox_banmien_baocaoxuat\", connstr: \"ConnectEMS\" };\n var para = {\n IsType: 'LoadDienluc',\n Code: $(\"#cbkhotong_baocaoxuat\").val()\n };\n ExecuteServiceSyns(config, para, false);\n } catch (e) {\n console.log(e);\n }\n}", "title": "" }, { "docid": "d841f8d149a35d05364a3a950acb929d", "score": "0.6164173", "text": "function cmbkatmodulpembayaran(typ,kat){\n var u = dir2;\n var d = 'aksi=cmb'+mnu2;\n ajax(u,d).done(function (dt){\n var out='';\n if(dt.status!='sukses'){\n notif(dt.status,'red');\n }else{\n $.each(dt.katmodulpembayaran, function(id,item){\n out+='<option '+(kat==item.replid?'selected':'')+' value=\"'+item.replid+'\"> '+item.nama+'</option>';\n });\n if(typ=='filter'){ // filtering \n $('#katmodulpembayaranS').html('<option value=\"\">-SEMUA-</option>'+out);\n cmbtahunajaran('filter',$('#departemenS').val(),'');\n // viewTB();\n }else{ // form (add || edit)\n $('#katmodulpembayaranTB').html('<option value=\"\">-Pilih Kategori-</option>'+out);\n }\n }\n });\n }", "title": "" }, { "docid": "84610c25e3c961f7e2f44e56e4aaace1", "score": "0.61639977", "text": "function combo_carreras_horarioalumno_admin() {\n $.ajax({\n type: \"get\",\n url: base_url + 'Administrativos/HacerHorarioProfesor/obtenercarreras',\n dataType: \"json\",\n success: function (data) {\n console.log(data);\n $.each(data, function (key, registro) {\n $(\"#elcombo_carreras_horarioalumno_admin\").append('<option value=' + registro.id_carrera + '>' + registro.carrera_descripcion + '</option>');\n });\n },\n });\n}", "title": "" }, { "docid": "8f4f72c620bf613892ed3f0dc73f336e", "score": "0.6157983", "text": "function popolaDocenti()\r\n{\r\n //Ricevuta risposta dal SERVER!!\r\n if (xhrObj.readyState == 4) {\r\n var risp = xhrObj.responseText;\r\n \r\n var arrDocenti = JSON.parse(risp);\r\n var cmbDocenti = document.getElementById(\"selDocente\");\r\n var titolo = document.getElementById(\"titolo\");\r\n \r\n document.getElementById(\"divOrari\").innerHTML = \"\";\r\n \r\n titolo.innerHTML = \"\";\r\n titolo.innerHTML += \"PRENOTA LA TUA RIPETIZIONE DI \" + arrDocenti[0].corso.toString().toUpperCase();\r\n \r\n cmbDocenti.innerHTML = \"\";\r\n \r\n //Non è stato trovato alcun docente che insegna il corso selezionato\r\n if(arrDocenti[0].corso == \"none\")\r\n {\r\n document.getElementById(\"selDocente\").disabled = true;\r\n document.getElementById(\"dataPren\").disabled = true;\r\n alert(\"Nessun docente insegna \" + document.getElementById(\"selCorso\").value);\r\n }\r\n else\r\n {\r\n for(var i=0; i<arrDocenti.length; i++)\r\n {\r\n cmbDocenti.innerHTML += \r\n \"<option value='\" + arrDocenti[i].idDoc + \"'>\"\r\n + arrDocenti[i].nome + \"</option>\";\r\n }\r\n \r\n orderselect(document.getElementById(\"selDocente\"));\r\n document.getElementById(\"selDocente\").selectedIndex = 0;\r\n document.getElementById(\"selDocente\").disabled = false;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "77d9c52ac8b764c30911db66ac54f310", "score": "0.61534643", "text": "function cargarCboEspecialidades(combo,valorDefecto){\n\t\tabrirCargando();\t\t\n\t\topc = 'CC_E_05';\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\tdata:'opc='+opc,\n\t\t\turl: urlGeneral,\n\t\t\tsuccess: function(rpta){\n\t\t\t\t$(combo).html(rpta);\n\t\t\t\t$(combo).val(valorDefecto);\n\t\t\t\tfuncionSelect(combo);\n\t\t\t\tcerrarCargando();\n\t\t\t\treturn true;\t\t\n\t\t\t},\n\t\t\terror: function(rpta){\n\t\t\t\talert(rpta);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "b6024871b6c7e4d0b2eed0bdad6b6195", "score": "0.61377746", "text": "function llenaComboRel(data, obj, sele, isSelec, isChosen) {\n obj.html(\"\");\n $.each(data, function(index, el) {\n if (isSelec) {\n if (sele instanceof Array) {\n var opt = \"\";\n opt = \"<option value='\" + el.ID + \"' data-extra='\" + el.TYPE_EXTRA + \"'>\" + el.DESCRIPCION.toUpperCase() + \"</option> \";\n for (var i = 0; i < sele.length; i++) {\n if (sele[i] == el.ID) {\n opt = \"<option value='\" + el.ID + \"' data-extra='\" + el.TYPE_EXTRA + \"' selected>\" + el.DESCRIPCION.toUpperCase() + \"</option> \";\n break;\n }\n }\n obj.append(opt);\n } else {\n if (el.ID == sele) {\n obj.append(\"<option value='\" + el.ID + \"' data-extra='\" + el.TYPE_EXTRA + \"' selected>\" + el.DESCRIPCION.toUpperCase() + \"</option> \");\n } else {\n obj.append(\"<option value='\" + el.ID + \"' data-extra='\" + el.TYPE_EXTRA + \"'>\" + el.DESCRIPCION.toUpperCase() + \"</option> \");\n }\n }\n } else {\n obj.append(\"<option value='\" + el.ID + \"' data-extra='\" + el.TYPE_EXTRA + \"'>\" + el.DESCRIPCION.toUpperCase() + \"</option> \");\n }\n\n });\n\n if (isChosen) {\n obj.chosen({ no_results_text: 'Oops!, no existe informacion con: ', width: \"100%\" });\n } else {\n obj.prepend(\"<option value=''>Seleccione una opcion</option> \");\n }\n}", "title": "" }, { "docid": "33e1350f30d6ab6d0e6232deae1fc098", "score": "0.6131537", "text": "function carregaCombo()\n{\n try\n {\n var retrievedObject = localStorage.getItem('cadastro');\n cadastro = ('retrievedObject: ', JSON.parse(retrievedObject));\n //limpa os combos\n document.getElementById(\"cbbEscola\").innerHTML = \"\";\n var cbbEscola = document.getElementById(\"cbbEscola\");\n //opção de busca vazia\n var opVazia = document.createElement('option');\n opVazia.innerHTML = \"-\";\n opVazia.value = -1;\n\n cbbEscola.appendChild(opVazia);\n //preenche combos\n for (var i = 0; i < cadastro.length; i++)\n {\n var opE = document.createElement('option');\n opE.innerHTML = cadastro[i].escola;\n opE.value = i;\n cbbEscola.appendChild(opE);\n }\n }\n catch (e)\n {\n alert(e);\n }\n}", "title": "" }, { "docid": "62c3c32415be82d23ff948e151c66a0d", "score": "0.6118505", "text": "function Combos($id,$value,$metodo,$auto,$capa){\n\n $('#'+$capa).find('select[name='+$id+']').html(new Option('..:: SSELECCIONE ::..','0'));\n // $('#'+$id).html(new Option('..:: SELECCIONE ::..','0'));\n var from=$('#from-autocombo');\n var url= from.attr('action').replace(':id_ID',$value);\n url=url.replace(':funcion_ID',$metodo);\n $.get(url,function(respuesta,estado){\n if(isEmptyJSON(respuesta)==false)\n {\n for(i=0; i < respuesta.length; i++){\n if($auto==respuesta[i].valor)\n {\n $('#'+$capa).find('select[name='+$id+']').append(new Option(respuesta[i].nombre,respuesta[i].valor,true,true));\n //$('#'+$id).append(new Option(respuesta[i].nombre,respuesta[i].valor,true,true));\n }else{\n //$('#'+$id).append(new Option(respuesta[i].nombre,respuesta[i].valor));\n $('#'+$capa).find('select[name='+$id+']').append(new Option(respuesta[i].nombre,respuesta[i].valor));\n }\n }\n }\n });\n}", "title": "" }, { "docid": "43aae45aeeca9a4b6828d135a8c079e1", "score": "0.6116855", "text": "function agregarComuna() {\n if (provincia.value != \"\") {\n comuna.disabled = false;\n }\n var selectedOption = provincia.options[provincia.selectedIndex];\n readTextFile(urlComuna, function(text) {\n var options = JSON.parse(text);\n // limpiamos el select de comunas\n for (let i = comuna.length; i >= 0; i--) {\n comuna.remove(i);\n }\n // agregamos los valores al select comunas\n for (let i = 0; i < options.length; i++) {\n if (options[i].provincia == selectedOption.value) {\n listComunas.push(options[i].nombre);\n // creamos un elemento de tipo option\n var opt = document.createElement(\"option\");\n // le damos un valor\n opt.value = options[i].id;\n // le ponemos un texto\n opt.textContent = options[i].nombre;\n // lo agregamos al select\n comuna.options.add(opt);\n }\n };\n // creamos un elemento de tipo option\n var opt = document.createElement(\"option\");\n // le damos un valor\n opt.value = \"\";\n // le ponemos un texto\n opt.textContent = \":: Seleccione una opcion ::\";\n // agregando atributos \n opt.setAttribute(\"selected\", \"selected\");\n opt.setAttribute(\"disabled\", \"disabled\");\n comuna.options.add(opt);\n });\n }", "title": "" }, { "docid": "81413915abe541c7951f148b40a13ad9", "score": "0.61114985", "text": "function loadChangeType(){\r\n\tvar url = path+'/json/changeType.json'\r\n\t$.getJSON(url, function(data) {\r\n\t $.each(data, function(i, item) {\r\n\t \t $(\"#chType\").append(\"<option value='\"+item.key+\"'>\"+item.name+\"</option>\");\r\n\t \t //csChangeTypeMap.set(item.name,item.key);\r\n\t })\r\n\t});\r\n}", "title": "" }, { "docid": "211b5ec45a00faa6365f53ea015c7e3e", "score": "0.6106404", "text": "function recargar_filtro_sutipo() {\n $('.btn_filtro_select').click(function (event) {\n var nomb = $(this).parents('tr').children('td').eq(0).html();\n var idtip = $(this).parents('tr').eq(0).attr('id');\n tipo.informacion = {\n idt: idtip,\n nombre: nomb\n };\n $('#input_nombre_subtipo').val(tipo.informacion.nombre);\n $('#medsubtipoterapeutico-idtipoterapeutico').val(tipo.informacion.idt);\n $('#btnformulariosubtipo').show();\n\n });\n }", "title": "" }, { "docid": "badfd40459356d7399e6f5739202dd79", "score": "0.6091603", "text": "function fillComboBox(){\n\t$.getJSON('/api/highscore/types', function(data){\n\t\tvar option = \"<option >?</option>\";\n\t\tvar i;\n\t\tvar t = '';\n\t\tfor(i = 0; i < data.length; i++){\n\t\t\tt += option.replace('?', data[i].Bezeichnung);\n\t\t}\n\t\t$('#selectType').append(t)\n\t});\n}", "title": "" }, { "docid": "21f7ec49c3b3aa770b3708f43daf509d", "score": "0.6087681", "text": "function dac_cargarDatosCuenta(idcli, nombre, direccion, observacion, condpago, listaCuenta, listaNombre, listaCondicion) {\n\t\"use strict\";\n\tvar empresa \t= $('#empselect').val();\n\tvar laboratorio = $('#labselect').val();\n\t\n\tif(listaCondicion === \"\"){\n\t\tdac_LimpiarArticulos();\n\t\tdac_CargarArticulos(empresa, laboratorio, '', listaCuenta);\n\t}\n\t\n\tdocument.getElementById('pwlista').value \t= listaCuenta;\n\tdocument.getElementById('pwidcta').value\t= (idcli)\t? idcli : '';\n\tdocument.getElementById('pwnombrecta').value= (nombre) \t? nombre: '';\t\n\tdocument.getElementById('pwlistanombre').innerHTML = (listaNombre) \t? \"Lista de Precios: \"+listaNombre : '';\t\n\t\n\tif(document.getElementById('pwidcondcomercial').value !== '0'){\n\t\tdocument.getElementById('pwlistanombre').innerHTML\t= \"\";\n\t} else {\n\t\tif(condpago){\n\t\t\t//Haces referencia al elemento para no recorrer el DOM varias veces\n\t\t\tvar sel = document.getElementById(\"condselect\");\n\t\t\tfor (var i = 1; i < sel.length; i++) {\n\t\t\t\t// Aca haces referencia al \"option\" actual\n\t\t\t\tvar opt = sel[i];\n\t\t\t\tif(opt.value === condpago) {\n\t\t\t\t\tdocument.getElementById('condselect').selectedIndex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t \n\tif(observacion){\n\t\tdocument.getElementById('msg_atencion').innerHTML \t\t\t= observacion;\n\t\tdocument.getElementById('box_observacion').style.display \t= \"inline\";\t\t\t\n\t} else {\n\t\tdocument.getElementById('box_observacion').style.display \t= \"none\";\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "b0b65e2cbc229d6a49d7fff590a9998d", "score": "0.6068075", "text": "function obtenerMedidaSeguridad() {\r\n $.getJSON(baseURL+\"pages/maestroColumna/obtenerMedidaSeguridad\", {\r\n //idActividad: idActividad,\r\n ajax: 'true',\r\n async: true\r\n }, function(data) {\r\n var html = '<option value=\"-1\">--Seleccione--</option>';\r\n var len = data.length;\r\n for (var i = 0; i < len; i++) {\r\n \t\t/* OSINE_SFS-610 - Inicio */\r\n \t //html += '<option value=\"' + data[i].idMaestroColumna + '\">'\r\n \t\t//+ data[i].descripcion + '</option>'; \r\n \t\tif (data[i].codigo == variable.infraccion){\r\n \t\t\thtml += '<option value=\"' + data[i].idMaestroColumna + '\" codigo=\"'+data[i].codigo+'\" selected=\"selected\">'\r\n \t\t\t+ data[i].descripcion + '</option>'; \r\n \t\t}else{\r\n \t\t\thtml += '<option value=\"' + data[i].idMaestroColumna + '\" codigo=\"'+data[i].codigo+'\" >'\r\n \t\t\t+ data[i].descripcion + '</option>'; \r\n \t\t}\r\n /* OSINE_SFS-610 - Fin */\r\n } \r\n $('#cmbMedidaSeguirdad').html(html); \r\n });\r\n }", "title": "" }, { "docid": "e8ad618d6ccddb81a59e681efcb6caeb", "score": "0.6065197", "text": "c_listadoLibros() {\n let listaSelect = []\n if (this.c_biblia[0]){\n \n Object.keys(this.c_biblia).forEach(item => {\n listaSelect.push([this.c_biblia[item].abbrev, this.c_biblia[item].nombre])\n })\n this.control ? console.log('Listado Select: ', listaSelect) : ''\n this.arrayLista = listaSelect\n }\n return listaSelect\n }", "title": "" }, { "docid": "36eab3e0c4c83369f664b660a57c565d", "score": "0.6036722", "text": "function seleccionar_instituciones(){\n $.ajax({\n type: \"POST\", \n data: null, \n url: \"../../core/controllers/scripts/instituciones.php?accion=seleccionar\", \n success: function (respuesta) {\n if(respuesta.registros.length > 0){\n //primera opcion del select que se armara\n var cmb_cuerpo = \"<option selected value='0'>Seleccionar...</option>\";\n //armando cuerpo del select\n respuesta.registros.forEach(registro => {\n cmb_cuerpo = cmb_cuerpo + '<option value=\"'+registro.Id_Institucion_Procedencia+'\">'+registro.Institucion_Procedencia+'</option>';\n });\n //seteando las opciones al select\n $(\"#cmb_instituciones\").html(cmb_cuerpo);\n }\n }, error: function(respuesta){\n console.log(\"Error:\");\n console.log(respuesta);\n }\n });\n}", "title": "" }, { "docid": "f1a46d588336810fa16395a81455ccd1", "score": "0.6034593", "text": "function ObtenerFormaAgregarTipoCompra() {\n $(\"#dialogAgregarTipoCompra\").obtenerVista({\n nombreTemplate: \"tmplAgregarTipoCompra.html\",\n despuesDeCompilar: function(pRespuesta) {\n $(\"#dialogAgregarTipoCompra\").dialog(\"open\");\n }\n });\n}", "title": "" }, { "docid": "720485a08f85676e0d8c039858c017c5", "score": "0.60311186", "text": "function cargarDepartamento() {\r\n\r\n\tvar ceros = \"00\";\r\n\t\r\n\t $.ajax({\r\n\t url:baseURL + \"pages/mantenimientoEmpresasAcreditadas/cargarUbigeo\",\r\n\t type:'post',\r\n\t async:false,\r\n\t data:{\r\n\t idProvincia:ceros,\r\n\t idDistrito:ceros\r\n\t },\r\n\t beforeSend:muestraLoading,\r\n\t success:function(data){\r\n\t \t\r\n\t ocultaLoading();\r\n\t fill.combo(data.filas,'idDepartamento','nombre','#cmbDepaSede');\r\n\t \r\n\t },\r\n\t error:errorAjax\r\n\t });\r\n}", "title": "" }, { "docid": "b92d4b12a046e1004c6b2cb0ea77a1c5", "score": "0.60222256", "text": "function fnCargarComboCaracterSocio() {\n var route = \"Database/Socios/comboCaracterSocio.php\";\n $.ajax({\n url: route,\n type: 'GET',\n dataType: 'json',\n success: function(data) {\n var htmlCaracterSocio = '';\n htmlCaracterSocio += '<option value=\"\">-- Seleccione --</option>';\n $.each(data, function(ind, elem) {\n console.log('ELEMENTO', elem);\n htmlCaracterSocio += '<option value=' + elem.idcaraso + '>' + elem.caracter + '</option>';\n });\n $(\"#caracter_nuevo\").append(htmlCaracterSocio);\n $(\"#caracter_modificar\").append(htmlCaracterSocio);\n }\n });\n}", "title": "" }, { "docid": "de74f9ec3ca82003234104030d8338a5", "score": "0.6021727", "text": "function GetAveryTemplates() {\n var averyTypes = { identifier: 'id', items: [] };\n for (var i = 0; i < averyTemplates.length; i++) {\n averyTypes.items[i] = { id: averyTemplates[i].value, name: averyTemplates[i].name };\n }\n var store = new dojo.data.ItemFileReadStore({ data: averyTypes });\n\n var filteringSelect = new dijit.form.ComboBox({\n autocomplete: false,\n hasdownarrow: true,\n id: 'selectAvery',\n store: store,\n searchAttr: \"name\",\n style: \"width: 130px;color: #FFF !important;background-color:#303030 !important\",\n onChange: function () {\n ValidateAveryFormat();\n }\n }, dojo.byId(\"cmbAveryLabels\"));\n dijit.byId(\"selectAvery\").textbox.readOnly = true;\n}", "title": "" }, { "docid": "b327afa868585548f7088076f2f65887", "score": "0.6021201", "text": "function comboListado() {\n listarInteres(1, cantidad.value, '', '')\n}", "title": "" }, { "docid": "d25f1cd9e14196b9c5d7c7de7738590b", "score": "0.5990602", "text": "function loadinvDocbaseType() {\n $.ajax({\n type: \"POST\",\n url: VIS.Application.contextUrl + \"PaymentAllocation/GetDocbaseType\",\n dataType: \"json\",\n success: function (data) {\n var result = JSON.parse(data);\n if (result) {\n $invDocbaseType.empty();\n $invDocbaseType.append(\"<option value='0'>Select</option>\");\n for (var i = 0; i < result.length; i++) {\n docBaseType = VIS.Utility.Util.getValueOfString(result[i].DocbaseType);\n docBaseName = VIS.Utility.Util.getValueOfString(result[i].Name);\n $invDocbaseType.append(\" <option value=\" + docBaseType + \">\" + docBaseName + \"</option>\");\n }\n }\n else {\n $invDocbaseType.append(\"<option value= '0'>Select</option>\");\n }\n $invDocbaseType.prop('selectedIndex', 0);\n },\n error: function (er) {\n console.log(er);\n }\n });\n }", "title": "" }, { "docid": "39505f5ef8160c2bf38e2289b708fc18", "score": "0.5990094", "text": "function cmbdepartemen(){\n var u = dir2;\n var d = 'aksi=cmb'+mnu2;\n ajax(u,d).done(function (dt){\n var opt='';\n if(dt.status!='sukses'){\n notif(dt.status,'red');\n }else{\n $.each(dt.departemen, function(id,item){\n opt+='<option value=\"'+item.replid+'\">'+item.nama+'</option>'\n });\n $('#departemenS').html(opt);\n cmbtahunajaran('filter','');\n }\n });\n }", "title": "" }, { "docid": "a438cb16c0c11ef8cb7cefc3f7d30e64", "score": "0.59832466", "text": "function cargaTipoExtra(numero) {\r\n\t// Consultar listado de extras definido\r\n\t$.ajax({\r\n\t\turl : '../TipoExtraController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"encontrarTodos\"\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (data) {\r\n\t\t\tvar listadoExtras = data.listadoTipoExtra;\r\n\t\t\t$.each(listadoExtras, function (index) {\r\n\t\t\t\t$(\"#tipoExtraOrigin\" + numero).append(\"<option value='\" + listadoExtras[index].nombre + \"' source='\" + listadoExtras[index].codigo + \"'>\" + listadoExtras[index].nombre + \"</option>\");\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "61cf6f8e317a2d127db4ac736a5c92e6", "score": "0.5981391", "text": "function listarComboTipoAfiliacion(){\n $.ajax({\n type:'POST',\n dataType: 'JSON',\n url:url+'Pacientes/CtrlRegistroPaciente/ListarComboTipoAfiliacion',\n data:{\"\":\"\"}\n }).done(function(x){\n $.each(x,function(z,y){\n $('#SlcTipoAfiliacion').append('<option value=\"'+y.idTipoAfiliacion+'\">'+y.descripcionAfiliacion+'</option>');\n })\n }).fail(function(){\n console.log(\"\");\n })\n\n}", "title": "" }, { "docid": "5feb291a5a5858f2b25b8f5088abc098", "score": "0.5976216", "text": "function seleccionar_especialidades(){\n $.ajax({\n type: \"POST\", \n data: null, \n url: \"../../core/controllers/scripts/especialidades.php?accion=seleccionar\", \n success: function (respuesta) {\n if(respuesta.registros.length > 0){\n //primera opcion del select que se armara\n var cmb_cuerpo = \"<option selected value='0'>Seleccionar...</option>\";\n //armando cuerpo del select\n respuesta.registros.forEach(registro => {\n cmb_cuerpo = cmb_cuerpo + '<option value=\"'+registro.Id_Especialidad+'\">'+registro.Especialidad+'</option>';\n });\n //seteando las opciones al select\n $(\"#cmb_especialidades\").html(cmb_cuerpo);\n }\n }, error: function(respuesta){\n console.log(\"Error:\");\n console.log(respuesta);\n }\n });\n}", "title": "" }, { "docid": "9826192c635990f2d805a3f959826a60", "score": "0.5963655", "text": "function cargarCiudades(seleccionada, provincia, tipo) {\r\n\tvar options = '<option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;Seleccione&nbsp;&nbsp;&nbsp;&nbsp;</option>';\r\n\r\n\t$.ajax({\r\n\t\turl : '../CiudadController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"encontrarPorProvincia\",\r\n\t\t\t\"provincia\" : provincia\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (datos) {\r\n\t\t\tfor (var i = 0; i < datos.ciudades.length; i++)\r\n\t\t\t\toptions += '<option value=\"' + datos.ciudades[i].id + '\">' + datos.ciudades[i].nombre + '</option>';\r\n\r\n\t\t\tif (tipo == \"\")\r\n\t\t\t\t$(\".ciudad\").html(options).val(seleccionada);\r\n\t\t\telse\r\n\t\t\t\t$(\"#ciudad_\" + tipo).html(options).val(seleccionada);\r\n\t\t}\r\n\t});\r\n\r\n}", "title": "" }, { "docid": "39e3af3588a4dd3b1d4e76b1f3a8d958", "score": "0.5963627", "text": "function cargarOrigenInspeccion(seleccionado) {\r\n\t$.ajax({\r\n\t\turl : '../DistanciaInspectorController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"encontrarOrigen\"\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (datos) {\r\n\t\t\tvar listadoOrigenInspector = datos.listadoOrigenInspector;\r\n\t\t\t$(\"#origenInspeccion\").append('<option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;Seleccione&nbsp;&nbsp;&nbsp;&nbsp;</option>');\r\n\t\t\t$.each(listadoOrigenInspector, function (index) {\r\n\t\t\t\t$(\"#origenInspeccion\").append('<option value=\"' + listadoOrigenInspector[index].origen + '\">' + listadoOrigenInspector[index].origen + '</option>');\r\n\t\t\t});\r\n\t\t\tif (seleccionado != null && seleccionado != '')\r\n\t\t\t\t$(\"#origenInspeccion\").val(seleccionado).attr(\"disabled\", \"disabled\");\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "398761a64d2a11ae7a4146f1d6e0188f", "score": "0.5942849", "text": "function selectComuni() {\n\t$.ajax({\n\t\t\"type\": \"GET\",\n\t\t\"url\": \"https://comuni-ita.herokuapp.com/api/comuni/provincia/\"+$('#provinciaIndirizzo').val()+\"?onlyname=true\",\n\t\tdataType: \"json\",\n\t\t\"success\": function(data) {\n\t\t\tdata.sort(function (a, b) {\n \t\t\t\treturn a.localeCompare(b);\n\t\t\t});\n\t\t\tvar html=\"\";\n\t\t\tfor(var i=0; i<data.length;i++){\n\t\t\t\thtml+=\"<option value=\\\"\"+data[i]+\"\\\">\"+data[i]+\"</option>\"\n\t\t\t}\n\t\t\t$(\"#cittaIndirizzo\").html(html);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "40368e244933e12b711a155e10d1ef3d", "score": "0.59200567", "text": "function core_comboPranchas(onde,id,marcar,funcao,id_atlas)\n{\n\tvar sUrl = \"../php/atlas.php?funcao=pegaPranchas&id_atlas=\"+id_atlas;\n\tvar callback =\n\t{\n\t\t\tsuccess:function(o)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tvar valores = YAHOO.lang.JSON.parse(o.responseText);\n\t\t\t\tif(arguments.length == 3)\n\t\t\t\t{funcao = \"\";}\n\t\t\t\tif (funcao != \"\")\n\t\t\t\t{funcao = \"onchange='\"+funcao+\"'\";}\n\t\t\t\tins = \"<div class='styled-select150'><select id='\"+id+\"' \"+funcao+\" >\";\n\t\t\t\tins += core_comboObjeto(valores,\"id_prancha\",\"titulo_prancha\",marcar);\n\t\t\t\tins += \"</select></div>\";\n\t\t\t\t$i(onde).innerHTML = ins;\n\t\t\t\t}\n\t\t\t\tcatch(e){core_handleFailure(e,o.responseText);}\n\t\t\t},\n\t\t\tfailure:core_handleFailure,\n\t\t\targument: { foo:\"foo\", bar:\"bar\" }\n\t};\n\tcore_makeRequest(sUrl,callback);\n}", "title": "" }, { "docid": "0fd20f6afce21f3c2b540838b3cf7b52", "score": "0.5911472", "text": "function cargaComboIndicadorAgrup(){\n\n\t var todos = GestionarMensaje('2641', null, null, null);\n\t var porLoMenosUno = GestionarMensaje('2636', null, null, null);\n\n\t var carga = new Array(3);\n\t carga[0] = ['', ''];\n\t carga[1] = ['T', todos];\n\t carga[2] = ['U', porLoMenosUno];\n\n\t set_combo('formulario.cbIndAgrup', carga);\n}", "title": "" }, { "docid": "4fb966b38a3b47f59e0d6cb4c6fba9dd", "score": "0.5909906", "text": "function obtener(id) {\n $.post(ruta() + \"obtener\" + globalName, {cmd: 'web', id: id}, function (json) {\n if (json['data']) {\n var Odatos = json['data'];\n\n document.getElementById(\"Eid\").value = Odatos.id;\n document.getElementById(\"Ecodigo\").value = Odatos.codigo;\n document.getElementById(\"Enombre\").value = Odatos.nombre;\n document.getElementById(\"Edescripcion\").value = Odatos.descripcion;\n\n // SIRVE PARA SABER SI ESTA ACTIVO O INACTIVO\n var option_categoria = \"<option value=''>Seleccionar Categoria</option>\";\n try {\n if (json['categories'] != null) {\n\n var categorias = json['categories'];\n for (var c = 0; c < categorias.length; c++) {\n\n var selected = \"\";\n if (Odatos.idcategoria == categorias[c].id) {\n selected = \"selected='selected'\";\n }\n option_categoria += \"<option \" + selected + \" data-subtext=' (\" + categorias[c].estado + \")' value='\" + categorias[c].id + \"'>\" + categorias[c].nombre + \"</option>\";\n }\n }\n } catch (err) {\n //console.error(err);\n }\n $(\"#Ecategoria\").html(option_categoria);\n $('#Ecategoria').selectpicker('refresh');\n\n\n // SIRVE PARA SABER SI ESTA ACTIVO O INACTIVO\n var option_estado = \"<option value='activo'>Activo</option>\";\n option_estado += \"<option value='inactivo' selected>Inactivo</option>\";\n if (Odatos.estado == \"activo\") {\n option_estado = \"<option value='activo' selected>Activo</option>\";\n option_estado += \"<option value='inactivo'>Inactivo</option>\";\n }\n $(\"#Eestado\").html(option_estado);\n }\n });\n}", "title": "" }, { "docid": "7d6879d420774d0d6284f5af55953df3", "score": "0.5901058", "text": "function cargarCboComprobante(valorDefecto){\n\t\tabrirCargando();\n\t\topc = 'CC_CV_01';\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\tdata:'opc='+opc,\n\t\t\turl: urlGeneral,\n\t\t\tsuccess: function(rpta){\t\t\t\t\n\t\t\t\t$('#cboComprobante').html(rpta);\n\t\t\t\t$('#cboComprobante').val(valorDefecto);\t\t\t\t\n\t\t\t\tcerrarCargando();\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\terror: function(rpta){\n\t\t\t\talert(rpta);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "7726f6afab08f775001037eddb2370e6", "score": "0.5893857", "text": "function cargarCboComprobanteCompra(valorDefecto){\n\t\tabrirCargando();\n\t\topc = 'CC_CV_02';\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\tdata:'opc='+opc,\n\t\t\turl: urlGeneral,\n\t\t\tsuccess: function(rpta){\t\t\t\n\t\t\t\t$('#cboComprobante').html(rpta);\n\t\t\t\t$('#cboComprobante').val(valorDefecto);\n\t\t\t\tfuncionSelect('#cboComprobante');\n\t\t\t\tcerrarCargando();\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\terror: function(rpta){\n\t\t\t\talert(rpta);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "ea0c40017c468f5f913b3a1abd333c89", "score": "0.5882299", "text": "function cargarPersonaEmisorParaSeleccionar(espaciomostraravance, iddelatabla) {\r\n\r\n espaciomostraravance.innerHTML += creadorloader('infodeemisorescarga', 'Cargando el listado de Emisores');\r\n document.getElementById(iddelatabla).innerHTML = \"\";\r\n $.ajax({\r\n url: urlconectar + 'Persona',\r\n type: 'GET',\r\n dataType: 'json',\r\n data: Persona,\r\n success: function (data, textStatus, xhr) {\r\n\r\n $(\"#infodeemisorescarga\").remove();\r\n espaciomostraravance.innerHTML += \"\";\r\n limpiarcampos();\r\n\r\n if (data.length > 0) {\r\n document.getElementById(iddelatabla).innerHTML += '<thead><tr id=\"filalistadocabeza' + iddelatabla + '\"></tr></thead>';\r\n\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Identificación</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Nombre</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Nombre Comercial</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Ubicación</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Teléfono</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Fax</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Correo Electrónico</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Seleccionar</th>';\r\n\r\n document.getElementById(iddelatabla).innerHTML += '<tbody id=\"listadocuerpo' + iddelatabla + '\"></tbody>';\r\n\r\n document.getElementById(iddelatabla).innerHTML += '';\r\n\r\n\r\n for (var indice in data) {\r\n var objetoserializado = JSON.stringify(data[indice]);\r\n var objetoserializadocomillas = \"\";\r\n for (var caracter in objetoserializado) {\r\n\r\n objetoserializadocomillas += objetoserializado[caracter].replace('\"', \"'\");\r\n\r\n }\r\n\r\n document.getElementById(\"listadocuerpo\" + iddelatabla).innerHTML += '<tr><td class=\"text-left\">' + data[indice].IdentificacionNumero1.Numero1 + '</td><td class=\"text-left\">' + data[indice].Nombre1 + '</td><td class=\"text-left\">' + data[indice].NombreComercial1 + '</td><td class=\"text-left\">' + data[indice].UbicacionID1.ID1 + data[indice].UbicacionID1.Provincia1 + data[indice].UbicacionID1.Canton1 + data[indice].UbicacionID1.Distrito1 + data[indice].UbicacionID1.Barrio1 + data[indice].UbicacionID1.OtrasSenas1 + '</td><td class=\"text-left\">' + data[indice].TelefonoNumero1.CodigoPais1 + '-' + data[indice].TelefonoNumero1.NumTelefono1 + '</td><td class=\"text-left\">' + data[indice].FaxNumero1.CodigoPais1 + '-' + data[indice].FaxNumero1.NumTelefono1 + '</td><td class=\"text-left\">' + data[indice].CorreoElectronico1 + '</td><td class=\"text-left\"><input type=\"button\" value=\"Seleccionar\" id=\"btnselecciona\" onclick=\"selectEmisorPersona(' + objetoserializadocomillas + ')\"/></td></tr>';\r\n\r\n }\r\n $('#' + iddelatabla).DataTable();\r\n\r\n\r\n }\r\n else {\r\n\r\n }\r\n\r\n },\r\n\r\n error: function (xhr, textStatus, errorThrown) {\r\n alert(xhr);\r\n limpiarcampos();\r\n espaciomostraravance.innerHTML += \"\";\r\n }\r\n });\r\n\r\n}", "title": "" }, { "docid": "787875720ac7ef1d36b4300d99d61943", "score": "0.5876912", "text": "function getTypes(){\n return filterField('Tipo');\n}", "title": "" }, { "docid": "91fab8510028b711a88918d3a9ba28c4", "score": "0.5875719", "text": "function atribuirEstados(json,combo){ \n\tfor(var i=0;i<json.length;i++){\n\t\tcombo.options[combo.length] = new Option( json[i].siglaEstado,json[i].idEstado );\n\t}\n}", "title": "" }, { "docid": "0c1e873184edb505cd8654ee64b660e8", "score": "0.58704764", "text": "function get_cidade_by_estado(id) {\n $.getJSON('cidade/get_cidade_by_estado/' + id, function(data) {\n var item = [];\n\n $.each(data,function(k, v) {\n item.push('<option value=' + v.cidade_id + '>' + v.cidade_nome + '</option>');\n });\n\n $('#cidade').empty().html(item.join(''));\n });\n}", "title": "" }, { "docid": "9ed67363a315eefca2ca32b517d43fae", "score": "0.5866106", "text": "function selecionar_responsables(id){\n\n if(responsables.length===0){//agreagar por primera vez\n getResponsableDB(id);\n }else{\n var selected = false;\n for(i=0; i<responsables.length; i++){\n if(responsables[i].id==id && responsables[i].type==$(\"#search_type\").val()){\n selected = true;\n break;\n }\n }\n if(!selected){//agregar al array\n getResponsableDB(id);\n }else{//eliminar del array desde checkbox, el tipo se saca de la select: search_type\n //auque el cbx se desecciona automaticamente cuando se actua sobre el mismo la funcion de desmarcar=eliminar\n borrar_responsable(id, $(\"#search_type\").val());\n }\n }\n //console.log(responsables);\n}", "title": "" }, { "docid": "e325f702d7b5d42d4c7aaf17c76ceb18", "score": "0.5863981", "text": "function mostrarCombo() {\n let parametros = {\n 'func': 'editar_combobox'\n }\n $.ajax({\n url: 'paso.php',\n method: 'post',\n data: parametros,\n success: function (data) {\n data = $.parseJSON(data);\n //muestra la opcion 0\n let resultado = '<option value=\"0\">Elige una opcion</option>';\n data.forEach(function (element) {\n resultado += '<option value=' + element.id + '>' + element.nombre + '</option>';\n });\n $('#lista_reproduccion').html(resultado);\n },\n error: function (xhr, status) {\n alert('Disculpe, existio un problema');\n }\n });\n}", "title": "" }, { "docid": "ea1c983bbd624c5f90c7be081775e080", "score": "0.586335", "text": "function cargarDetalleServicioaSelect(cargarselect) {\r\n\r\n $.ajax({\r\n url: urlconectar + 'DetalleServicio',\r\n type: 'GET',\r\n dataType: 'json',\r\n data: null,\r\n success: function (data, textStatus, xhr) {\r\n\r\n if (data.length > 0) {\r\n for (var indice in data) {\r\n\r\n cargarselect.innerHTML += '<option id=' + data[indice].Clave1.Clave1 + ' value=' + data[indice].Clave1.Clave1 + '>' + data[indice].Clave1.Clave1 + '</option>';\r\n\r\n }\r\n\r\n\r\n }\r\n else {\r\n }\r\n\r\n },\r\n\r\n error: function (xhr, textStatus, errorThrown) {\r\n alert(xhr);\r\n limpiarcampos();\r\n espaciomostraravance.innerHTML += \"\";\r\n }\r\n });\r\n\r\n}", "title": "" }, { "docid": "fe310cc94115c67f3a8842b54de35fa7", "score": "0.5855735", "text": "function CargarDoctores()\n{\n\t\t$.ajax({\n\t\t\turl:'Procesar.php?accion=CargarDoctoresXEspe&especialidad='+$('#cmbEspec').val(),\n\t\t\ttype:'GET',\n\t\t\tcache:false,\n\t\t\tsuccess:function(res)\n\t\t\t{\n\t\t\t\t$(\"#AreaDoctores\").html(res);\n\t\t\t},\n\t\t\terror:function()\n\t\t\t{\n\t\t\t\t$(\"#AreaDoctores\").html(\"error al cargar\");\n\t\t\t}\n\t\t});\t\n}", "title": "" }, { "docid": "715cf2adf4cf1b89c604e5f26f85d9cb", "score": "0.58493525", "text": "function cargar_clinicas() {\n $.ajax({\n type: 'POST',\n dataType: 'json',\n url: \"./scripts_php/clinicas_listar.php\",\n async: false,\n //estos son los datos que queremos actualizar, en json:\n // {parametro1: valor1, parametro2, valor2, ….}\n //data: { id_clinica: id_clinica, nombre: nombre, …., id_tarifa: id_tarifa },\n error: function(xhr, status, error) {\n //mostraríamos alguna ventana de alerta con el error\n },\n success: function(data) {\n jQuery.noticeAdd({\n text: 'Cargado desplegable de clínicas',\n stay: false,\n type: 'succes'\n });\n $(\"#clinica\").empty();\n $.each(data, function() {\n $(\"#clinica\").append($('<option></option>').val(this.id_clinica).html(this.nombre));\n });\n },\n complete: {\n //si queremos hacer algo al terminar la petición ajax\n }\n });\n }", "title": "" }, { "docid": "eb0a18ac0df5d10a36788ff85ca57adf", "score": "0.58488387", "text": "function getComboAsset() {\r\n\t\t\t$\r\n\t\t\t\t\t.get(\r\n\t\t\t\t\t\t\t\"http://localhost:8080/v1.0/assets?page=0&size=100&isCombo=true&property=pentaBaseAssetLevelOne,pentaBaseAssetCode,pentaBaseAssetUnit\",\r\n\t\t\t\t\t\t\tfunction(data, status) {\r\n\t\t\t\t\t\t\t\tloadTable(data.body.content);\r\n\t\t\t\t\t\t\t\tconsole.log(\"load table\");\r\n\t\t\t\t\t\t\t\tconsole.log(data.body.content);\r\n\t\t\t\t\t\t\t});\r\n\t\t}", "title": "" }, { "docid": "1429881956627ff44d58298f29884f84", "score": "0.5838249", "text": "function cargarSoportes() {\n $.ajax({\n type: 'POST',\n url: 'wsprivado/wsclasificacionsoporte.asmx/ObtenerDatos',\n data: {},\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: correcto\n });\n function correcto(msg) {\n var texto = '<option value=\"' + 0 + '\" selected>Seleccionar...</option>';\n $.each(msg.d, function () {\n texto += '<option value=\"' + this.id + '\">' + this.nombre + '</option>';\n });\n $('#tiposoporte').append(texto);\n }\n }", "title": "" }, { "docid": "1f21dca797a8ba8dac2b284855a02628", "score": "0.58348733", "text": "function cargaDedatos() {\n\t// cargaDeUserType();\n}", "title": "" }, { "docid": "4c287ed4d7d6ba71330663c13e3f44c1", "score": "0.58294445", "text": "function cmbsubtingkat(typ,tkt){\n var u = dir8;\n var d = 'aksi=cmb'+mnu8+'&tingkat='+$('#tingkatS').val();\n ajax(u,d).done(function (dt){\n var out='';\n if(dt.status!='sukses'){\n out+='<option value=\"\">'+dt.status+'</option>';\n }else{\n $.each(dt.subtingkat, function(id,item){\n out+='<option value=\"'+item.replid+'\">'+item.subtingkat+'</option>';\n });\n if(typ=='filter'){\n $('#subtingkatS').html(out);\n cmbbiaya('filter');\n }else{\n $('#subtingkatTB').html(out);\n }\n }\n });\n }", "title": "" }, { "docid": "8ef213b7af5cd03f32b4c47611c2f1c8", "score": "0.582539", "text": "function ObtenerFormaFiltrosReporteEstadoCrediticioClientes() {\n $(\"#divFiltrosReporteEstadoCrediticioClientes\").obtenerVista({\n nombreTemplate: \"tmplFiltrosReporteEstadoCrediticioClientesAsignados.html\",\n url: \"ReporteEstadoCrediticioClientesAsignados.aspx/ObtenerFormaFiltroReporteEstadoCrediticioClientes\",\n despuesDeCompilar: function(pRespuesta) {\n var Cliente = new Object();\n Cliente.pIdFiltroClientesAsignados = $(\"#cmbFiltroClientesAsignados\").val();\n ObtieneEstadoCrediticioCliente(JSON.stringify(Cliente));\n }\n });\n}", "title": "" }, { "docid": "895d2f7d2e41d39b4e50d32441423dc6", "score": "0.58133566", "text": "function cargarProvincias(seleccionada, tipo) {\r\n\tvar options = '<option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;Seleccione&nbsp;&nbsp;&nbsp;&nbsp;</option>';\r\n\r\n\t$.ajax({\r\n\t\turl : '../ProvinciaController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"encontrarTodos\"\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (datos) {\r\n\t\t\tfor (var i = 0; i < datos.listadoProvincia.length; i++)\r\n\t\t\t\toptions += '<option value=\"' + datos.listadoProvincia[i].codigo + '\">' + datos.listadoProvincia[i].nombre + '</option>';\r\n\r\n\t\t\tif (tipo == \"\")\r\n\t\t\t\t$(\".provincia\").html(options).val(seleccionada);\r\n\t\t\telse\r\n\t\t\t\t$(\"#provincia_\" + tipo).html(options).val(seleccionada);\r\n\t\t}\r\n\t});\r\n\r\n}", "title": "" }, { "docid": "c4f7d4b997a2d53b28de6e2173d6f057", "score": "0.5811752", "text": "function getCidade(url, combo_value, combo_name, div_cidades, cidade_selecionada)\n{\n //seta a url e os parâmetros a serem usamos pelo PHP\t \t\t\n var pars = \"/rnd/\" + Math.random() * 4;\n\n //utiliza objeto Ajax da biblioteca Prototype\n //Requisição Ajax\n $.ajax({\n url : url + pars, //URL de destino\n contentType : 'application/x-www-form-urlencoded; charset=UTF-8',\n data : \"&cod_uf=\" + combo_value,\n type : 'post',\n dataType : \"json\", //Tipo de Retorno\n success : function(json)\n {\n if (json.length > 0)\n {\n //Verifica se deu resposta\t\t\t\n var quantidade_cidades = json.length;\n\n //Monta a combo com o estado selecionado\n var combo_atualizada = \"<select name='\" + combo_name + \"' id='\" + combo_name + \"'>\";\n\n //Opção em branco\n combo_atualizada += \"<option value=''>--Selecione--</option>\";\n\n //popula a combo com as cidades do estado selecionado\n for(var i = 0; i < quantidade_cidades; i++)\n {\n //Verifica se esta é a cidade selecionada\n if ((cidade_selecionada != \"undefined\" || cidade_selecionada != null) && json[i]['cod_id'] == cidade_selecionada)\n {\n //Atribui a propriedade selected na combo\n var seleciona_cidade = \"selected='selected'\";\n }\n else\n {\n //Limpa a variavel para não inserir selected nas demais options\n seleciona_cidade = \"\";\n }\n\n //Adiciona os valores na combo \n combo_atualizada += \"<option value='\" + json[i]['cod_id'] + \"' \"+ seleciona_cidade + \">\"+ json[i]['txt_cidade'] + \"</option>\";\n }\n //Fecha a combo\n combo_atualizada += \"</select>\";\n\n //Joga a combo na respectiva div\t\t\t\t \n $('#' + div_cidades).html(combo_atualizada);\n }\n }\n });\n}", "title": "" }, { "docid": "65b19813815c9a31904a3eaab13009e6", "score": "0.5811709", "text": "function cargarActividades(seleccionada, tipo) {\r\n\t//var options = '<option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;Seleccione&nbsp;&nbsp;&nbsp;&nbsp;</option>';\r\n\t$.ajax({\r\n\t\turl : '../ActividadEconomicaController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"cargarSelect2\"\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (datos) {\r\n\r\n\t\t\tif (tipo == \"\")\r\n\t\t\t\t$('.actividad_economica').select2({\r\n\t\t\t\t\tdata : datos.listadoActividadesEconomicas,\r\n\t\t\t\t\tplaceholder : 'Seleccione una actividad econimica'\r\n\t\t\t\t}).select2(\"val\", seleccionada);\r\n\t\t\telse\r\n\t\t\t\t$(\"#actividad_economica_\" + tipo).select2({\r\n\t\t\t\t\tdata : datos.listadoActividadesEconomicas,\r\n\t\t\t\t\tplaceholder : 'Seleccione una actividad econimica'\r\n\t\t\t\t}).select2(\"val\", seleccionada);\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "65b19813815c9a31904a3eaab13009e6", "score": "0.5811709", "text": "function cargarActividades(seleccionada, tipo) {\r\n\t//var options = '<option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;Seleccione&nbsp;&nbsp;&nbsp;&nbsp;</option>';\r\n\t$.ajax({\r\n\t\turl : '../ActividadEconomicaController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"cargarSelect2\"\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (datos) {\r\n\r\n\t\t\tif (tipo == \"\")\r\n\t\t\t\t$('.actividad_economica').select2({\r\n\t\t\t\t\tdata : datos.listadoActividadesEconomicas,\r\n\t\t\t\t\tplaceholder : 'Seleccione una actividad econimica'\r\n\t\t\t\t}).select2(\"val\", seleccionada);\r\n\t\t\telse\r\n\t\t\t\t$(\"#actividad_economica_\" + tipo).select2({\r\n\t\t\t\t\tdata : datos.listadoActividadesEconomicas,\r\n\t\t\t\t\tplaceholder : 'Seleccione una actividad econimica'\r\n\t\t\t\t}).select2(\"val\", seleccionada);\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "e1cde5ea7ded404e51991bc7287cb43c", "score": "0.58075684", "text": "function cambioProvincia(e) {\n var idProvincia = e.value;\n var sCantones = document.getElementById(\"cantones\");\n var sDistritos = document.getElementById(\"distritos\");\n var ajax = ajaxC();\n ajax.open(\"POST\", \"./clienteaction.do\", true); //Cambiar por la clase.do real\n ajax.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n ajax.send(\"metodo=getCantones&idProvincia=\" + idProvincia);\n ajax.onreadystatechange = function () {\n if (ajax.readyState === 4) {\n var cantones = JSON.parse(ajax.responseText); //Transformar String en objeto\n sCantones.innerHTML = \"\"; //Limpiar select de cantones\n sDistritos.innerHTML = \"\";//Limpiar select de Distritos\n var canton = document.createElement(\"option\");\n canton.value = 0;\n canton.text = \"Seleccione\";\n sCantones.appendChild(canton);\n for (var i = 1; i < cantones.length; i++) {\n var canton = document.createElement(\"option\");\n canton.value = cantones[i].idCanton; //cambiar por id canton\n canton.text = cantones[i].nombre; //cambiar por nombre canton\n sCantones.appendChild(canton);\n }\n }\n };\n}", "title": "" }, { "docid": "3cfade72d8e9f97e88885933efaf662b", "score": "0.58054084", "text": "function cargarMunicipios(estado) {\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'Clientes/ObtenerMunicipios',\n\t\tdataType: 'json',\n\t\tasync: false,\n\t\tdata: { estado: estado },\n\t\tsuccess: function (response) {\n\t\t\t$('#inMunicipio').empty();\n\t\t\t$.each(response, function (index, item) {\n\t\t\t\t$('#inMunicipio').append(\"<option value='\" + item.lonidmunicipio + \"'>\" + item.strnombre + \"</option>\")\n\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "6c2ada57afe749c540182a3fd119ae9d", "score": "0.5800317", "text": "function cargarPersonaaSelect(cargarselect) {\r\n\r\n $.ajax({\r\n url: urlconectar + 'Persona',\r\n type: 'GET',\r\n dataType: 'json',\r\n data: null,\r\n success: function (data, textStatus, xhr) {\r\n\r\n if (data.length > 0) {\r\n for (var indice in data) {\r\n\r\n cargarselect.innerHTML += '<option id=' + data[indice].IdentificacionNumero1.Numero1 + ' value=' + data[indice].IdentificacionNumero1.Numero1 + '>' + data[indice].IdentificacionNumero1.Numero1 + ' ' + data[indice].Nombre1 + '</option>';\r\n\r\n }\r\n\r\n\r\n }\r\n else {\r\n }\r\n\r\n },\r\n\r\n error: function (xhr, textStatus, errorThrown) {\r\n alert(xhr);\r\n limpiarcampos();\r\n espaciomostraravance.innerHTML += \"\";\r\n }\r\n });\r\n\r\n}", "title": "" }, { "docid": "326586f005aa1bdf886bed95e45a6663", "score": "0.5799533", "text": "function cargarNaturalezaDescuentoaSelect(cargarselect) {\r\n\r\n $.ajax({\r\n url: urlconectar + 'Descuento',\r\n type: 'GET',\r\n dataType: 'json',\r\n data: null,\r\n success: function (data, textStatus, xhr) {\r\n\r\n if (data.length > 0) {\r\n for (var indice in data) {\r\n\r\n cargarselect.innerHTML += '<option id=' + data[indice].NaturalezaDescuento + ' value=' + data[indice].NaturalezaDescuento + '>' + data[indice].NaturalezaDescuento + '</option>';\r\n\r\n }\r\n }\r\n else {\r\n }\r\n\r\n },\r\n\r\n error: function (xhr, textStatus, errorThrown) {\r\n alert(xhr);\r\n limpiarcampos();\r\n espaciomostraravance.innerHTML += \"\";\r\n }\r\n });\r\n\r\n}", "title": "" }, { "docid": "b7496d8966688da6100a86202f1ae4cd", "score": "0.579666", "text": "function loadpayDocbaseType() {\n $.ajax({\n type: \"POST\",\n url: VIS.Application.contextUrl + \"PaymentAllocation/GetpayDocbaseType\",\n dataType: \"json\",\n success: function (data) {\n var result = JSON.parse(data);\n if (result) {\n $payDocbaseType.empty();\n $payDocbaseType.append(\"<option value='0'>Select</option>\");\n for (var i = 0; i < result.length; i++) {\n docbaseType = VIS.Utility.Util.getValueOfString(result[i].DocbaseType);\n docBaseName = VIS.Utility.Util.getValueOfString(result[i].Name);\n $payDocbaseType.append(\" <option value=\" + docbaseType + \">\" + docBaseName + \"</option>\");\n }\n }\n else {\n $payDocbaseType.append(\"<option value='0'>Select</option>\");\n }\n $payDocbaseType.prop('selectedIndex', 0);\n },\n error: function (er) {\n console.log(er);\n }\n });\n }", "title": "" }, { "docid": "2ea101928281fcfef6aa177d177e85a2", "score": "0.57925355", "text": "function loadAccesos(accesos){\n // var elementos = new Array();\n var elementos=accesos;\n var contenedor = document.getElementById(\"selectAcceso\");\n for(var i=0; i<elementos.length;i++){\n var opcion = document.createElement(\"option\");\n opcion.setAttribute(\"value\",elementos[i].id);\n opcion.innerHTML=elementos[i].descripcion;\n\n contenedor.appendChild(opcion);\n // console.log(opcion);\n }\n}", "title": "" }, { "docid": "8107024802bb8d677f99f5dee4c7b84d", "score": "0.5786943", "text": "function pgdoc_cmbstipo_documento_codigo__init(){\n $(\"#pgdoc_cmbstipo_documento_codigo\").html('');\n \n $.post(\"../../controller/servicio.php?op=ctrl_apr_web_tipo_documento_select\", function(data, status){\n $(\"#pgdoc_cmbstipo_documento_codigo\").html(data);\n $(\"#pgdoc_cmbstipo_documento_codigo\").selectpicker('refresh');\n });\n}", "title": "" }, { "docid": "74fc60e3fe18fe172734bb343b0ad7b3", "score": "0.57819223", "text": "function cargarEstados() {\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'Clientes/ObtenerEstados',\n\t\tdataType: 'json',\n\t\tasync: false,\n\t\tsuccess: function (response) {\n\t\t\t$('#inEstado').empty();\n\t\t\t$.each(response, function (index, item) {\n\t\t\t\t$('#inEstado').append(\"<option value='\" + item.lonidestado + \"'>\" + item.strnombre + \"</option>\")\n\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "656e75ca59cdc1b9476c59bcb9956b7f", "score": "0.5780329", "text": "function cargarColores(id, numero) {\r\n\t$.ajax({\r\n\t\turl : '../ColorController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"cargaSelect2\"\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (data) {\r\n\r\n\t\t\tvar colores = data.listadoColor;\r\n\r\n\t\t\t$('#color_' + numero).select2({\r\n\t\t\t\tdata : colores,\r\n\t\t\t\tplaceholder : 'Seleccione un color'\r\n\r\n\t\t\t});\r\n\r\n\t\t\tif (numero != null)\r\n\t\t\t\t$('#color_' + numero).select2(\"val\", id).attr('required', 'required');\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "176b3d741652d3d409a97c61b5005366", "score": "0.57792395", "text": "function cargarSucursales(seleccionada, numero) {\r\n\t$.ajax({\r\n\t\turl : '../SucursalController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"encontrarSucursalesActivas\",\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (data) {\r\n\t\t\tvar options = '';\r\n\t\t\toptions = '<option value=\"\">&nbsp;&nbsp;Seleccione</option>';\r\n\r\n\t\t\tfor (var i = 0; i < data.sucursales.length; i++) {\r\n\t\t\t\toptions += '<option value=\"' + data.sucursales[i].id + '\">' + data.sucursales[i].nombre + '</option>';\r\n\t\t\t}\r\n\t\t\t$(\"#sucursales\" + numero.toString()).html(options).val(seleccionada).attr('required', 'required');\r\n\r\n\t\t}\r\n\r\n\t});\r\n}", "title": "" }, { "docid": "92ad0f1644a9f03f37a889b97d74dd7e", "score": "0.5778471", "text": "function cargarDescuentos(seleccionada) {\r\n\t$.ajax({\r\n\t\turl : '../DescuentoController',\r\n\t\tdata : {\r\n\t\t\t\"tipoConsulta\" : \"encontrarTodos\"\r\n\t\t},\r\n\t\ttype : 'post',\r\n\t\tdatatype : 'json',\r\n\t\tsuccess : function (data) {\r\n\t\t\tvar listadoDescuento = data.listadoDescuento;\r\n\t\t\tvar options = '<option value=\"\">Seleccione un tipo de descuento descuento </option>';\r\n\t\t\t$.each(listadoDescuento, function (index) {\r\n\t\t\t\toptions += \"<option value=\" + listadoDescuento[index].codigo + \">\" + listadoDescuento[index].nombre + \"</option>\";\r\n\t\t\t});\r\n\t\t\t$(\"#codigo_descuento\").html(options).val(seleccionada);\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "b64b5b7cd92cb5c9bf24977dea8a943e", "score": "0.5768007", "text": "function atualizaComboEmpresaCadastro(){\n\tvar oPagina = new XMLHttpRequest();\n\n\twith(oPagina){\n\n\t\topen('GET', './src/CrudCadastro.php?funcao=comboCadastro');\n\n\t\tsend();\n\n\t\tonload = function(){\n\n\t\t\tvar oDados = JSON.parse(responseText);\n\n\n\t\t\tvar r = document.getElementById(\"cmbEmpresaSelecao\");\n\t\t\tvar optionr = document.createElement(\"option\");\n\t\t\toptionr.text = \"Todas...\";\n\t\t\tr.add(optionr);\n\n\t\t\tvar contador2 = document.getElementById(\"cmbEmpresaSelecao\").length;\n\n\t\t\tfor (i = 0; i <=contador2; i++) {\n\t\t\t\tvar combinho2 = document.getElementById(\"cmbEmpresaSelecao\");\t\n\t\t\t\tcombinho2.remove(combinho2.i);\n\t\t\t}\n\n\t\t\toptionr.text = \"Todas\";\n\t\t\toptionr.value = 0;\n\n\t\t\tr.add(optionr);\n\n\t\t\tfor (var i = 0; i<oDados.length; i++){\n\t\t\t\tvar r = document.getElementById(\"cmbEmpresaSelecao\");\n\t\t\t\tvar optionr = document.createElement(\"option\");\n\t\t\t\toptionr.text = oDados[i]['EMP_NOME_EMPRESA'];\n\t\t\t\toptionr.value = oDados[i]['EMP_COD'];\n\t\t\t\tr.add(optionr);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "796fb1d4f3589c086c4e95a5121bbc3f", "score": "0.5765856", "text": "function autocompletar()\n{\n var locales=new Array();\n locales.push({id:1, value:\"MCDonals\"});\n locales.push({id:2, value:\"El corral\"});\n locales.push({id:3, value:\"El Exito\"});\n var url=\"\";\n var datos={\n \n };\n var xml=ajax(url,datos);\n if(xml!=null)\n {\n $(\"\",xml).each(function()\n {\n var idC,nombreC;\n locales.push({id: idC,value:nombreC});\n });\n }\n\n $( \"#nombreCentroComercial\" ).autocomplete({\n source: locales,\n select: function(event,ui)\n {\n //Envio al usuario a la vista 3\n redirigir(\"5a.html?idCentroComercial=\"+ui.item.id);\n }\n });\n}", "title": "" }, { "docid": "aa58ad24fe15166d74931da8a4069309", "score": "0.57622534", "text": "function cargarFacturaaSelect(cargarselect) {\r\n\r\n $.ajax({\r\n url: urlconectar + 'Factura',\r\n type: 'GET',\r\n dataType: 'json',\r\n data: null,\r\n success: function (data, textStatus, xhr) {\r\n\r\n if (data.length > 0) {\r\n for (var indice in data) {\r\n\r\n cargarselect.innerHTML += '<option id=' + data[indice].Clave1 + ' value=' + data[indice].Clave1 + '>' + data[indice].Clave1 + '</option>';\r\n\r\n }\r\n\r\n\r\n }\r\n else {\r\n }\r\n\r\n },\r\n\r\n error: function (xhr, textStatus, errorThrown) {\r\n alert(xhr);\r\n limpiarcampos();\r\n espaciomostraravance.innerHTML += \"\";\r\n }\r\n });\r\n\r\n}", "title": "" }, { "docid": "2c87dbaf6f976db9f90a27ce61ed8e56", "score": "0.57588714", "text": "function cargarCgg_res_informe_testigoCtrls(){\n if(inRecordCgg_res_informe_testigo){\n txtCrint_codigo.setValue(inRecordCgg_res_informe_testigo.get('CRINT_CODIGO'));\n txtCrmtr_codigo.setValue(inRecordCgg_res_informe_testigo.get('CRMTR_CODIGO'));\n numCrint_numero.setValue(inRecordCgg_res_informe_testigo.get('CRINT_NUMERO'));\n txtCrint_observacion.setValue(inRecordCgg_res_informe_testigo.get('CRINT_OBSERVACION'));\n isEdit = true;\n habilitarCgg_res_informe_testigoCtrls(true);\n }}", "title": "" }, { "docid": "0a52ff7613f6e393c1b35f3f97db0835", "score": "0.57585764", "text": "function cargarCboPacientes(){\n\t\tabrirCargando();\n\t\topc = 'CC_PAC_01';\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\tdata:'opc='+opc,\n\t\t\turl: urlGeneral,\n\t\t\tsuccess: function(rpta){\t\t\t\n\t\t\t\t$('#cboPacientes').html(rpta);\n\t\t\t\tfuncionSelect('#cboPacientes');\t\t\t\t\n\t\t\t\tcerrarCargando();\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\terror: function(rpta){\n\t\t\t\talert(rpta);\n\t\t\t\tcerrarCargando();\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "5698ca1f86110b1e55f4714885650611", "score": "0.5757882", "text": "function cargarCboParametro(parametroID,combo,valorDefecto){\n\tvar opc = 'CC_CP';\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata:'opc='+opc+'&parametroID='+parametroID,\n\t\t\t\turl: urlGeneral,\n\t\t\t\tsuccess: function(rpta){\n\t\t\t\t\t$(combo).html(rpta);\n\t\t\t\t\t$(combo).val(valorDefecto);\n\t\t\t\t},\n\t\t\t\terror: function(rpta){\n\t\t\t\t\talert(rpta);\n\t\t\t\t}\n\t\t\t});\n\t}", "title": "" }, { "docid": "556ca5509ae78b4daa636c2939db2bcb", "score": "0.5755121", "text": "function get_cidade_by_estado_edit(id) {\n $.getJSON('cidade/get_cidade_by_estado/' + id, function(data) {\n var item = [];\n\n $.each(data,function(k, v) {\n item.push('<option value=' + v.cidade_id + '>' + v.cidade_nome + '</option>');\n });\n\n $('.pessoa_cidade').empty().html(item.join(''));\n });\n}", "title": "" }, { "docid": "4ac64bab0799705e3c986980a0505224", "score": "0.575454", "text": "function loadCategoriasSelect(i) {\r\n\r\n clearCategoriasSelect(i);\r\n sortCategorias();\r\n $.each(alistCategorias, function (index, categoria) {\r\n var se = document.getElementsByClassName(\"nuevaCategoriaSelect\").item(i);\r\n var option = document.createElement(\"option\");\r\n option.text = categoria.descripcion;\r\n option.id = categoria.idCategoria;\r\n se.add(option);\r\n });\r\n}", "title": "" }, { "docid": "98e208586c31a42c7c9614e8b716112a", "score": "0.5753757", "text": "function cargar_item_tipo(id_ciudad,id_tipo) {\r\r\n \r\r\n var id_ciudad = id_ciudad;\r\r\n var id_tipo = id_tipo;\r\r\n\r\r\n\t //arrTemp = arrId.split(\",\");\t\t\r\r\n\t ajax = creaAjax();\t\r\r\n\r\r\n \t// Va al servidor y trae la info de la propiedad sin reload\r\r\n \tajax.open(\"POST\", \"ajax/ax_items_tipo.php?id_ciudad=\"+id_ciudad+\"&id_tipo=\"+id_tipo, true);\r\r\n \tajax.onreadystatechange = function() {\r\r\n \r\r\n\t // se conecto, devuelve el texto con las propiedades\r\r\n if (ajax.readyState==4) \r\r\n {\r\r\n \r\r\n \t //arrInfoWin = ajax.responseText.split(\",\"); \r\r\n \t var respuesta = ajax.responseText;\r\r\n \t\tarrTemp = convertirTextToArray(respuesta);\r\r\n alert(respuesta);\r\r\n for( i=0; i < arrTemp.length; i++) {\r\r\n\t\t\t\t var property = new PropiedadMapaUser();\r\r\n \t \t\t\tproperty.idx = arrTemp[i][0];\r\r\n \t \t\t\tproperty.titulo = arrTemp[i][1];\r\r\n \t \t\t\tproperty.imagen = arrTemp[i][2];\r\r\n \t \t\t\tproperty.direccion = arrTemp[i][3];\r\r\n \t \t\t\tproperty.mapa_direccion = arrTemp[i][4];\r\r\n \t \t\t\tproperty.latitude = arrTemp[i][5];\r\r\n \t \t\t\tproperty.longitude = arrTemp[i][6];\r\r\n \t \t\t\tproperty.tipo = arrTemp[i][7]; // item\r\r\n \t \t\t\t//property.tipo_clave = arrTemp[i][8]; // tipo de alojamiento\r\r\n \r\r\n if(arrTemp[i][5] && arrTemp[i][6]) {\r\r\n addPropertyToMapCiudad( map, arrTemp[i][5], arrTemp[i][6], property );\r\r\n }\r\r\n \r\r\n \t } // end for \r\r\n \t \t\t\t\r\r\n \t // propiedad_div.innerHTML=arrInfoWin;\r\r\n \t // return arrInfoWin;\r\r\n \r\r\n } // readyState==4\r\r\n } // f\r\r\n ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');\r\r\n ajax.send(null);\r\r\n return;\r\r\n} // end func", "title": "" }, { "docid": "f892a9e429136179df790cb5662c037a", "score": "0.57485837", "text": "function cargarCgg_gem_vacanteCtrls() {\n if (inRecordCgg_gem_vacante) {\n txtCgvcn_codigo=inRecordCgg_gem_vacante.get('CGVCN_CODIGO');\n cbxCgtcn_codigo.setValue(inRecordCgg_gem_vacante.get('CGTCN_CODIGO'));\n cbxCgtsa_codigo.setValue(inRecordCgg_gem_vacante.get('CGTSA_CODIGO')); \n\t\t\t//cbxCsctp_codigo.setValue(inRecordCgg_gem_vacante.get(\"CSCTP_CODIGO\"));\t\t\t\t\t\t\n\t\t\t\n\t\t\tvar tmpJson = inRecordCgg_gem_vacante.get('CGVCN_TITULO');\t\t\t\n\t\t\ttry{\n\t\t\t\ttmpExtras=eval(\"(\"+tmpJson+\")\");\n\t\t\t}catch(ex){\n\t\t\t}\t\n\t\t\ttxtCgcrg_codigo_COD = inRecordCgg_gem_vacante.get('CGCRG_CODIGO');\n\t\t\ttxtCgcrg_codigo_TXT = inRecordCgg_gem_vacante.get('CGCRG_NOMBRE');\n\t\t\tif (txtCgcrg_codigo_COD==\"CGCRG0\"){\n\t\t\t\ttxtCgcrg_codigo_TXT = tmpExtras.cargo;\n\t\t\t}\n\t\t\ttxtCgcrg_codigo.setValue(txtCgcrg_codigo_TXT);\n\t\t\t\n\t\t\tbtnRevisarCgg_gem_vacante.setVisible((tmpExtras.msg.length!=0)?true:false);\n \n\t\t\ttxtCgvcn_titulo_profesional_COD = inRecordCgg_gem_vacante.get('CGTPR_CODIGO')\n\t\t\ttxtCgvcn_titulo_profesional_TXT = inRecordCgg_gem_vacante.get('CGTPR_DESCRIPCION')\n\t\t\tif (txtCgvcn_titulo_profesional_COD==\"CGTPR0\"){\t\t\t\t\n\t\t\t\ttxtCgvcn_titulo_profesional_TXT = tmpExtras.titulo;\n\t\t\t}\n\t\t\ttxtCgvcn_titulo_profesional.setValue(txtCgvcn_titulo_profesional_TXT);\n \n\t\t\ttxtCgvcn_descripcion.setValue(inRecordCgg_gem_vacante.get('CGVCN_DESCRIPCION'));\n numCgvcn_salario.setValue(inRecordCgg_gem_vacante.get('CGVCN_SALARIO'));\n txtCgvcn_direccion_isla.setValue(inRecordCgg_gem_vacante.get('CGVCN_DIRECCION'));\n dtCgvcn_fecha_ingreso.setValue(inRecordCgg_gem_vacante.get('CGVCN_FECHA_INGRESO')); \n numCgvcn_numero_vacantes.setValue(inRecordCgg_gem_vacante.get('CGVCN_NUMERO_VACANTES'));\n cbxCgvcn_duracion.setValue(inRecordCgg_gem_vacante.get('CGVCN_DURACION'));\n numCgvcn_duracion_tiempo.setValue(inRecordCgg_gem_vacante.get('CGVCN_DURACION_TIEMPO')); \n isEdit = true;\n gsCgg_gem_requisito_vacante.reload({params: {inCgvcn_codigo: inRecordCgg_gem_vacante.get('CGVCN_CODIGO')}});\n\t\t\t\t\n }\n }", "title": "" }, { "docid": "d507bb5d1c2516f941c277ef45231c43", "score": "0.574415", "text": "function cargarImpuestoParaSeleccionar(espaciomostraravance, iddelatabla) {\r\n\r\n espaciomostraravance.innerHTML += creadorloader('infodeimpuestocarga', 'Cargando el listado de Impuestos');\r\n document.getElementById(iddelatabla).innerHTML = \"\";\r\n $.ajax({\r\n url: urlconectar + 'Impuesto',\r\n type: 'GET',\r\n dataType: 'json',\r\n data: Impuesto,\r\n success: function (data, textStatus, xhr) {\r\n\r\n $(\"#infodeimpuestocarga\").remove();\r\n espaciomostraravance.innerHTML += \"\";\r\n limpiarcampos();\r\n\r\n if (data.length > 0) {\r\n impuestoscargados = data;\r\n document.getElementById(iddelatabla).innerHTML += '<thead><tr id=\"filalistadocabeza' + iddelatabla +'\"></tr></thead>';\r\n\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Código de Impuesto</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Código de Tarifa</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Tarifa</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Factor IVA</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Monto de Impuesto</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Monto de Exportación</th>';\r\n document.getElementById(\"filalistadocabeza\" + iddelatabla).innerHTML += '<th>Seleccionar</th>';\r\n\r\n\r\n document.getElementById(iddelatabla).innerHTML += '<tbody class=\"table-hover\" id=\"listadocuerpo' + iddelatabla + '\"></tbody>';\r\n\r\n for (var indice in data) {\r\n\r\n document.getElementById(\"listadocuerpo\" + iddelatabla).innerHTML += '<tr><td>' + data[indice].Codigo1 + '</td><td>' + data[indice].CodigoTarifa1 + '</td><td>' + data[indice].Tarifa1 + '</td><td>' + data[indice].FactorIVA1 + '</td><td>' + data[indice].Monto1 + '</td><td>' + data[indice].MontoExportacion1 + '</td><td><input type=\"button\" value=\"Seleccionar\" id=\"btnselecciona\" onclick=\"selectImpuestoLineaDetalle(' + data[indice].Codigo1 + ')\"/></td></tr>';\r\n\r\n }\r\n $('#' + iddelatabla).DataTable();\r\n\r\n\r\n }\r\n else {\r\n\r\n }\r\n\r\n },\r\n\r\n error: function (xhr, textStatus, errorThrown) {\r\n alert(xhr);\r\n limpiarcampos();\r\n espaciomostraravance.innerHTML += \"\";\r\n }\r\n });\r\n\r\n}", "title": "" }, { "docid": "c57bbee5c20e715301f27b6ec166d8a7", "score": "0.574343", "text": "function getFOptions_Proceso_py(idSelectOrigen, idSelectDestino, idChkDestino, nomina, codorganismo, opt,CodProyeccion,CodTipoNom,Periodo) {\n\tvar selectOrigen=document.getElementById(idSelectOrigen);\n\tvar optSelectOrigen=selectOrigen.options[selectOrigen.selectedIndex].value;\n\tvar selectDestino=document.getElementById(idSelectDestino);\n\tvar chkDestino=document.getElementById(idChkDestino);\n\tif (optSelectOrigen==\"\") {\n\t\tselectDestino.length=0;\n\t\tnuevaOpcion=document.createElement(\"option\");\n\t\tnuevaOpcion.value=\"\";\n\t\tnuevaOpcion.innerHTML=\"\";\n\t\tselectDestino.appendChild(nuevaOpcion);\n\t} else {\n\t\t//\tCREO UN OBJETO AJAX PARA VERIFICAR QUE EL NUEVO REGISTRO NO EXISTA EN LA BASE DE DATOS\n\t\tvar ajax=nuevoAjax();\n\t\tajax.open(\"POST\", \"lib/SelectsControlador.php\", true);\n\t\tajax.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\tajax.send(\"accion=PROCESO&tabla=\"+idSelectDestino+\"&opcion=\"+optSelectOrigen\n\t\t +\"&nomina=\"+nomina+\"&codorganismo=\"+codorganismo+\"&opt=\"+opt\n\t\t +\"&CodProyeccion=\"+CodProyeccion+\"&CodTipoNom=\"+CodTipoNom+\"&Periodo=\"+Periodo);\n\t\tajax.onreadystatechange=function() {\n\t\t\tif (ajax.readyState==4)\t{\n\t\t\t\tselectDestino.parentNode.innerHTML=ajax.responseText;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "88ded949026fa21f931e57a8bb0b0a7b", "score": "0.5742528", "text": "function criaUnidade() {\n var idItemContrato = $('#formItemContrato option:selected').val();\n var encontrouItem = false;\n\n for (var i in itens_contrato) {\n if (itens_contrato.hasOwnProperty(i) && itens_contrato[i]['id_item_contrato'] == idItemContrato) {\n $('#formUnidade').html(unidades[itens_contrato[i]['unidade_padrao_id']]['nome']);\n encontrouItem = true;\n break;\n }\n }\n if (!encontrouItem) {\n $('#formUnidade').empty();\n }\n }", "title": "" }, { "docid": "485264bbda7fce429a52dea63e8b8d76", "score": "0.5736083", "text": "function getMendatoryTypeData() {\n $cmbattsectmandtype.empty();\n VIS.dataContext.getJSONData(VIS.Application.contextUrl + \"VA005/AttributeListing/GetMandatoryType\", \"\", MandatoryTypeCallBack);\n\n //var sql = \"SELECT AD_Ref_list.Name, AD_Ref_list.value\" +\n // \" FROM AD_Ref_list\" +\n // \" JOIN AD_Reference\" +\n // \" ON AD_Ref_List.AD_Reference_ID=AD_Reference.AD_Reference_ID\" +\n // \" WHERE AD_Reference.Name='M_AttributeSet MandatoryType' AND ad_ref_list.isactive='Y'\";\n //var ds = VIS.DB.executeReader(sql.toString(), null);\n //if (ds != null) {\n // var key, value = null;\n // while (ds.read()) {\n // value = ds.getString(0);\n // key = ds.getString(1);\n // $cmbattsectmandtype.append($(\"<Option value=\" + key + \">\" + value + \"</option>\"));\n // }\n // ds.close();\n //}\n }", "title": "" }, { "docid": "12399d71e80f13d340e81dc3e6117dbd", "score": "0.5734418", "text": "function addActividad(obj, cod_indicador, cod_unidad, cod_area) {\n numFilas++;\n cantidadItems++;\n \n document.getElementById(\"cantidad_filas\").value=numFilas;\n\n console.log(\"num: \"+numFilas+\" cantidadItems: \"+cantidadItems);\n fi = document.getElementById('fiel');\n contenedor = document.createElement('div');\n contenedor.id = 'div'+numFilas; \n fi.type=\"style\";\n fi.appendChild(contenedor);\n var divDetalle;\n divDetalle=document.getElementById(\"div\"+numFilas);\n ajax=nuevoAjax();\n ajax.open(\"GET\",\"poa/ajaxActividades.php?cod_indicador=\"+cod_indicador+\"&cod_unidad=\"+cod_unidad+\"&cod_area=\"+cod_area+\"&codigo=\"+numFilas,true);\n ajax.onreadystatechange=function(){\n if (ajax.readyState==4) {\n divDetalle.innerHTML=ajax.responseText;\n $('.selectpicker').selectpicker([\"refresh\"]);\n }\n } \n ajax.send(null);\n}", "title": "" } ]
97ea8dd67688c7b12bb06c5a1bfece99
Sets the color picker values from the input
[ { "docid": "4d8ebe61ff763f582af724a9e457965f", "score": "0.66830194", "text": "function updateFromInput(input, preserveInputValue) {\n\n var hex,\n hsb,\n x, y, r, phi,\n\n // Helpful references\n colourpicker = input.parent(),\n settings = input.data('colourpicker-settings'),\n\n // Panel objects\n grid = colourpicker.find('.colourpicker-grid'),\n slider = colourpicker.find('.colourpicker-slider'),\n\n // Picker objects\n gridPicker = grid.find('[class$=-picker]'),\n sliderPicker = slider.find('[class$=-picker]');\n\n // Determine hex/HSB values\n hex = parseHexAllowed(input);\n if( !hex ){\n hex = getLastVal(input);\n }\n hsb = hex2hsb(hex);\n \n // Update input value\n if( !preserveInputValue ) input.val(hex);\n\n // Update text colour and background colour\n switch (settings.showColour) {\n case \"text\":\n input.css('color', '');\n input.css('background-color', '');\n break;\n case \"background\":\n input.css('color', \"transparent\");\n input.css('background-color', hex);\n break;\n default:\n input.css('color', isColDark(hex) ? '#ddd' : '#000');\n input.css('background-color', hex);\n }\n\n // Update select colour\n if( settings.palette == 'limited') {\n colourpicker.find('.cp-list-col').removeClass('selected-col');\n colourpicker.find('.cp-list-col[data-cp-col=' + hex + ']')\n .addClass('selected-col')\n .addClass(isColDark(hex) ? 'dark' : 'light');\n }\n \n // Set grid position\n x = keepWithin(Math.ceil(hsb.s / (100 / grid.width())), 0, grid.width());\n y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 / grid.height())), 0, grid.height());\n gridPicker.css({\n top: y + 'px',\n left: x + 'px'\n });\n\n // Set slider position\n y = keepWithin(slider.height() - (hsb.h / (360 / slider.height())), 0, slider.height());\n sliderPicker.css('top', y + 'px');\n\n // Update panel color\n grid.css('backgroundColor', hsb2hex({ h: hsb.h, s: 100, b: 100 }));\n\n // Fire change event, but only if colourpicker is fully initialized\n if( input.data('colourpicker-initialized') ) {\n doChange(input, hex, input.data('transparent'));\n }\n if( input.data('transparent') ) {\n colourpicker.find('.colourpicker-istransparent').prop('checked', true);\n colourpicker.addClass('istransparent');\n } else {\n colourpicker.find('.colourpicker-istransparent').prop('checked', false);\n colourpicker.removeClass('istransparent');\n }\n\n input.trigger('change').trigger('input');\n }", "title": "" } ]
[ { "docid": "a6b23a2de7c89e709dd51a52cef1e6eb", "score": "0.78310627", "text": "function setColor(){\n userColor = colorPicker.value\n drawCCvs()\n loop()\n}", "title": "" }, { "docid": "e7258622662cbd08f95856f03e4f2fe6", "score": "0.76686406", "text": "function update_color(){\n r = red_slider.value;\n g = green_slider.value;\n b = blue_slider.value;\n choosen_color = [r,g,b];\n}", "title": "" }, { "docid": "cbb2e6d6a407df8651081ec37cbe787a", "score": "0.73374707", "text": "function changeColor () {\n\tcolorValue = document.getElementById(\"colorPicker\").value;\n}", "title": "" }, { "docid": "0b1d54b86617f16f699ad94d6b92a2fa", "score": "0.72431743", "text": "function setMeshColor() {\r\n meshColor_hex = rgbToHex(meshColor_rgb);\r\n var meshColorPicker = document.getElementById(\"meshColor\");\r\n meshColorPicker.value = meshColor_hex;\r\n}", "title": "" }, { "docid": "a973a4270661f309648a013f100fefba", "score": "0.70905316", "text": "function initializeColorPickers() {\n let picker;\n let target = document.querySelectorAll('.colorpicker');\n for (let i = 0, len = target.length; i < len; ++i) {\n picker = new CP(target[i]);\n picker.on(\"change\", function (color) {\n this.target.value = \"#\" + color;\n this.target.style.backgroundColor = \"#\" + color;\n updateTones();\n updatePreview();\n });\n picker.on(\"exit\", function () {\n saveOptions();\n });\n }\n}", "title": "" }, { "docid": "c0229875d1258bbf5e9f34b0e5a12e73", "score": "0.70495427", "text": "function set_up_color_picker(input)\n {\n\n // Get current input value\n var value = input.val();\n\n // Get color to show\n var color = (typeof value !== 'undefined' && value !== '') ? value : '#000000';\n\n // Set color on input element\n input.css('border-left', ('29px solid ' + color));\n\n // Change callback\n wccf_color_picker_config.change = function(event, ui) {\n\n // Update value\n input.val(ui.color.toString());\n\n // Update color\n input.css('border-left', ('29px solid ' + ui.color.toString()));\n\n // Trigger change event\n input.change();\n };\n\n // Initialize Iris color picker\n input.iris(wccf_color_picker_config);\n\n // Fix position\n input.closest('.wccf_field_container').find('.iris-picker').css('position', 'absolute').css('z-index', '999');\n\n // Bind color picker toggle event\n bind_color_picker_toggle(input);\n }", "title": "" }, { "docid": "40b91c966988097c7f38f0039a617f1c", "score": "0.7025635", "text": "function pickColor() {\n //Set up color picker\n var selectColor = $('.color').val();\n $('.color-picker').colorpicker({\n color: selectColor\n }).on(\"change.color\", function (event, color) {\n $('.color').val(color);\n });\n }", "title": "" }, { "docid": "a87fd266d2e2b13c433ed5a4382db04e", "score": "0.69029105", "text": "function setInitialBoxColor() {\n pickedColor = this.value; //update global to be accessed in cycle color\n root.style.setProperty(`--colorPicker`, `${this.value}`);\n let red = pickedColor.slice(1, 3);\n let hexRed = Number(parseInt(red, 16));\n\n let green = pickedColor.slice(3, 5);\n let hexGreen = Number(parseInt(green, 16));\n\n let blue = pickedColor.slice(5);\n let hexBlue = Number(parseInt(blue, 16));\n console.log({ pickedColor });\n rValueDisplay.textContent = 'Red: ' + hexRed;\n gValueDisplay.textContent = 'Green: ' + hexGreen;\n bValueDisplay.textContent = 'Blue: ' + hexBlue;\n hexDisplay.textContent = 'Hex Code: ' + pickedColor;\n}", "title": "" }, { "docid": "df2b7990e075928fa010e66e8b24f9f2", "score": "0.6892761", "text": "function range_oninput() {\n val = -this.value;\n // loop all `rxb-picker-colors` and step the colors by the new value\n for (var i = 0; i < pixels.length; i++) {\n var pixel = pixels[i];\n var ryb = getryb(pixel);\n var rybstepped = RXB.stepcolor(ryb, val / 255, 255);\n var rgb = RXB.ryb2rgb(rybstepped);\n var hex = RXB.rxb2hex(rgb);\n pixel.style.backgroundColor = '#' + hex;\n }\n activeelem.click();\n activeswatch.click();\n }", "title": "" }, { "docid": "852cca70d59150cec0f9fb58f229d92b", "score": "0.6819596", "text": "function setEventColorButton() {\n var colorPicker = $(\"#eventColorPicker\");\n colorPicker.change(function () {\n entryColor = colorPicker.val();\n });\n }", "title": "" }, { "docid": "dac4ada6da0b2f43487a4cced622a6bb", "score": "0.67507905", "text": "_setColorFromPalette(e) {\n this.value = e.model.color;\n }", "title": "" }, { "docid": "71122f6cf6fa1c50aa7dd95d4f5b1f45", "score": "0.6733928", "text": "function changeColor () {\n\tvar red = document.getElementById('red').value;\n\tvar green = document.getElementById('green').value;\n\tvar blue = document.getElementById('blue').value;\n}", "title": "" }, { "docid": "ddea5a01f0f613d98265b7c0649f6563", "score": "0.67055243", "text": "function Pickcolor() {\n $(\"#txtObjBGcolor\").pickAColor({\n showSpectrum: true,\n showSavedColors: true,\n saveColorsPerElement: false,\n fadeMenuToggle: true,\n showHexInput: true,\n showBasicColors: true,\n allowBlank: false\n\n }),\n \n $(\".pick-a-color\").on(\"change\", function () {\n console.log($(this).val());\n var ColorText = $(this).val();\n $(\"#txtKRABGcolor\").val(\"#\" + ColorText);\n\n });\n }", "title": "" }, { "docid": "ba6ed7aec6b2b7156bb16a7dfad60efd", "score": "0.6701828", "text": "function initColorPicker() {\n var colorPicker = jQuery('#color-picker');\n colorPicker.hide();\n jQuery('#mapColor').click(function (event) {\n var input = jQuery(this);\n jQuery.farbtastic(jQuery(colorPicker), function (color) {\n input.val(color).css('background', color);\n input.trigger('change');\n jQuery(\"input[id=colorType]:checked\").val(color);\n updateMap();\n });\n colorPicker.show();\n event.preventDefault();\n jQuery(document).mousedown(function () {\n jQuery(colorPicker).hide();\n })\n })\n}", "title": "" }, { "docid": "4e1f3b292a89454afb6ce43dbae84f4a", "score": "0.6690063", "text": "function init() {\n colorChooser.selectedColor = \"#59a2b0\";\n}", "title": "" }, { "docid": "8a6adf35bceb8a491f922ba8fc70d8fb", "score": "0.6688489", "text": "function colorNumbrVals(){\n redNumVal.value = red.value;\n greenNumVal.value = green.value;\n blueNumVal.value = blue.value;\n}", "title": "" }, { "docid": "008fce0d7e21237964ffd63d0e638eba", "score": "0.6677936", "text": "function onColorChange() {\n var color = colorChooser.selectedColor;\n sampleBorder.styles.put(\"backgroundColor\", color);\n hexInput.text = colorToHex(color);\n}", "title": "" }, { "docid": "af16f6fd99b3341809bab1fd233b5792", "score": "0.6675058", "text": "function changeColor() {\n //Get rgb values of sliders\n var red = $(\"#red\").val();\n var green = $(\"#green\").val();\n var blue = $(\"#blue\").val(); \n \n //Set newColor id to selected rgb value\n $(\"#newColor\").css(\"background-color\", \"rgb(\" + red + \",\" + green +\",\" + blue + \")\"); \n}", "title": "" }, { "docid": "f3e1e93d9f6145bc17b6beba5047721b", "score": "0.66640717", "text": "function colorNumbrVals(){\n redNumVal.value = red.value;\n greenNumVal.value = green.value;\n blueNumVal.value = blue.value;\n}", "title": "" }, { "docid": "28ae346c0119402f91bb758e2468c22b", "score": "0.6656824", "text": "function getColor() {\n\n colorpicker.addEventListener(\"input\", colorRead);\n\n}", "title": "" }, { "docid": "87d96a354d611e9e99af239db8f85fdd", "score": "0.66432637", "text": "function setColor(x) {\n\tlet picker;\n\tlet rgb;\n\tlet colorButton;\n\tif (x == 1) {\n\t\t// color 1\n\t\tpicker = COLOR_PICKER_1;\n\t\trgb = hexToRgb(picker.value);\n\t\tcolor1r = rgb.r;\n\t\tcolor1g = rgb.g;\n\t\tcolor1b = rgb.b;\n\n\t\tuseOriColor1 = false;\n\t\tcolorButton = ORIGINAL_COLOR_BUTTON_1;\n\t} else {\n\t\t// x == 2 (color 2)\n\t\tpicker = COLOR_PICKER_2;\n\t\trgb = hexToRgb(picker.value);\n\t\tcolor2r = rgb.r;\n\t\tcolor2g = rgb.g;\n\t\tcolor2b = rgb.b;\n\n\t\tuseOriColor2 = false;\n\t\tcolorButton = ORIGINAL_COLOR_BUTTON_2;\n\t}\n\n\tpicker.style.borderStyle = 'dashed';\n\tpicker.style.borderColor = '#ff0000';\n\n\tcolorButton.style.borderStyle = '';\n\tcolorButton.style.borderColor = '';\n}", "title": "" }, { "docid": "48739c67ff8f9e1cac10b32fd32b2f9b", "score": "0.66394067", "text": "recalcColors() {\n this.colors = [];\n for (let a = 0; a < document.querySelectorAll(\".modal-color\").length; a++) {\n this.colors.push(document.querySelectorAll(\".modal-color-input\")[a].value);\n }\n }", "title": "" }, { "docid": "55cee7e452e10a6cdf8bad0b92f3efbb", "score": "0.6602519", "text": "function setValueRGB() {\n\t\tlet colors = ['red', 'green', 'blue'];\n\t\tcolorCodeElement.rgb.forEach((child, i) => child.value = sliders[colors[i]].counter);\n\t}", "title": "" }, { "docid": "d2be25b4d39742f52b28cefadcc1c645", "score": "0.6598591", "text": "function updateColor(c) {\n document.getElementById('hex').value = pal.colorToHex(c);\n\tdocument.getElementById('sat').value = c.sat;\n\tdocument.getElementById('lum').value = c.lum;\n}", "title": "" }, { "docid": "c5e8008f89f8b98a072e2c0e5e6aed95", "score": "0.6587175", "text": "function getColor() {\n console.log(\"getColor\");\n const chosenColor = document.getElementById(\"picker\").addEventListener(\"input\", displayColor);\n}", "title": "" }, { "docid": "080fb36d2dc28f5ec8ef701396e7e8a4", "score": "0.6586918", "text": "function picker() {\n colorMode = \"picker\"\n}", "title": "" }, { "docid": "b623684a3736690bea705affa93e55d4", "score": "0.65792465", "text": "function setColor() {\n\tcolorCode.innerHTML = input.value;\n}", "title": "" }, { "docid": "80aa587481d0310a742e2db6c72e6df8", "score": "0.6572485", "text": "function updateColor() {\n rateLimiter.limit(() => {\n let c = getColor(element);\n let chsv = Object(_libraries_thirdparty_cs_tinycolor_min_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(c).toHsv();\n updateHandleFinal(chsv.s, chsv.v);\n saColorPicker.style.background = \"#\" + convertToGeneralColor(getColor(element));\n });\n } // redux stuff", "title": "" }, { "docid": "2502e434b5a487f98782e2d942cfa1d5", "score": "0.6567671", "text": "function loadColorPicker() {\n\t\t// Color Palette container\n\t\tconst container = document.querySelector(\".colourPalette\");\n\n\t\t// Creating and initializing a color input\n\t\tconst picker = document.createElement(\"input\");\n\t\tpicker.setAttribute(\"type\", \"color\");\n\t\tpicker.id = \"colorPicker\";\n\t\tpicker.value = \"#ff0000\";\n\t\tpicker.classList.add(\"colourSwatches\");\n\t\t\n\t\t// Inserting color input to the DOM\n\t\tcontainer.insertAdjacentElement(\"beforeend\", picker);\n\n\t\t// Listening to changes and changing Fill and Stroke \n\t\tpicker.addEventListener(\"input\", function() {\n\t\t\t// Set Fill and Stroke to selected (changed) value\n\t\t\tfill(picker.value);\n\t\t\tstroke(picker.value);\n\n\t\t\t// Tracking current fill color\n\t\t\tfillColor = picker.value;\n\n\t\t\t// Remove the old border\n\t\t\tvar current = select(\"#\" + self.selectedColour + \"Swatch\");\n\t\t\tcurrent.style(\"border\", \"0\");\n\n\t\t\t// Highlight color picker\n\t\t\tpicker.style.border = \"2px dashed salmon\";\n\t\t});\n\t}", "title": "" }, { "docid": "184fb00e15127cf2518909877b7a46e7", "score": "0.65599", "text": "function updateFromControl(input, target) {\n\n function getCoords(picker, container) {\n\n var left, top;\n if( !picker.length || !container ) return null;\n left = picker.offset().left;\n top = picker.offset().top;\n\n return {\n x: left - container.offset().left + (picker.outerWidth() / 2),\n y: top - container.offset().top + (picker.outerHeight() / 2)\n };\n\n }\n\n var hue, saturation, brightness, x, y, r, phi,\n\n hex = input.val(),\n\n // Helpful references\n colourpicker = input.parent(),\n settings = input.data('colourpicker-settings'),\n\n // Panel objects\n grid = colourpicker.find('.colourpicker-grid'),\n slider = colourpicker.find('.colourpicker-slider'),\n\n // Picker objects\n gridPicker = grid.find('[class$=-picker]'),\n sliderPicker = slider.find('[class$=-picker]'),\n\n // Picker positions\n gridPos = getCoords(gridPicker, grid),\n sliderPos = getCoords(sliderPicker, slider);\n\n // Handle colors when there's a palette\n if( target.is('.colourpicker-grid, .colourpicker-slider') ) {\n // Calculate hue, saturation, and brightness\n hue = keepWithin(360 - parseInt(sliderPos.y * (360 / slider.height()), 10), 0, 360);\n saturation = keepWithin(Math.floor(gridPos.x * (100 / grid.width())), 0, 100);\n brightness = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100);\n hex = hsb2hex({\n h: hue,\n s: saturation,\n b: brightness\n });\n\n // Update UI\n grid.css('backgroundColor', hsb2hex({ h: hue, s: 100, b: 100 }));\n\n // Adjust case\n input.val(hex.toUpperCase());\n }\n\n // Handle colours when there is a limited selection of colours\n if( target.is('.cp-list-col') ) {\n hex = target.data('cp-col'); \n input.val(hex);\n }\n\n // Update text colour and background colour\n switch (settings.showColour) {\n case \"text\":\n input.css('color', '');\n input.css('background-color', '');\n break;\n case \"background\":\n input.css('color', \"transparent\");\n input.css('background-color', hex);\n break;\n default:\n input.css('color', isColDark(hex) ? '#ddd' : '#000');\n input.css('background-color', hex);\n }\n\n // Update select colour\n if( settings.palette == 'limited') {\n colourpicker.find('.cp-list-col').removeClass('selected-col');\n colourpicker.find('.cp-list-col[data-cp-col=' + hex + ']')\n .addClass('selected-col')\n .addClass(isColDark(hex) ? 'dark' : 'light');\n } \n \n // Handle change event\n doChange(input, hex, input.data('transparent'));\n\n }", "title": "" }, { "docid": "184fb00e15127cf2518909877b7a46e7", "score": "0.65599", "text": "function updateFromControl(input, target) {\n\n function getCoords(picker, container) {\n\n var left, top;\n if( !picker.length || !container ) return null;\n left = picker.offset().left;\n top = picker.offset().top;\n\n return {\n x: left - container.offset().left + (picker.outerWidth() / 2),\n y: top - container.offset().top + (picker.outerHeight() / 2)\n };\n\n }\n\n var hue, saturation, brightness, x, y, r, phi,\n\n hex = input.val(),\n\n // Helpful references\n colourpicker = input.parent(),\n settings = input.data('colourpicker-settings'),\n\n // Panel objects\n grid = colourpicker.find('.colourpicker-grid'),\n slider = colourpicker.find('.colourpicker-slider'),\n\n // Picker objects\n gridPicker = grid.find('[class$=-picker]'),\n sliderPicker = slider.find('[class$=-picker]'),\n\n // Picker positions\n gridPos = getCoords(gridPicker, grid),\n sliderPos = getCoords(sliderPicker, slider);\n\n // Handle colors when there's a palette\n if( target.is('.colourpicker-grid, .colourpicker-slider') ) {\n // Calculate hue, saturation, and brightness\n hue = keepWithin(360 - parseInt(sliderPos.y * (360 / slider.height()), 10), 0, 360);\n saturation = keepWithin(Math.floor(gridPos.x * (100 / grid.width())), 0, 100);\n brightness = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100);\n hex = hsb2hex({\n h: hue,\n s: saturation,\n b: brightness\n });\n\n // Update UI\n grid.css('backgroundColor', hsb2hex({ h: hue, s: 100, b: 100 }));\n\n // Adjust case\n input.val(hex.toUpperCase());\n }\n\n // Handle colours when there is a limited selection of colours\n if( target.is('.cp-list-col') ) {\n hex = target.data('cp-col'); \n input.val(hex);\n }\n\n // Update text colour and background colour\n switch (settings.showColour) {\n case \"text\":\n input.css('color', '');\n input.css('background-color', '');\n break;\n case \"background\":\n input.css('color', \"transparent\");\n input.css('background-color', hex);\n break;\n default:\n input.css('color', isColDark(hex) ? '#ddd' : '#000');\n input.css('background-color', hex);\n }\n\n // Update select colour\n if( settings.palette == 'limited') {\n colourpicker.find('.cp-list-col').removeClass('selected-col');\n colourpicker.find('.cp-list-col[data-cp-col=' + hex + ']')\n .addClass('selected-col')\n .addClass(isColDark(hex) ? 'dark' : 'light');\n } \n \n // Handle change event\n doChange(input, hex, input.data('transparent'));\n\n }", "title": "" }, { "docid": "49e259e24988327c33b82647c6b170b6", "score": "0.65520924", "text": "function setColor() {\n color = inputField.value; \n brush.style.background = color; \n }", "title": "" }, { "docid": "02ac86fd60067db5466bc2a3bd46f4f7", "score": "0.65403676", "text": "function onChangeFillColor(value) {\r\n console.log('ccccc');\r\n editMeme('fillColor', value)\r\n renderCanvas()\r\n}", "title": "" }, { "docid": "fe4b6a22415cfd363cfc67a7c6e69b52", "score": "0.6539716", "text": "function addColor() {\n\t// Select color input\n\tlet color = $(\"#colorPicker\").val();\n\t$(this).css(\"background-color\", color);\n\t}", "title": "" }, { "docid": "1b000c50f2baf52ea9318e5382f9d473", "score": "0.6536309", "text": "function bind_color() {\n\tlet color = this.style['background-color'];\n\ttry{\n\t\tcolor_input.value = rgbToHex(color);\n\t}catch(err) {\n\t\tcolor_input.value = color;\n\t}\n}", "title": "" }, { "docid": "14fb57acec5ce024956616470d8c5412", "score": "0.6535743", "text": "function changeColor() {\n var r = $(\"#red\").val();\n var g = $(\"#green\").val();\n var b = $(\"#blue\").val();\n var o = $(\"#orange\").val();\n var y = $(\"#yellow\").val();\n var p = $(\"#purple\").val();\n\n\n}", "title": "" }, { "docid": "cf9b58520b466078f7375608d97e7501", "score": "0.6514452", "text": "function set_colors_dropdown() {\n\tvar l = parseInt(jQuery('#min_color').val());\n\tvar r = parseInt(jQuery('#max_color').val())+1;\n\n\tvar r_percent = 100 - l * 1.00 / DIAMOND_SLIDER_ATTRIBUTES.colors.length * 100;\n\tjQuery('#color_slider > div > .ui-slider-left-cap').css({'right': r_percent + '%'});\n\tvar l_percent = 100 - (DIAMOND_SLIDER_ATTRIBUTES.colors.length - r) * 1.00 / DIAMOND_SLIDER_ATTRIBUTES.colors.length * 100;\n\tjQuery('#color_slider > div > .ui-slider-right-cap').css({'left': l_percent + '%'});\n\t\n\tjQuery(\"#color_slider\").val([l,r]);\n\t\n\tjQuery('#color_slider').trigger('change');\n}", "title": "" }, { "docid": "8b51c40da029c9fb782dcab13dc89d7b", "score": "0.6510218", "text": "function initializeColorPicker(newColor) {\n $(\".full-spectrum\").spectrum({\n showPaletteOnly: true,\n showPalette: true,\n color: newColor,\n palette: colorBox.colors,\n change: function(color) {\n colorToChange = color.toHexString();\n }\n });\n}", "title": "" }, { "docid": "6527e64cf473208a791e0bdb2029efb5", "score": "0.6476461", "text": "function changeColour(){\n\tvar clrPicker = document.getElementById(\"html5colorpicker\");\n\tcolour = clrPicker.value;\n\tcanvas.freeDrawingBrush.color = colour;\n}", "title": "" }, { "docid": "07a0d571bf7cb4861ba9fb4554a7d3d9", "score": "0.6471924", "text": "setValue (color) {\n this.value = new Color(color);\n }", "title": "" }, { "docid": "4a5b354e947823a0559f9bb15ad05f90", "score": "0.64645994", "text": "onChange(newColor) {\n // Step 1: Set the color picker to whatever new color the user has picked\n const oldC = this.state.currentColor;\n const newC = {\n color: newColor,\n count: oldC.count,\n };\n this.setState({ currentColor: newC });\n // console.log(\"current color: \" + oldC.color.getHexString());\n\n // Step 2: Then update the current color array with the new color\n const newColorArray = this.state.colors;\n newColorArray[this.state.currentPosition] = newC;\n this.setState({ colors: newColorArray });\n\n // Step 3: Alert each individual widget to that a color has changed\n // Each widget will have to check if the change applies to itself\n EventEmitter.dispatch('color-palette:color-change', { old: oldC.color, new: newC.color });\n // console.log('\\nCOLOR CHANGE\\n');\n // this.printPalette(newColorArray);\n }", "title": "" }, { "docid": "8554f04afffe771fdf3fe7d68e17903b", "score": "0.64616686", "text": "function colorSelected(){\n\tchosenColor = document.getElementById(\"Colors\").value;\n}", "title": "" }, { "docid": "627f9c219d102c54482fd0e142fde381", "score": "0.64396065", "text": "function setColor (senderButton) {\n const newColor = rgb2hex( senderButton.css('background-color') );\n $('#colorPicker').val(newColor);\n}", "title": "" }, { "docid": "ddcc3b2a134c8ba93e8f5af2150ac6c0", "score": "0.64239395", "text": "function storeColorValue(){\n var gridColor = colorPicked.value;\n return gridColor;\n}", "title": "" }, { "docid": "3de6a73140cfd35d739ea7ee866915d6", "score": "0.6421491", "text": "function onChange(e){\n if(e.hex){\n updateFormState({ ...formState, color: e.hex}) //know comes from color picker and update color proerty\n }else {updateFormState({ ...formState, title: e.target.value})} //if not update title proeprty\n }", "title": "" }, { "docid": "143d4d9f2f92fcbb05d0429e2cadc44f", "score": "0.6411039", "text": "setColors() {}", "title": "" }, { "docid": "43c0325592cd2efac406d3d5cf442807", "score": "0.6394098", "text": "onChangeColor(e) {\n this.setState({\n color: e.target.value\n });\n }", "title": "" }, { "docid": "969d9bcc4a6ff0d24bb0338c810ab562", "score": "0.6389197", "text": "function colorPicker(v) {\n switch (v) {\n case bevetelKiadasDataset[0]:\n return \"#F3A59D\";\n break;\n case bevetelKiadasDataset[1]:\n return \"#E74C3C\";\n break;\n case bevetelKiadasDataset[2]:\n return \"#FFF\";\n break;\n case bevetelKiadasDataset[3]:\n return \"#8BDDCD\";\n break;\n case bevetelKiadasDataset[4]:\n return \"#18BC9C\";\n break;\n }\n}", "title": "" }, { "docid": "cb9038844b217e081c9784b52eb6259f", "score": "0.6372485", "text": "update() {\n if (this.colorHandler.hasColor()) {\n this.inputHandler.update();\n } else {\n this.colorHandler.assureColor();\n }\n\n this.addonHandler.update();\n this.pickerHandler.update();\n\n /**\n * (Colorpicker) Fired when the widget is updated.\n *\n * @event Colorpicker#colorpickerUpdate\n */\n this.trigger('colorpickerUpdate');\n }", "title": "" }, { "docid": "cd15c41f647cd5bf11c84316ce96b7c1", "score": "0.6327027", "text": "function initColorPicker() {\r\n \r\n\r\n var picker = new dhtmlXColorPicker(\"divColoresPicker\",false,true);\r\n \r\n picker.setImagePath(\"../../../imagen/dhtmlxcolorpicker/imgs/\");\r\n picker.setColor('#ffffff');\r\n // picker.selectedcolor(colorPrincipal);\r\n picker.setOnCancelHandler(function (color) {\r\n //some code\r\n //alert(color);\r\n //initColorPicker(color)\r\n Windows.close(\"Div_colorPicker\");\r\n })\r\n\r\n picker.setOnSelectHandler( function (color) {\r\n \r\n filaSeleccionada=$(\"hIdfilaSeleccionada\").value;\r\n // alert(\"La fila seleccionada es :\"+filaSeleccionada);\r\n // mygridz.setRowTextStyle(mygridz.getRowId(filaSeleccionada) ,'background-color:#C1E69D;color:black;border-top: 1px solid #DAEFC2;');\r\n mygridz.setRowTextStyle(mygridz.getRowId(filaSeleccionada) ,'background-color:'+ color+';color:black;border-top: 1px solid #DAEFC2;');\r\n //Windows.close(\"Div_colorPicker\", event);\r\n Windows.close(\"Div_colorPicker\");\r\n //alert(\"El codigo del color es: \"+color);\r\n grabarColorSelecionadoTurnoAreaSede(color);\r\n \r\n \r\n // initColorPicker(color)\r\n \r\n } )\r\n\r\n //picker.clickOk(function(){alert('peche')})\r\n picker.init();\r\n picker.show();\r\n \r\n \r\n//myCP2.init();\r\n//myCP2.show();\r\n// myCP2.setSkin(\"dhx_skyblue\"); \r\n \r\n// var myCP3 = new dhtmlXColorPickerInput('dhtmlxColorPicker3');\r\n// myCP3.setImagePath(\"../../../imagen/dhtmlxcolorpicker/imgs/\");\r\n// myCP3.init();\r\n//myCP3.setSkin(\"dhx_skyblue\");\r\n}", "title": "" }, { "docid": "fdd32d07faddbc9e0c64654e0ad13248", "score": "0.6323706", "text": "function changeColor() {\n \tvar r = $('#red').val();\n \tvar g = $('#green').val();\n \tvar b = $('#blue').val();\n \t$('#newColor').css('background-color',\"rgb(\" + r + \",\" + g + \",\" + b + \")\");\n\n }", "title": "" }, { "docid": "d92b0e81e2d9f7a318b71a2828f67d10", "score": "0.6321129", "text": "changeColor(e){\n let rVal = this.rChannel.value;\n let gVal = this.gChannel.value;\n let bVal = this.bChannel.value;\n this.color = 'rgb('+rVal+','+bVal+','+gVal+')';\n this.alpha = (this.aChannel.value / 100);\n this.colorVisual.style.backgroundColor = 'rgb('+rVal+','+bVal+','+gVal+')';\n }", "title": "" }, { "docid": "f0c55aea1419a63c1a66cdc103d2a07b", "score": "0.6320834", "text": "function colorGrid() {\n document.getElementById('canvas').addEventListener('click', function(event) {\n const colorPicker = document.getElementById('colorPicker');\n event.target.style.backgroundColor = colorPicker.value\n });\n}", "title": "" }, { "docid": "8548b52db22e18c0cec9e3e7a51df9be", "score": "0.6310671", "text": "set color(val) {\n if (val !== this._color) {\n this._color = val;\n this._colorClass = this._theme.addStyle(`ly-field.color:${val}`, (theme) => {\n const color = theme.colorOf(val);\n const contrast = theme.colorOf(`${val}:contrast`);\n return {\n [`&.${this.classes.focused} .${this.classes.container}:after, &{focused}{selectArrow} {infix}:after`]: {\n color\n },\n [`&.${this.classes.focused} .${this.classes.fieldset}`]: {\n borderColor: color\n },\n [`&.${this.classes.focused} .${this.classes.label}`]: {\n color\n },\n [`& .${this.classes.inputNative}`]: {\n caretColor: color\n },\n '& {inputNative}::selection': {\n backgroundColor: color,\n color: contrast\n },\n '& {inputNative}::-moz-selection': {\n backgroundColor: color,\n color: contrast\n }\n };\n }, this._el.nativeElement, this._colorClass, STYLE_PRIORITY + 1, STYLES);\n }\n }", "title": "" }, { "docid": "c30f4bf06914be5f92960635f3b76b89", "score": "0.63078463", "text": "function changeRGB()\n{\n\n var red = gDialog.red;\n var green = gDialog.green;\n var blue = gDialog.blue;\n\n // XXX Check for numbers\n red.value = checkRange(red.value, 0, 255);\n green.value = checkRange(green.value, 0, 255);\n blue.value = checkRange(blue.value, 0, 255);\n\n colours.setRGB(red.value, green.value, blue.value);\n redrawEverything();\n}", "title": "" }, { "docid": "d933ab1d9caab4546d9a6bd54f007bed", "score": "0.63008213", "text": "function rgbChanged() {\r\n // get rgb values\r\n var iR = parseInt($(\"input[name='rgb_R']\").val(), 10);\r\n var iG = parseInt($(\"input[name='rgb_G']\").val(), 10);\r\n var iB = parseInt($(\"input[name='rgb_B']\").val(), 10);\r\n \r\n // make the values valid (if they are not)\r\n iR = makeValidRgb(iR);\r\n iG = makeValidRgb(iG);\r\n iB = makeValidRgb(iB);\r\n \r\n // convert rgb to cmyk (and also format the output)\r\n var aCMYK = formatCmykOutput(rgb2cmyk(iR, iG, iB));\r\n \r\n // convert rgb to hex\r\n var sHEX = rgb2hex(iR, iG, iB);\r\n \r\n // output cmyk values\r\n $(\"input[name='cmyk_C']\").val(aCMYK[0]);\r\n $(\"input[name='cmyk_M']\").val(aCMYK[1]);\r\n $(\"input[name='cmyk_Y']\").val(aCMYK[2]);\r\n $(\"input[name='cmyk_K']\").val(aCMYK[3]);\r\n\r\n // output hex value\r\n $(\"input[name='hex']\").val(sHEX);\r\n \r\n // also output rgb values (they could be corrected in case of wrong input)\r\n $(\"input[name='rgb_R']\").val(iR);\r\n $(\"input[name='rgb_G']\").val(iG);\r\n $(\"input[name='rgb_B']\").val(iB);\r\n \r\n // update the color in the demo area\r\n updateColorDemo(sHEX);\r\n}", "title": "" }, { "docid": "6f25cb12c12aaa6de357c491652ae465", "score": "0.6299065", "text": "function importColors() {\n for (let i = 0; i < 5; i++) {\n colorsInputs[i].value(pallette[indexColor][i]);\n }\n}", "title": "" }, { "docid": "d65fbc5ac0dbecdd6fd38520bb160b17", "score": "0.62851316", "text": "function init(){\n\t//calls the setRandomColors function\n\tsetRandomColors();\n\n\t//creates a collection of objects to hold the color controller\n\tconst colorController = [\n\t\t{\n\t\t\t//sets the color slider of the object to the global variable\n\t\t\tcolorSlider: red,\n\t\t\t//sets the color value object to the global variable\n\t\t\tcolorVal: redVal\n\t\t},\n\t\t{\n\t\t\tcolorSlider: green,\n\t\t\tcolorVal: greenVal\n\t\t},\n\t\t{\n\t\t\tcolorSlider: blue,\n\t\t\tcolorVal: blueVal\n\t\t},\n\t\t{\n\t\t\tcolorSlider: alpha,\n\t\t\tcolorVal: alphaVal\n\t\t}\n\t]\n\n\t//loops through the collection of colorController objects so lines of code are not repeated.\n\tcolorController.forEach(function(controller)\n\t{\n\t\t//when the value of the color slider is changed \n\t\tcontroller.colorSlider.oninput = function()\n\t\t{\n\t\t\t//change the calue of the label to match the slider\n\t\t\tcontroller.colorVal.value = this.value;\n\t\t\t//call the changeColor function\n\t\t\tchangeColor();\n\t\t}\n\n\t\t//when the value is changed on the color input\n\t\tcontroller.colorVal.oninput = function()\n\t\t{\n\t\t\t//change the slider to match the input value\n\t\t\tcontroller.colorSlider.value = this.value;\n\t\t\t//call the changeColor function\n\t\t\tchangeColor();\n\t\t}\n\n\n\t});\n\n\t//when the change color button is pressed, call the setRandomColors function\n\tchangeButton.onclick = setRandomColors\n\n\t//when the copy button is pressed\n\tcopyButton.onclick = function()\n\t{\n\t\t//forces the computer to call the copy command, same as right clicking and copying\n\t\tdocument.execCommand('copy');\n\t}\n\n\t//tells the webpage to listen for when the copy command is called\n\tdocument.addEventListener('copy', function(event)\n\t{\n\t\t//prevents the normal copy functoin from working\n\t\tevent.preventDefault();\n\t\t//if the machine is capable of copying\n\t\tif (event.clipboardData) \n\t\t{\n\t\t\t//sets the data on the clipboard to match the rgba value of the colorText text\n\t\t event.clipboardData.setData(\"text/plain\", colorText.innerHTML);\n\t\t}\n\t});\n\n\t//adds event listener to code icon so when it is clicked the toggleColab function is called\n\tcodeButton.addEventListener('click', toggleColab);\n\n}", "title": "" }, { "docid": "1467b291b800fd45c06e1f5c9381fc30", "score": "0.62836224", "text": "function changeColor(){\n // console.log($(this));\n var red = $('#red').val();\n $('#redValue').text(red);\n var green = $('#green').val();\n $('#greenValue').text(green);\n var blue = $('#blue').val();\n $('#blueValue').text(blue);\n $('body').css('background-color', \"rgb(\" + red + \",\" + green + \",\" + blue +\")\");\n }", "title": "" }, { "docid": "21895cbcda13bf82a69fd0bdf4040b84", "score": "0.62797105", "text": "function getSelectedColor() {\n return $('#colorPicker').val();\n}", "title": "" }, { "docid": "1668885167482e8051ec92526dab8d30", "score": "0.6270699", "text": "function pickColor(color) {\n\tif (ColorPicker_targetInput==null) {\n\t\talert(\"Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!\");\n\t\treturn;\n\t\t}\n\tColorPicker_targetInput.value = color;\n\n\tcolor_changed(ColorPicker_targetInput.value);\n\t}", "title": "" }, { "docid": "9e71134821c5d1ecccf4ed9b6d7f31d1", "score": "0.6267262", "text": "setColor() {\n if (this.value === 1) {\n this.color = [\"#663300\", \"#993300\"];\n } else if (this.value === 2) {\n this.color = [\"#888888\", \"#AAAAAA\"];\n } else if (this.value === 3) {\n this.color = [\"#FFCC00\", \"#FFF000\"];\n }\n }", "title": "" }, { "docid": "795b5c9173d8cb1b3571b6f42ebb9197", "score": "0.6262857", "text": "function customPallette() {\n backgroundColor = colorsInputs[0].value();\n for (let i = 0; i < 4; i++) {\n colors[i] = colorsInputs[i + 1].value();\n }\n}", "title": "" }, { "docid": "62b0ac6a1f6b2ff24561566d3dd8b878", "score": "0.6259114", "text": "function changeColor() {\n let color = document.getElementById(\"colorPicker\").value;\n this.style.background = color;\n }", "title": "" }, { "docid": "6a88f3bd1a98c09740d7ee675659d34f", "score": "0.625725", "text": "changeColor(params){\n this.setState({\n color: params.target.value\n })\n }", "title": "" }, { "docid": "73c20d0d9940d1bcbbf313e37c199b20", "score": "0.6246903", "text": "function init() {\n console.log(\"init(); window has loaded\");\n getColorValue(hexColorValue);\n colorChanger(); // calls color changer once for initial color correction\n\n colorImput.addEventListener(\"input\", colorChanger); //lets all inputs trigger color change\n let dropDown = document.querySelector(\"#colorDropDown\").value;\n\n}", "title": "" }, { "docid": "814dd9d3619083abf76cd1800d2f22ee", "score": "0.6244556", "text": "function changInpColor() {\n\tcolor1.value = \"#ff0000\";\n\tcolor2.value = \"#ffff00\";\n}", "title": "" }, { "docid": "106c3efbada46185f01c1429fb2149a5", "score": "0.62384343", "text": "set color(value) {\n this._state.color.set(value || [0.7, 0.7, 0.8]);\n this._renderer.setImageForceDirty();\n }", "title": "" }, { "docid": "4cd2530211fdef60e213f89a8239b88e", "score": "0.6238214", "text": "function colorInput() {\n body.style.background = \"linear-gradient(\" + slider.value + \"deg, \" + color1.value + \", \" + color2.value + \")\";\n\n nameGradientDisplay();\n}", "title": "" }, { "docid": "07e8a03af6a39099e36f5f5ef3a4bcdb", "score": "0.6235616", "text": "function colorOnKeyPressRgb(event) {\n const $el = event.currentTarget;\n const value = $el.value;\n\n // Check if Tab is pressed.\n if (checkKeyCode(event, 9)) {\n return;\n }\n\n if (value.length >= 1 && value.length <= 3 && value >= 0 && value <= 255) {\n let red = rgbField1.value ? rgbField1.value : 0;\n let green = rgbField2.value ? rgbField2.value : 0;\n let blue = rgbField3.value ? rgbField3.value : 0;\n\n typedColorOutput.style.backgroundColor = `rgb(${red}, ${green}, ${blue}`;\n } else if (rgbField1.value.length === 0 && rgbField2.value.length === 0 && rgbField3.value.length === 0) {\n typedColorOutput.style.backgroundColor = 'transparent';\n } else {\n alert('Your input is not correct!\\nOnly values between 0 and 255 are allowed!');\n\n typedColorOutput.style.backgroundColor = 'transparent';\n }\n }", "title": "" }, { "docid": "cbcab3099e5d0d4ffe47de2cf2c52129", "score": "0.6234801", "text": "function ColorPicker() {\n var ColorSelected = $(\"#Colorpick\").val()\n /* Add color values here to your liking */\n if (ColorSelected == \"Blue\") {\n ColorSelected = \"#4985D6\";\n return ColorSelected;\n }\n else if (ColorSelected == \"Red\") {\n ColorSelected = \"#FF4848\";\n return ColorSelected;\n }\n else if (ColorSelected == \"Green\") {\n ColorSelected = \"#80B584\";\n return ColorSelected;\n }\n else if (ColorSelected == \"Yellow\") {\n ColorSelected = \"#FFCB2F\";\n return ColorSelected;\n }\n else if (ColorSelected == \"Purple\") {\n ColorSelected = \"#BA21E0\";\n return ColorSelected;\n };\n}", "title": "" }, { "docid": "d03e0fc5e097816aec9c793c5ba46f23", "score": "0.62327754", "text": "_colorChanged() {\n if(this.redVal === '' || this.greenVal === '' || this.blueVal === '')\n return\n\n var r = this.redVal.toString(16);\n r=r.length<2?\"0\"+r:r;\n var g = this.greenVal.toString(16);\n g=g.length<2?\"0\"+g:g;\n var b = this.blueVal.toString(16);\n b=b.length<2?\"0\"+b:b;\n\n this.color = \"#\"+r+g+b;\n }", "title": "" }, { "docid": "70b42eeafac043cbea246a421a7523bf", "score": "0.6225309", "text": "function color(e) {\n element = e.target\n let color = \"black\"\n\n if (colorMode == 'grayScale') {\n let count = +element.getAttribute(\"data-count\")\n shadeIn(element, count)\n return\n }\n else if (colorMode == 'black' || colorMode == 'none') {\n color = colorMode\n }\n else if (colorMode == 'rainbow') {\n color = getRainbowColor()\n }\n else if (colorMode == 'picker') {\n color = colorInput.value \n hexInput.value = color\n }\n else if (colorMode == 'hex') {\n color = hexInput.value\n colorInput.value = color\n }\n element.setAttribute(\"style\",\"background-color:\" + color)\n}", "title": "" }, { "docid": "b46575b29d54e16dc65cc3c10282df67", "score": "0.6220154", "text": "function chooseColorBall(){\n color5Point = document.getElementById(\"color5\").value;\n color15Point = document.getElementById(\"color15\").value;\n color25Point = document.getElementById(\"color25\").value;\n}", "title": "" }, { "docid": "c51b07ef81b2080cf518ce18382fef7d", "score": "0.6215333", "text": "function setupColorPicker () {\n\n // Setup colorPickers.\n $('.js-label-palette').spectrum({\n showPaletteOnly : true,\n showPalette : true,\n hideAfterPaletteSelect : true,\n palette : __WEBPACK_IMPORTED_MODULE_4__color__[\"e\" /* getPaletteColors */]()\n })\n // Set initial color.\n $('.js-label-palette').each((i, elm) => {\n const $elm = $(elm)\n $elm.spectrum('set', $elm.data('color'))\n })\n\n // Setup behavior.\n // Save the color to db, and notify.\n $('.js-label-palette').off('change').on('change', (e) => {\n const $this = $(e.currentTarget)\n const aColor = $this.spectrum('get').toHexString()\n const index = $this.data('index')\n console.log('click color picker:', e, aColor, index)\n\n let labelList = __WEBPACK_IMPORTED_MODULE_2__db__[\"b\" /* getLabelList */]()\n let label = labelList[__WEBPACK_IMPORTED_MODULE_3__core__[\"c\" /* getCurrentTab */]()].labels[index]\n if (typeof label === 'string') { // old style.\n label = [ label, aColor ]\n } else {\n label[1] = aColor\n }\n labelList[__WEBPACK_IMPORTED_MODULE_3__core__[\"c\" /* getCurrentTab */]()].labels[index] = label\n __WEBPACK_IMPORTED_MODULE_2__db__[\"c\" /* saveLabelList */](labelList)\n\n // Notify color changed.\n const text = $this.siblings('.js-label').text().trim()\n __WEBPACK_IMPORTED_MODULE_4__color__[\"f\" /* notifyColorChanged */]({ text : text, color : aColor, annoType : __WEBPACK_IMPORTED_MODULE_3__core__[\"c\" /* getCurrentTab */]() })\n })\n}", "title": "" }, { "docid": "cbc4545b06b584e06a3ca630d3531489", "score": "0.62041974", "text": "constructor(props) {\n super(props);\n this.state = {\n //boolean value is set to false as colour picker is\n //not displayed until clicked\n displayColorPicker: false,\n //initialise default color\n defaultColor: \"#999\",\n //change Color will be set to #999 for now\n //to display color number in text box, and the background of colour diplay\n changeColor: \"#999\",\n //the r,g,b values initialised\n //to store the r g b values of colulour that is picked\n color: {\n r: \"0\",\n g: \"9\",\n b: \"153\",\n a: \"1\"\n }\n };\n }", "title": "" }, { "docid": "5353d9efb6314a0877ce435ff4949f9e", "score": "0.6201325", "text": "function buildColorPicker(parentDiv)\n\t{\n\t\tselector.control = $('<input type=\"text\"/>').attr('id', param.name);\n\t\tparentDiv.append(selector.control);\n\t\tselector.control.spectrum(\n\t\t{\n\t\t\tcolor: \"#ff00\", \n\t\t\tshowAlpha: true, \n\t\t\tshowInput: true, \n\t\t\tpreferredFormat: \"none\",\n\t\t\tshowPalette: true, \n\t\t\tpalette: [['black', 'white']],\n\t\t\tchange: function(color)\n\t\t\t{\n\t\t\t\tselector.control.val(color.toRgbString());\n\t\t\t\tvalueChanged(color);\n\t\t\t}\n\t\t});\n\t\tselector.control.spectrum('set', param.value);\n\t\t// Also set the value on the underlying input field, so that we don't need to\n\t\t// special-case it when retriving the values set.\n\t\tselector.control.val(param.value);\n\t\tselector.revertHandler = function()\n\t\t{\n\t\t\tselector.control.spectrum('set', param.value);\n\t\t};\n\t}", "title": "" }, { "docid": "8e7dc1ab7522f81081c742a6ff4816df", "score": "0.620046", "text": "function onInputFocusChange() {\n if (!hexInput.focused) {\n try {\n colorChooser.selectedColor = hexToColor(hexInput.text);\n } catch (ex) {\n var color = colorChooser.selectedColor;\n if (color) {\n hexInput.text = colorToHex(color);\n }\n }\n }\n}", "title": "" }, { "docid": "f2fb2c04f592c24e7274cbf5a73e9755", "score": "0.61995137", "text": "onClickColor(color, i, e) {\n // Set the x and y of the modal that will contain the widget\n const workspaceEl = document.getElementsByClassName('workspace-container')[0];\n const screenHeight = workspaceEl.clientHeight;\n const screenWidth = workspaceEl.clientWidth;\n\n // Magic numbers\n // Width of each color div in the palette\n const COLOR_WIDTH = 22;\n // Horizontal distance to offset palette color picker\n const HORIZONTAL_POSITION_BUFFER = 250;\n // Vertical distance to offset palette color picker\n const VERTICAL_POSITION_BUFFER = 350;\n\n // An approximation of x based on size of widget and place within array\n const x = ((this.state.colors.length - i) * COLOR_WIDTH) + HORIZONTAL_POSITION_BUFFER;\n this.setState({ x: (screenWidth - x) });\n this.setState({ y: (screenHeight - VERTICAL_POSITION_BUFFER) });\n\n // Log the currentColor being edited + the position of the color within\n // our internal color array\n this.setState({ currentColor: color });\n this.setState({ currentPosition: i });\n\n this.setState({ displayPicker: !this.state.displayPicker });\n }", "title": "" }, { "docid": "3dec735a2fea287561edc79d766b1ae3", "score": "0.61987984", "text": "function setColor(name, color, c_id) {\n document.getElementById(\"color_select\").value = color;\n document.getElementById(\"c_id\").value = c_id;\n var list = document.getElementsByClassName(\"change_color\");\n document.getElementById(\"hr\").style.background = color;\n for (var i = 0; i < list.length; i++) {\n list[i].style.color = color;\n list[i].style.borderColor = color;\n }\n}", "title": "" }, { "docid": "49e8899abafd486bce50bc71aecfd193", "score": "0.61982363", "text": "_rgbToSliders() {\n var split = this.rgbColor.slice(this.rgbColor.indexOf('(') + 1, this.rgbColor.indexOf(')'));\n var splitArr = split.split(',');\n this.redVal = parseInt(splitArr[0]);\n this.greenVal = parseInt(splitArr[1]);\n this.blueVal = parseInt(splitArr[2]);\n }", "title": "" }, { "docid": "812043bd7ea9f0acbfb374554b21d305", "score": "0.61935604", "text": "function pick_color() {\n\n\tel('select').play(); //play select sound when color is picked \n\tpick = this.id;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//read the color id\n\tel('picker').style.backgroundColor = pick;\n\t\n\tswitch(pick) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//convert each color in its index value 0 - 5\n\t\tcase 'yellow' :\n\t\t\tpick = 0;\n\t\t\tbreak;\n\t\tcase 'green' :\n\t\t\tpick = 1;\n\t\t\tbreak;\n\t\tcase 'blue' :\n\t\t\tpick = 2;\n\t\t\tbreak;\n\t\tcase 'purple' :\n\t\t\tpick = 3;\n\t\t\tbreak;\n\t\tcase 'red' :\n\t\t\tpick = 4;\n\t\t\tbreak;\n\t\tcase 'cyan' :\n\t\t\tpick = 5;\n\t\t\tbreak;\n\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//end switch\n\n\tconsole.log('picked: ' + pick);\n\n}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//end function", "title": "" }, { "docid": "638516839ae758af762871955bb0d047", "score": "0.618991", "text": "function updateInput(input, value, opacity) {\n var rgb,\n \n // Helpful references\n minicolors = input.parent(),\n settings = input.data('minicolors-settings'),\n swatch = minicolors.find('.minicolors-input-swatch');\n \n if( settings.opacity ) input.attr('data-opacity', opacity);\n \n // Set color string\n if( settings.format === 'rgb' ) {\n // Returns RGB(A) string\n \n // Checks for input format and does the conversion\n if ( isRgb(value) ) {\n rgb = parseRgb(value, true);\n }\n else {\n rgb = hex2rgb(parseHex(value, true));\n }\n \n opacity = input.attr('data-opacity') === '' ? 1 : keepWithin( parseFloat( input.attr('data-opacity') ).toFixed(2), 0, 1 );\n if( isNaN( opacity ) || !settings.opacity ) opacity = 1;\n\n if( input.minicolors('rgbObject').a <= 1 && rgb && settings.opacity) {\n // Set RGBA string if alpha\n value = 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + parseFloat( opacity ) + ')';\n } else {\n // Set RGB string (alpha = 1)\n value = 'rgb(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ')';\n }\n } else {\n // Returns hex color\n \n // Checks for input format and does the conversion\n if ( isRgb(value) ) {\n value = rgbString2hex(value);\n }\n \n value = convertCase( value, settings.letterCase );\n }\n\n // Update value from picker\n input.val( value );\n \n // Set swatch color\n swatch.find('span').css({\n backgroundColor: value,\n opacity: opacity\n });\n\n // Handle change event\n doChange(input, value, opacity);\n }", "title": "" }, { "docid": "4bbdb981dc8078cf46e36417f707da11", "score": "0.6189861", "text": "function updateInput(input, value, opacity) {\n var rgb,\n\n // Helpful references\n minicolors = input.parent(),\n settings = input.data('minicolors-settings'),\n swatch = minicolors.find('.minicolors-input-swatch');\n\n if( settings.opacity ) input.attr('data-opacity', opacity);\n\n // Set color string\n if( settings.format === 'rgb' ) {\n // Returns RGB(A) string\n\n // Checks for input format and does the conversion\n if ( isRgb(value) ) {\n rgb = parseRgb(value, true);\n }\n else {\n rgb = hex2rgb(parseHex(value, true));\n }\n\n opacity = input.attr('data-opacity') === '' ? 1 : keepWithin( parseFloat( input.attr('data-opacity') ).toFixed(2), 0, 1 );\n if( isNaN( opacity ) || !settings.opacity ) opacity = 1;\n\n if( input.minicolors('rgbObject').a <= 1 && rgb && settings.opacity) {\n // Set RGBA string if alpha\n value = 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + parseFloat( opacity ) + ')';\n } else {\n // Set RGB string (alpha = 1)\n value = 'rgb(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ')';\n }\n } else {\n // Returns hex color\n\n // Checks for input format and does the conversion\n if ( isRgb(value) ) {\n value = rgbString2hex(value);\n }\n\n value = convertCase( value, settings.letterCase );\n }\n\n // Update value from picker\n input.val( value );\n\n // Set swatch color\n swatch.find('span').css({\n backgroundColor: value,\n opacity: opacity\n });\n\n // Handle change event\n doChange(input, value, opacity);\n }", "title": "" }, { "docid": "c9999e189af2e577ff04ba8ab0d45c09", "score": "0.61800814", "text": "function getSelectedColor() {\n displayColors({'h': 0, 's': 100, 'l': 50});\n const color = document.getElementById(\"color\");\n color.addEventListener('input', function() {\n const hex = color.value;\n const rgb = hexToRgb(hex);\n const hsl = rgbToHsl(rgb);\n displayColors(hsl);\n });\n}", "title": "" }, { "docid": "dabdea03c86714d10595957246f5d3c5", "score": "0.6176401", "text": "function pickColor(ref,value,color_palette,onclick){var palette=$(\"#color_palette\"),y,x,swatch;if(palette!=null&&(palette.remove(),palette=null,color_ref==ref)){color_ref=null;return}for(color_ref=ref,color_palette==null&&(color_palette=[\"CC3333\",\"DD4477\",\"994499\",\"6633CC\",\"336699\",\"3366CC\",\"22AA99\",\"329262\",\"109618\",\"66AA00\",\"AAAA11\",\"D6AE00\",\"EE8800\",\"DD5511\",\"A87070\",\"8C6D8C\",\"627487\",\"7083A8\",\"5C8D87\",\"898951\",\"FFFFFF\"]),palette=$(\"<div />\").attr({id:\"color_palette\"}),palette.appendTo(color_ref.parent()),y=0;y<3;y++)for(x=0;x<7;x++)swatch=$(\"<div />\").attr({id:\"color_swatch\"+color_palette[y*7+x]}).addClass(\"color_swatch\"),swatch.css({backgroundColor:\"#\"+color_palette[y*7+x],left:x*16+1+\"px\",top:y*16+1+\"px\"}),palette.append(swatch);palette.offset({left:color_ref.offset().left,top:color_ref.offset().top+color_ref.outerHeight()+1});palette.on(\"click\",function(e){var target=e==undefined?window.event.srcElement:e.target;ref.css({backgroundColor:target.style.backgroundColor});value.val(target.className==\"color_swatch\"?target.id.substring(12):\"\");palette.remove();color_ref=null;onclick&&onclick()})}", "title": "" }, { "docid": "d72c47411bb867469fc6fdb532486411", "score": "0.6171099", "text": "function onColorChangeRemote(args, kwargs, details) {\n console.log(\"color change remote\", args, kwargs, details);\n // set color in color picker\n $.farbtastic('#picker' + args[0].index).setColor(args[0].color, true);\n\n // set colors associated with color picker\n setExtraColors(args[0].index, args[0].color);\n}", "title": "" }, { "docid": "dcc8a5473c16a69acd4f1e61aa16d58b", "score": "0.61703724", "text": "function changeBGColorByPicker() {\n var value = document.getElementById(\"exampleColorInput\").value;\n document.getElementsByTagName(\"html\")[0].style.backgroundColor = value;\n ModifyJSONFileForPath(\n CosmicComicsData + \"/config.json\",\n \"Background_color\",\n value\n );\n}", "title": "" }, { "docid": "92ed90245829df1bd3a95ca8993c378f", "score": "0.6149923", "text": "function updateColorControls(new_colors, is_single_check) {\n if (is_single_check) {\n if(chart_type === \"bar\") {\n $($(\"#single_fill_cp\").colorpicker()[0]).colorpicker('setValue', new_colors[0]);\n } else { // line chart\n $($(\"#single_stroke_cp\").colorpicker()[0]).colorpicker('setValue', new_colors[0]);\n }\n } else {\n for (var i = 0; i < new_colors.length; i++) {\n if(chart_type === \"bar\")\n $($(\".multi_cp\").colorpicker()[i]).colorpicker('setValue', new_colors[i]);\n else {\n $($(\"#multi_strokecolorpicker_container .multi_cp\").colorpicker()[i]).colorpicker('setValue', new_colors[i]);\n }\n }\n }\n}", "title": "" }, { "docid": "069cfcc68deda511f038e46f1f0dd55e", "score": "0.6140676", "text": "function updateFromRGB() {\n\n // set the colour based on the values in the RGB input boxes\n colour = new SIR.RGBColour(\n parseInt('0' + componentInputBoxes.RGB.R.value, 10),\n parseInt('0' + componentInputBoxes.RGB.G.value, 10),\n parseInt('0' + componentInputBoxes.RGB.B.value, 10));\n\n // update the colour\n updateColour();\n\n }", "title": "" }, { "docid": "1a23c6f93f6a619db454f99a4d5bca49", "score": "0.6140086", "text": "function set_fancycolors_dropdown() {\n\tvar l = parseInt(jQuery('#min_fancycolor').val());\n\tvar r = parseInt(jQuery('#max_fancycolor').val())+1;\n\n\tvar r_percent = 100 - l * 1.00 / DIAMOND_SLIDER_ATTRIBUTES.fancycolors.length * 100;\n\tjQuery('#fancycolor_slider > div > .ui-slider-left-cap').css({'right': r_percent + '%'});\n\tvar l_percent = 100 - (DIAMOND_SLIDER_ATTRIBUTES.fancycolors.length - r) * 1.00 / DIAMOND_SLIDER_ATTRIBUTES.fancycolors.length * 100;\n\tjQuery('#fancycolor_slider > div > .ui-slider-right-cap').css({'left': l_percent + '%'});\n\t\n\tjQuery(\"#fancycolor_slider\").val([l,r]);\n\t\n\tjQuery('#fancycolor_slider').trigger('change');\n}", "title": "" }, { "docid": "cc11a49ba6e34ca7f22ae112a824abd3", "score": "0.6139711", "text": "function setColor() {\n\tvar col = document.getElementById('hex').value;\n\tpal.setCursorRGB(col);\n}", "title": "" }, { "docid": "68a7497d1611c08565115f67ebfc799c", "score": "0.6126641", "text": "set color(value) {\n this.color = value;\n }", "title": "" }, { "docid": "8e0d74034086d2b443604a7b49dbb503", "score": "0.6125971", "text": "function submitColor() {//jshint ignore:line\n var color = '#000000';\n if ($('#colorinput').val().length == 7) {\n color = $('#colorinput').val();\n }\n\n ds_propertyValuesChanged([currentColorProp], [color]);//jshint ignore:line\n $('#colorcontainer').hide();\n }", "title": "" }, { "docid": "ebd8f96fd05e526384daad78dac42ea4", "score": "0.6123784", "text": "function inputUpdate(){\n // Step 3a - Using destructuring, store the red, green, and blue input values\n // into variables called r, g, and b\n\n var r, g, b;\n [r, g, b] = [redSlider,greenSlider,blueSlider];\n\n // Step 3b - Create a variable called rgb and store the following format\n // using interpolation to parse the r, g, and b values:\n // rgb(r, g, b)\n\n var rgb = `rgb(${RedNum},${GreenNum},${BlueNum})`\n\n // Step 3c - Access the style property of colourPreview and change\n // the background colour to our rgb variable value\n\n document.querySelector(\"#color-preview\").style.backgroundColor = rgb;\n\n // Step 3d - Using colourPreview as the parent, select the #rgb element\n // and change the text content to equal our rgb variable value\n rgb = colourPreview.textContent\n\n // Step 3e - Using the event argument, access the target, then the parentElement,\n // then select the child, input[type=\"range\"], and then its value property.\n // Make it equal the event target's value\n document.getElementById(\"redSlider\").addEventListener(\"input\", function(event) {\n event.target.textContent = rgb\n });\n document.getElementById(\"blueSlider\").addEventListener(\"input\", function(event) {\n event.target.textContent = rgb\n });\n document.getElementById(\"greenSlider\").addEventListener(\"input\", function(event) {\n event.target.textContent = rgb\n });\n\n}", "title": "" }, { "docid": "370ca1768c8b09196093d4368ba146bf", "score": "0.6106903", "text": "function makeColorPicker(label = \"Pick a color\", startColor = \"red\", parent = createDiv(), update = () => {}) {\n let wrapper = createDiv(label);\n wrapper.class(\"color-picker\");\n wrapper.parent(parent)\n let picker = createColorPicker(startColor)\n picker.input(() => update(picker.value()));\n picker.parent(wrapper);\n picker.class(\"form-control-range\")\n return (picker);\n }", "title": "" }, { "docid": "5970b48da6ba83b8ca667268f86e5e16", "score": "0.61055213", "text": "function hslControls (e) {\n const index = e.target.getAttribute('data-bright') ||\n e.target.getAttribute('data-hue') ||\n e.target.getAttribute('data-sat')\n \n let sliders = e.target.parentElement.querySelectorAll('input[type=\"range\"]')\n const hue = sliders[0];\n const brightness = sliders[1];\n const saturation = sliders[2];\n\n const bgColor = initialColors[index]\n \n\n let color = chroma(bgColor)\n .set('hsl.s', saturation.value)\n .set('hsl.l', brightness.value)\n .set('hsl.h', hue.value);\n\n colorDivs[index].style.background = color;\n\n //colorize the sliders\n colorizeSliders(color, hue, brightness, saturation)\n\n}", "title": "" }, { "docid": "2c5429fa9043b0ccc5aa02dbcea2450a", "score": "0.6102921", "text": "function onChangeFillColor(elColor) {\n changeFillColor(elColor.value);\n drawCanvas();\n}", "title": "" }, { "docid": "3f2f440c34d4eb9122dc9888e6243407", "score": "0.61021376", "text": "function updateFromInput(input, preserveInputValue) {\n\n var hex,\n hsb,\n opacity,\n keywords,\n alpha,\n value,\n x, y, r, phi,\n\n // Helpful references\n minicolors = input.parent(),\n settings = input.data('minicolors-settings'),\n swatch = minicolors.find('.minicolors-input-swatch'),\n\n // Panel objects\n grid = minicolors.find('.minicolors-grid'),\n slider = minicolors.find('.minicolors-slider'),\n opacitySlider = minicolors.find('.minicolors-opacity-slider'),\n\n // Picker objects\n gridPicker = grid.find('[class$=-picker]'),\n sliderPicker = slider.find('[class$=-picker]'),\n opacityPicker = opacitySlider.find('[class$=-picker]');\n\n // Determine hex/HSB values\n if( isRgb(input.val()) ) {\n // If input value is a rgb(a) string, convert it to hex color and update opacity\n hex = rgbString2hex(input.val());\n alpha = keepWithin(parseFloat(getAlpha(input.val())).toFixed(2), 0, 1);\n if( alpha ) {\n input.attr('data-opacity', alpha);\n }\n } else {\n hex = convertCase(parseHex(input.val(), true), settings.letterCase);\n }\n\n if( !hex ){\n hex = convertCase(parseInput(settings.defaultValue, true), settings.letterCase);\n }\n hsb = hex2hsb(hex);\n\n // Get array of lowercase keywords\n keywords = !settings.keywords ? [] : $.map(settings.keywords.split(','), function(a) {\n return $.trim(a.toLowerCase());\n });\n\n // Set color string\n if( input.val() !== '' && $.inArray(input.val().toLowerCase(), keywords) > -1 ) {\n value = convertCase(input.val());\n } else {\n value = isRgb(input.val()) ? parseRgb(input.val()) : hex;\n }\n\n // Update input value\n if( !preserveInputValue ) input.val(value);\n\n // Determine opacity value\n if( settings.opacity ) {\n // Get from data-opacity attribute and keep within 0-1 range\n opacity = input.attr('data-opacity') === '' ? 1 : keepWithin(parseFloat(input.attr('data-opacity')).toFixed(2), 0, 1);\n if( isNaN(opacity) ) opacity = 1;\n input.attr('data-opacity', opacity);\n swatch.find('span').css('opacity', opacity);\n\n // Set opacity picker position\n y = keepWithin(opacitySlider.height() - (opacitySlider.height() * opacity), 0, opacitySlider.height());\n opacityPicker.css('top', y + 'px');\n }\n\n // Set opacity to zero if input value is transparent\n if( input.val().toLowerCase() === 'transparent' ) {\n swatch.find('span').css('opacity', 0);\n }\n\n // Update swatch\n swatch.find('span').css('backgroundColor', hex);\n\n // Determine picker locations\n switch(settings.control) {\n\n case 'wheel':\n // Set grid position\n r = keepWithin(Math.ceil(hsb.s * 0.75), 0, grid.height() / 2);\n phi = hsb.h * Math.PI / 180;\n x = keepWithin(75 - Math.cos(phi) * r, 0, grid.width());\n y = keepWithin(75 - Math.sin(phi) * r, 0, grid.height());\n gridPicker.css({\n top: y + 'px',\n left: x + 'px'\n });\n\n // Set slider position\n y = 150 - (hsb.b / (100 / grid.height()));\n if( hex === '' ) y = 0;\n sliderPicker.css('top', y + 'px');\n\n // Update panel color\n slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: hsb.s, b: 100 }));\n break;\n\n case 'saturation':\n // Set grid position\n x = keepWithin((5 * hsb.h) / 12, 0, 150);\n y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 / grid.height())), 0, grid.height());\n gridPicker.css({\n top: y + 'px',\n left: x + 'px'\n });\n\n // Set slider position\n y = keepWithin(slider.height() - (hsb.s * (slider.height() / 100)), 0, slider.height());\n sliderPicker.css('top', y + 'px');\n\n // Update UI\n slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: 100, b: hsb.b }));\n minicolors.find('.minicolors-grid-inner').css('opacity', hsb.s / 100);\n break;\n\n case 'brightness':\n // Set grid position\n x = keepWithin((5 * hsb.h) / 12, 0, 150);\n y = keepWithin(grid.height() - Math.ceil(hsb.s / (100 / grid.height())), 0, grid.height());\n gridPicker.css({\n top: y + 'px',\n left: x + 'px'\n });\n\n // Set slider position\n y = keepWithin(slider.height() - (hsb.b * (slider.height() / 100)), 0, slider.height());\n sliderPicker.css('top', y + 'px');\n\n // Update UI\n slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: hsb.s, b: 100 }));\n minicolors.find('.minicolors-grid-inner').css('opacity', 1 - (hsb.b / 100));\n break;\n\n default:\n // Set grid position\n x = keepWithin(Math.ceil(hsb.s / (100 / grid.width())), 0, grid.width());\n y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 / grid.height())), 0, grid.height());\n gridPicker.css({\n top: y + 'px',\n left: x + 'px'\n });\n\n // Set slider position\n y = keepWithin(slider.height() - (hsb.h / (360 / slider.height())), 0, slider.height());\n sliderPicker.css('top', y + 'px');\n\n // Update panel color\n grid.css('backgroundColor', hsb2hex({ h: hsb.h, s: 100, b: 100 }));\n break;\n\n }\n\n // Fire change event, but only if minicolors is fully initialized\n if( input.data('minicolors-initialized') ) {\n doChange(input, value, opacity);\n }\n\n }", "title": "" } ]
519f6bcd9975c5edcf28b0efe94c4c8f
Render the home page
[ { "docid": "65a07d83ba3a16a3d9a39e8a50254e54", "score": "0.8033489", "text": "function renderHomePage(request, response) {\n\tconsole.log(\"Rendering home page\");\n\tauth.CheckAuth(request, function(authorization) {\n\t\tvar templateArgs = {\n\t\t\ttitle: \"Tools DB - Home\",\n\t\t\tnav_title: \"Tools DB\",\n\t\t\tactive: \"home\",\n\t\t\tloggedIn: authorization,\n\t\t\tloadCss: [\n\t\t\t\t{filename: \"index.css\"},\n\t\t\t\t{filename: \"home.css\"},\n\t\t\t],\n\t\t\tloadJs: [\n\t\t\t\t{filename: \"index.js\"},\n\t\t\t],\n\t\t};\n\t\tresponse.render('homePage', templateArgs);\n\t});\n}", "title": "" } ]
[ { "docid": "13e14730cc325859d088235714bc8431", "score": "0.7859465", "text": "function showHome(req, res) {\n res.render('pages/home');\n }", "title": "" }, { "docid": "7b3f69647d9600bce034fd1e7c6535d2", "score": "0.78101027", "text": "function showHome(req,res){\n res.render('home-page');\n}", "title": "" }, { "docid": "deea0d3d397b79bdc006277b502ec103", "score": "0.7510019", "text": "function showHome(req, res) {\n res.render('pages/index.ejs');\n}", "title": "" }, { "docid": "d8158c0ef5d68e85f8dc0846774ec48d", "score": "0.74840885", "text": "function index (req, res){\n\tres.render('home');\n}", "title": "" }, { "docid": "8743505f182ab36c59d21b9c498f5876", "score": "0.7350075", "text": "function renderHome(req, res){\n res.render('home', {wrapperClass : \"home\"});\n}", "title": "" }, { "docid": "726df4f2a94b08f6ca8325df4d0581bf", "score": "0.73488003", "text": "function renderHomePage(req, res){\n\tres.render('index',{'vindetslist': req.vincollection, 'campdetslist': req.campcollection})\n}", "title": "" }, { "docid": "7faf8184f4877e5328fe4b0ba3d12c9b", "score": "0.7213032", "text": "function displayHome(ctx) {\n ctx.isAuth = auth.isAuth();\n ctx.username = sessionStorage.getItem('username');\n\n ctx.loadPartials({\n header: './templates/common/header.hbs',\n footer: './templates/common/footer.hbs',\n loginForm: './templates/forms/loginForm.hbs',\n registerForm: './templates/forms/registerForm.hbs'\n }).then(function () {\n this.partial('./templates/home/welcome.hbs');\n });\n }", "title": "" }, { "docid": "30172b5b6abdfa1cca6fc5558193f86b", "score": "0.7175084", "text": "function displayHome(ctx) {\n ctx.isAuth = auth.isAuth();\n ctx.username = sessionStorage.getItem('username');\n ctx.loadPartials({\n header: './templates/common/header.hbs',\n footer: './templates/common/footer.hbs',\n\n }).then(function () {\n if (!auth.isAuth()) {\n this.partial('./templates/home/loggedOut.hbs');\n } else {\n this.partial('./templates/home/loggedIn.hbs');\n }\n })\n }", "title": "" }, { "docid": "b8cdd03fcfa3fc52f42bd3cf07f71cfd", "score": "0.71700025", "text": "home (request, response) {\n return this.statico(request, response, 'index.html')\n }", "title": "" }, { "docid": "77958958086f827af1474b00bddf241a", "score": "0.7150349", "text": "index(req, res) {\n res.render('home/index');\n }", "title": "" }, { "docid": "c98583a27b638f2228f43cc87170334e", "score": "0.71461785", "text": "function renderHomePage(req, res){\n var homePageHtml = fs.readFileSync('homePage.html');\n res.writeHead(200, {'content-type': 'text/html'})\n res.end(homePageHtml);\n}", "title": "" }, { "docid": "7df54b2448b111620eeaa5642c750a58", "score": "0.7136746", "text": "function home(req, res) {\n\t/*if(req.session.simple_user) {\n\t\tconsole.log('logged in as user : ', req.session.simple_user);\n \t\t//res.render('users/home', {username : req.session.simple_user, layout: req.session.layout});\n\t\t//res.location('forms');\n\t} else if(req.session.admin_user) {\n\t\tconsole.log('logged in as admin : ', req.session.admin_user);\n \t\t//res.render('admin_users/home', {username : req.session.admin_user, layout: req.session.layout});\n\t} else {\n\t\tconsole.log('not logged in');\n\t\tconsole.log('cookie', req.cookies['stay_logged_in']);\n\t\t//res.render('home');\n\t}*/\n\tres.redirect('posts/all');\n}", "title": "" }, { "docid": "af1f0b44287393a7a7110c1bdb25ed87", "score": "0.7030712", "text": "function homePage(req, next) {\n req.unhandled = true;\n page.show('/pages', {}, true);\n}", "title": "" }, { "docid": "6b1eecf01478fae186df65fbf3f681fc", "score": "0.70095956", "text": "function pageLanding(req, res) {\n return res.render(\"index.html\")\n}", "title": "" }, { "docid": "48f4183d46499ef0a5f97f28ae1d3926", "score": "0.6913581", "text": "function renderHomeContent(req, res) {\n\tres.writeHead(200, {\"content-type\": \"text/html\"});\n\t// res.write('<h1>HEY!</h1>')\n\tvar theHomePage = fs.readFileSync('home.html');\n\t// res.end();\n\tres.end(theHomePage);\n}", "title": "" }, { "docid": "313be42fa1dd30024515e4218b58a9dc", "score": "0.6902353", "text": "home(req, res) {\r\n return res.render(\"index\", { user: req.user });\r\n }", "title": "" }, { "docid": "26c0d6df6e35168c4fc1678727856346", "score": "0.68875337", "text": "function home(req, res){\n\n\tconsole.log(\"Inside server's HOME API\");\n\t\n\tif (req.session.emailid){\n\t\t\n\t\tres.render(\"home\");\n\t\t\n\t}else{\n\t\t\n\t\tres.render(\"index\");\n\t\t\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "fe65b7605f08964d1c87fa5b39036e95", "score": "0.68302935", "text": "action(params, queryParams) {\n BlazeLayout.render('App_body', { main: 'App_home'});\n }", "title": "" }, { "docid": "f3801bb49a6166b06030327f9e96e54f", "score": "0.6809994", "text": "function loadHomePage(){\r\n\texecSection('login');\r\n\tsetSplashAsBackground(config.application.user);\r\n\tsetMoreColorTheme(config.application.user);\r\n\tsetHomePageStyle();\r\n}", "title": "" }, { "docid": "1b4e364195111f6069c462dbc457b108", "score": "0.67689794", "text": "function renderWikiHomePage(request, response){\n\tresponse.writeHead(200, {\n\t\t\"content-type\":\"text/html\"\n\t})\n\tvar homePage = filesystem.readFileSync(\"wikipediapage.html\");\n\t// console.log(homePage);\n\tresponse.end(homePage);\n}", "title": "" }, { "docid": "e5215652f4a449eca4e4264536ef2a08", "score": "0.67554855", "text": "function goToHome() {\n\t\t$(\"#content\").empty().append(HOME_HTML);\n\t}", "title": "" }, { "docid": "ac87e9ac4f2ee2be6716cde33c966795", "score": "0.6749088", "text": "home() {\n App.getInstance().navigateToPage(new HomePage());\n }", "title": "" }, { "docid": "c9ea9feb2c5d8b8ed61ef2443cf0cf17", "score": "0.6720998", "text": "function buildHomepage() {\n clearPage();\n checkLogin();\n $(\"#contentArea\").append($(\"#home\").html())\n}", "title": "" }, { "docid": "2e2d0a5f9812d9cc75ff5fd09aab9507", "score": "0.67067057", "text": "function handleHomePage() {\n $('#home-page-btn').click(event => {\n console.log('Home Page clicked');\n event.preventDefault();\n $('main').html(generateHomePage());\n });\n}", "title": "" }, { "docid": "6b1ac56fdb447e34835741d34a6f2658", "score": "0.66985226", "text": "function renderHomePage(req, res) {\n\tres.writeHead(200, {\"content-type\": \"text/html\"});\n\tvar theHomePageHTML = fs.readFileSync('homePage.html'); //FILES ARE NOT BEING SERVED! Storing what's in the file inside the variable - read the contents into a variable and then sent the contents along the http request\n\tres.end(theHomePageHTML);\n\n\n\t// The manual way without FS below\n\t//someone came to the home page! Give them the homepage content\n\t// res.write('<h1>This is the home page.</h1>');\n\t// res.write('<p>I am very proud of my node routing ability.</p>')\n\t// res.write('<p>I made a page in node. So there..</p>')\n\t// res.end();\n}", "title": "" }, { "docid": "7c47f84c6ed47db775ae8aa31e87527a", "score": "0.6692765", "text": "function showHomeView() {\n showView('viewAppHome');\n }", "title": "" }, { "docid": "d3345475a4b1dd64e346bf0f4ada1f2d", "score": "0.66904724", "text": "function home(response, request) {\n\tconsole.log(\"Controller Home\");\n\t//var viewConf={page:\"home\", viewBag:viewBag, response: response};\n\tViews({\n\t\tpage: \"app/home\",\n\t\tresponse: response,\n\t\tmasterPage: \"core/masterPage\",\n\t});\n}", "title": "" }, { "docid": "bf99da338acd002fe354f50f8673dc59", "score": "0.66816115", "text": "async home ({ auth, request ,view}) {\n Logger.info('======== CHANGE PAGE : WELCOME ======= %s',{username : auth.user.username})\n return view.render('welcome')\n }", "title": "" }, { "docid": "d31df36a45ebddfdadd30b7ee552e00c", "score": "0.6650855", "text": "function generateHomePage() {\n $('main').html(`\n <div class=\"home\">\n <h2>Welcome to BetaVzn!</h2>\n <p>Use this app to search for boulders in an area and find videos to give you beta.</p>\n <p class=\"medium\">If this is your first time using BetaVzn, please head to the ABOUT page to learn how to use this app.</p>\n <h3>Climb on!</h3>\n </div>\n `);\n}", "title": "" }, { "docid": "813929bda5680cf4a7f546d8e6f5c395", "score": "0.6650735", "text": "function HomeMain() {\n let service = new HomeComponentService();\n service.loadAllData(dbHomestats1, dbStudents[0].data, dbStudents[1].data, dbProfessors);\n views['home'] = new HomeComponent(service);\n views['home'].printStats();\n views.home.startPresenter();\n views.home.printStudents();\n views.home.printProfessors();\n views.home.fillNews();\n views.home.printNews();\n views.home.setNewsRoutes();\n closeModal();\n // stays last\n views.spa.addTitleIcon('resources/pictures/Home/title-logo.png', false, 'home');\n views.spa.detect_subContent_trigger_left_bar('home');\n //createBook(dbHomeImages);\n}", "title": "" }, { "docid": "4fd0886a7f465783b239506c47ad0490", "score": "0.662223", "text": "function doRender() {\n page.render('HomePage_withoutImageOrJavaScript.png'); // Capturing the Current webpage\n \n }", "title": "" }, { "docid": "bcad92dbf30d16c5244a7950c85e6963", "score": "0.6589543", "text": "render() {\n\t\tlet thisPage = null;\n\t\tif (this.state.user) {\n\t\t\tthisPage = (\n\t\t\t\t<div className=\"HomePageContainer\">\n\t\t\t\t\t{this.state.user ? <TheFarmPlant userID={this.state.user.uid}/> : null}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{thisPage}\n\t\t\t</div>\n\t\t);\n\t}", "title": "" }, { "docid": "c3263e83715aa73df522769299a7fa15", "score": "0.65848464", "text": "function initial(res) {\n res.render('index');\n}", "title": "" }, { "docid": "ebdeb45ece26813b20dc14519d7ffab4", "score": "0.6571983", "text": "function renderHomePage(request, response) {\n let SQL = 'SELECT books.*,author.name FROM books,author WHERE books.author_id=author.id;';\n client.query(SQL).then(result => {\n console.log(result.rows);\n response.render('./pages/index', { count: result.rowCount, booksList: result.rows });\n }).catch((error => {\n console.log(`ERROR IN HOME PAGE`, error);\n }));\n}", "title": "" }, { "docid": "ece98f2abb65eb6bf138e08c264ed946", "score": "0.65594935", "text": "function Home(){\n\treturn(\n\t<>\n\t\t<Header />\n\t\t<main className=\"home\">\n\t\t <img className=\"home-image\" src={frontImage} alt={'front page image'} />\n\t\t \n\t\t <h1> Welcome to ReactMasters workshop</h1>\n\t\t \n\t\t <h2> \n\t\t\tThis series of seminars covers all the current progresses in web development industry.\n\t\t </h2>\n\t\t\t\n\t\t\t<Author />\n\t\t\t\n\t\t\t<h3> <Link to=\"seminar\">Discover the list of seminars </Link></h3>\n\t\t\t<h3><Link to=\"#\"> Choose from the poposed topics </Link></h3>\n\t\t\t<h3><Link to=\"user\"> See the list of attendees </Link></h3>\n\t\t\t<h3><Link to=\"user/newUser\"> Register to attend</Link></h3>\n\t\t\t\n\t\t</main>\n\t\t<Footer />\n\t</>\n\t);\n}", "title": "" }, { "docid": "2cda0b8ecc65799300f676d7929fcf65", "score": "0.65574116", "text": "function displayIndex(url, req, res) {\n fs.readFile(__dirname + \"/home.html\", function(err, data) {\n\t res.writeHead(200, { \"Content-Type\": \"text/html\" });\n\t res.end(data);\n \t});\n}", "title": "" }, { "docid": "afb59897d0dd17ce2d890de41c1950e1", "score": "0.65534556", "text": "function Homepage(){\n\n /**Check if firstName undefined, \n * if yes, return login & signup buttons\n * else return \"welcome back\" */\n function showButtonsOrWelcomeBackMsg() {\n\n }\n\n return (<p>Jobly</p>)\n}", "title": "" }, { "docid": "07f6b0f618bf59bd10664e1633038386", "score": "0.65463084", "text": "function home(requests, response) {\n\t//if url == '/' & it's a GET\n\t//redirect to the game\n\tif (requests.url === '/') {\n\t\tresponse.writeHead(200, commonHeader);\n\t\trenderer.view('header', {}, response);\n\t\trenderer.view('activity', {'randomWord': 'Fecc', 'counter': 60}, response);\n\t\trenderer.view('footer', {}, response);\n\t\tresponse.end();\n\t} \n}", "title": "" }, { "docid": "99d126f51bb98570e96cdc8bd2433d30", "score": "0.65379494", "text": "function renderPageContent() {\n\n console.log('Window Pathname: ' + win.location.pathname);\n\n visitorStatsController();\n\n if (win.location.pathname === '/') {\n //production index route\n welcomeAnimationController();\n consultationsAnimation();\n webSolutionsAnimation();\n dataAnalyticsAnimation();\n carousel();\n\n } else if (win.location.pathname === '/Users/markheard/Desktop/markheardio/index.html') {\n //development index route\n welcomeAnimationController();\n consultationsAnimation();\n webSolutionsAnimation();\n dataAnalyticsAnimation();\n carousel();\n\n } else if (win.location.pathname === '/projects') {\n gallery();\n } else if (win.location.pathname === '/Users/markheard/Desktop/markheardio/projects.html') {\n gallery();\n } else if (win.location.pathname === '/contact') {\n validateContactForm();\n contactFormAnimationController();\n\n } else if(win.location.pathname === '/Users/markheard/Desktop/markheardio/contact.html') {\n validateContactForm();\n contactFormAnimationController();\n\n } else if (win.location.pathname === '/Users/markheard/Desktop/markheardio/about.html') {\n //aboutScroll();\n console.log('working')\n\n }\n\n }", "title": "" }, { "docid": "3cbb25e1d2d88278dad6a965e3f0507a", "score": "0.6537302", "text": "render() {\n 'Main Page'\n }", "title": "" }, { "docid": "9c4cb5535b923555caf6e92c2646ca17", "score": "0.65367645", "text": "function renderHomePage(main, PAGE_DATA) {\n renderPage(main, \"homePage\");\n\n let signUpBtn = document.querySelector(\"#signUpBtn\");\n let loginBtn = document.querySelector(\"#loginBtn\");\n\n signUpBtn.addEventListener(\"click\", () => {\n renderPage(main, \"registerPage\");\n document.querySelector(\"button\").addEventListener(\"click\", event => {\n event.preventDefault();\n signUp(PAGE_DATA);\n });\n });\n\n loginBtn.addEventListener(\"click\", () => {\n renderPage(main, \"loginPage\");\n document.querySelector(\"button\").addEventListener(\"click\", event => {\n event.preventDefault();\n login(PAGE_DATA);\n });\n });\n}", "title": "" }, { "docid": "876dd4b665e8b27f04d16de4c504200a", "score": "0.6531267", "text": "render() {\n return (\n <div>\n <div className='page-body'> \n <h2>Home</h2>\n Body of the Home Page\n </div>\n </div>\n )\n }", "title": "" }, { "docid": "49064019d51c2321149228932597250b", "score": "0.6483817", "text": "index(request, response) {\n const viewData = {\n title: 'Login or Signup',\n };\n response.render('index', viewData);\n }", "title": "" }, { "docid": "153dcee90cfcce5088635449eb7081b5", "score": "0.64666456", "text": "function loadHomePageHandler() {\n console.log('load home page ...')\n util.clearPage(CUR_PAGE);\n let _homePage = createPage.home();\n CUR_PAGE = _homePage;\n util.addDom(document.body, _homePage.div_main);\n\n loadGameTable.call(_homePage.display);\n //disable all join when USER is in game\n\n}", "title": "" }, { "docid": "9af6863522370537c50970cdd322766c", "score": "0.64634174", "text": "function renderPage() {\r\n currentRes.render(currentTemplate, {\r\n pageTitle : currentTitle + titleSuffix,\r\n title : currentTitle,\r\n content : currentContent\r\n });\r\n }", "title": "" }, { "docid": "89e769fadd8efe6add43ae39697991db", "score": "0.64293885", "text": "function homePage() {\n\t\tGET('/api/3/followedusers')\n\t\t\t.then((posts) => {\n\t\t\t\trenderFeed(posts);\n\t\t\t});\n\n\t\tfunction renderFeed(posts) {\n\n\t\t\tconst container = document.querySelector('.js-main');\n\t\t\tcontainer.innerHTML = \"\";\n\n\t\t\tfor (const feed of posts.followed_users) {\n\t\t\t\tconst card = document.createElement('div');\n\t\t\t\tcard.innerHTML = `\n <div class=\"content\">\n <div class=\"right floated meta\">${feed.Timestamp.split(' ',1)}</div>\n <img class=\"ui avatar image\" src=\"${feed.profile_pic}\"> ${feed.user_fname}\n </div>\n <div class=\"image\">\n <img src=\"${feed.image}\">\n </div>\n <div class=\"content\">\n \t<div class=\"description\">\n\t${feed.description}\n\t</div>\n\t</br>\n <span class=\"right floated\">\n <i class=\"heart outline like icon\"></i>\n 17 likes\n </span>\n <i class=\"comment icon\"></i>\n 3 comments\n </div>\n <div class=\"extra content\">\n <div class=\"ui large transparent left icon input\">\n <i class=\"heart outline icon\"></i>\n <input type=\"text\" placeholder=\"Add Comment...\">\n </div>\n </div>`;\n\t\t\t\tcard.classList.add('ui', 'card')\n\t\t\t\tcontainer.appendChild(card);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5bef0a66b6e98d012b7e1cce2ec9e8a3", "score": "0.6421446", "text": "function loadHomePage() {\n return dv.get('http://localhost:8000/');\n }", "title": "" }, { "docid": "36e3468cf4ed8401382c9a3626436801", "score": "0.6390002", "text": "function displayHomepage(date = null) {\n\t\t\tvar list = new EventList(date);\n\t\t\tlist.addHeader();\t\n\t\t\tlist.addEvents();\n\t\t}", "title": "" }, { "docid": "0c6f0b774bb68461e7062ee0174e1659", "score": "0.638646", "text": "function home() {\n\t\twindow.current_view = require('./views/home/index'); // vue\n\t\t\n\t\t//window.current_view = require('./views/home/index2'); // non-vue\n\t\t// window.current_view = require('./views/home/todo');\n\t}", "title": "" }, { "docid": "ea8a0f6215ddf7e92a4fea167c1a5edc", "score": "0.63832176", "text": "function handleHome(req, res){\n fs.readFile(__dirname + '/../public/index.html', (err, data) => {\n if(err){\n res.writeHead(500 , {'Content-Type': 'text/plain'});\n res.end('something went wrong in home page');\n }else{\n res.writeHead(200 , {'Content-Type': 'text/html'});\n res.end(data);\n }\n });\n}", "title": "" }, { "docid": "91f030ecd7ad42aa94596afb56c31a7d", "score": "0.6372903", "text": "function onHomePageLoad(){\n generateHtmlForHomePage();\n}", "title": "" }, { "docid": "1e207ae4b3e5ec3c051fd2c8dd0b42c2", "score": "0.63627553", "text": "function home( req, res){\n res.sendFile('/html/index.html',{root:__dirname+'/public'});\n\n\n }", "title": "" }, { "docid": "93b6c150d0e5c8060cd876b8fbe0e9ab", "score": "0.63470227", "text": "index(req, res) {\n return res.send(_homeService.index());\n }", "title": "" }, { "docid": "35ad0df99b313c1ff3d00dabf762fa6b", "score": "0.6318793", "text": "function renderPage() {\n if ($('main').children().length === 0) {\n $('main').append($(_this));\n $(_this).trigger('beforeRender');\n } else {\n $('main').children().trigger('beforeChangePage', [_this]);\n }\n }", "title": "" }, { "docid": "23aa6a236744d5c14bc8fcc289c7a0af", "score": "0.6315558", "text": "function showUserHomeView() {\n showView('viewUserHome');\n }", "title": "" }, { "docid": "fe25b9cbb767ff8c8352246c644e85b6", "score": "0.6307921", "text": "function showHome() {\n\tjqxhr.done(function () {\n\t\tresultsView.showHome();\n\t});\n}", "title": "" }, { "docid": "872128395c032342e17672f4a1319eca", "score": "0.63033396", "text": "render() {\n /**\n * This return method gives the output of method or a function.\n */\n return (\n <div className=\"bng\">\n <center>\n <h1>Multi-Client Offering Client Services</h1>\n <br/>\n <h5>Experience the life style......</h5>\n <br/>\n <h3>2020 CAPGEMINI 'Creators Of Positive Future'</h3>\n </center> \n <div className=\"home\"> \n </div>\n <div>\n <center><h2>Thank You For visiting :)</h2></center>\n </div> \n </div>\n );\n }", "title": "" }, { "docid": "331acd58bda15ff7d38f4b516545fa40", "score": "0.6284259", "text": "renderSelf() {\n this.header = this.render.header('header-main', {\n 'title': 'Tutorbook'\n });\n this.main = this.render.template('dashboard', {\n // If the user is viewing on mobile, we don't\n // want to show the welcome message in huge text.\n welcome: !window.app.onMobile,\n name: window.app.user.name.split(' ')[0],\n subtitle: 'We\\'re glad you\\'re here. Below are some ' +\n 'friendly suggestions for what to do next.',\n });\n }", "title": "" }, { "docid": "88167a4083773c4bed9203372971721b", "score": "0.6276691", "text": "function Home(){\n return <h2>Halaman home</h2>\n}", "title": "" }, { "docid": "684fc3fbd711ebf6a6095bc47266ca40", "score": "0.62753314", "text": "function home(request, response) {\n \n //Store the values which we need\n var values = {\n nytimesTweet: twitter.getTweets(\"nytimes\"),\n nytimePop: twitter.getTweetPop(\"nytimes\")\n }\n \n response.writeHead(200, commonHeaders);\n renderer.view(\"header\", {}, response);\n renderer.view(\"body\", values, response);\n renderer.view(\"footer\", {}, response);\n response.end(); \n}", "title": "" }, { "docid": "eeb77fe4dd4f54bd47d416f2072d7b3e", "score": "0.62682235", "text": "render() {\n return (HomeJSX.call(this));\n }", "title": "" }, { "docid": "b5d86949ab610010c5e4e0aeac4947f2", "score": "0.62622166", "text": "render(){\n\n\t\tconst AuthHome = authorize(Home)\n\t\tconst authProf = authorize(Profile)\n\t\treturn(\n\t\t\t<div className='landing-image'>\n\t\t\t\t<Navbar handleLoginClick={this.handleNavBarClick} {...this.props} />\n\t\t\t\t<div>\n\t\t\t <Route path=\"/posts\" component={PostsContainer}/>\n\t\t\t <Route path=\"/home\" component={AuthHome}/>\n\t\t\t <Route path='/newPost' component={PostForm}/>\n\t\t\t <Route path='/profile' component={authProf}/>\n\t\t\t <Route path='/pubprofile/:id' component={PublicProf}/>\n\t\t\t <Route path='/about' component={About}/>\n\t\t </div>\n\t </div>\n\t\t\t)\n\t\t}", "title": "" }, { "docid": "796c6d52444a3204b9b3e3efdd5c837f", "score": "0.6251591", "text": "async landingPage(req, res, next){\n// \t\tdescending order\n\t\tconst posts = await Post.find({}).sort(\"-_id\").exec();\n\t\tconst recentPosts = posts.slice(0,3);\n// \t\twe will pass our posts plus our mapbox token in the index page\n\t\tres.render(\"index\", {posts, mapboxToken, recentPosts, title: 'Surf Shop Home'});\n\t\t\n\t}", "title": "" }, { "docid": "0144c8d51e517c7a33a0d8893561933c", "score": "0.6250168", "text": "createHomeRoute() {\n this._webApp.get('/', (request, response) => {\n const sensorData = this._sensors.getSensorDataSet();\n const botStatus = this._botActions.getBotStatus();\n const sensorKeys = this._sensors.getSensorKeys();\n\n response.render('home', {\n data: sensorData,\n status: botStatus,\n sensors: this._sensors.getSensorDataSet(),\n intents: BotIntents\n })\n })\n }", "title": "" }, { "docid": "7aa47765606b7f9a56eb62713c994d8b", "score": "0.6243483", "text": "function renderPage() {\n let html = '';\n if (store.quizStarted === false) {\n html = generateMainPage();\n } else if (store.feedbackGiven === true) {\n html = generateQuestionPage();\n } else if (store.feedbackGiven === false && store.questionNumber === store.questions.length-1) {\n html = generateFinalPage();\n } else{\n html = generateFeedbackPage();\n }\n $('main').html(html);\n}", "title": "" }, { "docid": "5e14cbd0dc176a4721157119556ce24a", "score": "0.62350917", "text": "function displayHome() {\n let pageNo = \"4962\";\n let token = window.localStorage.getItem(\"token\");\n $.ajax({\n url: \"/api/page?pageid=\" + pageNo,\n type: \"GET\",\n headers: { \"X-Auth\": token },\n statusCode: {\n 401: (resObj, textStatus, jqXHR) => {\n alert(\"Not authorized to access page\");\n },\n 404: (resObj, textStatus, jqXHR) => {\n alert(\"Page not found\");\n }\n }\n })\n .fail((jqXHR) => {\n if ((jqXHR.status != 401) || jqXHR.status != 404) {\n alert(\"Server error\");\n }\n })\n .done((data) => {\n data = data.trim();\n $(\"#main\").html(data);\n loadImages();\n return false;\n });\n }", "title": "" }, { "docid": "62ed474c544833c33cc040f413adc04d", "score": "0.6233226", "text": "function MainHome() {\n return (\n <main>\n <section class=\"welcome\">\n <p>Bienvenidos a mi pagina,\n Aqui podran conocer mas sobre mi a rte, ver mis cuadros y por supuesto encargar cuadros a medida!\n </p>\n </section>\n </main>\n )\n}", "title": "" }, { "docid": "b5581d9b3c59b8c19106e7643c74fa5b", "score": "0.6233073", "text": "function startApp(state) {\n root.innerHTML = `\n ${Navigation(state)}\n ${Header(state)}\n ${Content(state)}\n ${Footer(state)}\n `;\n router.updatePageLinks()\n \n }", "title": "" }, { "docid": "b0aa7e5e5dc5b5ad0c2f374758870914", "score": "0.6231396", "text": "index(req, res){\r\n res.render('index')\r\n }", "title": "" }, { "docid": "53d26e9482316c567f291fb91c289bc5", "score": "0.62299204", "text": "render(page) {\n if(page === startup) {\n this.navbarRender();\n root.children[0].style.display = 'none';\n root.children[1].innerHTML = startup;\n } \n else {\n root.children[0].style.display = 'flex';\n root.children[1].innerHTML = page;\n }\n }", "title": "" }, { "docid": "a2ddd96041e6488110cd5994c7e06106", "score": "0.6229768", "text": "function home(req, res) {\n Athlete.findById(req.params.id)\n .populate('regiments')\n .exec((err, athlete) => {\n res.render('athletes/home', {\n athlete,\n user: req.user\n });\n });\n}", "title": "" }, { "docid": "dc3e9c34474b2787be111f5342792b83", "score": "0.622976", "text": "function homePage() {\n settingsPage(false);\n entryPage(false);\n}", "title": "" }, { "docid": "b3b0699a6b874d707bca285e9ef638d6", "score": "0.6196763", "text": "render() {\n if(this.state.home){\n return (\n <div>\n {this.renderHeader()}\n <div className=\"two-home\">\n {this.renderBanner()}\n {this.renderBar()}\n {this.renderBoxes()}\n </div>\n </div>\n );\n }\n else{\n return (\n <div>\n {this.renderHeader()}\n <div className=\"two\">\n {this.renderInformation()}\n {this.state.open ? this.renderModal() : \"\"}\n </div>\n </div>\n );\n }\n }", "title": "" }, { "docid": "1b5a8d32f458b55b077e3ddb24158057", "score": "0.6173019", "text": "function homePage(req,res) {\n\tvar current_session=loadCookie(req,res);\n\n\t// Create query based on cookie data\n\t// Generate a list of all recipe id's already seen\n\tvar sank_recipes=\"(\"+current_session.recipes.sank[0];\n\tfor(var i = 1; i < current_session.recipes.sank.length; i++) {\n\t\tsank_recipes+=','+current_session.recipes.sank[i];\n\t};\n\tsank_recipes+=')';\n\t\n\t// Generate list of all active filters\n\tvar active_filters=\"(true\";\n\tObject.keys(current_session.settings).forEach(function (key) {\n\t\tif (current_session.settings[key]===true) {\n\t\t\tactive_filters+=' and '+key;\n\t\t}\n\t});\n\tactive_filters+=')';\n\t\n\t// Generate condition for cook time (which is a bit hacky because cook_time isn't stored as an integer)\n\tvar cook_condition=\"cast(cook_time AS INT) <= \";\n\tif (current_session.settings.cook_time=='Any Time') {\n\t\tcook_condition='true';\n\t}\n\telse {\n\t\tcook_condition+=current_session.settings.cook_time.substring(6,8);\n\t}\n\t\n\t// Recipe search query put together with all conditionals (not seen/ rated (input sank), under required time, with appropriate filter tags)\n\tvar find_query=`SELECT * FROM ((SELECT * FROM recipe \n\t \t\t\t\tWHERE recipe_id NOT IN `+sank_recipes+`) AS valid_ids \n\t \t\t\t\tINNER JOIN preferences ON valid_ids.recipe_id=preferences.recipe_id) \n\t \t\t\t\tINNER JOIN details ON details.recipe_id=valid_ids.recipe_id\n\t \t\t\t\tWHERE `+ active_filters +` AND `+ cook_condition + `\n\t \t\t\t\tORDER BY RANDOM() \n\t\t\t\t\tLIMIT 25;`;\n\t\n\tdatabase.any(find_query)\n\t.then(function (matched_recipes){\n\t\tres.render('home',{\n \trecipes: matched_recipes,\n \tlogged_in: current_session.profile.signed_in\n \t});\n\n\t})\n\t.catch(function(err) {\n\t\tconsole.log(err);\n\t})\n\n}", "title": "" }, { "docid": "f2c2e2247d3ae37128e0c06a8ac2c13b", "score": "0.6168542", "text": "render(){\n\n return (\n <div>\n <h1>Woops, this page doesn't Exist.</h1>\n </div>\n )\n }", "title": "" }, { "docid": "c7cdbf24ea14685c93deb2f718175637", "score": "0.6141644", "text": "function homePage(req, res) {\n res.sendFile(__filename.replace(/\\.js$/,'.html'))\n}", "title": "" }, { "docid": "8bb396f3e0c65c6a1d4c86cdb2c5d652", "score": "0.612463", "text": "function Home() {\n\t/**\n\t * JSX\n\t */\n\n\treturn (\n\t\t<>\n\t\t\t{/* Render on extra small, small, and medium screens */}\n\t\t\t<Breakpoint medium down>\n\t\t\t\t<div className=\"h-screen\">\n\t\t\t\t\t<Nav />\n\t\t\t\t\t<PlantList />\n\t\t\t\t</div>\n\t\t\t</Breakpoint>\n\n\t\t\t{/* Render on large and up screens */}\n\t\t\t<Breakpoint large up>\n\t\t\t\t<div className=\"bg-white\">\n\t\t\t\t\t<Nav />\n\t\t\t\t\t<PlantList />\n\t\t\t\t</div>\n\t\t\t</Breakpoint>\n\t\t</>\n\t);\n}", "title": "" }, { "docid": "4c8f8420f9e971366cc13f48ca81d45d", "score": "0.609824", "text": "render()\n\t{\n\t\treturn (\n\t\t\t\t\t<section name=\"error_404\">\n\t\t\t\t\t\t<h1>Error 404</h1>\n\t\t\t\t\t\t<Link to = \"/\">Home</Link>\n\t\t\t\t\t</section>\n\t\t\t );//return\n\t}", "title": "" }, { "docid": "3a1b4b7827a04864404787a8aa0c8e49", "score": "0.6084172", "text": "function renderCurrentPage() {\n renderPage(parsePageNameFromAbsolutePath(window.location.pathname));\n }", "title": "" }, { "docid": "ae56ba8a0a74926560c217485df5cf7d", "score": "0.6083649", "text": "_homeLink() {\n\t\tif(this.props.location.pathname.includes(`/playground-area`)) {\n\t\t\treturn(\n\t\t\t\t<Link className=\"main-logo alternate\" to={`/`}>\n\t\t\t\t\t<span>jonManalo.com</span>\n\t\t\t\t</Link>\n\t\t\t\t)\n\t\t}\n\t\treturn(\n\t\t\t<div className=\"main-logo\" onClick={() => this._goTop()}>\n\t\t\t\t<span>jonManalo.com</span>\n\t\t\t</div>\n\t\t)\n\t}", "title": "" }, { "docid": "9aeed74c7dee7e2b7dc4d087a06c14c1", "score": "0.608223", "text": "function renderHomeView() {\n stopAcc();\n document.getElementById('application').style.backgroundColor = \"#000000\";\n var html =\n \"<h1>Pair With Computer</h1>\" +\n \"<div id='message'>Start Typing</div>\" +\n \"<input type='number' placeholder='Enter the Code on Your Screen' id='pairInput'><br>\" +\n \"<div id = 'displayName'>Display Name</div>\" +\n \"<input type='text' placeholder='Display Name' id='displayInput' maxlength='15'><br>\" +\n \"<button type='button' class='button' id='pairButton' disabled>Pair</button>\";\n document.getElementById('application').innerHTML = html;\n document.getElementById('pairButton').onclick = pairRequest;\n document.getElementById('pairInput').oninput = checkPairingCode;\n previousView = currentView;\n currentView = \"home\";\n console.log('Home view rendered');\n }", "title": "" }, { "docid": "d19c536d7ac326716db72c4223b75b61", "score": "0.6077356", "text": "render() {\n\t\tif (this.state.user) {\n\t\t\twindow.location = '/Home';\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"StartPageContainer\">\n\t\t\t\t<br></br>\n\t\t\t\t<div className=\"StartPageContent\">{this.state.helloMsg}</div>\n\t\t\t\t<div>{this.state.activeForm}</div>\n\t\t\t\t<div className=\"testd\">\n\t\t\t\t\t<button className=\"switchForm\" onClick={this.changeForm}>{this.state.switchForm}</button>\n\t\t\t\t\t<br></br>\n\t\t\t\t\t<button onClick={() => {this.resetPassword()}}>Reset password</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}", "title": "" }, { "docid": "0122b4a6f0e0045fe324d3e943591d7c", "score": "0.60754603", "text": "render() {\n if (this.state.page == \"landing\") {\n return this.displayLandingPage();\n \n }\n else if (this.state.page == \"pregame\") {\n return this.displayPregamePage();\n\n }\n else if (this.state.page == \"game\") {\n return this.displayGamePage();\n }\n else {\n alert(\"uhhhh... this shouldn't happen. game's state did not match any of the valid options. report this and refresh the page\");\n return (\n <div>\n :(\n </div>\n );\n }\n }", "title": "" }, { "docid": "c7cf86443f8488fde96e864c06bfba9e", "score": "0.6070289", "text": "function renderPage() {\n var pathParts = document.location.href.split(/\\/|\\./);\n pageBase = pathParts[pathParts.length - 2];\n if (!pageBase) {\n alert(\"Empty page name for: \" + document.location.href);\n return;\n }\n\n pageName = pageBase.replace(/([A-Z])/g, \" $1\");\n pageName = pageName.substring(0, 1).toUpperCase() + pageName.substring(1);\n\n // Fetch the api template and insert into the <body>.\n fetchContent(API_TEMPLATE, function(templateContent) {\n document.getElementsByTagName(\"body\")[0].innerHTML = templateContent;\n fetchStatic();\n }, function(error) {\n alert(\"Failed to load \" + API_TEMPLATE + \". \" + error);\n });\n}", "title": "" }, { "docid": "9f8dc9d6d5dd395594eb9e204bbcf951", "score": "0.60653514", "text": "function jounyRender(req, res) {\n res.render('pages/index/index');\n}", "title": "" }, { "docid": "9452cc279b3ad6418459dcd8451b1f6b", "score": "0.60618985", "text": "function renderMenu() {\n $('div#app > header').find('> a, > span').hide();\n $('#loadingBox, #infoBox, #errorBox').hide();\n if (isLoggedIn()) {\n $('#linkMenuUserHome, #linkMenuMyMessages, #linkMenuArchiveSent, #linkMenuSendMessage, #linkMenuLogout, #spanMenuLoggedInUser').show();\n showView('viewUserHome');\n setUsername();\n }\n else {\n $('#linkMenuAppHome, #linkMenuLogin, #linkMenuRegister').show();\n showView('viewAppHome');\n }\n }", "title": "" }, { "docid": "f885d2cf5d6cc6023ce79727f250c499", "score": "0.60593545", "text": "function Home() {\n return <h1>Home Screen</h1>;\n}", "title": "" }, { "docid": "439c1401760e7edbc4d6bc27415e3dee", "score": "0.60561335", "text": "function Homepage () {\n return (\n <section>\n <p>Welcome to your grocery store application!</p>\n </section>\n )\n}", "title": "" }, { "docid": "595acc02094f6220a4f9ac4731a97766", "score": "0.605554", "text": "function renderPage() {\n const app = $('.js-page');\n const status = $('.topDisplay');\n const startPage = generateStartingPageView(store);\n const quizPage = generateQuizPageString(store);\n const feedbackPage = generateFeedbackPageView(store);\n const viewStatus = generateStatusViewString(store);\n const finalPage = generateFinalPageView(store);\n\n switch(store.quizStarted) {\n case false:\n app.html(startPage);\n break;\n case true:\n switch(store.questionNumber) {\n case 0: case 1: case 2: case 3: case 4:\n app.html(quizPage);\n status.html(viewStatus);\n switch(store.submittedAnswer) {\n case true:\n app.html(feedbackPage);\n store.submittedAnswer = false;\n if(store.questionNumber === 4) {\n app.html(feedbackPage);\n $('#next').hide();\n $('.align.feedbackText').append(generateResultsButton());\n store.submittedAnswer = false;\n }\n } \n }\n switch(store.finishQuiz) {\n case true:\n $('div.topDisplay').hide();\n app.html(finalPage);\n }\n }\n}", "title": "" }, { "docid": "2ec9ec44877f757b83b95613116e1c0c", "score": "0.6048005", "text": "function renderIndex(req, res){\n res.render('./signup/index');\n}", "title": "" }, { "docid": "05bbbc4c0a50b181bcb70ea0ecf20431", "score": "0.6039048", "text": "function loadHome() {\n var homeContent = \"<div><center> <img src='https://www.appliedbehavioranalysisprograms.com/wp-content/uploads/2018/02/drexel-online-aba-1024x271.png' style='width:612px;height:136px;'>\"\n homeContent += \"<h2> CS 275 HW #5 </h2>\"\n homeContent += \"<p> This website contains a student and course information!</p>\"\n homeContent += \"<p> You can even view student transcript for a specific term!</p>\"\n homeContent += \"<p> To utilize these tools, click on the menu in the upper left corner! </p></center></div>\"\n\n $(\"#content\").html(homeContent);\n}", "title": "" }, { "docid": "9532ea367b1d11de9ac3e7e9ac7bf155", "score": "0.60259986", "text": "display() {\n if(this.state.displayHome) {\n return (\n <div className=\"homeMenu\">\n <div className=\"menu-icon\"><i className=\"fa fa-calendar fa-5x\" onClick={this.displayCalendar} /></div>\n <div className=\"menu-icon\"><i className=\"fa fa-sticky-note fa-5x\" onClick={this.displayNotes} /></div>\n <div className=\"menu-icon\"><i className=\"fa fa-list-ul fa-5x\" onClick={this.displayTodo} /></div>\n </div>)\n } else if(this.state.displayCalendar) {\n return <Calendar events={this.state.events} update={this.updateEvents}/>\n } else if(this.state.displayNotes) {\n return <Notes/>\n } else if(this.state.displayTodo) {\n return <ToDoList />\n } else {\n return <div><p>Couldn't load requested page, something went wrong!</p></div>\n }\n }", "title": "" }, { "docid": "a795beff8d453b3a62993e01199c1878", "score": "0.60114956", "text": "function renderLandingPage(){ReactDOM.render(React.createElement(LandingPage,null),document.getElementById('landing'));ReactDOM.render(React.createElement(MainContent,null),document.getElementById('content'));}", "title": "" }, { "docid": "08f4dbc649ab6ccfc47156cadf4b7679", "score": "0.60042673", "text": "function render() {\n renderError();\n\n let bookmarks = [...store.bookmarks];\n if(store.filter > 0) {\n bookmarks = store.bookmarks.filter(item => item.rating >= store.filter);\n }\n\n const addAndFilter = templateBookmarkPage();\n const bookmarkStringified = bookmarkString(bookmarks);\n const mainPage = addAndFilter + bookmarkStringified;\n $('main').html(mainPage);\n\n}", "title": "" }, { "docid": "e26a6e9133eb37c819c42ce5576be94a", "score": "0.59839153", "text": "function home(request, response) {\n // if url == \"/\" && GET\n if(request.url === \"/\") {\n if(request.method.toLowerCase() === \"get\") {\n //show search\n response.writeHead(200, commonHeaders); \n renderer.view(\"header\", {}, response);\n renderer.view(\"search\", {}, response);\n renderer.view(\"footer\", {}, response);\n response.end();\n } else {\n // get the post data from body\n request.on(\"data\", function(postBody) {\n // extract the username\n var query = querystring.parse(postBody.toString());\n // redirect to /:username\n response.writeHead(303, {\"Location\": \"/\" + query.username });\n response.end();\n });\n \n }\n }\n}", "title": "" }, { "docid": "5eed13f6999eb281b21d09bd188739c7", "score": "0.5983093", "text": "render() {\n return (\n <div className=\"vigor\">\n <LandingPage />\n </div>\n )\n }", "title": "" }, { "docid": "d79d4c23d0eb6a4cfec8575514a33a24", "score": "0.59811044", "text": "render(){\n\t\treturn (\n\t\t\t<BrowserRouter>\n\t\t\t\t<Switch>\n\t\t\t\t\t<Route exact path={\"/\"} component={Home} />\n\t\t\t\t\t<Route exact path={\"/sushis\"} component={Sushis} />\n\t\t\t\t\t<Route exact path={\"/about\"} component={About} />\n\t\t\t\t</Switch>\n\n\t\t\t\t\n\t\t\t</BrowserRouter>\n\t\t)\n\t}", "title": "" }, { "docid": "64b8e927c96d48edc6eae211f30f370b", "score": "0.5978274", "text": "index(request, response) {\n const viewData = {};\n response.render(\"index\", viewData);\n }", "title": "" }, { "docid": "b0607dad96c783f20caf70de51ef28a3", "score": "0.5978015", "text": "function renderFullPage (result) {\n\t\t\t// Note the div class name here, we will use that as a hook for our React code\n\t\t\t// static menu\n\t\t\treturn `\n\t\t\t\t<!doctype html>\n\t\t\t\t<html>\n\t\t\t\t\t<head>\n\t\t\t\t\t\t<title>H.H. Niranjana Swami - Official web-site</title>\n\t\t\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"//fonts.googleapis.com/css?family=Work+Sans:300,500,700,800%7COswald:300,400,500\">\n\t\t\t\t\t\t<link rel=\"stylesheet\" href=\"../css/bootstrap.css\">\n\t\t\t\t\t\t<link rel=\"stylesheet\" href=\"../css/fonts.css\">\n\t\t\t\t\t\t<link rel=\"stylesheet\" href=\"../css/style.css\" id=\"main-styles-link\">\n\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/bundle.js\"></script>\n\t\t\t\t\t\t<script src=\"../js/core.min.js\"></script>\n\t\t\t\t\t</head>\n\t\t\t\t\t<body>\n\t\t\t\t\t\t<div id=\"react-container\" />\n\t\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\t`;\n\t\t}", "title": "" }, { "docid": "810315d36ea7ec5ce9d640f657706e12", "score": "0.5973929", "text": "function Main () {\n console.log(`%c App Started...`, 'font-weight: bold; font-size: 20px;')\n\n insertHTML('/Views/partials/header.html', 'header')\n\n setPageContent('/Views/content/about.html')\n\n insertHTML('/Views/partials/footer.html', 'footer')\n // aboutmedata()\n\n // loadParagraphs()\n\n // loadSkills()\n }", "title": "" } ]
06be95aea530f29a2c29c6f7c32364de
Implement a function that returns the fibonacci number at a given index.
[ { "docid": "92185df9b2aa3bc4fd2f9b5b0587a70f", "score": "0.83415484", "text": "function fibonacci(num) {}", "title": "" } ]
[ { "docid": "2a337b95ca5e40426f637f8d483becf2", "score": "0.8840061", "text": "function fib(index) {\n if (index <= 1) return 1;\n\n const currentFibNumber = fib(index - 1) + fib(index - 2);\n\n return currentFibNumber;\n}", "title": "" }, { "docid": "b3b2e39954d7d43741bd96a60b4a7269", "score": "0.86856925", "text": "function fibonacci(index) {\n if (index === 1n || index === 2n) {\n return 1n;\n } else {\n return fibonacci(index - 1n) + fibonacci(index - 2n);\n }\n}", "title": "" }, { "docid": "43a3e5cb2fcdfc2d142ccfc0c50dd3f5", "score": "0.8583977", "text": "function fibonacci(index) {\n if (index < 2) return 1\n if (fibo[index]) return fibo[index]\n return fibo[index] = fibonacci(index - 1) + fibonacci(index - 2)\n}", "title": "" }, { "docid": "47d254dd4208da4f76ec478083674414", "score": "0.85312843", "text": "function fib(index) {\n //return 1 if index less than 2 \n if(index < 2) return 1;\n //else get the previous two values and minus\n return fib(index -1) + fib(index - 2);\n}", "title": "" }, { "docid": "a1edf2ba8a161b3ad43c9bb5e8a2652c", "score": "0.85212153", "text": "function fib(index) {\n if (index < 2) return 1;\n return fib(index - 1) + fib(index - 2);\n}", "title": "" }, { "docid": "a1edf2ba8a161b3ad43c9bb5e8a2652c", "score": "0.85212153", "text": "function fib(index) {\n if (index < 2) return 1;\n return fib(index - 1) + fib(index - 2);\n}", "title": "" }, { "docid": "a1edf2ba8a161b3ad43c9bb5e8a2652c", "score": "0.85212153", "text": "function fib(index) {\n if (index < 2) return 1;\n return fib(index - 1) + fib(index - 2);\n}", "title": "" }, { "docid": "d29a01cda23842c37c4770f8406288a1", "score": "0.85175097", "text": "function fib(index) {\n if (index < 2) return 1;\n return fib(index - 1) + fib(index - 2);\n}", "title": "" }, { "docid": "92940fcb25ba4b43e2b20329c24c1f05", "score": "0.8501568", "text": "function fibonacci(index) {\n var fibarr = [0,1]\n\n if (index < 2) {\n return index \n }\n else {\n\n for (var i=2; i<=index; i++){\n var sum = fibarr[i-2] + fibarr[i-1]\n \n fibarr.push(sum)\n }\n\n return fibarr[index]\n }\n}", "title": "" }, { "docid": "775df515006439eebd8530a5931c6fcf", "score": "0.84440243", "text": "function fib(index) {\n\tif(index<2) return 1;\n\treturn fib(index-1)+fib(index-2);\n}", "title": "" }, { "docid": "b56d70ca145b7ef313bed0033e31b350", "score": "0.84426355", "text": "function fibonacci (index) {\n const fibonacciSeq = [1, 1]\n for (let i = 2; i <= index - 1; i++) {\n const nextSeq = fibonacciSeq[i - 1] + fibonacciSeq[i - 2]\n fibonacciSeq.push(nextSeq)\n }\n return fibonacciSeq[index - 1]\n}", "title": "" }, { "docid": "47e2a90e67361473f2696e588a244ec6", "score": "0.8324862", "text": "function fibonacci(n) {}", "title": "" }, { "docid": "052836e542312c54cdda87a7536d11ca", "score": "0.8298488", "text": "function nthFibonacci(num) {\n\n}", "title": "" }, { "docid": "fd588cc4c63387ac1fa35ba52a93c930", "score": "0.8285689", "text": "function rFibonacci(idx) {\n // your code here\n}", "title": "" }, { "docid": "5fc2402c0ca1f67923cc02a8aa20a25e", "score": "0.8240305", "text": "function fibonacciIterative(index) {\n if (index <= 1) {\n return index;\n }\n let secondPrevious = 0;\n let previous = 1;\n let i = 2;\n let fibNumber;\n while (i <= index) {\n fibNumber = secondPrevious + previous;\n secondPrevious = previous;\n previous = fibNumber;\n i++;\n }\n return fibNumber;\n}", "title": "" }, { "docid": "13ac5396195e1ac3dcbd188fd7331dcb", "score": "0.81845456", "text": "function fibonacciRecursion(index) {\n if (index <= 1 && index >= 0) return index;\n return (fibonacciRecursion(index-1)) + (fibonacciRecursion(index-2));\n}", "title": "" }, { "docid": "192954f8516b4e418fd90267a09c9566", "score": "0.813984", "text": "function fiboLoop(index) {\n var fiboNew;\n var fiboPrev = 1;\n var fiboFirst = 0;\n if (index <= 1 && index >= 0) return index;\n for (let sequence = 2; sequence <= index; sequence++) {\n fiboNew = fiboFirst + fiboPrev;\n fiboFirst = fiboPrev;\n fiboPrev = fiboNew;\n }\n return fiboNew;\n}", "title": "" }, { "docid": "b8c7afcc95b38a9263a2ad048062d67b", "score": "0.81142616", "text": "function fib(idx) {\n if (idx == 0) {\n return 0;\n }\n if (idx == 1) {\n return 1;\n }\n var prevprev = 0;\n var prev = 1;\n var currentval = 0;\n for (var i = 2; i <= idx; ++i) {\n currentval = prevprev + prev;\n prevprev = prev;\n prev = currentval;\n }\n return currentval;\n}", "title": "" }, { "docid": "fea70eeb99d2e47d197845989a8a321c", "score": "0.80225545", "text": "function fibonacci(n) {\n}", "title": "" }, { "docid": "b6a37a9a2e80279b7c4d933c7e1eabd4", "score": "0.79670644", "text": "function fib(n) {\n //can't have a negative Fibonacci number\n if (n < 0) {\n throw new Error(\n 'Index was negative. No such thing as a negative index in a series.');\n }\n\n //establish base case\n if(n === 0 || n === 1) {return n}\n\n console.log(`computing fib(${n})`);\n //recursive case\n return fib(n - 1) + fib(n - 2)\n}", "title": "" }, { "docid": "3b6b387961042a9fe3a6d1861463da27", "score": "0.7899025", "text": "function fibonacci(idx) {\r\n // f(n+=)=f(n-1)+f(n-2)\r\n var fib = 0\r\n var fib1 = 1\r\n for (var i = 2; i <= idx; i++) {\r\n var fn = fib1 + fib\r\n var fib = fib1\r\n var fib1 = fn\r\n }\r\n console.log(fn)\r\n}", "title": "" }, { "docid": "4ce3f6d101bc11f00e3f48edc2dd0e02", "score": "0.78903645", "text": "function fib(n) {\n\n // Edge cases:\n if (n < 0) {\n throw new Error('Index was negative. No such thing as a negative index in a series.');\n } else if (n === 0 || n === 1) {\n return n;\n }\n \n // We'll be building the fibonacci series from the bottom up\n // So we'll need to track the previous 2 numbers at each step\n let prevPrev = 0; // 0th fibonacci\n let prev = 1; // 1st fibonacci\n let current; // Declare current\n \n for (let i = 1; i < n; i++) {\n \n // Iteration 1: current = 2nd fibonacci\n // Iteration 2: current = 3rd fibonacci\n // Iteration 3: current = 4th fibonacci\n // To get nth fibonacci ... do n-1 iterations.\n current = prev + prevPrev;\n prevPrev = prev;\n prev = current;\n }\n \n return current;\n }", "title": "" }, { "docid": "118bcedd5d789d63a0693ff8fdf9a0dc", "score": "0.7812353", "text": "function fibonacci(n){\n var fibo = [0,1];\n\n for(i = 0; i < n; i++){\n fibo[i] = fibo[i-1] + fibo[i-2];\n }\n return fibo[n];\n}", "title": "" }, { "docid": "60a50ff968376ca9620d0181debfcd7e", "score": "0.7713471", "text": "function fib(n) {\n\n // edge cases:\n if (n < 0) {\n throw new Error('Index was negative. No such thing as a negative index in a series.');\n } else if (n === 0 || n === 1) {\n return n;\n }\n\n // we'll be building the fibonacci series from the bottom up\n // so we'll need to track the previous 2 numbers at each step\n var prevPrev = 0; // 0th fibonacci\n var prev = 1; // 1st fibonacci\n var current; // Declare current\n\n for (var i = 1; i < n; i++) {\n\n // Iteration 1: current = 2nd fibonacci\n // Iteration 2: current = 3rd fibonacci\n // Iteration 3: current = 4th fibonacci\n // To get nth fibonacci ... do n-1 iterations.\n current = prev + prevPrev;\n prevPrev = prev;\n prev = current;\n }\n\n return current;\n}", "title": "" }, { "docid": "d95d2c37ae637041935790758e971d38", "score": "0.76979184", "text": "static fibonacci(n){\n let a = 0;\n let b = 1;\n let next = a + b;\n\n //Check if we're looking for the first 2 in the series\n if(n == 1){ return a; } else if(n == 2) { return b; }\n\n for(var i = 2; i < n; i++){\n next = a + b; \n a = b;\n b = next;\n }\n\n return b; //b represents the current one, so let's return this\n }", "title": "" }, { "docid": "26c40023a194f7d6139a5fc6957ae1b1", "score": "0.7684115", "text": "function fibonacci( number ) \n{\n if ( number === 0 || number === 1)\n return number;\n else\n return fibonacci( number - 1 ) + fibonacci( number - 2 );\n} // end function fibonacci", "title": "" }, { "docid": "fbaea7429292486b9865337b442764fc", "score": "0.76811314", "text": "function fibonacci(n) {\n // fibonacci(n) - receives an integer, n, and returns the first n Fibonacci numbers\n if (n == 0) { return 0 };\n if (n == 1) { return 1 };\n\n return fibonacci(n-1) + fibonacci(n-2)\n\n}", "title": "" }, { "docid": "ea32e8a4305897cb235d24d233ffd513", "score": "0.7678442", "text": "function fibonacci(n) {\n const result = [0, 1];\n for (var i = 2; i < n; i++) {\n result.push(result[i - 2] + result[i - 1]);\n }\n return result[n - 1];\n}", "title": "" }, { "docid": "24baea2f84be48a287d58fe3ecb540db", "score": "0.765237", "text": "function fibonacci(position) {\n if (position < 3) return 1;\n else return fibonacci(position - 1) + fibonacci(position - 2)\n }", "title": "" }, { "docid": "3923c9e3cfdde3bac564263f6bd58019", "score": "0.76352876", "text": "function iterativeFibonacci(n) {\n var fibs = [0,1];\n \n for (var i=0; i<n; i++){\n fibs.push(fibs[0] +fibs[1]);\n fibs.shift();\n }\n return fibs[0]; \n}", "title": "" }, { "docid": "fff3ab6c9aad8809000fb0488f537814", "score": "0.7622371", "text": "function fibonnacci(nb){\r\n if(nb < 2){\r\n return nb;\r\n }\r\n console.log('fib :',nb);\r\n return fibonnacci(nb-1) + fibonnacci(nb-2);\r\n }", "title": "" }, { "docid": "8dc0410d03f66565d059db2a9560c35b", "score": "0.7611555", "text": "function fibonacci(nth) {\n if (nth <= 2) {\n return 1;\n } else {\n return fibonacci(nth - 1) + fibonacci(nth - 2); \n }\n}", "title": "" }, { "docid": "5675eb6e3187daa69eeb287800de9926", "score": "0.76071507", "text": "function fibonacci(n) {\n if (n == 0)\n return 0;\n if (n == 1)\n return 1;\n let number = fibonacci(n - 1) + fibonacci(n - 2);\n //console.log(number);\n return number;\n}", "title": "" }, { "docid": "eaf08972b32d5ee99daa0ec745a30cf8", "score": "0.7600352", "text": "function fib(n) {\n if (n <= 2) return 1;\n let fibNums = [0, 1, 1];\n for (let i = 0; i < n; i++) {\n fibNums[i] = fibNums[i - 1] + fibNums[i - 2];\n }\n return fibNums[n]\n}", "title": "" }, { "docid": "8c6e64bca97595c34b0e3ffd79e2373d", "score": "0.7596811", "text": "function fibonacci (n) {\n if (n === 1) {\n return 1;\n }\n return fibonacci(n - 1) + n;\n}", "title": "" }, { "docid": "3fceec6810f15125cc976638d042edbf", "score": "0.75932765", "text": "function fibonacci(position){\n // if(position === 1 || position === 2){\n // return 1;\n //or\n if(position < 3){\n return 1;\n }else{\n //now lets get the sum of the two previous numbers, beacause, two numbers need to be sum before we can get the third position, fourth position, etc\n //since we want to get the number in the current \"position\", the first previous number is \"position-2\" and the second one is \"position-1\"\n //this results to an exponential time complexity(O (n^2)) which is very in-efficient\n //this calculates all fibonacci numbers from the first to the number we passed as position\n return fibonacci(position - 1) + fibonacci(position - 2);\n }\n}", "title": "" }, { "docid": "e8ad337b5f8a645fe17b4c35194e474d", "score": "0.757245", "text": "function fibonacci(num) {\n \n if(num === 0) return 0\n if(num === 1) return 1\n\n return fibonacci(num-1) + fibonacci(num -2)\n}", "title": "" }, { "docid": "73b75d467ee98f322cf145e584bb7fe8", "score": "0.75717235", "text": "function fibonacci(n) {\n //1st we create an array, we want to start our sequence with the 1st two numbers of the fibonacci. \n let arr = [0, 1]\n \n //next we create a for loop that goes up until the number n, with each loop, we add a new number to our sequence. Start our loop at index 2, because we already have the 1st two elements of our sequence. \n \n for(let i=2; i <= n; i++){\n arr[i] = arr[i-1] + arr[i-2]\n }\n \n // return the element at the 8th position in the sequence\n return arr[n]\n }", "title": "" }, { "docid": "be543aa52cbcc5e20b257796cf0f48cd", "score": "0.75691515", "text": "function fibonacci(n) {\n var a= 0;\n var b= 1;\n var f= 1;\n\n for(let i= 2; i<= n; i++) {\n f= a+b;\n a=b;\n b=f;\n }\n return f;\n}", "title": "" }, { "docid": "fad10fb568d98226c2729a8332a116d9", "score": "0.7567523", "text": "function fibonacci (n){\n\tif(n === 1){\n\t\treturn 0\n\t}\n\tif(n === 2){\n\t\treturn 1\n\t}\n\treturn fibonacci(n - 1) + fibonacci(n - 2)\n}", "title": "" }, { "docid": "aa86695eb6efcaf9d15feb7a7fd38e1e", "score": "0.7564495", "text": "function fibonacci(n){\n if(n===0) return 0;\n if(n===1) return 1;\n let fib =[0,1];\n for(let i=2;i<=n; i++)\n {\n fib[i]=fib[i-2] + fib[i-1];\n console.log(fib[i])\n }\n return fib[fib.length-1];\n}", "title": "" }, { "docid": "bade2a45c9c73cd75fad99b6db6b3650", "score": "0.7561691", "text": "function fib(n) {\n\tif (n <= 2) return 1\n\tvar fibNums = [0, 1, 1]\n\tfor (var i = 3; i <= n; i++) {\n\t\tfibNums[i] = fibNums[i - 1] + fibNums[i - 2]\n\t}\n\treturn fibNums[n]\n}", "title": "" }, { "docid": "68c8e2e1f811bd82f40539ff3ededac1", "score": "0.75575465", "text": "function getNthFibonacci(n) {\n if(n == 1) return 0\n\tif(n == 2) return 1\n\t\n\treturn getNthFib(n - 1) + getNthFib(n - 2)\n}", "title": "" }, { "docid": "fbb5ec9530a33547936a1cfd28de962c", "score": "0.7551077", "text": "function nthFibonacci(num){\n let fib = [0, 1];\n\n if (num <= 2) {\n return 1;\n }\n\n for (var i = 2; i <= num; i++ ){\n fib[i] = fib[i-1] + fib[i-2];\n }\n\n return fib[num - 1];\n}", "title": "" }, { "docid": "f90f0fbebe5c2348428939bb87381f0f", "score": "0.7548909", "text": "function fib(n) {\n\n\tvar series = [0,1]\n\tfor(let i = 2; i < n+1; i++) {\n\t\tif(i == 2) {\n\t\t\tseries.push(1)\n\t\t} else {\n\t\t\tseries.push(series[i-2] + series[i-1]);\n\t\t}\n\t}\n\treturn series[n];\n}", "title": "" }, { "docid": "c0c6bad9728317126287a8f6eab76ec2", "score": "0.7508259", "text": "function fibonacci (n) {\n var result = 0;\n\n if (n <= 1) {\n result = n;\n } else {\n result = fibonacci(n - 1) + fibonacci(n - 2);\n }\n\n return result;\n}", "title": "" }, { "docid": "8e280dfbde78165bf412133ec835f991", "score": "0.74952096", "text": "function fibonacci(n) {\n var fibo = [0, 1];\n for (var i = 2; i <= n; i++){\n fibo[i] = fibo[i - 1] + fibo[i - 2];\n }\n return fibo;\n}", "title": "" }, { "docid": "9f030bf64e3538d70dc9a31b522bfcd8", "score": "0.7487175", "text": "function fib(n) {\n if (n <= 2) return 1;\n\n let fibNums = [0, 1, 1];\n\n for (let i = 3; i <= n; i++) {\n fibNums[i] = fibNums[i - 1] + fibNums[i - 2];\n }\n // console.log(fibNums);\n return fibNums[n];\n}", "title": "" }, { "docid": "e089dc9050f96af0f187baa673bc1e4e", "score": "0.7481162", "text": "function fibonacci( n ) {\n if ( n < 0 ) return undefined;\n \n if ( n < 2 ) return n;\n \n return fibonacci( n - 2 ) + fibonacci( n - 1 );\n }", "title": "" }, { "docid": "eab22860d2bbfee5203f57f42fba76e8", "score": "0.7474435", "text": "function fibonacci(n) {\n var fibbo = [0, 1];\n for (i = 2; i <= n; i++) {\n fibbo[i] = fibbo[i - 1] + fibbo[i - 2];\n }\n return fibbo;\n}", "title": "" }, { "docid": "007a0a136cfd9405aa5c7ed48487a84b", "score": "0.7463998", "text": "function fibonacci(num) {\n\n if (num === 0) {\n return 0\n }\n\n if (num === 1 || num ===2) {\n return 1\n }\n \n return fibonacci(num - 1) + fibonacci(num - 2)\n \n}", "title": "" }, { "docid": "214a0c52d72ba38b82142cb8901f344c", "score": "0.7459635", "text": "function fib(n) {\n if (n < 2) {\n return n;\n }\n \n return fib(n - 1) + fib(n - 2);\n \n }", "title": "" }, { "docid": "3ee8875e2288ce0460127884e6871c38", "score": "0.74591774", "text": "function fibonacci(num){\n if(num <= 1){\n return 1\n } else {\n return fibonacci(num - 1) + fibonacci(num - 2)\n }\n }", "title": "" }, { "docid": "679e40e5ebfc95d5c414bfd7a22d4a1e", "score": "0.74541587", "text": "function fibonacci(n) {\n let arr = [0,1];\n\n for(let i=2; i<=n; i++){\n arr[i] = arr[i-1] + arr[i-2];\n }\n\n return arr[n];\n}", "title": "" }, { "docid": "cd508253f76cda28d1f688f9a3b03830", "score": "0.74441504", "text": "function getFibonacci(x) {\r\n //create array with the first two Fibonacci numbers\r\n let arr = [0, 1];\r\n \r\n //Handle if one of the first two Fibonacci numbers\r\n if (x <= 2) return 1;\r\n \r\n //loop through building the Fibonacci array\r\n for (let i = 2; i < x; i++) {\r\n arr[i] = arr[i - 1] + arr[i - 2];\r\n \r\n }\r\n //Return the last Fibonacci calculated\r\n return arr[x - 1];\r\n }", "title": "" }, { "docid": "a17d623d20442cb06fdf0b3ae71a4877", "score": "0.7439565", "text": "function fib(n) {\n if (n === 0) return 0;\n if (n === 1) return 1;\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "fe97c8d955e2a0f2ee9185b556a62f13", "score": "0.7435533", "text": "function fib(n) {\n\tif (n == 0) {\n\t\treturn 0;\n\t}\n\tif (n == 1) {\n\t\treturn 1;\n\t}\n\treturn fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "dcd206e159f120b0654c0300971e3af0", "score": "0.7431142", "text": "function iFibonacci(num) {\n var fibs = [0, 1];\n if (num < 2){\n return fibs[num];\n }\n while(fibs.length != num +1){\n fibs.push(fibs[fibs.length-2] + fibs[fibs.length-1])\n }\n return fibs[fibs.length-1]\n}", "title": "" }, { "docid": "e30075de05b2e3911b8f4bfd1bc3e22f", "score": "0.74294585", "text": "function fibonacci(number) {\n if (number <= 1) {\n return number;\n }\n return fibonacci(number - 2) + fibonacci(number - 1);\n}", "title": "" }, { "docid": "68654bf5de24287a0e606615de90fc54", "score": "0.7424756", "text": "function fib(n) {\nvar result = [0,1]\nfor(i=2; i<n; i++){\nvar a = result[i-1]\nvar b = result[i-2]\nresult.push(a+b)\n}\nreturn result(n)\n}", "title": "" }, { "docid": "b76d6f7b20a9b0d6bb2bda0a1d48943b", "score": "0.74212635", "text": "function fib(n){\n \n if (n == 0 || n == 1){\n return n\n }\n return (fib(n-1) + fib(n-2));\n}", "title": "" }, { "docid": "3253a0881b6f762db7f02fc57b3d359c", "score": "0.74139047", "text": "function fibo(n){\n function fibonacci(n) {\n return n < 1 ? 0\n : n <= 2 ? 1\n : fibonacci(n - 1) + fibonacci(n - 2);\n }\n\nreturn fibonacci;\n}", "title": "" }, { "docid": "a694d0236622b1d75a4baff53d92961e", "score": "0.74051654", "text": "function fib(n){\n\t//console.log(n);\n\tif(n <= 1) return n;\n\n\telse return (fib(n-1) + fib(n-2));\n}", "title": "" }, { "docid": "752e89201985ccbe6e9ff92acf89b6a2", "score": "0.7377294", "text": "function Fibonacci(number) {\n\n if (number < 2) {\n return number\n } else {\n return Fibonacci(number - 1) + Fibonacci(number - 2);\n }\n\n}", "title": "" }, { "docid": "07c2986659754a38085e34c7887fa9d6", "score": "0.73769397", "text": "function Fibonacci(n) {\n if (n <= 1) {\n return 1;\n };\n return Fibonacci(n - 1) + Fibonacci(n - 2);\n}", "title": "" }, { "docid": "457769fceacb305e207aac34f0c29c04", "score": "0.73761404", "text": "function fibonacciIterative(n){\n let fib;\n let result;\n if(n == 0) {\n result = Number(0);\n return result;\n } else if(n == 1) {\n result = Number(1);\n return result;\n } else {\n fib = (Number(fibonacciIterative(n-1)) + Number(fibonacciIterative(n-2)));\n result = Number(fib);\n return result;\n }\n }", "title": "" }, { "docid": "6c4cb2a82752cf3fc3f445688c8e38a0", "score": "0.73747283", "text": "function fibonacci(n) {\n var currentValue = 1;\n var previousValue = 1;\n var newCurrentValue = 0;\n var i;\n for (i = 3; i <= n; i++) {\n newCurrentValue = currentValue + previousValue;\n previousValue = currentValue;\n currentValue = newCurrentValue;\n }\n return currentValue;\n}", "title": "" }, { "docid": "d3e319346983b15b6609bec45b4e28d4", "score": "0.73736507", "text": "function fib(n) {\n //create array\n const result = [0, 1];\n \n for(let i = 2; i <= n; i++){\n const a = result[result.length - 1];\n const b = result[i - 2];\n \n result.push(a + b);\n }\n return result[n];\n }", "title": "" }, { "docid": "bec198a70b72cca1bda9db7ab3ecd17a", "score": "0.73724955", "text": "function fib ( nth ) {\n if ( nth === 1 || nth === 2 ) {\n return 1;\n }\n\n return fib( nth - 1 ) + fib( nth - 2 );\n}", "title": "" }, { "docid": "85c11d5aa3356e44f9803e9ce2ceed7e", "score": "0.7364833", "text": "function fibonacci(n) {\n\tif (n <= 2) {\n\t\treturn 1;\n\t} else {\n\t\treturn fibonacci(n - 1) + fibonacci(n - 2);\n\t}\n}", "title": "" }, { "docid": "5ff41743123578646b8888777113999c", "score": "0.73647654", "text": "function getNthFibonacci(n) {\n if (n < 0) {\n throw new Error('n cannot be negative');\n }\n if (n > 1 && n < 5) {\n return n - 1;\n }\n if (n >= 5) {\n return getNthFibonacci(n - 2) + getNthFibonacci(n - 1);\n }\n return n;\n}", "title": "" }, { "docid": "3929c5ed5bf1da08ae3e0f9c4a1c4c0f", "score": "0.73634493", "text": "function fibonacci(num) {\n if(num === 0) {\n return 0;\n }\n if(num === 1) {\n return 1;\n }\n var sequence = [0, 1];\n for(var i = 2; i <= num; i++) {\n sequence.push(sequence[i - 1] + sequence[i - 2]);\n }\n return sequence[sequence.length - 1];\n}", "title": "" }, { "docid": "7826a4d8934cc220479c661b5dd626eb", "score": "0.734367", "text": "function fib(n: number): number {\n\treturn n < 2 ? 1 : fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "eb3be0a041fd0e86f4737bc7f4efed86", "score": "0.7341207", "text": "function fibonacci(num) {\n if (num <= 1) {\n return 1;\n }\n return fibonacci(num -1) + fibonacci(num-2);\n}", "title": "" }, { "docid": "684ffc21f86e367116898b95be143572", "score": "0.7339941", "text": "function fibonacci(num) {\n if (isNaN(num) || num < 1) return null;\n if (num === 1 || num === 2) return 1;\n\n return fibonacci(num - 1) + fibonacci(num - 2);\n}", "title": "" }, { "docid": "4254af0303a798dc686df746e92c3f76", "score": "0.73352873", "text": "function fibonacci(number) {\n if (number <= 2) {\n return 1;\n } else {\n return fibonacci(number - 2) + fibonacci(number - 1);\n }\n}", "title": "" }, { "docid": "bc51840ee1e7c37f38397510d8c9f163", "score": "0.7334981", "text": "function fibo(n) {\n\treturn n > 1 ? fibo(n - 1) + fibo(n - 2) : 1;\n}", "title": "" }, { "docid": "7661a16a5310fd392fd6bf6ccd229117", "score": "0.7332404", "text": "function fibonacci(n) {\n // http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibFormula.html\n return Math.round(Math.pow(((Math.sqrt(5) + 1)/2), n)/Math.sqrt(5));\n}", "title": "" }, { "docid": "8c61aa76e6e14e30d0f0f4124de131e0", "score": "0.7330878", "text": "function fibo(f){\n if(f < 2)\n return f;\n //se vuelve a llamar a la funcion\n return fibo(f - 1) + fibo(f - 2);\n}", "title": "" }, { "docid": "107ce23c21e236b8f1b68d7a03a5c123", "score": "0.73295295", "text": "function fib(n){\n if (n < 2){\n return n;\n } else{\n return n * fib(n-1);\n }\n}", "title": "" }, { "docid": "c996ab9bab120ed035e40807d2e8b28f", "score": "0.7329197", "text": "function fibonacci(n) {\n // base case\n if (n <= 2) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "b50ac92b7d313a3eb4346c05bbe00375", "score": "0.7329154", "text": "function fibonacci(n) {\n if (n === 1 || n === 2) {\n return 1;\n }\n\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "27405f39f6a2483eab043a602ef27e01", "score": "0.73285806", "text": "function fib(n){\n\n n-=1;\n var niz =[1,1];\n\n function dod(n) {\n\n if(n===0){return niz;}\n \n niz.push( niz[ niz.length-1] + niz[niz.length-2 ] );\n\n dod(n-1);\n }\n\n dod(n);\n \n return niz[niz.length-2];\n\n}", "title": "" }, { "docid": "4687a4c1cac556aa775036fac28ddafb", "score": "0.73170304", "text": "function fibMemo(index, cache) {\n // index: index of number in fibonacci sequence\n // cache: an array used as memory\n \n cache = cache || []; // either use the cache passed in as an argument or create an empty array\n if (cache[index]) { \n return cache[index];\n } else {\n if (index < 3) {\n return 1;\n } else {\n cache[index] = fibMemo(index - 1, cache) + fibMemo(index - 2, cache); \n }\n }\n \n return cache[index];\n}", "title": "" }, { "docid": "bffc584a84fb4a549020c472a2b75cb7", "score": "0.7316245", "text": "function fib(nth) {\r\n if (nth === 0 || nth === 1) return 1;\r\n let x = 0;\r\n let y = 1;\r\n for (let i = 1; i < nth; i++) {\r\n fibsum = x + y;\r\n x = y;\r\n y = fibsum;\r\n }\r\n return fibsum;\r\n}", "title": "" }, { "docid": "76229c08f97ca919a4b36a2e484c77bd", "score": "0.7314519", "text": "function fib(num) {\n if (num == 1) {\n return 0\n }\n if (num == 2) {\n return 1\n }\n return fib(num - 1) + fib(num - 2)\n}", "title": "" }, { "docid": "f28b4fda5891bc46f9c7038283843e89", "score": "0.7314061", "text": "function fibonacci(n) {\n let second = 1;\n let next;\n let first = 0;\n if (n <= 1) return n;\n for (let i = 1; i < n; i++) {\n next = first + second;\n first = second;\n second = next;\n }\n return next;\n}", "title": "" }, { "docid": "374b0da1ec05d52a43cbb8e5c4fc1310", "score": "0.73130524", "text": "function searchFib (i) { //helper function, called by user, fills out the fib array\n\t\tif (i > n) { //base case, if n is 0 or 1 return out of the helper function and return the fibonacciArray[i]\n\t\t\treturn; // & if i becomes bigger then n return out of the recursion as well\n\t\t}\n\t\tfibonacciArray[i] = fibonacciArray[i - 2] + fibonacciArray[i - 1]; // math to find a fib number @ i\n\t\tsearchFib(i + 1); //call the recursive funciton with increased i\n\t}", "title": "" }, { "docid": "9e1d5afe101abeaf1ff78ec5293ce1cc", "score": "0.73062694", "text": "function fib(n){\n if(n === 0 || n === 1){\n return n;\n }\n else{\n let thisTerm = fib(n-1) + fib(n-2);\n return thisTerm;\n }\n}", "title": "" }, { "docid": "7310ca82cbe669fcb05f2893d99b53e6", "score": "0.7299816", "text": "function fibonacci(n) {\n return n <= 1 ? n : fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "eb681b8eb618b1b1a64c49e16ffd4816", "score": "0.72971994", "text": "function fibIterative(n) {\n let prev = 1;\n let prevPrev = 0;\n let current;\n\n for (let i = 1; i < n; i += 1) {\n current = prev + prevPrev;\n prevPrev = prev;\n prev = current;\n }\n return current;\n}", "title": "" }, { "docid": "806539803b03e6976e0e5b36fa232f96", "score": "0.7294598", "text": "function fibo(n) {\n\tif (n <= 1) \n\t\treturn n;\n\telse \n\t\treturn fibo(n-1) + fibo(n-2);\n}", "title": "" }, { "docid": "a3e139565b64b05897110c93f68b4710", "score": "0.7294296", "text": "function fibI(n){\n var n1 =0, n2 = 1, n3=0;\n for(var i=2; i<=n; i++){\n n3 = n1+n2;\n n1 = n2;\n n2 = n3;\n }\n return n3\n}", "title": "" }, { "docid": "230ed8f0512a77ae0509a23e8374e86c", "score": "0.7287228", "text": "function fib (int) {\n if(x < 0){\n return \"Error\";\n }\n if(x === 0){\n return 0;\n }\n\n let cache = [0,1];\n\n function fibCalc (prev1, prev2) {\n cache\n }\n}", "title": "" }, { "docid": "b1d3a028c091a0fb8bc3e6bf53b42448", "score": "0.7285892", "text": "function fib(num){\n if (num <= 2) return 1;\n return fib(num-1) + fib(num-2);\n }", "title": "" }, { "docid": "778bd51ecd869090175dea0b805e8908", "score": "0.72828716", "text": "static fibonacci(num) {\n if (num <= 1) {\n return 1;\n }\n return NoWebworker.fibonacci(num - 1) + NoWebworker.fibonacci(num - 2);\n }", "title": "" }, { "docid": "565dc4bc2b3a128df386faefe2a66cee", "score": "0.7282737", "text": "function fib(n) {\n if ( n === 1 || n === 2) {\n return 1\n }\n\n return fib(n-1) + fib(n -2 )\n}", "title": "" }, { "docid": "8d34fddeb84e3b7a0ccd5c0ca03b29ef", "score": "0.72792274", "text": "function fib(n) {\n return function(n,a,b) {\n return n>0 ? arguments.callee(n-1,b,a+b) : a;\n }(n,0,1);\n}", "title": "" }, { "docid": "8f35f5dd601cfb15e32c80b90583db58", "score": "0.727706", "text": "function fibMemo(index, cache) {\n cache = cache || [];\n if (cache[index]) return cache[index];\n else {\n if (index < 3) return 1;\n else {\n cache[index] = fibMemo(index - 1, cache) + fibMemo(index - 2, cache);\n }\n }\n return cache[index];\n }", "title": "" }, { "docid": "086fd580e4b1ec75ca663c30f9ec35f5", "score": "0.72768116", "text": "function fib(n) {\n if (n == 0 || n == 1) {\n return n;\n }\n return fib(n-2) + fib(n-1);\n}", "title": "" } ]
f9668b0ddca6d8118cf1def19783b740
`Graphic` class. If the browser lacks `Graphic` class will point to the `CanvasGraphic` class.
[ { "docid": "8c6bfef6eacacb1996d97f59dcbeb17a", "score": "0.6116478", "text": "function CanvasGraphic(config) {\n \n CanvasGraphic.superclass.constructor.apply(this, arguments);\n}", "title": "" } ]
[ { "docid": "6504d00b26d53db396842875e7a80690", "score": "0.64447504", "text": "function Graphics() {\r\n this.mDraw = \"\";\r\n }", "title": "" }, { "docid": "b53059cfa7299285417e5804081155b8", "score": "0.63917583", "text": "function Graphics()\n{\n DisplayObjectContainer.call(this);\n\n this.renderable = true;\n\n /**\n * The alpha of the fill of this graphics object\n *\n * @property fillAlpha\n * @type Number\n */\n this.fillAlpha = 1;\n\n /**\n * The width of any lines drawn\n *\n * @property lineWidth\n * @type Number\n */\n this.lineWidth = 0;\n\n /**\n * The color of any lines drawn\n *\n * @property lineColor\n * @type String\n */\n this.lineColor = 'black';\n\n /**\n * Graphics data\n *\n * @property graphicsData\n * @type Array\n * @private\n */\n this.graphicsData = [];\n\n /**\n * Current path\n *\n * @property currentPath\n * @type Object\n * @private\n */\n this.currentPath = {points:[]};\n}", "title": "" }, { "docid": "aca0396f21ebc235d37f0bc33127c4e6", "score": "0.6369833", "text": "function Graphics(){\n throw new Error('This is a static class');\n}", "title": "" }, { "docid": "cc17ba3f20e21fa1b28ae2417f11b1fe", "score": "0.6040884", "text": "function Graphic(config) {\n \n this.initializer.apply(this, arguments);\n}", "title": "" }, { "docid": "129aa8a7c22da9e648ad8d451fe251eb", "score": "0.6019695", "text": "function Graphics()\n\t{\n\t Container.call(this);\n\n\t /**\n\t * The alpha value used when filling the Graphics object.\n\t *\n\t * @member {number}\n\t * @default 1\n\t */\n\t this.fillAlpha = 1;\n\n\t /**\n\t * The width (thickness) of any lines drawn.\n\t *\n\t * @member {number}\n\t * @default 0\n\t */\n\t this.lineWidth = 0;\n\n\t /**\n\t * The color of any lines drawn.\n\t *\n\t * @member {string}\n\t * @default 0\n\t */\n\t this.lineColor = 0;\n\n\t /**\n\t * Graphics data\n\t *\n\t * @member {PIXI.GraphicsData[]}\n\t * @private\n\t */\n\t this.graphicsData = [];\n\n\t /**\n\t * The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.\n\t *\n\t * @member {number}\n\t * @default 0xFFFFFF\n\t */\n\t this.tint = 0xFFFFFF;\n\n\t /**\n\t * The previous tint applied to the graphic shape. Used to compare to the current tint and check if theres change.\n\t *\n\t * @member {number}\n\t * @private\n\t * @default 0xFFFFFF\n\t */\n\t this._prevTint = 0xFFFFFF;\n\n\t /**\n\t * The blend mode to be applied to the graphic shape. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n\t *\n\t * @member {number}\n\t * @default PIXI.BLEND_MODES.NORMAL;\n\t * @see PIXI.BLEND_MODES\n\t */\n\t this.blendMode = CONST.BLEND_MODES.NORMAL;\n\n\t /**\n\t * Current path\n\t *\n\t * @member {PIXI.GraphicsData}\n\t * @private\n\t */\n\t this.currentPath = null;\n\n\t /**\n\t * Array containing some WebGL-related properties used by the WebGL renderer.\n\t *\n\t * @member {object<number, object>}\n\t * @private\n\t */\n\t // TODO - _webgl should use a prototype object, not a random undocumented object...\n\t this._webGL = {};\n\n\t /**\n\t * Whether this shape is being used as a mask.\n\t *\n\t * @member {boolean}\n\t */\n\t this.isMask = false;\n\n\t /**\n\t * The bounds' padding used for bounds calculation.\n\t *\n\t * @member {number}\n\t */\n\t this.boundsPadding = 0;\n\n\t /**\n\t * A cache of the local bounds to prevent recalculation.\n\t *\n\t * @member {PIXI.Rectangle}\n\t * @private\n\t */\n\t this._localBounds = new math.Rectangle(0,0,1,1);\n\n\t /**\n\t * Used to detect if the graphics object has changed. If this is set to true then the graphics\n\t * object will be recalculated.\n\t *\n\t * @member {boolean}\n\t * @private\n\t */\n\t this.dirty = true;\n\n\t /**\n\t * Used to detect if the WebGL graphics object has changed. If this is set to true then the\n\t * graphics object will be recalculated.\n\t *\n\t * @member {boolean}\n\t * @private\n\t */\n\t this.glDirty = false;\n\n\t this.boundsDirty = true;\n\n\t /**\n\t * Used to detect if the cached sprite object needs to be updated.\n\t *\n\t * @member {boolean}\n\t * @private\n\t */\n\t this.cachedSpriteDirty = false;\n\n\t /**\n\t * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite.\n\t * This is useful if your graphics element does not change often, as it will speed up the rendering\n\t * of the object in exchange for taking up texture memory. It is also useful if you need the graphics\n\t * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if\n\t * you are constantly redrawing the graphics element.\n\t *\n\t * @name cacheAsBitmap\n\t * @member {boolean}\n\t * @memberof PIXI.Graphics#\n\t * @default false\n\t */\n\t}", "title": "" }, { "docid": "f46bf8d20e85c1a4264774c99b90711a", "score": "0.5991853", "text": "getGraphics() {\n return this.core.graphics;\n }", "title": "" }, { "docid": "93906aa2073e7f99a320b4ed79cd3014", "score": "0.59608704", "text": "function GraphicLoader() {\n classCallCheck(this, GraphicLoader);\n\n console.debug('🌀 Construct loader');\n }", "title": "" }, { "docid": "846bcb852bf056dc3fec0a5d9b4e033c", "score": "0.5740856", "text": "function Graphics()\n{\n Container.call(this);\n\n /**\n * The alpha value used when filling the Graphics object.\n *\n * @member {number}\n * @default 1\n */\n this.fillAlpha = 1;\n\n /**\n * The width (thickness) of any lines drawn.\n *\n * @member {number}\n * @default 0\n */\n this.lineWidth = 0;\n\n /**\n * The color of any lines drawn.\n *\n * @member {string}\n * @default 0\n */\n this.lineColor = 0;\n\n /**\n * Graphics data\n *\n * @member {PIXI.GraphicsData[]}\n * @private\n */\n this.graphicsData = [];\n\n /**\n * The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.\n *\n * @member {number}\n * @default 0xFFFFFF\n */\n this.tint = 0xFFFFFF;\n\n /**\n * The previous tint applied to the graphic shape. Used to compare to the current tint and check if theres change.\n *\n * @member {number}\n * @private\n * @default 0xFFFFFF\n */\n this._prevTint = 0xFFFFFF;\n\n /**\n * The blend mode to be applied to the graphic shape. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.\n *\n * @member {number}\n * @default PIXI.BLEND_MODES.NORMAL;\n * @see PIXI.BLEND_MODES\n */\n this.blendMode = CONST.BLEND_MODES.NORMAL;\n\n /**\n * Current path\n *\n * @member {PIXI.GraphicsData}\n * @private\n */\n this.currentPath = null;\n\n /**\n * Array containing some WebGL-related properties used by the WebGL renderer.\n *\n * @member {object<number, object>}\n * @private\n */\n // TODO - _webgl should use a prototype object, not a random undocumented object...\n this._webGL = {};\n\n /**\n * Whether this shape is being used as a mask.\n *\n * @member {boolean}\n */\n this.isMask = false;\n\n /**\n * The bounds' padding used for bounds calculation.\n *\n * @member {number}\n */\n this.boundsPadding = 0;\n\n /**\n * A cache of the local bounds to prevent recalculation.\n *\n * @member {PIXI.Rectangle}\n * @private\n */\n this._localBounds = new Bounds();\n\n /**\n * Used to detect if the graphics object has changed. If this is set to true then the graphics\n * object will be recalculated.\n *\n * @member {boolean}\n * @private\n */\n this.dirty = 0;\n\n /**\n * Used to detect if we need to do a fast rect check using the id compare method\n * @type {Number}\n */\n this.fastRectDirty = -1;\n\n /**\n * Used to detect if we clear the graphics webGL data\n * @type {Number}\n */\n this.clearDirty = 0;\n\n /**\n * Used to detect if we we need to recalculate local bounds\n * @type {Number}\n */\n this.boundsDirty = -1;\n\n /**\n * Used to detect if the cached sprite object needs to be updated.\n *\n * @member {boolean}\n * @private\n */\n this.cachedSpriteDirty = false;\n\n\n this._spriteRect = null;\n this._fastRect = false;\n\n /**\n * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite.\n * This is useful if your graphics element does not change often, as it will speed up the rendering\n * of the object in exchange for taking up texture memory. It is also useful if you need the graphics\n * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if\n * you are constantly redrawing the graphics element.\n *\n * @name cacheAsBitmap\n * @member {boolean}\n * @memberof PIXI.Graphics#\n * @default false\n */\n}", "title": "" }, { "docid": "95498d0187ef9988cd3296194a7ef355", "score": "0.56938183", "text": "function kaXmlGraphicElement() {}", "title": "" }, { "docid": "91fd8220cff4446f0b05108d80b0e1f8", "score": "0.56189656", "text": "function DrawingObject() {\n\t\n\tvar useStyle = function(context, style) {\n\t\tfor(var s in style) {\n\t\t\tif(style.hasOwnProperty(s)) {\n\t\t\t\tcontext[s] = style[s];\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * applyStyle uses the currently defined style and applies it to the canvas context.\n\t * \t\tChild classes then need only worry about the specific shape to be drawn.\n\t * @param {[type]} context [description]\n\t * @return {[type]} [description]\n\t */\n\tthis.applyStyle = function(context) {\n\t\tif(this.isSelected) {\n\t\t\tuseStyle(context, this.style.selected);\n\t\t}\n\t\telse if(this.isMouseOver) {\n\t\t\tuseStyle(context, this.style.hasFocus);\n\t\t}\n\t\telse {\n\t\t\tuseStyle(context, this.style.deselected);\n\t\t}\n\n\t};\n\n\tthis.toObj = function(callback) {\n\t\tthrow('toJSON() was called in the abstract DrawingObject');\n\t};\n\n\tthis.draw = function(context) {\n\t\tthrow('draw() was called in the abstract DrawingObject');\n\t};\n\n\tthis.greyOut = function() {\n\t\tthrow('grey out has not yet been implemented');\n\t};\n\n\tthis.setTransparency = function() {\n\t\tthrow('transparency has not yet been implemented');\n\t};\n\n\tthis.contains = function(point) {\n\t\treturn false;\n\t};\n}", "title": "" }, { "docid": "42fbfa5f0df4ed5c7aa7fc690c8430f3", "score": "0.55080336", "text": "function Graphic2d(position) {\n this._type = \"Graphic2d\";\n this.Position = position;\n this.Rotation = 0;\n this.ZIndex = 0;\n this.Visible = true;\n this._State = new EndGate.Graphics.Assets._.Graphic2dState();\n this.Opacity = 1;\n this._children = [];\n this._childrenRemovalBindings = [];\n this.Parent = null;\n this._disposed = false;\n this._onDisposed = new EndGate.EventHandler1();\n }", "title": "" }, { "docid": "5966155942a5a81286465ac805b3608a", "score": "0.5507362", "text": "function Shape(){\n var edges = undefined;\n this.__c__ = document.getElementById(\"myCanvas\");\n this.__ctx__ = this.__c__.getContext(\"2d\");\n\n this.display = function (){\n return \"This is a shape with.\"\n }\n}", "title": "" }, { "docid": "929fafb58b0d86d5e99f663549ff5c5a", "score": "0.54839367", "text": "function gxtkGraphics(){\r\n\tthis.game=BBHtml5Game.Html5Game();\r\n\tthis.canvas=this.game.GetCanvas()\r\n\tthis.width=this.canvas.width;\r\n\tthis.height=this.canvas.height;\r\n\tthis.gl=null;\r\n\tthis.gc=this.canvas.getContext( '2d' );\r\n\tthis.tmpCanvas=null;\r\n\tthis.r=255;\r\n\tthis.b=255;\r\n\tthis.g=255;\r\n\tthis.white=true;\r\n\tthis.color=\"rgb(255,255,255)\"\r\n\tthis.alpha=1;\r\n\tthis.blend=\"source-over\";\r\n\tthis.ix=1;this.iy=0;\r\n\tthis.jx=0;this.jy=1;\r\n\tthis.tx=0;this.ty=0;\r\n\tthis.tformed=false;\r\n\tthis.scissorX=0;\r\n\tthis.scissorY=0;\r\n\tthis.scissorWidth=0;\r\n\tthis.scissorHeight=0;\r\n\tthis.clipped=false;\r\n}", "title": "" }, { "docid": "f1ff7572648b4109c5291f29aa76d207", "score": "0.5346282", "text": "function graphicsObject(){\n\tthis.kanvas = null; //The Kanvas object this is attatched to\n\tthis.clicked = false; //If Event added, tracks whether currently pressed down\t\n\tthis.rolled = false; //If Event added, tracks whether currently rolled over\t\n\tthis.x = null; //Local X position\n\tthis.y = null; //Local Y position\n\tthis.alpha = 1;\t\t\t\t\t\t\t //Local Alpha\n\tthis.scale = 1; //Local Scale\n\tthis.rotation = 0; //Local Rotation\n\tthis.myPoint = new Point(this.x, this.y); //Used for .point return\n\tthis.width = null; //object Width, must be set manually! \n\tthis.height = null; //object Height, must be set manually!\n\tthis.depth = -1; //Relative depth for RollOver and MouseDown Methods\n\tthis.ii = 0; //Index\n\tthis.children = new myArray(); //Graphics Children of this object\n\tthis.parent = null; //Graphics Parent of this object\n\tthis.canvas = null; //Canvas from Kanvas\n\tthis.context = null;\t\t\t\t\t //Context from Kanvas\n\tthis.stage = null;\t\t\t\t\t\t //Stage from Kanvas\n}", "title": "" }, { "docid": "d18eb13cbc883faefdfb423b709d208b", "score": "0.5171893", "text": "function SVGElement() {}", "title": "" }, { "docid": "d18eb13cbc883faefdfb423b709d208b", "score": "0.5171893", "text": "function SVGElement() {}", "title": "" }, { "docid": "d18eb13cbc883faefdfb423b709d208b", "score": "0.5171893", "text": "function SVGElement() {}", "title": "" }, { "docid": "d18eb13cbc883faefdfb423b709d208b", "score": "0.5171893", "text": "function SVGElement() {}", "title": "" }, { "docid": "71dca8aa1f080c9ee0d6e6c67f70dec5", "score": "0.5071107", "text": "function SVGBaseElement() {\r\n}", "title": "" }, { "docid": "2b952ded279e752cabc2c06f6a1ca9fc", "score": "0.50213856", "text": "function Canvas() {\n\t this.element = null;\n\t this.contentElement = null;\n\t}", "title": "" }, { "docid": "a1a1700d137c281492284b60f129a992", "score": "0.49404913", "text": "constructor() {\n this._adapter = new JSXna.Framework.Graphics.GraphicsAdapter();\n }", "title": "" }, { "docid": "9e317237865fd13a4640f7062bb8c7f0", "score": "0.49401364", "text": "function _drawCanvas() {\n if (_canvasElem === undefined) {\n var canvasElem = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n canvasElem.setAttribute(\"width\", _canvasModel.width);\n canvasElem.setAttribute(\"height\", _canvasModel.height);\n // var viewBoxVal = \"0 0 \" + _canvasModel.width + \" \" + _canvasModel.height;\n // canvasElem.setAttribute(\"viewBox\", viewBoxVal);\n\n // listen on the canvas rather than the dot itself to prevent an excessive amount\n // of event listeners from getting created and destroyed\n // listen for mousedown instead of click b/c moving clicks register as drags\n var eventName = \"mousedown\";\n canvasElem.addEventListener(eventName, _boundHandleDotClick, _clickEventOptions);\n\n _canvasElem = canvasElem;\n _parent.appendChild(_canvasElem);\n } else {\n // Canvas already drawn\n }\n }", "title": "" }, { "docid": "0dc7464ebfefd0331ba60be86023096b", "score": "0.49245965", "text": "get canvas() {\n return this._svgCanvas;\n }", "title": "" }, { "docid": "d41edb73db09e334cbf221f33f91b299", "score": "0.49196738", "text": "function Shape() {}", "title": "" }, { "docid": "a1bf260cb2e5d0dcf99ce68f3e22e318", "score": "0.49035892", "text": "function addGraphics() {\n const vertices = [\n [-13040270.324055556, 4040357.7882640623],\n [-13038653.725694647, 4040689.513023534],\n [-13038063.204863824, 4038017.2028549737],\n [-13040097.818223165, 4037990.629044359],\n [-13040270.324055556, 4040357.7882640623],\n ];\n\n const polygon = createGeometry(vertices);\n validSymbol = createSymbol(\n [0, 170, 255, 0.8],\n \"solid\",\n 2,\n [255, 255, 255]\n );\n newDevelopmentGraphic = new Graphic({\n geometry: polygon,\n symbol: validSymbol,\n attributes: {\n newDevelopment: \"new store\",\n },\n });\n\n const boundaryVertices = [\n [-13048353.166569024, 4041363.935436187],\n [-13036929.861699322, 4041363.935436187],\n [-13036929.861699322, 4030232.5692555667],\n [-13048353.166569024, 4030232.5692555667],\n [-13048353.166569024, 4041363.935436187],\n ];\n\n boundaryPolygon = createGeometry(boundaryVertices);\n const boundarySymbol = createSymbol(\n [255, 255, 255, 0],\n \"solid\",\n 2,\n [255, 255, 255]\n );\n const boundaryGraphic = new Graphic({\n geometry: boundaryPolygon,\n symbol: boundarySymbol,\n });\n graphicsLayer.addMany([newDevelopmentGraphic]);\n boundaryLayer.add(boundaryGraphic);\n }", "title": "" }, { "docid": "fd135a511da7a76ef73db9f461d85aed", "score": "0.48978043", "text": "function Shape(){}", "title": "" }, { "docid": "05adc689c66ab6c9aa7745597ecb3c1a", "score": "0.48837003", "text": "getGraphicsDefaultOptions() {\n return this.core.defaultOptions.graphics;\n }", "title": "" }, { "docid": "21e2159a933db1a732bf99ee09ae467e", "score": "0.48813355", "text": "function addGraphic(event) {\r\n // Create a new graphic and set its geometry to\r\n // `create-complete` event geometry.\r\n const graphic = new Graphic({\r\n geometry: event.geometry,\r\n symbol: sketchViewModel.graphic.symbol\r\n });\r\n tempGraphicsLayer.add(graphic);\r\n }", "title": "" }, { "docid": "d3c579ca7d598674817e3f6bde7193d9", "score": "0.48617977", "text": "function HTMLCanvasElement()\n{\n}", "title": "" }, { "docid": "b95f073cc24463a7944e606421815f23", "score": "0.48598748", "text": "function TileSelectedGraphic() {\n\t// default to a render depth between Space and BuildingPlacer\n\tRygameObject.call(this, 0, 0, 500000, drawDepthSelectedSpace, null, gameLayer);\n\n\tthis.drawSurface = createContext(tileSize, tileSize, false);\n\tthis.rect.width = tileSize;\n\tthis.rect.height = tileSize;\n\tthis.redrawSelectedGraphic()\n}", "title": "" }, { "docid": "04c8ce3d5ec6842220250729bf332974", "score": "0.484454", "text": "drawGraphic(){\n let sn = this.shortNames(this.props.data);\n let canvas = this.setCanvas();\n let scales = this.setScales(sn);\n let axis = this.setAxis(scales);\n this.setAxisToCanvas(canvas, axis);\n this.drawBars(canvas, sn, scales);\n this.setLabelBars(canvas, sn, scales, this.props.language, this.props.percentage_y);\n this.setGridLines(canvas, axis, scales); \n }", "title": "" }, { "docid": "f0eaf6b180e692257bbf60bfba6c8254", "score": "0.48433915", "text": "function inheritGraphics(element) {\n\t// Uses inherited graphics from wikipedia template wrapper\n\t// instead of hard-coded javascript graphics.\n\telement.style.width = \"inherit\";\n\telement.style.height = \"inherit\";\n\telement.style.color = \"inherit\";\n\telement.style.background = element.parentNode.style.background;\t// Special!\n\telement.style.borderColor = \"inherit\";\n}", "title": "" }, { "docid": "f1b46abb6264e08482df1ebb2387cf70", "score": "0.48347977", "text": "function mxAbstractCanvas2D()\n{\n\t/**\n\t * Variable: converter\n\t * \n\t * Holds the <mxUrlConverter> to convert image URLs.\n\t */\n\tthis.converter = this.createUrlConverter();\n\t\n\tthis.reset();\n}", "title": "" }, { "docid": "e905a93589c194db91a37ee5a62d7281", "score": "0.48298058", "text": "function SVGContainer(htmlElement, ghost) {\r\n var _this = this;\r\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n */\r\n this._disposed = false;\r\n /**\r\n * If this component is in a separate HTML container, `autoResize` means the\r\n * module will constantly measure container's size and adopt contents to it.\r\n */\r\n this.autoResize = true;\r\n /**\r\n * Holds list of references to [[Sprite]] objects that should not be exported\r\n * when exporting chart to an image.\r\n *\r\n * @ignore\r\n */\r\n this.nonExportableSprites = [];\r\n /**\r\n * List of objects that need to be disposed when this one is disposed.\r\n */\r\n this._disposers = [];\r\n this.cssScale = 1;\r\n // This is needed so that it won't resize while printing, so that way printing works correctly.\r\n this._printing = false;\r\n // Log parent HTML element\r\n this.htmlElement = htmlElement;\r\n if (!ghost) {\r\n this._printing = false;\r\n this.initSensor();\r\n this._disposers.push(__WEBPACK_IMPORTED_MODULE_4__utils_DOM__[\"g\" /* addEventListener */](window, \"beforeprint\", function () {\r\n _this._printing = true;\r\n }));\r\n this._disposers.push(__WEBPACK_IMPORTED_MODULE_4__utils_DOM__[\"g\" /* addEventListener */](window, \"afterprint\", function () {\r\n _this._printing = false;\r\n }));\r\n }\r\n // Adds to containers array\r\n svgContainers.push(this);\r\n /**\r\n * Create child div for the container - it will have svg node\r\n * It might seem that this container is not necessay, however having it solves\r\n * a problems with mouse position detection and some other.\r\n */\r\n var svgContainer = document.createElement(\"div\");\r\n var style = svgContainer.style;\r\n style.width = \"100%\";\r\n style.height = \"100%\";\r\n style.position = \"relative\";\r\n htmlElement.appendChild(svgContainer);\r\n this.SVGContainer = svgContainer;\r\n }", "title": "" }, { "docid": "2a078afa5e98610790e304c06f136f44", "score": "0.48291358", "text": "function SVGContainer(htmlElement, ghost) {\r\n var _this = this;\r\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n */\r\n this._disposed = false;\r\n /**\r\n * If this component is in a separate HTML container, `autoResize` means the\r\n * module will constantly measure container's size and adopt contents to it.\r\n */\r\n this.autoResize = true;\r\n /**\r\n * Holds list of references to [[Sprite]] objects that should not be exported\r\n * when exporting chart to an image.\r\n *\r\n * @ignore\r\n */\r\n this.nonExportableSprites = [];\r\n /**\r\n * List of objects that need to be disposed when this one is disposed.\r\n */\r\n this._disposers = [];\r\n this.cssScale = 1;\r\n // This is needed so that it won't resize while printing, so that way printing works correctly.\r\n this._printing = false;\r\n // Log parent HTML element\r\n this.htmlElement = htmlElement;\r\n if (!ghost) {\r\n this._printing = false;\r\n this.initSensor();\r\n this._disposers.push(_utils_DOM__WEBPACK_IMPORTED_MODULE_4__.addEventListener(window, \"beforeprint\", function () {\r\n _this._printing = true;\r\n }));\r\n this._disposers.push(_utils_DOM__WEBPACK_IMPORTED_MODULE_4__.addEventListener(window, \"afterprint\", function () {\r\n _this._printing = false;\r\n }));\r\n }\r\n // Adds to containers array\r\n svgContainers.push(this);\r\n /**\r\n * Create child div for the container - it will have svg node\r\n * It might seem that this container is not necessay, however having it solves\r\n * a problems with mouse position detection and some other.\r\n */\r\n var svgContainer = document.createElement(\"div\");\r\n var style = svgContainer.style;\r\n style.width = \"100%\";\r\n style.height = \"100%\";\r\n style.position = \"relative\";\r\n htmlElement.appendChild(svgContainer);\r\n this.SVGContainer = svgContainer;\r\n }", "title": "" }, { "docid": "7338253053878b747207997d3eda30dc", "score": "0.4827753", "text": "draw(viz) {\n throw new Error(\"draw() method unimplemented for Shape subclass\");\n }", "title": "" }, { "docid": "bb2cf55152c5b4f9b25d9b5ea6a986b9", "score": "0.48141736", "text": "function gfx(uid, id) {\n\t//alert(\"test....\");\n\tthis.gid= id;\n\tthis.id = id;\n\tthis.uid = uid;\n\t// should get rid of this reference\n\tthis.model = graphLookup[id];\n\t//var id = gid;\n\t//graphics[id] = {}\n\t//console.log(this.model);\n\t//console.log(\"**************************************\");\n\tvar ng = 0;\n\t//console.log(id);\n//\tfor (var g in graphics);\n//\tng++;\n\tgfxLookup[id] = this;\n\t//div = document.createElement(\"div\");\n\t//this.indexedModel = graphics[id]; \n\t\n\t//thisGfx = this;\n\t//var gfxLookup\n\t//this.indexedModel = indexedModel;\n\n//\tbuild();\n\tif (!gfx.prototype.setted) {\n\t\tthis.setupNodeEvents(this.id, this.uid);\n\tgfx.prototype.setted = true;\n\t}\n}", "title": "" }, { "docid": "98f8543612c9c6c214e6af09c7fe5c83", "score": "0.48087683", "text": "updateGraphic() {\n const calc = new VexFlowMusicSheetCalculator_1.VexFlowMusicSheetCalculator(this.rules);\n this.graphic = new GraphicalMusicSheet_1.GraphicalMusicSheet(this.sheet, calc);\n if (this.drawingParameters.drawCursors && this.cursor) {\n this.cursor.init(this.sheet.MusicPartManager, this.graphic);\n }\n }", "title": "" }, { "docid": "77474e5e6fc34b17036af445d932618a", "score": "0.48024303", "text": "function markBaseClass(container, shapeName, glShapeName, useWebGl, className) {\n //super(container);\n this._seriesIndex = 0;\n this._seriesCount = 1;\n this._onShaderCallback = null;\n this._data = [0];\n this._fromGlParams = null;\n this._computedStyle = undefined;\n this._isVisible = true;\n this._firstShow = true;\n this._showOpacity = 1;\n var result = this.createContainerIfNeeded(container);\n container = result.container;\n useWebGl = (result.useWebGl !== undefined) ? result.useWebGl : useWebGl;\n this._container = container;\n //this.elem = container;\n this._shapeName = shapeName;\n this._glShapeName = glShapeName;\n this._className = className;\n this._jsParser = new marks.jsParserClass();\n //---- support for eBook calling ----\n var useWebGL = ((window[\"$usingWebGL\"] === true || useWebGl) && (glShapeName != null));\n if (useWebGL) {\n this._containerType = containerType.glCanvas;\n this._glBuilder = new marks.glBuilderClass(container, glShapeName);\n this._glBuilder.statsCallback(function (fps, shapesDrawn, elapsed) {\n var w = window;\n if (w.$setMarkStats) {\n w.$setMarkStats(fps, shapesDrawn);\n }\n });\n }\n else {\n if (container.tagName.toLowerCase() == \"canvas\") {\n this._containerType = containerType.canvasElem;\n }\n else if (container.rootContainer) {\n this._containerType = containerType.canvasGroup;\n }\n else {\n this._containerType = containerType.svg;\n }\n }\n if (this._containerType == containerType.canvasElem) {\n //var request = (useWebGL) ? \"3d\" : \"2d\";\n var canvasContainerElem = vp.canvas.selectContext(container, \"2d\")[0];\n canvasContainerElem.clear();\n this._container = canvasContainerElem;\n }\n var rootElem = this._container;\n if (!useWebGL) {\n //---- create our own GROUP that will parent the generated shapes ----\n var id = \"rootElem-\" + ((className) ? className : shapeName);\n var groupElem = vp.select(container)\n .append(\"g\")\n .id(id);\n rootElem = groupElem[0];\n }\n this._rootElem = rootElem;\n vp.dom.css(rootElem, \"opacity\", \"1\"); // write as \"1\" so toggle code works\n //---- NOTE: \"rootElem\" is the container that shapes will be generated into ----\n this._dataAnimMgr = new vp.animation.dataAnimMgrClass(rootElem, null, shapeName, className, false, false);\n this._dataAnimMgr\n .statsCallback(function (fps, shapesDrawn, elapsed) {\n var w = window;\n if (w.$setMarkStats) {\n w.$setMarkStats(fps, shapesDrawn);\n }\n });\n if (className) {\n if (this._containerType == containerType.canvasElem || this._containerType == containerType.canvasGroup) {\n var parentClassName = vp.select(this._container).attr(\"className\");\n this._computedStyle = vp.utils.getComputedStyleFromClass(shapeName, parentClassName, className);\n }\n }\n }", "title": "" }, { "docid": "32ab0ecea3ea140dcfba1be25773c6a8", "score": "0.47990775", "text": "drawShape(s, m, c) {\n switch (s.__proto__.constructor) {\n case Point:\n this.drawRect(s.x, s.y, 1, 1, m, c);\n break;\n case Circle:\n this.ctx.beginPath();\n this.ctx.arc(s.x, s.y, s.r, 0, Math.PI * 2);\n this[m](c);\n break;\n }\n }", "title": "" }, { "docid": "f09558621adda9f583667369ec438a5d", "score": "0.47869587", "text": "function Drawing(){\n\tthis.WIREFRAME = 1; this.FILL = 2;\n\tZOOM = 1;\n\tCANVAS = null;\n\tTEXTURES = null;\n}", "title": "" }, { "docid": "9ff6eecc2f95a0000c86b1e3d3130890", "score": "0.47815815", "text": "function SVGShapeElement(data, globalData, comp) {\r\n // List of drawable elements\r\n this.shapes = [];\r\n // Full shape data\r\n this.shapesData = data.shapes;\r\n // List of styles that will be applied to shapes\r\n this.stylesList = [];\r\n // List of modifiers that will be applied to shapes\r\n this.shapeModifiers = [];\r\n // List of items in shape tree\r\n this.itemsData = [];\r\n // List of items in previous shape tree\r\n this.processedElements = [];\r\n // List of animated components\r\n this.animatedContents = [];\r\n this.initElement(data, globalData, comp);\r\n // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n // List of elements that have been created\r\n this.prevViewData = [];\r\n // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\r\n}", "title": "" }, { "docid": "b434a0ef8c3253f0d16e0c1cc8995b9b", "score": "0.47730288", "text": "function factory(RGBColor, stackBlur) {\n // canvg(target, s)\n // empty parameters: replace all 'svg' elements on page with 'canvas' elements\n // target: canvas element or the id of a canvas element\n // s: svg string, url to svg file, or xml document\n // opts: optional hash of options\n //\t\t ignoreMouse: true => ignore mouse events\n //\t\t ignoreAnimation: true => ignore animations\n //\t\t ignoreDimensions: true => does not try to resize canvas\n //\t\t ignoreClear: true => does not clear canvas\n //\t\t offsetX: int => draws at a x offset\n //\t\t offsetY: int => draws at a y offset\n //\t\t scaleWidth: int => scales horizontally to width\n //\t\t scaleHeight: int => scales vertically to height\n //\t\t renderCallback: function => will call the function after the first render is completed\n //\t\t forceRedraw: function => will call the function on every frame, if it returns true, will redraw\n var canvg = function canvg(target, s, opts) {\n // no parameters\n if (target == null && s == null && opts == null) {\n var svgTags = document.querySelectorAll(\"svg\");\n\n for (var i = 0; i < svgTags.length; i++) {\n var svgTag = svgTags[i];\n var c = document.createElement(\"canvas\");\n c.width = svgTag.clientWidth;\n c.height = svgTag.clientHeight;\n svgTag.parentNode.insertBefore(c, svgTag);\n svgTag.parentNode.removeChild(svgTag);\n var div = document.createElement(\"div\");\n div.appendChild(svgTag);\n canvg(c, div.innerHTML);\n }\n\n return;\n }\n\n if (typeof target == \"string\") {\n target = document.getElementById(target);\n } // store class on canvas\n\n\n if (target.svg != null) {\n target.svg.stop();\n }\n\n var svg = build(opts || {}); // on i.e. 8 for flash canvas, we can't assign the property so check for it\n\n if (!(target.childNodes.length == 1 && target.childNodes[0].nodeName == \"OBJECT\")) {\n target.svg = svg;\n }\n\n var ctx = target.getContext(\"2d\");\n\n if (typeof s.documentElement != \"undefined\") {\n // load from xml doc\n svg.loadXmlDoc(ctx, s);\n } else if (s.substr(0, 1) == \"<\") {\n // load from xml string\n svg.loadXml(ctx, s);\n } else {\n // load from url\n svg.load(ctx, s);\n }\n }; // see https://developer.mozilla.org/en-US/docs/Web/API/Element.matches\n\n\n var matchesSelector;\n\n if (typeof Element.prototype.matches != \"undefined\") {\n matchesSelector = function matchesSelector(node, selector) {\n return node.matches(selector);\n };\n } else if (typeof Element.prototype.webkitMatchesSelector != \"undefined\") {\n matchesSelector = function matchesSelector(node, selector) {\n return node.webkitMatchesSelector(selector);\n };\n } else if (typeof Element.prototype.mozMatchesSelector != \"undefined\") {\n matchesSelector = function matchesSelector(node, selector) {\n return node.mozMatchesSelector(selector);\n };\n } else if (typeof Element.prototype.msMatchesSelector != \"undefined\") {\n matchesSelector = function matchesSelector(node, selector) {\n return node.msMatchesSelector(selector);\n };\n } else if (typeof Element.prototype.oMatchesSelector != \"undefined\") {\n matchesSelector = function matchesSelector(node, selector) {\n return node.oMatchesSelector(selector);\n };\n } else {\n // requires Sizzle: https://github.com/jquery/sizzle/wiki/Sizzle-Documentation\n // or jQuery: http://jquery.com/download/\n // or Zepto: http://zeptojs.com/#\n // without it, this is a ReferenceError\n if (typeof jQuery === \"function\" || typeof Zepto === \"function\") {\n matchesSelector = function matchesSelector(node, selector) {\n return $(node).is(selector);\n };\n }\n\n if (typeof matchesSelector === \"undefined\") {\n matchesSelector = Sizzle.matchesSelector;\n }\n } // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js\n\n\n var attributeRegex = /(\\[[^\\]]+\\])/g;\n var idRegex = /(#[^\\s\\+>~\\.\\[:]+)/g;\n var classRegex = /(\\.[^\\s\\+>~\\.\\[:]+)/g;\n var pseudoElementRegex = /(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi;\n var pseudoClassWithBracketsRegex = /(:[\\w-]+\\([^\\)]*\\))/gi;\n var pseudoClassRegex = /(:[^\\s\\+>~\\.\\[:]+)/g;\n var elementRegex = /([^\\s\\+>~\\.\\[:]+)/g;\n\n function getSelectorSpecificity(selector) {\n var typeCount = [0, 0, 0];\n\n var findMatch = function findMatch(regex, type) {\n var matches = selector.match(regex);\n\n if (matches == null) {\n return;\n }\n\n typeCount[type] += matches.length;\n selector = selector.replace(regex, \" \");\n };\n\n selector = selector.replace(/:not\\(([^\\)]*)\\)/g, \" $1 \");\n selector = selector.replace(/{[\\s\\S]*/gm, \" \");\n findMatch(attributeRegex, 1);\n findMatch(idRegex, 0);\n findMatch(classRegex, 1);\n findMatch(pseudoElementRegex, 2);\n findMatch(pseudoClassWithBracketsRegex, 1);\n findMatch(pseudoClassRegex, 1);\n selector = selector.replace(/[\\*\\s\\+>~]/g, \" \");\n selector = selector.replace(/[#\\.]/g, \" \");\n findMatch(elementRegex, 2);\n return typeCount.join(\"\");\n }\n\n function build(opts) {\n var svg = {\n opts: opts\n };\n svg.FRAMERATE = 30;\n svg.MAX_VIRTUAL_PIXELS = 30000;\n\n svg.log = function (msg) {};\n\n if (svg.opts.log == true && typeof console != \"undefined\") {\n svg.log = function (msg) {\n console.log(msg);\n };\n } // globals\n\n\n svg.init = function (ctx) {\n var uniqueId = 0;\n\n svg.UniqueId = function () {\n uniqueId++;\n return \"canvg\" + uniqueId;\n };\n\n svg.Definitions = {};\n svg.Styles = {};\n svg.StylesSpecificity = {};\n svg.Animations = [];\n svg.Images = [];\n svg.ctx = ctx;\n svg.ViewPort = new function () {\n this.viewPorts = [];\n\n this.Clear = function () {\n this.viewPorts = [];\n };\n\n this.SetCurrent = function (width, height) {\n this.viewPorts.push({\n width: width,\n height: height\n });\n };\n\n this.RemoveCurrent = function () {\n this.viewPorts.pop();\n };\n\n this.Current = function () {\n return this.viewPorts[this.viewPorts.length - 1];\n };\n\n this.width = function () {\n return this.Current().width;\n };\n\n this.height = function () {\n return this.Current().height;\n };\n\n this.ComputeSize = function (d) {\n if (d != null && typeof d == \"number\") {\n return d;\n }\n\n if (d == \"x\") {\n return this.width();\n }\n\n if (d == \"y\") {\n return this.height();\n }\n\n return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2);\n };\n }();\n };\n\n svg.init(); // images loaded\n\n svg.ImagesLoaded = function () {\n for (var i = 0; i < svg.Images.length; i++) {\n if (!svg.Images[i].loaded) {\n return false;\n }\n }\n\n return true;\n }; // trim\n\n\n svg.trim = function (s) {\n return s.replace(/^\\s+|\\s+$/g, \"\");\n }; // compress spaces\n\n\n svg.compressSpaces = function (s) {\n return s.replace(/[\\s\\r\\t\\n]+/gm, \" \");\n }; // ajax\n\n\n svg.ajax = function (url) {\n var AJAX;\n\n if (window.XMLHttpRequest) {\n AJAX = new XMLHttpRequest();\n } else {\n AJAX = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n\n if (AJAX) {\n AJAX.open(\"GET\", url, false);\n AJAX.send(null);\n return AJAX.responseText;\n }\n\n return null;\n }; // parse xml\n\n\n svg.parseXml = function (xml) {\n if (typeof Windows != \"undefined\" && typeof Windows.Data != \"undefined\" && typeof Windows.Data.Xml != \"undefined\") {\n var xmlDoc = new Windows.Data.Xml.Dom.XmlDocument();\n var settings = new Windows.Data.Xml.Dom.XmlLoadSettings();\n settings.prohibitDtd = false;\n xmlDoc.loadXml(xml, settings);\n return xmlDoc;\n } else if (window.DOMParser) {\n try {\n var parser = new DOMParser();\n return parser.parseFromString(xml, \"image/svg+xml\");\n } catch (e) {\n parser = new DOMParser();\n return parser.parseFromString(xml, \"text/xml\");\n }\n } else {\n xml = xml.replace(/<!DOCTYPE svg[^>]*>/, \"\");\n var xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = \"false\";\n xmlDoc.loadXML(xml);\n return xmlDoc;\n }\n };\n\n svg.Property = function (name, value) {\n this.name = name;\n this.value = value;\n };\n\n svg.Property.prototype.getValue = function () {\n return this.value;\n };\n\n svg.Property.prototype.hasValue = function () {\n return this.value != null && this.value !== \"\";\n }; // return the numerical value of the property\n\n\n svg.Property.prototype.numValue = function () {\n if (!this.hasValue()) {\n return 0;\n }\n\n var n = parseFloat(this.value);\n\n if ((this.value + \"\").match(/%$/)) {\n n = n / 100.0;\n }\n\n return n;\n };\n\n svg.Property.prototype.valueOrDefault = function (def) {\n if (this.hasValue()) {\n return this.value;\n }\n\n return def;\n };\n\n svg.Property.prototype.numValueOrDefault = function (def) {\n if (this.hasValue()) {\n return this.numValue();\n }\n\n return def;\n }; // color extensions\n // augment the current color value with the opacity\n\n\n svg.Property.prototype.addOpacity = function (opacityProp) {\n var newValue = this.value;\n\n if (opacityProp.value != null && opacityProp.value != \"\" && typeof this.value == \"string\") {\n // can only add opacity to colors, not patterns\n var color = new RGBColor(this.value);\n\n if (color.ok) {\n newValue = \"rgba(\" + color.r + \", \" + color.g + \", \" + color.b + \", \" + opacityProp.numValue() + \")\";\n }\n }\n\n return new svg.Property(this.name, newValue);\n }; // definition extensions\n // get the definition from the definitions table\n\n\n svg.Property.prototype.getDefinition = function () {\n var name = this.value.match(/#([^\\)'\"]+)/);\n\n if (name) {\n name = name[1];\n }\n\n if (!name) {\n name = this.value;\n }\n\n return svg.Definitions[name];\n };\n\n svg.Property.prototype.isUrlDefinition = function () {\n return this.value.indexOf(\"url(\") == 0;\n };\n\n svg.Property.prototype.getFillStyleDefinition = function (e, opacityProp) {\n var def = this.getDefinition(); // gradient\n\n if (def != null && def.createGradient) {\n return def.createGradient(svg.ctx, e, opacityProp);\n } // pattern\n\n\n if (def != null && def.createPattern) {\n if (def.getHrefAttribute().hasValue()) {\n var pt = def.attribute(\"patternTransform\");\n def = def.getHrefAttribute().getDefinition();\n\n if (pt.hasValue()) {\n def.attribute(\"patternTransform\", true).value = pt.value;\n }\n }\n\n return def.createPattern(svg.ctx, e);\n }\n\n return null;\n }; // length extensions\n\n\n svg.Property.prototype.getDPI = function (viewPort) {\n return 96.0; // TODO: compute?\n };\n\n svg.Property.prototype.getEM = function (viewPort) {\n var em = 12;\n var fontSize = new svg.Property(\"fontSize\", svg.Font.Parse(svg.ctx.font).fontSize);\n\n if (fontSize.hasValue()) {\n em = fontSize.toPixels(viewPort);\n }\n\n return em;\n };\n\n svg.Property.prototype.getUnits = function () {\n var s = this.value + \"\";\n return s.replace(/[0-9\\.\\-]/g, \"\");\n }; // get the length as pixels\n\n\n svg.Property.prototype.toPixels = function (viewPort, processPercent) {\n if (!this.hasValue()) {\n return 0;\n }\n\n var s = this.value + \"\";\n\n if (s.match(/em$/)) {\n return this.numValue() * this.getEM(viewPort);\n }\n\n if (s.match(/ex$/)) {\n return this.numValue() * this.getEM(viewPort) / 2.0;\n }\n\n if (s.match(/px$/)) {\n return this.numValue();\n }\n\n if (s.match(/pt$/)) {\n return this.numValue() * this.getDPI(viewPort) * (1.0 / 72.0);\n }\n\n if (s.match(/pc$/)) {\n return this.numValue() * 15;\n }\n\n if (s.match(/cm$/)) {\n return this.numValue() * this.getDPI(viewPort) / 2.54;\n }\n\n if (s.match(/mm$/)) {\n return this.numValue() * this.getDPI(viewPort) / 25.4;\n }\n\n if (s.match(/in$/)) {\n return this.numValue() * this.getDPI(viewPort);\n }\n\n if (s.match(/%$/)) {\n return this.numValue() * svg.ViewPort.ComputeSize(viewPort);\n }\n\n var n = this.numValue();\n\n if (processPercent && n < 1.0) {\n return n * svg.ViewPort.ComputeSize(viewPort);\n }\n\n return n;\n }; // time extensions\n // get the time as milliseconds\n\n\n svg.Property.prototype.toMilliseconds = function () {\n if (!this.hasValue()) {\n return 0;\n }\n\n var s = this.value + \"\";\n\n if (s.match(/s$/)) {\n return this.numValue() * 1000;\n }\n\n if (s.match(/ms$/)) {\n return this.numValue();\n }\n\n return this.numValue();\n }; // angle extensions\n // get the angle as radians\n\n\n svg.Property.prototype.toRadians = function () {\n if (!this.hasValue()) {\n return 0;\n }\n\n var s = this.value + \"\";\n\n if (s.match(/deg$/)) {\n return this.numValue() * (Math.PI / 180.0);\n }\n\n if (s.match(/grad$/)) {\n return this.numValue() * (Math.PI / 200.0);\n }\n\n if (s.match(/rad$/)) {\n return this.numValue();\n }\n\n return this.numValue() * (Math.PI / 180.0);\n }; // text extensions\n // get the text baseline\n\n\n var textBaselineMapping = {\n baseline: \"alphabetic\",\n \"before-edge\": \"top\",\n \"text-before-edge\": \"top\",\n middle: \"middle\",\n central: \"middle\",\n \"after-edge\": \"bottom\",\n \"text-after-edge\": \"bottom\",\n ideographic: \"ideographic\",\n alphabetic: \"alphabetic\",\n hanging: \"hanging\",\n mathematical: \"alphabetic\"\n };\n\n svg.Property.prototype.toTextBaseline = function () {\n if (!this.hasValue()) {\n return null;\n }\n\n return textBaselineMapping[this.value];\n }; // fonts\n\n\n svg.Font = new function () {\n this.Styles = \"normal|italic|oblique|inherit\";\n this.Variants = \"normal|small-caps|inherit\";\n this.Weights = \"normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit\";\n\n this.CreateFont = function (fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {\n var f = inherit != null ? this.Parse(inherit) : this.CreateFont(\"\", \"\", \"\", \"\", \"\", svg.ctx.font);\n return {\n fontFamily: fontFamily || f.fontFamily,\n fontSize: fontSize || f.fontSize,\n fontStyle: fontStyle || f.fontStyle,\n fontWeight: fontWeight || f.fontWeight,\n fontVariant: fontVariant || f.fontVariant,\n toString: function toString() {\n return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(\" \");\n }\n };\n };\n\n var that = this;\n\n this.Parse = function (s) {\n var f = {};\n var d = svg.trim(svg.compressSpaces(s || \"\")).split(\" \");\n var set = {\n fontSize: false,\n fontStyle: false,\n fontWeight: false,\n fontVariant: false\n };\n var ff = \"\";\n\n for (var i = 0; i < d.length; i++) {\n if (!set.fontStyle && that.Styles.indexOf(d[i]) != -1) {\n if (d[i] != \"inherit\") {\n f.fontStyle = d[i];\n }\n\n set.fontStyle = true;\n } else if (!set.fontVariant && that.Variants.indexOf(d[i]) != -1) {\n if (d[i] != \"inherit\") {\n f.fontVariant = d[i];\n }\n\n set.fontStyle = set.fontVariant = true;\n } else if (!set.fontWeight && that.Weights.indexOf(d[i]) != -1) {\n if (d[i] != \"inherit\") {\n f.fontWeight = d[i];\n }\n\n set.fontStyle = set.fontVariant = set.fontWeight = true;\n } else if (!set.fontSize) {\n if (d[i] != \"inherit\") {\n f.fontSize = d[i].split(\"/\")[0];\n }\n\n set.fontStyle = set.fontVariant = set.fontWeight = set.fontSize = true;\n } else {\n if (d[i] != \"inherit\") {\n ff += d[i];\n }\n }\n }\n\n if (ff != \"\") {\n f.fontFamily = ff;\n }\n\n return f;\n };\n }(); // points and paths\n\n svg.ToNumberArray = function (s) {\n var a = svg.trim(svg.compressSpaces((s || \"\").replace(/,/g, \" \"))).split(\" \");\n\n for (var i = 0; i < a.length; i++) {\n a[i] = parseFloat(a[i]);\n }\n\n return a;\n };\n\n svg.Point = function (x, y) {\n this.x = x;\n this.y = y;\n };\n\n svg.Point.prototype.angleTo = function (p) {\n return Math.atan2(p.y - this.y, p.x - this.x);\n };\n\n svg.Point.prototype.applyTransform = function (v) {\n var xp = this.x * v[0] + this.y * v[2] + v[4];\n var yp = this.x * v[1] + this.y * v[3] + v[5];\n this.x = xp;\n this.y = yp;\n };\n\n svg.CreatePoint = function (s) {\n var a = svg.ToNumberArray(s);\n return new svg.Point(a[0], a[1]);\n };\n\n svg.CreatePath = function (s) {\n var a = svg.ToNumberArray(s);\n var path = [];\n\n for (var i = 0; i < a.length; i += 2) {\n path.push(new svg.Point(a[i], a[i + 1]));\n }\n\n return path;\n }; // bounding box\n\n\n svg.BoundingBox = function (x1, y1, x2, y2) {\n // pass in initial points if you want\n this.x1 = Number.NaN;\n this.y1 = Number.NaN;\n this.x2 = Number.NaN;\n this.y2 = Number.NaN;\n\n this.x = function () {\n return this.x1;\n };\n\n this.y = function () {\n return this.y1;\n };\n\n this.width = function () {\n return this.x2 - this.x1;\n };\n\n this.height = function () {\n return this.y2 - this.y1;\n };\n\n this.addPoint = function (x, y) {\n if (x != null) {\n if (isNaN(this.x1) || isNaN(this.x2)) {\n this.x1 = x;\n this.x2 = x;\n }\n\n if (x < this.x1) {\n this.x1 = x;\n }\n\n if (x > this.x2) {\n this.x2 = x;\n }\n }\n\n if (y != null) {\n if (isNaN(this.y1) || isNaN(this.y2)) {\n this.y1 = y;\n this.y2 = y;\n }\n\n if (y < this.y1) {\n this.y1 = y;\n }\n\n if (y > this.y2) {\n this.y2 = y;\n }\n }\n };\n\n this.addX = function (x) {\n this.addPoint(x, null);\n };\n\n this.addY = function (y) {\n this.addPoint(null, y);\n };\n\n this.addBoundingBox = function (bb) {\n this.addPoint(bb.x1, bb.y1);\n this.addPoint(bb.x2, bb.y2);\n };\n\n this.addQuadraticCurve = function (p0x, p0y, p1x, p1y, p2x, p2y) {\n var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)\n\n var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)\n\n var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)\n\n var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)\n\n this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);\n };\n\n this.addBezierCurve = function (p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {\n // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n var p0 = [p0x, p0y],\n p1 = [p1x, p1y],\n p2 = [p2x, p2y],\n p3 = [p3x, p3y];\n this.addPoint(p0[0], p0[1]);\n this.addPoint(p3[0], p3[1]);\n\n for (i = 0; i <= 1; i++) {\n var f = function f(t) {\n return Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i];\n };\n\n var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n var c = 3 * p1[i] - 3 * p0[i];\n\n if (a == 0) {\n if (b == 0) {\n continue;\n }\n\n var t = -c / b;\n\n if (0 < t && t < 1) {\n if (i == 0) {\n this.addX(f(t));\n }\n\n if (i == 1) {\n this.addY(f(t));\n }\n }\n\n continue;\n }\n\n var b2ac = Math.pow(b, 2) - 4 * c * a;\n\n if (b2ac < 0) {\n continue;\n }\n\n var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n\n if (0 < t1 && t1 < 1) {\n if (i == 0) {\n this.addX(f(t1));\n }\n\n if (i == 1) {\n this.addY(f(t1));\n }\n }\n\n var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n\n if (0 < t2 && t2 < 1) {\n if (i == 0) {\n this.addX(f(t2));\n }\n\n if (i == 1) {\n this.addY(f(t2));\n }\n }\n }\n };\n\n this.isPointInBox = function (x, y) {\n return this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2;\n };\n\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }; // transforms\n\n\n svg.Transform = function (v) {\n var that = this;\n this.Type = {}; // translate\n\n this.Type.translate = function (s) {\n this.p = svg.CreatePoint(s);\n\n this.apply = function (ctx) {\n ctx.translate(this.p.x || 0.0, this.p.y || 0.0);\n };\n\n this.unapply = function (ctx) {\n ctx.translate(-1.0 * this.p.x || 0.0, -1.0 * this.p.y || 0.0);\n };\n\n this.applyToPoint = function (p) {\n p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);\n };\n }; // rotate\n\n\n this.Type.rotate = function (s) {\n var a = svg.ToNumberArray(s);\n this.angle = new svg.Property(\"angle\", a[0]);\n this.cx = a[1] || 0;\n this.cy = a[2] || 0;\n\n this.apply = function (ctx) {\n ctx.translate(this.cx, this.cy);\n ctx.rotate(this.angle.toRadians());\n ctx.translate(-this.cx, -this.cy);\n };\n\n this.unapply = function (ctx) {\n ctx.translate(this.cx, this.cy);\n ctx.rotate(-1.0 * this.angle.toRadians());\n ctx.translate(-this.cx, -this.cy);\n };\n\n this.applyToPoint = function (p) {\n var a = this.angle.toRadians();\n p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);\n p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]);\n p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]);\n };\n };\n\n this.Type.scale = function (s) {\n this.p = svg.CreatePoint(s);\n\n this.apply = function (ctx) {\n ctx.scale(this.p.x || 1.0, this.p.y || this.p.x || 1.0);\n };\n\n this.unapply = function (ctx) {\n ctx.scale(1.0 / this.p.x || 1.0, 1.0 / this.p.y || this.p.x || 1.0);\n };\n\n this.applyToPoint = function (p) {\n p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]);\n };\n };\n\n this.Type.matrix = function (s) {\n this.m = svg.ToNumberArray(s);\n\n this.apply = function (ctx) {\n ctx.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]);\n };\n\n this.unapply = function (ctx) {\n var a = this.m[0];\n var b = this.m[2];\n var c = this.m[4];\n var d = this.m[1];\n var e = this.m[3];\n var f = this.m[5];\n var g = 0.0;\n var h = 0.0;\n var i = 1.0;\n var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));\n ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));\n };\n\n this.applyToPoint = function (p) {\n p.applyTransform(this.m);\n };\n };\n\n this.Type.SkewBase = function (s) {\n this.base = that.Type.matrix;\n this.base(s);\n this.angle = new svg.Property(\"angle\", s);\n };\n\n this.Type.SkewBase.prototype = new this.Type.matrix();\n\n this.Type.skewX = function (s) {\n this.base = that.Type.SkewBase;\n this.base(s);\n this.m = [1, 0, Math.tan(this.angle.toRadians()), 1, 0, 0];\n };\n\n this.Type.skewX.prototype = new this.Type.SkewBase();\n\n this.Type.skewY = function (s) {\n this.base = that.Type.SkewBase;\n this.base(s);\n this.m = [1, Math.tan(this.angle.toRadians()), 0, 1, 0, 0];\n };\n\n this.Type.skewY.prototype = new this.Type.SkewBase();\n this.transforms = [];\n\n this.apply = function (ctx) {\n for (var i = 0; i < this.transforms.length; i++) {\n this.transforms[i].apply(ctx);\n }\n };\n\n this.unapply = function (ctx) {\n for (var i = this.transforms.length - 1; i >= 0; i--) {\n this.transforms[i].unapply(ctx);\n }\n };\n\n this.applyToPoint = function (p) {\n for (var i = 0; i < this.transforms.length; i++) {\n this.transforms[i].applyToPoint(p);\n }\n };\n\n var data = svg.trim(svg.compressSpaces(v)).replace(/\\)([a-zA-Z])/g, \") $1\").replace(/\\)(\\s?,\\s?)/g, \") \").split(/\\s(?=[a-z])/);\n\n for (var i = 0; i < data.length; i++) {\n var type = svg.trim(data[i].split(\"(\")[0]);\n var s = data[i].split(\"(\")[1].replace(\")\", \"\");\n var transformType = this.Type[type];\n\n if (typeof transformType != \"undefined\") {\n var transform = new transformType(s);\n transform.type = type;\n this.transforms.push(transform);\n }\n }\n }; // aspect ratio\n\n\n svg.AspectRatio = function (ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) {\n // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute\n aspectRatio = svg.compressSpaces(aspectRatio);\n aspectRatio = aspectRatio.replace(/^defer\\s/, \"\"); // ignore defer\n\n var align = aspectRatio.split(\" \")[0] || \"xMidYMid\";\n var meetOrSlice = aspectRatio.split(\" \")[1] || \"meet\"; // calculate scale\n\n var scaleX = width / desiredWidth;\n var scaleY = height / desiredHeight;\n var scaleMin = Math.min(scaleX, scaleY);\n var scaleMax = Math.max(scaleX, scaleY);\n\n if (meetOrSlice == \"meet\") {\n desiredWidth *= scaleMin;\n desiredHeight *= scaleMin;\n }\n\n if (meetOrSlice == \"slice\") {\n desiredWidth *= scaleMax;\n desiredHeight *= scaleMax;\n }\n\n refX = new svg.Property(\"refX\", refX);\n refY = new svg.Property(\"refY\", refY);\n\n if (refX.hasValue() && refY.hasValue()) {\n ctx.translate(-scaleMin * refX.toPixels(\"x\"), -scaleMin * refY.toPixels(\"y\"));\n } else {\n // align\n if (align.match(/^xMid/) && (meetOrSlice == \"meet\" && scaleMin == scaleY || meetOrSlice == \"slice\" && scaleMax == scaleY)) {\n ctx.translate(width / 2.0 - desiredWidth / 2.0, 0);\n }\n\n if (align.match(/YMid$/) && (meetOrSlice == \"meet\" && scaleMin == scaleX || meetOrSlice == \"slice\" && scaleMax == scaleX)) {\n ctx.translate(0, height / 2.0 - desiredHeight / 2.0);\n }\n\n if (align.match(/^xMax/) && (meetOrSlice == \"meet\" && scaleMin == scaleY || meetOrSlice == \"slice\" && scaleMax == scaleY)) {\n ctx.translate(width - desiredWidth, 0);\n }\n\n if (align.match(/YMax$/) && (meetOrSlice == \"meet\" && scaleMin == scaleX || meetOrSlice == \"slice\" && scaleMax == scaleX)) {\n ctx.translate(0, height - desiredHeight);\n }\n } // scale\n\n\n if (align == \"none\") {\n ctx.scale(scaleX, scaleY);\n } else if (meetOrSlice == \"meet\") {\n ctx.scale(scaleMin, scaleMin);\n } else if (meetOrSlice == \"slice\") {\n ctx.scale(scaleMax, scaleMax);\n } // translate\n\n\n ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY);\n }; // elements\n\n\n svg.Element = {};\n svg.EmptyProperty = new svg.Property(\"EMPTY\", \"\");\n\n svg.Element.ElementBase = function (node) {\n this.attributes = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.children = []; // get or create attribute\n\n this.attribute = function (name, createIfNotExists) {\n var a = this.attributes[name];\n\n if (a != null) {\n return a;\n }\n\n if (createIfNotExists == true) {\n a = new svg.Property(name, \"\");\n this.attributes[name] = a;\n }\n\n return a || svg.EmptyProperty;\n };\n\n this.getHrefAttribute = function () {\n for (var a in this.attributes) {\n if (a == \"href\" || a.match(/:href$/)) {\n return this.attributes[a];\n }\n }\n\n return svg.EmptyProperty;\n }; // get or create style, crawls up node tree\n\n\n this.style = function (name, createIfNotExists, skipAncestors) {\n var s = this.styles[name];\n\n if (s != null) {\n return s;\n }\n\n var a = this.attribute(name);\n\n if (a != null && a.hasValue()) {\n this.styles[name] = a; // move up to me to cache\n\n return a;\n }\n\n if (skipAncestors != true) {\n var p = this.parent;\n\n if (p != null) {\n var ps = p.style(name);\n\n if (ps != null && ps.hasValue()) {\n return ps;\n }\n }\n }\n\n if (createIfNotExists == true) {\n s = new svg.Property(name, \"\");\n this.styles[name] = s;\n }\n\n return s || svg.EmptyProperty;\n }; // base render\n\n\n this.render = function (ctx) {\n // don't render display=none\n if (this.style(\"display\").value == \"none\") {\n return;\n } // don't render visibility=hidden\n\n\n if (this.style(\"visibility\").value == \"hidden\") {\n return;\n }\n\n ctx.save();\n\n if (this.style(\"mask\").hasValue()) {\n // mask\n var mask = this.style(\"mask\").getDefinition();\n\n if (mask != null) {\n mask.apply(ctx, this);\n }\n } else if (this.style(\"filter\").hasValue()) {\n // filter\n var filter = this.style(\"filter\").getDefinition();\n\n if (filter != null) {\n filter.apply(ctx, this);\n }\n } else {\n this.setContext(ctx);\n this.renderChildren(ctx);\n this.clearContext(ctx);\n }\n\n ctx.restore();\n }; // base set context\n\n\n this.setContext = function (ctx) {// OVERRIDE ME!\n }; // base clear context\n\n\n this.clearContext = function (ctx) {// OVERRIDE ME!\n }; // base render children\n\n\n this.renderChildren = function (ctx) {\n for (var i = 0; i < this.children.length; i++) {\n this.children[i].render(ctx);\n }\n };\n\n this.addChild = function (childNode, create) {\n var child = childNode;\n\n if (create) {\n child = svg.CreateElement(childNode);\n }\n\n child.parent = this;\n\n if (child.type != \"title\") {\n this.children.push(child);\n }\n };\n\n this.addStylesFromStyleDefinition = function () {\n // add styles\n for (var selector in svg.Styles) {\n if (selector[0] != \"@\" && matchesSelector(node, selector)) {\n var styles = svg.Styles[selector];\n var specificity = svg.StylesSpecificity[selector];\n\n if (styles != null) {\n for (var name in styles) {\n var existingSpecificity = this.stylesSpecificity[name];\n\n if (typeof existingSpecificity == \"undefined\") {\n existingSpecificity = \"000\";\n }\n\n if (specificity > existingSpecificity) {\n this.styles[name] = styles[name];\n this.stylesSpecificity[name] = specificity;\n }\n }\n }\n }\n }\n }; // Microsoft Edge fix\n\n\n var allUppercase = new RegExp(\"^[A-Z-]+$\");\n\n var normalizeAttributeName = function normalizeAttributeName(name) {\n if (allUppercase.test(name)) {\n return name.toLowerCase();\n }\n\n return name;\n };\n\n if (node != null && node.nodeType == 1) {\n //ELEMENT_NODE\n // add attributes\n for (var i = 0; i < node.attributes.length; i++) {\n var attribute = node.attributes[i];\n var nodeName = normalizeAttributeName(attribute.nodeName);\n this.attributes[nodeName] = new svg.Property(nodeName, attribute.value);\n }\n\n this.addStylesFromStyleDefinition(); // add inline styles\n\n if (this.attribute(\"style\").hasValue()) {\n var styles = this.attribute(\"style\").value.split(\";\");\n\n for (var i = 0; i < styles.length; i++) {\n if (svg.trim(styles[i]) != \"\") {\n var style = styles[i].split(\":\");\n var name = svg.trim(style[0]);\n var value = svg.trim(style[1]);\n this.styles[name] = new svg.Property(name, value);\n }\n }\n } // add id\n\n\n if (this.attribute(\"id\").hasValue()) {\n if (svg.Definitions[this.attribute(\"id\").value] == null) {\n svg.Definitions[this.attribute(\"id\").value] = this;\n }\n } // add children\n\n\n for (var i = 0; i < node.childNodes.length; i++) {\n var childNode = node.childNodes[i];\n\n if (childNode.nodeType == 1) {\n this.addChild(childNode, true);\n } //ELEMENT_NODE\n\n\n if (this.captureTextNodes && (childNode.nodeType == 3 || childNode.nodeType == 4)) {\n var text = childNode.value || childNode.text || childNode.textContent || \"\";\n\n if (svg.compressSpaces(text) != \"\") {\n this.addChild(new svg.Element.tspan(childNode), false); // TEXT_NODE\n }\n }\n }\n }\n };\n\n svg.Element.RenderedElementBase = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.setContext = function (ctx) {\n // fill\n if (this.style(\"fill\").isUrlDefinition()) {\n var fs = this.style(\"fill\").getFillStyleDefinition(this, this.style(\"fill-opacity\"));\n\n if (fs != null) {\n ctx.fillStyle = fs;\n }\n } else if (this.style(\"fill\").hasValue()) {\n var fillStyle = this.style(\"fill\");\n\n if (fillStyle.value == \"currentColor\") {\n fillStyle.value = this.style(\"color\").value;\n }\n\n if (fillStyle.value != \"inherit\") {\n ctx.fillStyle = fillStyle.value == \"none\" ? \"rgba(0,0,0,0)\" : fillStyle.value;\n }\n }\n\n if (this.style(\"fill-opacity\").hasValue()) {\n var fillStyle = new svg.Property(\"fill\", ctx.fillStyle);\n fillStyle = fillStyle.addOpacity(this.style(\"fill-opacity\"));\n ctx.fillStyle = fillStyle.value;\n } // stroke\n\n\n if (this.style(\"stroke\").isUrlDefinition()) {\n var fs = this.style(\"stroke\").getFillStyleDefinition(this, this.style(\"stroke-opacity\"));\n\n if (fs != null) {\n ctx.strokeStyle = fs;\n }\n } else if (this.style(\"stroke\").hasValue()) {\n var strokeStyle = this.style(\"stroke\");\n\n if (strokeStyle.value == \"currentColor\") {\n strokeStyle.value = this.style(\"color\").value;\n }\n\n if (strokeStyle.value != \"inherit\") {\n ctx.strokeStyle = strokeStyle.value == \"none\" ? \"rgba(0,0,0,0)\" : strokeStyle.value;\n }\n }\n\n if (this.style(\"stroke-opacity\").hasValue()) {\n var strokeStyle = new svg.Property(\"stroke\", ctx.strokeStyle);\n strokeStyle = strokeStyle.addOpacity(this.style(\"stroke-opacity\"));\n ctx.strokeStyle = strokeStyle.value;\n }\n\n if (this.style(\"stroke-width\").hasValue()) {\n var newLineWidth = this.style(\"stroke-width\").toPixels();\n ctx.lineWidth = newLineWidth == 0 ? 0.001 : newLineWidth; // browsers don't respect 0\n }\n\n if (this.style(\"stroke-linecap\").hasValue()) {\n ctx.lineCap = this.style(\"stroke-linecap\").value;\n }\n\n if (this.style(\"stroke-linejoin\").hasValue()) {\n ctx.lineJoin = this.style(\"stroke-linejoin\").value;\n }\n\n if (this.style(\"stroke-miterlimit\").hasValue()) {\n ctx.miterLimit = this.style(\"stroke-miterlimit\").value;\n }\n\n if (this.style(\"stroke-dasharray\").hasValue() && this.style(\"stroke-dasharray\").value != \"none\") {\n var gaps = svg.ToNumberArray(this.style(\"stroke-dasharray\").value);\n\n if (typeof ctx.setLineDash != \"undefined\") {\n ctx.setLineDash(gaps);\n } else if (typeof ctx.webkitLineDash != \"undefined\") {\n ctx.webkitLineDash = gaps;\n } else if (typeof ctx.mozDash != \"undefined\" && !(gaps.length == 1 && gaps[0] == 0)) {\n ctx.mozDash = gaps;\n }\n\n var offset = this.style(\"stroke-dashoffset\").numValueOrDefault(1);\n\n if (typeof ctx.lineDashOffset != \"undefined\") {\n ctx.lineDashOffset = offset;\n } else if (typeof ctx.webkitLineDashOffset != \"undefined\") {\n ctx.webkitLineDashOffset = offset;\n } else if (typeof ctx.mozDashOffset != \"undefined\") {\n ctx.mozDashOffset = offset;\n }\n } // font\n\n\n if (typeof ctx.font != \"undefined\") {\n ctx.font = svg.Font.CreateFont(this.style(\"font-style\").value, this.style(\"font-variant\").value, this.style(\"font-weight\").value, this.style(\"font-size\").hasValue() ? this.style(\"font-size\").toPixels() + \"px\" : \"\", this.style(\"font-family\").value).toString();\n } // transform\n\n\n if (this.style(\"transform\", false, true).hasValue()) {\n var transform = new svg.Transform(this.style(\"transform\", false, true).value);\n transform.apply(ctx);\n } // clip\n\n\n if (this.style(\"clip-path\", false, true).hasValue()) {\n var clip = this.style(\"clip-path\", false, true).getDefinition();\n\n if (clip != null) {\n clip.apply(ctx);\n }\n } // opacity\n\n\n if (this.style(\"opacity\").hasValue()) {\n ctx.globalAlpha = this.style(\"opacity\").numValue();\n }\n };\n };\n\n svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase();\n\n svg.Element.PathElementBase = function (node) {\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n\n this.path = function (ctx) {\n if (ctx != null) {\n ctx.beginPath();\n }\n\n return new svg.BoundingBox();\n };\n\n this.renderChildren = function (ctx) {\n this.path(ctx);\n svg.Mouse.checkPath(this, ctx);\n\n if (ctx.fillStyle != \"\") {\n if (this.style(\"fill-rule\").valueOrDefault(\"inherit\") != \"inherit\") {\n ctx.fill(this.style(\"fill-rule\").value);\n } else {\n ctx.fill();\n }\n }\n\n if (ctx.strokeStyle != \"\") {\n ctx.stroke();\n }\n\n var markers = this.getMarkers();\n\n if (markers != null) {\n if (this.style(\"marker-start\").isUrlDefinition()) {\n var marker = this.style(\"marker-start\").getDefinition();\n marker.render(ctx, markers[0][0], markers[0][1]);\n }\n\n if (this.style(\"marker-mid\").isUrlDefinition()) {\n var marker = this.style(\"marker-mid\").getDefinition();\n\n for (var i = 1; i < markers.length - 1; i++) {\n marker.render(ctx, markers[i][0], markers[i][1]);\n }\n }\n\n if (this.style(\"marker-end\").isUrlDefinition()) {\n var marker = this.style(\"marker-end\").getDefinition();\n marker.render(ctx, markers[markers.length - 1][0], markers[markers.length - 1][1]);\n }\n }\n };\n\n this.getBoundingBox = function () {\n return this.path();\n };\n\n this.getMarkers = function () {\n return null;\n };\n };\n\n svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase(); // svg element\n\n svg.Element.svg = function (node) {\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n this.baseClearContext = this.clearContext;\n\n this.clearContext = function (ctx) {\n this.baseClearContext(ctx);\n svg.ViewPort.RemoveCurrent();\n };\n\n this.baseSetContext = this.setContext;\n\n this.setContext = function (ctx) {\n // initial values and defaults\n ctx.strokeStyle = \"rgba(0,0,0,0)\";\n ctx.lineCap = \"butt\";\n ctx.lineJoin = \"miter\";\n ctx.miterLimit = 4;\n\n if (typeof ctx.font != \"undefined\" && typeof window.getComputedStyle != \"undefined\") {\n ctx.font = window.getComputedStyle(ctx.canvas).getPropertyValue(\"font\");\n }\n\n this.baseSetContext(ctx); // create new view port\n\n if (!this.attribute(\"x\").hasValue()) {\n this.attribute(\"x\", true).value = 0;\n }\n\n if (!this.attribute(\"y\").hasValue()) {\n this.attribute(\"y\", true).value = 0;\n }\n\n ctx.translate(this.attribute(\"x\").toPixels(\"x\"), this.attribute(\"y\").toPixels(\"y\"));\n var width = svg.ViewPort.width();\n var height = svg.ViewPort.height();\n\n if (!this.attribute(\"width\").hasValue()) {\n this.attribute(\"width\", true).value = \"100%\";\n }\n\n if (!this.attribute(\"height\").hasValue()) {\n this.attribute(\"height\", true).value = \"100%\";\n }\n\n if (typeof this.root == \"undefined\") {\n width = this.attribute(\"width\").toPixels(\"x\");\n height = this.attribute(\"height\").toPixels(\"y\");\n var x = 0;\n var y = 0;\n\n if (this.attribute(\"refX\").hasValue() && this.attribute(\"refY\").hasValue()) {\n x = -this.attribute(\"refX\").toPixels(\"x\");\n y = -this.attribute(\"refY\").toPixels(\"y\");\n }\n\n if (this.attribute(\"overflow\").valueOrDefault(\"hidden\") != \"visible\") {\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.lineTo(width, y);\n ctx.lineTo(width, height);\n ctx.lineTo(x, height);\n ctx.closePath();\n ctx.clip();\n }\n }\n\n svg.ViewPort.SetCurrent(width, height); // viewbox\n\n if (this.attribute(\"viewBox\").hasValue()) {\n var viewBox = svg.ToNumberArray(this.attribute(\"viewBox\").value);\n var minX = viewBox[0];\n var minY = viewBox[1];\n width = viewBox[2];\n height = viewBox[3];\n svg.AspectRatio(ctx, this.attribute(\"preserveAspectRatio\").value, svg.ViewPort.width(), width, svg.ViewPort.height(), height, minX, minY, this.attribute(\"refX\").value, this.attribute(\"refY\").value);\n svg.ViewPort.RemoveCurrent();\n svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);\n }\n };\n };\n\n svg.Element.svg.prototype = new svg.Element.RenderedElementBase(); // rect element\n\n svg.Element.rect = function (node) {\n this.base = svg.Element.PathElementBase;\n this.base(node);\n\n this.path = function (ctx) {\n var x = this.attribute(\"x\").toPixels(\"x\");\n var y = this.attribute(\"y\").toPixels(\"y\");\n var width = this.attribute(\"width\").toPixels(\"x\");\n var height = this.attribute(\"height\").toPixels(\"y\");\n var rx = this.attribute(\"rx\").toPixels(\"x\");\n var ry = this.attribute(\"ry\").toPixels(\"y\");\n\n if (this.attribute(\"rx\").hasValue() && !this.attribute(\"ry\").hasValue()) {\n ry = rx;\n }\n\n if (this.attribute(\"ry\").hasValue() && !this.attribute(\"rx\").hasValue()) {\n rx = ry;\n }\n\n rx = Math.min(rx, width / 2.0);\n ry = Math.min(ry, height / 2.0);\n\n if (ctx != null) {\n ctx.beginPath();\n ctx.moveTo(x + rx, y);\n ctx.lineTo(x + width - rx, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + ry);\n ctx.lineTo(x + width, y + height - ry);\n ctx.quadraticCurveTo(x + width, y + height, x + width - rx, y + height);\n ctx.lineTo(x + rx, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - ry);\n ctx.lineTo(x, y + ry);\n ctx.quadraticCurveTo(x, y, x + rx, y);\n ctx.closePath();\n }\n\n return new svg.BoundingBox(x, y, x + width, y + height);\n };\n };\n\n svg.Element.rect.prototype = new svg.Element.PathElementBase(); // circle element\n\n svg.Element.circle = function (node) {\n this.base = svg.Element.PathElementBase;\n this.base(node);\n\n this.path = function (ctx) {\n var cx = this.attribute(\"cx\").toPixels(\"x\");\n var cy = this.attribute(\"cy\").toPixels(\"y\");\n var r = this.attribute(\"r\").toPixels();\n\n if (ctx != null) {\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, Math.PI * 2, true);\n ctx.closePath();\n }\n\n return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r);\n };\n };\n\n svg.Element.circle.prototype = new svg.Element.PathElementBase(); // ellipse element\n\n svg.Element.ellipse = function (node) {\n this.base = svg.Element.PathElementBase;\n this.base(node);\n\n this.path = function (ctx) {\n var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n var rx = this.attribute(\"rx\").toPixels(\"x\");\n var ry = this.attribute(\"ry\").toPixels(\"y\");\n var cx = this.attribute(\"cx\").toPixels(\"x\");\n var cy = this.attribute(\"cy\").toPixels(\"y\");\n\n if (ctx != null) {\n ctx.beginPath();\n ctx.moveTo(cx, cy - ry);\n ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);\n ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);\n ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);\n ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);\n ctx.closePath();\n }\n\n return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);\n };\n };\n\n svg.Element.ellipse.prototype = new svg.Element.PathElementBase(); // line element\n\n svg.Element.line = function (node) {\n this.base = svg.Element.PathElementBase;\n this.base(node);\n\n this.getPoints = function () {\n return [new svg.Point(this.attribute(\"x1\").toPixels(\"x\"), this.attribute(\"y1\").toPixels(\"y\")), new svg.Point(this.attribute(\"x2\").toPixels(\"x\"), this.attribute(\"y2\").toPixels(\"y\"))];\n };\n\n this.path = function (ctx) {\n var points = this.getPoints();\n\n if (ctx != null) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n ctx.lineTo(points[1].x, points[1].y);\n }\n\n return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y);\n };\n\n this.getMarkers = function () {\n var points = this.getPoints();\n var a = points[0].angleTo(points[1]);\n return [[points[0], a], [points[1], a]];\n };\n };\n\n svg.Element.line.prototype = new svg.Element.PathElementBase(); // polyline element\n\n svg.Element.polyline = function (node) {\n this.base = svg.Element.PathElementBase;\n this.base(node);\n this.points = svg.CreatePath(this.attribute(\"points\").value);\n\n this.path = function (ctx) {\n var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y);\n\n if (ctx != null) {\n ctx.beginPath();\n ctx.moveTo(this.points[0].x, this.points[0].y);\n }\n\n for (var i = 1; i < this.points.length; i++) {\n bb.addPoint(this.points[i].x, this.points[i].y);\n\n if (ctx != null) {\n ctx.lineTo(this.points[i].x, this.points[i].y);\n }\n }\n\n return bb;\n };\n\n this.getMarkers = function () {\n var markers = [];\n\n for (var i = 0; i < this.points.length - 1; i++) {\n markers.push([this.points[i], this.points[i].angleTo(this.points[i + 1])]);\n }\n\n if (markers.length > 0) {\n markers.push([this.points[this.points.length - 1], markers[markers.length - 1][1]]);\n }\n\n return markers;\n };\n };\n\n svg.Element.polyline.prototype = new svg.Element.PathElementBase(); // polygon element\n\n svg.Element.polygon = function (node) {\n this.base = svg.Element.polyline;\n this.base(node);\n this.basePath = this.path;\n\n this.path = function (ctx) {\n var bb = this.basePath(ctx);\n\n if (ctx != null) {\n ctx.lineTo(this.points[0].x, this.points[0].y);\n ctx.closePath();\n }\n\n return bb;\n };\n };\n\n svg.Element.polygon.prototype = new svg.Element.polyline(); // path element\n\n svg.Element.path = function (node) {\n this.base = svg.Element.PathElementBase;\n this.base(node);\n var d = this.attribute(\"d\").value; // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF\n\n d = d.replace(/,/gm, \" \"); // get rid of all commas\n // As the end of a match can also be the start of the next match, we need to run this replace twice.\n\n for (var i = 0; i < 2; i++) {\n d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm, \"$1 $2\");\n } // suffix commands with spaces\n\n\n d = d.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm, \"$1 $2\"); // prefix commands with spaces\n\n d = d.replace(/([0-9])([+\\-])/gm, \"$1 $2\"); // separate digits on +- signs\n // Again, we need to run this twice to find all occurances\n\n for (var i = 0; i < 2; i++) {\n d = d.replace(/(\\.[0-9]*)(\\.)/gm, \"$1 $2\");\n } // separate digits when they start with a comma\n\n\n d = d.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm, \"$1 $3 $4 \"); // shorthand elliptical arc path syntax\n\n d = svg.compressSpaces(d); // compress multiple spaces\n\n d = svg.trim(d);\n this.PathParser = new function (d) {\n this.tokens = d.split(\" \");\n\n this.reset = function () {\n this.i = -1;\n this.command = \"\";\n this.previousCommand = \"\";\n this.start = new svg.Point(0, 0);\n this.control = new svg.Point(0, 0);\n this.current = new svg.Point(0, 0);\n this.points = [];\n this.angles = [];\n };\n\n this.isEnd = function () {\n return this.i >= this.tokens.length - 1;\n };\n\n this.isCommandOrEnd = function () {\n if (this.isEnd()) {\n return true;\n }\n\n return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null;\n };\n\n this.isRelativeCommand = function () {\n switch (this.command) {\n case \"m\":\n case \"l\":\n case \"h\":\n case \"v\":\n case \"c\":\n case \"s\":\n case \"q\":\n case \"t\":\n case \"a\":\n case \"z\":\n return true;\n break;\n }\n\n return false;\n };\n\n this.getToken = function () {\n this.i++;\n return this.tokens[this.i];\n };\n\n this.getScalar = function () {\n return parseFloat(this.getToken());\n };\n\n this.nextCommand = function () {\n this.previousCommand = this.command;\n this.command = this.getToken();\n };\n\n this.getPoint = function () {\n var p = new svg.Point(this.getScalar(), this.getScalar());\n return this.makeAbsolute(p);\n };\n\n this.getAsControlPoint = function () {\n var p = this.getPoint();\n this.control = p;\n return p;\n };\n\n this.getAsCurrentPoint = function () {\n var p = this.getPoint();\n this.current = p;\n return p;\n };\n\n this.getReflectedControlPoint = function () {\n if (this.previousCommand.toLowerCase() != \"c\" && this.previousCommand.toLowerCase() != \"s\" && this.previousCommand.toLowerCase() != \"q\" && this.previousCommand.toLowerCase() != \"t\") {\n return this.current;\n } // reflect point\n\n\n var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y);\n return p;\n };\n\n this.makeAbsolute = function (p) {\n if (this.isRelativeCommand()) {\n p.x += this.current.x;\n p.y += this.current.y;\n }\n\n return p;\n };\n\n this.addMarker = function (p, from, priorTo) {\n // if the last angle isn't filled in because we didn't have this point yet ...\n if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length - 1] == null) {\n this.angles[this.angles.length - 1] = this.points[this.points.length - 1].angleTo(priorTo);\n }\n\n this.addMarkerAngle(p, from == null ? null : from.angleTo(p));\n };\n\n this.addMarkerAngle = function (p, a) {\n this.points.push(p);\n this.angles.push(a);\n };\n\n this.getMarkerPoints = function () {\n return this.points;\n };\n\n this.getMarkerAngles = function () {\n for (var i = 0; i < this.angles.length; i++) {\n if (this.angles[i] == null) {\n for (var j = i + 1; j < this.angles.length; j++) {\n if (this.angles[j] != null) {\n this.angles[i] = this.angles[j];\n break;\n }\n }\n }\n }\n\n return this.angles;\n };\n }(d);\n\n this.path = function (ctx) {\n var pp = this.PathParser;\n pp.reset();\n var bb = new svg.BoundingBox();\n\n if (ctx != null) {\n ctx.beginPath();\n }\n\n while (!pp.isEnd()) {\n pp.nextCommand();\n\n switch (pp.command) {\n case \"M\":\n case \"m\":\n var p = pp.getAsCurrentPoint();\n pp.addMarker(p);\n bb.addPoint(p.x, p.y);\n\n if (ctx != null) {\n ctx.moveTo(p.x, p.y);\n }\n\n pp.start = pp.current;\n\n while (!pp.isCommandOrEnd()) {\n var p = pp.getAsCurrentPoint();\n pp.addMarker(p, pp.start);\n bb.addPoint(p.x, p.y);\n\n if (ctx != null) {\n ctx.lineTo(p.x, p.y);\n }\n }\n\n break;\n\n case \"L\":\n case \"l\":\n while (!pp.isCommandOrEnd()) {\n var c = pp.current;\n var p = pp.getAsCurrentPoint();\n pp.addMarker(p, c);\n bb.addPoint(p.x, p.y);\n\n if (ctx != null) {\n ctx.lineTo(p.x, p.y);\n }\n }\n\n break;\n\n case \"H\":\n case \"h\":\n while (!pp.isCommandOrEnd()) {\n var newP = new svg.Point((pp.isRelativeCommand() ? pp.current.x : 0) + pp.getScalar(), pp.current.y);\n pp.addMarker(newP, pp.current);\n pp.current = newP;\n bb.addPoint(pp.current.x, pp.current.y);\n\n if (ctx != null) {\n ctx.lineTo(pp.current.x, pp.current.y);\n }\n }\n\n break;\n\n case \"V\":\n case \"v\":\n while (!pp.isCommandOrEnd()) {\n var newP = new svg.Point(pp.current.x, (pp.isRelativeCommand() ? pp.current.y : 0) + pp.getScalar());\n pp.addMarker(newP, pp.current);\n pp.current = newP;\n bb.addPoint(pp.current.x, pp.current.y);\n\n if (ctx != null) {\n ctx.lineTo(pp.current.x, pp.current.y);\n }\n }\n\n break;\n\n case \"C\":\n case \"c\":\n while (!pp.isCommandOrEnd()) {\n var curr = pp.current;\n var p1 = pp.getPoint();\n var cntrl = pp.getAsControlPoint();\n var cp = pp.getAsCurrentPoint();\n pp.addMarker(cp, cntrl, p1);\n bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);\n\n if (ctx != null) {\n ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);\n }\n }\n\n break;\n\n case \"S\":\n case \"s\":\n while (!pp.isCommandOrEnd()) {\n var curr = pp.current;\n var p1 = pp.getReflectedControlPoint();\n var cntrl = pp.getAsControlPoint();\n var cp = pp.getAsCurrentPoint();\n pp.addMarker(cp, cntrl, p1);\n bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);\n\n if (ctx != null) {\n ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);\n }\n }\n\n break;\n\n case \"Q\":\n case \"q\":\n while (!pp.isCommandOrEnd()) {\n var curr = pp.current;\n var cntrl = pp.getAsControlPoint();\n var cp = pp.getAsCurrentPoint();\n pp.addMarker(cp, cntrl, cntrl);\n bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);\n\n if (ctx != null) {\n ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);\n }\n }\n\n break;\n\n case \"T\":\n case \"t\":\n while (!pp.isCommandOrEnd()) {\n var curr = pp.current;\n var cntrl = pp.getReflectedControlPoint();\n pp.control = cntrl;\n var cp = pp.getAsCurrentPoint();\n pp.addMarker(cp, cntrl, cntrl);\n bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);\n\n if (ctx != null) {\n ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);\n }\n }\n\n break;\n\n case \"A\":\n case \"a\":\n while (!pp.isCommandOrEnd()) {\n var curr = pp.current;\n var rx = pp.getScalar();\n var ry = pp.getScalar();\n var xAxisRotation = pp.getScalar() * (Math.PI / 180.0);\n var largeArcFlag = pp.getScalar();\n var sweepFlag = pp.getScalar();\n var cp = pp.getAsCurrentPoint(); // Conversion from endpoint to center parameterization\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n // x1', y1'\n\n var currp = new svg.Point(Math.cos(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.sin(xAxisRotation) * (curr.y - cp.y) / 2.0, -Math.sin(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.cos(xAxisRotation) * (curr.y - cp.y) / 2.0); // adjust radii\n\n var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);\n\n if (l > 1) {\n rx *= Math.sqrt(l);\n ry *= Math.sqrt(l);\n } // cx', cy'\n\n\n var s = (largeArcFlag == sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(currp.y, 2) - Math.pow(ry, 2) * Math.pow(currp.x, 2)) / (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2)));\n\n if (isNaN(s)) {\n s = 0;\n }\n\n var cpp = new svg.Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy\n\n var centp = new svg.Point((curr.x + cp.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (curr.y + cp.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // vector magnitude\n\n var m = function m(v) {\n return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));\n }; // ratio between two vectors\n\n\n var r = function r(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (m(u) * m(v));\n }; // angle between two vectors\n\n\n var a = function a(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(r(u, v));\n }; // initial angle\n\n\n var a1 = a([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // angle delta\n\n var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];\n var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];\n var ad = a(u, v);\n\n if (r(u, v) <= -1) {\n ad = Math.PI;\n }\n\n if (r(u, v) >= 1) {\n ad = 0;\n } // for markers\n\n\n var dir = 1 - sweepFlag ? 1.0 : -1.0;\n var ah = a1 + dir * (ad / 2.0);\n var halfWay = new svg.Point(centp.x + rx * Math.cos(ah), centp.y + ry * Math.sin(ah));\n pp.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);\n pp.addMarkerAngle(cp, ah - dir * Math.PI);\n bb.addPoint(cp.x, cp.y); // TODO: this is too naive, make it better\n\n if (ctx != null) {\n var r = rx > ry ? rx : ry;\n var sx = rx > ry ? 1 : rx / ry;\n var sy = rx > ry ? ry / rx : 1;\n ctx.translate(centp.x, centp.y);\n ctx.rotate(xAxisRotation);\n ctx.scale(sx, sy);\n ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepFlag);\n ctx.scale(1 / sx, 1 / sy);\n ctx.rotate(-xAxisRotation);\n ctx.translate(-centp.x, -centp.y);\n }\n }\n\n break;\n\n case \"Z\":\n case \"z\":\n if (ctx != null) {\n ctx.closePath();\n }\n\n pp.current = pp.start;\n }\n }\n\n return bb;\n };\n\n this.getMarkers = function () {\n var points = this.PathParser.getMarkerPoints();\n var angles = this.PathParser.getMarkerAngles();\n var markers = [];\n\n for (var i = 0; i < points.length; i++) {\n markers.push([points[i], angles[i]]);\n }\n\n return markers;\n };\n };\n\n svg.Element.path.prototype = new svg.Element.PathElementBase(); // pattern element\n\n svg.Element.pattern = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.createPattern = function (ctx, element) {\n var width = this.attribute(\"width\").toPixels(\"x\", true);\n var height = this.attribute(\"height\").toPixels(\"y\", true); // render me using a temporary svg element\n\n var tempSvg = new svg.Element.svg();\n tempSvg.attributes.viewBox = new svg.Property(\"viewBox\", this.attribute(\"viewBox\").value);\n tempSvg.attributes.width = new svg.Property(\"width\", width + \"px\");\n tempSvg.attributes.height = new svg.Property(\"height\", height + \"px\");\n tempSvg.attributes.transform = new svg.Property(\"transform\", this.attribute(\"patternTransform\").value);\n tempSvg.children = this.children;\n var c = document.createElement(\"canvas\");\n c.width = width;\n c.height = height;\n var cctx = c.getContext(\"2d\");\n\n if (this.attribute(\"x\").hasValue() && this.attribute(\"y\").hasValue()) {\n cctx.translate(this.attribute(\"x\").toPixels(\"x\", true), this.attribute(\"y\").toPixels(\"y\", true));\n } // render 3x3 grid so when we transform there's no white space on edges\n\n\n for (var x = -1; x <= 1; x++) {\n for (var y = -1; y <= 1; y++) {\n cctx.save();\n tempSvg.attributes.x = new svg.Property(\"x\", x * c.width);\n tempSvg.attributes.y = new svg.Property(\"y\", y * c.height);\n tempSvg.render(cctx);\n cctx.restore();\n }\n }\n\n var pattern = ctx.createPattern(c, \"repeat\");\n return pattern;\n };\n };\n\n svg.Element.pattern.prototype = new svg.Element.ElementBase(); // marker element\n\n svg.Element.marker = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n this.baseRender = this.render;\n\n this.render = function (ctx, point, angle) {\n ctx.translate(point.x, point.y);\n\n if (this.attribute(\"orient\").valueOrDefault(\"auto\") == \"auto\") {\n ctx.rotate(angle);\n }\n\n if (this.attribute(\"markerUnits\").valueOrDefault(\"strokeWidth\") == \"strokeWidth\") {\n ctx.scale(ctx.lineWidth, ctx.lineWidth);\n }\n\n ctx.save(); // render me using a temporary svg element\n\n var tempSvg = new svg.Element.svg();\n tempSvg.attributes.viewBox = new svg.Property(\"viewBox\", this.attribute(\"viewBox\").value);\n tempSvg.attributes.refX = new svg.Property(\"refX\", this.attribute(\"refX\").value);\n tempSvg.attributes.refY = new svg.Property(\"refY\", this.attribute(\"refY\").value);\n tempSvg.attributes.width = new svg.Property(\"width\", this.attribute(\"markerWidth\").value);\n tempSvg.attributes.height = new svg.Property(\"height\", this.attribute(\"markerHeight\").value);\n tempSvg.attributes.fill = new svg.Property(\"fill\", this.attribute(\"fill\").valueOrDefault(\"black\"));\n tempSvg.attributes.stroke = new svg.Property(\"stroke\", this.attribute(\"stroke\").valueOrDefault(\"none\"));\n tempSvg.children = this.children;\n tempSvg.render(ctx);\n ctx.restore();\n\n if (this.attribute(\"markerUnits\").valueOrDefault(\"strokeWidth\") == \"strokeWidth\") {\n ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);\n }\n\n if (this.attribute(\"orient\").valueOrDefault(\"auto\") == \"auto\") {\n ctx.rotate(-angle);\n }\n\n ctx.translate(-point.x, -point.y);\n };\n };\n\n svg.Element.marker.prototype = new svg.Element.ElementBase(); // definitions element\n\n svg.Element.defs = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.render = function (ctx) {// NOOP\n };\n };\n\n svg.Element.defs.prototype = new svg.Element.ElementBase(); // base for gradients\n\n svg.Element.GradientBase = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n this.stops = [];\n\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n\n if (child.type == \"stop\") {\n this.stops.push(child);\n }\n }\n\n this.getGradient = function () {// OVERRIDE ME!\n };\n\n this.gradientUnits = function () {\n return this.attribute(\"gradientUnits\").valueOrDefault(\"objectBoundingBox\");\n };\n\n this.attributesToInherit = [\"gradientUnits\"];\n\n this.inheritStopContainer = function (stopsContainer) {\n for (var i = 0; i < this.attributesToInherit.length; i++) {\n var attributeToInherit = this.attributesToInherit[i];\n\n if (!this.attribute(attributeToInherit).hasValue() && stopsContainer.attribute(attributeToInherit).hasValue()) {\n this.attribute(attributeToInherit, true).value = stopsContainer.attribute(attributeToInherit).value;\n }\n }\n };\n\n this.createGradient = function (ctx, element, parentOpacityProp) {\n var stopsContainer = this;\n\n if (this.getHrefAttribute().hasValue()) {\n stopsContainer = this.getHrefAttribute().getDefinition();\n this.inheritStopContainer(stopsContainer);\n }\n\n var addParentOpacity = function addParentOpacity(color) {\n if (parentOpacityProp.hasValue()) {\n var p = new svg.Property(\"color\", color);\n return p.addOpacity(parentOpacityProp).value;\n }\n\n return color;\n };\n\n var g = this.getGradient(ctx, element);\n\n if (g == null) {\n return addParentOpacity(stopsContainer.stops[stopsContainer.stops.length - 1].color);\n }\n\n for (var i = 0; i < stopsContainer.stops.length; i++) {\n g.addColorStop(stopsContainer.stops[i].offset, addParentOpacity(stopsContainer.stops[i].color));\n }\n\n if (this.attribute(\"gradientTransform\").hasValue()) {\n // render as transformed pattern on temporary canvas\n var rootView = svg.ViewPort.viewPorts[0];\n var rect = new svg.Element.rect();\n rect.attributes.x = new svg.Property(\"x\", -svg.MAX_VIRTUAL_PIXELS / 3.0);\n rect.attributes.y = new svg.Property(\"y\", -svg.MAX_VIRTUAL_PIXELS / 3.0);\n rect.attributes.width = new svg.Property(\"width\", svg.MAX_VIRTUAL_PIXELS);\n rect.attributes.height = new svg.Property(\"height\", svg.MAX_VIRTUAL_PIXELS);\n var group = new svg.Element.g();\n group.attributes.transform = new svg.Property(\"transform\", this.attribute(\"gradientTransform\").value);\n group.children = [rect];\n var tempSvg = new svg.Element.svg();\n tempSvg.attributes.x = new svg.Property(\"x\", 0);\n tempSvg.attributes.y = new svg.Property(\"y\", 0);\n tempSvg.attributes.width = new svg.Property(\"width\", rootView.width);\n tempSvg.attributes.height = new svg.Property(\"height\", rootView.height);\n tempSvg.children = [group];\n var c = document.createElement(\"canvas\");\n c.width = rootView.width;\n c.height = rootView.height;\n var tempCtx = c.getContext(\"2d\");\n tempCtx.fillStyle = g;\n tempSvg.render(tempCtx);\n return tempCtx.createPattern(c, \"no-repeat\");\n }\n\n return g;\n };\n };\n\n svg.Element.GradientBase.prototype = new svg.Element.ElementBase(); // linear gradient element\n\n svg.Element.linearGradient = function (node) {\n this.base = svg.Element.GradientBase;\n this.base(node);\n this.attributesToInherit.push(\"x1\");\n this.attributesToInherit.push(\"y1\");\n this.attributesToInherit.push(\"x2\");\n this.attributesToInherit.push(\"y2\");\n\n this.getGradient = function (ctx, element) {\n var bb = this.gradientUnits() == \"objectBoundingBox\" ? element.getBoundingBox() : null;\n\n if (!this.attribute(\"x1\").hasValue() && !this.attribute(\"y1\").hasValue() && !this.attribute(\"x2\").hasValue() && !this.attribute(\"y2\").hasValue()) {\n this.attribute(\"x1\", true).value = 0;\n this.attribute(\"y1\", true).value = 0;\n this.attribute(\"x2\", true).value = 1;\n this.attribute(\"y2\", true).value = 0;\n }\n\n var x1 = this.gradientUnits() == \"objectBoundingBox\" ? bb.x() + bb.width() * this.attribute(\"x1\").numValue() : this.attribute(\"x1\").toPixels(\"x\");\n var y1 = this.gradientUnits() == \"objectBoundingBox\" ? bb.y() + bb.height() * this.attribute(\"y1\").numValue() : this.attribute(\"y1\").toPixels(\"y\");\n var x2 = this.gradientUnits() == \"objectBoundingBox\" ? bb.x() + bb.width() * this.attribute(\"x2\").numValue() : this.attribute(\"x2\").toPixels(\"x\");\n var y2 = this.gradientUnits() == \"objectBoundingBox\" ? bb.y() + bb.height() * this.attribute(\"y2\").numValue() : this.attribute(\"y2\").toPixels(\"y\");\n\n if (x1 == x2 && y1 == y2) {\n return null;\n }\n\n return ctx.createLinearGradient(x1, y1, x2, y2);\n };\n };\n\n svg.Element.linearGradient.prototype = new svg.Element.GradientBase(); // radial gradient element\n\n svg.Element.radialGradient = function (node) {\n this.base = svg.Element.GradientBase;\n this.base(node);\n this.attributesToInherit.push(\"cx\");\n this.attributesToInherit.push(\"cy\");\n this.attributesToInherit.push(\"r\");\n this.attributesToInherit.push(\"fx\");\n this.attributesToInherit.push(\"fy\");\n\n this.getGradient = function (ctx, element) {\n var bb = element.getBoundingBox();\n\n if (!this.attribute(\"cx\").hasValue()) {\n this.attribute(\"cx\", true).value = \"50%\";\n }\n\n if (!this.attribute(\"cy\").hasValue()) {\n this.attribute(\"cy\", true).value = \"50%\";\n }\n\n if (!this.attribute(\"r\").hasValue()) {\n this.attribute(\"r\", true).value = \"50%\";\n }\n\n var cx = this.gradientUnits() == \"objectBoundingBox\" ? bb.x() + bb.width() * this.attribute(\"cx\").numValue() : this.attribute(\"cx\").toPixels(\"x\");\n var cy = this.gradientUnits() == \"objectBoundingBox\" ? bb.y() + bb.height() * this.attribute(\"cy\").numValue() : this.attribute(\"cy\").toPixels(\"y\");\n var fx = cx;\n var fy = cy;\n\n if (this.attribute(\"fx\").hasValue()) {\n fx = this.gradientUnits() == \"objectBoundingBox\" ? bb.x() + bb.width() * this.attribute(\"fx\").numValue() : this.attribute(\"fx\").toPixels(\"x\");\n }\n\n if (this.attribute(\"fy\").hasValue()) {\n fy = this.gradientUnits() == \"objectBoundingBox\" ? bb.y() + bb.height() * this.attribute(\"fy\").numValue() : this.attribute(\"fy\").toPixels(\"y\");\n }\n\n var r = this.gradientUnits() == \"objectBoundingBox\" ? (bb.width() + bb.height()) / 2.0 * this.attribute(\"r\").numValue() : this.attribute(\"r\").toPixels();\n return ctx.createRadialGradient(fx, fy, 0, cx, cy, r);\n };\n };\n\n svg.Element.radialGradient.prototype = new svg.Element.GradientBase(); // gradient stop element\n\n svg.Element.stop = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n this.offset = this.attribute(\"offset\").numValue();\n\n if (this.offset < 0) {\n this.offset = 0;\n }\n\n if (this.offset > 1) {\n this.offset = 1;\n }\n\n var stopColor = this.style(\"stop-color\", true);\n\n if (stopColor.value === \"\") {\n stopColor.value = \"#000\";\n }\n\n if (this.style(\"stop-opacity\").hasValue()) {\n stopColor = stopColor.addOpacity(this.style(\"stop-opacity\"));\n }\n\n this.color = stopColor.value;\n };\n\n svg.Element.stop.prototype = new svg.Element.ElementBase(); // animation base element\n\n svg.Element.AnimateBase = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n svg.Animations.push(this);\n this.duration = 0.0;\n this.begin = this.attribute(\"begin\").toMilliseconds();\n this.maxDuration = this.begin + this.attribute(\"dur\").toMilliseconds();\n\n this.getProperty = function () {\n var attributeType = this.attribute(\"attributeType\").value;\n var attributeName = this.attribute(\"attributeName\").value;\n\n if (attributeType == \"CSS\") {\n return this.parent.style(attributeName, true);\n }\n\n return this.parent.attribute(attributeName, true);\n };\n\n this.initialValue = null;\n this.initialUnits = \"\";\n this.removed = false;\n\n this.calcValue = function () {\n // OVERRIDE ME!\n return \"\";\n };\n\n this.update = function (delta) {\n // set initial value\n if (this.initialValue == null) {\n this.initialValue = this.getProperty().value;\n this.initialUnits = this.getProperty().getUnits();\n } // if we're past the end time\n\n\n if (this.duration > this.maxDuration) {\n // loop for indefinitely repeating animations\n if (this.attribute(\"repeatCount\").value == \"indefinite\" || this.attribute(\"repeatDur\").value == \"indefinite\") {\n this.duration = 0.0;\n } else if (this.attribute(\"fill\").valueOrDefault(\"remove\") == \"freeze\" && !this.frozen) {\n this.frozen = true;\n this.parent.animationFrozen = true;\n this.parent.animationFrozenValue = this.getProperty().value;\n } else if (this.attribute(\"fill\").valueOrDefault(\"remove\") == \"remove\" && !this.removed) {\n this.removed = true;\n this.getProperty().value = this.parent.animationFrozen ? this.parent.animationFrozenValue : this.initialValue;\n return true;\n }\n\n return false;\n }\n\n this.duration = this.duration + delta; // if we're past the begin time\n\n var updated = false;\n\n if (this.begin < this.duration) {\n var newValue = this.calcValue(); // tween\n\n if (this.attribute(\"type\").hasValue()) {\n // for transform, etc.\n var type = this.attribute(\"type\").value;\n newValue = type + \"(\" + newValue + \")\";\n }\n\n this.getProperty().value = newValue;\n updated = true;\n }\n\n return updated;\n };\n\n this.from = this.attribute(\"from\");\n this.to = this.attribute(\"to\");\n this.values = this.attribute(\"values\");\n\n if (this.values.hasValue()) {\n this.values.value = this.values.value.split(\";\");\n } // fraction of duration we've covered\n\n\n this.progress = function () {\n var ret = {\n progress: (this.duration - this.begin) / (this.maxDuration - this.begin)\n };\n\n if (this.values.hasValue()) {\n var p = ret.progress * (this.values.value.length - 1);\n var lb = Math.floor(p),\n ub = Math.ceil(p);\n ret.from = new svg.Property(\"from\", parseFloat(this.values.value[lb]));\n ret.to = new svg.Property(\"to\", parseFloat(this.values.value[ub]));\n ret.progress = (p - lb) / (ub - lb);\n } else {\n ret.from = this.from;\n ret.to = this.to;\n }\n\n return ret;\n };\n };\n\n svg.Element.AnimateBase.prototype = new svg.Element.ElementBase(); // animate element\n\n svg.Element.animate = function (node) {\n this.base = svg.Element.AnimateBase;\n this.base(node);\n\n this.calcValue = function () {\n var p = this.progress(); // tween value linearly\n\n var newValue = p.from.numValue() + (p.to.numValue() - p.from.numValue()) * p.progress;\n return newValue + this.initialUnits;\n };\n };\n\n svg.Element.animate.prototype = new svg.Element.AnimateBase(); // animate color element\n\n svg.Element.animateColor = function (node) {\n this.base = svg.Element.AnimateBase;\n this.base(node);\n\n this.calcValue = function () {\n var p = this.progress();\n var from = new RGBColor(p.from.value);\n var to = new RGBColor(p.to.value);\n\n if (from.ok && to.ok) {\n // tween color linearly\n var r = from.r + (to.r - from.r) * p.progress;\n var g = from.g + (to.g - from.g) * p.progress;\n var b = from.b + (to.b - from.b) * p.progress;\n return \"rgb(\" + parseInt(r, 10) + \",\" + parseInt(g, 10) + \",\" + parseInt(b, 10) + \")\";\n }\n\n return this.attribute(\"from\").value;\n };\n };\n\n svg.Element.animateColor.prototype = new svg.Element.AnimateBase(); // animate transform element\n\n svg.Element.animateTransform = function (node) {\n this.base = svg.Element.AnimateBase;\n this.base(node);\n\n this.calcValue = function () {\n var p = this.progress(); // tween value linearly\n\n var from = svg.ToNumberArray(p.from.value);\n var to = svg.ToNumberArray(p.to.value);\n var newValue = \"\";\n\n for (var i = 0; i < from.length; i++) {\n newValue += from[i] + (to[i] - from[i]) * p.progress + \" \";\n }\n\n return newValue;\n };\n };\n\n svg.Element.animateTransform.prototype = new svg.Element.animate(); // font element\n\n svg.Element.font = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n this.horizAdvX = this.attribute(\"horiz-adv-x\").numValue();\n this.isRTL = false;\n this.isArabic = false;\n this.fontFace = null;\n this.missingGlyph = null;\n this.glyphs = [];\n\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n\n if (child.type == \"font-face\") {\n this.fontFace = child;\n\n if (child.style(\"font-family\").hasValue()) {\n svg.Definitions[child.style(\"font-family\").value] = this;\n }\n } else if (child.type == \"missing-glyph\") {\n this.missingGlyph = child;\n } else if (child.type == \"glyph\") {\n if (child.arabicForm != \"\") {\n this.isRTL = true;\n this.isArabic = true;\n\n if (typeof this.glyphs[child.unicode] == \"undefined\") {\n this.glyphs[child.unicode] = [];\n }\n\n this.glyphs[child.unicode][child.arabicForm] = child;\n } else {\n this.glyphs[child.unicode] = child;\n }\n }\n }\n };\n\n svg.Element.font.prototype = new svg.Element.ElementBase(); // font-face element\n\n svg.Element.fontface = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n this.ascent = this.attribute(\"ascent\").value;\n this.descent = this.attribute(\"descent\").value;\n this.unitsPerEm = this.attribute(\"units-per-em\").numValue();\n };\n\n svg.Element.fontface.prototype = new svg.Element.ElementBase(); // missing-glyph element\n\n svg.Element.missingglyph = function (node) {\n this.base = svg.Element.path;\n this.base(node);\n this.horizAdvX = 0;\n };\n\n svg.Element.missingglyph.prototype = new svg.Element.path(); // glyph element\n\n svg.Element.glyph = function (node) {\n this.base = svg.Element.path;\n this.base(node);\n this.horizAdvX = this.attribute(\"horiz-adv-x\").numValue();\n this.unicode = this.attribute(\"unicode\").value;\n this.arabicForm = this.attribute(\"arabic-form\").value;\n };\n\n svg.Element.glyph.prototype = new svg.Element.path(); // text element\n\n svg.Element.text = function (node) {\n this.captureTextNodes = true;\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n this.baseSetContext = this.setContext;\n\n this.setContext = function (ctx) {\n this.baseSetContext(ctx);\n var textBaseline = this.style(\"dominant-baseline\").toTextBaseline();\n\n if (textBaseline == null) {\n textBaseline = this.style(\"alignment-baseline\").toTextBaseline();\n }\n\n if (textBaseline != null) {\n ctx.textBaseline = textBaseline;\n }\n };\n\n this.getBoundingBox = function () {\n var x = this.attribute(\"x\").toPixels(\"x\");\n var y = this.attribute(\"y\").toPixels(\"y\");\n var fontSize = this.parent.style(\"font-size\").numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);\n return new svg.BoundingBox(x, y - fontSize, x + Math.floor(fontSize * 2.0 / 3.0) * this.children[0].getText().length, y);\n };\n\n this.renderChildren = function (ctx) {\n this.x = this.attribute(\"x\").toPixels(\"x\");\n this.y = this.attribute(\"y\").toPixels(\"y\");\n\n if (this.attribute(\"dx\").hasValue()) {\n this.x += this.attribute(\"dx\").toPixels(\"x\");\n }\n\n if (this.attribute(\"dy\").hasValue()) {\n this.y += this.attribute(\"dy\").toPixels(\"y\");\n }\n\n this.x += this.getAnchorDelta(ctx, this, 0);\n\n for (var i = 0; i < this.children.length; i++) {\n this.renderChild(ctx, this, this, i);\n }\n };\n\n this.getAnchorDelta = function (ctx, parent, startI) {\n var textAnchor = this.style(\"text-anchor\").valueOrDefault(\"start\");\n\n if (textAnchor != \"start\") {\n var width = 0;\n\n for (var i = startI; i < parent.children.length; i++) {\n var child = parent.children[i];\n\n if (i > startI && child.attribute(\"x\").hasValue()) {\n break;\n } // new group\n\n\n width += child.measureTextRecursive(ctx);\n }\n\n return -1 * (textAnchor == \"end\" ? width : width / 2.0);\n }\n\n return 0;\n };\n\n this.renderChild = function (ctx, textParent, parent, i) {\n var child = parent.children[i];\n\n if (child.attribute(\"x\").hasValue()) {\n child.x = child.attribute(\"x\").toPixels(\"x\") + textParent.getAnchorDelta(ctx, parent, i);\n\n if (child.attribute(\"dx\").hasValue()) {\n child.x += child.attribute(\"dx\").toPixels(\"x\");\n }\n } else {\n if (child.attribute(\"dx\").hasValue()) {\n textParent.x += child.attribute(\"dx\").toPixels(\"x\");\n }\n\n child.x = textParent.x;\n }\n\n textParent.x = child.x + child.measureText(ctx);\n\n if (child.attribute(\"y\").hasValue()) {\n child.y = child.attribute(\"y\").toPixels(\"y\");\n\n if (child.attribute(\"dy\").hasValue()) {\n child.y += child.attribute(\"dy\").toPixels(\"y\");\n }\n } else {\n if (child.attribute(\"dy\").hasValue()) {\n textParent.y += child.attribute(\"dy\").toPixels(\"y\");\n }\n\n child.y = textParent.y;\n }\n\n textParent.y = child.y;\n child.render(ctx);\n\n for (var i = 0; i < child.children.length; i++) {\n textParent.renderChild(ctx, textParent, child, i);\n }\n };\n };\n\n svg.Element.text.prototype = new svg.Element.RenderedElementBase(); // text base\n\n svg.Element.TextElementBase = function (node) {\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n\n this.getGlyph = function (font, text, i) {\n var c = text[i];\n var glyph = null;\n\n if (font.isArabic) {\n var arabicForm = \"isolated\";\n\n if ((i == 0 || text[i - 1] == \" \") && i < text.length - 2 && text[i + 1] != \" \") {\n arabicForm = \"terminal\";\n }\n\n if (i > 0 && text[i - 1] != \" \" && i < text.length - 2 && text[i + 1] != \" \") {\n arabicForm = \"medial\";\n }\n\n if (i > 0 && text[i - 1] != \" \" && (i == text.length - 1 || text[i + 1] == \" \")) {\n arabicForm = \"initial\";\n }\n\n if (typeof font.glyphs[c] != \"undefined\") {\n glyph = font.glyphs[c][arabicForm];\n\n if (glyph == null && font.glyphs[c].type == \"glyph\") {\n glyph = font.glyphs[c];\n }\n }\n } else {\n glyph = font.glyphs[c];\n }\n\n if (glyph == null) {\n glyph = font.missingGlyph;\n }\n\n return glyph;\n };\n\n this.renderChildren = function (ctx) {\n var customFont = this.parent.style(\"font-family\").getDefinition();\n\n if (customFont != null) {\n var fontSize = this.parent.style(\"font-size\").numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);\n var fontStyle = this.parent.style(\"font-style\").valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle);\n var text = this.getText();\n\n if (customFont.isRTL) {\n text = text.split(\"\").reverse().join(\"\");\n }\n\n var dx = svg.ToNumberArray(this.parent.attribute(\"dx\").value);\n\n for (var i = 0; i < text.length; i++) {\n var glyph = this.getGlyph(customFont, text, i);\n var scale = fontSize / customFont.fontFace.unitsPerEm;\n ctx.translate(this.x, this.y);\n ctx.scale(scale, -scale);\n var lw = ctx.lineWidth;\n ctx.lineWidth = ctx.lineWidth * customFont.fontFace.unitsPerEm / fontSize;\n\n if (fontStyle == \"italic\") {\n ctx.transform(1, 0, 0.4, 1, 0, 0);\n }\n\n glyph.render(ctx);\n\n if (fontStyle == \"italic\") {\n ctx.transform(1, 0, -0.4, 1, 0, 0);\n }\n\n ctx.lineWidth = lw;\n ctx.scale(1 / scale, -1 / scale);\n ctx.translate(-this.x, -this.y);\n this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm;\n\n if (typeof dx[i] != \"undefined\" && !isNaN(dx[i])) {\n this.x += dx[i];\n }\n }\n\n return;\n }\n\n if (ctx.fillStyle != \"\") {\n ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);\n }\n\n if (ctx.strokeStyle != \"\") {\n ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y);\n }\n };\n\n this.getText = function () {// OVERRIDE ME\n };\n\n this.measureTextRecursive = function (ctx) {\n var width = this.measureText(ctx);\n\n for (var i = 0; i < this.children.length; i++) {\n width += this.children[i].measureTextRecursive(ctx);\n }\n\n return width;\n };\n\n this.measureText = function (ctx) {\n var customFont = this.parent.style(\"font-family\").getDefinition();\n\n if (customFont != null) {\n var fontSize = this.parent.style(\"font-size\").numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);\n var measure = 0;\n var text = this.getText();\n\n if (customFont.isRTL) {\n text = text.split(\"\").reverse().join(\"\");\n }\n\n var dx = svg.ToNumberArray(this.parent.attribute(\"dx\").value);\n\n for (var i = 0; i < text.length; i++) {\n var glyph = this.getGlyph(customFont, text, i);\n measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;\n\n if (typeof dx[i] != \"undefined\" && !isNaN(dx[i])) {\n measure += dx[i];\n }\n }\n\n return measure;\n }\n\n var textToMeasure = svg.compressSpaces(this.getText());\n\n if (!ctx.measureText) {\n return textToMeasure.length * 10;\n }\n\n ctx.save();\n this.setContext(ctx);\n var width = ctx.measureText(textToMeasure).width;\n ctx.restore();\n return width;\n };\n };\n\n svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase(); // tspan\n\n svg.Element.tspan = function (node) {\n this.captureTextNodes = true;\n this.base = svg.Element.TextElementBase;\n this.base(node);\n this.text = svg.compressSpaces(node.value || node.text || node.textContent || \"\");\n\n this.getText = function () {\n // if this node has children, then they own the text\n if (this.children.length > 0) {\n return \"\";\n }\n\n return this.text;\n };\n };\n\n svg.Element.tspan.prototype = new svg.Element.TextElementBase(); // tref\n\n svg.Element.tref = function (node) {\n this.base = svg.Element.TextElementBase;\n this.base(node);\n\n this.getText = function () {\n var element = this.getHrefAttribute().getDefinition();\n\n if (element != null) {\n return element.children[0].getText();\n }\n };\n };\n\n svg.Element.tref.prototype = new svg.Element.TextElementBase(); // a element\n\n svg.Element.a = function (node) {\n this.base = svg.Element.TextElementBase;\n this.base(node);\n this.hasText = node.childNodes.length > 0;\n\n for (var i = 0; i < node.childNodes.length; i++) {\n if (node.childNodes[i].nodeType != 3) {\n this.hasText = false;\n }\n } // this might contain text\n\n\n this.text = this.hasText ? node.childNodes[0].value : \"\";\n\n this.getText = function () {\n return this.text;\n };\n\n this.baseRenderChildren = this.renderChildren;\n\n this.renderChildren = function (ctx) {\n if (this.hasText) {\n // render as text element\n this.baseRenderChildren(ctx);\n var fontSize = new svg.Property(\"fontSize\", svg.Font.Parse(svg.ctx.font).fontSize);\n svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.toPixels(\"y\"), this.x + this.measureText(ctx), this.y));\n } else if (this.children.length > 0) {\n // render as temporary group\n var g = new svg.Element.g();\n g.children = this.children;\n g.parent = this;\n g.render(ctx);\n }\n };\n\n this.onclick = function () {\n window.open(this.getHrefAttribute().value);\n };\n\n this.onmousemove = function () {\n svg.ctx.canvas.style.cursor = \"pointer\";\n };\n };\n\n svg.Element.a.prototype = new svg.Element.TextElementBase(); // image element\n\n svg.Element.image = function (node) {\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n var href = this.getHrefAttribute().value;\n\n if (href == \"\") {\n return;\n }\n\n var isSvg = href.match(/\\.svg$/);\n svg.Images.push(this);\n this.loaded = false;\n\n if (!isSvg) {\n this.img = document.createElement(\"img\");\n\n if (svg.opts.useCORS == true) {\n this.img.crossOrigin = \"Anonymous\";\n }\n\n var self = this;\n\n this.img.onload = function () {\n self.loaded = true;\n };\n\n this.img.onerror = function () {\n svg.log('ERROR: image \"' + href + '\" not found');\n self.loaded = true;\n };\n\n this.img.src = href;\n } else {\n this.img = svg.ajax(href);\n this.loaded = true;\n }\n\n this.renderChildren = function (ctx) {\n var x = this.attribute(\"x\").toPixels(\"x\");\n var y = this.attribute(\"y\").toPixels(\"y\");\n var width = this.attribute(\"width\").toPixels(\"x\");\n var height = this.attribute(\"height\").toPixels(\"y\");\n\n if (width == 0 || height == 0) {\n return;\n }\n\n ctx.save();\n\n if (isSvg) {\n ctx.drawSvg(this.img, x, y, width, height);\n } else {\n ctx.translate(x, y);\n svg.AspectRatio(ctx, this.attribute(\"preserveAspectRatio\").value, width, this.img.width, height, this.img.height, 0, 0);\n ctx.drawImage(this.img, 0, 0);\n }\n\n ctx.restore();\n };\n\n this.getBoundingBox = function () {\n var x = this.attribute(\"x\").toPixels(\"x\");\n var y = this.attribute(\"y\").toPixels(\"y\");\n var width = this.attribute(\"width\").toPixels(\"x\");\n var height = this.attribute(\"height\").toPixels(\"y\");\n return new svg.BoundingBox(x, y, x + width, y + height);\n };\n };\n\n svg.Element.image.prototype = new svg.Element.RenderedElementBase(); // group element\n\n svg.Element.g = function (node) {\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n\n this.getBoundingBox = function () {\n var bb = new svg.BoundingBox();\n\n for (var i = 0; i < this.children.length; i++) {\n bb.addBoundingBox(this.children[i].getBoundingBox());\n }\n\n return bb;\n };\n };\n\n svg.Element.g.prototype = new svg.Element.RenderedElementBase(); // symbol element\n\n svg.Element.symbol = function (node) {\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n\n this.render = function (ctx) {// NO RENDER\n };\n };\n\n svg.Element.symbol.prototype = new svg.Element.RenderedElementBase(); // style element\n\n svg.Element.style = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node); // text, or spaces then CDATA\n\n var css = \"\";\n\n for (var i = 0; i < node.childNodes.length; i++) {\n css += node.childNodes[i].data;\n }\n\n css = css.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm, \"\"); // remove comments\n\n css = svg.compressSpaces(css); // replace whitespace\n\n var cssDefs = css.split(\"}\");\n\n for (var i = 0; i < cssDefs.length; i++) {\n if (svg.trim(cssDefs[i]) != \"\") {\n var cssDef = cssDefs[i].split(\"{\");\n var cssClasses = cssDef[0].split(\",\");\n var cssProps = cssDef[1].split(\";\");\n\n for (var j = 0; j < cssClasses.length; j++) {\n var cssClass = svg.trim(cssClasses[j]);\n\n if (cssClass != \"\") {\n var props = svg.Styles[cssClass] || {};\n\n for (var k = 0; k < cssProps.length; k++) {\n var prop = cssProps[k].indexOf(\":\");\n var name = cssProps[k].substr(0, prop);\n var value = cssProps[k].substr(prop + 1, cssProps[k].length - prop);\n\n if (name != null && value != null) {\n props[svg.trim(name)] = new svg.Property(svg.trim(name), svg.trim(value));\n }\n }\n\n svg.Styles[cssClass] = props;\n svg.StylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);\n\n if (cssClass == \"@font-face\") {\n var fontFamily = props[\"font-family\"].value.replace(/\"/g, \"\");\n var srcs = props.src.value.split(\",\");\n\n for (var s = 0; s < srcs.length; s++) {\n if (srcs[s].indexOf('format(\"svg\")') > 0) {\n var urlStart = srcs[s].indexOf(\"url\");\n var urlEnd = srcs[s].indexOf(\")\", urlStart);\n var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6);\n var doc = svg.parseXml(svg.ajax(url));\n var fonts = doc.getElementsByTagName(\"font\");\n\n for (var f = 0; f < fonts.length; f++) {\n var font = svg.CreateElement(fonts[f]);\n svg.Definitions[fontFamily] = font;\n }\n }\n }\n }\n }\n }\n }\n }\n };\n\n svg.Element.style.prototype = new svg.Element.ElementBase(); // use element\n\n svg.Element.use = function (node) {\n this.base = svg.Element.RenderedElementBase;\n this.base(node);\n this.baseSetContext = this.setContext;\n\n this.setContext = function (ctx) {\n this.baseSetContext(ctx);\n\n if (this.attribute(\"x\").hasValue()) {\n ctx.translate(this.attribute(\"x\").toPixels(\"x\"), 0);\n }\n\n if (this.attribute(\"y\").hasValue()) {\n ctx.translate(0, this.attribute(\"y\").toPixels(\"y\"));\n }\n };\n\n var element = this.getHrefAttribute().getDefinition();\n\n this.path = function (ctx) {\n if (element != null) {\n element.path(ctx);\n }\n };\n\n this.getBoundingBox = function () {\n if (element != null) {\n return element.getBoundingBox();\n }\n };\n\n this.renderChildren = function (ctx) {\n if (element != null) {\n var tempSvg = element;\n\n if (element.type == \"symbol\") {\n // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)\n tempSvg = new svg.Element.svg();\n tempSvg.type = \"svg\";\n tempSvg.attributes.viewBox = new svg.Property(\"viewBox\", element.attribute(\"viewBox\").value);\n tempSvg.attributes.preserveAspectRatio = new svg.Property(\"preserveAspectRatio\", element.attribute(\"preserveAspectRatio\").value);\n tempSvg.attributes.overflow = new svg.Property(\"overflow\", element.attribute(\"overflow\").value);\n tempSvg.children = element.children;\n }\n\n if (tempSvg.type == \"svg\") {\n // if symbol or svg, inherit width/height from me\n if (this.attribute(\"width\").hasValue()) {\n tempSvg.attributes.width = new svg.Property(\"width\", this.attribute(\"width\").value);\n }\n\n if (this.attribute(\"height\").hasValue()) {\n tempSvg.attributes.height = new svg.Property(\"height\", this.attribute(\"height\").value);\n }\n }\n\n var oldParent = tempSvg.parent;\n tempSvg.parent = null;\n tempSvg.render(ctx);\n tempSvg.parent = oldParent;\n }\n };\n };\n\n svg.Element.use.prototype = new svg.Element.RenderedElementBase(); // mask element\n\n svg.Element.mask = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.apply = function (ctx, element) {\n // render as temp svg\n var x = this.attribute(\"x\").toPixels(\"x\");\n var y = this.attribute(\"y\").toPixels(\"y\");\n var width = this.attribute(\"width\").toPixels(\"x\");\n var height = this.attribute(\"height\").toPixels(\"y\");\n\n if (width == 0 && height == 0) {\n var bb = new svg.BoundingBox();\n\n for (var i = 0; i < this.children.length; i++) {\n bb.addBoundingBox(this.children[i].getBoundingBox());\n }\n\n var x = Math.floor(bb.x1);\n var y = Math.floor(bb.y1);\n var width = Math.floor(bb.width());\n var height = Math.floor(bb.height());\n } // temporarily remove mask to avoid recursion\n\n\n var mask = element.attribute(\"mask\").value;\n element.attribute(\"mask\").value = \"\";\n var cMask = document.createElement(\"canvas\");\n cMask.width = x + width;\n cMask.height = y + height;\n var maskCtx = cMask.getContext(\"2d\");\n this.renderChildren(maskCtx);\n var c = document.createElement(\"canvas\");\n c.width = x + width;\n c.height = y + height;\n var tempCtx = c.getContext(\"2d\");\n element.render(tempCtx);\n tempCtx.globalCompositeOperation = \"destination-in\";\n tempCtx.fillStyle = maskCtx.createPattern(cMask, \"no-repeat\");\n tempCtx.fillRect(0, 0, x + width, y + height);\n ctx.fillStyle = tempCtx.createPattern(c, \"no-repeat\");\n ctx.fillRect(0, 0, x + width, y + height); // reassign mask\n\n element.attribute(\"mask\").value = mask;\n };\n\n this.render = function (ctx) {// NO RENDER\n };\n };\n\n svg.Element.mask.prototype = new svg.Element.ElementBase(); // clip element\n\n svg.Element.clipPath = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.apply = function (ctx) {\n var oldBeginPath = CanvasRenderingContext2D.prototype.beginPath;\n\n CanvasRenderingContext2D.prototype.beginPath = function () {};\n\n var oldClosePath = CanvasRenderingContext2D.prototype.closePath;\n\n CanvasRenderingContext2D.prototype.closePath = function () {};\n\n oldBeginPath.call(ctx);\n\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n\n if (typeof child.path != \"undefined\") {\n var transform = null;\n\n if (child.style(\"transform\", false, true).hasValue()) {\n transform = new svg.Transform(child.style(\"transform\", false, true).value);\n transform.apply(ctx);\n }\n\n child.path(ctx);\n CanvasRenderingContext2D.prototype.closePath = oldClosePath;\n\n if (transform) {\n transform.unapply(ctx);\n }\n }\n }\n\n oldClosePath.call(ctx);\n ctx.clip();\n CanvasRenderingContext2D.prototype.beginPath = oldBeginPath;\n CanvasRenderingContext2D.prototype.closePath = oldClosePath;\n };\n\n this.render = function (ctx) {// NO RENDER\n };\n };\n\n svg.Element.clipPath.prototype = new svg.Element.ElementBase(); // filters\n\n svg.Element.filter = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.apply = function (ctx, element) {\n // render as temp svg\n var bb = element.getBoundingBox();\n var x = Math.floor(bb.x1);\n var y = Math.floor(bb.y1);\n var width = Math.floor(bb.width());\n var height = Math.floor(bb.height()); // temporarily remove filter to avoid recursion\n\n var filter = element.style(\"filter\").value;\n element.style(\"filter\").value = \"\";\n var px = 0,\n py = 0;\n\n for (var i = 0; i < this.children.length; i++) {\n var efd = this.children[i].extraFilterDistance || 0;\n px = Math.max(px, efd);\n py = Math.max(py, efd);\n }\n\n var c = document.createElement(\"canvas\");\n c.width = width + 2 * px;\n c.height = height + 2 * py;\n var tempCtx = c.getContext(\"2d\");\n tempCtx.translate(-x + px, -y + py);\n element.render(tempCtx); // apply filters\n\n for (var i = 0; i < this.children.length; i++) {\n if (typeof this.children[i].apply == \"function\") {\n this.children[i].apply(tempCtx, 0, 0, width + 2 * px, height + 2 * py);\n }\n } // render on me\n\n\n ctx.drawImage(c, 0, 0, width + 2 * px, height + 2 * py, x - px, y - py, width + 2 * px, height + 2 * py); // reassign filter\n\n element.style(\"filter\", true).value = filter;\n };\n\n this.render = function (ctx) {// NO RENDER\n };\n };\n\n svg.Element.filter.prototype = new svg.Element.ElementBase();\n\n svg.Element.feMorphology = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.apply = function (ctx, x, y, width, height) {// TODO: implement\n };\n };\n\n svg.Element.feMorphology.prototype = new svg.Element.ElementBase();\n\n svg.Element.feComposite = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n\n this.apply = function (ctx, x, y, width, height) {// TODO: implement\n };\n };\n\n svg.Element.feComposite.prototype = new svg.Element.ElementBase();\n\n svg.Element.feColorMatrix = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n var matrix = svg.ToNumberArray(this.attribute(\"values\").value);\n\n switch (this.attribute(\"type\").valueOrDefault(\"matrix\")) {\n // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement\n case \"saturate\":\n var s = matrix[0];\n matrix = [0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];\n break;\n\n case \"hueRotate\":\n var a = matrix[0] * Math.PI / 180.0;\n\n var c = function c(m1, m2, m3) {\n return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;\n };\n\n matrix = [c(0.213, 0.787, -0.213), c(0.715, -0.715, -0.715), c(0.072, -0.072, 0.928), 0, 0, c(0.213, -0.213, 0.143), c(0.715, 0.285, 0.14), c(0.072, -0.072, -0.283), 0, 0, c(0.213, -0.213, -0.787), c(0.715, -0.715, 0.715), c(0.072, 0.928, 0.072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];\n break;\n\n case \"luminanceToAlpha\":\n matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];\n break;\n }\n\n function imGet(img, x, y, width, height, rgba) {\n return img[y * width * 4 + x * 4 + rgba];\n }\n\n function imSet(img, x, y, width, height, rgba, val) {\n img[y * width * 4 + x * 4 + rgba] = val;\n }\n\n function m(i, v) {\n var mi = matrix[i];\n return mi * (mi < 0 ? v - 255 : v);\n }\n\n this.apply = function (ctx, x, y, width, height) {\n // assuming x==0 && y==0 for now\n var srcData = ctx.getImageData(0, 0, width, height);\n\n for (var y = 0; y < height; y++) {\n for (var x = 0; x < width; x++) {\n var r = imGet(srcData.data, x, y, width, height, 0);\n var g = imGet(srcData.data, x, y, width, height, 1);\n var b = imGet(srcData.data, x, y, width, height, 2);\n var a = imGet(srcData.data, x, y, width, height, 3);\n imSet(srcData.data, x, y, width, height, 0, m(0, r) + m(1, g) + m(2, b) + m(3, a) + m(4, 1));\n imSet(srcData.data, x, y, width, height, 1, m(5, r) + m(6, g) + m(7, b) + m(8, a) + m(9, 1));\n imSet(srcData.data, x, y, width, height, 2, m(10, r) + m(11, g) + m(12, b) + m(13, a) + m(14, 1));\n imSet(srcData.data, x, y, width, height, 3, m(15, r) + m(16, g) + m(17, b) + m(18, a) + m(19, 1));\n }\n }\n\n ctx.clearRect(0, 0, width, height);\n ctx.putImageData(srcData, 0, 0);\n };\n };\n\n svg.Element.feColorMatrix.prototype = new svg.Element.ElementBase();\n\n svg.Element.feGaussianBlur = function (node) {\n this.base = svg.Element.ElementBase;\n this.base(node);\n this.blurRadius = Math.floor(this.attribute(\"stdDeviation\").numValue());\n this.extraFilterDistance = this.blurRadius;\n\n this.apply = function (ctx, x, y, width, height) {\n if (typeof stackBlur.canvasRGBA == \"undefined\") {\n svg.log(\"ERROR: StackBlur.js must be included for blur to work\");\n return;\n } // StackBlur requires canvas be on document\n\n\n ctx.canvas.id = svg.UniqueId();\n ctx.canvas.style.display = \"none\";\n document.body.appendChild(ctx.canvas);\n stackBlur.canvasRGBA(ctx.canvas.id, x, y, width, height, this.blurRadius);\n document.body.removeChild(ctx.canvas);\n };\n };\n\n svg.Element.feGaussianBlur.prototype = new svg.Element.ElementBase(); // title element, do nothing\n\n svg.Element.title = function (node) {};\n\n svg.Element.title.prototype = new svg.Element.ElementBase(); // desc element, do nothing\n\n svg.Element.desc = function (node) {};\n\n svg.Element.desc.prototype = new svg.Element.ElementBase();\n\n svg.Element.MISSING = function (node) {\n svg.log(\"ERROR: Element '\" + node.nodeName + \"' not yet implemented.\");\n };\n\n svg.Element.MISSING.prototype = new svg.Element.ElementBase(); // element factory\n\n svg.CreateElement = function (node) {\n var className = node.nodeName.replace(/^[^:]+:/, \"\"); // remove namespace\n\n className = className.replace(/\\-/g, \"\"); // remove dashes\n\n var e = null;\n\n if (typeof svg.Element[className] != \"undefined\") {\n e = new svg.Element[className](node);\n } else {\n e = new svg.Element.MISSING(node);\n }\n\n e.type = node.nodeName;\n return e;\n }; // load from url\n\n\n svg.load = function (ctx, url) {\n svg.loadXml(ctx, svg.ajax(url));\n }; // load from xml\n\n\n svg.loadXml = function (ctx, xml) {\n svg.loadXmlDoc(ctx, svg.parseXml(xml));\n };\n\n svg.loadXmlDoc = function (ctx, dom) {\n svg.init(ctx);\n\n var mapXY = function mapXY(p) {\n var e = ctx.canvas;\n\n while (e) {\n p.x -= e.offsetLeft;\n p.y -= e.offsetTop;\n e = e.offsetParent;\n }\n\n if (window.scrollX) {\n p.x += window.scrollX;\n }\n\n if (window.scrollY) {\n p.y += window.scrollY;\n }\n\n return p;\n }; // bind mouse\n\n\n if (svg.opts.ignoreMouse != true) {\n ctx.canvas.onclick = function (e) {\n var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));\n svg.Mouse.onclick(p.x, p.y);\n };\n\n ctx.canvas.onmousemove = function (e) {\n var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));\n svg.Mouse.onmousemove(p.x, p.y);\n };\n }\n\n var e = svg.CreateElement(dom.documentElement);\n e.root = true;\n e.addStylesFromStyleDefinition(); // render loop\n\n var isFirstRender = true;\n\n var draw = function draw() {\n svg.ViewPort.Clear();\n\n if (ctx.canvas.parentNode) {\n svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight);\n }\n\n if (svg.opts.ignoreDimensions != true) {\n // set canvas size\n if (e.style(\"width\").hasValue()) {\n ctx.canvas.width = e.style(\"width\").toPixels(\"x\");\n ctx.canvas.style.width = ctx.canvas.width + \"px\";\n }\n\n if (e.style(\"height\").hasValue()) {\n ctx.canvas.height = e.style(\"height\").toPixels(\"y\");\n ctx.canvas.style.height = ctx.canvas.height + \"px\";\n }\n }\n\n var cWidth = ctx.canvas.clientWidth || ctx.canvas.width;\n var cHeight = ctx.canvas.clientHeight || ctx.canvas.height;\n\n if (svg.opts.ignoreDimensions == true && e.style(\"width\").hasValue() && e.style(\"height\").hasValue()) {\n cWidth = e.style(\"width\").toPixels(\"x\");\n cHeight = e.style(\"height\").toPixels(\"y\");\n }\n\n svg.ViewPort.SetCurrent(cWidth, cHeight);\n\n if (svg.opts.offsetX != null) {\n e.attribute(\"x\", true).value = svg.opts.offsetX;\n }\n\n if (svg.opts.offsetY != null) {\n e.attribute(\"y\", true).value = svg.opts.offsetY;\n }\n\n if (svg.opts.scaleWidth != null || svg.opts.scaleHeight != null) {\n var xRatio = null,\n yRatio = null,\n viewBox = svg.ToNumberArray(e.attribute(\"viewBox\").value);\n\n if (svg.opts.scaleWidth != null) {\n if (e.attribute(\"width\").hasValue()) {\n xRatio = e.attribute(\"width\").toPixels(\"x\") / svg.opts.scaleWidth;\n } else if (!isNaN(viewBox[2])) {\n xRatio = viewBox[2] / svg.opts.scaleWidth;\n }\n }\n\n if (svg.opts.scaleHeight != null) {\n if (e.attribute(\"height\").hasValue()) {\n yRatio = e.attribute(\"height\").toPixels(\"y\") / svg.opts.scaleHeight;\n } else if (!isNaN(viewBox[3])) {\n yRatio = viewBox[3] / svg.opts.scaleHeight;\n }\n }\n\n if (xRatio == null) {\n xRatio = yRatio;\n }\n\n if (yRatio == null) {\n yRatio = xRatio;\n }\n\n e.attribute(\"width\", true).value = svg.opts.scaleWidth;\n e.attribute(\"height\", true).value = svg.opts.scaleHeight;\n e.style(\"transform\", true, true).value += \" scale(\" + 1.0 / xRatio + \",\" + 1.0 / yRatio + \")\";\n } // clear and render\n\n\n if (svg.opts.ignoreClear != true) {\n ctx.clearRect(0, 0, cWidth, cHeight);\n }\n\n e.render(ctx);\n\n if (isFirstRender) {\n isFirstRender = false;\n\n if (typeof svg.opts.renderCallback == \"function\") {\n svg.opts.renderCallback(dom);\n }\n }\n };\n\n var waitingForImages = true;\n\n if (svg.ImagesLoaded()) {\n waitingForImages = false;\n draw();\n }\n\n svg.intervalID = setInterval(function () {\n var needUpdate = false;\n\n if (waitingForImages && svg.ImagesLoaded()) {\n waitingForImages = false;\n needUpdate = true;\n } // need update from mouse events?\n\n\n if (svg.opts.ignoreMouse != true) {\n needUpdate = needUpdate | svg.Mouse.hasEvents();\n } // need update from animations?\n\n\n if (svg.opts.ignoreAnimation != true) {\n for (var i = 0; i < svg.Animations.length; i++) {\n needUpdate = needUpdate | svg.Animations[i].update(1000 / svg.FRAMERATE);\n }\n } // need update from redraw?\n\n\n if (typeof svg.opts.forceRedraw == \"function\") {\n if (svg.opts.forceRedraw() == true) {\n needUpdate = true;\n }\n } // render if needed\n\n\n if (needUpdate) {\n draw();\n svg.Mouse.runEvents(); // run and clear our events\n }\n }, 1000 / svg.FRAMERATE);\n };\n\n svg.stop = function () {\n if (svg.intervalID) {\n clearInterval(svg.intervalID);\n }\n };\n\n svg.Mouse = new function () {\n this.events = [];\n\n this.hasEvents = function () {\n return this.events.length != 0;\n };\n\n this.onclick = function (x, y) {\n this.events.push({\n type: \"onclick\",\n x: x,\n y: y,\n run: function run(e) {\n if (e.onclick) {\n e.onclick();\n }\n }\n });\n };\n\n this.onmousemove = function (x, y) {\n this.events.push({\n type: \"onmousemove\",\n x: x,\n y: y,\n run: function run(e) {\n if (e.onmousemove) {\n e.onmousemove();\n }\n }\n });\n };\n\n this.eventElements = [];\n\n this.checkPath = function (element, ctx) {\n for (var i = 0; i < this.events.length; i++) {\n var e = this.events[i];\n\n if (ctx.isPointInPath && ctx.isPointInPath(e.x, e.y)) {\n this.eventElements[i] = element;\n }\n }\n };\n\n this.checkBoundingBox = function (element, bb) {\n for (var i = 0; i < this.events.length; i++) {\n var e = this.events[i];\n\n if (bb.isPointInBox(e.x, e.y)) {\n this.eventElements[i] = element;\n }\n }\n };\n\n this.runEvents = function () {\n svg.ctx.canvas.style.cursor = \"\";\n\n for (var i = 0; i < this.events.length; i++) {\n var e = this.events[i];\n var element = this.eventElements[i];\n\n while (element) {\n e.run(element);\n element = element.parent;\n }\n } // done running, clear\n\n\n this.events = [];\n this.eventElements = [];\n };\n }();\n return svg;\n }\n\n if (typeof CanvasRenderingContext2D != \"undefined\") {\n CanvasRenderingContext2D.prototype.drawSvg = function (s, dx, dy, dw, dh, opts) {\n var cOpts = {\n ignoreMouse: true,\n ignoreAnimation: true,\n ignoreDimensions: true,\n ignoreClear: true,\n offsetX: dx,\n offsetY: dy,\n scaleWidth: dw,\n scaleHeight: dh\n };\n\n for (var prop in opts) {\n if (opts.hasOwnProperty(prop)) {\n cOpts[prop] = opts[prop];\n }\n }\n\n canvg(this.canvas, s, cOpts);\n };\n }\n\n return canvg;\n}", "title": "" }, { "docid": "2982595f170578e34183e9a9bbf3bf25", "score": "0.47410715", "text": "function MZCanvas(){}", "title": "" }, { "docid": "5ac7c4d4602e37d9748d13a6069572c1", "score": "0.47353518", "text": "function graphics()\n{\n\tgraphicsTopNodes();\n//\tgraphicsBottomNodes();\n//\tgraphicsNullPointers();\n}", "title": "" }, { "docid": "3218bbb9dd26ad9b795772e4513268ef", "score": "0.47353184", "text": "function Shape( ctx )\n\t{\n\t\tthis.ctx = ctx;\n\t}", "title": "" }, { "docid": "5d0fe534a9c5ef4c785beea8fd7dee62", "score": "0.47329813", "text": "function Drawable() {\n\tthis.init = function(x, y, width, height) {\n\t\t// Defualt variables\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}\n\t\n\tthis.speed = 0;\n\tthis.canvasWidth = 0;\n\tthis.canvasHeight = 0;\n\t\n\t// Define abstract function to be implemented in child objects\n\tthis.draw = function() {\n\t};\n\tthis.move = function() {\n\t};\n}", "title": "" }, { "docid": "33bebb27be68bef9ca6ababafaf160c1", "score": "0.47311738", "text": "function Shape() {\r\n var _this = _super.call(this) || this;\r\n _this.mCurrentX = 0;\r\n _this.mCurrentY = 0;\r\n _this.mDraw = \"\";\r\n return _this;\r\n }", "title": "" }, { "docid": "ac0e14a8fbe5f5584bfcfb3a8bcceb5a", "score": "0.47162518", "text": "function isSVGGraphicsElement(elem) {\n if (elem == null) {\n return false;\n }\n return typeof elem.getScreenCTM === 'function' && elem instanceof SVGElement;\n}", "title": "" }, { "docid": "ecde8e030b9956e825dbf5ed7b2ba801", "score": "0.47026148", "text": "function CanvasRenderingContext2D() {\n _classCallCheck(this, CanvasRenderingContext2D);\n\n this._drawCommands = '';\n this._globalAlpha = 1.0;\n this._fillStyle = 'rgb(0,0,0)';\n this._strokeStyle = 'rgb(0,0,0)';\n this._lineWidth = 1;\n this._lineCap = 'butt';\n this._lineJoin = 'miter';\n this._miterLimit = 10;\n this._globalCompositeOperation = 'source-over';\n this._textAlign = 'start';\n this._textBaseline = 'alphabetic';\n this._font = '10px sans-serif';\n this._savedGlobalAlpha = [];\n this.timer = null;\n this.componentId = null;\n\n this.createRadialGradient = function (x0, y0, r0, x1, y1, r1) {\n return new _FillStyleRadialGradient2.default(x0, y0, r0, x1, y1, r1);\n };\n\n this.quadraticCurveTo = function (cpx, cpy, x, y) {\n this._drawCommands = this._drawCommands.concat(\"u\" + cpx + \",\" + cpy + \",\" + x + \",\" + y + \";\");\n };\n\n this.strokeText = function (text, x, y) {\n var tmptext = text.replace(/!/g, \"!!\");\n tmptext = tmptext.replace(/,/g, \"!,\");\n tmptext = tmptext.replace(/;/g, \"!;\");\n this._drawCommands = this._drawCommands.concat(\"U\" + tmptext + \",\" + x + \",\" + y + \",0.0;\");\n };\n\n this.measureText = function (text) {\n throw new Error('GCanvas not supported yet');\n };\n\n this.isPointInPath = function (x, y) {\n throw new Error('GCanvas not supported yet');\n };\n\n this.className = 'CanvasRenderingContext2D';\n }", "title": "" }, { "docid": "75b5997f2b5e601ff0ba07f7c2d34690", "score": "0.4696742", "text": "function drawSVG(data, name){\n var path = new Paper.Path(data);\n path.strokeColor = \"rgba(0,0,0,1)\"\n \n var shape = BoardUtils.addPath(path, false)\n shape.__name = name;\n \n GlobalShapeList.retrieve(shape);\n\n return shape;\n}", "title": "" }, { "docid": "51b94148bcaa95dcf706d8957012e2da", "score": "0.4658938", "text": "function GCanvas(id, _ref) {\n var _this = this;\n\n var disableAutoSwap = _ref.disableAutoSwap;\n\n _classCallCheck(this, GCanvas);\n\n this.id = null;\n this._needRender = true;\n\n this.id = id;\n\n this._disableAutoSwap = disableAutoSwap;\n if (disableAutoSwap) {\n this._swapBuffers = function () {\n GCanvas.GBridge.render(_this.id);\n };\n }\n }", "title": "" }, { "docid": "81d1516093ae09f06be7f98d5e1f829c", "score": "0.46414673", "text": "constructor() {\n super();\n this.elementType = 'circle';\n }", "title": "" }, { "docid": "11af13da6b7da774c2bbd3c2875e2a53", "score": "0.4640202", "text": "draw(ctx) {this.AbstractMethod(\"draw\");}", "title": "" }, { "docid": "82e533b19c2dcec37f466904117af089", "score": "0.463956", "text": "function SVGContainer(htmlElement) {\r\n var _this = this;\r\n /**\r\n * Indicates if this object has already been deleted. Any\r\n * destruction/disposal code should take this into account when deciding\r\n * wheter to run potentially costly disposal operations if they already have\r\n * been run.\r\n *\r\n * @type {boolean}\r\n */\r\n this._disposed = false;\r\n /**\r\n * If this component is in a separate HTML container, `autoResize` means the\r\n * module will constantly measure container's size and adopt contents to it.\r\n *\r\n * @type {Boolean}\r\n */\r\n this.autoResize = true;\r\n /**\r\n * Holds list of references to [[Sprite]] objects that should not be exported\r\n * when exporting chart to an image.\r\n *\r\n * @ignore\r\n * @type {Sprite[]}\r\n */\r\n this.nonExportableSprites = [];\r\n /**\r\n * List of objects that need to be disposed when this one is disposed.\r\n *\r\n * @type {Disposer[]}\r\n */\r\n this._disposers = [];\r\n this.cssScale = 1;\r\n // Log parent HTML element\r\n this.htmlElement = htmlElement;\r\n var callback = function () { _this.measure(); };\r\n this.resizeSensor = new css_element_queries_src_ResizeSensor__WEBPACK_IMPORTED_MODULE_8___default.a(htmlElement, callback);\r\n this._disposers.push(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_0__[\"Disposer\"](function () {\r\n _this.resizeSensor.detach(callback);\r\n }));\r\n // Adds to containers array\r\n svgContainers.push(this);\r\n /**\r\n * Create child div for the container - it will have svg node\r\n * It might seem that this container is not necessay, however having it solves\r\n * a problems with mouse position detection and some other.\r\n */\r\n var svgContainer = document.createElement(\"div\");\r\n var style = svgContainer.style;\r\n style.width = \"100%\";\r\n style.height = \"100%\";\r\n style.position = \"relative\";\r\n htmlElement.appendChild(svgContainer);\r\n this.SVGContainer = svgContainer;\r\n }", "title": "" }, { "docid": "58e88a1cd36c135cd1a470b10c0b278b", "score": "0.46344134", "text": "function Canvas( element )\n\t{\n\t\t/**\n\t\t * Canvas' DOM element\n\t\t */\n\t\tthis.element = element || document.createElement( 'canvas' );\n\n\t\t/**\n\t\t * Canvas rendering context\n\t\t */\n\t\tthis.ctx = this.element.getContext( '2d' );\n\n\t\t/**\n\t\t * Resource for drawing shapes/images/etc.\n\t\t */\n\t\tthis.draw = new DrawOperation( this.ctx );\n\n\t\t/**\n\t\t * Resource for pixel data manipulation \n\t\t */\n\t\tthis.data = new PixelDataOperation( this.ctx, this.element );\n\t}", "title": "" }, { "docid": "ae86f2348825303d71d0f1bfb21e745d", "score": "0.46239114", "text": "function DrawClass(canvasElem, settings) {\n if (canvasElem.tagName.toUpperCase() !== 'CANVAS') {\n console.log('错误的canvas元素');\n return;\n }\n if (typeof settings === 'undefined') {\n settings = {};\n }\n this.canvasElem = canvasElem;\n this.ctx = canvasElem.getContext('2d');\n this.width = canvasElem.width;\n this.height = canvasElem.height;\n this.color = 'rgba(255,0,0,0.3)';\n this.highlightColor = 'rgba(0,0,255,0.3)'\n this.ctx.fillStyle = this.color;\n // this.ctx.fillStyle = 'rgba(255,0,0,0.3)';\n}", "title": "" }, { "docid": "24cd92e88926f43aeb6130c84c7a1fe6", "score": "0.46142888", "text": "function svgClass(name) {\n\t\treturn svgStyles[name] || {};\n\t}", "title": "" }, { "docid": "37d63444782b6eadbb00f2d359da4641", "score": "0.46084046", "text": "function SVGModel (container, data) {\n if (typeof container === 'string') {\n container = document.querySelector(container)\n }\n\n this.container = container\n this.data = data || defaultData\n\n this.build()\n\n editor.init(this)\n}", "title": "" }, { "docid": "c9272f3b14478f3a7b66cce300e8f7b7", "score": "0.46040606", "text": "get svg() { return this._svg; }", "title": "" }, { "docid": "a7c6859ebe70175adb70dcb0c2e878e3", "score": "0.45907602", "text": "function SVGWrapper(svg, container) {\n\tthis._svg = svg; // The SVG root node\n\tthis._container = container; // The containing div\n\tfor (var i = 0; i < $.svg._extensions.length; i++) {\n\t\tvar extension = $.svg._extensions[i];\n\t\tthis[extension[0]] = new extension[1](this);\n\t}\n}", "title": "" }, { "docid": "76300a35802b9c30743e4cf716c31dd0", "score": "0.45768026", "text": "function Shape(color) {\n this.color = color;\n}", "title": "" }, { "docid": "87c70c15138c52b8f88510d0d037a7c7", "score": "0.45760828", "text": "function DrawSystem() {\n\tSystem.call(this, [Drawable.type]);\n\n\t/* we keep our own z-sorted list of entities we need to draw */\n\tthis.entities = [];\n}", "title": "" }, { "docid": "bb10397e9de45a4871618f0d87445f06", "score": "0.45730212", "text": "function oracleSvgG(){\n\tthis.id = null;\n this.createNode = createNode;\n //function to return node\n function createNode(){\n\t\tnode = svgDoc.createElementNS(svgns,'g');\n\t\tnode.setAttribute('id',this.id);\n\t\tnode.setAttribute('transform','translate(0,0)');\n return node;\n }\n}", "title": "" }, { "docid": "cb1c66a4958e0e2d115caad63cf9e598", "score": "0.4568079", "text": "showSmallGraphic(cycleGraph /*: CycleGraph */) {\n this.showLargeGraphic( cycleGraph, true );\n }", "title": "" }, { "docid": "eebd8b3fd5fb9fcf0e7dc24857a7a236", "score": "0.45642242", "text": "function pbGraphicsDemo( docId )\n{\n\tconsole.log( \"pbGraphicsDemo c'tor entry\" );\n\n\tthis.phaserRender = new pbPhaserRender( docId );\n\tthis.phaserRender.create( useRenderer, this.create, this.update, this );\n\n\tconsole.log( \"pbGraphicsDemo c'tor exit\" );\n}", "title": "" }, { "docid": "b751d7afee8fe49f20d58a64148af6e0", "score": "0.4546466", "text": "function HTMLImageElement(){}", "title": "" }, { "docid": "87103fa6ecae752e0c3818e9aa20e657", "score": "0.45378852", "text": "function drawObject(svg, cls, o) {\n var cardinal_tension;\n var stroke_color;\n for(var layer in o) {\n //default checks\n if(layer == \"bounding_box\") continue;\n cardinal_tension = (typeof o[layer].cardinal_tension == 'undefined') ? 0.5 : o[layer].cardinal_tension;\n stroke_color = (typeof o[layer].stroke_color == 'undefined') ? '#000000' : o[layer].stroke_color;\n\n //processing\n if(typeof o[layer].fill_colors != 'undefined')\n drawArea(svg, cls, o[layer].paths, o[layer].fill_colors, 0, cardinal_tension);\n if(typeof o[layer].stroke_sizes != 'undefined')\n drawCurvedPaths(svg, cls, o[layer].paths, stroke_color, o[layer].stroke_sizes, cardinal_tension);\n }//*/\n\n //drawArea(svg, cls, o.area, o.area.colors, 0, 0.5); // To align with the default values of the other two\n //drawCurvedPaths(svg, cls, o.outline, o.outline.colors, o.outline.strokes);\n //drawCurvedPaths(svg, cls, o.faded, o.faded.colors, o.faded.strokes);\n \n // for debug purposes\n //drawCurvedPaths(svg, cls, [o.bounding_box], 'red', 2, 0);\n}", "title": "" }, { "docid": "87709f3f2530578e77d80ae86a81c763", "score": "0.45346254", "text": "function Shape(color){\n this.color = color;\n\n}", "title": "" }, { "docid": "29c9e4a69837cdc3e2d4bad40476bd86", "score": "0.45338535", "text": "function AbstractRenderer() {\n\n}", "title": "" }, { "docid": "2ad4f2b4bb5da3ea1748790e94a09054", "score": "0.45333225", "text": "function getGhostPaper() {\r\n if (ghostPaper === null) {\r\n // ghost is used to draw elements while real paper is not yet created or Sprite doesn't know parent yet\r\n var ghostDiv = document.createElement(\"div\");\r\n ghostDiv.hidden = true;\r\n document.body.appendChild(ghostDiv);\r\n var ghostSvgContainer = new __WEBPACK_IMPORTED_MODULE_2__SVGContainer__[\"a\" /* SVGContainer */](ghostDiv, true);\r\n ghostPaper = new Paper(ghostSvgContainer.SVGContainer, \"ghost\");\r\n }\r\n return ghostPaper;\r\n}", "title": "" }, { "docid": "e1e3896967d6b3fff3df53eecbad5284", "score": "0.452929", "text": "getNativeCanvasElement() {\r\n return this.canvas._canvas;\r\n }", "title": "" }, { "docid": "dac450d2b82e6d8164255d481c362582", "score": "0.45270476", "text": "function Drawable() {\n \n this.init = function(x, y, width, height) {\n //Default variables\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n };\n \n this.speed = 0;\n this.canvasWidth = 0;\n this.canvasHeight = 0;\n \n //Implemented in children\n this.draw = function() {};\n}", "title": "" }, { "docid": "ed9da12afc829ff5c216d5625e9eca03", "score": "0.45243984", "text": "constructor(x = -120, y = 200, figure = \"images/GemBlue.png\") {\n\t\t/**A sprite image is simply a single image files\n\t\twhich has multiple drawings within that single\n\t\timage*/\n\t\tthis.sprite = figure;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "title": "" }, { "docid": "dd03e2bc90ab2d37a6f1124cb31b98bc", "score": "0.45191196", "text": "function Grapho (settings) {\n\n\t\t// Protect against forgotten `new` keyword.\n\t\tif (!(this instanceof Grapho)) {\n\t\t\treturn new Grapho(settings);\n\t\t}\n\n\t\t// Make a local copy of defaults\n\t\tthis.defs = helpers.object.merge({}, defaults);\n\n\t\t// Theme support\n\t\tif (settings.theme !== undefined) {\n\t\t\t// Check for user supplied theme\n\t\t\tif (helpers.object.is(settings.theme)) {\n\t\t\t\tthis.defs = helpers.object.merge(this.defs,helpers.object.merge(themes.dark, settings.theme));\n\t\t\t// This is supposed to be a theme name\n\t\t\t} else {\n\t\t\t\tif (themes[settings.theme] !== undefined ){\n\t\t\t\t\tthis.defs = helpers.object.merge(this.defs,themes[settings.theme]);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error('Grapho: Theme not found (' + settings.theme + ')');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.defs = helpers.object.merge(this.defs,themes.dark);\n\t\t}\n\n\t\t// Setup default settings\n\t\tthis.yAxises = [];\n\t\tthis.xAxises = [];\n\t\tthis.datasets = [];\n\n\t\tthis.container = this.defs.container;\n\t\tthis.settings = helpers.object.merge(this.defs.settings, settings);\n\n\t\t// These aren't settings but needed properties.\n\t\tthis.id = graphos.push(this) - 1;\n\n\t\tthis.canvas = document.createElement('canvas');\n\t\tthis.ctx = this.canvas.getContext('2d');\n\n\n\t\t// Element width and height\n\t\tthis.w = 0;\n\t\tthis.h = 0;\n\n\t\t// Workspace width and height\n\t\tthis.wsw = 0;\n\t\tthis.wsh = 0;\n\n\t\t// Workspace offset x and y\n\t\tthis.wox = 0;\n\t\tthis.woy = 0;\n\n\t\t// Negative workspace offset x and y\n\t\tthis.nwox = 0;\n\t\tthis.nwoy = 0;\n\n\t\t// Call the this.place() method if the user has specified an parent.\n\t\tif (settings.place) {\n\t\t\tthis.place(settings.place);\n\t\t}\n\n\t\t// Init done\n\t\tthis.done = true;\n\n\t}", "title": "" }, { "docid": "2c4dc07df0445e107a8310868a7ec986", "score": "0.45190617", "text": "function Plot() {\n if(!(this instanceof Plot)){\n return new Plot();\n }\n var attributes = {\n data: null,\n dtypes: {},\n layers: [],\n aes: {},\n legends: null, // strings corresponding to scales\n // that need legends or legend objects\n facet: null,\n width: 400,\n height: 400,\n margins: {left:20, right:20, top:20, bottom:20},\n xScale: {single: ggd3.scale()}, \n yScale: {single: ggd3.scale()},\n colorScale: {single: ggd3.scale()},\n sizeScale: {single: ggd3.scale()},\n fillScale: {single: ggd3.scale()},\n shapeScale: {single: ggd3.scale()},\n alphaScale: {single: ggd3.scale()},\n strokeScale: {single: ggd3.scale()},\n alpha: d3.functor(0.5),\n fill: d3.functor('steelblue'),\n color: d3.functor(null),\n size: d3.functor(3), \n shape: d3.functor('circle'),\n lineType: d3.functor('1,1'),\n lineWidth: 2,\n xAdjust: false,\n yAdjust: false,\n xGrid: true,\n yGrid: true,\n alphaRange: [0.1, 1],\n sizeRange: [3, 20],\n fillRange: [\"blue\", \"red\"],\n colorRange: [\"white\", \"black\"],\n shapeRange: d3.superformulaTypes,\n opts: {},\n theme: \"ggd3\",\n };\n // aesthetics I might like to support:\n// [\"alpha\", \"angle\", \"color\", \"fill\", \"group\", \"height\", \"label\", \"linetype\", \"lower\", \"order\", \"radius\", \"shape\", \"size\", \"slope\", \"width\", \"x\", \"xmax\", \"xmin\", \"xintercept\", \"y\", \"ymax\", \"ymin\", \"yintercept\"] \n this.attributes = attributes;\n // doing more cleaning than necessary, counting it.\n this.timesCleaned = 0;\n this.gridsAdded = false;\n // if the data method has been handed a new dataset, \n // newData will be true, after the plot is drawn the\n // first time, newData is set to false\n this.newData = true;\n // flag to set true when random noise is \n // added to each data point for jittering\n this.hasJitter = false;\n // when cycling through data, need to know if \n // data are nested or not.\n this.nested = false;\n this.hgrid = ggd3.layer()\n .geom(ggd3.geoms.hline().grid(true)\n .lineType(\"2,2\"))\n .plot(this);\n this.vgrid = ggd3.layer()\n .geom(ggd3.geoms.vline().grid(true)\n .lineType(\"2,2\"))\n .plot(this); \n // explicitly declare which attributes get a basic\n // getter/setter\n var getSet = [\"opts\", \"theme\", \"margins\", \n \"width\", \"height\", \"xAdjust\", \"yAdjust\", \n 'colorRange', 'sizeRange',\n 'fillRange', \"lineType\",\n \"alphaRange\", \"lineWidth\",\n \"xGrid\", \"yGrid\"];\n\n for(var attr in attributes){\n if((!this[attr] && \n _.contains(getSet, attr))){\n this[attr] = createAccessor(attr);\n }\n }\n}", "title": "" }, { "docid": "d6c7d9fc2612a3c03ad8dfd93372ece4", "score": "0.4516853", "text": "function ObjectOrientedRenderer3(){}", "title": "" }, { "docid": "d6c7d9fc2612a3c03ad8dfd93372ece4", "score": "0.4516853", "text": "function ObjectOrientedRenderer3(){}", "title": "" }, { "docid": "d6c7d9fc2612a3c03ad8dfd93372ece4", "score": "0.4516853", "text": "function ObjectOrientedRenderer3(){}", "title": "" }, { "docid": "d6c7d9fc2612a3c03ad8dfd93372ece4", "score": "0.4516853", "text": "function ObjectOrientedRenderer3(){}", "title": "" }, { "docid": "c65213d53ee02d678dfe0c6308fa6e76", "score": "0.4510414", "text": "constructor() {\n /**\n * Image\n * @type {?CanvasImage}\n */\n this.image = null;\n }", "title": "" }, { "docid": "f019fe35aceda243d9d6417fd7c5c0f9", "score": "0.45093194", "text": "function Graph(graphName, headerPOS, graphType){\n\t//// Make Sure Constructor Params are Passed to the Class \n\t///// Inherits From Widget Class \n\t\tif(graphName !== undefined){\n\t\t\tif(graphType !== undefined){\n\t\t\t\t/// This Builds from the Basic Widget Class..\n\t\t\t\tWidget.call(this, graphName, headerPOS);\n\t\t\t}else{\n\t\t\t\talert(\"No Graph NAME was Passed to Graph() constructor\");\n\t\t\t}\n\t\t}else{\n\t\t\talert(\"No Graph NAME was Passed to Graph() constructor as the first Param\");\n\t\t}\n\t\n\t///// Set Height of Canvas Depending on if Header is Showing..\n\t//// Check if this Widget has a header bar\n\t//// Assign canvas height appropriately\n\t\tif( this.headerPOS === \"off\"){\n\t\t\tthis.cHeight = this.height;\n\t\t}else{\n\t\t\t/// Has a Header on top or bottom I dont care.. i just want the height..\n\t\t\tthis.cHeight = this.height-this.header_height;\n\t\t}\n\n\t/// Set Default Description\n\t\tthis.description = \"a new Instance of the Graph Class\";\n\n\t//// Charts are Displayed on this Canvas DOM element\n\t\tthis.basicCanvas = [ \n\t\t\t\t\"<canvas class='GraphClass_Canvas' \",\n\t\t\t\t \"id='canvas_\"+this.name+\"' \", \n\t\t\t\t // \"height='\"+this.cHeight+\"px' width='\"+this.width+\"px' \",\n\t\t\t \">\",\n\t\t\t\t\t\"Canvas not Supported.\",\n\t\t\t\t\"</canvas>\",\t \n\t\t].join(\" \");\n\n\n\t/// Post building\n\t\tthis.postBuild = function(){\n\t\t\t/// set content bg to color\n\t\t\t\t$(this.id_content).css({\"background\":\"#FFF\"});\n\t\t};\n}", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "67588ca21d89ac748263efffeda9812e", "score": "0.4505214", "text": "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "title": "" }, { "docid": "cf666d45dc5c4a27349da8635944f8fb", "score": "0.44948012", "text": "function RendererImg() { // RendererCanvas RendererGraphical RendererGraphics RendererImage\n this.fallback = new RendererText();\n\n this.canvas0 = null;\n this.canvas1 = null;\n this.ctx0 = null;\n this.ctx1 = null;\n this.prevvalue = null;\n this.usefallbackonly = false;\n this.usetext = true;\n this.init2done = false;\n this.text0 = null; // also used for clickfun, tooltip, ...\n this.text1 = null;\n this.tx = 0;\n this.ty = 0;\n // if false: avoid using the few fixed graphics from the 'extra' canvas for 2+ connection things if their graphics are too custom\n // if true: see the drawGlobalExtras_ function for more info\n this.drawextra = false;\n // what value must input match to use this extra graphic\n this.drawextrai0 = 0;\n this.drawextrai1 = 0;\n // x coordinate of this extra graphic\n this.drawextrag = 0;\n // if non-0, only use \"on\" drawing if a wire with that particular numerical direction is on\n this.drawonly = 0;\n this.dynamicdraw = false;\n this.dynamicdrawcode = 0;\n\n this.globalInit = function() {\n this.fallback.globalInit();\n rglobal.init();\n this.drawGlobalExtras_();\n };\n\n this.cleanup = function() {\n if(this.text0) {\n removeElement(this.text0);\n removeElement(this.text1);\n }\n this.fallback.cleanup();\n };\n\n // one time initialization\n this.init = function(cell, x, y, clickfun) {\n var c = cell.circuitsymbol;\n if(NOUSETEXTMAP[c]) {\n // optimization for those that don't need divs at all\n this.usetext = false;\n }\n if(this.usetext) this.fallback.init(cell, x, y, clickfun);\n this.tx = tw * cell.x + rglobal.offcanvas0.getXOffsetForCell(cell);\n this.ty = th * cell.y + rglobal.offcanvas0.getYOffsetForCell(cell);\n if(!cell.comment && cell.circuitsymbol != ' ') {\n this.canvas0 = rglobal.offcanvas0.getCanvasForCell(cell); //makeAbsElement('canvas', 0, 0, tw, th, doNotAddToParent/*this.fallback.div0*/);\n this.canvas1 = rglobal.offcanvas1.getCanvasForCell(cell); //makeAbsElement('canvas', 0, 0, tw, th, doNotAddToParent/*this.fallback.div1*/);\n this.ctx0 = rglobal.offcanvas0.getContextForCell(cell);\n this.ctx1 = rglobal.offcanvas1.getContextForCell(cell);\n if(this.usetext) {\n this.text0 = this.fallback.div0;\n this.text1 = this.fallback.div1;\n } else {\n // still need to make 1 div anyway (at least not 2) for the click function\n this.text0 = makeDiv(x * tw, y * th, tw, th, worldDiv);\n this.text0.onmousedown = clickfun;\n }\n }\n };\n\n\n // specific initialization, can be re-done if cell changed on click\n this.init2 = function(cell, symbol, virtualsymbol, opt_title) {\n if(!this.canvas0) {\n this.usefallbackonly = true;\n this.fallback.init2(cell, symbol, virtualsymbol, opt_title);\n return;\n }\n\n drawer.tx = this.tx;\n drawer.ty = this.ty;\n\n if(this.init2done) {\n this.ctx0.clearRect(0, 0, tw, th);\n this.ctx1.clearRect(0, 0, tw, th);\n }\n this.init2done = true;\n\n // BGCOLOR instead of transparent background\n // so that when using 'drawImage' to blit, it fully covers it rather than draw semitranslucent edges more and more over each other\n drawer.fillBg_(this.ctx0, BGCOLOR);\n drawer.fillBg_(this.ctx1, BGCOLOR);\n\n var fs = tw - 2;\n if (fs < 7) fs = 7;\n this.text0.style.color = OFFCOLOR;\n this.text0.style.textAlign = 'center';\n this.text0.style.fontSize = fs + 'px';\n this.text0.style.fontFamily = 'monospace';\n this.text0.style.zIndex = MAINZINDEX;\n\n if(this.text1) {\n this.text1.style.color = ONCOLOR;\n this.text1.style.textAlign = 'center';\n this.text1.style.fontSize = fs + 'px';\n this.text1.style.fontFamily = 'monospace';\n this.text1.style.zIndex = MAINZINDEX;\n }\n\n this.ctx0.strokeStyle = OFFCOLOR;\n this.ctx1.strokeStyle = ONCOLOR;\n this.ctx0.fillStyle = OFFCOLOR;\n this.ctx1.fillStyle = ONCOLOR;\n //this.ctx0.lineWidth = 0.5;\n //this.ctx1.lineWidth = 0.5;\n this.ctx0.lineWidth = 1;\n this.ctx1.lineWidth = 1;\n var error = false;\n if(cell.components[0] && cell.components[0].error) {\n error = true;\n this.markError(cell, cell.getErrorText());\n drawer.fillBg_(this.ctx0, 'yellow');\n drawer.fillBg_(this.ctx1, 'yellow');\n } else if(opt_title) {\n this.text0.title = opt_title;\n if(this.text1) this.text1.title = opt_title;\n }\n var c = cell.circuitsymbol;\n // This avoids blurry lines that take up other amounts of pixels with lighter colors than desired\n //this.ctx0.translate(0.5, 0.5);\n //this.ctx1.translate(0.5, 0.5);\n for (var i = 0; i < 2; i++) {\n var ctx = (i == 0) ? this.ctx0 : this.ctx1;\n var canvas = (i == 0) ? this.canvas0 : this.canvas1;\n var textel = (i == 0) ? this.text0 : this.text1;\n\n // for big devices like IC and FlipFlop with multiple possible output values, it's\n // ugly if borders get different colors for 'on' and 'off' sub-parts of it, so set to\n // off (the letter character will still get on color)\n if(i == 1 && cell.components[0]) {\n var type = cell.components[0].type;\n if(type == TYPE_FLIPFLOP || type == TYPE_IC || type == TYPE_IC_PASSTHROUGH || type == TYPE_ROM || type == TYPE_MUX) {\n // only for the solid parts, wires part of this component must still use on color\n if(devicemap[c] || c == '#' || c == '$') {\n ctx.strokeStyle = OFFCOLOR;\n ctx.fillStyle = OFFCOLOR;\n }\n }\n }\n\n if(c == '-') {\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n drawer.drawSplitDiag_(cell, ctx, 2);\n } else if(c == '|') {\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 1);\n drawer.drawSplitDiag_(cell, ctx, 2);\n } else if(c == '/') {\n drawer.drawLine_(ctx, 0, 1, 1, 0);\n } else if(c == '\\\\') {\n drawer.drawLine_(ctx, 0, 0, 1, 1);\n } else if(c == 'x') {\n this.drawextra = isInterestingComponent(cell, 0) && isInterestingComponent(cell, 1);\n //drawer.drawLine_(ctx, 0, 0, 1, 1);\n if(isInterestingComponent(cell, 1) && !isInterestingComponent(cell, 0)) drawer.drawLine_(ctx, 0, 0, 1, 1);\n if(isInterestingComponent(cell, 1)) {\n drawer.drawLine_(ctx, 0, 0, 0.4, 0.4);\n drawer.drawLine_(ctx, 0.6, 0.6, 1, 1);\n }\n if(isInterestingComponent(cell, 0)) drawer.drawLine_(ctx, 0, 1, 1, 0);\n } else if(c == '+') {\n var code = drawer.drawPlusDiagSplit_(cell, ctx);\n var shift = 0.2;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n //drawer.drawLine(ctx, 0.5, 0, 0.5, 1);\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n if(code == 0) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 0;\n }\n if(code == 1) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 24;\n }\n if(code == 2) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 25;\n }\n if(code == 4) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 26;\n }\n if(code == 8) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 27;\n }\n if(code == 16) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 28;\n }\n if(code == 32) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 29;\n }\n if(code == 64) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 30;\n }\n if(code == 128) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 31;\n }\n } else if(c == '*' || c == ',') {\n drawer.drawSplit_(cell, ctx);\n } else if(c == '^') {\n if(cell.circuitextra == 2) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 7)) { drawer.drawArrow_(ctx, 1, 1, 0, 0); num++; }\n if(hasDevice(cell.x, cell.y, 4)) { drawer.drawArrow_(ctx, 0, 1, 1, 0); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawArrow_(ctx, 0.5, 0.5, 0.5, 0);\n }\n } else if(c == '>') {\n if(cell.circuitextra == 2 && hasRealComponent(cell)) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 4)) { drawer.drawArrow_(ctx, 0, 1, 1, 0); num++; }\n if(hasDevice(cell.x, cell.y, 5)) { drawer.drawArrow_(ctx, 0, 0, 1, 1); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawArrow_(ctx, 0.5, 0.5, 1, 0.5);\n }\n } else if(c == 'v') {\n if(cell.circuitextra == 2 && hasRealComponent(cell)) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 6)) { drawer.drawArrow_(ctx, 1, 0, 0, 1); num++; }\n if(hasDevice(cell.x, cell.y, 5)) { drawer.drawArrow_(ctx, 0, 0, 1, 1); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawArrow_(ctx, 0.5, 0.5, 0.5, 1);\n }\n } else if(c == '<') {\n if(cell.circuitextra == 2 && hasRealComponent(cell)) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 7)) { drawer.drawArrow_(ctx, 1, 1, 0, 0); num++; }\n if(hasDevice(cell.x, cell.y, 6)) { drawer.drawArrow_(ctx, 1, 0, 0, 1); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawArrow_(ctx, 0.5, 0.5, 0, 0.5);\n }\n } else if(c == 'm') {\n if(cell.circuitextra == 2 && hasRealComponent(cell)) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 7)) { drawer.drawAntiArrow_(ctx, 1, 1, 0, 0); num++; }\n if(hasDevice(cell.x, cell.y, 4)) { drawer.drawAntiArrow_(ctx, 0, 1, 1, 0); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0.5, 0);\n }\n } else if(c == ']') {\n if(cell.circuitextra == 2 && hasRealComponent(cell)) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 4)) { drawer.drawAntiArrow_(ctx, 0, 1, 1, 0); num++; }\n if(hasDevice(cell.x, cell.y, 5)) { drawer.drawAntiArrow_(ctx, 0, 0, 1, 1); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawAntiArrow_(ctx, 0.5, 0.5, 1, 0.5);\n }\n } else if(c == 'w') {\n if(cell.circuitextra == 2 && hasRealComponent(cell)) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 6)) { drawer.drawAntiArrow_(ctx, 1, 0, 0, 1); num++; }\n if(hasDevice(cell.x, cell.y, 5)) { drawer.drawAntiArrow_(ctx, 0, 0, 1, 1); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0.5, 1);\n }\n } else if(c == '[') {\n if(cell.circuitextra == 2 && hasRealComponent(cell)) {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 7)) { drawer.drawAntiArrow_(ctx, 1, 1, 0, 0); num++; }\n if(hasDevice(cell.x, cell.y, 6)) { drawer.drawAntiArrow_(ctx, 1, 0, 0, 1); num++; }\n if(num == 2) this.drawextra = true;\n } else {\n drawer.drawSplit_(cell, ctx, 1);\n drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0, 0.5);\n }\n } else if(c == 'U') {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 0)) {num++; drawer.drawArrow_(ctx, 0.5, 0.5, 0.5, 0, 0.19);}\n if(hasDevice(cell.x, cell.y, 1)) {num++; drawer.drawArrow_(ctx, 0.5, 0.5, 1, 0.5, 0.19);}\n if(hasDevice(cell.x, cell.y, 2)) {num++; drawer.drawArrow_(ctx, 0.5, 0.5, 0.5, 1, 0.19);}\n if(hasDevice(cell.x, cell.y, 3)) {num++; drawer.drawArrow_(ctx, 0.5, 0.5, 0, 0.5, 0.19);}\n drawer.drawSplit_(cell, ctx, num);\n } else if(c == 'G') {\n var num = 0;\n if(hasDevice(cell.x, cell.y, 0)) {num++; drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0.5, 0);}\n if(hasDevice(cell.x, cell.y, 1)) {num++; drawer.drawAntiArrow_(ctx, 0.5, 0.5, 1, 0.5);}\n if(hasDevice(cell.x, cell.y, 2)) {num++; drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0.5, 1);}\n if(hasDevice(cell.x, cell.y, 3)) {num++; drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0, 0.5);}\n drawer.drawSplit_(cell, ctx, num);\n } else if(c == 'V') {\n drawer.drawSplit_h_(cell, ctx, -8);\n var code = 0;\n if(hasDevice(cell.x, cell.y, 0) && isInterestingComponent(cell, 1)) { drawer.drawArrow_(ctx, 0.5, 0.5, 0.5, 0, 0.19); code |= 1; }\n if(hasDevice(cell.x, cell.y, 1) && isInterestingComponent(cell, 0)) { drawer.drawArrow_(ctx, 0.5, 0.5, 1, 0.5, 0.19); code |= 2; }\n if(hasDevice(cell.x, cell.y, 2) && isInterestingComponent(cell, 1)) { drawer.drawArrow_(ctx, 0.5, 0.5, 0.5, 1, 0.19); code |= 4; }\n if(hasDevice(cell.x, cell.y, 3) && isInterestingComponent(cell, 0)) { drawer.drawArrow_(ctx, 0.5, 0.5, 0, 0.5, 0.19); code |= 8; }\n if(hasDevice(cell.x, cell.y, 4) && isInterestingComponent(cell, 3)) { drawer.drawArrow_(ctx, 0.5, 0.5, 1, 0); code |= 16; }\n if(hasDevice(cell.x, cell.y, 5) && isInterestingComponent(cell, 2)) { drawer.drawArrow_(ctx, 0.5, 0.5, 1, 1); code |= 32; }\n if(hasDevice(cell.x, cell.y, 6) && isInterestingComponent(cell, 3)) { drawer.drawArrow_(ctx, 0.5, 0.5, 0, 1); code |= 64; }\n if(hasDevice(cell.x, cell.y, 7) && isInterestingComponent(cell, 2)) { drawer.drawArrow_(ctx, 0.5, 0.5, 0, 0); code |= 128; }\n if(code == 1) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 32;\n }\n if(code == 2) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 33;\n }\n if(code == 4) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 34;\n }\n if(code == 8) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 35;\n }\n if(code == 144) {\n this.drawextra = true;\n this.drawextrai0 = 8;\n this.drawextrai1 = 4;\n this.drawextrag = 2;\n }\n if(code == 48) {\n this.drawextra = true;\n this.drawextrai0 = 4;\n this.drawextrai1 = 8;\n this.drawextrag = 3;\n }\n if(code == 96) {\n this.drawextra = true;\n this.drawextrai0 = 4;\n this.drawextrai1 = 8;\n this.drawextrag = 4;\n }\n if(code == 192) {\n this.drawextra = true;\n this.drawextrai0 = 8;\n this.drawextrai1 = 4;\n this.drawextrag = 5;\n }\n if(code == 3) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 16;\n }\n if(code == 6) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 17;\n }\n if(code == 12) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 18;\n }\n if(code == 9) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 19;\n }\n } else if(c == 'W') {\n drawer.drawSplit_h_(cell, ctx, -8);\n var code = 0;\n // no \"isInterestingComponent\" checks for W, unlike V, because W can affect things, it's negating (for V any effect, like as AND input, is negated if it's a dummy, but not for W)\n if(hasDevice(cell.x, cell.y, 0)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0.5, 0); code |= 1; }\n if(hasDevice(cell.x, cell.y, 1)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 1, 0.5); code |= 2; }\n if(hasDevice(cell.x, cell.y, 2)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0.5, 1); code |= 4; }\n if(hasDevice(cell.x, cell.y, 3)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0, 0.5); code |= 8; }\n if(hasDevice(cell.x, cell.y, 4)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 1, 0); code |= 16; }\n if(hasDevice(cell.x, cell.y, 5)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 1, 1); code |= 32; }\n if(hasDevice(cell.x, cell.y, 6)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0, 1); code |= 64; }\n if(hasDevice(cell.x, cell.y, 7)) { drawer.drawAntiArrow_(ctx, 0.5, 0.5, 0, 0); code |= 128; }\n if(code == 1) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 36;\n }\n if(code == 2) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 37;\n }\n if(code == 4) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 38;\n }\n if(code == 8) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 39;\n }\n if(code == 144) {\n this.drawextra = true;\n this.drawextrai0 = 8;\n this.drawextrai1 = 4;\n this.drawextrag = 6;\n }\n if(code == 48) {\n this.drawextra = true;\n this.drawextrai0 = 4;\n this.drawextrai1 = 8;\n this.drawextrag = 7;\n }\n if(code == 96) {\n this.drawextra = true;\n this.drawextrai0 = 4;\n this.drawextrai1 = 8;\n this.drawextrag = 8;\n }\n if(code == 192) {\n this.drawextra = true;\n this.drawextrai0 = 8;\n this.drawextrai1 = 4;\n this.drawextrag = 9;\n }\n if(code == 3) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 20;\n }\n if(code == 6) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 21;\n }\n if(code == 12) {\n this.drawextra = true;\n this.drawextrai0 = 1;\n this.drawextrai1 = 2;\n this.drawextrag = 22;\n }\n if(code == 9) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 23;\n }\n } else if(c == 'X') {\n var a = drawer.drawCrossing_(cell, ctx);\n var code = a[1];\n if(code == 3) {\n this.drawextra = true;\n this.drawextrai0 = 2;\n this.drawextrai1 = 1;\n this.drawextrag = 0;\n } else if(code == 12) {\n this.drawextra = true;\n this.drawextrai0 = 8;\n this.drawextrai1 = 4;\n this.drawextrag = 1;\n } else if(code == 6) {\n this.drawextra = true;\n this.drawextrai0 = 8;\n this.drawextrai1 = 1;\n this.drawextrag = 12;\n } else if(code == 10) {\n this.drawextra = true;\n this.drawextrai0 = 4;\n this.drawextrai1 = 1;\n this.drawextrag = 13;\n } else if(code == 5) {\n this.drawextra = true;\n this.drawextrai0 = 8;\n this.drawextrai1 = 2;\n this.drawextrag = 14;\n } else if(code == 9) {\n this.drawextra = true;\n this.drawextrai0 = 4;\n this.drawextrai1 = 2;\n this.drawextrag = 15;\n } else {\n this.dynamicdraw = true;\n this.dynamicdrawcode = code;\n }\n } else if(c == '&') {\n var draw1 = connected2g(cell.x, cell.y, 0) && connected2g(cell.x, cell.y, 1) && isInterestingComponent(cell, 1);\n var draw0 = connected2g(cell.x, cell.y, 2) && connected2g(cell.x, cell.y, 3) && isInterestingComponent(cell, 0);\n if(draw0 && draw1) {\n var r = 0.3;\n drawer.drawLine_(ctx, 0, 0.5, r, 0.5);\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 1 - r);\n drawer.drawLine_(ctx, r, 0.5, 0.5, 1 - r);\n drawer.drawLine_(ctx, 1, 0.5, 1 - r, 0.5);\n drawer.drawLine_(ctx, 0.5, 0, 0.5, r);\n drawer.drawLine_(ctx, 1 - r, 0.5, 0.5, r);\n this.drawextra = true;\n }\n else if(draw0) {\n drawer.drawLine_(ctx, 0.5, 0.5, 0, 0.5);\n drawer.drawLine_(ctx, 0.5, 0.5, 0.5, 1);\n this.drawonly = 1;\n }\n else if(draw1) {\n drawer.drawLine_(ctx, 0.5, 0.5, 1, 0.5);\n drawer.drawLine_(ctx, 0.5, 0.5, 0.5, 0);\n this.drawonly = 2;\n }\n } else if(c == '%') {\n var draw1 = connected2g(cell.x, cell.y, 0) && connected2g(cell.x, cell.y, 3) && isInterestingComponent(cell, 1);\n var draw0 = connected2g(cell.x, cell.y, 1) && connected2g(cell.x, cell.y, 2) && isInterestingComponent(cell, 0);\n if(draw0 && draw1) {\n var r = 0.3;\n drawer.drawLine_(ctx, 0, 0.5, r, 0.5);\n drawer.drawLine_(ctx, 0.5, 0, 0.5, r);\n drawer.drawLine_(ctx, r, 0.5, 0.5, r);\n drawer.drawLine_(ctx, 1, 0.5, 1 - r, 0.5);\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 1 - r);\n drawer.drawLine_(ctx, 1 - r, 0.5, 0.5, 1 - r);\n this.drawextra = true;\n }\n else if(draw0) {\n drawer.drawLine_(ctx, 0.5, 0.5, 1, 0.5);\n drawer.drawLine_(ctx, 0.5, 0.5, 0.5, 1);\n this.drawonly = 1;\n }\n else if(draw1) {\n drawer.drawLine_(ctx, 0.5, 0.5, 0, 0.5);\n drawer.drawLine_(ctx, 0.5, 0.5, 0.5, 0);\n this.drawonly = 2;\n }\n } else if(antennamap[c]) {\n //drawer.fillBg_(ctx, ctx.fillStyle);\n //this.ctx0.strokeStyle = this.ctx0.fillStyle = BGCOLOR;\n drawer.drawBGSplit_(cell, ctx);\n if(c == ')') {\n //drawer.drawArc_(ctx, -0.3, 0.5, 0.75, 0.1, 0.8);\n drawer.drawArc_(ctx, 0.5, 0.5, 0.75, 0.25, 0.4);\n drawer.drawFilledCircle_(ctx, 0.5, 0.5, 0.3);\n } else if(c == '(') {\n //drawer.drawArc_(ctx, 1.3, 0.5, 0.4, 0.75, 0.8);\n drawer.drawArc_(ctx, 0.5, 0.5, 0.25, 0.75, 0.4);\n drawer.drawFilledCircle_(ctx, 0.5, 0.5, 0.3);\n } else if(c == 'u') {\n //drawer.drawArc_(ctx, 0.5, -0.3, 0.65, 0.35, 0.8);\n drawer.drawArc_(ctx, 0.5, 0.5, 0, 0.5, 0.4);\n drawer.drawFilledCircle_(ctx, 0.5, 0.5, 0.3);\n } else if(c == 'n') {\n //drawer.drawArc_(ctx, 0.5, 1.3, 0.65, 0.85, 0.8);\n drawer.drawArc_(ctx, 0.5, 0.5, 0.5, 0, 0.4);\n drawer.drawFilledCircle_(ctx, 0.5, 0.5, 0.3);\n }\n } else if(c == '=') {\n var bus = cell.bus;\n if(bus) {\n // color some buses slightly differently to allow to distinguish them visually\n var cc = (bus.index & 7);\n drawer.fillBg_(ctx, BUSCOLORS[cc]);\n }\n if(digitmap[symbol]) {\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.font = '' + tw + 'px serif';\n this.ctx0.strokeStyle = this.ctx0.fillStyle = BGCOLOR;\n ctx.fillText(symbol, drawer.tx + (tw >> 1), drawer.ty + (th >> 1));\n }\n } else if(c == 'T') {\n this.fallback.init2(cell, symbol, virtualsymbol); this.usefallbackonly = true; break;\n } else if(virtualsymbol == 'L') {\n this.fallback.init2(cell, symbol, virtualsymbol); this.usefallbackonly = true; break;\n } else if(virtualsymbol == 'g') {\n drawer.drawBGSplit_(cell, ctx);\n drawer.drawFilledCircle_(ctx, 0.5, 0.5, 0.4);\n } else if(cell.comment) {\n this.fallback.init2(cell, symbol, virtualsymbol); this.usefallbackonly = true; break;\n } else if(c == 'toc') {\n this.fallback.init2(cell, symbol, virtualsymbol); this.usefallbackonly = true; break;\n } else {\n var alreadybg = error;\n if(!error) {\n if(virtualsymbol == 's' || virtualsymbol == 'S' || virtualsymbol == 'p' || virtualsymbol == 'P' || virtualsymbol == 'r' || virtualsymbol == 'R') {\n alreadybg = true;\n drawer.fillBg_(ctx, i == 0 ? SWITCHOFF_BGCOLOR : SWITCHON_BGCOLOR);\n this.ctx0.strokeStyle = this.ctx0.fillStyle = SWITCHOFF_BORDERCOLOR;\n this.ctx1.strokeStyle = this.ctx1.fillStyle = SWITCHON_BORDERCOLOR;\n this.text0.style.color = SWITCHOFF_FGCOLOR;\n this.text1.style.color = SWITCHON_FGCOLOR;\n }\n if(virtualsymbol == 'l') {\n alreadybg = true;\n var color = cell.components[0] ? cell.components[0].number : 0;\n if(color == -1) color = 0;\n if(color > led_off_fg_colors.length) color = 0; // not more colors than that supported\n drawer.fillBg_(ctx, i == 0 ? led_off_bg_colors[color] : led_on_bg_colors[color]);\n\n this.ctx0.strokeStyle = this.ctx0.fillStyle = led_off_border_colors[color];\n this.ctx1.strokeStyle = this.ctx1.fillStyle = led_on_border_colors[color];\n this.text0.style.color = led_off_fg_colors[color];\n this.text1.style.color = led_on_fg_colors[color];\n }\n if(virtualsymbol == 'B') {\n // NOTE: this actually may make a loose B (not part of a component) invisible\n // since setValue, that actually copies it to the canvas, is never called, and\n // this makes the text color equal to the background color.\n // That's actually more like an error (it has no component), and it would be\n // not efficient to enforce drawing somehow, who ignored for now.\n alreadybg = true;\n drawer.fillBg_(ctx, textel.style.color);\n textel.style.color = BGCOLOR;\n }\n }\n if(devicemap[c] || c == '#' || c == '$') {\n if(!alreadybg) {\n drawer.fillBg_(ctx, GATEBGCOLOR);\n }\n if(c == '$') {\n // subtle (but large code) graphics effect: for $ cells, that don't connect to inputs or outputs,\n // draw a notch when there is an input or wire explicitely trying to connect to this, to show that\n // it ignores it (to make that clear to the viewer). Only for those where the other graphics doesn't\n // already show it, e.g. *'s already are obvious because they won't extend there line all the way to\n // the side.\n if(!sameDevice(cell.x, cell.y, 0)) {\n var n2 = getNeighbor(cell.x, cell.y, 0);\n var c2 = n2 ? n2.circuitsymbol : '';\n if(c == '$' && (c2 == '^' || c2 == 'v' || c2 == 'm' || c2 == 'w' || c2 == '|' || c2 == '+')) {\n drawer.drawLine_(ctx, 0, 0, 0.5, 0.25);\n drawer.drawLine_(ctx, 0.5, 0.25, 1, 0);\n } else {\n drawer.drawLine_(ctx, 0, 0, 1, 0);\n }\n }\n if(!sameDevice(cell.x, cell.y, 1)) {\n var n2 = getNeighbor(cell.x, cell.y, 1);\n var c2 = n2 ? n2.circuitsymbol : '';\n if(c == '$' && (c2 == '>' || c2 == '<' || c2 == ']' || c2 == '[' || c2 == '-' || c2 == '+')) {\n drawer.drawLine_(ctx, 1, 0, 0.75, 0.5);\n drawer.drawLine_(ctx, 0.75, 0.5, 1, 1);\n } else {\n drawer.drawLine_(ctx, 1, 0, 1, 1);\n }\n }\n if(!sameDevice(cell.x, cell.y, 2)) {\n var n2 = getNeighbor(cell.x, cell.y, 2);\n var c2 = n2 ? n2.circuitsymbol : '';\n if(c == '$' && (c2 == '^' || c2 == 'v' || c2 == 'm' || c2 == 'w' || c2 == '|' || c2 == '+')) {\n drawer.drawLine_(ctx, 0, 1, 0.5, 0.75);\n drawer.drawLine_(ctx, 0.5, 0.75, 1, 1);\n } else {\n drawer.drawLine_(ctx, 1, 1, 0, 1);\n }\n }\n if(!sameDevice(cell.x, cell.y, 3)) {\n var n2 = getNeighbor(cell.x, cell.y, 3);\n var c2 = n2 ? n2.circuitsymbol : '';\n if(c == '$' && (c2 == '>' || c2 == '<' || c2 == ']' || c2 == '[' || c2 == '-' || c2 == '+')) {\n drawer.drawLine_(ctx, 0, 0, 0.25, 0.5);\n drawer.drawLine_(ctx, 0.25, 0.5, 0, 1);\n } else {\n drawer.drawLine_(ctx, 0, 1, 0, 0);\n }\n }\n } else {\n // standard box drawing\n if(!sameDevice(cell.x, cell.y, 0)) drawer.drawLine_(ctx, 0, 0, 1, 0);\n if(!sameDevice(cell.x, cell.y, 1)) drawer.drawLine_(ctx, 1, 0, 1, 1);\n if(!sameDevice(cell.x, cell.y, 2)) drawer.drawLine_(ctx, 1, 1, 0, 1);\n if(!sameDevice(cell.x, cell.y, 3)) drawer.drawLine_(ctx, 0, 1, 0, 0);\n }\n }\n var okdraw = true;\n if(c == '#' || c == '$') okdraw = false;\n if(c == 'i' && !(cell.drawchip || digitmap[cell.metasymbol])) okdraw = false;\n if(okdraw) {\n /*ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.font = '' + tw + 'px serif';\n ctx.fillText(symbol, tw >> 1, th >> 1);*/\n textel.innerText = symbol;\n }\n }\n }\n\n // ensure that if this is a re-init (e.g. after clicking on a bB bit with mouse), it will actually draw the change, not do the optimization when nothing changed\n this.prevvalue = -1;\n };\n\n /*\n Some cell types can have multiple independent signals through them, like wire\n crossings. However, for most cell types, only two graphics are created: off and on.\n Some cell types can have 4 signals through them, giving up to 16 instead of 2 combinations.\n But it would be a bit too much to make 16 different full graphics planes, and render all\n those combinations.\n So instead, for a few very common cell types, we support up to 4 graphics, by adding two more\n here, such as a + with one leg gray and the other black and vice versa.\n */\n this.drawGlobalExtras_ = function() {\n var drawer = new RendererDrawer();\n\n rglobal.extracanvas.forEach(function(canvas, context) {\n context.strokeStyle = BGCOLOR;\n context.fillStyle = BGCOLOR;\n context.fillRect(0, 0, canvas.width, canvas.height);\n });\n\n var ctx;\n\n var prepareAt = function(x, y) {\n // multiplied by 2 because the tiles are currently spread out to avoid leaking\n var tx = x * tw * 2;\n var ty = y * th * 2;\n ctx = rglobal.extracanvas.getContextAt(tx, ty);\n drawer.tx = tx + rglobal.extracanvas.getXOffsetAt(tx);\n drawer.ty = ty + rglobal.extracanvas.getYOffsetAt(ty);\n };\n\n for(var i = 0; i < 2; i++) {\n var color0, color1;\n if(i == 0) {\n color0 = OFFCOLOR;\n color1 = ONCOLOR;\n } else {\n color0 = ONCOLOR;\n color1 = OFFCOLOR;\n }\n\n // leaving one gap open between each tile so that some border graphics don't overlap each other\n var ty = ((i == 0) ? 0 : 1);\n\n // '+'\n prepareAt(0, ty);\n var shift = 0.2;\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n\n // 'x'\n prepareAt(1, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0, 0.4, 0.4);\n drawer.drawLine_(ctx, 0.6, 0.6, 1, 1);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 1, 1, 0);\n\n // 'diagonal crossing ^'\n prepareAt(2, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 1, 1, 0, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 0, 1, 1, 0);\n\n // 'diagonal crossing >'\n prepareAt(3, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 0, 1, 1, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 0, 0, 1, 1)\n\n // 'diagonal crossing v'\n prepareAt(4, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 1, 0, 0, 1);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 0, 0, 1, 1);\n\n // 'diagonal crossing <'\n prepareAt(5, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 1, 1, 0, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 1, 0, 0, 1);\n\n // 'diagonal crossing m'\n prepareAt(6, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 1, 1, 0, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 0, 1, 1, 0);\n\n // 'diagonal crossing ]'\n prepareAt(7, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 0, 1, 1, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 0, 0, 1, 1)\n\n // 'diagonal crossing w'\n prepareAt(8, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 1, 0, 0, 1);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 0, 0, 1, 1);\n\n // 'diagonal crossing ['\n prepareAt(9, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 1, 1, 0, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 1, 0, 0, 1);\n\n // '&'\n prepareAt(10, ty);\n var r = 0.3;\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, r, 0.5);\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 1 - r);\n drawer.drawLine_(ctx, r, 0.5, 0.5, 1 - r);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 1, 0.5, 1 - r, 0.5);\n drawer.drawLine_(ctx, 0.5, 0, 0.5, r);\n drawer.drawLine_(ctx, 1 - r, 0.5, 0.5, r);\n\n // '%'\n prepareAt(11, ty);\n r = 0.3;\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, r, 0.5);\n drawer.drawLine_(ctx, 0.5, 0, 0.5, r);\n drawer.drawLine_(ctx, r, 0.5, 0.5, r);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 1, 0.5, 1 - r, 0.5);\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 1 - r);\n drawer.drawLine_(ctx, 1 - r, 0.5, 0.5, 1 - r);\n\n // '-/-'\n prepareAt(12, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 1, 0.4, 0.6);\n drawer.drawLine_(ctx, 0.6, 0.4, 1, 0);\n\n // '-\\-'\n prepareAt(13, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 0, 0.4, 0.4);\n drawer.drawLine_(ctx, 0.6, 0.6, 1, 1);\n\n // '| with /'\n prepareAt(14, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 1);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 1, 0.4, 0.6);\n drawer.drawLine_(ctx, 0.6, 0.4, 1, 0);\n\n // '| with \\'\n prepareAt(15, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 1);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 0, 0.4, 0.4);\n drawer.drawLine_(ctx, 0.6, 0.6, 1, 1);\n\n // input crossing NE\n prepareAt(16, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 0.5, 1, 0.5, 0, 0.19);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 0, 0.5, 1, 0.5, 0.19);\n\n // input crossing ES\n prepareAt(17, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 0, 0.5, 1, 0.5, 0.19);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 0.5, 0, 0.5, 1, 0.19);\n\n // input crossing SW\n prepareAt(18, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 0.5, 0, 0.5, 1, 0.19);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 1, 0.5, 0, 0.5, 0.19);\n\n // input crossing WN\n prepareAt(19, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 1, 0.5, 0, 0.5, 0.19);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 0.5, 1, 0.5, 0, 0.19);\n\n // negated input crossing NE\n prepareAt(20, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 0.5, 1, 0.5, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 0, 0.5, 1, 0.5);\n\n // negated input crossing ES\n prepareAt(21, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 0.5, 0, 0.5, 1);\n\n // negated input crossing SW\n prepareAt(22, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 0.5, 0, 0.5, 1);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 1, 0.5, 0, 0.5);\n\n // negated input crossing WN\n prepareAt(23, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 1, 0.5, 0, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 0.5, 1, 0.5, 0);\n\n shift = 0.2;\n\n prepareAt(24, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n drawer.doDrawPlusDiagSplit_(1, ctx);\n\n prepareAt(25, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n drawer.doDrawPlusDiagSplit_(2, ctx);\n\n prepareAt(26, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n drawer.doDrawPlusDiagSplit_(4, ctx);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n\n prepareAt(27, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n drawer.doDrawPlusDiagSplit_(8, ctx);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n\n prepareAt(28, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n drawer.doDrawPlusDiagSplit_(16, ctx);\n\n prepareAt(29, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n drawer.doDrawPlusDiagSplit_(32, ctx);\n\n prepareAt(30, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n drawer.doDrawPlusDiagSplit_(64, ctx);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n\n prepareAt(31, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n drawer.doDrawPlusDiagSplit_(128, ctx);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0.5, 0, 0.5, 0.5 - shift + 0.1);\n drawer.drawLine_(ctx, 0.5, 0.5 + shift, 0.5, 1);\n\n // input crossing N\n prepareAt(32, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 0.5, 1, 0.5, 0, 0.19);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n\n // input crossing E\n prepareAt(33, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 0, 0.5, 1, 0.5, 0.19);\n\n // input crossing S\n prepareAt(34, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawArrow_(ctx, 0.5, 0, 0.5, 1, 0.19);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n\n // input crossing W\n prepareAt(35, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawArrow_(ctx, 1, 0.5, 0, 0.5, 0.19);\n\n // negated input crossing N\n prepareAt(36, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 0.5, 1, 0.5, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n\n // negated input crossing E\n prepareAt(37, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 0, 0.5, 1, 0.5);\n\n // negated input crossing S\n prepareAt(38, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawAntiArrow_(ctx, 0.5, 0, 0.5, 1);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawLine_(ctx, 0, 0.5, 1, 0.5);\n\n // negated input crossing W\n prepareAt(39, ty);\n ctx.strokeStyle = ctx.fillStyle = color0;\n drawer.drawLine_(ctx, 0.5, 1, 0.5, 0);\n ctx.strokeStyle = ctx.fillStyle = color1;\n drawer.drawAntiArrow_(ctx, 1, 0.5, 0, 0.5);\n }\n };\n\n this.setValue = function(cell, value, type) {\n if(this.usefallbackonly) {\n this.fallback.setValue(cell, value, type);\n return;\n }\n\n if(value != this.prevvalue) { // changing visibility is slow in case of lots of elements, so only do if it changed\n var dest = rglobal.maincanvas.getContextForCell(cell);\n var offsetx = rglobal.maincanvas.getXOffsetForCell(cell);\n var offsety = rglobal.maincanvas.getYOffsetForCell(cell);\n var sx = offsetx + cell.x * tw;\n var sy = offsety + cell.y * th;\n var dx = offsetx + cell.x * tw;\n var dy = offsety + cell.y * th;\n var tweak = 0; // set to 1 to fix a few graphics are not perfectly aligned to the cell. This is a quick fix for that... TODO: this too gives issues. Fix all rendering above to let each symbol stay only inside of its own cell (not as easy as it seems near borders).\n var source;\n\n // for the X with its up to 16 possible graphics (and more if some legs are\n // not present), do dynamic drawing. Not done for other components because possibly slower.\n if(this.dynamicdraw) {\n drawer.tx = dx;\n drawer.ty = dy;\n drawer.drawCrossing2_(dest, this.dynamicdrawcode, value, OFFCOLOR, ONCOLOR);\n this.prevvalue = value;\n return;\n }\n\n if(value && this.drawonly) {\n value &= this.drawonly;\n }\n\n if(value) {\n if(this.usetext) {\n this.text0.style.visibility = 'hidden';\n if(this.text1) this.text1.style.visibility = 'visible';\n }\n source = rglobal.offcanvas1.getCanvasForCell(cell);\n if(this.drawextra) {\n var c = cell.circuitsymbol;\n var isextra = true;\n var qx, qy;\n if(c == 'x' && value == 1) { qx = 1; qy = 0; }\n else if(c == 'x' && value == 2) { qx = 1; qy = 1; }\n else if(c == '^' && value == 1) { qx = 2; qy = 1; }\n else if(c == '^' && value == 2) { qx = 2; qy = 0; }\n else if(c == '>' && value == 1) { qx = 3; qy = 1; }\n else if(c == '>' && value == 2) { qx = 3; qy = 0; }\n else if(c == 'v' && value == 1) { qx = 4; qy = 0; }\n else if(c == 'v' && value == 2) { qx = 4; qy = 1; }\n else if(c == '<' && value == 1) { qx = 5; qy = 0; }\n else if(c == '<' && value == 2) { qx = 5; qy = 1; }\n else if(c == 'm' && value == 1) { qx = 6; qy = 1; }\n else if(c == 'm' && value == 2) { qx = 6; qy = 0; }\n else if(c == ']' && value == 1) { qx = 7; qy = 1; }\n else if(c == ']' && value == 2) { qx = 7; qy = 0; }\n else if(c == 'w' && value == 1) { qx = 8; qy = 0; }\n else if(c == 'w' && value == 2) { qx = 8; qy = 1; }\n else if(c == '[' && value == 1) { qx = 9; qy = 0; }\n else if(c == '[' && value == 2) { qx = 9; qy = 1; }\n else if(c == '&' && value == 1) { qx = 10; qy = 1; }\n else if(c == '&' && value == 2) { qx = 10; qy = 0; }\n else if(c == '%' && value == 1) { qx = 11; qy = 0; }\n else if(c == '%' && value == 2) { qx = 11; qy = 1; }\n else isextra = false;\n if(c == 'X' || c == 'V' || c == 'W' || c == '+') {\n isextra = true;\n if(value == this.drawextrai0) { qx = this.drawextrag; qy = 0; }\n else if(value == this.drawextrai1) { qx = this.drawextrag; qy = 1; }\n else isextra = false;\n }\n if(isextra) {\n // multiplied by 2 because the tiles are currently spread out to avoid leaking\n qx *= 2;\n qy *= 2;\n var cx = tw * qx;\n var cy = th * qy;\n source = rglobal.extracanvas.getCanvasAt(cx, cy);\n tweak = 0;\n var sx = cx + rglobal.extracanvas.getXOffsetAt(cx);\n var sy = cy + rglobal.extracanvas.getYOffsetAt(cy);\n }\n }\n } else {\n if(this.usetext) {\n this.text0.style.visibility = 'visible';\n if(this.text1) this.fallback.div1.style.visibility = 'hidden';\n }\n source = rglobal.offcanvas0.getCanvasForCell(cell);\n }\n dest.drawImage(source, sx, sy, tw + tweak, th + tweak, dx, dy, tw + tweak, th + tweak);\n }\n this.prevvalue = value;\n };\n\n this.markError = function(cell, errortext) {\n if(this.usefallbackonly) {\n this.fallback.markError(cell, errortext);\n } else {\n //this.canvas0.style.backgroundColor = 'yellow';\n //this.canvas1.style.backgroundColor = 'yellow';\n this.ctx0.strokeStyle = 'red';\n this.ctx1.strokeStyle = '#f88';\n this.ctx0.fillStyle = 'red';\n this.ctx1.fillStyle = '#f88';\n this.text0.style.color = 'red';\n this.text0.title = errortext;\n if(this.usetext) {\n this.text1.style.color = '#f88';\n this.text1.title = errortext;\n }\n }\n };\n\n this.setCursorPointer = function() {\n this.fallback.setCursorPointer();\n };\n\n this.setLook = function(cell, type) {\n /* see the RendererText setLook function for comment about styles and types */\n if(type == TYPE_TIMER_ON || type == TYPE_TIMER_OFF) {\n var clocked = cell.components[0].clocked;\n var user = (type == TYPE_TIMER_ON);\n if(this.text0.innerText != 'R' && user) this.text0.innerText = 'R';\n if(this.text0.innerText != 'r' && !user) this.text0.innerText = 'r';\n if(this.text1.innerText != 'R' && user) this.text1.innerText = 'R';\n if(this.text1.innerText != 'r' && !user) this.text1.innerText = 'r';\n }\n if(type == TYPE_SWITCH_ON || type == TYPE_SWITCH_OFF) {\n var user = (type == TYPE_SWITCH_ON);\n if(this.text0.innerText != 'S' && user) this.text0.innerText = 'S';\n if(this.text0.innerText != 's' && !user) this.text0.innerText = 's';\n if(this.text1.innerText != 'S' && user) this.text1.innerText = 'S';\n if(this.text1.innerText != 's' && !user) this.text1.innerText = 's';\n }\n if(type == TYPE_PUSHBUTTON_ON || type == TYPE_PUSHBUTTON_OFF) {\n var user = (type == TYPE_PUSHBUTTON_ON);\n if(this.text0.innerText != 'P' && user) this.text0.innerText = 'P';\n if(this.text0.innerText != 'p' && !user) this.text0.innerText = 'p';\n if(this.text1.innerText != 'P' && user) this.text1.innerText = 'P';\n if(this.text1.innerText != 'p' && !user) this.text1.innerText = 'p';\n }\n };\n\n this.setTerminal = function(char, blink) {\n this.fallback.setTerminal(char, blink);\n };\n}", "title": "" }, { "docid": "c05c375bcf758d02c7890c93e89a0ce4", "score": "0.44939476", "text": "function LabeledGraphics() {\n var _this = _super.call(this) || this;\n _this.labels = new Map();\n return _this;\n }", "title": "" }, { "docid": "5e16dfa56069165eea7040c002fc35cc", "score": "0.44924203", "text": "function Object_Visual(data) {\n Object_Visual.__super__.constructor.call(this);\n\n /**\n * Indiciates if the game object is visible on screen.\n * @property visible\n * @type boolean\n */\n this.visible = true;\n\n /**\n * The object's destination rectangle on screen.\n * @property dstRect\n * @type gs.Rect\n */\n this.dstRect = new Rect(data != null ? data.x : void 0, data != null ? data.y : void 0);\n\n /**\n * The object's origin.\n * @property origin\n * @type gs.Point\n */\n this.origin = new gs.Point(0, 0);\n\n /**\n * The object's offset.\n * @property offset\n * @type gs.Point\n */\n this.offset = new gs.Point(0, 0);\n\n /**\n * The object's anchor-point. For example: An anchor-point with 0,0 places the object with its top-left corner\n * at its position but with an 0.5, 0.5 anchor-point the object is placed with its center. An anchor-point of 1,1\n * places the object with its lower-right corner.\n * @property anchor\n * @type gs.Point\n */\n this.anchor = new gs.Point(0.0, 0.0);\n\n /**\n * The position anchor point. For example: An anchor-point with 0,0 places the object with its top-left corner\n * at its position but with an 0.5, 0.5 anchor-point the object will be placed with its center. An anchor-point of 1,1\n * will place the object with its lower-right corner. It has not effect on the object's rotation/zoom anchor. For that, take\n * a look at <b>anchor</b> property.\n *\n * @property positionAnchor\n * @type gs.Point\n */\n this.positionAnchor = new gs.Point(0, 0);\n\n /**\n * The object's zoom-setting for x and y axis. The default value is\n * { x: 1.0, y: 1.0 }\n * @property zoom\n * @type gs.Point\n */\n this.zoom = (data != null ? data.zoom : void 0) || new gs.Point(1.0, 1.0);\n\n /**\n * The object's z-index controls rendering-order/image-overlapping. An object with a smaller z-index is rendered\n * before an object with a larger index. For example: To make sure a game object is always on top of the screen, it\n * should have the largest z-index of all game objects.\n * @property zIndex\n * @type number\n */\n this.zIndex = 700;\n\n /**\n * The object's blend mode controls how the blending of the object's visual representation is calculated.\n * @property blendMode\n * @type number\n * @default gs.BlendMode.NORMAL\n */\n this.blendMode = gs.BlendMode.NORMAL;\n\n /**\n * The object's viewport.\n * @property viewport\n * @type gs.Viewport\n */\n this.viewport = Graphics.viewport;\n\n /**\n * The object's motion-blur settings.\n * @property motionBlur\n * @type gs.MotionBlur\n */\n this.motionBlur = new gs.MotionBlur();\n\n /**\n * Contains different kinds of shader effects which can be activated for the object.\n * @property effects\n * @type gs.EffectCollection\n */\n this.effects = new gs.EffectCollection();\n\n /**\n * The object's opacity to control transparency. For example: 0 = Transparent, 255 = Opaque, 128 = Semi-Transparent.\n * @property opacity\n * @type number\n */\n this.opacity = 255;\n }", "title": "" }, { "docid": "7b9efd0949eaf10d47f838e0ab633e01", "score": "0.44905236", "text": "function TSChartLib_AbstractChart()\r\n{\r\n\t// style constants - IE doesn't support define?\r\n\t\r\n\tthis.STYLE_PLAIN = \t\t\t0;\r\n\tthis.STYLE_3D = \t\t\t1;\r\n\tthis.STYLE_PERCENT = \t\t2;\r\n\tthis.STYLE_FILLED = \t\t4;\r\n\tthis.STYLE_VALUE_LABELS = \t8;\r\n\t\r\n\t// fields\r\n\t\r\n\tthis.lineStyle = \"#222\";\r\n\tthis.lineWidth = \"2\";\r\n\tthis.fillStyle = \"#00f\";\r\n\tthis.shadowStyle = \"#00c\";\r\n\tthis.chartStyle = this.STYLE_PLAIN;\r\n\tthis.axisLabels = null;\r\n\tthis.canvasTop = 0;\r\n\tthis.canvasLeft = 0;\r\n\tthis.margins = Array( 8, 8, 8, 8 ); // tlbr\r\n\r\n\tthis.defaultColorScheme = \r\n\t[\r\n\t\t{ color: \"#0cf\", \tshadowColor: \"#09f\" }, // blue\r\n\t\t{ color: \"#ff0\", \tshadowColor: \"#fc0\" }, // yellow\r\n\t\t{ color: \"#c6c\", \tshadowColor: \"#c3c\" }, // purple\r\n\t\t{ color: \"#f00\", \tshadowColor: \"#c00\" }, // red\r\n\t\t{ color: \"#6c0\", \tshadowColor: \"#690\" }, // green\r\n\t];\r\n\t\r\n\t/**\r\n\t * internal chart structure\r\n\t */\r\n\tthis.data = Array();\r\n\r\n\t/**\r\n\t * references to labels, which are dom nodes\r\n\t * (not drawn)\r\n\t */\r\n\tthis.labels = Array();\r\n\r\n\t/**\r\n\t * find the x, y position of the canvas\r\n\t * in the document. this is based on the method\r\n\t * from quirksmode, see\r\n\t * http://www.quirksmode.org/\r\n\t */\r\n\tthis.find_canvas_position = function( o )\r\n\t{\r\n\t\tthis.canvasTop = 0;\r\n\t\tthis.canvasLeft = 0;\r\n\t\t\r\n\t\tif( o.offsetParent )\r\n\t\t{\r\n\t\t\twhile( o.offsetParent )\r\n\t\t\t{\r\n\t\t\t\tthis.canvasLeft += o.offsetLeft;\r\n\t\t\t\tthis.canvasTop += o.offsetTop;\r\n\t\t\t\to = o.offsetParent;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif( o.x ) this.canvasLeft += o.x;\r\n\t\t\tif( o.y ) this.canvasTop += o.y;\r\n\t\t}\r\n\t\t\r\n\t};\r\n\r\n\t/**\r\n\t * reset chart data.\r\n\t */\r\n\tthis.reset = function()\r\n\t{\r\n\t\tvar i, l = this.data.length;\r\n\t\tfor( i = 0; i< l; i++ )\r\n\t\t{\r\n\t\t\tdelete this.data[i];\r\n\t\t\tthis.data[i] = null;\r\n\t\t}\r\n\t\tthis.data.splice( 0, l );\r\n\t\tthis.resetLabels();\r\n\t};\r\n\r\n\t/**\r\n\t * reset labels: this is a separate method, because it should\r\n\t * be called anytime the chart is redrawn (unlike resetting data)\r\n\t */\r\n\tthis.resetLabels = function()\r\n\t{\r\n\t\tl = this.labels.length;\r\n\t\tfor( i = 0; i< l; i++ )\r\n\t\t{\r\n\t\t\tif( this.labels[i].parentNode )\r\n\t\t\t\tthis.labels[i].parentNode.removeChild( this.labels[i] );\r\n\t\t\tdelete this.labels[i];\r\n\t\t\tthis.labels[i] = null;\r\n\t\t}\r\n\t\tthis.labels.splice( 0, l );\r\n\t};\r\n\r\n\t/**\r\n\t * add axis labels (not for pie charts)\r\n\t */\r\n\tthis.add_labels = function( labels )\r\n\t{\r\n\t\tthis.axisLabels = labels;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Add a data element - basically, push onto the stack. values are\r\n\t * data sets - generally arrays of points, but in the case of pie\r\n\t * charts, a single point. In the case of the pie chart, the value\r\n\t * can be passed as a number; for other charts, it should be an array\r\n\t * of points.\r\n\t *\r\n\t * @param value\t\t\tthe value, as an array of points or as a number\r\n\t * @param label\t\t\t[OPTIONAL] the label for the element\r\n\t * @param color\t\t\t[OPTIONAL] the fill color\r\n\t * @param shadowColor\t[OPTIONAL] the shadow color, for 3D charts\r\n\t * @param lineColor \t[OPTIONAL] For line charts only, the line color\r\n\t * @param lineWidth\t\t[OPTIONAL] For line charts only, line width\r\n\t */\r\n\tthis.add_element = function( value, label, color, shadowColor, lineColor, lineWidth )\r\n\t{\r\n\t\tif( !value )\r\n\t\t{\r\n\t\t\tthrow \"Invalid entry value\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar elt = new Object();\r\n\t\t\t\t\r\n\t\tif( typeof( value ) == \"Array\" || ( value.length && value.length > 0 ))\r\n\t\t{\r\n\t\t\telt.data = value;\r\n\t\t\telt.value = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\telt.value = value;\r\n\t\t}\r\n\t\tif( label ) elt.label = label;\r\n\t\tif( color ) elt.color = color;\r\n\t\tif( shadowColor ) elt.shadowColor = shadowColor;\r\n\t\tif( lineColor ) elt.lineColor = lineColor;\r\n\t\tif( null != lineWidth ) elt.lineWidth = lineWidth; // can be zero\r\n\t\t\r\n\t\tthis.data.push( elt );\r\n\t};\r\n\t\t\r\n\t/**\r\n\t * draw the chart.\r\n\t *\r\n\t * @param canvas\t\tthe canvas element. we're relying on size,\r\n\t * \t\t\t\t\t\townerDocument, and parentNode (for labels) -\r\n\t * \t\t\t\t\t\tso this needs to be in the DOM.\r\n\t */\r\n\tthis.render = function( canvas ){};\r\n\t\r\n\t/**\r\n\t * draw an animated chart. the parameter is type-dependent,\r\n\t * but will be an integer. if the chart doesn't support animation\r\n\t * (or the passed variable), it should just call render.\r\n\t * \r\n\t * @param canvas\t\tthe canvas element. we're relying on size,\r\n\t * \t\t\t\t\t\townerDocument, and parentNode (for labels) -\r\n\t * \t\t\t\t\t\tso this needs to be in the DOM.\r\n\t * @param type\t\t\tthe animation type, if multiple types are supported.\r\n\t */\r\n\tthis.animate = function( canvas, type )\r\n\t{\r\n\t\tthis.render( canvas );\r\n\t};\r\n}", "title": "" }, { "docid": "9cff3905ef4e148229a59e686f31944a", "score": "0.44901404", "text": "function vjSVGBase( svg, model )\n{\n this.elementSource=vjSVGElementSource;\n this.svg=svg;\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/\n // _/ stacking of attributes, and transformation\n // _/\n // _/_/_/_/_/_/_/_/_/_/_/\n this.pushArray=function(array,whattopush) { array.push(whattopush); };\n\n this.popArray=function(array, force)\n { // do not pop out the last element\n if(force || array.length>1)\n return array.pop();\n else return array[0];\n };\n\n this.getCurrentFromArray=function(array) { return array[array.length-1]; };\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/\n // _/ setters for Generic attributes\n // _/\n // _/_/_/_/_/_/_/_/_/_/_/\n\n // -------------------------------------------------------------HANDLERS\n this.handlerArray = new Array();\n this.setHandler = function(obj) // color, width, opacity\n {\n this.pushArray(this.handlerArray,obj);\n };\n this.getHandler = function() {\n return this.getCurrentFromArray(this.handlerArray);\n };\n this.popHandler = function() {\n return this.popArray(this.handlerArray, true);\n };\n // -------------------------------------------------------------PEN\n this.penArray = new Array();\n this.setPen = function(obj, is_default) // color, width, opacity\n { // alerJ(\"object\",object)\n this.pushArray(this.penArray, this.ensureStyle(obj, \"p\", is_default));\n };\n this.getPen = function() {\n return this.getCurrentFromArray(this.penArray);\n };\n this.popPen = function() {\n return this.popArray(this.penArray);\n };\n\n // -------------------------------------------------------------BRUSH\n this.brushArray = new Array();\n this.setBrush = function(obj, is_default) {\n this.pushArray(this.brushArray, this.ensureStyle(obj, \"b\", is_default)); // NOTE : color can be\n // 'transparent'\n };\n this.getBrush = function() {\n return this.getCurrentFromArray(this.brushArray);\n };\n this.popBrush = function() {\n return this.popArray(this.brushArray);\n };\n // -------------------------------------------------------------FONT\n this.fontArray = [];\n this.setFont = function(obj, is_default) {\n this.pushArray(this.fontArray, this.ensureStyle(obj, \"f\", is_default));\n };\n this.getFont = function() {\n return this.getCurrentFromArray(this.fontArray);\n };\n this.popFont = function() {\n return this.popArray(this.fontArray);\n };\n\n this.styleCnt = 0;\n this.styleNames = {};\n this.styleNode = document.createElementNS(this.elementSource, \"style\");\n this.topGroupNode = document.createElementNS(this.elementSource, \"g\");\n this.topGroupNode.id = (\"svg_top_g\" + 10 * Math.random()).replace(\".\", \"\");\n this.curGroupNode = this.topGroupNode;\n \n \n this.ensureStyle = function(obj, cat, is_default) {\n var style_string = \"\";\n Object.getOwnPropertyNames(obj).sort().forEach(function(nam, i) {\n var val = obj[nam];\n if (nam === \"font-size\" && parseInt(val) == val) {\n val = val + \"px\";\n }\n style_string += (i ? \" \" : \"\") + nam + \":\" + val + \";\";\n });\n if (this.styleNames[style_string]) {\n return this.styleNames[style_string];\n }\n this.styleCnt++;\n var style_name = cat + this.styleCnt;\n this.styleNames[style_string] = style_name;\n if (is_default) {\n this.styleNode.textContent += \"#\" + this.topGroupNode.id + \" { \" + style_string + \" }\\n\";\n }\n this.styleNode.textContent += \"#\" + this.topGroupNode.id + \" .\" + style_name + \" { \" + style_string + \" }\\n\";\n\n return style_name;\n };\n //this.setCurveCommand=function(curveCommand) {this.curveCommand=curveCommand;};\n //this.setMoveCommand=function(curveCommand) {this.moveCommand=moveCommand;};\n //this.setLineCommand=function(curveCommand) {this.lineCommand=lineCommand;};\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/ Setters for Matrix Attributes\n // _/_/_/_/_/_/_/_/_/_/_/\n\n this.matrixArray=new Array(); // array of transformation matrix\n this.aspectPreserverArray=new Array(); // array of generators of corresponding aspect-preserving transformations\n this.matrixArray.push(vjUnitMatrix);\n this.aspectPreserverArray.push(vjSVGMakeAspectPreserver(vjUnitMatrix));\n\n this.setMatrix=function( newmatrix, newpreserver ) {\n this.pushArray(this.matrixArray, newmatrix);\n if (!newpreserver)\n newpreserver = vjSVGMakeAspectPreserver(newmatrix);\n this.pushArray(this.aspectPreserverArray, newpreserver);\n };\n this.getCurrentMatrix=function() {\n return this.getCurrentFromArray( this.matrixArray );\n };\n this.setAspectPreservingMatrix=function( crd, noRotate, noScale ) {\n var currentPreserver = this.getCurrentFromArray( this.aspectPreserverArray );\n var fakePreserver = function(c) { return c; };\n this.setMatrix(currentPreserver(crd, noRotate, noScale), fakePreserver);\n };\n this.popMatrix=function(){\n this.popArray(this.aspectPreserverArray);\n return this.popArray(this.matrixArray);\n };\n\n this.rotateMatrix=function(crd,vec, angle, donotpushmatrix )\n {\n if(!crd.z)crd.z=0;\n //alert('ttttt')\n var currentMatrix=this.getCurrentFromArray( this.matrixArray );\n\n// crd=this.multipleMatrixToVector(currentMatrix,crd);\n // find how to rotranslate 4x4 matrix around a point of origin and\n var angleRadian=angle*(Math.PI/180);\n var rotationMatrix= new Array();\n //alerJ(\"crd2\",crd2)\n var cos=Math.cos(angleRadian);\n var sin=Math.sin(angleRadian);\n var t=1-cos;\n\n var u=vec.x;var u2=Math.pow(u,2);\n var v=vec.y;var v2=Math.pow(v,2);\n var w=vec.z;var w2=Math.pow(w,2);\n var L=Math.pow(u,2)+Math.pow(v,2)+Math.pow(w,2);\n //alert(L)\n var tx=((crd.x*(v2+w2)-u*(crd.y*v+crd.z*w))*t+(crd.y*w-crd.z*v)*Math.sqrt(L)*sin)/L;\n var ty=((crd.y*(u2+w2)-v*(crd.x*u+crd.z*w))*t+(crd.z*u-crd.x*w)*Math.sqrt(L)*sin)/L;\n var tz=((crd.z*(u2+v2)-w*(crd.x*u+crd.y*v))*t+(crd.x*v-crd.y*u)*Math.sqrt(L)*sin)/L;\n\n //alerJ(' '+((crd.x*(v2+w2)-u*(crd.y*v+crd.z*w))*t)/L,rotationMatrix);\n\n\n rotationMatrix.push([ (u2+(v2+w2)*cos)/L , (u*v*t-w*Math.sqrt(L)*sin)/L , (u*w*t+v*Math.sqrt(L)*sin)/L , tx ],\n [(u*v*t+w*Math.sqrt(L)*sin)/L , (v2+(u2+w2)*cos)/L , (v*w*t-u*Math.sqrt(L)*sin)/L , ty ],\n [(u*w*t-v*Math.sqrt(L)*sin)/L , (v*w*t+u*Math.sqrt(L)*sin)/L , (w2+(u2+v2)*cos)/L , tz ],\n [ 0 , 0 , 0 , 1 ]);\n// alerJ(\"rotation point\",crd);\n// alerJ(\"Rotation Matrix\",rotationMatrix);\n// alerJ(\"Matrix BEFORE rotation\",currentMatrix);\n currentMatrix=matrixMultiplication(currentMatrix,rotationMatrix);\n// alerJ(\"Matrix AFTER rotation\",currentMatrix);\n if(!donotpushmatrix)\n this.setMatrix(currentMatrix);\n return currentMatrix;\n //alerJ(\"currentMatrix\",currentMatrix)\n };\n\n this.translateMatrix=function( shiftCrd, donotpushmatrix )\n {\n var currentMatrix=this.getCurrentFromArray( this.matrixArray );\n if (!shiftCrd.z) shiftCrd.z=0;\n\n var translationMatrix=new Array([ 1 , 0 , 0 , shiftCrd.x ],\n [ 0 , 1 , 0 , shiftCrd.y ],\n [ 0 , 0 , 1 , shiftCrd.z ],\n [ 0 , 0 , 0 , 1 ]);\n\n currentMatrix=matrixMultiplication(currentMatrix,translationMatrix);\n\n if(!donotpushmatrix)\n this.setMatrix(currentMatrix);\n return currentMatrix;\n //this.setMatrix(currentMatrix);\n };\n\n this.scaleMatrix=function( scaleCrd, donotpushmatrix)\n {\n if(!scaleCrd.z)scaleCrd.z=0;\n var currentMatrix=this.getCurrentFromArray( this.matrixArray );\n if (!scaleCrd.z) scaleCrd.z=0;\n\n var scaleMatrix=new Array([ scaleCrd.x , 0 , 0 , 0 ],\n [ 0 , scaleCrd.y , 0 , 0 ],\n [ 0 , 0 , scaleCrd.z , 0 ],\n [ 0 , 0 , 0 , 1 ]);\n\n currentMatrix=matrixMultiplication(currentMatrix,scaleMatrix);\n if(!donotpushmatrix)\n this.setMatrix(currentMatrix);\n return currentMatrix;\n };\n\n this.scaleSize=function( size , whichaxis, angle )\n {\n if(whichaxis===undefined)whichaxis=1;\n var currentMatrix=this.getCurrentFromArray( this.matrixArray );\n var sizeset=[0,0,0];\n for( var iv=0; iv< 3 ; ++ iv ) {\n sizeset[0]+=currentMatrix[iv][0]*currentMatrix[iv][0];\n sizeset[1]+=currentMatrix[iv][1]*currentMatrix[iv][1];\n sizeset[2]+=currentMatrix[iv][2]*currentMatrix[iv][2];\n }\n if(!angle)angle=0;\n return Math.cos(angle)*size/Math.sqrt(sizeset[whichaxis]);\n };\n\n // ????????????????????????????????????? ?????????????????????????????????????\n //\n //\n //\n\n this.createObjWithDefaultAttributes=function(objtype, callee_arguments )\n {\n\n\n this.obj = document.createElementNS(this.elementSource, objtype);\n this.obj.currentMatrix = this.getCurrentFromArray(this.matrixArray);\n this.obj.currentInvertedMatrix = matrixInverse(this.getCurrentFromArray(this.matrixArray));\n //this.obj.id=this.getSVGID();\n //var handlers=this.getHandler();\n //alerJ(\"callee_arguments\",callee_arguments)\n// transferAttributes(this.obj,this.getHandler());\n\n if (this.styleNode && !this.styleNode.parentNode) {\n this.svg.insertBefore(this.styleNode, this.svg.firstChild);\n this.svg.appendChild(this.topGroupNode);\n }\n\n if (objtype!=\"image\"){\n classListAdd(this.obj, this.getPen());\n classListAdd(this.obj, this.getBrush());\n }\n\n if(objtype==\"text\"){\n classListAdd(this.obj, this.getFont());\n }\n\n if(callee_arguments) {\n var vargs=callee_arguments.callee.toString().match(/^[^\\(]+\\(([^\\)]*)\\)/)[1].split(/\\s*,\\s*/);\n\n var arg_crd, arg_width, arg_height;\n\n for( var ii=0; ii<vargs.length; ++ii) {\n if(vargs[ii].indexOf(\"crd\")==0){// || vargs[ii].indexOf(\"obj\")==0){\n // save untransformed coordinate for width/height calculation\n arg_crd = {x: callee_arguments[ii].x, y: callee_arguments[ii].y, z: callee_arguments[ii].z};\n for ( ff in callee_arguments[ii] ) {\n if (ff === \"z\") {\n // z not used in svg\n continue;\n }\n var currentCoordinate=callee_arguments[ii];\n if(currentCoordinate.x===undefined)currentCoordinate.x=0;if(currentCoordinate.y===undefined)currentCoordinate.y=0;if(currentCoordinate.z===undefined)currentCoordinate.z=0;\n currentCoordinate=matrixMultiplicationToVector(this.getCurrentFromArray( this.matrixArray ), currentCoordinate);\n if (this.transform) {\n currentCoordinate = this.transform(currentCoordinate);\n }\n var crd_attr_name = ff;\n if (objtype == \"circle\") {\n crd_attr_name = \"c\" + ff; // cx, cy\n }\n this.obj.setAttribute(crd_attr_name, vjSVGRoundPixel(currentCoordinate[ff]));\n }\n }\n else{//if(vargs[ii]===\"d\"){\n //alert(\"varg{ii } \" + vargs[ii])\n //alert(\"calle \" + callee_arguments[ii])\n if (vargs[ii] === \"d\" && callee_arguments[ii].indexOf(\"NaN\") !== -1) {\n //alert(\"calle NaN \" + callee_arguments[ii])\n continue;\n } else if (vargs[ii] === \"width\") {\n arg_width = callee_arguments[ii];\n continue;\n } else if (vargs[ii] === \"height\") {\n arg_height = callee_arguments[ii];\n continue;\n } else if (vargs[ii] === \"url\") {\n this.obj.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"href\", callee_arguments[ii]);\n continue;\n } else if (vargs[ii] === \"preserveAspectRatio\" && callee_arguments[ii] === undefined) {\n continue;\n } else if (vargs[ii] === \"objAttr\" || callee_arguments[ii] === undefined) {\n continue;\n } else {\n this.obj.setAttribute(vargs[ii], callee_arguments[ii]);\n //if (vargs[ii]===\"objID\") alert(callee_arguments[ii]);\n }\n //this.obj.setAttribute(vargs[ii],callee_arguments[ii]);\n if (vargs[ii]==\"d\"){\n var startCrd = callee_arguments[ii].split(\"L\")[0];\n var xCrd = startCrd.split(\",\")[0].split(\"M\")[1];\n var yCrd = startCrd.split(\",\")[1];\n this.obj.setAttribute(\"x\", vjSVGRoundPixel(parseFloat(xCrd)));\n this.obj.setAttribute(\"y\", vjSVGRoundPixel(parseFloat(yCrd)));\n }\n }\n }\n\n if (arg_width !== undefined) {\n var crd2 = matrixMultiplicationToVector(this.getCurrentFromArray(this.matrixArray), {x: arg_crd.x + arg_width, y: arg_crd.y, z: arg_crd.z});\n var width = crd2.x - parseFloat(this.obj.getAttribute(\"x\"));\n if (width >= 0) {\n this.obj.setAttribute(\"width\", vjSVGRoundPixel(width));\n } else {\n this.obj.setAttribute(\"width\", vjSVGRoundPixel(-width));\n this.obj.setAttribute(\"x\", vjSVGRoundPixel(parseFloat(this.obj.getAttribute(\"x\")) + width));\n }\n }\n\n if (arg_height !== undefined) {\n var crd2 = matrixMultiplicationToVector(this.getCurrentFromArray(this.matrixArray), {x: arg_crd.x, y: arg_crd.y + arg_height, z: arg_crd.z});\n var height = crd2.y - parseFloat(this.obj.getAttribute(\"y\"));\n if (height >= 0) {\n this.obj.setAttribute(\"height\", vjSVGRoundPixel(height));\n } else {\n this.obj.setAttribute(\"height\", vjSVGRoundPixel(-height));\n this.obj.setAttribute(\"y\", vjSVGRoundPixel(parseFloat(this.obj.getAttribute(\"y\")) + height));\n }\n }\n\n this.curGroupNode.appendChild(this.obj);\n }\n\n var handler=this.getHandler();\n for (var ii in handler){\n this.obj[ii] = function(funcname, obj) {return function(evt) {vjSVG_GIhandler(funcname, obj, evt);};}(handler[ii], this.obj);\n //'vjSVG_GIhandler(\\\"'+handler[ii]+'\\\",\\\"'+this.obj.id+'\\\",evt);');//,\\\"'+this.coordinates[0].irow+'\\\");'; //call whatever function from the wrapper\n }\n// if(callee_arguments) {\n// var vargs=callee_arguments.callee.toString().match(/^[^\\(]+\\(([^\\)]*)\\)/)[1].split(/\\s*,\\s*/);\n// //alert(vargs.length)\n// var flag=0;\n// var str=String(vargs);\n// var xText=0;\n// var yText=0;\n// if (str.search(\"text\")!=-1) flag=1;\n//\n// for( var ii=0; ii<vargs.length; ++ii) {\n//\n// if(vargs[ii].indexOf(\"obj\")==0 || vargs[ii].indexOf(\"crd\")==0){\n//\n// var suffix=vargs[ii].substring(3);\n// for ( ff in callee_arguments[ii] ) {\n// //alerJ(\"dd\",callee_arguments[ii])\n// var currentCoordinate=callee_arguments[ii];\n// if(!currentCoordinate.z)currentCoordinate.z=0;\n//\n// //alert(\"flag \"+ flag +\"ff: \" + ff +\" - \"+ ii + \" - \" + currentCoordinate.x + \" y \" + currentCoordinate.y)\n//\n// alerJ(\"matrix to transform element\",this.getCurrentFromArray( this.matrixArray ));\n// currentCoordinate=this.multipleMatrixToVector(this.getCurrentFromArray( this.matrixArray ), currentCoordinate);\n// alerJ(\"TRANSFORMED cordinates element in TRAJECTORY\",currentCoordinate);\n// if (flag==1) {\n// xText=currentCoordinate.x;\n// yText=currentCoordinate.y;\n// obj.setAttribute('x',xText);\n// obj.setAttribute('y',yText);\n//\n// }\n// else {\n// obj.setAttribute(ff+suffix,currentCoordinate);\n// }\n// //alerJ(ff+suffix + \" \" + callee_arguments[ii][ff]);\n// }\n//\n// }\n// if (flag==1 || callee_arguments[3]){\n// var transfo='rotate('+ callee_arguments[3] + \" \" + xText + \" \" + yText +\")\";\n// obj.setAttribute('transform',transfo);\n//\n// }\n// else obj.setAttribute(vargs[ii],callee_arguments[ii] );\n// }\n// this.curGroupNode.appendChild(obj);\n// }\n return this.obj;\n };\n\n // title & desc tags (added as children of graphical elements for tooltips and accessibility)\n this.setTitle = function(data) { return vjSVGSetTrivialChild(this.obj, \"title\", data, {unshift:true}); };\n this.clearTitle = function() { return vjSVGClearTrivialChildren(this.obj, \"title\"); };\n this.getTitle = function() { return vjSVGGetTrivialChild(this.obj, \"title\"); };\n this.setDesc = function(data) { return vjSVGSetTrivialChild(this.obj, \"desc\", data); };\n this.clearDesc = function() { return vjSVGClearTrivialChildren(this.obj, \"desc\"); };\n this.getDesc = function() { return vjSVGGetTrivialChild(this.obj, \"desc\"); };\n this.setNewAttribute = function(ObjAttribute) { // ObjAttribute={newTag:argument}\n if (ObjAttribute.length) return;\n //alert(\"new\")\n var keys = Object.keys(ObjAttribute);\n for (var e=0;e<keys.length;e++){\n var tag = keys[e];\n var value = ObjAttribute[tag];\n this.obj.setAttribute(tag,value);\n }\n //this.obj.setAttribute\n }\n // container for grouping elements together\n this.group=function(objID)\n {\n return this.createObjWithDefaultAttributes(\"g\", arguments);\n };\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/ PATH function\n // _/_/_/_/_/_/_/_/_/_/_/\n\n this.path=function(d, objID)\n {\n return this.createObjWithDefaultAttributes( 'path',arguments );\n };\n\n this.trajectory=function(coordinates,closed, lineCmd, objID)\n {\n //alerJ(\"debug point 1 \", this.getCurrentFromArray( this.matrixArray ))\n //alerJ(\"cor \",coordinates)\n if(!lineCmd)lineCmd='L';\n var argCord=1;\n switch (lineCmd) {\n case 'S':\n case 's':\n case 'Q':\n case 'q':\n case 'SR':\n case 'sR':\n case 'QR':\n case 'qR':\n argCord = 2;\n break;\n case 'C':\n case 'c':\n case 'CR':\n case 'cR':\n argCord = 3;\n break;\n default:\n argCord = 1;\n }\n\n var d=\"\";\n d+=\"M\";\n coordinates[0].x=parseFloat(coordinates[0].x);\n coordinates[0].y=parseFloat(coordinates[0].y);\n coordinates[0].z=parseFloat(coordinates[0].z);\n if (isNaN(coordinates[0].z))\n coordinates[0].z = 0;\n currentCoordinate=matrixMultiplicationToVector(this.getCurrentFromArray( this.matrixArray ), coordinates[0]);\n// if(__getEnvironment()==\"mobile\") {\n// console.log(e.clientX,e.clientY);\n// sessionStorage.setItem(\"coords\",currentCoordinate);\n// }\n if (this.transform) {\n currentCoordinate = this.transform(currentCoordinate);\n }\n d+=vjSVGRoundPixel(currentCoordinate.x)+\",\"+vjSVGRoundPixel(currentCoordinate.y) +\" \";\n ic=0;\n for(var ic=1; ic<coordinates.length; ic+=argCord) {\n\n d+=lineCmd;//.substring(0, 1);\n for(var il=0;il<argCord && il+ic<coordinates.length;il++){\n coordinates[ic+il].x=parseFloat(coordinates[ic+il].x);\n coordinates[ic+il].y=parseFloat(coordinates[ic+il].y);\n coordinates[ic+il].z=parseFloat(coordinates[ic+il].z);\n if (isNaN(coordinates[ic+il].z))\n coordinates[ic+il].z = 0;\n\n currentCoordinate=matrixMultiplicationToVector(this.getCurrentFromArray( this.matrixArray ), coordinates[ic+il]);\n if (this.transform) {\n currentCoordinate = this.transform(currentCoordinate);\n }\n /*if (currentCoordinate.x == \"NaN\" ) {\n alert(\"attention \" + \" x \" + currentCoordinate.x + \" y \" + currentCoordinate.y)\n alert(\" x Na: \" + coordinates[ic+il].x + \"/ y: \" + coordinates[ic+il].y + \"/ z: \" + coordinates[ic+il].z + \"/\" )\n }*/\n d+=vjSVGRoundPixel(currentCoordinate.x)+\",\"+vjSVGRoundPixel(currentCoordinate.y) +\" \";\n// if(lineCmd.indexOf(\"R\")!=-1){\n// if(il>=argCord)argCord=1;\n// lineCmd=\"T\";\n// }\n }\n\n }\n var remainCoord=(coordinates.length-1)%argCord;\n for(var i=0; i<remainCoord;++i){\n currentCoordinate=matrixMultiplicationToVector(this.getCurrentFromArray( this.matrixArray ), coordinates[coordinates.length-1]);\n if (this.transform) {\n currentCoordinate = this.transform(currentCoordinate);\n }\n d+=vjSVGRoundPixel(currentCoordinate.x)+\",\"+vjSVGRoundPixel(currentCoordinate.y) +\" \";\n }\n if(closed==1)d+=\"Z\";\n //alert(d)\n return this.path(d, objID);\n };\n\n\n this.point=function(crd,objID)\n {\n return this.createObjWithDefaultAttributes( 'point', objID );\n };\n\n\n this.text=function(crd,objAttr)//text,isVertical,angle)\n {\n var obj = this.createObjWithDefaultAttributes('text', arguments);\n obj.textContent = objAttr.text;\n if (objAttr.angle)\n obj.setAttribute('transform',\"rotate(-\"+ objAttr.angle + \" \" + obj.attributes.x.value + \" \" + obj.attributes.y.value +\")\");\n var setAttrs = [\"dx\", \"dy\", \"text-anchor\"];\n for (var i=0; i<setAttrs.length; i++)\n if (objAttr[setAttrs[i]])\n obj.setAttribute(setAttrs[i], objAttr[setAttrs[i]]);\n if (objAttr.ellipsizeWidth) {\n var trimmed = false;\n for (var i=1; i<=objAttr.text.length; i++) {\n if (this.scaleSize(obj.getComputedTextLength(),0,objAttr.angle) <= objAttr.ellipsizeWidth)\n break;\n obj.textContent = objAttr.text.substring(0, (objAttr.text.length-i)/2) + \"...\" + objAttr.text.substring((objAttr.text.length+i)/2, objAttr.text.length);\n trimmed = true;\n }\n if(objAttr.title === undefined && trimmed) {\n var auto_title = document.createElementNS(\"http://www.w3.org/2000/svg\",\"title\");\n auto_title.textContent = objAttr.text;\n obj.appendChild(auto_title);\n }\n }\n return obj;\n };\n\n\n this.image=function(crd, url, width, height, preserveAspectRatio) {\n return this.createObjWithDefaultAttributes('image', arguments);\n };\n\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/ Line\n // _/_/_/_/_/_/_/_/_/_/_/\n this.line=function(crd1,crd2,Cmd,objID)\n {\n var crdList = new Array();\n if (!crd1.z) crd1.z=0;\n if (!crd2.z) crd2.z=0;\n crdList.push(crd1,crd2);\n return this.trajectory(crdList,1,Cmd,objID);\n };\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/ Regular Polygon\n // _/_/_/_/_/_/_/_/_/_/_/\n this.regularpolygon=function(crd,radius,npoint,objID)\n {\n var tetha=(2*Math.PI)/npoint;\n var crdList = new Array();\n if((\"\"+radius).indexOf(\"px\")!=-1){\n //alerJ(parseInt(radius)+ \" / \" + this.scaleSize(parseInt(radius)),this.getCurrentFromArray( this.matrixArray ));\n radius=this.scaleSize(parseInt(radius));\n }\n\n for (var p=0;p<npoint;p++)\n {\n tethanew=tetha*p+tetha/2;\n var point={\"x\":crd.x+radius*Math.cos(tethanew),\"y\":crd.y+radius*Math.sin(tethanew)};\n crdList.push(point);\n }\n this.trajectory(crdList,1,\"L\",objID);\n return crdList;\n };\n\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/Regular Star\n // _/_/_/_/_/_/_/_/_/_/_/\n\n this.regularstar=function(crd,radius,npoint,objID)\n {\n var obj=0;\n var tetha = (2 * Math.PI) / npoint;\n var crdList = new Array();\n var odd = new Array();\n var even = new Array();\n if ((\"\" + radius).indexOf(\"px\") != -1) {\n // alerJ(parseInt(radius)+ \" / \" +\n // this.scaleSize(parseInt(radius)),this.getCurrentFromArray(\n // this.matrixArray ));\n radius = this.scaleSize(parseInt(radius));\n }\n for ( var p = 0; p < npoint; p++) {\n var tethanew = tetha * p;\n var point = new Object();\n point.x = crd.x + radius * Math.cos(tethanew);\n point.y = crd.y + radius * Math.sin(tethanew);\n if (p % 2 == 0) {\n odd.push(point);\n } else {\n even.push(point);\n }\n }\n if (npoint % 2 == 0) {\n this.trajectory(odd, 1);\n obj=this.trajectory(even, 1,\"L\",objID);\n } else {\n crdList = odd.concat(even);\n // alerJ('crdListStar',crdList)\n obj=this.trajectory(crdList, 1,\"L\",objID);\n }\n return obj;\n };\n\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/ Ellipse with rotation\n // _/_/_/_/_/_/_/_/_/_/_/\n this.ellipse = function(crd, shortRadius, longRadius, rotationDegree,objID) {\n if (!rotationDegree)\n rotationDegree = 0;\n var npoint = 1000;\n var tetha = (2 * Math.PI) / npoint;\n var crdList = new Array();\n var alpha = (rotationDegree * Math.PI) / (180);\n for ( var p = 0; p < npoint; p++) {\n tethanew = tetha * p;\n var oldx = shortRadius * Math.cos(tethanew);\n var oldy = longRadius * Math.sin(tethanew);\n var point = {\n \"x\" : crd.x + (oldx) * Math.cos(alpha) - oldy * Math.sin(alpha),\n \"y\" : crd.y + oldy * Math.cos(alpha) + oldx * Math.sin(alpha)\n };\n crdList.push(point);\n }\n return this.trajectory(crdList, 1,\"L\",objID);\n };\n\n // _/_/_/_/_/_/_/_/_/_/_/\n // _/ Arc with rotation\n // _/_/_/_/_/_/_/_/_/_/_/\n this.arc=function(crd, startAngle, endAngle , rx ,ry, rotation, howToClose,objID )\n {\n var obj=0;\n startAngle = (startAngle*2*Math.PI)/(360);\n endAngle = (endAngle*2*Math.PI)/(360);\n if((\"\" + rx).indexOf(\"px\")!=-1){\n //alerJ(parseInt(radius)+ \" / \" + this.scaleSize(parseInt(radius)),this.getCurrentFromArray( this.matrixArray ));\n rx=this.scaleSize(parseInt(rx));\n }\n if((\"\" + ry).indexOf(\"px\")!=-1){\n //alerJ(parseInt(radius)+ \" / \" + this.scaleSize(parseInt(radius)),this.getCurrentFromArray( this.matrixArray ));\n ry=this.scaleSize(parseInt(ry));\n }\n\n var pointbegin1={\"x\":crd.x,\"y\":crd.y};\n if (!rotation) rotation=0;\n var alpha = (rotation*2*Math.PI)/(360);\n var crdList = new Array();\n crdList.push(pointbegin1);\n var noPoints = 100;\n for (var p=0;p<=noPoints;p++){\n var epsilon = p*(endAngle-startAngle)/noPoints;\n var oldx=rx*Math.cos(startAngle+epsilon);\n var oldy=ry*Math.sin(startAngle+epsilon);\n var pointbegin={\"x\":crd.x+oldx*Math.cos(alpha)- oldy*Math.sin(alpha),\"y\":crd.y+oldy*Math.cos(alpha)+oldx*Math.sin(alpha)};\n crdList.push(pointbegin);\n }\n if (howToClose=='segment') {\n obj=this.trajectory(crdList,1,\"L\",objID);\n }\n else if (howToClose=='open'){\n crdList.shift(pointbegin1);\n obj=this.trajectory(crdList,0,\"L\",objID);\n }\n else if (howToClose=='closed'){\n crdList.shift(pointbegin1);\n obj=this.trajectory(crdList,1,\"L\",objID);\n }\n return obj;\n };\n\n this.circle = function(crd, r, objID)\n {\n if((\"\" + r).indexOf(\"px\")!=-1){\n r = vjSVGRoundPixel(this.scaleSize(parseInt(rx)));\n }\n\n return this.createObjWithDefaultAttributes('circle', arguments);\n };\n\n\n // _/_/_/_/_/_/_/_/_/_/_/_/\n // _/\n // _/ Set the default elements into Stack of Attributes and Matrixes\n // _/\n // _/_/_/_/_/_/_/_/_/_/_/_/\n\n this.setBrush (DefaultBrush, true);\n this.setPen(DefaultPen, true);\n this.setFont(DefaultFont, true); //weight:bold / style:italic\n this.sizeXYZ=DefaultsizeXYZ;\n\n // unitary matrix ... etc\n /*vjUnitMatrix = new Array ( [1, 0 , 0 , 0] ,\n [0, 1 , 0 , 0] ,\n [0, 0 , 1 , 0] ,\n [0, 0 , 0 , 1] );\n */\n //this.pushArray(this.matrixArray, vjUnitMatrix );\n this.is3d = (model=='3d') ? true : false ; // can be 2d or 3d\n\n this.symbolCoordinates=new Object();\n this.symbolCoordinates['star']=[{mode:'regularstar', n:5, size:\"10px\"}];\n this.symbolCoordinates['circle']=[{mode:'circle'}];\n this.symbolCoordinates['rectangle']=[{mode:'regularpolygon', npoint:4, size:\"10px\"}];\n this.symbolCoordinates['plus']=[{mode:'line', crd1:{x:-0.5, y:0}, crd2:{x:0.5, y:0}, size:\"10px\"},\n {mode:'line', crd1:{x:0, y:-0.5}, crd2:{x:0, y:0.5}, size:\"10px\"}];\n this.symbolCoordinates['box-minus']=[{mode:'regularpolygon', npoint:4, size:\"10px\"},\n {mode:'line', crd1:{x:-0.5, y:0}, crd2:{x:0.5, y:0}, size:\"10px\"}];\n this.symbolCoordinates['box-plus']=[{mode:'regularpolygon', npoint:4, size:\"10px\"},\n {mode:'line', crd1:{x:-0.5, y:0}, crd2:{x:0.5, y:0}, size:\"10px\"},\n {mode:'line', crd1:{x:0, y:-0.5}, crd2:{x:0, y:0.5}, size:\"10px\"}];\n this.symbolCoordinates['arrowhead']=[{mode:'closed-trajectory', coordinates:[{x:0,y:-0.3}, {x:0.4,y:-0.5}, {x:0,y:0.5}, {x:-0.4,y:-0.5}]}];\n\n this.symbol=function(definition,crd,_size,objID,isUnscaled)\n {\n this.setAspectPreservingMatrix(crd, false, isUnscaled);\n\n var g = null;\n if (this.symbolCoordinates[definition].length > 1) {\n // If we have a compound symbol, append its parts to a <g> group\n g = this.group();\n var old_svg = this.curGroupNode;\n this.curGroupNode = g;\n }\n\n for (var i=0; i<this.symbolCoordinates[definition].length; i++) {\n var librarySymbol=this.symbolCoordinates[definition][i];\n\n var size = _size ? _size : librarySymbol.size;\n if (librarySymbol.mode=='regularstar') {\n var npoint=librarySymbol.n;\n //alerJ(\"crdSTAR\",crd)\n this.regularstar(crd,size,npoint,objID);\n }\n\n else if(librarySymbol.mode=='arc') {\n this.arc(crd, librarySymbol.startAngle, librarySymbol.endAngle , size ,size, librarySymbol.rotation, librarySymbol.howToClose,objID);\n }\n\n else if(librarySymbol.mode=='circle') {\n this.circle(crd, size, objID);\n }\n\n else if(librarySymbol.mode=='regularpolygon') {\n //alerJ(\"crd\",crd)\n this.regularpolygon(crd, size, librarySymbol.npoint,objID);\n }\n\n else if(librarySymbol.mode=='line') {\n this.line({x: crd.x + librarySymbol.crd1.x * size, y: crd.y + librarySymbol.crd1.y * size}, {x: crd.x + librarySymbol.crd2.x * size, y: crd.y + librarySymbol.crd2.y * size}, undefined, objID);\n }\n\n else if(librarySymbol.mode=='closed-trajectory') {\n var coordinates = [];\n for (var ic=0; ic<librarySymbol.coordinates.length; ic++) {\n coordinates.push({\n x: crd.x + librarySymbol.coordinates[ic].x * size,\n y: crd.y + librarySymbol.coordinates[ic].y * size\n });\n }\n this.trajectory(coordinates, true, undefined, objID);\n }\n /*else {\n var localCrds = new Array();\n for ( var ic=0; ic< librarySymbol.coordinates.length; ++ic) {\n localCrds[ic].x=parseInt(librarySymbol.coordinates[ic].*size/100);\n localCrds[ic].y=parseInt(librarySymbol.coordinates[ic].*size/100);\n localCrds[ic].z=parseInt(librarySymbol.coordinates[ic].*size/100);\n }\n this.trajectory(localCrds,librarySymbol.closed, librarySymbol.lineCmd)\n }*/\n }\n\n // If we are returning a compound symbol in a <g> group, we need to restore obj\n // and svg fields to their values after this.group() was called\n if (g) {\n this.obj = g;\n this.curGroupNode = old_svg;\n }\n\n this.popMatrix();\n return this.obj;\n };\n}", "title": "" }, { "docid": "f0ddf1a11700f64da6df1eebd47890fd", "score": "0.44849563", "text": "function MG_Renderer() {\n this.blueButtonControl = new MG_ButtonControl(blueButton, 'blue');\n this.redButtonControl = new MG_ButtonControl(redButton, 'red');\n this.yellowButtonControl = new MG_ButtonControl(yellowButton, 'yellow');\n this.greenButtonControl = new MG_ButtonControl(greenButton, 'green');\n this.buzzerClip = framework.audio.open('buzzer.wav');\n}", "title": "" }, { "docid": "2ee72a058c5d0bf60d66cb879ed9feaf", "score": "0.44801658", "text": "function oCreerCanvas(){return document.createElement(\"canvas\")}", "title": "" }, { "docid": "061d5a152bfcb2d100ec9237ed7db4e7", "score": "0.44636413", "text": "_draw() {\n\n // call _draw or just _drawEl @ Shape depending if there is `shape`\n var methodName = (this._props.isWithShape) ? '_draw' : '_drawEl';\n Shape.prototype[methodName].call(this);\n }", "title": "" } ]
0467ebb89657ad469e0a1613736a33de
check the current playing status
[ { "docid": "903460ca05789072d28b7d38c6bc0146", "score": "0.7120831", "text": "function checkCurrentPlayPauseStatus(callback) {\n\twithGpmTab(function (tab) {\n\t\tchrome.tabs.executeScript(tab.id, {code: 'checkCurrentPlayPauseStatus();'}, function (result) {\n\t\t\tcallback(result);\n\t\t});\n\t});\n}", "title": "" } ]
[ { "docid": "4062c82512fc4d56769ac5910aa97bbc", "score": "0.7951515", "text": "function checkStatus() {\n player.getCurrentState().then(state => {\n if(!state) return;\n if(!state.track_window.next_tracks.length) enque();\n });\n }", "title": "" }, { "docid": "bf2f9674cd3a514281cf602e8fd65bef", "score": "0.74493027", "text": "function checkStatus() {\n if (!isPlaying && time === 0) {\n message.innerHTML = \"Game Over!\";\n score = -1;\n }\n}", "title": "" }, { "docid": "cbc34983b1a1d5e2d6dde2f13baccc46", "score": "0.73705804", "text": "checkPlayable() {\n const state = this._state;\n if (state.status === AudioPlayerStatus.Idle || state.status === AudioPlayerStatus.Buffering)\n return false;\n // If the stream has been destroyed or is no longer readable, then transition to the Idle state.\n if (!state.resource.readable) {\n this.state = {\n status: AudioPlayerStatus.Idle,\n };\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "eb30e6fb0b75e3021e8907e47f431d92", "score": "0.73329854", "text": "function checkGameStatus() {\n\tif (matchedCards.length == totalCards.length){\n\t\twindow.clearInterval(t);\n\t\taudioObj.start.stop();\n\t\taudioObj.finish.play();\n\t\tmodalPopupView.init();\n\t}\n}", "title": "" }, { "docid": "a6f17bee19f4a17249d39ae99a72514e", "score": "0.71595484", "text": "isPlaying() {\n return !(this.player.paused || this.client.paused);\n }", "title": "" }, { "docid": "4fae156cbf6589f16cb86c834b3a0297", "score": "0.7153639", "text": "get isPlaying() {}", "title": "" }, { "docid": "c60c65d68c1aa6b75ccb5ccb6a9649fe", "score": "0.709039", "text": "function check_status() {\n if (current_status.includes('running') || current_status.includes('saving')) ws_update_status();\n else stop_status_interval();\n}", "title": "" }, { "docid": "7a01bf0ee7ac47bd9f93fba031e60d6d", "score": "0.69962037", "text": "function checkStart() {\n console.log(ytplayer.getPlayerState());\n if (ytplayer.getPlayerState() >= 1 && ytplayer.getPlayerState() != 2)\n if (ytplayer.getCurrentTime() >= startTime()) {\n // Display the player and resume the volume\n $('#ytPlayer').css('visibility', 'visible');\n ytplayer.setVolume(volume);\n clearInterval(intervalCode);\n }\n}", "title": "" }, { "docid": "ebfb1ad2982de608dd68b4ed7f1cb032", "score": "0.69418806", "text": "static get isPlaying() {}", "title": "" }, { "docid": "77574ec71290ede8eeac66fb4ae5e3f3", "score": "0.69385415", "text": "isPlaying() {\n if (this.howl) {\n return this.howl.playing();\n }\n return false;\n }", "title": "" }, { "docid": "465d80c6306cdc1946e783cfc18e6354", "score": "0.69023913", "text": "static get STATE_PLAY() {return 0}", "title": "" }, { "docid": "8c66066ae6afa18b211975fa32382449", "score": "0.68419874", "text": "function checkPlayStatus() {\n // if the song is not currently playing\n if (!song.isPlaying()) {\n loop(); // start looping the draw function again with a rate equal to the windows fps\n song.play(); // start the song\n\n UpdateSliderTime = setInterval(checkSongTime, 100); // start checking the song time every 100ms\n ChangePlayStatus = 'Pause'; // change button text\n } else { // else the song has been paused\n song.pause(); // pause the song\n noLoop(); // stop looping the draw function\n ChangePlayStatus = 'Resume'; // change button text\n clearInterval(UpdateSliderTime); // stop running the checkSongTime function every 100ms\n }\n\n // set button text depending on whether the song is playing or not\n SongButton.innerHTML = ChangePlayStatus;\n}", "title": "" }, { "docid": "ade57494ce15c2a794b94a5023778fdf", "score": "0.683133", "text": "get state() {\n const playing = Array.from(this._players).some(([_, player]) => player.state === \"started\");\n return playing ? \"started\" : \"stopped\";\n }", "title": "" }, { "docid": "311ea9f02c34e474fb473dcf938bc944", "score": "0.6818978", "text": "function checkStatus() {\n if (!isPlaying && time === 0) {\n message.style.color = \"red\";\n message.innerHTML = \"Game Over!\";\n //Set the highscore\n if (score > localStorage.getItem(\"highscore\")) {\n highScore = score;\n localStorage.setItem(\"highscore\", highScore);\n }\n //Call function to set the high score.\n setHighScore();\n score = -1;\n }\n}", "title": "" }, { "docid": "f14118c0951f859acde767d183068769", "score": "0.6814563", "text": "static set isPlaying(value) {}", "title": "" }, { "docid": "f4a7c1df4587e06ed1b807f7afbf11b4", "score": "0.68086094", "text": "function gameStatus() {\n\t\t// check if user has lost\n\t\tif (userScore > randomNumber) {\n\t\t\tlosses++;\n\t\t\tloseSound.play();\n\t\t\tconsole.log(\"user lost\");\n\t\t\tsetVariables();\n\t\t}\n\n\t\t// check if user has won\n\t\tif (userScore == randomNumber) {\n\t\t\twins++;\n\t\t\twinSound.play();\n\t\t\tconsole.log(\"user won\");\n\t\t\tsetVariables();\n\t\t}\n\t}", "title": "" }, { "docid": "eb28409a465dfadb6f51ba97333d0f30", "score": "0.67938477", "text": "function checkStatus(character){ \n if(character.live==false){\n character.changeAnimation('dead');\n character.dying-=1;\n reviveAfterMusic(character);\n\n }\n if(character.live==false && character.liveNumber==0){\n gameConfig.status=\"gameover\";\n mario_gameover.play();\n }\n\n}", "title": "" }, { "docid": "ee65cdd2b8d4397c2103569af7d997d2", "score": "0.67791486", "text": "function checkStatus() {\n if (!gameActive && time === 0) {\n status.innerHTML = \"Game Over!!\";\n status.style.color = \"rgb(180, 0, 0)\";\n }\n}", "title": "" }, { "docid": "84a8184d859c06e964f8446514a2647a", "score": "0.67728394", "text": "function updateStatus() {\n getState(function(error, playerState) {\n if (error) {\n logger.error(error);\n } else {\n // Check if player stopped by itself\n if (state.properties.state === \"playing\" && state.properties.intendedState === \"playing\" && playerState === \"stopped\") {\n state.set(\"intendedState\", \"paused\");\n state.trigger(\"endOfTrack\");\n }\n state.set(\"state\", playerState);\n if (playerState !== \"paused\" && playerState !== \"stopped\") {\n getTrackId(function(error, trackId) {\n if (error) {\n logger.error(error);\n } else {\n // Check if player automatically went to the next track\n if (state.properties.track.id !== trackId) {\n if (state.properties.intendedState === \"playing\") {\n Spotify.pause(function() {\n state.trigger(\"endOfTrack\");\n });\n }\n }\n }\n });\n getProgress(function(error, progress) {\n if (!error && progress !== \"missing value\") {\n state.set(\"progress\", progress);\n }\n });\n }\n }\n });\n}", "title": "" }, { "docid": "b9cf8b6694955a431ca81b01083b488b", "score": "0.67701465", "text": "isPlaying() {\r\n return this._playing;\r\n }", "title": "" }, { "docid": "7313c56302014480d739628e450b8561", "score": "0.67616725", "text": "get isPlaying() {\r\n return $(\"#phrase .letter.hide\").length !== 0 && // Check if player hasn't won\r\n this.missed < this.totalHearts; // and hasn't lost\r\n }", "title": "" }, { "docid": "318d8313a71ace8d021eec2161fbb847", "score": "0.67528516", "text": "get state() {\n const playing = Array.from(this._players).some(([_, player]) => player.state === \"started\");\n return playing ? \"started\" : \"stopped\";\n }", "title": "" }, { "docid": "26fb1734a9d683c2ad47de98e34da780", "score": "0.6728866", "text": "function isPlaying() {\n return !audio.paused;\n }", "title": "" }, { "docid": "2e37814616511518e1ec16103402c4d4", "score": "0.6687028", "text": "function gameCheck() {\n if (player1HP <= 0) {\n \tfinishSound.play();\n\t\t\t$('#player1Status').text('YOU LOSE!');\n \t$('#player2Status').text('YOU WIN!');\n \t$('#player1button').prop('disabled', true);\n \t$('#player2button').prop('disabled', true);\n } else if (player2HP <= 0) {\n\t\t\tfinishSound.play();\n\t\t\t$('#player1Status').text('YOU WIN!');\n \t$('#player2Status').text('YOU LOSE!');\n \t$('#player1button').prop('disabled', true);\n \t$('#player2button').prop('disabled', true);\n }\n }", "title": "" }, { "docid": "e0f00d223da3a42956c1e88beac9db35", "score": "0.66796505", "text": "function checkStatus() {\n\tif (score === target) {\n\t\twinCount++;\n\t\tnewGame();\n\t}\n\telse if (score > target) {\n\t\tlossCount++;\n\t\tnewGame();\n\t}\n\telse {\n\t\tnull;\n\t}\n}", "title": "" }, { "docid": "4690f09f5afc1b83a9021fb198586dee", "score": "0.6662743", "text": "function isPlaying() {\r\n return $player\r\n && $player.prop('currentTime') > 0\r\n && !$player.prop('paused')\r\n && !$player.prop('ended')\r\n && $player.prop('readyState') > 2;\r\n}", "title": "" }, { "docid": "346d7ae8313c24e69c23dc678882e98e", "score": "0.6655025", "text": "checkActivePlayer() {\n if (isMufasaActivePlayer) {\n this.#setActivePlayer(playerMufasa, playerScar, '#player-mufasa', '#player-scar', playerScar.playerActiveStateImage, playerMufasa.playerInactiveStateImage);\n } else {\n this.#setActivePlayer(playerScar, playerMufasa, '#player-scar', '#player-mufasa', playerMufasa.playerActiveStateImage, playerScar.playerInactiveStateImage);\n }\n }", "title": "" }, { "docid": "ab15b3980d6cbff6aa8faa809a4f60ce", "score": "0.66308916", "text": "isPlaying(_song) {\n return !_song.paused;\n }", "title": "" }, { "docid": "f9f78ff6b10f7c28b2a9cb4907333c86", "score": "0.6621581", "text": "function checkStatus(win) {\r\n\tif (!currentPhrase) {\r\n\t\treturn false\r\n\t}\r\n\tif (!isPlaying && tpyingGameTime === 0) {\r\n\t\tquoteDisplayElement.innerHTML = 'Perdu.';// quand le temps arrive à 0, le phrase se présent\r\n\t\tcurrentPhrase = null\r\n\t\tscoreTyping--; // et les points diminuent\r\n\t\tdocument.getElementById(\"score\").innerHTML = \"score<br>\" + scoreTyping + \" (\"+(scoreToWinTyping-scoreTyping)+\" score pour passer au test suivant)\"// la partie de points indique les points à ce moment et combien des points il faut pour gagner\r\n\t\tsetTimeout(function(){ renderNewQuote() }, 3000); // l'étape du jeu actuel est relancé, une autre phrase est généré\r\n\t}\r\n\telse if (isPlaying && win) {\r\n\t\tquoteDisplayElement.innerHTML = 'Bien joué!';// quand on finit dans le limit du temps, le phrase se présent\r\n\t\tcurrentPhrase = null\r\n\t\tscoreTyping++;// et les points augmentent\r\n\t\tdocument.getElementById(\"score\").innerHTML = \"score<br>\" + scoreTyping + \" (\"+(scoreToWinTyping-scoreTyping)+\" score pour passer au test suivant)\"\r\n\t\tif (scoreTyping >= scoreToWinTyping) {\r\n\t\t\trunCountriesGame(typingGameDifficulty) //si on gagne suffisament les points, le prochain jeu est lancé\r\n\t\t} else {\r\n\t\t\tsetTimeout(function(){ renderNewQuote() }, 3000);// si non il se repète encore pour le jeu actuel\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "a75e7d09465fa57526cb9e50f72c1412", "score": "0.65971744", "text": "function updatePlaying(){\n\t\tswitch(audio.getStatus()){\n\t\t\tcase MANABI.media.audioState.PLAYING:\n\t\t\t\tme.playing = true;\n\t\t\t\tbreak\n\t\t\tcase MANABI.media.audioState.PAUSED:\n\t\t\tcase MANABI.media.audioState.ENDED:\n\t\t\t\tme.playing = false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "844f2d02ee60c7bd2b39fd8d4c3895f9", "score": "0.65915996", "text": "static get playmodeStateChanged() {}", "title": "" }, { "docid": "6d0bb6d1cb5577c99ab56dad0a5eef95", "score": "0.6553867", "text": "paused() {\n return this.status != hdxStates.AV_RUNNING;\n }", "title": "" }, { "docid": "d003b013212c13502956aa171cf46192", "score": "0.6553485", "text": "function testSong(){\n var SonsPlaying = song.isPlaying();\n if ( SonsPlaying === false ){\n song.play();\n }\n if ( SonsPlaying === true ){\n flag = true;\n }\n}", "title": "" }, { "docid": "d5dc60c4071912a8d61ff53a81adf1b6", "score": "0.653343", "text": "set isPlaying(value) {}", "title": "" }, { "docid": "28cf653ce0221c90e7508f7c0ab4037d", "score": "0.65300226", "text": "function checkFinished() {\n if (ytplayer.getPlayerState() >= 1 && ytplayer.getPlayerState() != 2)\n if (ytplayer.getCurrentTime() >= endTime())\n ytplayer.pauseVideo();\n}", "title": "" }, { "docid": "aa01ab4b921d49b959dc1c476cf105f3", "score": "0.65253067", "text": "async onVidCanPlay() {\n let len = this.v[0].buffered.length;\n let total = 0;\n while (len--) total += this.v[0].buffered.end(len) - this.v[0].buffered.start(len);\n this.enabled = true;\n this.volumeBar.prop('disabled', false).val(this.v[0].volume * 100);\n if (!this.v[0].paused && this.au[0].currentSrc) this.au[0].play();\n if (!this.v[0].currentTime)\n this.navigateTo();\n if (settings.notifyLastTime && Player.TIMES && !this.notified)\n for (const k in Player.TIMES)\n if (typeof Player.TIMES[k].leftAt == 'undefined') delete Player.TIMES[k];\n else if (k == Player.KEY) {\n const onyes = e => {\n this.pinned = false;\n this.v[0].currentTime = Player.TIMES[k].leftAt;\n delete Player.TIMES[k];\n if (top == self)\n LocalStorage.set('lastTimeLeftAt', Player.TIMES, false);\n else\n top.postMessage({ request: 'removeTime', time: k }, '*');\n };\n const onno = e => {\n this.pinned = false;\n delete Player.TIMES[k];\n if (top == self)\n LocalStorage.set('lastTimeLeftAt', Player.TIMES, false);\n else\n top.postMessage({ request: 'removeTime', time: k }, '*');\n };\n const p = await new Prompt(onyes, onno, this.container).load();\n this.pinned = true;\n p.bigTitle.html(`Do you want to continue from where you left off ?`);\n p.subTitle.html(`You previously left this video at ${Assets.formatSecs(Player.TIMES[k].leftAt)}`);\n p.show();\n break;\n }\n\n this.notified = true;\n }", "title": "" }, { "docid": "62ba768bce47578b537653a2198b8b75", "score": "0.6517891", "text": "function pollCastStatus (state) {\n if (state.playing.location === 'chromecast') {\n state.devices.chromecast.status(function (err, status) {\n if (err) return console.log('Error getting %s status: %o', state.playing.location, err)\n state.playing.isPaused = status.playerState === 'PAUSED'\n state.playing.currentTime = status.currentTime\n update()\n })\n } else if (state.playing.location === 'airplay') {\n state.devices.airplay.status(function (status) {\n state.playing.isPaused = status.rate === 0\n state.playing.currentTime = status.position\n update()\n })\n }\n}", "title": "" }, { "docid": "1be2f13e62e6f99193e58bf93b54b992", "score": "0.6490811", "text": "function playTrue() {\r\n play = true;\r\n }", "title": "" }, { "docid": "30c5cb7f1bebcdf14db2005b60cf0779", "score": "0.6484115", "text": "function checkCurrentlyPlaying (){\n\tfor (let i in sonos){\n\t\tlet zone = sonos[i];\n\t\tzone.player.currentTrack(function(err, track){\n\t\t\tif (zone.track !== track.title){\n\t\t\t\tzone.track = track.title;\n\t\t\t\tevent.emit('changed', track.title);\n\t\t\t}\n\t\t})\n\t}\n}", "title": "" }, { "docid": "ca584ebf9db987db245b06bfdcb0de4c", "score": "0.6482673", "text": "function checkWinCondition() {\n if (cardsPaired === 8) {\n\n gameTimerStop(gameTimer);\n\n //win report\n showModal();\n }\n }", "title": "" }, { "docid": "2c13679595e019e2eb271098e4e72b81", "score": "0.64743227", "text": "get isPlaying() { return this._isPlaying; }", "title": "" }, { "docid": "13845f27ca1975ec34ecde80afd9ee42", "score": "0.6471017", "text": "getStatus() {\n // if every string in the word array equals guessedLetters then return true\n const finished = this.word.every((letter) => this.guessedLetters.includes(letter) || letter === ' ')\n\n // set currentStatus to failed, finished or playing\n if (this.remainingGuesses === 0) {\n this.currentStatus = 'failed'\n } else if (finished) {\n this.currentStatus = 'finished'\n } else {\n this.currentStatus = 'playing'\n }\n }", "title": "" }, { "docid": "0052f517fa6d343df81b3698e0eb6e09", "score": "0.64518595", "text": "function checkPlayerStatus(){\r\n if(player.health <= 0 && !win ){\r\n gameEnd = true;\r\n }\r\n}", "title": "" }, { "docid": "6ffecfd7edfd9351d4529a043ce14eb7", "score": "0.6431559", "text": "function playing() {\n return _playing;\n }", "title": "" }, { "docid": "6ffecfd7edfd9351d4529a043ce14eb7", "score": "0.6431559", "text": "function playing() {\n return _playing;\n }", "title": "" }, { "docid": "d0aa91473bc9a991d2a25b7224bc9f22", "score": "0.64273065", "text": "static get isPlayingOrWillChangePlaymode() {}", "title": "" }, { "docid": "c4eb6f38b53e65b70b59f6362be02723", "score": "0.64186186", "text": "function checkGameStatus () {\r\n\tnumTurns++; // count turn\r\n\t\r\n\t// check win\r\n\tif (checkWin()) {\r\n\t\tgameStatus = currentPlayer + \" wins!\";\r\n\t\tconsole.log(\"Game Status: \" + gameStatus); \r\n\t\treturn;\r\n\t}\r\n\t\r\n\tif (numTurns == 9) {\r\n\t\tgameStatus = \"Tie Game!\";\r\n\t\treturn; \r\n\t} // if\r\n\t\r\n\t// switch current player\r\n\tcurrentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\"); \r\n\t\r\n} // checkGameStatus", "title": "" }, { "docid": "15d1fd1339a1279abe318efd04456f4a", "score": "0.64050955", "text": "pollStatus() {\n // We're only interested in one gamepad, which is the first.\n this.gamepad = navigator.webkitGetGamepads && navigator.webkitGetGamepads()[0];\n\n if(!this.gamepad)\n return;\n\n // Don’t do anything if the current timestamp is the same as previous\n // one, which means that the state of the gamepad hasn’t changed.\n // The first check makes sure we’re not doing anything if the timestamps are empty or undefined.\n if (this.gamepad.timestamp && (this.gamepad.timestamp == Input.prevTimestamp)) {\n return\n }\n\n this.prevTimestamp = this.gamepad.timestamp;\n\n this.updateKeys();\n }", "title": "" }, { "docid": "5a4c4ec97839776eebf0a1e0a74d1d43", "score": "0.63630515", "text": "checkIsPaused() {\n if (this.isFinished) return;\n\n if (this.isPaused) {\n this.continueGame();\n } else {\n this.pauseGame();\n }\n\n this.isPaused = !this.isPaused;\n }", "title": "" }, { "docid": "8460b2f60f8a388b994cdcc76791a480", "score": "0.6347864", "text": "get_game_status() {\n if (this.game_play.get_game_status) {\n return this.game_play.get_game_status();\n }\n\n return undefined;\n }", "title": "" }, { "docid": "710f709a42943430fd3c6581a8ee839b", "score": "0.6337943", "text": "function checkPlayer() {\n \n}", "title": "" }, { "docid": "c0e78062df458c2fc628615e8b754035", "score": "0.63379145", "text": "get isPlaying() {\n return this.playing;\n }", "title": "" }, { "docid": "15831cd692ad6ceb4ef448c1a3ebc36c", "score": "0.632797", "text": "function checkGameStatus() {\r\n\tnumTurns++; //count turns\r\n\t\r\n\t// check for a win\r\n\tif (checkWin()) {\r\n\t\tgameStatus = currentPlayer + \" wins!\";\r\n\t}//check for tie\r\n\t\r\n\telse if (numTurns ==9){\r\n\t\tgameStatus = \"Tie Game!\";\r\n\t}\r\n\t\r\n\t//switch current player\r\n\tcurrentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\");\r\n\t\r\n\t// game is over\r\n\tif(gameStatus != \"\"){\r\n\t\tsetTimeout(function() {showLightBox(gameStatus, \"Game Over.\");}, 500);\r\n\t}\r\n\t\r\n}//checkGameStatus", "title": "" }, { "docid": "5be1381f186da07d424045733815252c", "score": "0.63246393", "text": "function checkStatus() {\n if (!isPlaying && time == 0) {\n message.innerHTML = \"Game Over Try again\";\n wordInput.value = \"\";\n score = 0;\n scoreDisplay.innerHTML = score;\n }\n}", "title": "" }, { "docid": "a5b8b5f3ba414430d0098b057c404247", "score": "0.6318485", "text": "get isPlaying() {\n return window._KOJI_FEED_SDK_IS_PLAYING;\n }", "title": "" }, { "docid": "c8e071437a476feb7aab0cb6f74770a2", "score": "0.63086283", "text": "function updatePlayStatusBtn() {\n toggleEl.textContent = this.paused ? '►' : '❚❚';\n }", "title": "" }, { "docid": "903688ad2e2e097bd5865eb9ff69a6e7", "score": "0.6296816", "text": "handlePlayerReady() {\n this.getStreamStatus();\n this.statusTimer = setInterval(this.getStreamStatus, TIMER_STATUS_UPDATE);\n }", "title": "" }, { "docid": "75cd8600a2b74f9292df75dd1aa2110f", "score": "0.6295414", "text": "function isPaused()\n{\n\tvar dummyTimestamp = new Date().getTime();\n\tvar ret;\n\tvar xhttp = new XMLHttpRequest();\n\txhttp.onreadystatechange = function() {\n\t\tif (xhttp.readyState == 4 && xhttp.status == 200) {\n\t\t\tvar data = xhttp.responseText;\n\t\t\tif( data == \"paused\" ){\n\t\t\t\tvar pa = 'pause';\n\t\t\t\tret = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar pl = 'play';\n\t\t\t\tret = false;\n\t\t\t}\n\t\t}\n\t};\n\txhttp.open(\"GET\", \"/replay/pause/control.txt\" + '?ts=' + dummyTimestamp, false);\n\txhttp.send();\n\treturn ret;\n}", "title": "" }, { "docid": "55f180f6fdeab21912ab83cbb9c544a3", "score": "0.62939376", "text": "gameIsWon() {\n this.pauseGame = true;\n this.winner = true;\n \n }", "title": "" }, { "docid": "b9fa0c759abaf4b592496a43be1531a7", "score": "0.62826455", "text": "function checkGameStatus() {\r\n\tnumTurns++; // iterate \r\n\t\r\n\t// check for a win\r\n\tif (checkWin()) {\r\n\t\tgameStatus = currentPlayer + \" wins!\";\r\n\t\tshowLightBox(\"Game Status:\", gameStatus);\r\n\t}\r\n\t\r\n\t// check for tie\r\n\tif (numTurns >= 9) {\r\n\t\tgameStatus = \" Tie Game\";\r\n\t\tshowLightBox(\"Game Status:\", gameStatus);\r\n\t} // numTurns\r\n\t\r\n\t// switch current player\r\n\tcurrentPlayer = (currentPlayer == \"X\") ? \"O\" : \"X\";\r\n\t\r\n} // checkGameStatus", "title": "" }, { "docid": "707df07ab2a1aa8b0b9e3cf8b3b616d5", "score": "0.6282193", "text": "async function checkStatus () {\n const curStatus = await readDoor()\n if (curStatus !== prevStatus) {\n prevStatus = curStatus\n logger.info('Door changed to ' + curStatus)\n const msg = (curStatus === DOOR_OPEN ? OPEN_MESSAGE : CLOSED_MESSAGE)\n // update and save the timestamp of the message\n const timestamp = await updateSlack(msg, prevMsgTimestamp)\n prevMsgTimestamp = timestamp\n }\n}", "title": "" }, { "docid": "0b8ebe5ecab6015e5967d84d4e29cbaa", "score": "0.62658954", "text": "function checkActive() {\n var here;\n if (active === undefined) {\n return false;\n }\n \n function playerHere(player) {\n return _.any(here, function (uuid) {\n return player === uuid;\n });\n }\n \n // make sure a challenger hasn't left\n if (active.player1 !== '' && active.player2 !== '') {\n here = main.uuids();\n \n if (!playerHere(active.player1) || !playerHere(active.player2)) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "05cf7ac1bf5b271333a67b175eb1bc4f", "score": "0.6265159", "text": "function gameStatusAI() {\n // check status after last AI shot\n if (aiChances === 0){\n if (userScore > aiScore){\n win = true;\n gameOver = true;\n } else if (aiScore > userScore){\n lose = true;\n gameOver = true;\n } else {\n userChances++;\n aiChances++;\n setTimeout (() => { \n ;playerScore.html(``);\n },1500);\n setTimeout (() => { \n ;machineScore.html(``);\n },1500);\n gameOver = false;\n }\n }\n\n // check status after any other shot\n if (aiChances > 0){\n // code during the first 4 shootouts\n if (userScore > aiScore && userScore - aiScore > aiChances){\n win = true;\n gameOver = true;\n } else if (aiScore > userScore && aiScore - userScore > userChances){\n lose = true;\n gameOver = true;\n }\n }\n return gameOver;\n }", "title": "" }, { "docid": "4c43b612d66976ac0186d3383d5d25ae", "score": "0.6259398", "text": "checkStatus() {\n let status_elm = this.ui_elements.statusUpdate;\n this.status.on('value', function (status_details) {\n let status_value = status_details.val();\n let status__tag = status_elm.getElementsByTagName(\"span\")[0];\n if (status_value === false) {\n status__tag.innerText = \"Waiting for bot to come online...\";\n } else {\n status__tag.innerText = status_value;\n }\n })\n }", "title": "" }, { "docid": "0156a2bef5e1392e4fc8db2df78aad55", "score": "0.62565684", "text": "function doWhat(statusNum){\n //console.log(statusNum);\n if(!isETPaused && statusNum == RESUME ){\n rememberToPause();\n isETPaused=true;\n }else if(isETPaused && statusNum == PAUSE){\n rememberToPlay();\n isETPaused=false;\n }else if(!isETPaused && statusNum == 5){\n rememberToPause();\n isETPaused=true;\n }else if(isETPaused && statusNum == 0){\n rememberToPlay();\n isETPaused=false;\n }else if(!isETPaused && statusNum == 3){\n rememberToPause();\n isETPaused=true;\n }else{\n }\n }", "title": "" }, { "docid": "685674779dfb904a6dc9a3374336e8f5", "score": "0.6247883", "text": "get isPlaying() {\n return this._audioext.isPlaying;\n }", "title": "" }, { "docid": "b8bf25de101120d66c4e50aa1334efb9", "score": "0.6234195", "text": "paused() {\n return this.checkBufferTimeout_ === null;\n }", "title": "" }, { "docid": "47ec0c9140363f275e122823c128d089", "score": "0.6230405", "text": "function check() {\n if (s!==\"play\" || !i || !a || !Bangle.CLOCK) return; // only launch app if we know which song we are playing, and autoLoad is enabled\n delete (i.t);\n // store info and launch music app\n require(\"Storage\").writeJSON(\"gbmusic.load.json\", {\n state: s,\n info: i,\n });\n load(\"gbmusic.app.js\");\n }", "title": "" }, { "docid": "45a1d23ddc412d8bcb5297025cfdfd99", "score": "0.6228857", "text": "pause() {\n if(this._gameStatus !== GAME_STATUS.WORK)\n return false;\n\n this._gameStatus = GAME_STATUS.PAUSE;\n return true;\n }", "title": "" }, { "docid": "950ccdf64b12ea598088eaff1c3c8209", "score": "0.6228666", "text": "function shouldPlay(currentTime){\n return (currentTime > visual.starttime) && ((currentTime < visual.tDeletion) || !visual.doesItGetDeleted) \n }", "title": "" }, { "docid": "ef02e9943895ae0aa99f5c60367f08cc", "score": "0.6206548", "text": "get isGamePlay(): boolean {\n return (\n !!this._rawEvent.game_play && typeof this._rawEvent.game_play === 'object'\n );\n }", "title": "" }, { "docid": "264a98bfe90da3c99a22a1de1967967e", "score": "0.6206087", "text": "function check() {\n if (currentTotal === goal) {\n wins++;\n $(\"#wins\").html(wins);\n startGame();\n } else if (currentTotal > goal) {\n losses++;\n $(\"#losses\").html(losses);\n startGame();\n } else {\n return;\n }\n }", "title": "" }, { "docid": "67bdecbc66b568d26a19c7635bd03838", "score": "0.62051153", "text": "function updateGameStatus() {\r\n\tvar winner = checkWinner(game.currPlayer.color);\r\n\t//either winner, tie game, or keep playing\r\n\tif (winner.length !== 0) {\r\n\t\thighlightWinningCells(winner);\r\n\t\tgame.currentlyPlaying = false;\r\n\t\tgame.winner = game.currPlayer;\r\n\t\tgame.currPlayer.wins++;\r\n\t} else if (isBoardFull()) {\r\n\t\tgame.currentlyPlaying = false;\r\n\t\tgame.tie = true;\r\n\t} else {\r\n\t\tinitiateNextMove();\r\n\t}\r\n\tupdateScoreBoard();\r\n}", "title": "" }, { "docid": "b04f6a559b935b950dd711bb6d0631d0", "score": "0.6177747", "text": "function checkGameStatus() {\n if (gameContinues == false) {\n //message.textContent = \"Game is Over, Start a New game\";\n\n aTimer.stop();\n gameOver();\n }\n if (guessLimit == 0) {\n gameContinues = false;\n message.textContent =\n \"You have used all 10 chances. Game is Over, Started a New game\";\n gameOver();\n newGame();\n }\n}", "title": "" }, { "docid": "79651c55de5dafc3c0999a65db7fe602", "score": "0.6153449", "text": "function checkStatus() {\n if (group === 'free_fitness_minsk') {\n return 'active';\n } else {\n return checkText(text) ? 'active' : 'noactive';\n }\n }", "title": "" }, { "docid": "04d61e82a6f1fd5633ee714a615e8d39", "score": "0.61528975", "text": "play() {\n if (this.status !== 'PLAY') {\n this.editor.focus();\n this.emit('play');\n this.playChanges();\n }\n }", "title": "" }, { "docid": "71d90dcfb952bcadfbd1a957f0284be9", "score": "0.6151439", "text": "function checkStatus() {\n\t\t\tTi.API.info('====================check status');\n\t\t\tif (!doinOurThing) {\n\t\t\t\t// access denied or something else was clicked\n\t\t\t\tif (!loading) {\n\t\t\t\t\tTi.API.info('----ACCESS DENIED!!!!----');\n\t\t\t\t\twebView.stopLoading();\n\t\t\t\t\twin.remove(webView);\n\t\t\t\t\twin.close();\n\n\t\t\t\t\tif(typeof(callback)=='function'){\n\t\t\t\t\t\tcallback(false);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tTi.API.info('cancel check status bc we are doin our thing');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6dc400040dd69dec2d8bd405ce87e749", "score": "0.614731", "text": "static get isPaused() {}", "title": "" }, { "docid": "f52da31de63795b569ef114783f4b6ad", "score": "0.6145048", "text": "isRunning() {\n return this.status === constants_1.STATUS_RUNNING;\n }", "title": "" }, { "docid": "d7f82b746b9cfc37d9be141f5a90513b", "score": "0.61427736", "text": "function ReadyLobby(){\n PlayerReady($('input.Active').prop('checked') == true ? false : true);\n}", "title": "" }, { "docid": "8b1cd22c47dc6d5f508a423046865675", "score": "0.6137484", "text": "function checkStatus() {\n var levelComplete = true;\n for (let i = 0; i <= $scope.game.htotal; i++) {\n for (let j = 0; j <= $scope.game.wtotal; j++) {\n if ($scope.rows[i][j].src == '../../assets/images/qmark.png' || $scope.rows[i][j].src == '../../assets/images/untouch.png' && $scope.rows[i][j].mine == false) {\n levelComplete = false;\n }\n }\n }\n if (levelComplete) {\n alert(\"You Win!\");\n $scope.face = {\n value: 3,\n src: '../../assets/images/face3.png'\n };\n $scope.leftc = '../../assets/images/d0.png';\n $scope.leftd = '../../assets/images/d0.png';\n $scope.leftu = '../../assets/images/d0.png';\n finishGame();\n }\n }", "title": "" }, { "docid": "1aeb97a30e516aa09a57e44a3e1dba7f", "score": "0.6120771", "text": "playerListStatus(status){\n let check = true;\n this.playerList.forEach(element => {\n if(element.status !== status)\n check = false;\n })\n return check;\n }", "title": "" }, { "docid": "4dc4a350acb103247a8cd3c2b6ca1d88", "score": "0.6115459", "text": "function playpausetoggle() {\n if (mediaControls.isPlaying === true) {\n mainAudio.pause();\n } else {\n mainAudio.play();\n }\n }", "title": "" }, { "docid": "fa803b32b1b7f82e8a00b18ed9449d7f", "score": "0.61094904", "text": "function checkWinningCondition() {\n if (matchedCardList.length === NUM_MATCH_TO_WIN) {\n // Player won\n console.log('won');\n // Stop timer\n if (null !== intervalId) {\n clearInterval(intervalId);\n }\n // Display the winning page\n displayWinningPage();\n }\n}", "title": "" }, { "docid": "9c51f8a25fe88254b163aabfe5c9564d", "score": "0.6095573", "text": "gameStatusUpdate(status){\n this.status = status;\n if(this.status === 'playing')\n this.playerList.forEach(element =>\n this.activePlayers.push(element.username)\n )\n }", "title": "" }, { "docid": "b0150667b56b4d2ba5755f3fafb84644", "score": "0.6083868", "text": "_updateVoteStatus() {\n\t\tif(this.currentSessionStatus !== 'isGameActive'){\n\t\t\t// if(this.clients.size === this.votedToBegin.length) {\n\t\t\t\t//should be comparing elements not just size here in case one player goes and another comes\n\t\t\t\t//lodash _.isEquals works\n\t\t\tif(this.clients.size === this.votedToBegin.size) { \n\t\t\t\tthis.currentSessionStatus = 'isWaitingToStart';\n\t\t\t\tthis.initGame();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.currentSessionStatus = 'isWaitingForPlayers';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "26a68b7bf2fd25dbd0e0767f807a4ca9", "score": "0.60810214", "text": "function checkAudioStatus() {\n for (var sound in this.sounds) {\n if (this.sounds.hasOwnProperty(sound) && this.sounds[sound].status === 'loading' && this.sounds[sound].readyState === 4) {\n assetLoaded(this, 'sounds', sound);\n }\n }\n }", "title": "" }, { "docid": "cc5e851ada63045c00fd348f998418bb", "score": "0.60803896", "text": "function GameStatus() {\n let status = [\n `Over ${client.users.size} Users! | n!help`,\n `Over ${client.channels.size} Channels! | n!help`,\n ];\n let rstatus = Math.floor(Math.random() * status.length);\n client.user.setActivity(status[rstatus], {\n \"type\": \"WATCHING\"\n });\n }", "title": "" }, { "docid": "d15e1f3a882e79db2551e31bfe239834", "score": "0.60719436", "text": "function get_player_state(ytplayer) {\r\n var state=-3; try { state=ytplayer.getPlayerState(); } catch(err) { state=-4; }\r\n //show_alert('Player State='+state,0);\r\n if(state<=-3) {\r\n show_alert('Media Controller warning : \"'+ytplayer.id+'\" state not available',0);\r\n if(ytplayer.getAttribute('mc_embedtype')==1) {\r\n // Check allowscriptaccess (must be 'always')\r\n var allowScript=ytplayer.getAttribute('allowscriptaccess');\r\n if(!(allowScript) || !(allowScript.match(/^always$/i))) {\r\n ytplayer.setAttribute('allowscriptaccess','always');\r\n show_alert('Media Controller Notice: Reloading the player \"'+ytplayer.id+'\" to allow script access');\r\n flushNode(ytplayer); // Flush it...\r\n }\r\n }\r\n }\r\n return state;\r\n}", "title": "" }, { "docid": "d1f6135d15b024828c6cb5be6ea9b0ac", "score": "0.60700595", "text": "function startStatusInterval () {\n statusInterval = setInterval(() => {\n const player = getPlayer()\n if (player) player.status()\n }, 1000)\n}", "title": "" }, { "docid": "ab02547036be48addf1658954eaacfb2", "score": "0.607004", "text": "get isPlayed() { return this._isPlayed; }", "title": "" }, { "docid": "7e0736d597b95732ef80c09410478d62", "score": "0.6068862", "text": "isActive () {\n return this.status === State.statuses.embedLib.ACTIVE\n }", "title": "" }, { "docid": "ead30348b815956b39adf9bd86386699", "score": "0.6067868", "text": "checkOnboarded() {\n return AsyncStorage.getItem(\"onboarding\")\n .then(status => {\n if (status == null) {\n return false;\n } else {\n return true;\n }\n })\n .catch(error => {\n throw error;\n });\n }", "title": "" }, { "docid": "1449b469af586216cf9e9ca410c6cb5d", "score": "0.6052658", "text": "static set isPlayingOrWillChangePlaymode(value) {}", "title": "" }, { "docid": "b436158978b948bb5c34a7dc82219e80", "score": "0.6052241", "text": "function check() {\n if (\n playersequence[playersequence.length - 1] !==\n sequence[playersequence.length - 1]\n )\n success = false; // if playersequence does not equal players last selection then player is incorrect\n\n if (playersequence.length == 10 && success) {\n // if player sequence equals cpu given sequence of '10' player wins game\n setTimeout(() => {\n sound10.play();\n }, 400); // 400 millisencond interval before sound plays\n playerWin();\n }\n\n if (success == false) {\n illumColor(); // button color in illuminated state\n scoreTracker.textContent = \"'Invalid Input Entered'\"; // displays text within semi colons is user makes mistake\n sound8.play();\n setTimeout(() => {\n scoreTracker.textContent = attempt;\n clearColor(); // button color in neutral state\n\n if (strict) {\n reset(); // restarts game if user makes a mistake\n } else {\n success = true;\n sharedVariables();\n }\n }, 800);\n\n sound = false;\n }\n\n if (attempt == playersequence.length && success && !win) {\n // if user light & button choice aligns with that of cpu user moves onto next round\n attempt++;\n\n setTimeout(() => {\n sound7.play();\n }, 400);\n sharedVariables();\n }\n}", "title": "" }, { "docid": "155bad0dba2e75bebbade47ec5640c8c", "score": "0.605181", "text": "function isPlaying() {\n for (var i=0, l=audios.length; i<l; i++)\n if (audios[i].isPlaying())\n return true;\n return false;\n }", "title": "" }, { "docid": "9b8bb45814e38f0bf22bf9292456dee3", "score": "0.6046869", "text": "function checkWin() {\n if (Math.floor(player.y / colUnit) == 0) {\n play = false;\n isWin = true;\n /* Show \"Play Again\" button with winning message. */\n var btn = doc.getElementById(\"play\");\n btn.style.display = \"block\";\n }\n\n }", "title": "" }, { "docid": "7141a2540b710daa8e3b6abcb9617f21", "score": "0.60420877", "text": "function checkResult(){ \n if(!APPDATA['on'])\n return;\n $('.btn').css('pointer-events', 'none');\n var matched = true;\n if(APPDATA['playerList'].length !== APPDATA['myList'].length)\n matched = false;\n else{\n for(var i = 0; i < APPDATA['myList'].length; i++)\n if(APPDATA['playerList'][i] != APPDATA['myList'][i]){\n matched = false;\n break;\n }\n }\n if(!matched){\n if(APPDATA['strict']){\n showMsg('Lost!!', 1000);\n chqTime = setTimeout(function(){APPDATA.startGame();}, 1000);\n }\n else{\n showMsg('Wrong!!', 500);\n chqTime = setTimeout(function(){showMoves();}, 500);\n } \n }\n else\n increaseCounter();\n}", "title": "" }, { "docid": "37c86ad6cab7f27c8ec8293444fa6ccc", "score": "0.60370266", "text": "function checkGameStatus(){\r\n\tnumTurns++;\r\n\r\n\t// check for a win\r\n\tif(checkWin()){\r\n\t\tgameStatus = currentPlayer + \" wins!\";\r\n\t\treturn;\r\n\t}\r\n\r\n\r\n\t// check for tie\r\n\tif(numTurns == 9){\r\n\t\t\tgameStatus = \"Tie Game\";\r\n\t }\r\n\r\n\t //switch current players\r\n\t currentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\");\r\n\r\n} // checkGameStatus", "title": "" }, { "docid": "1970a3650e2fff1ae4ff455d1ec8a07e", "score": "0.60332495", "text": "function updatePause () {\n if ($(\"#pause-button\").text().match(/play/)) { // if we're playing right now\n console.log(\"pausing\");\n $(\"#pause-button\").html(\"paused\");\n window.pauseState = \"pause\"\n } else if ($(\"#pause-button\").text().match(/pause/)) { // if we're paused right now\n console.log(\"playing\");\n $(\"#pause-button\").html(\"playing\");\n window.pauseState = \"play\"\n }\n}", "title": "" } ]
fad714ae933081605bd202723c9a7190
Determine whether the given properties match those of a `CfnLabelProps`
[ { "docid": "0f2671b2e645cdf9bf39b65a53c99fbf", "score": "0.6996929", "text": "function CfnLabelPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnLabelProps\"');\n}", "title": "" } ]
[ { "docid": "656318d2e928fc97bd1fd6166faf7bbf", "score": "0.6729075", "text": "function CfnDetector_LabelPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('arn', cdk.validateString)(properties.arn));\n errors.collect(cdk.propertyValidator('createdTime', cdk.validateString)(properties.createdTime));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('inline', cdk.validateBoolean)(properties.inline));\n errors.collect(cdk.propertyValidator('lastUpdatedTime', cdk.validateString)(properties.lastUpdatedTime));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"LabelProperty\"');\n}", "title": "" }, { "docid": "d1db966262a1f9f8e856eb09a1fc7fcc", "score": "0.61821705", "text": "matches(text, props) {\n for (var key in props) {\n if (key === 'text') {\n continue;\n }\n\n if (!text.hasOwnProperty(key) || text[key] !== props[key]) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "8d38677626f4285dfcba747c89d0a7e8", "score": "0.60480076", "text": "function CfnEventType_LabelPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('arn', cdk.validateString)(properties.arn));\n errors.collect(cdk.propertyValidator('createdTime', cdk.validateString)(properties.createdTime));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('inline', cdk.validateBoolean)(properties.inline));\n errors.collect(cdk.propertyValidator('lastUpdatedTime', cdk.validateString)(properties.lastUpdatedTime));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"LabelProperty\"');\n}", "title": "" }, { "docid": "5044c2d3e73cf0b4a9d53e2260b2db86", "score": "0.5960662", "text": "matches(text, props) {\n for (var key in props) {\n if (key === 'text') {\n continue;\n }\n\n if (text[key] !== props[key]) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "e563cbcf2746170bbefe8bf7625d855e", "score": "0.58796805", "text": "function propExists(prop) {\n var uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1),\n props = ( prop + \" \" + vendors.join(uc_prop + \" \") + uc_prop ).split(\" \");\n\n for (var v in props) {\n if (fbCSS[ props[ v ] ] !== undefined) {\n return true;\n }\n }\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "37d523d7c352a0e16b3e45d0bafbe001", "score": "0.5871638", "text": "function testProps( props, prefixed ) {\n for ( var i in props ) {\n var prop = props[i];\n if ( !contains(prop, \"-\") && mStyle[prop] !== undefined ) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "0ea1b66617ec3e23c20215b882b9265d", "score": "0.5848097", "text": "function testProps(props, prefixed) {\n for (var i in props) {\n var prop = props[i];\n if (!contains(prop, \"-\") && mStyle[prop] !== undefined) {\n return prefixed == 'pfx' ? prop : true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "c3c725c128fc51bbb0a5218a28a3d62c", "score": "0.5808599", "text": "function selectorMatches(selector, labels) {\n if (angular.isObject(labels)) {\n var answer = true;\n var count = 0;\n angular.forEach(selector, function (value, key) {\n count++;\n if (answer && labels[key] !== value) {\n answer = false;\n }\n });\n return answer && count > 0;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "729a9e7500ae2f84842463f1f87376b9", "score": "0.5741279", "text": "_havePropertyFlags(flagsPropertyLabel) {\n let flagsSpec = this.propertySpec(flagsPropertyLabel);\n return flagsSpec && flagsSpec.haveFlags();\n }", "title": "" }, { "docid": "89ac41c15adbec6311ef79c11b0a0d0b", "score": "0.57399887", "text": "function propExists( prop ) {\n\tvar uc_prop = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ),\n\t\tprops = ( prop + \" \" + vendors.join( uc_prop + \" \" ) + uc_prop ).split( \" \" );\n\n\tfor ( var v in props ){\n\t\tif ( fbCSS[ props[ v ] ] !== undefined ) {\n\t\t\treturn true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "89ac41c15adbec6311ef79c11b0a0d0b", "score": "0.57399887", "text": "function propExists( prop ) {\n\tvar uc_prop = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ),\n\t\tprops = ( prop + \" \" + vendors.join( uc_prop + \" \" ) + uc_prop ).split( \" \" );\n\n\tfor ( var v in props ){\n\t\tif ( fbCSS[ props[ v ] ] !== undefined ) {\n\t\t\treturn true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "89ac41c15adbec6311ef79c11b0a0d0b", "score": "0.57399887", "text": "function propExists( prop ) {\n\tvar uc_prop = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ),\n\t\tprops = ( prop + \" \" + vendors.join( uc_prop + \" \" ) + uc_prop ).split( \" \" );\n\n\tfor ( var v in props ){\n\t\tif ( fbCSS[ props[ v ] ] !== undefined ) {\n\t\t\treturn true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "27e4be7b86a72ced91a9d00ade7ca136", "score": "0.56244147", "text": "function containsPropAndVal(obj, search){\n\n let objKeys = Object.keys(obj);\n let searchKeys = Object.keys(search);\n\n // loop over search keys and compare them to \n // keys in object\n // return false if not key in object or values of keys mismatch\n for (let i = 0; i < searchKeys.length; i++ ){\n let key = searchKeys[i];\n if (!objKeys.includes(key)){\n return false;\n }\n else if (obj[key] !== search[key]){\n return false;\n }\n }\n\n // return true if we get to this point\n return true;\n }", "title": "" }, { "docid": "508fb324eac053a933b43f723d17e407", "score": "0.55941343", "text": "function hasProp() {\n\t var props = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];\n\t var prop = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];\n\t var options = arguments.length <= 2 || arguments[2] === undefined ? DEFAULT_OPTIONS : arguments[2];\n\t\n\t var propToCheck = options.ignoreCase ? prop.toUpperCase() : prop;\n\t\n\t return props.some(function (attribute) {\n\t // If the props contain a spread prop, then refer to strict param.\n\t if (attribute.type === 'JSXSpreadAttribute') {\n\t return !options.spreadStrict;\n\t }\n\t\n\t var currentProp = options.ignoreCase ? (0, _propName2.default)(attribute).toUpperCase() : (0, _propName2.default)(attribute);\n\t\n\t return propToCheck === currentProp;\n\t });\n\t}", "title": "" }, { "docid": "e54f48d86b9493b2a4a2cd469f2ae178", "score": "0.5591978", "text": "function hasProp() {\n var props = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];\n var prop = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];\n var options = arguments.length <= 2 || arguments[2] === undefined ? DEFAULT_OPTIONS : arguments[2];\n\n var propName = options.ignoreCase ? prop.toUpperCase() : prop;\n\n return props.some(function (attribute) {\n // If the props contain a spread prop, then refer to strict param.\n if (attribute.type === 'JSXSpreadAttribute') {\n return !options.spreadStrict;\n }\n\n var currentProp = options.ignoreCase ? attribute.name.name.toUpperCase() : attribute.name.name;\n\n return propName === currentProp;\n });\n}", "title": "" }, { "docid": "d739fb865902f3de506d2c75605b05f6", "score": "0.558924", "text": "function hasLabellingProp(openingElement) {\n var additionalLabellingProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var labellingProps = [].concat('alt',\n // Assume alt is used correctly on an image\n 'aria-label', 'aria-labelledby', additionalLabellingProps);\n return openingElement.attributes.some(function (attribute) {\n // We must assume that a spread value contains a labelling prop.\n if (attribute.type !== 'JSXAttribute') {\n return true;\n }\n // Attribute matches.\n if ((0, _arrayIncludes[\"default\"])(labellingProps, (0, _jsxAstUtils.propName)(attribute)) && !!(0, _jsxAstUtils.getPropValue)(attribute)) {\n return true;\n }\n return false;\n });\n}", "title": "" }, { "docid": "b6f5626fe422fc977c7e626dd839197b", "score": "0.55811083", "text": "matches(node, props) {\n return Element$1.isElement(node) && Element$1.isElementProps(props) && Element$1.matches(node, props) || Text.isText(node) && Text.isTextProps(props) && Text.matches(node, props);\n }", "title": "" }, { "docid": "e340b6bc0fbc4a72a071497f218fe76d", "score": "0.5467675", "text": "function _checkForDuplicateLabels(oInvisibleElement, aODataProperties) {\n\t\treturn aODataProperties.some(function(oDataProperty) {\n\t\t\treturn oDataProperty.fieldLabel === oInvisibleElement.fieldLabel;\n\t\t});\n\t}", "title": "" }, { "docid": "84fbf18256117eb06532e2efc51ce586", "score": "0.5467266", "text": "function objHasAllPropsOf(obj, source) {\n for(let prop in source) {\n if (!obj.hasOwnProperty(prop))\n return false;\n if (obj[prop] != source[prop])\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "cea4892e86cdf07420aca8dacf2e0898", "score": "0.54497206", "text": "function hasEveryProp() {\n var nodeProps = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];\n var props = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];\n var options = arguments.length <= 2 || arguments[2] === undefined ? DEFAULT_OPTIONS : arguments[2];\n\n var propsToCheck = typeof props === 'string' ? props.split(' ') : props;\n\n return propsToCheck.every(function (prop) {\n return hasProp(nodeProps, prop, options);\n });\n}", "title": "" }, { "docid": "5a0d6111fa1a155dfb3d1a89c753e64f", "score": "0.5400296", "text": "function cfnDetectorLabelPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnDetector_LabelPropertyValidator(properties).assertSuccess();\n return {\n Arn: cdk.stringToCloudFormation(properties.arn),\n CreatedTime: cdk.stringToCloudFormation(properties.createdTime),\n Description: cdk.stringToCloudFormation(properties.description),\n Inline: cdk.booleanToCloudFormation(properties.inline),\n LastUpdatedTime: cdk.stringToCloudFormation(properties.lastUpdatedTime),\n Name: cdk.stringToCloudFormation(properties.name),\n Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),\n };\n}", "title": "" }, { "docid": "ef8b1b034b6a8f359fd72dfb8ab51f15", "score": "0.53936255", "text": "function cfnLabelPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnLabelPropsValidator(properties).assertSuccess();\n return {\n Name: cdk.stringToCloudFormation(properties.name),\n Description: cdk.stringToCloudFormation(properties.description),\n Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),\n };\n}", "title": "" }, { "docid": "31f3f7ccb8aa41b57b2255e91ee806c0", "score": "0.53932923", "text": "function hasEveryProp() {\n\t var nodeProps = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];\n\t var props = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];\n\t var options = arguments.length <= 2 || arguments[2] === undefined ? DEFAULT_OPTIONS : arguments[2];\n\t\n\t var propsToCheck = typeof props === 'string' ? props.split(' ') : props;\n\t\n\t return propsToCheck.every(function (prop) {\n\t return hasProp(nodeProps, prop, options);\n\t });\n\t}", "title": "" }, { "docid": "521ba7544eea54e93d6a124af05e7cf1", "score": "0.5381103", "text": "function hasProp(prop, props) {\n let result = false;\n if (prop.key.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */) {\n const propKeyName = prop.key.content;\n result = props.properties.some(p => p.key.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ &&\n p.key.content === propKeyName);\n }\n return result;\n}", "title": "" }, { "docid": "24db6e91e7df6d8b6231f74840a83b0f", "score": "0.5347051", "text": "function CfnClassifierPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('csvClassifier', CfnClassifier_CsvClassifierPropertyValidator)(properties.csvClassifier));\n errors.collect(cdk.propertyValidator('grokClassifier', CfnClassifier_GrokClassifierPropertyValidator)(properties.grokClassifier));\n errors.collect(cdk.propertyValidator('jsonClassifier', CfnClassifier_JsonClassifierPropertyValidator)(properties.jsonClassifier));\n errors.collect(cdk.propertyValidator('xmlClassifier', CfnClassifier_XMLClassifierPropertyValidator)(properties.xmlClassifier));\n return errors.wrap('supplied properties not correct for \"CfnClassifierProps\"');\n}", "title": "" }, { "docid": "4b2e4895eb5b19bc038b72f8f4865110", "score": "0.5340932", "text": "function CfnAliasPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('routingStrategy', cdk.requiredValidator)(properties.routingStrategy));\n errors.collect(cdk.propertyValidator('routingStrategy', CfnAlias_RoutingStrategyPropertyValidator)(properties.routingStrategy));\n return errors.wrap('supplied properties not correct for \"CfnAliasProps\"');\n}", "title": "" }, { "docid": "575c6c7d6caa47cc41f1b7464e10e61f", "score": "0.53170496", "text": "function isKnownProperty(targetType, name, isComparingJsxAttributes) {\n if (targetType.flags & 32768 /* Object */) {\n var resolved = resolveStructuredTypeMembers(targetType);\n if (resolved.stringIndexInfo ||\n resolved.numberIndexInfo && isNumericLiteralName(name) ||\n getPropertyOfObjectType(targetType, name) ||\n isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {\n // For JSXAttributes, if the attribute has a hyphenated name, consider that the attribute to be known.\n return true;\n }\n }\n else if (targetType.flags & 196608 /* UnionOrIntersection */) {\n for (var _i = 0, _a = targetType.types; _i < _a.length; _i++) {\n var t = _a[_i];\n if (isKnownProperty(t, name, isComparingJsxAttributes)) {\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "0d462c7b263a796e510743c54ec70827", "score": "0.5293006", "text": "function hasAnyProp() {\n var nodeProps = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];\n var props = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];\n var options = arguments.length <= 2 || arguments[2] === undefined ? DEFAULT_OPTIONS : arguments[2];\n\n var propsToCheck = typeof props === 'string' ? props.split(' ') : props;\n\n return propsToCheck.some(function (prop) {\n return hasProp(nodeProps, prop, options);\n });\n}", "title": "" }, { "docid": "03da5c6d3248dcab293845e8dfcb032f", "score": "0.5287221", "text": "function CfnRulePropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('eventPattern', cdk.validateObject)(properties.eventPattern));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('roleArn', cdk.validateString)(properties.roleArn));\n errors.collect(cdk.propertyValidator('scheduleExpression', cdk.validateString)(properties.scheduleExpression));\n errors.collect(cdk.propertyValidator('state', cdk.validateString)(properties.state));\n errors.collect(cdk.propertyValidator('targets', cdk.listValidator(CfnRule_TargetPropertyValidator))(properties.targets));\n return errors.wrap('supplied properties not correct for \"CfnRuleProps\"');\n}", "title": "" }, { "docid": "c997276a4b5a160dc47dcab3db685158", "score": "0.5271692", "text": "function hasProperties(obj, props) {\n for (var i = 0; i < props.length; i++) {\n if (!obj.hasOwnProperty(props[i])) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "6c6421871dcae234363817bf45ab9705", "score": "0.5268986", "text": "function CfnDetectorPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('associatedModels', cdk.listValidator(CfnDetector_ModelPropertyValidator))(properties.associatedModels));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('detectorId', cdk.requiredValidator)(properties.detectorId));\n errors.collect(cdk.propertyValidator('detectorId', cdk.validateString)(properties.detectorId));\n errors.collect(cdk.propertyValidator('detectorVersionStatus', cdk.validateString)(properties.detectorVersionStatus));\n errors.collect(cdk.propertyValidator('eventType', cdk.requiredValidator)(properties.eventType));\n errors.collect(cdk.propertyValidator('eventType', CfnDetector_EventTypePropertyValidator)(properties.eventType));\n errors.collect(cdk.propertyValidator('ruleExecutionMode', cdk.validateString)(properties.ruleExecutionMode));\n errors.collect(cdk.propertyValidator('rules', cdk.requiredValidator)(properties.rules));\n errors.collect(cdk.propertyValidator('rules', cdk.listValidator(CfnDetector_RulePropertyValidator))(properties.rules));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnDetectorProps\"');\n}", "title": "" }, { "docid": "2ecdaadeee04a71b2f7c1ddd00efe50b", "score": "0.52526224", "text": "function CfnGatewayRoute_GatewayRouteMetadataMatchPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('exact', cdk.validateString)(properties.exact));\n errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix));\n errors.collect(cdk.propertyValidator('range', CfnGatewayRoute_GatewayRouteRangeMatchPropertyValidator)(properties.range));\n errors.collect(cdk.propertyValidator('regex', cdk.validateString)(properties.regex));\n errors.collect(cdk.propertyValidator('suffix', cdk.validateString)(properties.suffix));\n return errors.wrap('supplied properties not correct for \"GatewayRouteMetadataMatchProperty\"');\n}", "title": "" }, { "docid": "08cd99bae647f30ac6694d46624e41e0", "score": "0.5246103", "text": "shouldHaveProp(data) {\n let conditions = data.iff;\n if (conditions.tValue) {\n if (this[conditions.key] !== conditions.value){\n return false;\n }\n }\n else if (this[conditions.key] === conditions.value){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "c1fa5c9f42f9fad964b17372496c7055", "score": "0.52414227", "text": "matches(node, props) {\n return Element.isElement(node) && Element.matches(node, props) || Text.isText(node) && Text.matches(node, props);\n }", "title": "" }, { "docid": "47102913a988708ea351dedf038b368d", "score": "0.5234416", "text": "function CfnDomainNamePropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('certificateArn', cdk.requiredValidator)(properties.certificateArn));\n errors.collect(cdk.propertyValidator('certificateArn', cdk.validateString)(properties.certificateArn));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('domainName', cdk.requiredValidator)(properties.domainName));\n errors.collect(cdk.propertyValidator('domainName', cdk.validateString)(properties.domainName));\n return errors.wrap('supplied properties not correct for \"CfnDomainNameProps\"');\n}", "title": "" }, { "docid": "71bd2cb82e4c36ee6221c8f170465504", "score": "0.52258474", "text": "function isEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n // console.log(typeof a);\n // console.log(typeof b);\n if (typeof a !== \"object\" || typeof b !== \"object\"){\n return false;\n }\n\n const aprops = Object.getOwnPropertyNames(a);\n const bprops = Object.getOwnPropertyNames(b);\n if (aprops.length !== bprops.length) {\n console.log('prop len dont match');\n return false;\n }\n\n let flag = true;\n for (var j=0; j<aprops.length; j++) {\n propName = aprops[j];\n flag = flag && isEqual(a[propName], b[propName]);\n }\n\n return flag;\n\n}", "title": "" }, { "docid": "be8684cd27efaf807c71eb4e57a24556", "score": "0.519554", "text": "function hasAnyProp() {\n\t var nodeProps = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];\n\t var props = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];\n\t var options = arguments.length <= 2 || arguments[2] === undefined ? DEFAULT_OPTIONS : arguments[2];\n\t\n\t var propsToCheck = typeof props === 'string' ? props.split(' ') : props;\n\t\n\t return propsToCheck.some(function (prop) {\n\t return hasProp(nodeProps, prop, options);\n\t });\n\t}", "title": "" }, { "docid": "12e99a8949926527ad93f0c81af617d1", "score": "0.5176393", "text": "function CfnWorkflowPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('defaultRunProperties', cdk.validateObject)(properties.defaultRunProperties));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('maxConcurrentRuns', cdk.validateNumber)(properties.maxConcurrentRuns));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('tags', cdk.validateObject)(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnWorkflowProps\"');\n}", "title": "" }, { "docid": "cc308f4158f64906284f65b0a33e14d4", "score": "0.51612544", "text": "function CfnRoute_GrpcRouteMetadataMatchMethodPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('exact', cdk.validateString)(properties.exact));\n errors.collect(cdk.propertyValidator('prefix', cdk.validateString)(properties.prefix));\n errors.collect(cdk.propertyValidator('range', CfnRoute_MatchRangePropertyValidator)(properties.range));\n errors.collect(cdk.propertyValidator('regex', cdk.validateString)(properties.regex));\n errors.collect(cdk.propertyValidator('suffix', cdk.validateString)(properties.suffix));\n return errors.wrap('supplied properties not correct for \"GrpcRouteMetadataMatchMethodProperty\"');\n}", "title": "" }, { "docid": "2a5fb48d6cb8c4de22d289cf87f0d87f", "score": "0.51291674", "text": "function CfnActivityPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(CfnActivity_TagsEntryPropertyValidator))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnActivityProps\"');\n}", "title": "" }, { "docid": "294aae1c069b68023ade5291b565ddf0", "score": "0.5125433", "text": "function CfnMatchmakingRuleSetPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('ruleSetBody', cdk.requiredValidator)(properties.ruleSetBody));\n errors.collect(cdk.propertyValidator('ruleSetBody', cdk.validateString)(properties.ruleSetBody));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnMatchmakingRuleSetProps\"');\n}", "title": "" }, { "docid": "46035ac0e3925a1b8ba5ee9a89ffda9c", "score": "0.512503", "text": "function CfnOutcomePropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnOutcomeProps\"');\n}", "title": "" }, { "docid": "681a10a4f4d0b0788cd93feac368853f", "score": "0.5118061", "text": "function existsInRefs (context, propertySpecs, parentRef) {\n return propertySpecs.some(ref => {\n const node = context.propertyCache[ref.ref]\n const parentNode = context.propertyCache[parentRef.ref]\n return node.label === parentNode.label\n })\n}", "title": "" }, { "docid": "b8573685a90c6a700c1be4eab6e1f33b", "score": "0.51087713", "text": "function CfnMLTransform_FindMatchesParametersPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('accuracyCostTradeoff', cdk.validateNumber)(properties.accuracyCostTradeoff));\n errors.collect(cdk.propertyValidator('enforceProvidedLabels', cdk.validateBoolean)(properties.enforceProvidedLabels));\n errors.collect(cdk.propertyValidator('precisionRecallTradeoff', cdk.validateNumber)(properties.precisionRecallTradeoff));\n errors.collect(cdk.propertyValidator('primaryKeyColumnName', cdk.requiredValidator)(properties.primaryKeyColumnName));\n errors.collect(cdk.propertyValidator('primaryKeyColumnName', cdk.validateString)(properties.primaryKeyColumnName));\n return errors.wrap('supplied properties not correct for \"FindMatchesParametersProperty\"');\n}", "title": "" }, { "docid": "541faef2778ddac88f94b2ac29883a40", "score": "0.5090857", "text": "function optionsMatches(options /*: Object */\n, propertyName /*: string */\n, input /*: string */\n) /*: boolean */{\n return !!(options && options[propertyName] && typeof input === 'string' && (0, _matchesStringOrRegExp.matchesStringOrRegExp)(input, options[propertyName]));\n}", "title": "" }, { "docid": "82844277563a02767f07311144ff6649", "score": "0.50897324", "text": "function arePropsEqual() {\n return true;\n}", "title": "" }, { "docid": "0af18f4f51f9e677dd2e551787f8a601", "score": "0.5079972", "text": "function CfnConnectorPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('connectorLabel', cdk.validateString)(properties.connectorLabel));\n errors.collect(cdk.propertyValidator('connectorProvisioningConfig', cdk.requiredValidator)(properties.connectorProvisioningConfig));\n errors.collect(cdk.propertyValidator('connectorProvisioningConfig', CfnConnector_ConnectorProvisioningConfigPropertyValidator)(properties.connectorProvisioningConfig));\n errors.collect(cdk.propertyValidator('connectorProvisioningType', cdk.requiredValidator)(properties.connectorProvisioningType));\n errors.collect(cdk.propertyValidator('connectorProvisioningType', cdk.validateString)(properties.connectorProvisioningType));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n return errors.wrap('supplied properties not correct for \"CfnConnectorProps\"');\n}", "title": "" }, { "docid": "c7b6a87ae0c7ecac6088474d0d289e02", "score": "0.5071162", "text": "function CfnDatasetPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('format', cdk.validateString)(properties.format));\n errors.collect(cdk.propertyValidator('formatOptions', CfnDataset_FormatOptionsPropertyValidator)(properties.formatOptions));\n errors.collect(cdk.propertyValidator('input', cdk.requiredValidator)(properties.input));\n errors.collect(cdk.propertyValidator('input', CfnDataset_InputPropertyValidator)(properties.input));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('pathOptions', CfnDataset_PathOptionsPropertyValidator)(properties.pathOptions));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnDatasetProps\"');\n}", "title": "" }, { "docid": "33343f4db0aa3b3983cd38f905f84471", "score": "0.50579363", "text": "function CfnLinkPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('bandwidth', cdk.requiredValidator)(properties.bandwidth));\n errors.collect(cdk.propertyValidator('bandwidth', CfnLink_BandwidthPropertyValidator)(properties.bandwidth));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('globalNetworkId', cdk.requiredValidator)(properties.globalNetworkId));\n errors.collect(cdk.propertyValidator('globalNetworkId', cdk.validateString)(properties.globalNetworkId));\n errors.collect(cdk.propertyValidator('provider', cdk.validateString)(properties.provider));\n errors.collect(cdk.propertyValidator('siteId', cdk.requiredValidator)(properties.siteId));\n errors.collect(cdk.propertyValidator('siteId', cdk.validateString)(properties.siteId));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n errors.collect(cdk.propertyValidator('type', cdk.validateString)(properties.type));\n return errors.wrap('supplied properties not correct for \"CfnLinkProps\"');\n}", "title": "" }, { "docid": "d9607c5f14155ae52b2acf9d6123c70d", "score": "0.5046208", "text": "function propEquals(obj){\n\t/*var obj = arguments.slice(0, 1);\n\t var val = arguments.pop();\n\t \n\t if(isEmpty.apply(this, arguments)){\n\t return false;\n\t }*/\n\t\n\tif(typeof obj === 'undefined'){\n\t\treturn false;\n\t}\n\t\n\tfor(var i = 1; i < arguments.length - 1; i++){\n\t\tvar obj = obj[arguments[i]];\n\t\tif(typeof obj === 'undefined'){\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn obj == arguments[arguments.length-1];\n}", "title": "" }, { "docid": "9f745e1b40c566417116a75dde4289d4", "score": "0.50440115", "text": "function CfnRegistryPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnRegistryProps\"');\n}", "title": "" }, { "docid": "f1a418a6f3187589c8129b1e099b80db", "score": "0.50402564", "text": "function CfnUserPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('groups', cdk.listValidator(cdk.validateString))(properties.groups));\n errors.collect(cdk.propertyValidator('loginProfile', CfnUser_LoginProfilePropertyValidator)(properties.loginProfile));\n errors.collect(cdk.propertyValidator('managedPolicyArns', cdk.listValidator(cdk.validateString))(properties.managedPolicyArns));\n errors.collect(cdk.propertyValidator('path', cdk.validateString)(properties.path));\n errors.collect(cdk.propertyValidator('permissionsBoundary', cdk.validateString)(properties.permissionsBoundary));\n errors.collect(cdk.propertyValidator('policies', cdk.listValidator(CfnUser_PolicyPropertyValidator))(properties.policies));\n errors.collect(cdk.propertyValidator('userName', cdk.validateString)(properties.userName));\n return errors.wrap('supplied properties not correct for \"CfnUserProps\"');\n}", "title": "" }, { "docid": "ffc7cc8f83e23f2374d816b3a3b81864", "score": "0.5026659", "text": "function hasFunduleProperties(fn) {\r\n return getKeysOfObject(fn).some(function (k) { return Function[k] === undefined; });\r\n}", "title": "" }, { "docid": "b3d883fb85d21263cc213ae90f03dafd", "score": "0.50264347", "text": "function CfnAgentPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('activationKey', cdk.validateString)(properties.activationKey));\n errors.collect(cdk.propertyValidator('agentName', cdk.validateString)(properties.agentName));\n errors.collect(cdk.propertyValidator('securityGroupArns', cdk.listValidator(cdk.validateString))(properties.securityGroupArns));\n errors.collect(cdk.propertyValidator('subnetArns', cdk.listValidator(cdk.validateString))(properties.subnetArns));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n errors.collect(cdk.propertyValidator('vpcEndpointId', cdk.validateString)(properties.vpcEndpointId));\n return errors.wrap('supplied properties not correct for \"CfnAgentProps\"');\n}", "title": "" }, { "docid": "d24b497fedbef9ae119255521dd9f725", "score": "0.50245315", "text": "function CfnAccessPointPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('objectLambdaConfiguration', cdk.requiredValidator)(properties.objectLambdaConfiguration));\n errors.collect(cdk.propertyValidator('objectLambdaConfiguration', CfnAccessPoint_ObjectLambdaConfigurationPropertyValidator)(properties.objectLambdaConfiguration));\n return errors.wrap('supplied properties not correct for \"CfnAccessPointProps\"');\n}", "title": "" }, { "docid": "2178b284302d60b4d24db23a83334dd2", "score": "0.5016423", "text": "function CfnBuildPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('operatingSystem', cdk.validateString)(properties.operatingSystem));\n errors.collect(cdk.propertyValidator('storageLocation', CfnBuild_StorageLocationPropertyValidator)(properties.storageLocation));\n errors.collect(cdk.propertyValidator('version', cdk.validateString)(properties.version));\n return errors.wrap('supplied properties not correct for \"CfnBuildProps\"');\n}", "title": "" }, { "docid": "ffa5e4a13fd01ca93cb53d704b70e977", "score": "0.5007255", "text": "function createMultiplePropertyTest(testFunc) {\n return function(o, props) {\n var i = props.length;\n while (i--) {\n if (!testFunc(o, props[i])) {\n return false;\n }\n }\n return true;\n };\n }", "title": "" }, { "docid": "16ad87f75a09327683296af7eea33e4e", "score": "0.5006599", "text": "function CfnLocationPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('locationName', cdk.requiredValidator)(properties.locationName));\n errors.collect(cdk.propertyValidator('locationName', cdk.validateString)(properties.locationName));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnLocationProps\"');\n}", "title": "" }, { "docid": "bad0de21e863073eb611f5540a3b15d5", "score": "0.5005963", "text": "function relevantFieldsMatch(a, b) {\n\n // flat values\n if (a.id != b.id ||\n a.title != b.title ||\n a.status != b.status ||\n a.privacy != b.privacy) {\n return false;\n }\n\n function compareNotNull(prop) {\n let ap = a[prop];\n let bp = b[prop];\n return (ap && !bp || !ap && bp ||\n (typeof(ap) == 'object' && ap && bp &&\n ap.compare && ap.compare(bp)));\n }\n\n // Object flat values\n if (compareNotNull(\"recurrenceInfo\") ||\n compareNotNull(\"alarmLastAck\") ||\n /* Compare startDate and endDate */\n compareNotNull(\"startDate\") ||\n compareNotNull(\"endDate\") ||\n (a.startDate.isDate != b.startDate.isDate) ||\n (a.endDate.isDate != b.endDate.isDate)) {\n return false;\n }\n\n // Properties\n const kPROPERTIES = [\"DESCRIPTION\", \"TRANSP\", \"X-GOOGLE-EDITURL\",\n \"LOCATION\", \"X-MOZ-SNOOZE-TIME\"];\n\n for each (let p in kPROPERTIES) {\n // null and an empty string should be handled as non-relevant\n if ((a.getProperty(p) || \"\") != (b.getProperty(p) || \"\")) {\n return false;\n }\n }\n\n // categories\n let aCat = a.getCategories({});\n let bCat = b.getCategories({});\n if ((aCat.length != bCat.length) ||\n aCat.some(function notIn(cat) { return (bCat.indexOf(cat) == -1); })) {\n return false;\n }\n\n // attendees and organzier\n let aa = a.getAttendees({});\n let ab = b.getAttendees({});\n if (aa.length != ab.length) {\n return false;\n }\n\n if ((a.organizer && !b.organizer) ||\n (!a.organizer && b.organizer) ||\n (a.organizer && b.organizer && a.organizer.id != b.organizer.id)) {\n return false;\n }\n\n // go through attendees in a, check if its id is in b\n for each (let attendee in aa) {\n let ba = b.getAttendeeById(attendee.id);\n if (!ba ||\n ba.participationStatus != attendee.participationStatus ||\n ba.commonName != attendee.commonName ||\n ba.isOrganizer != attendee.isOrganizer ||\n ba.role != attendee.role) {\n return false;\n }\n }\n\n // Alarms\n aa = a.getAlarms({});\n ab = b.getAlarms({});\n\n if (aa.length != ab.length) {\n return false;\n }\n\n let alarmMap = {};\n for each (let alarm in aa) {\n alarmMap[alarm.icalString] = true;\n }\n let found = 0;\n for each (let alarm in ab) {\n if (alarm.icalString in alarmMap) {\n found++;\n }\n }\n\n if (found != ab.length) {\n return false;\n }\n\n // Recurrence Items\n if (a.recurrenceInfo) {\n let ra = a.recurrenceInfo.getRecurrenceItems({});\n let rb = b.recurrenceInfo.getRecurrenceItems({});\n\n // If we have more or less, it definitly changed.\n if (ra.length != rb.length) {\n return false;\n }\n\n // I assume that if the recurrence pattern has not changed, the order\n // of the recurrence items should not change. Anything more will be\n // very expensive.\n for (let i = 0; i < ra.length; i++) {\n if (ra[i].icalProperty.icalString !=\n rb[i].icalProperty.icalString) {\n return false;\n }\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "ea2ce4ec8bd0f8099ef5aa1cfe519436", "score": "0.4994275", "text": "function hasProps(keys, x) {\n if(!isFoldable_1(keys)) {\n throw new TypeError(err)\n }\n\n if(isNil_1(x)) {\n return false\n }\n\n var result = keys.reduce(\n every(hasKey(x)),\n null\n );\n\n return result === null || result\n}", "title": "" }, { "docid": "f7235bad7c3dcf7b437e24422eceabb8", "score": "0.4993621", "text": "function CfnMultiRegionAccessPointPolicyPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('mrapName', cdk.requiredValidator)(properties.mrapName));\n errors.collect(cdk.propertyValidator('mrapName', cdk.validateString)(properties.mrapName));\n errors.collect(cdk.propertyValidator('policy', cdk.requiredValidator)(properties.policy));\n errors.collect(cdk.propertyValidator('policy', cdk.validateObject)(properties.policy));\n return errors.wrap('supplied properties not correct for \"CfnMultiRegionAccessPointPolicyProps\"');\n}", "title": "" }, { "docid": "ae431dc0087eb909ad002967a9ee82c3", "score": "0.4992121", "text": "function CfnSchemaPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('checkpointVersion', CfnSchema_SchemaVersionPropertyValidator)(properties.checkpointVersion));\n errors.collect(cdk.propertyValidator('compatibility', cdk.requiredValidator)(properties.compatibility));\n errors.collect(cdk.propertyValidator('compatibility', cdk.validateString)(properties.compatibility));\n errors.collect(cdk.propertyValidator('dataFormat', cdk.requiredValidator)(properties.dataFormat));\n errors.collect(cdk.propertyValidator('dataFormat', cdk.validateString)(properties.dataFormat));\n errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('registry', CfnSchema_RegistryPropertyValidator)(properties.registry));\n errors.collect(cdk.propertyValidator('schemaDefinition', cdk.requiredValidator)(properties.schemaDefinition));\n errors.collect(cdk.propertyValidator('schemaDefinition', cdk.validateString)(properties.schemaDefinition));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnSchemaProps\"');\n}", "title": "" }, { "docid": "d4f63b51c10a56e8018dd015d94b9f20", "score": "0.4991789", "text": "function hasProps(keys, x) {\n if(!isFoldable(keys)) {\n throw new TypeError(err)\n }\n\n if(isNil(x)) {\n return false\n }\n\n var result = keys.reduce(\n every(hasKey(x)),\n null\n )\n\n return result === null || result\n}", "title": "" }, { "docid": "5d29c5ac9b6186c6e84b3b70dcf2d46e", "score": "0.49906", "text": "function supportsProperty(props) {\n for (var i in props) {\n if (p.guineapig.style[props[i]] !== undefined) { return true; }\n }\n return false;\n } // Thanks modernizr!", "title": "" }, { "docid": "5d29c5ac9b6186c6e84b3b70dcf2d46e", "score": "0.49906", "text": "function supportsProperty(props) {\n for (var i in props) {\n if (p.guineapig.style[props[i]] !== undefined) { return true; }\n }\n return false;\n } // Thanks modernizr!", "title": "" }, { "docid": "0cab2ea8f8016502676368bdde740b47", "score": "0.49847192", "text": "function CfnInstanceProfilePropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('instanceProfileName', cdk.validateString)(properties.instanceProfileName));\n errors.collect(cdk.propertyValidator('path', cdk.validateString)(properties.path));\n errors.collect(cdk.propertyValidator('roles', cdk.requiredValidator)(properties.roles));\n errors.collect(cdk.propertyValidator('roles', cdk.listValidator(cdk.validateString))(properties.roles));\n return errors.wrap('supplied properties not correct for \"CfnInstanceProfileProps\"');\n}", "title": "" }, { "docid": "69c33bb1a24c75138f82b3d3ea2d8694", "score": "0.49826276", "text": "function CfnTablePropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('catalogId', cdk.requiredValidator)(properties.catalogId));\n errors.collect(cdk.propertyValidator('catalogId', cdk.validateString)(properties.catalogId));\n errors.collect(cdk.propertyValidator('databaseName', cdk.requiredValidator)(properties.databaseName));\n errors.collect(cdk.propertyValidator('databaseName', cdk.validateString)(properties.databaseName));\n errors.collect(cdk.propertyValidator('tableInput', cdk.requiredValidator)(properties.tableInput));\n errors.collect(cdk.propertyValidator('tableInput', CfnTable_TableInputPropertyValidator)(properties.tableInput));\n return errors.wrap('supplied properties not correct for \"CfnTableProps\"');\n}", "title": "" }, { "docid": "c08c397cc0a457c20826601e6fe69d58", "score": "0.49748492", "text": "function CfnVirtualNode_SubjectAlternativeNamesPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('match', cdk.requiredValidator)(properties.match));\n errors.collect(cdk.propertyValidator('match', CfnVirtualNode_SubjectAlternativeNameMatchersPropertyValidator)(properties.match));\n return errors.wrap('supplied properties not correct for \"SubjectAlternativeNamesProperty\"');\n}", "title": "" }, { "docid": "6b560d7b627b19542c00502984928fe3", "score": "0.49741647", "text": "function isObligatoryLabel(label){\t\r\n\treturn obligatoryDataElementsLabel.includes(label);\r\n}", "title": "" }, { "docid": "4e6d7f6dbcc3b4890b3fb07c4c1f52fe", "score": "0.4973526", "text": "function CfnProjectPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('datasetName', cdk.requiredValidator)(properties.datasetName));\n errors.collect(cdk.propertyValidator('datasetName', cdk.validateString)(properties.datasetName));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('recipeName', cdk.requiredValidator)(properties.recipeName));\n errors.collect(cdk.propertyValidator('recipeName', cdk.validateString)(properties.recipeName));\n errors.collect(cdk.propertyValidator('roleArn', cdk.requiredValidator)(properties.roleArn));\n errors.collect(cdk.propertyValidator('roleArn', cdk.validateString)(properties.roleArn));\n errors.collect(cdk.propertyValidator('sample', CfnProject_SamplePropertyValidator)(properties.sample));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnProjectProps\"');\n}", "title": "" }, { "docid": "22a70308541bc1de2a558994655adb23", "score": "0.49713856", "text": "function meetsIconCriteria(historyObject) {\n return (historyObject.prefix_mandatory || \n historyObject.alternate_name_mandatory || \n historyObject['protected'] || \n historyObject.note ||\n meetsConfigCriteria(historyObject)\n );\n }", "title": "" }, { "docid": "fe64e43ec0fd29dd676b38f28c9677de", "score": "0.49697286", "text": "function testProp(props) {\n var style = document.documentElement.style;\n\n for (var i = 0; i < props.length; i++) {\n if (props[i] in style) {\n return props[i];\n }\n }\n\n return false;\n } // @function setTransform(el: HTMLElement, offset: Point, scale?: Number)", "title": "" }, { "docid": "72549437f4b9f0917b3aaee0a27c75a8", "score": "0.49648693", "text": "function cfnMLTransformFindMatchesParametersPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnMLTransform_FindMatchesParametersPropertyValidator(properties).assertSuccess();\n return {\n AccuracyCostTradeoff: cdk.numberToCloudFormation(properties.accuracyCostTradeoff),\n EnforceProvidedLabels: cdk.booleanToCloudFormation(properties.enforceProvidedLabels),\n PrecisionRecallTradeoff: cdk.numberToCloudFormation(properties.precisionRecallTradeoff),\n PrimaryKeyColumnName: cdk.stringToCloudFormation(properties.primaryKeyColumnName),\n };\n}", "title": "" }, { "docid": "30caea3f5a8bc8eec78b0f885e2f7f18", "score": "0.49632776", "text": "function CfnGroupPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('groupName', cdk.validateString)(properties.groupName));\n errors.collect(cdk.propertyValidator('managedPolicyArns', cdk.listValidator(cdk.validateString))(properties.managedPolicyArns));\n errors.collect(cdk.propertyValidator('path', cdk.validateString)(properties.path));\n errors.collect(cdk.propertyValidator('policies', cdk.listValidator(CfnGroup_PolicyPropertyValidator))(properties.policies));\n return errors.wrap('supplied properties not correct for \"CfnGroupProps\"');\n}", "title": "" }, { "docid": "d480269ad9c33a7717c56dbd1a8e51a7", "score": "0.49610454", "text": "function hasPropVal(obj, propVals) {\n var inObj = [];\n\n var pvKeys = Object.keys(propVals);\n\n if (pvKeys.length === 0) { return false; }\n\n pvKeys.forEach(function (element) {\n if (obj.hasOwnProperty(element)) {\n if (obj[element] === propVals[element]) { inObj.push(true); }\n else { inObj.push(false); }\n }\n else {\n inObj.push(false);\n }\n });\n\n return inObj.reduce(function (a, b) {\n return a && b;\n });\n}", "title": "" }, { "docid": "27789bc0f683093475f2e2a774440ccf", "score": "0.49589628", "text": "function CfnEndpointPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('accessType', cdk.validateString)(properties.accessType));\n errors.collect(cdk.propertyValidator('customerOwnedIpv4Pool', cdk.validateString)(properties.customerOwnedIpv4Pool));\n errors.collect(cdk.propertyValidator('outpostId', cdk.requiredValidator)(properties.outpostId));\n errors.collect(cdk.propertyValidator('outpostId', cdk.validateString)(properties.outpostId));\n errors.collect(cdk.propertyValidator('securityGroupId', cdk.requiredValidator)(properties.securityGroupId));\n errors.collect(cdk.propertyValidator('securityGroupId', cdk.validateString)(properties.securityGroupId));\n errors.collect(cdk.propertyValidator('subnetId', cdk.requiredValidator)(properties.subnetId));\n errors.collect(cdk.propertyValidator('subnetId', cdk.validateString)(properties.subnetId));\n return errors.wrap('supplied properties not correct for \"CfnEndpointProps\"');\n}", "title": "" }, { "docid": "d215909f9d953941a7b1b8f6f6b46d6d", "score": "0.49564794", "text": "function CfnStateMachinePropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('definitionString', cdk.requiredValidator)(properties.definitionString));\n errors.collect(cdk.propertyValidator('definitionString', cdk.validateString)(properties.definitionString));\n errors.collect(cdk.propertyValidator('roleArn', cdk.requiredValidator)(properties.roleArn));\n errors.collect(cdk.propertyValidator('roleArn', cdk.validateString)(properties.roleArn));\n errors.collect(cdk.propertyValidator('stateMachineName', cdk.validateString)(properties.stateMachineName));\n errors.collect(cdk.propertyValidator('tags', cdk.listValidator(CfnStateMachine_TagsEntryPropertyValidator))(properties.tags));\n return errors.wrap('supplied properties not correct for \"CfnStateMachineProps\"');\n}", "title": "" }, { "docid": "b4e590c3ef37e9b8747b22014c187e8a", "score": "0.4955657", "text": "function CfnPolicyPropsValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyValidator('groups', cdk.listValidator(cdk.validateString))(properties.groups));\n errors.collect(cdk.propertyValidator('policyDocument', cdk.requiredValidator)(properties.policyDocument));\n errors.collect(cdk.propertyValidator('policyDocument', cdk.validateObject)(properties.policyDocument));\n errors.collect(cdk.propertyValidator('policyName', cdk.requiredValidator)(properties.policyName));\n errors.collect(cdk.propertyValidator('policyName', cdk.validateString)(properties.policyName));\n errors.collect(cdk.propertyValidator('roles', cdk.listValidator(cdk.validateString))(properties.roles));\n errors.collect(cdk.propertyValidator('users', cdk.listValidator(cdk.validateString))(properties.users));\n return errors.wrap('supplied properties not correct for \"CfnPolicyProps\"');\n}", "title": "" } ]
abefca94aac5bdbdc21059a29a9eabae
Normalized scrollTo & scrollTop
[ { "docid": "12f6e911b3c6d9f2a2bb59dd9b77f01f", "score": "0.0", "text": "function getScrollTop(el) {\n if (isDocumentElement(el)) {\n return window.pageYOffset;\n }\n return el.scrollTop;\n}", "title": "" } ]
[ { "docid": "07eb1e516891d27d6d9a80eef8cd4350", "score": "0.7257766", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n }\n if (to.hash) {\n return { selector: to.hash }\n }\n return { x: 0, y: 0 }\n }", "title": "" }, { "docid": "6178ad19b5bf014a48250e26fdc81993", "score": "0.7249961", "text": "scrollBehavior (to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n }\n if (to.hash) {\n return { selector: to.hash}\n }\n return { x: 0, y: 0}\n }", "title": "" }, { "docid": "b55e03e5c0dc825144e27c471ef295ac", "score": "0.716669", "text": "scrollBehavior(to, from, savedPosition) {\n if (to.hash) {\n return { selector: to.hash };\n } else if (savedPosition) {\n return savedPosition;\n } else {\n return { x: 0, y: 0 };\n }\n }", "title": "" }, { "docid": "cd2e79ee6f443109e8caa2f23cf6460c", "score": "0.69995797", "text": "scrollBehavior(to, from, scrollPosition) {\n if (scrollPosition) {\n return scrollPosition;\n }\n return {\n y: 0,\n };\n }", "title": "" }, { "docid": "98275a1e60b24109ee1c9f14bab6a015", "score": "0.69841915", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition;\n } else {\n const { meta: { keepAlive = false, toTop = false } } = from;\n if (keepAlive && !toTop) {\n from.meta.savedPosition =\n document.body.scrollTop || document.documentElement.scrollTop;\n }\n return { x: 0, y: to.meta.savedPosition || 0 };\n }\n }", "title": "" }, { "docid": "9d75431b4c8ba9c85d7eaff2235929e8", "score": "0.6920109", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return { top: 0 }\n }\n }", "title": "" }, { "docid": "f35ed797dede84f74a592570e2f02a9e", "score": "0.69145244", "text": "scrollBehavior (to, from, savedPosition) {\n return { x: 0, y: 0 }\n }", "title": "" }, { "docid": "94fdcc1ad4501c6a25e422597ba1f8a3", "score": "0.6886632", "text": "scrollBehavior (to, from, savedPosition) {\n return { x: 0, y: 0 };\n }", "title": "" }, { "docid": "182607f3a0f46a5b12a0675dddbcba97", "score": "0.68748015", "text": "scrollBehavior (to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return { x: 0, y: 0 }\n }\n }", "title": "" }, { "docid": "ef7ab2a3b126a90ce24ed313055c45ea", "score": "0.687346", "text": "scrollBehavior(to, from, savePosition) {\n if (savePosition) return savePosition;\n return { x: 0, y: 0 };\n }", "title": "" }, { "docid": "54035da1b07cb6f7d76a3f43c0a25727", "score": "0.6872207", "text": "scrollBehavior (to, from, savedPosition){\n if(savedPosition){\n return savedPosition\n } else {\n return {x:0, y:0}\n }\n }", "title": "" }, { "docid": "bfaf94b7e0c8193d6336d33e2cd14494", "score": "0.68448985", "text": "scrollBehavior(to, from, savedPosition) {\n return { x: 0, y: 0 }\n }", "title": "" }, { "docid": "1c73ba83211d1417a660befd0d1bfa9b", "score": "0.6793056", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return { x: 0, y: 0 }\n }\n }", "title": "" }, { "docid": "62e94da36d37cbe228e78cfbe796a8a6", "score": "0.67863446", "text": "scrollBehavior(to, from, savedPosition) {\n console.log(to, from, savedPosition) // to and from are pages you are going to and coming from ,\n if (savedPosition) {\n return savedPosition; // when you click previous you come back the previous posiotn\n }\n return {\n left: 0, // you are coming back at the top\n top: 0 \n } \n }", "title": "" }, { "docid": "4cace73b4e99eea6691ea215ebdc066d", "score": "0.67481154", "text": "scrollTo(){const e=this.parseAttachTo(),t=e.element;x(this.options.scrollToHandler)?this.options.scrollToHandler(t):A(t)&&t.scrollIntoView()}", "title": "" }, { "docid": "30a549ef77748346c401355e8ec305c2", "score": "0.6707574", "text": "function scrollTo(e,d){if(d>=0){var h=document.documentElement;if(h.scrollTop===0){var t=h.scrollTop;++h.scrollTop;h=t+1===h.scrollTop--?h:document.body}typeof e===\"object\"&&(e=e.offsetTop);scrollToX(h,h.scrollTop,e,0,1/d,20)}}", "title": "" }, { "docid": "e8c9f1ca3c00caac9c29414d9b7f942d", "score": "0.66815674", "text": "scrollBehavior(to, from, savedPosition) {\n if (savedPosition) {\n return savedPosition\n } else {\n return {\n x: 0,\n y: 0,\n }\n }\n }", "title": "" }, { "docid": "df08a47d58d4defe1196204655762c59", "score": "0.659323", "text": "function ScrollPosition() { }", "title": "" }, { "docid": "bd6f37075c3f9bf929866207d4b26bec", "score": "0.6592919", "text": "function scrollTop() {\n window.scrollTo({\n top: 0,\n behavior: \"smooth\"\n });\n}", "title": "" }, { "docid": "59892fd6c38a7dae45d36f098472fdc8", "score": "0.65785056", "text": "function scrollTo(timestamp, targetTop){\n\t\tif(!start) start = timestamp\n\t\tvar runtime = timestamp - start\n\t\tvar progress = Math.min(runtime / 700, 1)\n\n\t\twindow.scroll(0, startPos + (targetTop * progress) )\n\t\tif(progress >= 1){\n\t\t\tstart = null\n\t\t\treturn;\n\t\t}else {\n\t\t\trequestAnimationFrame(function(timestamp){\n\t\t\t\tscrollTo(timestamp, targetTop)\n\t\t\t})\n\t\t}\n\t}", "title": "" }, { "docid": "cc6900a4777f7cd5457907fad8a7f638", "score": "0.65336025", "text": "_scrollToElemPosition() {\n let elem = document.querySelector(\n `[data-${this.anchorQueryParam}=\"${this.a}\"]`\n );\n\n if (elem && elem.offsetHeight) {\n const offsetToScroll = getOffset(\n elem,\n config.APP.scrollContainerSelector\n );\n const scrollContainer = document.querySelector(\n config.APP.scrollContainerSelector\n );\n if (scrollContainer.scrollTo) {\n scrollContainer.scrollTo(0, offsetToScroll);\n } else {\n // fallback for IE11\n scrollContainer.scrollTop = offsetToScroll;\n }\n }\n }", "title": "" }, { "docid": "b54fe6bb90e6844e76d20c6fc8fd6f4f", "score": "0.6511857", "text": "function ViewportScrollPosition() { }", "title": "" }, { "docid": "ce58812e0d513d451fcd84ee31eeb91e", "score": "0.6488037", "text": "onScrollChange (scrollPosition) {}", "title": "" }, { "docid": "d5bf90326c00a6ea02287c02b07208d8", "score": "0.64481044", "text": "function resolveScrollToPos(cm){var range=cm.curOp.scrollToPos;if(range){cm.curOp.scrollToPos=null;var from=estimateCoords(cm,range.from),to=estimateCoords(cm,range.to);var sPos=calculateScrollPos(cm,Math.min(from.left,to.left),Math.min(from.top,to.top)-range.margin,Math.max(from.right,to.right),Math.max(from.bottom,to.bottom)+range.margin);cm.scrollTo(sPos.scrollLeft,sPos.scrollTop);}}// Operations are used to wrap a series of changes to the editor", "title": "" }, { "docid": "adcf2f77607652b8a55af6ff5a386b4d", "score": "0.6405254", "text": "function copyElementScroll( from, to ) {\r\n to.scrollTop= from.scrollTop;\r\n to.scrollLeft= from.scrollLeft;\r\n }", "title": "" }, { "docid": "c946891f46acff4f1b081ccac9b29798", "score": "0.6393542", "text": "scrollTop() {\n const paginateClientRect = this.paginateTopRef.current.getBoundingClientRect();\n window.scrollTo(paginateClientRect.x, paginateClientRect.y);\n }", "title": "" }, { "docid": "5650de93c31c0de9e143c19a73e980ca", "score": "0.6387362", "text": "function scrollTop() {\n // Scroll to top\n rotElem.scrollTo({\n top: 0,\n behavior: \"smooth\",\n });\n}", "title": "" }, { "docid": "085c534c1b499399bb60750488cae1e3", "score": "0.6380465", "text": "function scrollTop() {\n\t\tvar scrollTo = '#result-label-wrapper-' + data[0].filter[0];\n\t\t$('#results-wrapper').animate({\n\t\t\tscrollTop: $(scrollTo).position().top - 300,\n\t\t}, 1000);\n\t}", "title": "" }, { "docid": "10c8a9868a938011fc03111603a15194", "score": "0.63750356", "text": "scrollBodyTo( pos ) {\n window.scroll({\n top: pos,\n behavior: 'smooth'\n });\n }", "title": "" }, { "docid": "faf7b0dbbd73f8bffbbafaa90911dcb9", "score": "0.6322685", "text": "scrollTo(nodeOrOpts) {\n const PADDING = 2; // leave some pixels between viewport bounds\n let node;\n let options;\n if (nodeOrOpts instanceof WunderbaumNode) {\n node = nodeOrOpts;\n }\n else {\n options = nodeOrOpts;\n node = options.node;\n }\n assert(node && node._rowIdx != null);\n const scrollParent = this.element;\n const headerHeight = this.headerElement.clientHeight; // May be 0\n const scrollTop = scrollParent.scrollTop;\n const vpHeight = scrollParent.clientHeight;\n const rowTop = node._rowIdx * ROW_HEIGHT + headerHeight;\n const vpTop = headerHeight;\n const vpRowTop = rowTop - scrollTop;\n const vpRowBottom = vpRowTop + ROW_HEIGHT;\n const topNode = options === null || options === void 0 ? void 0 : options.topNode;\n // this.log( `scrollTo(${node.title}), vpTop:${vpTop}px, scrollTop:${scrollTop}, vpHeight:${vpHeight}, rowTop:${rowTop}, vpRowTop:${vpRowTop}`, nodeOrOpts , options);\n let newScrollTop = null;\n if (vpRowTop >= vpTop) {\n if (vpRowBottom <= vpHeight) ;\n else {\n // Node is below viewport\n // this.log(\"Below viewport\");\n newScrollTop = rowTop + ROW_HEIGHT - vpHeight + PADDING; // leave some pixels between viewport bounds\n }\n }\n else {\n // Node is above viewport\n // this.log(\"Above viewport\");\n newScrollTop = rowTop - vpTop - PADDING; // leave some pixels between viewport bounds\n }\n if (newScrollTop != null) {\n this.log(`scrollTo(${rowTop}): ${scrollTop} => ${newScrollTop}`);\n scrollParent.scrollTop = newScrollTop;\n if (topNode) {\n // Make sure the topNode is always visible\n this.scrollTo(topNode);\n }\n // this.setModified(ChangeType.scroll);\n }\n }", "title": "" }, { "docid": "24d24b9a0f269ef0667e5f1f31d153c0", "score": "0.63200235", "text": "handleScroll(event) {\n const scrollTop = event.srcElement.body.scrollTop;\n this.setState({ scrollTop });\n }", "title": "" }, { "docid": "4d422788783f26dc4b504c74ac5b64d8", "score": "0.6301429", "text": "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 }", "title": "" }, { "docid": "4d422788783f26dc4b504c74ac5b64d8", "score": "0.6301429", "text": "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 }", "title": "" }, { "docid": "bf06acf14579b3d0d0f8f97103199851", "score": "0.62972593", "text": "getOffset () {\n const root = this.$el\n return root ? Math.ceil(root.scrollTop) : 0\n }", "title": "" }, { "docid": "89372f7b4b9c14d664bd1fa85fb26008", "score": "0.62951756", "text": "scrollHandler() {\n\t\tscroller.scrollTo('scrollTo', {\n\t\t\tduration: 1000,\n\t\t\tsmooth: true\n\t\t});\n\t}", "title": "" }, { "docid": "ba56dd7c216a772f47864a9c3cacb634", "score": "0.6288244", "text": "function updateScroll () { // 19281\n if (!elements.li[0]) return; // 19282\n var height = elements.li[0].offsetHeight, // 19283\n top = height * ctrl.index, // 19284\n bot = top + height, // 19285\n hgt = elements.scroller.clientHeight, // 19286\n scrollTop = elements.scroller.scrollTop; // 19287\n if (top < scrollTop) { // 19288\n scrollTo(top); // 19289\n } else if (bot > scrollTop + hgt) { // 19290\n scrollTo(bot - hgt); // 19291\n } // 19292\n } // 19293", "title": "" }, { "docid": "340647b7afcdebc9e2a26612331cd7c0", "score": "0.6267486", "text": "scrollTop() {\n document.documentElement.scrollTop = 0;\n document.body.scrollTop = 0;\n }", "title": "" }, { "docid": "d51cd3e586fb40d5a66bf37bf7be66b6", "score": "0.6260813", "text": "[scroll]() {\n if (!this.scrollableElement || !this.currentMousePosition) {\n return;\n }\n\n cancelAnimationFrame(this.scrollAnimationFrame);\n\n const {speed, sensitivity} = this.options;\n\n const rect = this.scrollableElement.getBoundingClientRect();\n const bottomCutOff = rect.bottom > window.innerHeight;\n const topCutOff = rect.top < 0;\n const cutOff = topCutOff || bottomCutOff;\n\n const documentScrollingElement = getDocumentScrollingElement();\n const scrollableElement = this.scrollableElement;\n const clientX = this.currentMousePosition.clientX;\n const clientY = this.currentMousePosition.clientY;\n\n if (scrollableElement !== document.body && scrollableElement !== document.documentElement && !cutOff) {\n const {offsetHeight, offsetWidth} = scrollableElement;\n\n if (rect.top + offsetHeight - clientY < sensitivity) {\n scrollableElement.scrollTop += speed;\n } else if (clientY - rect.top < sensitivity) {\n scrollableElement.scrollTop -= speed;\n }\n\n if (rect.left + offsetWidth - clientX < sensitivity) {\n scrollableElement.scrollLeft += speed;\n } else if (clientX - rect.left < sensitivity) {\n scrollableElement.scrollLeft -= speed;\n }\n } else {\n const {innerHeight, innerWidth} = window;\n\n if (clientY < sensitivity) {\n documentScrollingElement.scrollTop -= speed;\n } else if (innerHeight - clientY < sensitivity) {\n documentScrollingElement.scrollTop += speed;\n }\n\n if (clientX < sensitivity) {\n documentScrollingElement.scrollLeft -= speed;\n } else if (innerWidth - clientX < sensitivity) {\n documentScrollingElement.scrollLeft += speed;\n }\n }\n\n this.scrollAnimationFrame = requestAnimationFrame(this[scroll]);\n }", "title": "" }, { "docid": "6ce541bb7d42919dc4d57b119f75dee8", "score": "0.6251989", "text": "function scrollTo(element) {\n window.scroll({\n behavior: 'smooth',\n left: 0,\n top: element.offsetTop - 100\n });\n}", "title": "" }, { "docid": "6848bb79b6de3ecc8c708a79a012f9d5", "score": "0.6251877", "text": "function scrollTop(){\r\n var scrolltop = (document.documentElement && document.documentElement.scrollTop) || \r\n document.body.scrollTop;\r\n return scrolltop;\r\n }", "title": "" }, { "docid": "0ed9464eeba1f49f968411e520162308", "score": "0.623969", "text": "scrollIntoView(element) {\n if (!activatedElement) {\n activatedElement = getScrollingElement() && firstScrollableElement();\n }\n const rects = element.getClientRects();\n const rect = rects ? rects[0] : undefined;\n if (rect) {\n // Scroll y axis.\n let amount;\n if (rect.bottom < 0) {\n amount = rect.bottom - Math.min(rect.height, window.innerHeight);\n element = findScrollableElement(element, \"y\", amount, 1);\n CoreScroller.scroll(element, \"y\", amount, false);\n } else if (window.innerHeight < rect.top) {\n amount = rect.top + Math.min(rect.height - window.innerHeight, 0);\n element = findScrollableElement(element, \"y\", amount, 1);\n CoreScroller.scroll(element, \"y\", amount, false);\n }\n\n // Scroll x axis.\n if (rect.right < 0) {\n amount = rect.right - Math.min(rect.width, window.innerWidth);\n element = findScrollableElement(element, \"x\", amount, 1);\n CoreScroller.scroll(element, \"x\", amount, false);\n } else if (window.innerWidth < rect.left) {\n amount = rect.left + Math.min(rect.width - window.innerWidth, 0);\n element = findScrollableElement(element, \"x\", amount, 1);\n CoreScroller.scroll(element, \"x\", amount, false);\n }\n }\n }", "title": "" }, { "docid": "6e3792e55811fa6523c9ea68b14f303d", "score": "0.6238656", "text": "scrollTo(selector) {\n scroller.scrollTo(selector, {\n duration: 800,\n delay: 0,\n offset: 150,\n smooth: 'easeInOutQuart',\n })\n }", "title": "" }, { "docid": "28ecc29c3f5c4c8e214ae4f4b9c9f16b", "score": "0.62365466", "text": "function smoothScroll(target) {\n //getting the coordinate of the section where we want to scroll\n let targetPozition = target.getBoundingClientRect().top;\n // the current pozition\n let startPosition = window.pageYOffset;\n let distance = 0;\n // determining the Y coordinate where we want to scroll based on\n // the relationsheep between the current location and the target\n if (targetPozition / startPosition == 2) {\n //bug fix that disrupts navigation due to values\n distance = targetPozition + startPosition;\n } else if (targetPozition > startPosition) {\n distance = targetPozition - startPosition;\n console.log(targetPozition, startPosition, distance);\n } else {\n distance = startPosition + targetPozition;\n console.log(targetPozition, startPosition, distance);\n }\n window.scrollTo({\n top: distance,\n behavior: \"smooth\"\n });\n}", "title": "" }, { "docid": "86d881674639e6843657e08f57d55bc6", "score": "0.6233842", "text": "function readyToSearchScrollPosition() {\n window.scrollTo({\n 'top': scrollAnchor.offsetTop,\n 'left': 0,\n 'behavior': 'auto',\n });\n }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "6cfe6485eda8687b8d081e8e8b84e769", "score": "0.623348", "text": "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 }", "title": "" }, { "docid": "48d936de22020697efe760f2b2580436", "score": "0.6215515", "text": "function go_to_target_scroll() {\n //get current window information\n var window_height = web_window.height();\n var window_top_position = web_window.scrollTop();\n var window_bottom_position = (window_top_position + window_height);\n\n //get target scroll information\n var target_scroll = $('.target-scroll');\n var target_scroll_height = $(target_scroll).outerHeight();\n var target_scroll_top_position = $(target_scroll).offset().top;\n var target_scroll_bottom_position = (target_scroll_top_position + target_scroll_height);\n\n //get top of document\n var top_document = $('html, body');\n\n //set animation run time\n var speed_scroll_animation = 800;\n\n top_document.animate({\n scrollTop: target_scroll_top_position\n }, speed_scroll_animation);\n }", "title": "" }, { "docid": "5ac2e03a0541c12be21742d3012aa122", "score": "0.6207783", "text": "function xScrollTop(e, bWin)\r\n{\r\n var offset=0;\r\n if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {\r\n var w = window;\r\n if (bWin && e) w = e;\r\n if(w.document.documentElement && w.document.documentElement.scrollTop) offset=w.document.documentElement.scrollTop;\r\n else if(w.document.body && xDef(w.document.body.scrollTop)) offset=w.document.body.scrollTop;\r\n }\r\n else {\r\n e = xGetElementById(e);\r\n if (e && xNum(e.scrollTop)) offset = e.scrollTop;\r\n }\r\n return offset;\r\n}", "title": "" }, { "docid": "9d248b0da6ab876b078dafd49c016a74", "score": "0.6206318", "text": "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),\n to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "3124a7638b6eb164a1af7d39d569e8e5", "score": "0.6195072", "text": "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 }", "title": "" }, { "docid": "6ea421ca4e231e79829e61eff0a0873e", "score": "0.6186607", "text": "offsets() {\n return { y: scrollY, x: scrollX };\n }", "title": "" }, { "docid": "8b69ccb7783f9e1838b1fda885e12cf7", "score": "0.6174327", "text": "function resolveScrollToPos(cm) {\n\t var range = cm.curOp.scrollToPos;\n\t if (range) {\n\t cm.curOp.scrollToPos = null;\n\t var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n\t var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n\t Math.min(from.top, to.top) - range.margin,\n\t Math.max(from.right, to.right),\n\t Math.max(from.bottom, to.bottom) + range.margin);\n\t cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n\t }\n\t }", "title": "" }, { "docid": "8b69ccb7783f9e1838b1fda885e12cf7", "score": "0.6174327", "text": "function resolveScrollToPos(cm) {\n\t var range = cm.curOp.scrollToPos;\n\t if (range) {\n\t cm.curOp.scrollToPos = null;\n\t var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n\t var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n\t Math.min(from.top, to.top) - range.margin,\n\t Math.max(from.right, to.right),\n\t Math.max(from.bottom, to.bottom) + range.margin);\n\t cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n\t }\n\t }", "title": "" }, { "docid": "3e1d036588780dc3abae3e61218ebff0", "score": "0.6172657", "text": "function tinyScroll() {\n window.scrollBy(0, 1);\n}", "title": "" }, { "docid": "b168f2fb31aa29e114a0ef11f124d1e7", "score": "0.6171802", "text": "function clickScroll(evt) {\n evt.preventDefault();\n const getAttr = this.getAttribute(\"href\"); \n const distanceOfParentNode = document.querySelector(getAttr).offsetTop; \n scroll({\n top: distanceOfParentNode,\n behavior: \"smooth\"\n });\n // this MDN doc https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this.\n // offsetTop MDN doc https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop.\n // scroll MDN doc https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll.\n }", "title": "" }, { "docid": "07784c7e58953a57c343baf4e7e6b18c", "score": "0.61713064", "text": "scrollBehavior(to) { // 在点击浏览器的“前进/后退”,或者切换导航的时候触发。\n if (to.hash){\n console.log(to.hash)\n return {\n selector: to.hash,\n behavior: 'smooth',\n }\n }\n // if (savePosition) {\n // return savePosition;\n // } else {\n // return {\n // x:0,\n // y:100\n // }\n // // var top;\n // // if (window.innerWidth >= 700) {\n // // top = 676\n // // } else {\n // // top = 267\n // // }\n // // return {\n // // x: 0,\n // // y: top\n // // }\n // }\n }", "title": "" }, { "docid": "958613cdad23d56cd60987b1c751f6e7", "score": "0.61689866", "text": "function scrollPosIntoView(cm,pos,end,margin){if(margin==null){margin=0;}var coords;for(var limit=0;limit<5;limit++){var changed=false;coords=_cursorCoords(cm,pos);var endCoords=!end||end==pos?coords:_cursorCoords(cm,end);var scrollPos=calculateScrollPos(cm,Math.min(coords.left,endCoords.left),Math.min(coords.top,endCoords.top)-margin,Math.max(coords.left,endCoords.left),Math.max(coords.bottom,endCoords.bottom)+margin);var startTop=cm.doc.scrollTop,startLeft=cm.doc.scrollLeft;if(scrollPos.scrollTop!=null){setScrollTop(cm,scrollPos.scrollTop);if(Math.abs(cm.doc.scrollTop-startTop)>1){changed=true;}}if(scrollPos.scrollLeft!=null){setScrollLeft(cm,scrollPos.scrollLeft);if(Math.abs(cm.doc.scrollLeft-startLeft)>1){changed=true;}}if(!changed){break;}}return coords;}// Scroll a given set of coordinates into view (immediately).", "title": "" }, { "docid": "3fd026de3e03aa61477963daf2c605d4", "score": "0.61676586", "text": "scrollHandler2() {\n\t\tscroller.scrollTo('scrollTo2', {\n\t\t\tduration: 1000,\n\t\t\tsmooth: true\n\t\t});\n\t}", "title": "" }, { "docid": "a936e5c5b124d291a47a4f306325a530", "score": "0.6166715", "text": "function goToByScroll(id){\n$('html,body').animate({scrollTop: $(\"#\"+id).offset().top - 40},'normal');\n}", "title": "" }, { "docid": "52c539356b9b9578de5e99ad5b4641bd", "score": "0.61641055", "text": "function scrollTo(element) {\n window.scroll({\n left: 0,\n top: element.offsetTop,\n behavior: 'smooth',\n\n })\n\n}", "title": "" }, { "docid": "2ab06af19e7ffc0beb5511a8a4f918ec", "score": "0.61587054", "text": "function resolveScrollToPos(cm) {\n\t var range$$1 = cm.curOp.scrollToPos;\n\t if (range$$1) {\n\t cm.curOp.scrollToPos = null;\n\t var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);\n\t scrollToCoordsRange(cm, from, to, range$$1.margin);\n\t }\n\t}", "title": "" }, { "docid": "a2474efb0d7ee14b53a46480885c8256", "score": "0.6153516", "text": "function reposVertical(e) {\r\n var h = document.getElementById('thisdiv');\r\n var c = document.getElementById('divStaff');\r\n h.scrollTop = e.scrollTop;\r\n c.scrollTop = e.scrollTop;\r\n}", "title": "" }, { "docid": "efafe3d801edccc54d857c7256155e1b", "score": "0.6153251", "text": "scrollToOffRebs() {\n let element = document.querySelector('.off-rebounds');\n let bodyRect = document.body.getBoundingClientRect().top;\n let elementRect = element.getBoundingClientRect().top;\n let elementPosition = elementRect - bodyRect;\n let offset = 120;\n let offsetPosition = elementPosition - offset;\n\n window.scrollTo({top: offsetPosition, behavior: 'smooth'});\n }", "title": "" }, { "docid": "06f2b845bc8c2f76dc7beccafd7c822d", "score": "0.6139767", "text": "function smoothScroll(eID) {\n \n //toma la posicion del elemento, el cual debe pasarse para que sea uno solo por queryselector: '.clase', '#id', 'tag'\n function elmYPosition(eID) {\n var elm = document.querySelector(eID);\n var y = elm.offsetTop-100;\n var node = elm;\n while (node.offsetParent && node.offsetParent != document.body) {\n node = node.offsetParent;\n y += node.offsetTop;\n \n if ( window.innerWidth < 768) {\n y-=50; \n }\n }\n return y;\n }\n \n //toma la posicion actual de la ventana\n function currentYPosition() {\n // Firefox, Chrome, Opera, Safari\n if (self.pageYOffset) return self.pageYOffset;\n // Internet Explorer 6 - standards mode\n if (document.documentElement && document.documentElement.scrollTop)\n return document.documentElement.scrollTop;\n // Internet Explorer 6, 7 and 8\n if (document.body.scrollTop) return document.body.scrollTop;\n return 0;\n }\n \n \n //smoth scroll\n var startY = currentYPosition();\n var stopY = elmYPosition(eID);\n var distance = stopY > startY ? stopY - startY : startY - stopY;\n if (distance < 100) {\n scrollTo(0, stopY); return;\n }\n var speed = Math.round(distance / 100);\n if (speed >= 20) speed = 20;\n var step = Math.round(distance / 25);\n var leapY = stopY > startY ? startY + step : startY - step;\n var timer = 0;\n if (stopY > startY) {\n for ( var i=startY; i<stopY; i+=step ) {\n setTimeout(\"window.scrollTo(0, \"+leapY+\")\", timer * speed);\n leapY += step; if (leapY > stopY) leapY = stopY; timer++;\n } return;\n }\n for ( var i=startY; i>stopY; i-=step ) {\n setTimeout(\"window.scrollTo(0, \"+leapY+\")\", timer * speed);\n leapY -= step; if (leapY < stopY) leapY = stopY; timer++;\n }\n}", "title": "" }, { "docid": "05c778eccbd55281badd5b30b83cc73f", "score": "0.61346185", "text": "function goToByScroll(id){\n $('html,body').stop().animate({scrollTop: ($(\"#\"+id).offset().top)-=150},{duration: 1500, easing: \"easeInOutExpo\"});\n}", "title": "" }, { "docid": "33ae20dd4d2ead1270faeddda702a3d5", "score": "0.61256564", "text": "function AnchorPosition_getWindowOffsetTop (el)\r\n{\r\n\treturn AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;\r\n}", "title": "" }, { "docid": "c38b72bc60d7d930f9c2cb6da4201996", "score": "0.61254805", "text": "function scrollToStep(num) {\n var visibleSize = getViewableSize();\n var scrollXy = getScrollXY();\n var visTop = scrollXy[1];\n var visHeight = visibleSize[1];\n var visBot = visHeight + visTop; \n var buttonBar = DL_GetElementTop(document.getElementById('scrollTo-button'));\n if(buttonBar < visTop || buttonBar > visBot) {\n var st = Number(buttonBar) - visHeight;\n setTimeout(\"window.scrollTo(0,10000);\",0);\n } \n}", "title": "" }, { "docid": "4bf6e3b635182e450e7b5c21d0a70cde", "score": "0.61243296", "text": "_calculateScrollDiff() {\n return this._prependOffset + this._scrollTop - this._scrollContainer.scrollTop;\n }", "title": "" }, { "docid": "66b78c7540f15558f39d43343be84db0", "score": "0.6121825", "text": "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),\n to = estimateCoords(cm, range$$1.to);\n scrollToCoordsRange(cm, from, to, range$$1.margin);\n }\n }", "title": "" }, { "docid": "5419e885daa9059e7e07affa28514284", "score": "0.611982", "text": "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 }", "title": "" }, { "docid": "21774176dc77d17936738bff14dce7da", "score": "0.6115917", "text": "scrollBehavior() {\n // possible arguments to, from, savedPosition - removed, so lint does not complain\n return { x: 0, y: 0 }\n }", "title": "" }, { "docid": "a78eaf41f77eabb63347e7f4e2ad574c", "score": "0.6108235", "text": "navegar(oE) {\n let i = oE.target.dataset.index\n oE.preventDefault()\n window.scroll({\n top: this.aOffset[i], \n left: 0, \n behavior: 'smooth'\n })\n\n }", "title": "" }, { "docid": "ec54fd1b8e17b7ceb8b7af86e37ed4fc", "score": "0.6103952", "text": "function subirTela() {\n window.scrollTo({ // da a direção do Scroll\n top:0,\n behavior: 'smooth' // comportamento = suave\n });\n}", "title": "" }, { "docid": "2dee5e6669e744034d9b19a2bc1b907b", "score": "0.610305", "text": "function scrollTop(){\n window.scrollTo(0,0);\n}", "title": "" }, { "docid": "1868698b041a1462f765cecec3f690e8", "score": "0.6102684", "text": "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}", "title": "" }, { "docid": "14c809a588a007bb57a3104ae89feb1f", "score": "0.6101858", "text": "function findScrollPos(obj) {\r\n\tvar curtop = 0;\r\n\tif (obj.offsetParent) {\r\n\t\tdo {\r\n\t\t\tcurtop += obj.offsetTop;\r\n\t\t} while (obj = obj.offsetParent);\r\n\treturn [curtop];\r\n\t}\r\n}", "title": "" }, { "docid": "c7aba70fd3fa693baeb1a1fa163cbccc", "score": "0.6097928", "text": "function updateScroll() {\n if (!elements.li[0]) return;\n var height = elements.li[0].offsetHeight,\n top = height * ctrl.index,\n bot = top + height,\n hgt = elements.scroller.clientHeight,\n scrollTop = elements.scroller.scrollTop;\n if (top < scrollTop) {\n scrollTo(top);\n } else if (bot > scrollTop + hgt) {\n scrollTo(bot - hgt);\n }\n }", "title": "" }, { "docid": "e60756889689f96e360bbdb1fb32a91d", "score": "0.60978603", "text": "function fncScrollTop( varDocumentElement ) { return window.pageYOffset || varDocumentElement.scrollTop; }", "title": "" }, { "docid": "0af4449acc69b542097226b07977222c", "score": "0.60958403", "text": "function updateScroll(){if(!elements.li[0])return;var height=elements.li[0].offsetHeight,top=height*ctrl.index,bot=top+height,hgt=elements.scroller.clientHeight,scrollTop=elements.scroller.scrollTop;if(top<scrollTop){scrollTo(top);}else if(bot>scrollTop+hgt){scrollTo(bot-hgt);}}", "title": "" }, { "docid": "54d59b6ed718f98040d130572b18179f", "score": "0.6090345", "text": "function scrollToTop() {\n root.scrollTo({\n top: 0,\n behavior: 'smooth'\n })\n scrollToTop.addEventListener(\"click\", scrollToTop);\n document.addEventListener(\"scroll\", scrollFunction);\n}", "title": "" }, { "docid": "6352090b112d3986188da894d3a98790", "score": "0.6087355", "text": "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}", "title": "" }, { "docid": "e04cf5b0591c0c78ebc0884ddf5571ae", "score": "0.6086393", "text": "function updateScroll () {\n\t if (!elements.li[0]) return;\n\t var height = elements.li[0].offsetHeight,\n\t top = height * ctrl.index,\n\t bot = top + height,\n\t hgt = elements.scroller.clientHeight,\n\t scrollTop = elements.scroller.scrollTop;\n\t if (top < scrollTop) {\n\t scrollTo(top);\n\t } else if (bot > scrollTop + hgt) {\n\t scrollTo(bot - hgt);\n\t }\n\t }", "title": "" }, { "docid": "b7f70366e0aebf99b57e2c90659289c3", "score": "0.60784286", "text": "function scrollTop() {\n\t\twindow.scrollTo( 0, 0 );\n\t}", "title": "" }, { "docid": "3741e8e7e070012b7b22ebd9c4436607", "score": "0.6068532", "text": "handlePageClick() {\n this.scrollTop();\n }", "title": "" }, { "docid": "416954aa9b297a19fb409710c36e7bb8", "score": "0.60623777", "text": "function getScrollTop() {\r\n return docEl.scrollTop || d.body.scrollTop;\r\n }", "title": "" } ]
7c6e473a5cea6cf9b4d2721d22a0b794
Create an empty `AgentSet` and initialize the `ID` counter for add(). If baseSet is supplied, the new agentset is a subarray of baseSet. This subarray feature is how breeds are managed, see class `Model`
[ { "docid": "e2ff1d44050167de9795b0201b372184", "score": "0.71380365", "text": "constructor(model, AgentClass, name, baseSet = null) {\n super() // create empty AgentArray\n baseSet = baseSet || this // if not a breed, set baseSet to this\n Object.assign(this, { model, name, baseSet, AgentClass })\n // BaseSets know their breeds and keep the ID global\n if (this.isBaseSet()) {\n this.breeds = {} // will contain breedname: breed entries\n this.ID = 0\n // Breeds inherit frm their baseSet and add themselves to baseSet\n } else {\n Object.setPrototypeOf(this, Object.getPrototypeOf(baseSet))\n this.baseSet.breeds[name] = this\n }\n // Keep a list of this set's variables; see `own` below\n // REMIND: not really used. Remove? Create after setup()?\n this.ownVariables = []\n // Create a proto for our agents by having a defaults and instance layer\n // this.AgentClass = AgentClass\n this.agentProto = new AgentClass(this)\n this.protoMixin(this.agentProto, AgentClass)\n // }\n }", "title": "" } ]
[ { "docid": "453e219caa31a5e1f82e35d490747550", "score": "0.5755591", "text": "addAgent(o) {\n // o only for breeds adding themselves to their baseSet\n o = o || Object.create(this.agentProto) // REMIND: Simplify! Too slick.\n if (this.isBreedSet()) {\n this.baseSet.addAgent(o)\n } else {\n o.id = this.ID++\n if (o.agentConstructor) o.agentConstructor()\n }\n this.push(o)\n return o\n }", "title": "" }, { "docid": "509e8d92d382ea1aa3330b0db7c48b88", "score": "0.522496", "text": "function Set() {\n this.set = new Array();\n}", "title": "" }, { "docid": "060e21c69ca6a204ca6fcdd9932f6490", "score": "0.51285493", "text": "function GameObjectSet() {\n this.mSet = [];\n}", "title": "" }, { "docid": "c1613fa3d7758fea15892539b27ae1a0", "score": "0.50473386", "text": "function ArraySet() {\n\t\t\tthis._array = [];\n\t\t\tthis._set = {};\n\t\t}", "title": "" }, { "docid": "1e2a489378a4a25a740b15a2809296ea", "score": "0.5009131", "text": "function Set() {\n\tthis.members = [];\n}", "title": "" }, { "docid": "1b48890111a80d56d2f17d8fa8c24d6a", "score": "0.49983346", "text": "function ArraySet() {\n\t\tthis._array = [];\n\t\tthis._set = Object.create(null);\n\t}", "title": "" }, { "docid": "d901912c7c4ee736f99305fcc1d2e77a", "score": "0.49867848", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = {};\n\t }", "title": "" }, { "docid": "d901912c7c4ee736f99305fcc1d2e77a", "score": "0.49867848", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = {};\n\t }", "title": "" }, { "docid": "d901912c7c4ee736f99305fcc1d2e77a", "score": "0.49867848", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = {};\n\t }", "title": "" }, { "docid": "d901912c7c4ee736f99305fcc1d2e77a", "score": "0.49867848", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = {};\n\t }", "title": "" }, { "docid": "c452284a6f153fcca9f571ebfa73d824", "score": "0.4985795", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "2842cf4a64c8827b4c76d5bb5006a247", "score": "0.49844623", "text": "constructor(){\n this.V = new Set();\n this.E = new Set();\n this.id = ++Graph.id;\n \n return this;\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "118cba88f873a647812130cbcaf6fbd1", "score": "0.49836496", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "bf874377cffa2eb7ca5fca9ebc02f7a1", "score": "0.49776307", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "9106b3d88002ece4aee796bff8e0b495", "score": "0.49714488", "text": "function ArraySet() {\r\n this._array = [];\r\n this._set = Object.create(null);\r\n}", "title": "" }, { "docid": "5516353c63ce0b4da39ce0e84ab0a646", "score": "0.4958818", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = Object.create(null);\n\t}", "title": "" }, { "docid": "5516353c63ce0b4da39ce0e84ab0a646", "score": "0.4958818", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = Object.create(null);\n\t}", "title": "" }, { "docid": "5516353c63ce0b4da39ce0e84ab0a646", "score": "0.4958818", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = Object.create(null);\n\t}", "title": "" }, { "docid": "5516353c63ce0b4da39ce0e84ab0a646", "score": "0.4958818", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = Object.create(null);\n\t}", "title": "" }, { "docid": "5516353c63ce0b4da39ce0e84ab0a646", "score": "0.4958818", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = Object.create(null);\n\t}", "title": "" }, { "docid": "5516353c63ce0b4da39ce0e84ab0a646", "score": "0.4958818", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = Object.create(null);\n\t}", "title": "" }, { "docid": "fdf5694faedfd96eb623071aa65e3c2e", "score": "0.49543163", "text": "function ArraySet() {\n this._array = [];\n this._set = {};\n }", "title": "" }, { "docid": "c923d98dfca6f6b1691f07f3a2b50e6d", "score": "0.49499637", "text": "setBreed(a) {\n // change agent a to be in this breed\n // Return if `a` is already of my breed\n if (a.agentSet === this) return\n // Remove/insert breeds (not baseSets) from their agentsets\n if (a.agentSet.isBreedSet()) a.agentSet.remove(a, 'id')\n if (this.isBreedSet()) this.insert(a, 'id')\n\n // Make list of `a`'s vars and my ownvars.\n const avars = a.agentSet.ownVariables\n // First remove `a`'s vars not in my ownVariables\n for (const avar of avars) {\n if (!this.ownVariables.includes(avar)) delete a[avar]\n }\n // Now add ownVariables to `a`'s vars, default to 0.\n // If ownvar already in avars, it is not modified.\n for (const ownvar of this.ownVariables) {\n if (!avars.includes(ownvar)) a[ownvar] = 0\n } // NOTE: NL uses 0, maybe we should use null?\n\n // Give `a` my defaults/statics\n return Object.setPrototypeOf(a, this.agentProto)\n }", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "654def85c027ab0efbdd63850f539f2d", "score": "0.49484897", "text": "function ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}", "title": "" }, { "docid": "f9a4d5b16dfffa9563d993cf2f5c016c", "score": "0.49186856", "text": "function ArraySet() {\n\t\t this._array = [];\n\t\t this._set = Object.create(null);\n\t\t}", "title": "" }, { "docid": "6eb5f444548e4f7a9a011cd526f96ca9", "score": "0.48958677", "text": "static bruteForce(sourceSet, cardinality, base) {\n\n\n var subsets = Immutable.Set().asMutable();\n\n /**\n * Iteratively builds up subsets. When called and \"countdown\" is not equal to zero it adds a new element of the\n * array \"sourceSet\" to the set \"subset\", adds the new subset to the set \"subsets\" and calls itself with countdown\n * reduced by 1 and the new increased subset \"newsubset\".\n *\n * @param countdown is a positive integer that determines how many times more subsetsgen shall call itself\n * @param subset is a Set.\n */\n var subsetsgen = (countdown, subset) => {\n if (countdown > 0) {\n for (var j = 0; j < sourceSet.length; j++) {\n if (!subset.contains(sourceSet[j])) {\n var newsubset = subset.slice().add(sourceSet[j]);\n subsets.add(newsubset);\n subsetsgen(countdown - 1, newsubset);\n }\n }\n }\n };\n\n subsetsgen(cardinality, base);\n\n // \"base\" is not included in output of subsetsgen\n subsets.add(base);\n return subsets;\n }", "title": "" }, { "docid": "78c1f81a19e3f7c8f68759374f0ca5f7", "score": "0.48739225", "text": "constructor(){\n this.id = ++Graph.id; // anew should be a keyword\n this.V = new Set();\n this.E = new Set();\n \n return this;\n }", "title": "" }, { "docid": "767ae5e1332bdabbcd9f5712fb3d7404", "score": "0.4872294", "text": "setIds() {\n for (let i = 0; i < this.entities.length; i++) {\n this.entities[i].id = i+1;\n }\n return this;\n }", "title": "" }, { "docid": "16bb99e9c1090a8060193f55b013e0f8", "score": "0.48718148", "text": "create() {\n console.log(`AgentSet: Abstract method called: ${this}`)\n }", "title": "" }, { "docid": "1dbbb09b0703e2aaaf61c789ec2cdbad", "score": "0.4848382", "text": "function init() {\n //Initialize datastructures\n agentList = [];\n groupList = [];\n console.log(\"Creating agents\");\n //Create agents\n for (let i = 0; i < agentCount; i++) {\n let agent = new Agent();\n agent.index = i;\n //TODO: Could tweak this to generate differentiated agents.\n agent.likes = new Array(behaviors).fill(1);\n agent.moodHist = new Array(moodHistSize).fill(0);\n agent.currentSlot = 0;\n agent.memory = new Array(agentCount).fill(-1);\n agent.angry = false;\n agentList.push(agent);\n }\n //Create groups\n //(This is the simple case)\n console.log(\"Creating groups\");\n //Single group scenario\n buildGroup(0, \"All\", 0, agentCount, 0, 0, width, height);\n //Leader/worker scenario\n // buildGroup(0, \"Leaders\", 0, 1*agentCount/8, 0, 0, width, 1*height/8 + 45);\n // buildGroup(1, \"Workers\", 1, 7*agentCount/8, 0, 1*height/8 + 45, width, 7*height/8 - 45);\n //Oppressed minority scenario\n // buildGroup(0, \"Majority\", 0, 7*agentCount/8, 0, 0, width, 7*height/8-45);\n // buildGroup(1, \"Minority\", 1, 1*agentCount/8, 0, 7*height/8-45, width, 1*height/8 + 45);\n //Three tier scenario\n // buildGroup(0, \"Execs\", 0, 1*agentCount/16, 0, 0, width, 1*height/16 + 32);\n // buildGroup(1, \"Managers\", 1, 3*agentCount/16, 0, 1*height/16 + 32, width, 3*height/16 + 20);\n // buildGroup(2, \"Workers\", 2, 3*agentCount/4, 0, 1*height/4+52, width, 3*height/4 - 52);\n //Siloed teams scenario\n // buildGroup(0, \"Leaders\", 0, 2*agentCount/16, 0, 0, width, 1*height/8 + 45);\n // buildGroup(1, \"Team A\", 1, 7*agentCount/16, 0, 1*height/8 + 45, width/2, 7*height/8 - 45);\n // buildGroup(2, \"Team B\", 1, 7*agentCount/16, width/2, 1*height/8 + 45, width/2, 7*height/8 - 45);\n //Assign agents to groups\n let currentAgent = 0;\n for (let i = 0; i < groupCount; i++) {\n let group = groupList[i];\n let interval = ((agentRadius + border) * 2);\n let row = Math.floor(group.width / interval);\n let offset = Math.floor((group.width - (row * interval)) / 2) + agentRadius;\n for (let j = 0; j < group.size; j++) {\n let agent = agentList[currentAgent];\n agent.x = group.x + (j % row) * interval + offset;\n agent.y = group.y + agentsY + Math.floor(j / row) * interval + offset;\n agent.group = i;\n agent.rank = group.rank;\n group.agents.push(agent);\n currentAgent++;\n }\n }\n /* Determine partners for agents\n Trivial case for testing\n */\n // for (let i = 0; i < groupCount; i++) {\n // for (let j = 0; j < groupList[i].agents.length; j++) {\n // let agent = groupList[i].agents[j];\n // agent.partnerBias = [].concat(groupList[i].agents);\n // }\n // }\n /* Determine partners for agents\n Universal case for basic tiered org dysfunction (everyone talks to everyone)\n */\n for (let i = 0; i < groupCount; i++) {\n for (let j = 0; j < groupList[i].agents.length; j++) {\n let agent = groupList[i].agents[j];\n agent.partnerBias = [].concat(agentList);\n }\n }\n /* Determine partners for agents\n Tribal case for basic tiered org dysfunction\n (People are more likely to talk to their own group)\n */\n // for (let i = 0; i < groupCount; i++) {\n // for (let j = 0; j < groupList[i].agents.length; j++) {\n // let agent = groupList[i].agents[j];\n // agent.partnerBias = [].concat(agentList);\n // }\n // }\n /* Determine partners for agents\n Partitioned case for siloed teams\n */\n // let teamALeaders:Agent[] = groupList[0].agents.slice(0,groupList[0].agents.length/2);\n // let teamBLeaders:Agent[] = groupList[0].agents.slice(groupList[0].agents.length/2);\n //\n // for (let i = 0; i < groupCount; i++) {\n // for (let j = 0; j < groupList[i].agents.length; j++) {\n //\n // let agent = groupList[i].agents[j];\n // agent.partnerBias = [].concat(groupList[i].agents);\n //\n // if (i == 0) {\n // //Leaders are twice as likely to want to talk to other leaders.\n // agent.partnerBias = agent.partnerBias.concat(groupList[0].agents);\n //\n // if (j < groupList[0].agents.length/2) {\n // agent.partnerBias = agent.partnerBias.concat(groupList[1].agents);\n // } else {\n // agent.partnerBias = agent.partnerBias.concat(groupList[2].agents);\n // }\n //\n // } else if (i == 1) {\n // agent.partnerBias = agent.partnerBias.concat(teamALeaders);\n //\n // //Workers are twice as likely to want to talk to their bosses.\n // agent.partnerBias = agent.partnerBias.concat(teamALeaders);\n //\n // } else if (i == 2) {\n // agent.partnerBias = agent.partnerBias.concat(teamBLeaders);\n //\n // //Workers are twice as likely to want to talk to their bosses.\n // agent.partnerBias = agent.partnerBias.concat(teamBLeaders);\n // }\n // }\n // }\n paint();\n }", "title": "" }, { "docid": "9128ce83a6e6dbf208bc6947bec23855", "score": "0.4827152", "text": "constructor(\n /// The node types in this set, by id.\n types) {\n this.types = types;\n for (let i = 0; i < types.length; i++)\n if (types[i].id != i)\n throw new RangeError(\"Node type ids should correspond to array positions when creating a node set\");\n }", "title": "" }, { "docid": "1be5b37c3e0867c12314c2df61120d74", "score": "0.48245728", "text": "function Set()\n{\n this.avalues = new Array();\n this.asize = -1;\n}", "title": "" }, { "docid": "034a369461746ca3fce3227e75e1e810", "score": "0.48231032", "text": "constructor() {\n this.vertexes = new Set();\n }", "title": "" }, { "docid": "0f87521bef59e443bd61929166bac28d", "score": "0.4794531", "text": "newBreed(name) {\n return new AgentSet(this.model, this.AgentClass, name, this)\n }", "title": "" }, { "docid": "6e6dcf0b0e9e9f28439873fa70fdaa99", "score": "0.47836557", "text": "function Spriteset_Base() {\n this.initialize.apply(this, arguments);\n}", "title": "" }, { "docid": "ce76eb6bb981863089708555013d875d", "score": "0.47690257", "text": "function Branches() {\n this.collection = new Array(16) ;\n this.initialized = false ;\n}", "title": "" }, { "docid": "61f4de57bf9b2a68206ee5f2131211cc", "score": "0.47257838", "text": "addAgent() {\n let emptySpots = [];\n for (let x = 0; x < COLS; x++) {\n for (let y = 0; y < ROWS; y++) {\n if (this.agents[x][y] === null) emptySpots.push(createVector(x, y));\n }\n }\n let spot = random(emptySpots);\n this.agents[spot.x][spot.y] = new Agent();\n }", "title": "" }, { "docid": "41215865fe784c449b2c6909ef56b505", "score": "0.47170803", "text": "function TerrainSet()\n{\n this.mSet = [];\n}", "title": "" }, { "docid": "c11dcd161132e5dd0fc9513325d05f4b", "score": "0.47132394", "text": "constructor(data){\n this.data = data;\n this.id = ++Vertex.id;\n \n this.edges = new Set();\n return this;\n }", "title": "" }, { "docid": "7f5392e1762872684e99b2c9f5a618fe", "score": "0.47083125", "text": "removeAgent(o) {\n // Remove me from my baseSet\n if (this.isBreedSet()) this.baseSet.remove(o, 'id')\n // Remove me from my set.\n this.remove(o, 'id')\n return this\n }", "title": "" }, { "docid": "d49a2daa994b3faa84ac61f3e28f01ab", "score": "0.46576792", "text": "constructor(size){\n this.id = [];\n for(var i = 0; i < size; i++){\n id[i] = i;\n }\n }", "title": "" }, { "docid": "36d70a53748ccccd31caab905e2112c2", "score": "0.46558824", "text": "function initialSetUp() {\n for (var i=1; i<=numberOfDiscs; i++){\n rodA.push(i);\n }\n}", "title": "" }, { "docid": "cacfc577b6b51eb0a78d981c9b125a42", "score": "0.46459025", "text": "createInitialSpecies() {\n for (var i = 0; i < INITIAL_SPECIES; i++) {\n let species = new Species()\n for (var j = 0; j < INITIAL_GENOMES_PER_SPECIES; j++) {\n let genome = this.createNewGenome();\n species.genomes.push(genome);\n }\n this.species.push(species);\n }\n }", "title": "" }, { "docid": "97f4af8badf591d85337af32196792fa", "score": "0.46442825", "text": "constructor(ids: number) {\n super();\n \n }", "title": "" }, { "docid": "355c2b339d36a8c02b60a80fd87454ed", "score": "0.46326718", "text": "function Builder() {\n UpdateSetBase.Builder.call(this);\n}", "title": "" }, { "docid": "b7036777a3e8841c4c3de91761c47c33", "score": "0.46264136", "text": "static bruteForceCapped(sourceSet, cardinality, base, memory= 10) {\n return SubsetGenerationStrategies.bruteForce(sourceSet.slice(sourceSet.lenght - memory), cardinality, base);\n }", "title": "" }, { "docid": "17dddd2693101996b9092b583598d644", "score": "0.4590605", "text": "function MagicBulletSet() {\n this.mSet = [];\n GameObjectSet.call(this);\n}", "title": "" }, { "docid": "152b064345a51ceaf121121d1e3e42f0", "score": "0.4568191", "text": "initAgents(){\n const sim = this;\n const config = sim.config;\n sim.pool = new Pool();\n sim.buyersPool = new Pool();\n sim.sellersPool = new Pool();\n sim.numberOfBuyers = Math.round(config.numberOfBuyers) || config.buyerValues.length;\n sim.numberOfSellers = Math.round(config.numberOfSellers) || config.sellerCosts.length;\n config.buyerRate = config.buyerRate || [1];\n config.sellerRate = config.sellerRate || [1];\n if (typeof(config.buyerRate)==='number'){\n config.buyerRate = [config.buyerRate];\n }\n if (typeof(config.sellerRate)==='number'){\n config.sellerRate = [config.sellerRate];\n }\n if ( (!sim.numberOfBuyers) || (!sim.numberOfSellers) )\n throw new Error(\"single-market-robot-simulation: can not determine numberOfBuyers and/or numberOfSellers \");\n sim.numberOfAgents = sim.numberOfBuyers+sim.numberOfSellers;\n const common = {\n integer: config.integer,\n ignoreBudgetConstraint: config.ignoreBudgetConstraint,\n period: {number:0, equalDuration:true, duration:(config.periodDuration || 1000), init: {inventory:{X:0, money:0}}},\n minPrice: config.L,\n maxPrice: config.H\n };\n sim.periodDuration = common.period.duration;\n for(let i=0,l=sim.numberOfBuyers;i<l;++i){\n const a = sim.newBuyerAgent(i, common);\n sim.buyersPool.push(a);\n sim.pool.push(a);\n }\n for(let i=0,l=sim.numberOfSellers;i<l;++i){\n const a = sim.newSellerAgent(i, common);\n sim.sellersPool.push(a);\n sim.pool.push(a);\n }\n sim.buyersPool.distribute('values','X',config.buyerValues);\n sim.sellersPool.distribute('costs','X',config.sellerCosts);\n }", "title": "" }, { "docid": "21b573028c8529af8e39bf79969f159a", "score": "0.4536116", "text": "static addAgent(agent) {\n const id = agent.id;\n if (id !== this.getNextAvailableId()) {\n throw new RegalError(`Expected an agent with id <${this.getNextAvailableId()}>.`);\n }\n this[id] = agent;\n this._agentCount++;\n }", "title": "" }, { "docid": "0df893ee162ab166ec870a1ec3768edc", "score": "0.45243782", "text": "function AnimalMaster(data,set=1){\n this.pathUrl = data.image_url;\n this.title = data.title;\n this.description = data.description;\n this.keyword = data.keyword;\n this.horns = data.horns;\n\n if(set===1) {\n allAnimalsinfo.push(this);\n }else if(set ===2){\n allAnimalsInfoSetTwo.push(this);\n }\n\n}", "title": "" }, { "docid": "e276ae72873c45162f3725b12a0e90d8", "score": "0.45033345", "text": "function FakeSet() {\n\tthis.data = {};\t\t\t// Object to store items\n\tthis.length = 0;\n}", "title": "" }, { "docid": "3f252df6fd879a4520ea0bc3a7102842", "score": "0.44984064", "text": "initializePopulation() {\n let startSpecies = new Species();\n for (let i = 0; i < this.populationSize; i++) {\n let member = new Network(this.numInputs, this.numOutputs, this.innovation);\n startSpecies.members.push(member);\n }\n\n this.species.push(startSpecies);\n this.flattenSpecies();\n }", "title": "" }, { "docid": "80cb6395c9f47349bf70134b9c9f0bec", "score": "0.4495872", "text": "populate() {\n util.repeat(this.model.world.numX * this.model.world.numY, i => {\n this.addAgent() // Object.create(this.agentProto))\n })\n }", "title": "" }, { "docid": "2dfb22b21c493803db951c4b3c6f9f20", "score": "0.44849858", "text": "initialiseNewGame() {\n GeneticAlgorithm.generateRandomPopulation(this.sampleSize, this.agentProperties)\n .map(agent => this.createObject(agent, this.groups.agents));\n this.createObstacle();\n }", "title": "" }, { "docid": "3d2e5c870e7e708d4509cf4a853d8beb", "score": "0.4475648", "text": "createRandomSet(ref) {\n \n //Only creates sets dependant on the wave value for the purpose of difficulty curve.\n var maxType = 1;\n if (this.level >= 3) { maxType = 2; }\n if (this.level >= 5) { maxType = 3; }\n \n var enemyType = Phaser.Math.Between(1, maxType);\n \n var bounds = game.physics.world.bounds;\n \n if (enemyType == 1) { \n var rndx = Math.random() * bounds.width;\n var rndy = Math.random() * bounds.height;\n var length = Phaser.Math.Between(3 + Math.floor((this.level - 1) / 2), 5 + Math.floor((this.level - 1) / 2));\n length = Math.min(length, this.enemyCount - ref.enemyGroup.getLength());\n ref.createBasicSet(rndx, rndy, length);\n }\n \n if (enemyType == 2) { \n var rndx = Math.random() * bounds.width;\n var rndy = Phaser.Math.Between(bounds.height * 0.2, bounds.height * 0.8);\n var length = Phaser.Math.Between(3 + Math.floor((this.level - 1) / 2), 5 + Math.floor((this.level - 1) / 2));\n length = Math.min(length, this.enemyCount - ref.enemyGroup.getLength());\n ref.createWaverSet(rndx, rndy, length);\n }\n \n if (enemyType == 3) {\n var length = 2 + Math.floor((this.level - 3) / 3);\n length = Math.min(length, this.enemyCount - ref.enemyGroup.getLength());\n ref.createDiverSet(length);\n }\n \n }", "title": "" }, { "docid": "c25c94fdd36705008b93024ff55d4a39", "score": "0.44571903", "text": "function FeatureSet() {\n this.features = [];\n this.map = {};\n}", "title": "" }, { "docid": "a731704c8aba7cff616bc4a42b9848e9", "score": "0.44426975", "text": "function setEnemies() {\n for(var i=0; i<enemiesQty; i++) {\n allEnemies.push(new Enemy());\n }\n}", "title": "" }, { "docid": "515f42af92585ae272fa72133cd709e4", "score": "0.4437529", "text": "function Set(/*iterable*/) {\n var set = strict(this);\n var iterable = arguments[0];\n\n if (Type(set) !== 'object') throw TypeError();\n if ('[[SetData]]' in set) throw TypeError();\n\n if (iterable !== undefined) {\n var adder = set['add'];\n if (!IsCallable(adder)) throw TypeError();\n var iter = GetIterator(ToObject(iterable));\n }\n set_internal(set, '[[SetData]]', []);\n if (iter === undefined) return set;\n while (true) {\n var next = IteratorStep(iter);\n if (next === false)\n return set;\n var nextValue = IteratorValue(next);\n adder.call(set, nextValue);\n }\n\n return set;\n }", "title": "" }, { "docid": "515f42af92585ae272fa72133cd709e4", "score": "0.4437529", "text": "function Set(/*iterable*/) {\n var set = strict(this);\n var iterable = arguments[0];\n\n if (Type(set) !== 'object') throw TypeError();\n if ('[[SetData]]' in set) throw TypeError();\n\n if (iterable !== undefined) {\n var adder = set['add'];\n if (!IsCallable(adder)) throw TypeError();\n var iter = GetIterator(ToObject(iterable));\n }\n set_internal(set, '[[SetData]]', []);\n if (iter === undefined) return set;\n while (true) {\n var next = IteratorStep(iter);\n if (next === false)\n return set;\n var nextValue = IteratorValue(next);\n adder.call(set, nextValue);\n }\n\n return set;\n }", "title": "" }, { "docid": "8399af928335a24140ad43150de25aa8", "score": "0.44348383", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}", "title": "" }, { "docid": "8399af928335a24140ad43150de25aa8", "score": "0.44348383", "text": "function ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}", "title": "" }, { "docid": "3000926cafe6948cf1f89066f2434821", "score": "0.440996", "text": "function NodeSet() {\n\tthis.values = [];\n}", "title": "" }, { "docid": "a54558d6ffb4c7e8d74d7d25976520f8", "score": "0.44050103", "text": "protoMixin(agentProto, AgentClass) {\n Object.assign(agentProto, {\n agentSet: this,\n model: this.model,\n // world: this.world\n })\n agentProto[this.baseSet.name] = this.baseSet\n\n // if (this.isBaseSet()) {\n // Model.reset should not redefine these.\n if (!AgentClass.prototype.setBreed) {\n Object.assign(AgentClass.prototype, {\n setBreed(breed) {\n breed.setBreed(this)\n },\n getBreed() {\n return this.agentSet\n },\n isBreed(breed) {\n return this.agentSet === breed\n },\n })\n Object.defineProperty(AgentClass.prototype, 'breed', {\n get: function () {\n return this.agentSet\n },\n })\n }\n }", "title": "" } ]
d7f8286a72763c874ed8be9bc47b2bb3
Helper function to let the component know if it's being used in the CMS or in a frontend page.
[ { "docid": "dafad14b1e5620fd15179d91e4790c5a", "score": "0.0", "text": "isPreview() {\n const { config } = this.constructor;\n const { collection } = this.props;\n try {\n return config\n && config.categories\n && collection\n && config.categories.indexOf(collection.getIn([ 'name' ])) !== -1;\n }\n catch (ex) {\n return false;\n }\n }", "title": "" } ]
[ { "docid": "c38aa5f38a915bd72d106cca73c12a2e", "score": "0.5719746", "text": "shouldRender(componentType) {\r\n var _a;\r\n const isSSR = isPlatformServer(this.platformId);\r\n return !(isSSR && ((_a = this.getMapping(componentType)) === null || _a === void 0 ? void 0 : _a.disableSSR));\r\n }", "title": "" }, { "docid": "ffd2391c0b1ed21dc463490c5165d805", "score": "0.5678891", "text": "function zzDoCustIsTargetPage() {\n // FIXME: Is there a better way to verify if this is a simple-item-view page?\n return document.getElementsByClassName(\"simple-item-view-show-full\")[0];\n}", "title": "" }, { "docid": "429b445854879ed43535cf3a19b01acc", "score": "0.55451375", "text": "function verifyComponent(param){\n //No components yet\n // if (param === \"/components/navigation-bar.html\"\n // || param === \"/js/connect/make-posting.js\"\n // || param === \"/js/courses.js\"\n // ){\n // return true;\n // }\n return false;\n}", "title": "" }, { "docid": "2867ef67868a23490becf7c7d5630599", "score": "0.5481917", "text": "function isPage(){\n try{\n return parent instanceof parent.Page;\n } catch(error){\n return false;\n }\n }", "title": "" }, { "docid": "e1fc9f103bb2b36310eb4151bd7acb0c", "score": "0.5469695", "text": "function isThisPageAnyBuildingPage() { return (isPageAnyBuildingPage(document.location.href)); }", "title": "" }, { "docid": "60e1a919a1792f5299e1876583f1ad93", "score": "0.54209167", "text": "isComponent(el) {\n if (el.getAttribute && el.getAttribute('data-slot') === 'dynamicContent') {\n return {\n type: 'dynamic-content'\n };\n }\n\n return false;\n }", "title": "" }, { "docid": "6924eaa309d3749df6aefc89e09002f8", "score": "0.54052305", "text": "function checkPageForReact() {\n createPanelIfReactLoaded();\n}", "title": "" }, { "docid": "10d884b56bd4f1bbc3c2e37578bddd14", "score": "0.5401377", "text": "async handler() {\n if (this.moduleName === '@apostrophecms/page') {\n await this.evaluateExternalConditions();\n }\n }", "title": "" }, { "docid": "c21375d766642adbfec24a2c9ec81e0c", "score": "0.5359452", "text": "function isServer() {\n return !(typeof window !== 'undefined' && window.document);\n}", "title": "" }, { "docid": "f26f0cbe6c63650e228069196f64be2c", "score": "0.53492135", "text": "isProductPage() {\n let path = location.pathname.substring(1).split('/');\n return path.length === 4 && path[0] === 'shop';\n }", "title": "" }, { "docid": "b703bcd253917f34645494cc6bf09935", "score": "0.53366095", "text": "function beforeRender() {\n if(localStorage.getItem(\"login\") !== null) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "1bbf5c03cc3550c25dac925c6fb400bc", "score": "0.5328959", "text": "isComponent(){\n\t\treturn this.kind == UIStruct.TYPE_COMPONENT;\n\t}", "title": "" }, { "docid": "9b4389997f42ef95e7df6eae93d44640", "score": "0.5267993", "text": "static get isAvailable() {\n if (!this.microsoftTeamsLib) {\n return false;\n }\n if (window.parent === window.self && window.nativeInterface) {\n // In Teams mobile client\n return true;\n }\n else if (window.name === 'embedded-page-container' || window.name === 'extension-tab-frame') {\n // In Teams web/desktop client\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3dab3a20a2a695cae6bf75e39f6dfa73", "score": "0.5176904", "text": "static initialize() {\n const Comp = this;\n const { config } = this;\n\n // Push this component into our internal array, so that we know\n // which and how many will be needed during build.\n Components.push(Comp);\n\n // We don't initialize the components here when building server-side,\n // that happens in .build() below.\n // eslint-disable-next-line\n if (typeof navigator !== 'undefined' && navigator.userAgent.includes('jsdom')) {\n return Comp;\n }\n\n // TODO: Implement some time eventually.\n // Initialization is a little non-standard; ideally we'd set .propTypes directly on each\n // component, but I'm having a little trouble concatenating the objects that way, so\n // setting propTypes in config instead.\n // if(config.propTypes) {\n // Object.assign(Comp.propTypes, config.propTypes);\n // }\n\n if (typeof CMS !== 'undefined') {\n // Load the necessary components as preview components of those content types.\n if (config.categories) {\n const cats = Array.isArray(config.categories) ? config.categories : [ config.categories ];\n cats.forEach((cat) => {\n CMS.registerPreviewTemplate(cat, Comp);\n });\n }\n\n // Custom widgets need to be registered by the appropriate methods as well.\n if (config.widget) {\n CMS.registerWidget(config.widget.name, Comp, config.widget.preview);\n }\n\n // This is only needed for CMS Previews currently; on website pages these will ideally\n // go in the baseof.html file directly.\n if (config.styles) {\n const styles = Array.isArray(config.styles) ? config.styles : [ config.styles ];\n styles.forEach((style) => {\n CMS.registerPreviewStyle(style);\n });\n }\n }\n\n // Otherwise we're in the main site, so we should build all the necessary components as\n // individual parts of the page\n else if (config.tag) {\n const nodes = document.querySelectorAll(`[besugo-component=\"${config.tag}\"]`);\n nodes.forEach((node) => {\n // Send the node data into the component so that it knows what to build\n const props = Comp.getPropsFromPlaceholder(node);\n\n // The react component is already rendered at this point, so we \"hydrate\" any\n // needed dynamics and finishing routines on that same markup.\n hydrate(<Comp { ...props } />, node);\n });\n }\n\n return Comp;\n }", "title": "" }, { "docid": "559fa511591c25f90a6082e8c5079be6", "score": "0.5154658", "text": "function CoreLayout ({ children }) {\n return (\n <div className='page-container govready-container'>\n <div className='view-container container'>\n {config.siteId && children}\n {!config.siteId && (\n <div>\n <h2>Looks like something didn't load properly</h2>\n <p>Please try refreshing the page</p>\n </div>\n )}\n <br />\n <br />\n <SitesList />\n <p className=\"well well-sm well-faint text-center\">\n <small>Dashboard connected to {config.connectUrl}</small>\n </p>\n </div>\n </div>\n );\n}", "title": "" }, { "docid": "a220da6c48f7f84c307bd9ed3d7c33c4", "score": "0.512297", "text": "function isContainer(alias) {\n if (alias === 'console:navSection' || alias === 'core:folder' || alias === 'core:documentFolder' || alias === 'console:privateContentSection') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ef9dfd9f61cbdb4771a1cd1aef268cb1", "score": "0.5101331", "text": "function canShowAds() {\r\n return window.sas !== undefined;\r\n }", "title": "" }, { "docid": "722b711544cd4c61077e03a9315db4ef", "score": "0.50894034", "text": "isBeingLookedAt() {\n let isOnDashboard = ['dashboard'].includes(this.$state.current.name) && this.active;\n let isExploreOrCardBuilder = ['cardExplore', 'cardBuilder'].includes(this.$state.current.name);\n let isCurrentCard = this.id === parseInt(this.$state.params.cardId);\n let isOnHomepage = ['home'].includes(this.$state.current.name) && this.active;\n\n return isOnHomepage || isExploreOrCardBuilder && isCurrentCard || isOnDashboard;\n }", "title": "" }, { "docid": "cb505a5a7071aff53be4a85412b9b7f6", "score": "0.50716573", "text": "function isMainPageChange() {\n try {\n if (vm.module.pageObj._id) {\n // check this page is used an another scope as main page then check cannot be uncheck \n moduleDataSvc.checkIsMainPage(vm.module.pageObj).then(function (result) {\n if (result.data) {\n vm.module.pageObj.isMainPage = true;\n usedAsMainPageMsg();\n }\n\n\n });\n }\n } catch (e) {\n showErrorMsg(e);\n } \n }", "title": "" }, { "docid": "d6afaed734e231674ec6af77c07e3146", "score": "0.5043938", "text": "choosePage() {\n const { accessToken, gistId } = this.props.settings;\n if (!accessToken && !gistId) {\n return pages.WELCOME;\n } else if (!accessToken) {\n return pages.LOGIN;\n } else if (!gistId) {\n return pages.SELECT_GIST;\n } else {\n return pages.MAIN;\n }\n }", "title": "" }, { "docid": "47ed483a566e405bdfc4eac719b16e4e", "score": "0.50346845", "text": "static get is() {\n\t\treturn 'aspen-link';\n\t}", "title": "" }, { "docid": "9e7847b38e8f0309948fed872b16a802", "score": "0.5028223", "text": "showTenant() {\n return !this.ui.state.loginOptions || this.isLocal() || this.isShowTenant();\n }", "title": "" }, { "docid": "9e7847b38e8f0309948fed872b16a802", "score": "0.5028223", "text": "showTenant() {\n return !this.ui.state.loginOptions || this.isLocal() || this.isShowTenant();\n }", "title": "" }, { "docid": "c9645a89a32f7f69d469712b7b77237f", "score": "0.50262123", "text": "checkAuth() {\n\n if (this.props.userType === 'user' && !adminOnly) {\n\n this.setState({showComponent: true});\n\n } else if (this.props.userType === 'admin' && adminOnly) {\n this.setState({showComponent: true});\n }\n }", "title": "" }, { "docid": "62906c09cdf47367b0b0d7ebd9afc928", "score": "0.4992961", "text": "static isDesignSystemProvider(el) {\n return el.isDesignSystemProvider || DesignSystemProvider.tagNames.indexOf(el.tagName) !== -1;\n }", "title": "" }, { "docid": "ca1a740482fdb02c806ee98fd0eddeb8", "score": "0.4989209", "text": "static check_page(banner){\n\n\t\t// Check specific page version (i.e profile, messages...)\n\t\t// This overrules categories and boards\n\t\t// Current there is no conflict with cats and boards\n\n\t\tif(this.specific_page_match(banner.show_on_page)){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(this.board_match(banner.boards)){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(this.category_match(banner.categories)){\n\t\t\treturn true;\n\t\t}\n\n\t\tif(this.custom_page_match(banner.custom_pages)){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a5ea43e796a0d127ffde6d1adb998d6b", "score": "0.495397", "text": "getRenderFromState() {\n if (this.state && (this.state.projectsList || this.state.getProjects$)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "77604156ed4c813e82f18867bb022d4b", "score": "0.49473938", "text": "function isOmniInstore(){\n\tif(window.location.pathname.split(\"/\")[2] != undefined && window.location.pathname.split(\"/\")[2].indexOf(\"instore\")!=-1){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "66962d1149a3d9fe3114c70fe6c9858f", "score": "0.49448252", "text": "handleCmsRoutesInGuard(pageContext, componentTypes, currentUrl, currentPageLabel) {\r\n if (this.cmsRouteExists(currentPageLabel)) {\r\n return true;\r\n }\r\n const componentRoutes = this.cmsComponentsService.getChildRoutes(componentTypes);\r\n if (componentRoutes.length) {\r\n if (this.updateRouting(pageContext, currentPageLabel, componentRoutes)) {\r\n this.router.navigateByUrl(currentUrl);\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "02c92a96578a5f6ed50c8be5b480de00", "score": "0.49373636", "text": "beforeRender() {}", "title": "" }, { "docid": "02c92a96578a5f6ed50c8be5b480de00", "score": "0.49373636", "text": "beforeRender() {}", "title": "" }, { "docid": "6791e324fb6361d6cbd4fc3aa6f561d2", "score": "0.49345103", "text": "get visible() {\n var page = $(this.pageDivName);\n return page && page.ownerDocument.defaultView.getComputedStyle(\n page).display == 'block';\n }", "title": "" }, { "docid": "ff7e5ba237677dc20a3b02696ecd25c4", "score": "0.49309438", "text": "function filterPage (page) {\n // Those with @ are deprecated (eg, `[email protected]`)\n if (page.url.includes('@')) {\n return false\n }\n\n // Assets are obviously not supposed to be there\n if (page.url.match(/^\\/assets/)) {\n return false\n }\n\n return true\n}", "title": "" }, { "docid": "959b2d0e49c29ccffeb1475f8656f7d0", "score": "0.49297538", "text": "beforeRender () {}", "title": "" }, { "docid": "af3019a3fe45862183c1de812e347611", "score": "0.49284208", "text": "function engineIsRendering() {\n\t\treturn _state === States.Rendering;\n\t}", "title": "" }, { "docid": "cd2a5ebb811fc21c589190a9567661d7", "score": "0.49200255", "text": "render() {\n const {intl, data} = this.props;\n\n var chairman = data.cms.nodeQuery.entities[0].entityTranslation;\n\n return (\n <Layout>\n <Header headerType=\"black-header\"/>\n <Caption\n headerText={chairman.fieldChairmanMainPageTitle}\n contentText={chairman.fieldChairmanMainPageSubtitl}\n />\n <Content data={chairman} />\n <SideBar />\n <Footer />\n </Layout>\n );\n }", "title": "" }, { "docid": "8e8f4a7fbec7dbad70761a10d585c089", "score": "0.4918987", "text": "isFilterPageDisplayed() { //method to check if Filter page is displayed or not\n return elementUtil.doIsDisplayed(this.filterTitle);\n }", "title": "" }, { "docid": "bbecc41c8133c54b6834ff82fa8e1c5c", "score": "0.49177787", "text": "shouldRender(caller, config) {\r\n return (Boolean(config.component) &&\r\n (this.renderedCallers.some((el) => el.caller === caller)\r\n ? !!config.multi\r\n : true));\r\n }", "title": "" }, { "docid": "f03812961d291277e59c06a6512fe137", "score": "0.4913616", "text": "function checkClientSettings() {\n if (clientActive != undefined) {\n getClientContent(clientActive);\n } else if (clientID != undefined) {\n getClientContent(clientID);\n } else {\n getCaseContent();\n }\n}", "title": "" }, { "docid": "102cb8dc4f9fd4ab8b0058fdfe475b44", "score": "0.48975128", "text": "function _detectURL(){\n\tvar winURL = window.location + \"\";\n\t/* we need the page that is showing */\n\tvar winURLReverse = reverseString(winURL);\n\tvar intLastSolidusPosition = getLastSlash(winURLReverse);\n\tvar pageName = getPageName(winURL, intLastSolidusPosition);\n\t/* we need to match our pageName with the value in our object literal \"site\" */\n\tvar intObjLiteralArrayIndex = getMatch(pageName);\n\tvar blnHasTopMenu = true;\n\n\t/* ok, use our object literal, site, second Array that has a one-one correspondance with each Array in site */\n\t/* use this second Array to write to the document */\n\twriteMessageToDocument(intObjLiteralArrayIndex);\n\t/* style the link associated with the page the visitor is rendering */\n\tif(!(!!document.getElementById(site.linkContainerId.top)) ){\n\t\tblnHasTopMenu = false;\n\t}else{\n\t\tstyleRespectiveLink(site.linkContainerId.top, intObjLiteralArrayIndex);\n\t}\t\n\tstyleRespectiveLink(site.linkContainerId.bottom, intObjLiteralArrayIndex);\n}", "title": "" }, { "docid": "d47e0410c27adfbe3d957ca4aef0b896", "score": "0.4876889", "text": "function _isBuild(){\n\treturn (this._viewPanel) ? true : false;\n}", "title": "" }, { "docid": "323f2f5aad2ee1b7435251fe042b66c7", "score": "0.48755625", "text": "function isCalledWithinLightbox() {\n return jQuery('#renderedInLightBox').val() == 'true'\n // reverting for KULRICE-8346\n// try {\n// // For security reasons the browsers will not allow cross server scripts and\n// // throw an exception instead.\n// // Note that bad browsers (e.g. google chrome) will not catch the exception\n// if (jQuery(\"#fancybox-frame\", parent.document).length) {\n// return true;\n// }\n// }\n// catch (e) {\n// // ignoring error\n// }\n//\n// return false;\n}", "title": "" }, { "docid": "0fe927171a9cf99fa3d47cf11c97e29b", "score": "0.48745707", "text": "hasCustomTemplate() {\n const template = this.templates ? this.templates.first : undefined;\n const menuTemplate = this.dropdown && this.dropdown.templates ?\n this.dropdown.templates.first : undefined;\n return Boolean(template && template !== menuTemplate);\n }", "title": "" }, { "docid": "0fe927171a9cf99fa3d47cf11c97e29b", "score": "0.48745707", "text": "hasCustomTemplate() {\n const template = this.templates ? this.templates.first : undefined;\n const menuTemplate = this.dropdown && this.dropdown.templates ?\n this.dropdown.templates.first : undefined;\n return Boolean(template && template !== menuTemplate);\n }", "title": "" }, { "docid": "10963c50ddc0124adf1983f0fbad9ecb", "score": "0.4874179", "text": "verifyCurrentPage() {\n let currentPage = browser.getTitle();\n if (currentPage.includes(\"Dashboard\")) {\n allure.createStep('User is on Dashboard');\n }\n else {\n // super.dashboardLink.scroll();\n super.dashboardLink.click();\n //allure.addDescription(\"open the server instance\");\n }\n }", "title": "" }, { "docid": "c39f6160bd3cf8ae491b3ffc3ba99f46", "score": "0.4874033", "text": "isRealEnterprise() {\n return ProductFeatures.isEnterpriseProduct(this.getProduct());\n }", "title": "" }, { "docid": "0317bdf85ef9327cc84d8c7560a22716", "score": "0.4873758", "text": "function isDynamicPage()\r\n{\r\n //page will have \"/tp/\" folder in the path\r\n //and will be named \"<UUID>.html\"\r\n\r\n var path = window.location.pathname;\r\n var pageName = path.split(\"/\").pop();\r\n\r\n var example = \"0C109B3C-1FC3-4EEB-AF02-D604D476FF74.html\";\r\n var isDyn = path.indexOf(\"tp/\") != -1 && pageName.length == example.length;\r\n\r\n return (isDyn);\r\n}", "title": "" }, { "docid": "7279cc8079cb2e9a181d44c4b49d426d", "score": "0.48649102", "text": "function isEmbedded() {\n try {\n return (window.self !== window.top);\n } catch {\n return true;\n }\n}", "title": "" }, { "docid": "3c7b69db322e211815f31cdd59d8528a", "score": "0.48633125", "text": "function App() {\n const [currentPage, setPage] = useState({\n page: \"list_settings\",\n });\n\n const [currentUser, setCurrentUser] = useState({});\n\n useEffect(() => {\n (async function loadCurrentUser() {\n const userData = await getCurrentUserData();\n setCurrentUser(userData);\n if (userData?.profile?.name !== \"Administrator\") {\n window.alert(\"Sorry only CRM admins can access this screen\");\n }\n })();\n }, []);\n\n const page = () => {\n if (currentPage.page === \"list_settings\") {\n return <SettingsPage setPage={setPage} message={currentPage.message} />;\n } else if (currentPage.page === \"edit_setting\") {\n return (\n <EditSettingsPage setPage={setPage} recordID={currentPage.recordID} />\n );\n }\n };\n\n if (currentUser?.profile?.name !== \"Administrator\") {\n return null;\n }\n\n return (\n <ErrorBoundary>\n <div className=\"App\">{page()}</div>\n </ErrorBoundary>\n );\n}", "title": "" }, { "docid": "f6ec0e93bd4f2671d1727f9d6e4c5e4e", "score": "0.48593742", "text": "function create_if_block(ctx) {\n\tlet current;\n\n\tconst home = new _pages_Home_svelte__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n\t\t\tprops: {\n\t\t\t\ttitle: /*title*/ ctx[0],\n\t\t\t\tdescription: /*description*/ ctx[1]\n\t\t\t}\n\t\t});\n\n\treturn {\n\t\tc() {\n\t\t\t!(function webpackMissingModule() { var e = new Error(\"Cannot find module 'svelte/internal'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())(home.$$.fragment);\n\t\t},\n\t\tm(target, anchor) {\n\t\t\t!(function webpackMissingModule() { var e = new Error(\"Cannot find module 'svelte/internal'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())(home, target, anchor);\n\t\t\tcurrent = true;\n\t\t},\n\t\tp(ctx, dirty) {\n\t\t\tconst home_changes = {};\n\t\t\tif (dirty & /*title*/ 1) home_changes.title = /*title*/ ctx[0];\n\t\t\tif (dirty & /*description*/ 2) home_changes.description = /*description*/ ctx[1];\n\t\t\thome.$set(home_changes);\n\t\t},\n\t\ti(local) {\n\t\t\tif (current) return;\n\t\t\t!(function webpackMissingModule() { var e = new Error(\"Cannot find module 'svelte/internal'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())(home.$$.fragment, local);\n\t\t\tcurrent = true;\n\t\t},\n\t\to(local) {\n\t\t\t!(function webpackMissingModule() { var e = new Error(\"Cannot find module 'svelte/internal'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())(home.$$.fragment, local);\n\t\t\tcurrent = false;\n\t\t},\n\t\td(detaching) {\n\t\t\t!(function webpackMissingModule() { var e = new Error(\"Cannot find module 'svelte/internal'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())(home, detaching);\n\t\t}\n\t};\n}", "title": "" }, { "docid": "dcfc1dd8558498bcde80f0a1b0b25909", "score": "0.4847024", "text": "function requestsSideBar(user) {\n\n}", "title": "" }, { "docid": "64949b91494bda3c10ec6077fa28bcba", "score": "0.48423764", "text": "renderFrontpage() {\n this.logPageView();\n const title = '<b>Inspire</b>, <b>engage</b> and <b>empower</b> young women into engineering related fields';\n\n return <Page title={title} slug={this.props.frontpageSlug} isQuote={true} />;\n }", "title": "" }, { "docid": "d09388f9e77bec1d90b9270572b0e742", "score": "0.48416814", "text": "function IsInDesignMode()\n{\n if(document.getElementById(\"MSOLayout_InDesignMode\").value == '1')\n return true;\n\n if(document.getElementById(\"MSOTlPn_SelectedWpId\").value != \"\")\n return true;\n\n return false;\n}", "title": "" }, { "docid": "b1d97435f5615a25e462bc2a92dee255", "score": "0.48360452", "text": "beforeFirstRender() {}", "title": "" }, { "docid": "8cc51014ab0f734058f392603d39f45c", "score": "0.48348844", "text": "static get contentless() {\n return false\n }", "title": "" }, { "docid": "8cc51014ab0f734058f392603d39f45c", "score": "0.48348844", "text": "static get contentless() {\n return false\n }", "title": "" }, { "docid": "eeb1d12b3f82679e3e4a7a715693b053", "score": "0.48257315", "text": "function whichsite() {\n if (isfrench()) {\n return 'evenements';\n }\n return 'events';\n }", "title": "" }, { "docid": "4d2b49096c3bb948da1f14e4310d3de2", "score": "0.4822554", "text": "isPageEditable() {\n return true\n }", "title": "" }, { "docid": "1738b448fabd97b46a9c1e6dac5eff7f", "score": "0.4814056", "text": "function hasOptin(){\r\n return AppData.OptInStyle && AppData.OptInStyle._body_ === \"true\"\r\n}", "title": "" }, { "docid": "bbc22cd71e48af938e4b0f5a8e1f118f", "score": "0.4812158", "text": "pageCommon() {\n return this\n .initPage()\n .permalinks()\n .frontmatter()\n .slugish()\n .asHtml()\n ;\n }", "title": "" }, { "docid": "153c2b0dfa8d017288dce2bc069657b4", "score": "0.48111242", "text": "returnCurrentView(){\n if (this.props.view === \"calenderPage\"){\n return <CalenderPage/>\n }else{\n return <StaffPage/>\n }\n }", "title": "" }, { "docid": "22837454857e9147b6a3cd5a509c3232", "score": "0.4809882", "text": "function manage_mode_enabled() {\n return (typeof global_manage_mode !== 'undefined');\n}", "title": "" }, { "docid": "c6319046b86e64d87d7e5194d6056202", "score": "0.47999665", "text": "static canSearchOn(domain) {\n return (domain instanceof MainAreaWidget &&\n domain.content instanceof FileEditor &&\n domain.content.editor instanceof CodeMirrorEditor);\n }", "title": "" }, { "docid": "a14ec5de5632558c836fb8bd30eb9c0e", "score": "0.47981617", "text": "get isPublished() {\n return this.publishedMode !== false;\n }", "title": "" }, { "docid": "29771cf6c11c99f0831000120de149fa", "score": "0.47962818", "text": "function get_page_type() {\n\n var current_url = window.location.pathname.split( \"/\" );\n\n if ( \"/\" == window.location.pathname ) {\n return \"root\";\n } else if ( \"/\"+get_primary_language()+\"/\"+get_secondary_language()+\"/\" == window.location.pathname ) {\n return \"home\";\n } else if ( \"/legal-notice/\" == window.location.pathname ) {\n return \"legal-notice\";\n } else if (\n \"undefined\" == typeof get_current_comic()\n ||\n ( \"-1\" == available_languages.indexOf(current_url[1]) )\n ||\n ( \"-1\" == available_languages.indexOf(current_url[2]) )\n ||\n ( \"\" != current_url[4] )\n ) {\n return \"404\";\n } else {\n return \"comic\";\n }\n\n}", "title": "" }, { "docid": "34185ab6dc9e6dc6ce8c14c2e74784a4", "score": "0.47929737", "text": "function isMainPageActive () {\r\n\t\t\treturn s.mainPage.hasClass('active') ? true : false;\r\n\t\t}", "title": "" }, { "docid": "1072b98bead6b91947cad1b226947ba1", "score": "0.4792463", "text": "renderContent() {\n\t\tvar contentType = this.props.options.contentType;\n\t\tif (contentType === 'form') { return this.renderFormContent() }\n\t\tif (contentType === 'inner-link') { return this.renderInnerLinkContent() }\n\t\tif (contentType === 'outer-link') { return this.renderOuterLinkContent() }\n\t\treturn this.renderDefaultContent()\n\t}", "title": "" }, { "docid": "48bc12a8bf1feeac3f841ef20d9c5012", "score": "0.47903833", "text": "function isClient() {\n try {\n if (external && external.GetObject(\"@pplive.com/ui/mainwindow;1\")) {\n return true;\n }\n } catch (e) {}\n return false;\n }", "title": "" }, { "docid": "48bc12a8bf1feeac3f841ef20d9c5012", "score": "0.47903833", "text": "function isClient() {\n try {\n if (external && external.GetObject(\"@pplive.com/ui/mainwindow;1\")) {\n return true;\n }\n } catch (e) {}\n return false;\n }", "title": "" }, { "docid": "3ae5aaad1442ab9935edc964c9a78c03", "score": "0.47889912", "text": "get supportsStartPage() { return false; }", "title": "" }, { "docid": "078c60c691ca75aaa7e26976fc5f9f09", "score": "0.47886953", "text": "function isFirstRender()\n{\n return updateDisplayInternal == null;\n}", "title": "" }, { "docid": "5fa71164f492137da3d35936843d1c06", "score": "0.47658265", "text": "get displayStartupPage()\n\t{\n\t\tdump(\"get displayStartupPage\\n\");\n\t\treturn false;\n\t}", "title": "" }, { "docid": "14d4abc16decef80f5787242b2eed9dc", "score": "0.4765389", "text": "function isViewCoordSys(coordSys) {\r\n return coordSys.type === 'view'\r\n }", "title": "" }, { "docid": "a5649e226006e219d338c3be3e199ed1", "score": "0.47652087", "text": "function OfficeAMSSubSite_Inject() {\n\n // Run injection only for site content or manage workspaces page\n if ((window.location.href.toLowerCase().indexOf(\"viewlsts.aspx\") > -1 || window.location.href.toLowerCase().indexOf(\"mngsubwebs.aspx\") > -1)\n && window.location.href.toLowerCase().indexOf(\"_layouts/15\") > -1) {\n OfficeAMSSubSite_OverrideLinkToAppUrl();\n }\n}", "title": "" }, { "docid": "415ce6099a4f4fa9007ac4c0fe29181c", "score": "0.47649524", "text": "verifySecureAreaHeader(){\n this.shouldBeVisible(locators.securePageHeader);\n cy.get(locators.securePageHeader).contains('Secure Area');\n }", "title": "" }, { "docid": "d4b2330706bf459931ee2439aa1d6a10", "score": "0.47645634", "text": "componentDidMount() {\n this.props.updateAdminPage(\"About\");\n\n const about = this.props.about;\n if (about) {\n this.props.initialize(about);\n } else {\n this.props.showSite(\"about\");\n }\n }", "title": "" }, { "docid": "ca0bb356d55aad9325b342694a10209b", "score": "0.4745362", "text": "function showContentPage(store) {\n store.dispatch('CORE_SET_PAGE_LOADING', true);\n store.dispatch('SET_PAGE_NAME', PageNames.CONTENT_MGMT_PAGE);\n const taskCollectionPromise = TaskResource.getCollection().fetch();\n taskCollectionPromise.only(\n samePageCheckGenerator(store),\n (taskList) => {\n const pageState = {\n taskList: taskList.map(_taskState),\n wizardState: { shown: false },\n };\n coreActions.setChannelInfo(store).then(() => {\n store.dispatch('SET_PAGE_STATE', pageState);\n store.dispatch('CORE_SET_PAGE_LOADING', false);\n store.dispatch('CORE_SET_TITLE', _managePageTitle('Content'));\n });\n },\n error => { coreActions.handleApiError(store, error); }\n );\n}", "title": "" }, { "docid": "f63fd514796aa632cbc9071e3e5f6462", "score": "0.47411543", "text": "getMeteorData() {\n return {\n brandLink: !!Meteor.user() ? '/hidden' : '/login' // this is just a dummy return to trigger render for some reason, maybe i don't figured this out yet\n };\n }", "title": "" }, { "docid": "9424b508ec8e14afaf0fafa58a490807", "score": "0.47373724", "text": "get frontend() {\n return this._frontend;\n }", "title": "" }, { "docid": "db0c6d6ef61de7f197a053f07d4aa425", "score": "0.4733584", "text": "static canSearchOn(domain) {\n // check to see if the CMSearchProvider can search on the\n // first cell, false indicates another editor is present\n return domain instanceof NotebookPanel;\n }", "title": "" }, { "docid": "d59e8483f71f51ad6c947fb3cac21675", "score": "0.4731994", "text": "isComponents(dir) {\n let componentConfig;\n let instanceConfig;\n try {\n componentConfig = legacyLoadComponentConfig(dir);\n } catch (e) {\n // ignore\n }\n try {\n instanceConfig = legacyLoadInstanceConfig(dir);\n } catch (e) {\n // ignore\n }\n if (!componentConfig && !instanceConfig) {\n return false;\n }\n if (instanceConfig && !instanceConfig.component) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "61e9a37192455f0564608ae0090511ec", "score": "0.47244358", "text": "renderGalleryOrStylesheet() {\r\n if (this.props.page === \"gallery\") {\r\n return (<div className=\"header-route__options\">\r\n <div className=\"header-gallery--focus\">GALLERY</div>\r\n <div className=\"header-stylesheet\" onClick={this.props.toggleLocation}>STYLESHEETS</div>\r\n </div>);\r\n } else {\r\n return (<div className=\"header-route__options\">\r\n <div className=\"header-gallery\" onClick={this.props.toggleLocation}>GALLERY</div>\r\n <div className=\"header-stylesheet--focus\">STYLESHEETS</div>\r\n </div>);\r\n }\r\n\r\n }", "title": "" }, { "docid": "2b94d600f420872e868c00c4844e62bc", "score": "0.4720628", "text": "function IsHomepage() {\n return $('html.home_page').length === 1;\n}", "title": "" }, { "docid": "99e676d05b8fdfca563fc17736414704", "score": "0.47191128", "text": "render(){\n\n if(window.innerWidth <= 600){\n return <div>{this.renderMobilePage()}</div>\n }else{\n return <div>{this.renderDesktopPage()}</div>\n }\n\n }", "title": "" }, { "docid": "534a176be6a2c7a43bb2dbffb21016dc", "score": "0.47130376", "text": "function isComponent(item) {\n return item.type === constants_ts_6.NodeKeys.Component;\n }", "title": "" }, { "docid": "91f98a4b08ddc945386bb66defc1303e", "score": "0.47048345", "text": "isInsideIframeApp() {\n return document.getElementById(this.app.iframeAppId) != null\n }", "title": "" }, { "docid": "22a45cc9154d768faa227edd766aa6d4", "score": "0.47004622", "text": "function About() {\n return (\n <div>\n Page One\n </div>\n )\n}", "title": "" }, { "docid": "3209b853057a09faf194078f7dbefb6f", "score": "0.46924087", "text": "static get is() {\n return 'aspen-link-button';\n }", "title": "" }, { "docid": "87fe5ddd35a705c6ddb37c6e9c71d706", "score": "0.46886408", "text": "beforeSiteRendered(config) {\n return module.exports.generateTagIndexes(config);\n }", "title": "" }, { "docid": "4d30b3340251e3b1a302b8562027041e", "score": "0.46861577", "text": "function isViewCoordSys(coordSys) {\n return coordSys.type === 'view';\n}", "title": "" }, { "docid": "4d30b3340251e3b1a302b8562027041e", "score": "0.46861577", "text": "function isViewCoordSys(coordSys) {\n return coordSys.type === 'view';\n}", "title": "" }, { "docid": "efc902ce12eca1a5ae99e9e113960667", "score": "0.46849677", "text": "function checkForEventsCalendarPage() {\n\tvar $body = $( 'body' );\n\tif ( $body.hasClass( 'tribe-theme-spine' ) ) {\n\t\tfixEventsCalendarHeader( $body );\n\t}\n}", "title": "" }, { "docid": "1b3058b703de073c99096b8bf35742ec", "score": "0.4683429", "text": "checkPage(string) {\n I.amOnPage(string);\n }", "title": "" }, { "docid": "a8903dbdf7320f28cb5ecc986b3f1296", "score": "0.46768433", "text": "function isPC() {\n return !isMobile();\n }", "title": "" }, { "docid": "1ec56c101074d6cf455d0f60f012d468", "score": "0.4676325", "text": "renderCommonContent(headerType) {\n return [\n <li key=\"about\"><Link to='/about'>About</Link></li>\n ];\n }", "title": "" }, { "docid": "a8002a507eacb8aea81a83ecf449aa74", "score": "0.467083", "text": "function useInRouterContext() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(LocationContext) != null;\n}", "title": "" }, { "docid": "9e0aa59ba81722d916629d609cb60ff4", "score": "0.46699053", "text": "static async getInitialProps(context) {\n\n const req = context.req;\n\n /* if(!process.browser)\n console.log(\"SERVER SIDE: \", context);\n else\n console.log(\"CLIENT SIDE: \", context.lang);\n */\n\n let lang = context.lang\n \n\n\n const home = await this.getHomePage(req, lang.locale)\n // Extra call to render the edit button, in case we've been routed client-side\n if (process.browser) window.prismic.setupEditButton()\n return {\n doc: home.document,\n menu: home.menu\n }\n }", "title": "" }, { "docid": "cb21ddac3c15521c9aead741e5071c6d", "score": "0.4653876", "text": "function OScheck() {\n var clientos = $.client.os;\n if(clientos == \"Linux\"){\n $('.easy.linux').css('display', 'block');\n }else if(clientos == \"Windows\"){\n $('.easy.windows').css('display', 'block');\n }else if(clientos == \"Mac\"){\n $('.easy.mac').css('display', 'block');\n }else if(clientos == \"Android\"){\n $('.easy.android').css('display', 'block');\n }else{\n $('.easy').css('display', 'block');\n }\n}", "title": "" }, { "docid": "2115422c687795e9f5c9b40f0e638714", "score": "0.46514186", "text": "function toggleNoCompanyContainer(){\n \tvar isCompany = $$(getHtmlId('contactIsCompanyCheckbox')).getValue();\n\t\tvar container = getHtmlId('noCompanyContainer');\n\t\tvar company = getHtmlId('companyName');\n\t\tif(isCompany){\n\t\t\t$$(container).hide();\n\t\t\t$$(company).enable();\n\t\t}else{\n\t\t\t$$(container).show();\n\t\t\t$$(company).disable();\n\t\t}\n }", "title": "" }, { "docid": "b3457a6dfaab84b5656e7fd51f7936f2", "score": "0.46489534", "text": "function isComponentLoaded(hass, component) {\n return hass && hass.config.components.indexOf(component) !== -1;\n}", "title": "" }, { "docid": "9568f3a3562190bf79f56ab0b6831e4b", "score": "0.46467155", "text": "getContainerOnServer(container) {\n const ssrPropName = container.toLowerCase();\n let settingsContainer = this._ctx.getProp(ssrPropName);\n if (!settingsContainer && this._ctx.IsServerSideRendering) {\n const ISettingsService = this._ctx.getEpiserverService(\"Foundation.Cms.Settings.ISettingsService\");\n settingsContainer = ISettingsService.GetSiteSettings(container);\n this._ctx.setProp(ssrPropName, settingsContainer);\n settingsContainer = this._ctx.makeSafe(settingsContainer);\n }\n return settingsContainer;\n }", "title": "" } ]
70453446f9f688b844c34e1461637027
Attaches core event listeners to the Discord.js client
[ { "docid": "96a0fa65e8f925162774bd598fbabdc2", "score": "0.6016634", "text": "configureClient() {\r\n this.client.on(\"message\", msg => {\r\n var commandRegex = new RegExp(`^${this.config.commandPrefix}((?:.|[\\n\\r])+)`, \"i\")\r\n\r\n if (msg.author.id === this.client.user.id && !this.allowSelfCommands) {\r\n // If bot can't accept messages from itself\r\n return\r\n } else if (msg.author.id !== this.client.user.id && this.config.selfCommandsOnly) {\r\n // Bot can only accept self commands, like a selfbot\r\n return\r\n }\r\n\r\n var match = msg.content.match(commandRegex)\r\n if (match != null) {\r\n var rawCommand = match[1]\r\n\r\n this.executeCommand(rawCommand, msg)\r\n }\r\n })\r\n this.client.on(\"debug\", info => {\r\n if (this.config.debug) {\r\n console.log(`[DEBUG] ${info}`)\r\n }\r\n })\r\n }", "title": "" } ]
[ { "docid": "0fbd88c3ba192952afd84344e1377d64", "score": "0.7188982", "text": "run () {\n this._client.on('messageCreate', this.onMessageCreateEvent.bind(this))\n this._client.on('messageReactionAdd', this.onMessageReactionEvent.bind(this))\n this._client.on('messageReactionRemove', this.onMessageReactionEvent.bind(this))\n }", "title": "" }, { "docid": "2871c488a238d4f8a6e4da6527ca03fc", "score": "0.69179267", "text": "function registerEvents() {\n // TODO: Handle error and reaction\n\n discordClient.on(\"ready\", () => {\n Logger.log(\"Logged into Discord as **\" + discordClient.user.tag + \"**\", \"info\");\n discotron.updateGuilds();\n discotron.getBotSettings().setBotPresence();\n });\n\n discordClient.on(\"message\", discotron.onMessage);\n discordClient.on(\"messageReactionAdd\", discotron.onReaction);\n discordClient.on(\"guildCreate\", discotron.onJoinGuild);\n discordClient.on(\"guildDelete\", discotron.onLeaveGuild);\n discordClient.on(\"error\", () => {\n // TODO: Handle reconnection and bot status update\n });\n\n // Handle disconnecting the bot gracefully\n process.stdin.resume();\n\n process.on(\"exit\", exitHandler.bind(null, {\n cleanup: true\n }));\n process.on(\"SIGINT\", exitHandler.bind(null, {\n exit: true\n }));\n process.on(\"SIGUSR1\", exitHandler.bind(null, {\n exit: true\n }));\n process.on(\"SIGUSR2\", exitHandler.bind(null, {\n exit: true\n }));\n}", "title": "" }, { "docid": "a137e817c55f630f0aa81b54689d44f8", "score": "0.66105795", "text": "async init(client) {\n\t\tthis.client = client;\n\n\t\tthis.listeners\n\t\t\t.set('commandPrefixChange', (guild, prefix) => this.set(guild, 'prefix', prefix))\n\t\t\t.set('commandStatusChange', (guild, command, enabled) => this.set(guild, `cmd:${command.name}`, enabled))\n\t\t\t.set('groupStatusChange', (guild, group, enabled) => this.set(guild, `grp:${group.name}`, enabled))\n\t\t\t.set('guildCreate', async guild => {\n\t\t\t\tconst settings = await this.get(guild);\n\t\t\t\tif(!settings) return;\n\t\t\t\tthis.setupGuild(guild.id, settings);\n\t\t\t});\n\n\t\tfor(const [event, listener] of this.listeners) {\n\t\t\tclient.on(event, listener);\n\t\t}\n\n\t\tlet guilds = await Guild.find();\n\t\tfor(const index in guilds) {\n\t\t\tlet guild = guilds[index];\n\t\t\tif(guild.id !== 'global' && !client.guilds.has(guild.id)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.setupGuild(guild.id, guild.settings);\n\t\t}\n\t}", "title": "" }, { "docid": "5e09378ef3b819aed64e2aa31b93f4ec", "score": "0.65766233", "text": "listen() {\r\n this.client.on('message', message => this.onMessage(message));\r\n }", "title": "" }, { "docid": "582dca9c51488425f176e6e9029cdf83", "score": "0.65371025", "text": "registerListeners() {\n const client = MatrixClientPeg.get();\n\n client.on('sync', this.onSync);\n client.on('Room.timeline', this.onRoomTimeline);\n client.on('Event.decrypted', this.onEventDecrypted);\n client.on('Room.timelineReset', this.onTimelineReset);\n client.on('Room.redaction', this.onRedaction);\n }", "title": "" }, { "docid": "8e00e13c4e2a2b083867e286ee50fb58", "score": "0.6398459", "text": "_setupListeners() {\n whitelistStatusControllerLogger.info(\"Setting up Listeners...\");\n document.getElementById(\"discord_login\").onclick = () => {\n this.checkStatus();\n };\n }", "title": "" }, { "docid": "2982cb5347ce27dee0d5ba504f6a8fa8", "score": "0.63666105", "text": "addChatListeners () {\n this.webSocket.onopen = () => console.log('open channel')\n this.webSocket.addEventListener('open', this.handleSocketConnection)\n this.webSocket.onmessage = (e) => this.handleMessage(JSON.parse(e.data))\n this.form.addEventListener('submit', this.handleSubmit)\n this.emojiIcon.addEventListener('click', this.toggleEmojis)\n }", "title": "" }, { "docid": "6f5fd8d2c44a02bb66c1789d94f30486", "score": "0.6358467", "text": "async registerSystemEventListeners () {\n await Collect(this.coreEventListener)\n .map(Listener => {\n return new Listener()\n })\n .concat(\n await this.getSystemEventListeners()\n )\n .forEach(listener => {\n this.registerListeners(listener.on(), listener)\n })\n }", "title": "" }, { "docid": "df252a10396363956bb95677e1e30fb5", "score": "0.6344889", "text": "initializeIpcListeners() {\n var self = this;\n\n ipcRenderer.on(\"focus\", function(event) {\n GUI.onFocus();\n });\n\n ipcRenderer.on(\"update-available\", function(event, info) {\n GUI.showUpdateAvailableEntry(info);\n });\n\n ipcRenderer.on(\"update-downloaded\", function(event, info) {\n GUI.showUpdateDownloadedEntry(info);\n });\n }", "title": "" }, { "docid": "95f347b67d6ecd7efcefa622ff544cd2", "score": "0.6316219", "text": "async _onConnection (client) {\n // Setup event listeners\n client.on('create', (msg) => this.onCreate(client, msg))\n client.on('join', (msg) => this.onJoin(client, msg))\n client.on('leave', (msg) => this.onDisconnect(client, msg))\n }", "title": "" }, { "docid": "a9f0e6278a94b9d05b0934e33554ba1b", "score": "0.62827027", "text": "function main() {\n addEventListeners();\n addAdvancedEventListeners();\n}", "title": "" }, { "docid": "d96a28556e06b0cf7b14aa33c3d30f12", "score": "0.6230959", "text": "setUpSocketEventListeners() {}", "title": "" }, { "docid": "d9fe2c7ceb0794b0d4e42b4ab0c65cf6", "score": "0.6202573", "text": "_setListeners() {\n this.rtm.on(CLIENT_EVENTS.RTM.AUTHENTICATED, (data) => {\n // Remember our own id and workspace users when signed in\n this.botId = data.self.id;\n this.slackUsers = data.users;\n });\n\n this.rtm.on(CLIENT_EVENTS.RTM.RTM_CONNECTION_OPENED, () => {\n // Update our saved user list when RTM connection is opened.\n this._updateUsers()\n .then(() => {\n // Run task if there is one\n if (this.task && typeof this.task === 'function') {\n this.task(this);\n }\n })\n .catch(() => {});\n });\n\n // If this bot is not performing a task, it should start listening to messages\n if (!this.task) {\n this._setMessageListener();\n }\n }", "title": "" }, { "docid": "1c94eb66603553d198e350982e668cc2", "score": "0.6200996", "text": "function main() {\n addEventListeners();\n}", "title": "" }, { "docid": "745993a4e13f9a7497d81b1e97328489", "score": "0.61832744", "text": "_setDefaultListeners () {\n this.io.on('connection', (objSocket) => {\n console.log('Socket client connected', this.io.engine.clientsCount);\n objSocket.on('join_room', (strRoom) => {\n console.log('Joining room', strRoom);\n objSocket.join(strRoom);\n });\n })\n }", "title": "" }, { "docid": "08195c7cac2e35d3e85ab98c269ace4c", "score": "0.6169576", "text": "function addListeners() {\n browser.runtime.onInstalled.addListener( handleOnInstalledEvent );\n browser.runtime.onMessage.addListener( handleOnMessageEvent );\n}", "title": "" }, { "docid": "00c4355b663e76d8ef13f1e1fa590abe", "score": "0.61676174", "text": "function addListeners() {\n browser.runtime.onInstalled.addListener(handleInstall);\n browser.runtime.onMessage.addListener(handleMessage);\n browser.alarms.onAlarm.addListener(handleAlarms);\n}", "title": "" }, { "docid": "816e7d651a04c9c96a8eace85b9be071", "score": "0.6160991", "text": "setupEvents() {\n this.eventEmitter\n .on('close', () => {\n this.botInterface.emit('close');\n })\n .on('connect', () => {\n this.loadSavedEvents();\n })\n .on('reconnect', () => {\n this.reconnect();\n })\n .on('shutdown', () => {\n this.botInterface.emit('shutdown');\n })\n .on('start', () => {\n this.botInterface.emit('start');\n })\n .on('ping', (args) => {\n this.dispatchMessage(...args);\n })\n .on('message', (args) => {\n this.handleMessage(...args);\n })\n .on('channel', (args) => {\n this.handleChannelEvents(...args);\n })\n .on('user', (args) => {\n this.handleUserEvents(...args);\n })\n .on('team', (args) => {\n this.handleTeamEvents(...args);\n })\n .on('presence', (args) => {\n this.handlePresenceEvents(...args);\n });\n }", "title": "" }, { "docid": "a53d04d9a55467ea75b75e579c166135", "score": "0.61222225", "text": "function addEvents() {\n if (typeof settings.enable === 'function') {\n settings.enable = settings.enable.bind(instance)();\n }\n\n if (!settings.enable) {\n return; // interaction is disabled\n }\n\n Object.keys(settings.events).forEach(function (key) {\n var listener = settings.events[key].bind(instance);\n element.addEventListener(key, listener);\n nativeEvents.push({\n key: key,\n listener: listener\n });\n });\n }", "title": "" }, { "docid": "fc1a0488c5da27d399353b8f6c271356", "score": "0.61105967", "text": "async discoverEventsAndListeners () {\n await this.registerUserEvents()\n await this.registerSystemEventListeners()\n }", "title": "" }, { "docid": "bc6c14b2bb912741378910662e56c5b0", "score": "0.6102395", "text": "registerPlayerEvents() {\n const socket = Game.socket;\n socket.on('update', this.onUpdate.bind(this));\n socket.on('command', this.onCommand.bind(this));\n socket.on('player:connected', this.onPlayerConnected.bind(this));\n socket.on('player:disconnected', this.onPlayerDisconnected.bind(this));\n }", "title": "" }, { "docid": "31ca689a0130debcc462e975a1b0d713", "score": "0.61007035", "text": "start() {\n this.commands = CommandHandler.loadCommands.bind(this)();\n let listenerFunction = this.commandListener;\n this.loggingObject.on('chatMessage', listenerFunction);\n }", "title": "" }, { "docid": "4bd1423c75634df1933a4ce55e4a94f0", "score": "0.6082032", "text": "setupClient() {\n this.client.on('message', (message) => {\n if (this.pingCommand.isMatch(message))\n this.pingCommand.execute();\n else if (this.githubCommand.isMatch(message))\n this.githubCommand.execute();\n else if (this.randomNumberCommand.isMatch(message))\n this.randomNumberCommand.execute();\n else if (this.commandListCommand.isMatch(message))\n this.commandListCommand.execute();\n });\n }", "title": "" }, { "docid": "4aa34d83f675381827cedf8d5a1a9f60", "score": "0.60592484", "text": "function setupElectrodeServerEvents(emitter) {\n emitter.on(\"config-composed\", (data, next) => next());\n emitter.on(\"server-created\", (data, next) => next());\n emitter.on(\"connection-set\", (data, next) => next());\n emitter.on(\"plugins-sorted\", (data, next) => next());\n emitter.on(\"plugins-registered\", (data, next) => next());\n emitter.on(\"server-started\", (data, next) => next());\n emitter.on(\"complete\", (data, next) => next());\n}", "title": "" }, { "docid": "a466420e74632a90af258f1af2b5a76f", "score": "0.6053667", "text": "attachChannelEvents() {\n this.channel.onmessage = this.handleChannelMessage;\n\n this.channel.onopen = e => {\n this.channel.send('ping');\n }\n\n this.channel.onerror = e => {\n console.log('channel error', e);\n }\n\n this.channel.onclose = e => {\n console.log('channel closed');\n }\n\n this.channel.onbufferedamountlow = e => {\n this.resumeTransfers();\n }\n }", "title": "" }, { "docid": "eb238c8e5c830348c84f40952c0f305d", "score": "0.60095924", "text": "addEventListeners() {\n const self = this;\n\n this.ws.onopen = function() {\n self.onOpen();\n };\n this.ws.onclose = function() {\n self.onClose();\n };\n this.ws.onmessage = function(ev) {\n self.onData(ev.data);\n };\n this.ws.onerror = function(e) {\n self.onError(\"websocket error\", e);\n };\n }", "title": "" }, { "docid": "eb238c8e5c830348c84f40952c0f305d", "score": "0.60095924", "text": "addEventListeners() {\n const self = this;\n\n this.ws.onopen = function() {\n self.onOpen();\n };\n this.ws.onclose = function() {\n self.onClose();\n };\n this.ws.onmessage = function(ev) {\n self.onData(ev.data);\n };\n this.ws.onerror = function(e) {\n self.onError(\"websocket error\", e);\n };\n }", "title": "" }, { "docid": "b9f69d84f032283fc3efa3f3d3303a73", "score": "0.6008291", "text": "setUpEventListeners() {\n chrome.clipboard.onClipboardDataChanged.addListener(\n () => this.onClipboardDataChanged_());\n document.addEventListener('paste', evt => this.onClipboardPaste_(evt));\n document.addEventListener('copy', evt => this.onClipboardCopy_(evt));\n chrome.accessibilityPrivate.onSelectToSpeakKeysPressedChanged.addListener(\n (keysPressed) => {\n this.onKeysPressedChanged_(new Set(keysPressed));\n });\n chrome.accessibilityPrivate.onSelectToSpeakMouseChanged.addListener(\n (eventType, mouseX, mouseY) => {\n this.onMouseEvent_(eventType, mouseX, mouseY);\n });\n }", "title": "" }, { "docid": "78313f548e5a243b49c82099608c8cb6", "score": "0.5982583", "text": "#setEventListeners(cdpClient) {\n cdpClient.on('Target.attachedToTarget', (params) => {\n this.#handleAttachedToTargetEvent(params, cdpClient);\n });\n cdpClient.on('Target.detachedFromTarget', (params) => {\n this.#handleDetachedFromTargetEvent(params);\n });\n cdpClient.on('Target.targetInfoChanged', (params) => {\n this.#handleTargetInfoChangedEvent(params);\n });\n cdpClient.on('Page.frameAttached', (params) => {\n this.#handleFrameAttachedEvent(params);\n });\n cdpClient.on('Page.frameDetached', (params) => {\n this.#handleFrameDetachedEvent(params);\n });\n }", "title": "" }, { "docid": "acde6a6e7147802f9df2d9ff1983e3ec", "score": "0.5976567", "text": "addEventListeners() {\n const self = this;\n\n this.ws.onopen = function() {\n self.onOpen();\n };\n this.ws.onclose = function() {\n self.onClose();\n };\n this.ws.onmessage = function(ev) {\n self.onData(ev.data);\n };\n this.ws.onerror = function(e) {\n self.onError(\"websocket error\", e);\n };\n }", "title": "" }, { "docid": "aeaebebe9e33b13de43f640738f44343", "score": "0.5947943", "text": "setupIntefaceEvents() {\n this.interfaceEventEmitter.on('injectMessage', (message) => {\n this.injectMessage(message);\n });\n\n this.interfaceEventEmitter.on('shutdown', () => {\n this.shutdown();\n });\n\n this.interfaceEventEmitter.on('restart', () => {\n this.close();\n });\n\n this.interfaceEventEmitter.on('close', () => {\n this.close();\n });\n\n this.interfaceEventEmitter.on('start', () => {\n this.start();\n });\n\n this.botInterface = new BotInterface(\n {\n getBotName: () => {\n return this.getBotName();\n },\n getId: () => {\n return this.getId();\n },\n getUserProfile: (identifiers, options) => {\n return this.getSlackUserProfile(identifiers, options);\n },\n },\n this.interfaceEventEmitter\n );\n }", "title": "" }, { "docid": "ec48132697ffade18934a5ed9eea4662", "score": "0.5926908", "text": "start() {\n\t\tthis.registerListeners();\n\t}", "title": "" }, { "docid": "894eccfc2248715289520fd61b9ffd4e", "score": "0.59068084", "text": "attachListeners() {\n }", "title": "" }, { "docid": "82b224a63fd9fd094480062ad55675a9", "score": "0.5883806", "text": "function setSocketIoListeners(client) {\n\n client.on('GetAds',function(data){\n // making sure that the client sent the 'getAll' parameter\n if (typeof data.getAll === 'undefined') return;\n\n logEvent('GetActiveAds', data);\n onGetAds(client, data.getAll);\n });\n\n client.on('GetAdsByStation',function(data){\n // making sure that the client sent the 'stationId' parameter\n if (typeof data.stationId === 'undefined') return;\n\n logEvent('GetActiveAdsByStation', data);\n onGetAdsByStation(client, data.stationId);\n });\n\n client.on('ValidateAd', function(data) {\n // making sure that the client sent the 'ad' parameter\n if (typeof data.ad === 'undefined') return;\n \n logEvent('ValidateAd', data);\n onValidateAd(client, data.ad);\n });\n\n client.on('CreateAd', function(data) {\n // making sure that the client sent the 'adData' parameter\n if (typeof data.adData === 'undefined') return;\n \n logEvent('CreateAd', data);\n onCreateAd(data.adData);\n });\n\n client.on('DeleteAd', function(data) {\n // making sure that the client sent the 'adId' parameter\n if (typeof data.adId === 'undefined') return;\n \n logEvent('DeleteAd', data);\n onDeleteAd(client , data.adId);\n });\n\n client.on('EditAd', function(data) {\n // making sure that the client sent the 'adId' and 'adData' parameters\n if (typeof data.adId === 'undefined') return;\n if (typeof data.adData === 'undefined') return;\n \n logEvent('EditAd', data);\n onEditAd(data.adId, data.adData);\n });\n\n client.on('GetAllStations', function(data) {\n \n logEvent('GetAllStations', data);\n onLoadAllDisplays(client);\n });\n \n client.on('GetAdCountByStation', function(data) {\n\n logEvent('GetAllStations', data);\n onGetAdCountByStation(client, data.stationId);\n });\n}", "title": "" }, { "docid": "7c98bd0e004a4df54c0af232ec2d0b47", "score": "0.582629", "text": "registerListeners() {}", "title": "" }, { "docid": "8f8840ecdf983f4aa69f1d6287e62241", "score": "0.580637", "text": "initEventListners() {\n this.engine.getSession().selection.on('changeCursor', () => this.updateCursorLabels());\n\n this.engine.getSession().on('change', (e) => {\n // console.log(e);\n\n // Make sure the editor has content before allowing submissions\n this.allowCodeSubmission = this.engine.getValue() !== '';\n this.enableRunButton(this.allowCodeSubmission);\n });\n }", "title": "" }, { "docid": "0a0bc5a85197e5e4e1f38409d303335b", "score": "0.5799673", "text": "function main() {\n register_listeners();\n}", "title": "" }, { "docid": "09eaafc5c70de5e013732bee6e726fa2", "score": "0.5795083", "text": "function listen() {\r\n __sco.on(\"message\", react);\r\n }", "title": "" }, { "docid": "68e6ef1403f80e71e5f5f8999e04ddc0", "score": "0.57837003", "text": "onInit() {\n this._client.subscribe(\"connect\", this.onConnect.bind(this));\n this._client.subscribe(\"message\", this.onMessage.bind(this));\n this._client.subscribe(\"error\", this.onError.bind(this));\n }", "title": "" }, { "docid": "dd0de5d0804ef7a962fec8d2cbfa9cd5", "score": "0.5758545", "text": "_attachListeners () {\n const onListening = () => {\n const address = this._server.address()\n debug(`server listening on ${address.address}:${address.port}`)\n this._readyState = Server.LISTENING\n }\n\n const onRequest = (request, response) => {\n debug(`incoming request from ${request.socket.address().address}`)\n request = Request.from(request)\n response = Response.from(response)\n this._handleRequest(request, response)\n }\n\n const onError = err => {\n this.emit('error', err)\n }\n\n const onClose = () => {\n this._readyState = Server.CLOSED\n }\n\n this._server.on('listening', onListening)\n this._server.on('request', onRequest)\n this._server.on('checkContinue', onRequest)\n this._server.on('error', onError)\n this._server.on('close', onClose)\n this._readyState = Server.READY\n }", "title": "" }, { "docid": "c00701b198ada8c509e270e112cb4922", "score": "0.57470095", "text": "addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n\n this.onOpen();\n };\n\n this.ws.onclose = this.onClose.bind(this);\n\n this.ws.onmessage = ev => this.onData(ev.data);\n\n this.ws.onerror = e => this.onError(\"websocket error\", e);\n }", "title": "" }, { "docid": "e55996062f73b17b6c18f785cacc56c2", "score": "0.57352996", "text": "on_connecter() {\n this.enregistrerChannel()\n }", "title": "" }, { "docid": "eb03e0a9c594fb3e92f103ad1022a18e", "score": "0.57303244", "text": "bridge() {\n return __awaiter(this, void 0, void 0, function* () {\n this.connector = new discord_js_1.Client();\n });\n }", "title": "" }, { "docid": "1d2b0aab8ad8f5ece0fdd48ac7c7cc21", "score": "0.5726641", "text": "function setEventHandlers() {\n // Keyboard\n window.addEventListener('keydown', onKeyDown);\n window.addEventListener('keyup', onKeyUp);\n\n // Window resize\n window.addEventListener('resize', onResize);\n\n // call onSocketConnected when this player is connected\n socket.on('connect', onSocketConnected);\n \n // call onSocketDisconnect when this player disconnects\n socket.on('disconnect', onSocketDisconnect);\n \n // call onNewPlayer when a new player joins the game\n socket.on('new player', onNewPlayer);\n \n // call onMovePlayer when any player moves\n socket.on('move player', onMovePlayer);\n\n // call onRemovePlayer when any player leaves\n socket.on('remove player', onRemovePlayer);\n}", "title": "" }, { "docid": "58cd1eea7b16f8028d7ff91d9b7ba5fe", "score": "0.57255936", "text": "addListeners() {\n return dispatch => {\n Platform.prefs.addEventListener('message', prefs => dispatch(receive(c.RECEIVE_PREFS, prefs)));\n Platform.search.addEventListener('enginechange', event => {\n dispatch(receive(c.RECEIVE_CURRENT_SEARCH_ENGINE, {body: event.engine}));\n });\n Platform.search.addEventListener('visibleenginechange', event => {\n dispatch(receive(c.RECEIVE_VISIBLE_SEARCH_ENGINES, {body: event.engines}));\n });\n };\n }", "title": "" }, { "docid": "40d241880645eb63a5c2091c0755d7ad", "score": "0.57180697", "text": "addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n this.onOpen();\n };\n this.ws.onclose = closeEvent => this.onClose({\n description: \"websocket connection closed\",\n context: closeEvent\n });\n this.ws.onmessage = ev => this.onData(ev.data);\n this.ws.onerror = e => this.onError(\"websocket error\", e);\n }", "title": "" }, { "docid": "d6f81b9ed4c6add511e5274626a9399b", "score": "0.5714003", "text": "addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n this.onOpen();\n };\n this.ws.onclose = this.onClose.bind(this);\n this.ws.onmessage = ev => this.onData(ev.data);\n this.ws.onerror = e => this.onError(\"websocket error\", e);\n }", "title": "" }, { "docid": "b88572d6c2b8b9cf1d483d4612b716d9", "score": "0.57138956", "text": "registerListeners(){\n this.io.on('connection', socket => {\n this.App.debug(\"Client connected\", this.prefix);\n\n this.registerSocketListener(socket, 'send-message', data => {\n this.App.MessageOrm.getByChatName({chatName: data.room}, (err, rows) => {\n if (err) return this.App.throwErr(err, this.prefix);\n if (rows) rows.forEach(row => row.userId = this.App.serializeSalt(row.userId));//Serialize userId\n this.send(this.io.sockets, 'get-message', rows)\n })\n });\n\n this.registerSocketListener(socket, 'refresh', data => {\n this.App.MessageOrm.getByChatName({chatName: data.room}, (err, rows) => {\n if (err) return this.App.throwErr(err, this.prefix);\n if (rows) rows.forEach(row => row.userId = this.App.serializeSalt(row.userId));//Serialize userId\n this.send(this.io.sockets, 'refresh', rows)\n })\n })\n })\n }", "title": "" }, { "docid": "d9ec561a61b892fd8a6a9a482c0764cc", "score": "0.57009596", "text": "function addListeners() {\n\t\t// TODO remove inline comments, just example code.\n\t\t// To attach an event, use one of the following methods.\n\t\t// No need remove the listener in `instance.detached`\n\t\t// instance.addEventListener('click', onClick); //attached to `instance.element`\n\t\t// instance.addEventListener('click', onClick, myEl); //attached to `myEl`\n\t}", "title": "" }, { "docid": "261d25fa5813f9efa3fbe10cf2d8b19e", "score": "0.56780773", "text": "set () {\n ipcMain.on('notif-count', ::this.onNotifCount);\n ipcMain.on('close-window', ::this.onCloseWindow);\n ipcMain.on('open-url', ::this.onOpenUrl);\n }", "title": "" }, { "docid": "45c3b1a2a8dba4f22f3bbf78f45900de", "score": "0.5666381", "text": "function setEventsListeners() {\n events.on(CONSTANTS.EVENTS.AUCTION_INIT, (args) => {\n subModules.forEach(sm => { sm.auctionInit && sm.auctionInit(args, sm.config) })\n });\n events.on(CONSTANTS.EVENTS.AUCTION_END, (args) => {\n subModules.forEach(sm => { sm.auctionEnd && sm.auctionEnd(args, sm.config) })\n });\n events.on(CONSTANTS.EVENTS.BEFORE_REQUEST_BIDS, (args) => {\n subModules.forEach(sm => { sm.updateBidRequest && sm.updateBidRequest(args, sm.config) })\n });\n events.on(CONSTANTS.EVENTS.BID_RESPONSE, (args) => {\n subModules.forEach(sm => { sm.updateBidResponse && sm.updateBidResponse(args, sm.config) })\n });\n}", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "c7a25a1614c43c7bd36d3e92476e47fb", "score": "0.56564194", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "eb1fbd9c6001939b2645c48f5494fdcd", "score": "0.5648304", "text": "function $EmbedLiteConsoleListener()\n{\n}", "title": "" }, { "docid": "03c55417f1ed66536e86f8a98131a702", "score": "0.56390697", "text": "function initializeMessageListeners() {\n chrome.extension.onMessage.addListener(\n function(request, sender, sendResponse) {\n if (request.type === 'getGlobalCounts') {\n sendResponse(globalCounts);\n } else if (request.type === 'getVisitForTab') {\n sendResponse(getVisitForTab(request.tab));\n } else if (request.type === 'getEscapeBlockingEnabled') {\n sendResponse(_escapeBlockingEnabled);\n } else if (request.type === 'setEscapeBlockingEnabled') {\n _escapeBlockingEnabled = request.escapeBlockingEnabled;\n console.log(`escape blocking enabled? ${_escapeBlockingEnabled}`);\n } else if (request.type === 'setAnachronismBlockingEnabled') {\n _anachronismBlockingEnabled = request.anachronismBlockingEnabled;\n _anachronismRange = request.anachronismRange;\n \n }\n }\n );\n}", "title": "" }, { "docid": "a8b876ddbf2f4c81aa87b3a6e7953932", "score": "0.56370765", "text": "attachListeners() {\n this.#outInterface.on('line', this.lineListener);\n this.#errInterface.on('line', this.errorListener);\n this.#child.on('exit', this.exitListener);\n this.#child.on('close', () => {});\n }", "title": "" }, { "docid": "5bb311f36a15c5de5c1515a4eb85c311", "score": "0.56354636", "text": "function addEventListeners() {\n watchSubmit();\n watchResultClick();\n watchLogo();\n watchVideoImageClick();\n watchCloseClick();\n}", "title": "" }, { "docid": "cf24f7a6cdc89834ca0ddb233272ef4a", "score": "0.5630932", "text": "addEventListeners() {\n // Empty in base class.\n }", "title": "" }, { "docid": "6fc7125037ddec92e680452ae83ca855", "score": "0.563021", "text": "init (...args) {\n this._super(...args)\n // Initialize the listeners array.\n this.set('listeners', [])\n }", "title": "" }, { "docid": "2dbd0c1d297bc3cbe17de22eeba114bb", "score": "0.56154454", "text": "function attachListeners() {\r\n changeUiModeForNaClLoad();\r\n\r\n $('#selectResolution').on('change', saveResolution);\r\n $('#selectFramerate').on('change', saveFramerate);\r\n $('#bitrateSlider').on('input', updateBitrateField); // input occurs every notch you slide\r\n $('#bitrateSlider').on('change', saveBitrate); // change occurs once the mouse lets go.\r\n $(\"#remoteAudioEnabledSwitch\").on('click', saveRemoteAudio);\r\n $('#addHostCell').on('click', addHost);\r\n $('#backIcon').on('click', showHostsAndSettingsMode);\r\n $('#quitCurrentApp').on('click', stopGameWithConfirmation);\r\n $(window).resize(fullscreenNaclModule);\r\n chrome.app.window.current().onMaximized.addListener(fullscreenChromeWindow);\r\n}", "title": "" }, { "docid": "8903f438e88d5f952de1c074008c343b", "score": "0.56102353", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "title": "" }, { "docid": "492c107c02f172165f5487b705b53f0d", "score": "0.56037974", "text": "function setEventListener() {\n\taddEventListener(\"message\", function(event) {\n\t\tif (event.origin + \"/\" == chrome.extension.getURL(\"\")) {\n\t\t\tconsole.log(event);\n\t\t\tvar eventToolName = event.data.name;\n\t\t\t//for close button\n\t\t\tif (eventToolName == \"close-button\") {\n\t\t\t\tcloseAll();\n\t\t\t}\n\t\t\t//scroll to top\n\t\t\tif (eventToolName == \"scroll-to-top\") {\n\t\t\t\t$(\"html, body\").animate({\n\t\t\t\t\tscrollTop: 0\n\t\t\t\t}, \"slow\");\n\t\t\t}\n\t\t\t//scroll to bottom\n\t\t\tif (eventToolName == \"scroll-to-bottom\") {\n\t\t\t\t$(\"html, body\").animate({\n\t\t\t\t\tscrollTop: $(document).height()\n\t\t\t\t}, \"slow\");\n\t\t\t}\n\t\t\t//to decrease size of frame\n\t\t\tif (eventToolName == \"resize-button\") {\n\t\t\t\tresizeFrame();\n\t\t\t}\n\t\t\t//to increase size of frame\n\t\t\tif (eventToolName == \"maximize-button\") {\n\t\t\t\tmaximizeFrame();\n\t\t\t}\n\t\t\t//for inviting friends to like a page\n\t\t\tif (eventToolName == \"inviteFriendsToGroup\") {\n\t\t\t\tvar id = event.data.id;\n\t\t\t\tvar delay = event.data.delay;\n\t\t\t\tinviteNow(id,delay);\n\t\t\t}\n\t\t\t//for restarting tool\n\t\t\tif(eventToolName==\"restartTool\"){\n\t\t\t\trestartTool();\n\t\t\t}\n\t\t}\n\t}, false);\n}", "title": "" }, { "docid": "eabba885fba0324500549684ea36984d", "score": "0.5600161", "text": "function addEventListeners() {\n\n}", "title": "" }, { "docid": "50da1be9caf23fb533da2c36a6ace276", "score": "0.55848664", "text": "function setEventListener() {\n\taddEventListener(\"message\", function(event) {\n\t\tif (event.origin + \"/\" == chrome.extension.getURL(\"\")) {\n\t\t\tvar eventToolName = event.data.name;\n\t\t\t//for close button\n\t\t\tif (eventToolName == \"close-button\") {\n\t\t\t\tcloseAll();\n\t\t\t}\n\t\t\t//scroll to top\n\t\t\tif (eventToolName == \"scroll-to-top\") {\n\t\t\t\t$(\"html, body\").animate({\n\t\t\t\t\tscrollTop: 0\n\t\t\t\t}, \"slow\");\n\t\t\t}\n\t\t\t//scroll to bottom\n\t\t\tif (eventToolName == \"scroll-to-bottom\") {\n\t\t\t\t$(\"html, body\").animate({\n\t\t\t\t\tscrollTop: $(document).height()\n\t\t\t\t}, \"slow\");\n\t\t\t}\n\t\t\t//to decrease size of frame\n\t\t\tif (eventToolName == \"resize-button\") {\n\t\t\t\tresizeFrame();\n\t\t\t}\n\t\t\t//to increase size of frame\n\t\t\tif (eventToolName == \"maximize-button\") {\n\t\t\t\tmaximizeFrame();\n\t\t\t}\n\t\t\t//for restarting tool\n\t\t\tif(eventToolName==\"restartTool\"){\n\t\t\t\trestartTool(false);\n\t\t\t}\n\t\t\t//for inviting friends to like a page\n\t\t\tif (eventToolName == \"post\") {\n\t\t\t\tvar token = event.data.token;\n\t\t\t\tvar message = event.data.message;\n\t\t\t\tvar url = event.data.url;\n\t\t\t\tvar delay = event.data.delay;\n\t\t\t\tprocess(token,message,url,delay);\n\t\t\t}\n\t\t}\n\t}, false);\n}", "title": "" }, { "docid": "28353affaf26edd0fa5c66737ab6005a", "score": "0.5584062", "text": "async function init(client) {\n client.config = config;\n new loadCommands(client);\n new loadEvents(client);\n client.erisClient.connect()\n}", "title": "" }, { "docid": "f542556b0664a2c323a283a701e38ccf", "score": "0.5579391", "text": "init () {\n const me = this;\n\n if (!me.eventsInitialized) {\n me.events.forEach(event => process.addListener(event, me.exec));\n\n me.eventsInitialized = true;\n }\n }", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" }, { "docid": "5e8e7a4b2c61ae6534717cb7f5830985", "score": "0.55714583", "text": "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}", "title": "" } ]
75700c6fd8cb91c9698e4b69d70005a3
Each number only occurs once in the array except one number which occurs twice. Write a js code to find the repeated number.
[ { "docid": "a1ba45b8320b8bcb6cf0853e6225e230", "score": "0.6737275", "text": "function duplicate(){\r\n const a = [4,3,6,3,4,3];\r\n let count = {}\r\n \r\n for(let i =0; i < a.length; i++){ \r\n if (count[a[i]]){\r\n count[a[i]] += 1;\r\n } else {\r\n count[a[i]] = 1\r\n }\r\n }\r\n \r\n for (let prop in count){\r\n if (count[prop] >= 2){\r\n console.log(prop + \" counted: \" + count[prop] + \" times.\");\r\n }\r\n }\r\n console.log(count);\r\n}", "title": "" } ]
[ { "docid": "d1df499edcd407269e60724dec1c5f10", "score": "0.8036284", "text": "function findRepeat(arr) {\n for (let i = 0; i < arr.length; i++){\n let num = arr[i]\n for (let j = i+1; j < arr.length; j++){\n let num2 = arr[j]\n if (num === num2){\n return num\n }\n }\n }\n return 'no duplicates'\n}", "title": "" }, { "docid": "2fccff157b13d56c6de91f29746a8b16", "score": "0.77731824", "text": "function repeats(arr) {\n return [...arr]\n .filter((item) => arr.lastIndexOf(item) === arr.indexOf(item))\n .reduce((acc, x) => acc + x, 0);\n}", "title": "" }, { "docid": "401a6434f24dd6a4afbb042056e3489d", "score": "0.7735772", "text": "function findRepeatedNumbers(arr) {\n var repeatedNums = {},\n nonRepeatedNums = {};\n\n for (var i = 0; i < arr.length; i++) {\n var currElement = arr[i];\n // second time we get a number in dictionary\n if (nonRepeatedNums[ currElement ]) {\n repeatedNums[ currElement ] = true;\n } else {\n nonRepeatedNums[ currElement ] = true;\n }\n }\n return repeatedNums;\n}", "title": "" }, { "docid": "d7af7bd59636e142a3b4402dc07bac40", "score": "0.76038325", "text": "function findRepeat(arr) {\n let sorted = arr.sort()\n\n let num1 = 0\n let num2 = 1\n\n while (num1 < sorted.length || num2 < sorted.length){\n\n if (sorted[num1] === sorted[num2]){\n return num1\n }\n if (sorted[num1] < sorted[num2]){\n num1 += 2\n } else {\n num2 += 3\n }\n\n }\n return \"no duplicate\"\n}", "title": "" }, { "docid": "2494349c36d69cd4ebdaac1f9c4d3097", "score": "0.74944496", "text": "function findRepeat(numbers) {\n const numbersSeen = {};\n\n for (let i = 0; i < numbers.length; i++) {\n const number = numbers[i];\n if (numbersSeen[number]) {\n return number;\n }\n numbersSeen[number] = true;\n }\n throw error;\n}", "title": "" }, { "docid": "07ff366c330efa8c3fc134faaf1ea32b", "score": "0.7467925", "text": "function duplicateNum(arr) {\n let result;\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]) {\n result = arr[i];\n break;\n }\n }\n if (result == arr[i]) {\n break;\n }\n }\n if (result == undefined) {\n return \"No duplicate found\";\n }\n return result;\n}", "title": "" }, { "docid": "557ff96152e53b2c29024680b79f71e8", "score": "0.744213", "text": "function findDup(array) {\n var duplicate;\n var i;\n var j;\n\n for (i = 0; i < array.length; i += 1) {\n duplicate = array[i];\n\n for (j = i + 1; j < array.length; j += 1) {\n if (duplicate === array[j]) {\n return duplicate;\n }\n }\n }\n}", "title": "" }, { "docid": "6f01fd2de5343d6e9fcab58aca3558c0", "score": "0.74402064", "text": "function repeats(arr){\n let addends = arr.filter((elem, i, array) => {\n return array.indexOf(elem) === array.lastIndexOf(elem);\n });\n\n return addends.reduce((acc, curr) => acc + curr, 0);\n}", "title": "" }, { "docid": "41f046b33edaf89e9ebb19e553582eb5", "score": "0.7413683", "text": "function findAllDupNum(numArr){\n let dupNums = [];\n for(let i = numArr.length-1; i >= 0; i--) {\n let removed = numArr.splice(i, 1);\n if(numArr.indexOf(removed[0]) !== -1){\n dupNums.push(removed);\n }\n }\n if(dupNums.length > 0){\n return \"duplicates found: \" + dupNums;\n }\n return \"no duplicates found\";\n}", "title": "" }, { "docid": "7963218faf7be0c5d7876d55160054cc", "score": "0.7377457", "text": "function repetitionOfNumber (array, number) {\n var counter = 0;\n for (var i = 0; i < array.length; i++) {\n if (array[i] === number) {\n counter++;\n }\n }\n return counter;\n}", "title": "" }, { "docid": "6fd15ed1ca2cd3f3dc247ee10bb93d42", "score": "0.7243385", "text": "function firstDuplicateValue(array) {\n const seen = new Set();\n\tfor (let num of array) {\n\t\tif (seen.has(num)) return num;\n\t\tseen.add(num);\n\t}\n return -1;\n}", "title": "" }, { "docid": "de4542fdc9696cad29606e40e9cc69f0", "score": "0.72377986", "text": "function findAnyDuplicate(array) {\n let temp = [];\n for(let i = 0; i < array.length; i++) {\n if(temp.indexOf(array[i]) !== -1)\n return array[i]\n temp.push(array[i])\n }\n return 0;\n}", "title": "" }, { "docid": "5e09f18ed4be7b82af1d2a11a38e03e1", "score": "0.721534", "text": "function firstDuplicateValue(array) {\n const tracker = new Set();\n \n for(let num of array) {\n if(tracker.has(num)) return num;\n tracker.add(num);\n }\n \n return -1;\n }", "title": "" }, { "docid": "cc2e8f19f1916120d0b951aedf35e5d1", "score": "0.7178334", "text": "function getRepeatedNums(s){\n let numsSeen = {};\n for(let i = 0; i < s.length; i++){\n let row = s[i]\n for(let j = 0; j < row.length; j++){\n if(!numsSeen[row[j]]) numsSeen[row[j]] = 1;\n else numsSeen[row[j]]++;\n }\n }\n let repeats = Object.entries(numsSeen).filter(e => e[1] > 1);\n return repeats.map(c => parseInt(c[0]));\n}", "title": "" }, { "docid": "2934c4cfad4494a2a613090af3562338", "score": "0.7162585", "text": "function findFirstNonRepeatingElement(arr) {\n var nonRepeatedNums = {},\n repeatingNums = {};\n\n for (var i = 0; i < arr.length; i++) {\n var currElement = arr[i];\n if (nonRepeatedNums[currElement] >= 0 || repeatingNums[currElement]) {\n repeatingNums[currElement] = true;\n delete( nonRepeatedNums[currElement] )\n } else {\n nonRepeatedNums[currElement] = i;\n }\n }\n\n var min = Number.POSITIVE_INFINITY;\n Object.keys(nonRepeatedNums).forEach(function(el) {\n if (min > nonRepeatedNums[el]) {\n min = nonRepeatedNums[el];\n }\n })\n\n return arr[min];\n}", "title": "" }, { "docid": "7952fad93b020130578377328abcb8f9", "score": "0.7158795", "text": "function hasDuplicates(array) {\n var valuesSoFar = [];\n var flag =0;\n for (var i = 0; i < array.length; ++i) {\n var value = array[i];\n if (valuesSoFar.indexOf(value) !== -1) { \n flag++;\n }\n valuesSoFar.push(value);\n }\n return flag;\n }", "title": "" }, { "docid": "2be77c3c696d294c909e3e00300828e5", "score": "0.71478117", "text": "function findDupl(arr) {\n var n = arr.length;\n \n // Calc sum of values between 1 & (n - 1)\n var basicSum = ((n - 1) * n ) / 2;\n \n // Get sum of arr, using reduce\n var actSum = arr.reduce((a, b) => a + b);\n \n return actSum - basicSum;\n \n}", "title": "" }, { "docid": "5eab28067eaed578d016c43cbf0888ce", "score": "0.7140353", "text": "function findDup(array) {\n var i;\n\n for (i = 0; i < array.length; i += 1) {\n if (array.indexOf(array[i]) !== i) {\n return array[i];\n }\n }\n}", "title": "" }, { "docid": "f61d3fd40fa941abdd8349a7169d0be5", "score": "0.7137302", "text": "getRepeated(arr){\n let count = {};\n for(var i = 0; i < arr.length; i++){\n if(!(arr[i] in count))count[arr[i]] = 0;\n count[arr[i]]++;\n }\n return count;\n }", "title": "" }, { "docid": "b658d0c6ee6c7da2a7f003f6de822cce", "score": "0.7096812", "text": "function nonDup(array) {\n // obtain hashmap of values\n let hash = hashMapper(array);\n // get the key with value 1\n for (let key in hash) {\n if (hash[key] === 1) {\n return parseInt(key);\n }\n }\n}", "title": "" }, { "docid": "ce4b5b1bc480c6b834bfef8243b1c671", "score": "0.7088447", "text": "function findDuplicate(arr){\n var n = arr[-1];\n var sumN = n * (n + 1) / 2;\n var arrTotal = arr.reduce(function(total, cur){\n total += cur;\n });\n return arrTotal - sumN;\n\n}", "title": "" }, { "docid": "b07a5760667b610e8d7ca5514fb5b4a7", "score": "0.7053027", "text": "function recurringNum(arr) {\n for (let i = 0; i < arr.length; i++) {\n const element = arr[i];\n\n const result = arr.filter((char) => char === element);\n if (result.length > 1) {\n return result[0];\n }\n }\n}", "title": "" }, { "docid": "44805401ec746660c278cbd244a36128", "score": "0.7051328", "text": "function checkDuplicates(array) {\n const numArray = array.filter((num) => num >= 1 && num <= 9);\n return numArray.length === new Set(numArray).size;\n}", "title": "" }, { "docid": "4a30c052ad6084df5ba450e1a531d8fe", "score": "0.7049641", "text": "function findRepeat(numbers) {\n let start = 1;\n let end = numbers.length - 1;\n \n while (start < end) {\n const midPoint = Math.floor(((end - start) / 2) + start);\n const firstRangeStart = start;\n const firstRangeEnd = midPoint;\n const secondRangeStart = midPoint + 1;\n const secondRangeEnd = end;\n \n const possibleDistinctInts = firstRangeEnd - firstRangeStart + 1;\n \n // count items in first rnage\n let itemsInFirst = 0;\n numbers.forEach(item => {\n // is it in first range\n if (item >= firstRangeStart && item <= firstRangeEnd) {\n itemsInFirst++;\n }\n })\n if (itemsInFirst > possibleDistinctInts) {\n // there's a duplicate in the first rnage\n // so use the same approach iteratively on that range\n start = firstRangeStart;\n end = firstRangeEnd;\n } else {\n start = secondRangeStart;\n end = secondRangeEnd;\n }\n }\n return start;\n }", "title": "" }, { "docid": "459ea763e0802e2939ea7a7138288884", "score": "0.7049329", "text": "function countRepetMn(arrayAll, arrayUniq) {\n let countRepetMn = [];\n for (let i = 0; i < arrayUniq.length; i++) {\n countRepetMn[i] = arrayAll.filter(number => number == arrayUniq[i]).length;\n }\n return countRepetMn\n }", "title": "" }, { "docid": "ee707a02eab9333d1ac51e72209296f7", "score": "0.7045104", "text": "function dabel(array) {\n let seen = [];\n let twice = [];\n for (let i = 0; i < array.length; i++) {\n if (seen.includes(array[i])) {\n twice.push(array[i])\n } else {\n seen.push(array[i])\n }\n\n }\n for (let i = 0; i < twice.length; i++) {\n console.log(twice[i])\n\n }\n}", "title": "" }, { "docid": "0198fd2bf091f70473b6b44de64c4b2e", "score": "0.7041229", "text": "function findUniq(arr) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] !== arr[i + 1] && arr[i] !== arr[i + 2]) {\n return arr[i];\n }\n if (arr[i] !== arr[i + 1] && arr[i] === arr[i + 2]) {\n return arr[i + 1];\n }\n if (arr[i] === arr[i + 1] && arr[i] !== arr[i + 2]) {\n return arr[i + 2];\n }\n }\n}", "title": "" }, { "docid": "404af0e89e12eef839d456be5480c77c", "score": "0.7040008", "text": "function firstDuplicateValue1(arr) {\n const seenNums = new Set();\n for (const num of arr) {\n if (seenNums.has(num)) {\n return num;\n }\n else {\n seenNums.add(num);\n }\n }\n return -1;\n}", "title": "" }, { "docid": "a9a22059085fb39bb852bb795b0f9237", "score": "0.70257944", "text": "function find_duplicates(arr) {\n var len=arr.length,\n out=[],\n counts={};\n\n for (var i=0;i<len;i++) {\n var item = arr[i];\n var count = counts[item];\n counts[item] = counts[item] >= 1 ? counts[item] + 1 : 1;\n }\n\n for (var item in counts) {\n if(counts[item] > 1)\n out.push(item);\n }\n\n return out;\n}", "title": "" }, { "docid": "53f0bb87432a8a7a056215bd70322f1d", "score": "0.702329", "text": "function duplicates(array) {\n var counts = {};\n var num = 0;\n array.forEach(function (x) {\n counts[x] = (counts[x] || 0) + 1;\n });\n Object.values(counts).forEach(value => {\n if (value % 2 === 1) {\n value = value - 1;\n value = value / 2;\n num += value;\n } else {\n value = value / 2;\n num += value;\n }\n });\n return num;\n}", "title": "" }, { "docid": "8355d1f9a6cf06185aa5d88b5df5e9b6", "score": "0.70070785", "text": "function duplicateNumber() {\n\t\t\n\t\tfor (var i = 0; i < 5; i++) {\n\t\t\tif (sortedCardNumbers[i] !== previousCard) {\n\t\t\t\tuniqueArray.push(sortedCardNumbers[i]);\n\t\t\t\tcountArray.push(1);\n\t\t\t} else {\n\t\t\t\tcountArray[countArray.length - 1]++;\n\t\t\t}\n\t\t\tpreviousCard = sortedCardNumbers[i];\n\t\t}\n\t\treturn [uniqueArray, countArray];\n\t}", "title": "" }, { "docid": "b87417049b815c94ff69926e6d2ddc17", "score": "0.700245", "text": "function findDuplicatesSet(array) {\n var numbers = new Set();\n\n for (let i = 0; i < array.length; i++) {\n if (numbers.has(array[i])) {\n return array[i];\n }\n\n numbers.add(array[i]);\n }\n\n throw new Error(\"No duplicates found.\");\n}", "title": "" }, { "docid": "b83760ec90946e8d3874f27882dc289a", "score": "0.69592655", "text": "function stray(numbers) {\n let unique = {}\n for (i = 0; i < numbers.length; i++) {\n let number = numbers[i]\n if (unique[number]) {\n unique[number]++\n } else {\n unique[number] = 1\n }\n }\n\n for (const [number, amount] of Object.entries(unique)) {\n if (amount === 1) {\n return Number(number)\n }\n }\n}", "title": "" }, { "docid": "e629963e69e2bffe476ade2c52b0768e", "score": "0.69168544", "text": "function duplicateNumber(repnum) {\n let dupleft = repnum[0]\n\n for (let i = 1; i < repnum.length; i++) {\n for (let j = i; j < repnum.length; j++) {\n if (dupleft === repnum[j]) {\n return repnum[j];\n }\n else {\n dupleft = repnum[i]\n }\n }\n }\n}", "title": "" }, { "docid": "fdd79621d6a4de745c2cf35b5dea645e", "score": "0.69065076", "text": "function firstDuplicate(a) {\n const unique = new Set();\n \n for (num of a) {\n if (unique.has(num)) {\n return num;\n }\n unique.add(num)\n }\n \n return -1\n}", "title": "" }, { "docid": "d6732893daa22ef740cc4f030f6f1029", "score": "0.68982655", "text": "function firstDuplicate(a) {\n let numbersTracker = {};\n let duplicateIndices = [];\n\n a.forEach( (number, index) => {\n let val = numbersTracker[number];\n\n if (!val){\n numbersTracker[number] = [index]\n } else {\n numbersTracker[number] = [index]\n duplicateIndices.push(index);\n }\n } )\n\n if (!duplicateIndices.length) return -1;\n return a[duplicateIndices[0]]\n}", "title": "" }, { "docid": "508e4dab1d11276b637ebd1fd6a803e7", "score": "0.68811643", "text": "function repeats(arr) {\n let count = 0\n let sum = 0\n let ptr = arr.length - 1\n let idxOfPtr\n arr.forEach((val, i, arr) => {\n if(count == 2) arr.slice(1)\n idxOfPtr = arr.indexOf(arr[ptr - i])\n if(idxOfPtr == ptr - i && typeof arr[ptr-i] !== \"string\"){\n count++\n sum += arr[ptr-i]\n }else{\n arr[idxOfPtr] = arr[idxOfPtr].toString()\n }\n })\n return sum\n}", "title": "" }, { "docid": "24dd2c8cd1b0054bb6937b73ca06c403", "score": "0.6873769", "text": "function firstDuplicate2(a) {\n const numbers = {};\n let duplicates = [];\n for (let i = 0; i < a.length; i++) {\n if (a[i] in numbers) {\n duplicates.push(i);\n } else {\n numbers[a[i]] = 1;\n }\n }\n return duplicates.length > 0 ? a[Math.min(...duplicates)] : -1;\n}", "title": "" }, { "docid": "41a4f1578f942e180b54ed8f014ffba0", "score": "0.68693304", "text": "function findFirstDupe(array) {\n\n for (let i = 0; i < array.length; i++) {\n const thisEl = array[i];\n\n freq += thisEl\n // test if the resulting frequency matches any other previous frequency\n var found = totals.find(function (el) {\n // el represents the current element in totals - iterates until it finds a match\n return el === freq\n });\n\n if (found) {\n console.log(`Found = ${found}, this is frequency number ${totals.length + 1}`);\n break;\n } else {\n totals.push(freq)\n if (totals.length === 300000) {\n console.log(totals);\n }\n if (i+1 === array.length) {\n // restart the loop if we get to the end and there was no duplicate\n findFirstDupe(input)\n }\n }\n }\n}", "title": "" }, { "docid": "7df36642061442aeb965e20197abe381", "score": "0.6842072", "text": "function findAllDuplicates(arr) {\n let freqCounter = {};\n let result = [];\n for (let val in arr) {\n freqCounter[arr[val]] = (freqCounter[arr[val]] || 0) + 1;\n }\n for (let el in freqCounter) {\n if (freqCounter[arr[el]] > 1) {\n result.push(arr[el]);\n }\n }\n return result;\n}", "title": "" }, { "docid": "11f2240e2f2941e7a5f538612d71690c", "score": "0.6842041", "text": "function onlyUniqueNumbers(array) {\n return array.filter(function (v, i, arr) {\n // compare index with first element index\n return i == arr.indexOf(v);\n })\n}", "title": "" }, { "docid": "bed0805bb0bce40d1856f6de80725df1", "score": "0.683486", "text": "function unique(arr) {\n // Time: O(n)\n // Space: O(n)\n let rMap = {};\n\n arr.forEach((num) => {\n rMap[num] ? rMap[num]++ : (rMap[num] = 1);\n });\n\n for ([k, v] of Object.entries(rMap)) {\n if (v === 1) return Number(k);\n }\n}", "title": "" }, { "docid": "499447cee03d6b685374bc843857ab85", "score": "0.6832521", "text": "function printRepeating(arr) {\n const hs = new Set();\n console.log(\"Repeating elements are:\");\n for (let insert = 0; insert < arr.length; insert++) {\n const val = arr[insert];\n\n if (hs.has(val))\n console.log(val);\n else\n hs.add(val);\n }\n}", "title": "" }, { "docid": "7499714fccf016fb313c2a76c4670276", "score": "0.68319154", "text": "function findUniques(a){\n let result = []\n for (num of a){\n let match = false;\n for (unum of result){\n if (num == unum){\n match = true;\n }\n }\n if (!match){\n result.push(num);\n }\n }\n return result;\n}", "title": "" }, { "docid": "ae91022f29313f919d707b89ad07c2ed", "score": "0.6819835", "text": "function findDuplicate(arr) {\n let visited = {};\n for (let element of arr) {\n if (visited[element]) return element;\n else visited[element] = true;\n }\n}", "title": "" }, { "docid": "9706aa404dfafab976268882dcb3814b", "score": "0.6802597", "text": "function checkForDuplicates(num) {\n for (let i = 0; i < num.length; i++) {\n for (let j = 0; j < i; ++j) {\n if (num[j] == num[i]) {\n return true;\n } else {\n return false;\n }\n }\n }\n}", "title": "" }, { "docid": "689fcb4760ecef0d4226b1f7a29411fd", "score": "0.6795942", "text": "function findDup(array) {\n let map = {};\n let dup = [];\n\n for (let i = 0; i < array.length; i++) {\n if (!map[array[i]]) {\n map[array[i]] = array[i];\n }\n else {\n dup.push(array[i]);\n }\n }\n console.log(\"duplicates: \", dup);\n\n}", "title": "" }, { "docid": "dac80c4ab465373f5907f732c2a8b099", "score": "0.6784539", "text": "function findDuplicate(arr) {\n let slow = 0,\n fast = 0;\n do {\n fast = arr[fast];\n slow = arr[arr[slow]];\n } while (fast != slow);\n fast = 0;\n while (fast != slow) {\n fast = arr[fast];\n slow = arr[slow];\n }\n return fast;\n}", "title": "" }, { "docid": "08c3d77f15704d7efbb3a98dc8390076", "score": "0.67778766", "text": "function unique11(array) {\r\n var res = new Map()\r\n return array.filter((item) => {\r\n return !res.has(item) && res.set(item, 1)\r\n })\r\n}", "title": "" }, { "docid": "de3ee23991794507f13fa5a6480833ee", "score": "0.6777489", "text": "function findDupNum(numArr){\n for(let i = numArr.length-1; i >= 0; i--) {\n let removed = numArr.splice(i, 1);\n if(numArr.join(\" \").indexOf(removed) !== -1){\n return \"duplicate found: \" + removed;\n }\n }\n return \"no duplicate found\";\n}", "title": "" }, { "docid": "7a94bf480ad9b2c3120ce5807af5b166", "score": "0.67735225", "text": "function findDuplicate(arr){\r\n var hashMap = [];\r\n for(let i = 0; i < arr.length; i++){\r\n if(hashMap[arr[i]])\r\n return arr[i];\r\n else\r\n hashMap[arr[i]] = true;\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "a85c54d7a6f3c9e4628ab33eb3e311a3", "score": "0.6771658", "text": "countDuplicates(array) {\n // Holds information about duplicates\n let count = {};\n // Counts how many times a number shows up and puts info into count obj\n array.forEach((x) => count[x] = (count[x] || 0) + 1);\n return count;\n }", "title": "" }, { "docid": "3d1537e0cab87bac357195008685e33d", "score": "0.6743177", "text": "function countIdentical(arr) {\n const identical = arr => {\n const filtered = Array.from(new Set(arr))\n return arr.length > 1 ? filtered.length < 2 : true\n }\n const result = arr.filter(a => (identical(a) ? a : null))\n return result.length\n}", "title": "" }, { "docid": "8d7a389a48aca3cc1e7500dcf6cf957c", "score": "0.6735029", "text": "function checkDuplicates(array) {\n var results = [];\n var sortedArray = array.slice().sort();\n for (i=0; i < array.length; i++) {\n if (sortedArray[i + 1] === array[i]) {\n results.push(array[i]);\n }\n }\n return results;\n}", "title": "" }, { "docid": "7009b16f46c8adb162dcd594df3dc68c", "score": "0.6731257", "text": "function firstDuplicateValue(array) {\n const seen = new Set();\n for ( const value of array) {\n if (seen.has(value)) return value;\n seen.add(value);\n }\n return -1;\n}", "title": "" }, { "docid": "0ee64175a4238c4374e6da13764a7f3d", "score": "0.6717096", "text": "function problem6() {\n // for testing:\n //var elements = [3, 2, 2, 2, 3, 4, 5, 11, 14, 6, 2, 2, 4];\n var elements = [4, 1, 1, 4, 2, 3, 4, 4, 1, 2, 4, 9, 3];\n var len = elements.length;\n\n elements.sort(); //doesn't need to be a stable sort, we just need equals next to each other\n var countSequence = 0, repElement = 0, countStored = 0, repElementStored = 0;\n for (var i = 0; i < len - 1; i++) {\n if (elements[i] == elements[i + 1]) {\n countSequence++;\n repElement = elements[i];\n }\n else if (countSequence >= countStored) {\n countStored = countSequence;\n repElementStored = repElement;\n countSequence = 0;\n }\n else\n continue;\n }\n console.log('Most frequent number: ' + repElementStored + ', repeated ' +(countStored + 1) +' times.');\n}", "title": "" }, { "docid": "27da34e07b3d7339dc2065236738c37b", "score": "0.6699583", "text": "function findUniq(arr) {\n if(arr[0] === arr[1] && arr[1] === arr[2]){\n for(let i = 2; i < arr.length ; i++){\n if(arr[i] !== arr[i+1]){\n return arr[i+1];\n }\n }\n }\n else{\n if(arr[0] === arr[1] && arr[0] !== arr[2]){\n return arr[2]\n }\n else if(arr[1] === arr[2] && arr[0] !== arr[1]){\n return arr[0]\n }\n else{\n return arr[1];\n }\n }\n}", "title": "" }, { "docid": "7a4f98a8cd9c9707de4b63261bd896ee", "score": "0.6696541", "text": "function getNonDupesBitwise(numbers) {\n let uniqueID = 0;\n numbers.forEach((number) => {\n uniqueID ^= number;\n });\n return uniqueID;\n}", "title": "" }, { "docid": "cfcb3f311429f076e02ec2c50b7c9212", "score": "0.6696325", "text": "function findUniq(arr) {\n for (let index = 0; index < arr.length; index++) {\n if (arr[1] !== arr[0]) {\n // They got me. This doesn't work for [0, 1, 0] because the first two values are unequal but the wrong value is returned\n return arr[0];\n } else if (arr[index] !== arr[index + 1]) {\n return arr[index + 1];\n }\n }\n}", "title": "" }, { "docid": "bc0a26f9dd84d4368253462a99b4e850", "score": "0.6689654", "text": "function removeDupes(arr){\n array5 = [];\n count = 0;\n for (var i=0; i<arr.length; i++){\n if (arr[i] == arr[i+1]){}\n else{\n array5[count] = arr[i];\n count++;\n }\n }\n console.log(array5);\n return array5;\n}", "title": "" }, { "docid": "73c23db12a5b9e04ca987b190c9baaa9", "score": "0.6686519", "text": "function removeDuplicates(nums) {\n\n}", "title": "" }, { "docid": "c4132fa6564146c93469b32cf1de119f", "score": "0.668178", "text": "function findDuplicate(ary) {\n const actualSum = ary.reduce((a, b) => a + b, 0);\n const lastItem = ary[ary.length - 1];\n\n // gauss\n const shouldBe = lastItem * (lastItem + 1) / 2;\n\n return actualSum - shouldBe;\n}", "title": "" }, { "docid": "b478b572e75ab5ec798ae5244faf69e9", "score": "0.668022", "text": "function removeDuplicates(nums) {\n if (nums.length <= 1){\n return nums.length;\n };\n \n let prevVal = nums[0];\n let validNumLength = 1;\n \n for (let i = 1; i < nums.length; i++){\n let currentVal = nums[i];\n \n if (currentVal !== prevVal){\n // found a new valid number\n validNumLength++;\n prevVal = nums[i];\n // move valid number to end of valid number section\n [nums[validNumLength-1]] = [nums[i]];\n }\n }\n \n \n return validNumLength;\n}", "title": "" }, { "docid": "25d715ab5eeb7c43eae0f723fa5bcb89", "score": "0.66767055", "text": "function printMissingNumber(arr){\n let s = new Set();\n for(let i = 0; i< arr.length; i++){\n s.add(i)\n }\n for(let j = 0; j<arr[arr.length - 1]; j++){\n if(!s.has(j)){\n console.log(j)\n }\n }\n}", "title": "" }, { "docid": "fd1377d1a849c04904fd05ad1e303d58", "score": "0.66746426", "text": "function remove_duplicate(arr){\n let result = [];\n let count = 0;\n for(let i=0;i<arr.length;i++){\n for(let j=0;j<arr.length;j++){\n if(arr[i] == arr[j]){\n // console.log(arr[j])\n count += 1;\n \n }\n }\n // console.log(\"count for \"+ arr[i]+ \" is \"+count)\n if(count == 1){\n // console.log(arr[i])\n result.push(arr[i])\n }\n count = 0\n // console.log(arr[i])\n }\n return result\n}", "title": "" }, { "docid": "b94975f5064543fa426e921a188022de", "score": "0.6671214", "text": "function findUniq(arr) {\n return arr.filter((val, i, arr) => {\n return arr.indexOf(val) === arr.lastIndexOf(val);\n })[0];\n}", "title": "" }, { "docid": "ad15e537d3a8e9dcf76dc1dd34413274", "score": "0.66701084", "text": "function highestOccurrence(arr){\n\n temp= [];\n newArray = [];\n unique=[];\n var count = 0;\n for(var i = 0 ; i < arr.length ; i++)\n {\n temp = arr[i];\n if(temp != arr[i +1])\n {\n continue;\n }\n else\n {\n temp = arr[i+1];\n\n newArray.push(temp);\n count ++;\n }\n\n }\n \tunique = Array.from(new Set(newArray));\n console.log(newArray);\n \t\tconsole.log(unique);\n\n return unique;\n}", "title": "" }, { "docid": "eba881b0f60475e23d04c20cc7d53bc9", "score": "0.6668846", "text": "function repetidos(arr){\r\n return arr.some(function(v,i) { return arr.indexOf(v,i+1)>-1 })\r\n}", "title": "" }, { "docid": "0ae86b6d3941c610d65e898933127ac6", "score": "0.6665944", "text": "function findDuplicate(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]) return arr[i];\n }\n }\n}", "title": "" }, { "docid": "62581db63df1d4570affd63aa614b760", "score": "0.6661368", "text": "function targetRepeats(arr){\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] == arr[i+1]) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "8f15b7a7842aaa456f7745dcb48347b0", "score": "0.6660102", "text": "function hasDuplicates($array) {\n return (new Set($array)).size !== $array.length;\n}", "title": "" }, { "docid": "6a7518cd4e60263885b4e0bf4a28cd8a", "score": "0.6659226", "text": "function getOddOccurrence(arr){\n\tvar result = 0;\n\tfor(var i = 0; i < arr.length; i++){\n\t\tresult = result ^ arr[i];\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "2d4825cf9bf13a57edbd3116c6b6f2dd", "score": "0.66575366", "text": "function findDuplicatesNestedLoop(array) {\n for (let i = 0; i < array.length; i += 1) {\n var currentNum = array[i];\n\n // Check for duplicate\n for (let j = 0; j < array.length; j += 1) {\n if (i === j) continue;\n\n if (currentNum === array[j]) return array[j];\n }\n }\n\n throw new Error(\"No duplicates found.\");\n}", "title": "" }, { "docid": "7cc3795d781b250db635a6173b0ea1ed", "score": "0.6645206", "text": "function findUniq(arr) {\n if(arr[1] === arr[2] && arr[0] != arr[1])\n return arr[0];\n \n var containsNaNs = Number.isNaN(arr[0])\n for (i = 1; i < arr.length; i++) \n { \n if(containsNaNs && Number.isNaN(arr[i]) || arr[i] === arr[i-1]) \n continue;\n \n return arr[i];\n }\n}", "title": "" }, { "docid": "1f3eb6aa3ec39a13d2d2cb623bb1b8d2", "score": "0.66441554", "text": "function findUniqTwo(arr) {\n return arr.find((n) => arr.indexOf(n) === arr.lastIndexOf(n));\n}", "title": "" }, { "docid": "291ed5cc90aae69deef6f516a1093991", "score": "0.662874", "text": "function findDuplicate(numberDoc)\n {\n \tvar sorted_arr = numberDoc.slice().sort(),results = [];\n\t\t\tfor (var i = 0; i < numberDoc.length - 1; i++)\n\t\t\t {\n \t\t\tif (sorted_arr[i + 1] == sorted_arr[i])\n \t\t \t{\n \t\t \tresults.push(sorted_arr[i]);\n \t\t\t}\t\n\t\t\t }\n\t\t\t return results;\n }", "title": "" }, { "docid": "77e3636bd33d4495755516431d0ee699", "score": "0.66234976", "text": "function findFirstRecurringCharacter(inputArray) {\n\n let hashCount = {};\n\n return inputArray.find((number) => {\n\n if (!hashCount[number]) {\n hashCount[number] = 1;\n } else if (hashCount[number] === 1) {\n return hashCount[number];\n }\n\n });\n}", "title": "" }, { "docid": "6c5908692817d41760c016845bb14fc1", "score": "0.66191417", "text": "function deDupe(nums) {\n let freq = {};\n for (let i=0; i < nums.length; i++){\n if (!freq.hasOwnProperty(nums[i])){\n freq[nums[i]] = true;\n }\n }\n nums = [];\n for (const num in freq){\n nums.push(num);\n }\n return nums;\n}", "title": "" }, { "docid": "eeadab39238bb53a00d7d23f3ae53240", "score": "0.6617958", "text": "function hasDuplicates(array) {\n return (new Set(array)).size !== array.length\n}", "title": "" }, { "docid": "7ec5e10138cbe202df55fc3e9cc6b7cc", "score": "0.660361", "text": "function removeDuplicates(nums) {\n let indexOfLastUniqueNum = 0;\n for (let i = 1; i < nums.length; i++) {\n if (nums[i] !== nums[indexOfLastUniqueNum]) {\n nums[++indexOfLastUniqueNum] = nums[i];\n }\n if (i !== indexOfLastUniqueNum) {\n nums[i] = null;\n }\n }\n return indexOfLastUniqueNum + 1;\n}", "title": "" }, { "docid": "babb35dea17a22d20fa675d72cb02ca5", "score": "0.66033703", "text": "function hasDuplicates(array) {\n return (new Set(array)).size !== array.length;\n}", "title": "" }, { "docid": "babb35dea17a22d20fa675d72cb02ca5", "score": "0.66033703", "text": "function hasDuplicates(array) {\n return (new Set(array)).size !== array.length;\n}", "title": "" }, { "docid": "babb35dea17a22d20fa675d72cb02ca5", "score": "0.66033703", "text": "function hasDuplicates(array) {\n return (new Set(array)).size !== array.length;\n}", "title": "" }, { "docid": "90b6b3990ea59780e7b9565a2c670c30", "score": "0.659889", "text": "function question3(array) {\n //if this only occurs once. \n}", "title": "" }, { "docid": "c17ead41a4ebd3fa83eccffa886334e1", "score": "0.6593969", "text": "function findDuplicate (arr) {\n\n let store = [];\n\n for(var i = 0; i < arr.length; i++) {\n if(arr.indexOf(arr[i]) !== arr.lastIndexOf(arr[i])) {\n store.push(arr[i]);\n }\n }\n return removeDuplicates(store);\n}", "title": "" }, { "docid": "75cf12f8c6a7c0b0433eaa760bb46cac", "score": "0.65904564", "text": "function isUnique(arr, num){\r\n \r\n return arr.filter(e => e === num).length === 1;\r\n}", "title": "" }, { "docid": "8af82855583d20287ee27eadff75760f", "score": "0.6579335", "text": "function countUniqueValues(arr){\n if(arr.length === 0){\n return 0;\n }\n let i=0;\n for(let j=0; j < arr.length -1 ; j++){\n if(arr[j] !== arr[j+1]){\n // console.log(arr[j], 'vs' , arr[j+1]);\n i++;\n }\n }\n return i + 1;//le sumamos 1 porque la primera vez en el loop que se encuentre un elemento diferente \n // a su siguiente (arr[j] !== arr[j+1]), ya se tendrán DOS elementos unicos (justamente arr[j] Y arr[j+1])\n // pero i recien ha contado 1!! (i++) ya que i empieza en 0.\n}", "title": "" }, { "docid": "5fd33e2b3a19cfa977eec785515ea855", "score": "0.65768856", "text": "function hasDuplicates(array) {\r\n let valuesAlreadySeen = []\r\n\r\n for (let i = 0; i < array.length; i++) {\r\n let value = array[i]\r\n if (valuesAlreadySeen.indexOf(value) !== -1) {\r\n return true\r\n }\r\n valuesAlreadySeen.push(value)\r\n }\r\n return false\r\n}", "title": "" }, { "docid": "5d304e7dd9b14d5fa59c4dddec05085d", "score": "0.65746784", "text": "function hasDuplicates(array) {\n return (new Set(array)).size !== array.length;\n}", "title": "" }, { "docid": "92108e880741da244824c02fac99e6cb", "score": "0.65739095", "text": "function findRepeating(arr,stations)\n {\n let res = [];\n for (let i = 0; i < arr.length; i++)\n {\n for (let j = i + 1; j < arr.length; j++)\n {\n // * 1 to convert string to int\n if (arr[i] === arr[j])\n res = [...res,{Stations:[stations[i],stations[j]],Duplicate:arr[i]*1}];\n }\n }\n return res;\n }", "title": "" }, { "docid": "1840564d16211652e1c94ff3b298961b", "score": "0.6570726", "text": "function uniqueNum(...args) {\n let obj = {}; //create an object to counter items of an array.\n args.forEach(x => {\n obj[x] = (obj[x] || 0) + 1; // if the item repeat itself the element of the object willc count it\n }); // '2': 1, '5':1, '7':2,...\n\n return Object.keys(obj).filter(x => obj[x] === 1)\n .map(x => x = parseInt(x)) // return only keys, not the values, filter values === 1\n // (not been repeated < 1), and return not strings '4', but a number (parseInt())\n\n}", "title": "" }, { "docid": "a26b20c9ea9fd22cec0f2f0013ef3fc9", "score": "0.6570435", "text": "function checksAllDuplicates1(data){\nreturn _(data)\n .countBy()\n .reduce((acc, val, key) => val > 1 ? acc.concat(key): acc, [])\n .map(_.toNumber)\n}", "title": "" }, { "docid": "c47d2f76d68b0866a327fca31aa72246", "score": "0.6567803", "text": "function findDuplicate(arr) {\n arr.sort((a, b) => a - b);\n for (let i = 1; i < arr.length; i++) {\n if (arr[i] === arr[i - 1]) return arr[i];\n }\n}", "title": "" }, { "docid": "9fcb9d91bfc0ff2b4069c5049604517f", "score": "0.6567395", "text": "function hasDuplicates(array) {\n return new Set(array).size !== array.length;\n }", "title": "" }, { "docid": "0c11367f5a0b430dddaf7e027ae1ee9c", "score": "0.6556926", "text": "function findDuplicate(arr) {\n let fast = 0;\n let slow = 0;\n //[4, 2, 1, 3, 1]\n do {\n let index = arr[fast];\n slow = arr[slow];\n fast = arr[index];\n\n console.log('fast=',fast,'slow=',slow);\n\n } while (fast !== slow);\n\n slow = 0;\n\n while (fast !== slow) {\n slow = arr[slow];\n fast = arr[fast];\n }\n\n return slow;\n }", "title": "" }, { "docid": "9aadafceb6ec12c9b52987e9782b9041", "score": "0.6553619", "text": "function remove_redundant(arr) {\n\t\t// var seen = {};\n\t\t// var out = [];\n\t\t// var len = arr.length;\n\t\t// var j = 0;\n\t\t// for(var i = 0; i < len; i++) {\n\t\t\t// var item = arr[i];\n\t\t\t// if(seen[item] !== 1) {\n\t\t\t\t// seen[item] = 1;\n\t\t\t\t// out[j++] = item;\n\t\t\t// }\n\t\t// }\n\t\t// return out;\n\t\tif (arr.length === 0) return arr;\n\t\t\tarr = arr.sort(function (a, b) { return a*1 - b*1; });\n\t\t\tvar ret = [arr[0]];\n\t\t\tfor (var i = 1; i < arr.length; i++) { // start loop at 1 as element 0 can never be a duplicate\n\t\t\t\tif (arr[i-1] !== arr[i]) {\n\t\t\t\t\tret.push(arr[i]);\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "title": "" }, { "docid": "37356ef96c158d348132acef5fe16ac4", "score": "0.6538801", "text": "function isDuplicated (array, p2) {\n var i = 0;\n var foundIt = false;\n while (i < array.length && foundIt == false) {\n if(array[i] == p2) {\n foundIt = true;\n }\n i++;\n }\n return foundIt;\n}", "title": "" }, { "docid": "e6290a00bfd19204db9cbd4f2397a583", "score": "0.65356314", "text": "function missingNums(arr) {\n let res;\n const set1 = new Set(arr);\n for(let i=1;i<=10;i++)\n { \n if(!set1.has(i))\n {\n res=i;\n break;\n }\n \n }\n return res;\n }", "title": "" }, { "docid": "58cce63d865fb3bae3434874ed946bad", "score": "0.6531606", "text": "function getOddOccurrence(arr){\n\tfor(var i = 0; i < arr.length; i++){\n\t\tvar count = 0;\n\t\tfor(var j = 0; j < arr.length; j++){\n\t\t\tif(arr[i] === arr[j]){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif(count % 2 !== 0){\n\t\t\treturn arr[i];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "170aea25529faeda24a639ad8c195c22", "score": "0.6523838", "text": "function kaprekarUnique(number){\r\n \tnumber = number.toString();\r\n \tnumber = number.split('');\r\n \tfor(let i = 0; i < number.length; i++){\r\n \t\tlet distinctDigit = 0;\r\n \t\tfor(let j = 0; j < number.length; j++){\r\n \t\t\tif(number[i] === number[j]){\r\n \t\t\t\tdistinctDigit += 1;\r\n \t\t\t}\r\n \t\t}//end inner loop\r\n \t\tif (distinctDigit > 2){\r\n \t\t\treturn false;\r\n \t\t}\r\n \t}//end outer loop\r\n \treturn true;\r\n }", "title": "" } ]
db835527c0e1b895828ae5f61d2ecb75
Black out the video for parental controls
[ { "docid": "7441a1e757779a1af6037778178a8caa", "score": "0.0", "text": "setVideoMute(enabled) {\n this.player.setVideoMute(enabled);\n }", "title": "" } ]
[ { "docid": "134751283d09b5bda8ea9e7571991a8e", "score": "0.7604659", "text": "function hideVideoControl() {\n teaserCtrlTl.to(videoControl[0], 1, {opacity: 0});\n trailerCtrlTl.to(videoControl[1], 1, {opacity: 0});\n}", "title": "" }, { "docid": "ae4099d8d86977cee46bfe9ac4159adf", "score": "0.7034519", "text": "function removeVideoControl() {\n try\n {\n var videoDiv=document.getElementById(\"divVideo\");\n if(videoDiv){\n var parent=videoDiv.parentNode;\n parent.removeChild(videoDiv);\n parent.style.display=\"none\";\n }\n var audioDiv=document.getElementById(\"divAudioMLearning\");\n if(audioDiv){\n var parent=audioDiv.parentNode;\n parent.removeChild(audioDiv);\n \n }\n }\n catch(err){\n }\n}", "title": "" }, { "docid": "df6a82a15f3a0bb81033ee13bab7da66", "score": "0.7006083", "text": "function stopVideo() {\n if (MyVideostream.getVideoTracks()[0].enabled) {\n MyVideostream.getVideoTracks()[0].enabled = false;\n } else {\n MyVideostream.getVideoTracks()[0].enabled = true;\n }\n changeVideobtn();\n}", "title": "" }, { "docid": "60b346dc7fb3476d9f17ff0695af7990", "score": "0.68311983", "text": "function hideVideoCall() {\n\n\n hideElement(videoContainer);\n hideElement(callButton);\n hideElement(hangupButton);\n showElement(ringButton);\n if (call_type != 1) {\n hideElement(videoContainer);\n hideElement(callButton);\n hideElement(hangupButton);\n // showElement(ringButton);\n hideElement(refusedButton);\n }\n}", "title": "" }, { "docid": "ef557c48574061b7ee1d086a3038d0f2", "score": "0.6801864", "text": "function stopMedia(destiny){\r\n var panel = getSlideOrSection(destiny);\r\n\r\n //stopping HTML5 media elements\r\n $('video, audio', panel).forEach(function(element){\r\n if( !element.hasAttribute('data-keepplaying') && typeof element.pause === 'function' ) {\r\n element.pause();\r\n }\r\n });\r\n\r\n //youtube videos\r\n $('iframe[src*=\"youtube.com/embed/\"]', panel).forEach(function(element){\r\n if( /youtube\\.com\\/embed\\//.test(element.getAttribute('src')) && !element.hasAttribute('data-keepplaying')){\r\n element.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}','*');\r\n }\r\n });\r\n }", "title": "" }, { "docid": "eafeecd88ad57829d9e1e4d171269e07", "score": "0.67731905", "text": "delegate() {\n this.disableTriggerByVisibility_();\n this.video.pause();\n }", "title": "" }, { "docid": "3a11473753501a2f77e356df865da603", "score": "0.6769837", "text": "function stopMedia(destiny){\r\n var panel = getSlideOrSection(destiny);\r\n\r\n //stopping HTML5 media elements\r\n panel.find('video, audio').each(function(){\r\n var element = $(this).get(0);\r\n\r\n if( !element.hasAttribute('data-keepplaying') && typeof element.pause === 'function' ) {\r\n element.pause();\r\n }\r\n });\r\n\r\n //youtube videos\r\n panel.find('iframe[src*=\"youtube.com/embed/\"]').each(function(){\r\n var element = $(this).get(0);\r\n\r\n if( /youtube\\.com\\/embed\\//.test($(this).attr('src')) && !element.hasAttribute('data-keepplaying')){\r\n $(this).get(0).contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}','*');\r\n }\r\n });\r\n }", "title": "" }, { "docid": "fcd7e1b51e5585cf833ab0e8d35d0f6d", "score": "0.6743299", "text": "function stopMedia(destiny){\n var panel = getSlideOrSection(destiny);\n\n //stopping HTML5 media elements\n panel.find('video, audio').each(function(){\n var element = $(this).get(0);\n\n if( !element.hasAttribute('data-keepplaying') && typeof element.pause === 'function' ) {\n element.pause();\n }\n });\n\n //youtube videos\n panel.find('iframe[src*=\"youtube.com/embed/\"]').each(function(){\n var element = $(this).get(0);\n\n if( /youtube\\.com\\/embed\\//.test($(this).attr('src')) && !element.hasAttribute('data-keepplaying')){\n $(this).get(0).contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}','*');\n }\n });\n }", "title": "" }, { "docid": "25c0aa5dcd45a375c2cedb13b09770b7", "score": "0.67384297", "text": "function stopWebcam() {\n var vid = document.querySelector('video');\n vid.srcObject.getTracks().forEach((track) => {\n track.stop();\n });\n // disable snapshot button\n document.querySelector('#takeSnap').disabled = true;\n }", "title": "" }, { "docid": "faecea622dbdb35bb416c8b2b7817ed7", "score": "0.67374724", "text": "function hideWhenDone() {\n console.log(\"hideWhenDone\");\n self.end();\n self.video.off(\"end\", hideWhenDone);\n self.video.off(\"pause\", resetWhenPaused);\n self.video.off(\"end\", disableReset);\n\t\t\t$container.addClass(\"iv-inactive-controls\");\n\t\t}", "title": "" }, { "docid": "03ce75068901c925fe72082b11a877fd", "score": "0.67331535", "text": "function stopMedia(destiny) {\n var panel = getSlideOrSection(destiny);\n //stopping HTML5 media elements\n panel.find(\"video, audio\").each(function() {\n var element = $(this).get(0);\n if (!element.hasAttribute(\"data-keepplaying\") && typeof element.pause === \"function\") {\n element.pause();\n }\n });\n //youtube videos\n panel.find('iframe[src*=\"youtube.com/embed/\"]').each(function() {\n var element = $(this).get(0);\n if (/youtube\\.com\\/embed\\//.test($(this).attr(\"src\")) && !element.hasAttribute(\"data-keepplaying\")) {\n $(this).get(0).contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}', \"*\");\n }\n });\n }", "title": "" }, { "docid": "90233bb67d9b9f50c2e591cb723380e7", "score": "0.6722886", "text": "disableVideoFec () {\n this.constrainOfferToRemoveVideoFec = true;\n }", "title": "" }, { "docid": "0851d87f71f613009511ddb870897e54", "score": "0.6712265", "text": "hideVideoInformation() {\n $(\"#video-informatie\").hide(1000);\n $(\"#backToOverviewArrow\").hide(1000);\n }", "title": "" }, { "docid": "49b1a7f259d1d5af973a2a0a07a8ae19", "score": "0.6670855", "text": "function disposeGraph(){\n // After playing the graph plotting video close option is choosen, the background scan image and the video is mafde hidden.\n document.getElementById('video1').style.visibility='hidden';\n document.getElementById('video2').style.visibility='hidden';\n document.getElementById('video3').style.visibility='hidden';\n document.getElementById('video4').style.visibility='hidden';\n document.getElementById('video5').style.visibility='hidden';\n document.getElementById('scan').style.visibility='hidden';\n document.getElementById(\"graph_instruction\").style.visibility =\"hidden\";\n document.getElementById(\"instruction_bkgd\").style.visibility =\"hidden\";\n}", "title": "" }, { "docid": "74e8e924a5aff3af0f75b5345f83fd76", "score": "0.6669825", "text": "function hideEverything() {\n image.attr(\"hidden\", true);\n video.attr(\"hidden\", true);\n webview.css(\"display\", \"none\");\n tablet.css(\"background-color\", \"#ffffff\");\n}", "title": "" }, { "docid": "e3afa2b91506b3ae1a2b9520c5b541a3", "score": "0.6637612", "text": "function stopMedia(destiny){\r\n var destiny = getSlideOrSection(destiny);\r\n\r\n //stopping HTML5 media elements\r\n destiny.find('video, audio').each(function(){\r\n var element = $(this).get(0);\r\n\r\n if( !element.hasAttribute('data-keepplaying') && typeof element.pause === 'function' ) {\r\n element.pause();\r\n }\r\n });\r\n\r\n //youtube videos\r\n destiny.find('iframe[src*=\"youtube.com/embed/\"]').each(function(){\r\n var element = $(this).get(0);\r\n\r\n if( /youtube\\.com\\/embed\\//.test($(this).attr('src')) && !element.hasAttribute('data-keepplaying')){\r\n $(this).get(0).contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}','*');\r\n }\r\n });\r\n }", "title": "" }, { "docid": "592fc92acd95528edb96e2652e41bac3", "score": "0.6597722", "text": "function stopPlayback() {\n\tvar meadow = document.getElementById(\"meadow\");\n\tmeadow.pause();\n\tmeadow.currentTime=0;\n\tdocument.getElementById(\"start\").disabled=false;\n\tdocument.getElementById(\"pause\").disabled=true;\n\tthis.disabled=true;\n}", "title": "" }, { "docid": "45a9a5fbffcf3f516bfb88758e303fb3", "score": "0.65765244", "text": "function stopPlayer() {\n toggleWidePlayer(false);\n video_player.innerHTML = '';\n video_player.appendChild(play_video_link);\n $('watch-player-div').style.height = '385px';\n}", "title": "" }, { "docid": "5a05f0827c3174dc2fcff433dcf0ccae", "score": "0.65478", "text": "function stopMedia(destiny){\n var destiny = getSlideOrSection(destiny);\n\n //stopping HTML5 media elements\n destiny.find('video, audio').each(function(){\n var element = $(this).get(0);\n\n if( !element.hasAttribute('data-ignore') && typeof element.pause === 'function' ) {\n element.pause();\n }\n });\n }", "title": "" }, { "docid": "19970b5dd5d6490c445a5605cea1598c", "score": "0.6536396", "text": "hideControlBar() {\n if (this.controlFadeTimeout) {\n clearTimeout(this.controlFadeTimeout);\n }\n\n if (this.controlBar) {\n this.controlBar.hide();\n this.adjustVideoMask(this.videoElement.isPlaying() ? LIGHT : DARK);\n }\n }", "title": "" }, { "docid": "78cd203328aeecef878f7bec35bb22e9", "score": "0.65255904", "text": "function hideVideo(){\n $(\"#tours\").attr('src', '');\n\t\t$(\"#video\").slideUp(700, function () {\n\t\t\t$(\"#videoLoad\").fadeOut('slow');\n\t\t\t});\n\t\t$('.play').removeClass('disabled');\n}", "title": "" }, { "docid": "7bbb3806ab863b05ce93cd0f391d2f16", "score": "0.65189683", "text": "unlockShowing() {\n this.removeClass('vjs-lock-showing');\n }", "title": "" }, { "docid": "7bbb3806ab863b05ce93cd0f391d2f16", "score": "0.65189683", "text": "unlockShowing() {\n this.removeClass('vjs-lock-showing');\n }", "title": "" }, { "docid": "b2ff4dbc6295e3be1b8c2b06c28404ec", "score": "0.6501394", "text": "function stopVideo(){\n videoPlayer.style.display = \"none\"\n}", "title": "" }, { "docid": "22d58a3b85a4335c47d6d373efb6dc8f", "score": "0.6496457", "text": "turnOffVisibility() {\n paella.PaellaPlayer.mode.none = 'none';\n this.config.visibleOn =[paella.PaellaPlayer.mode.none];\n this.hideUI();\n }", "title": "" }, { "docid": "9a61754188053813b14774a187851644", "score": "0.64804053", "text": "disable() {\n this.paused = true;\n this.hidden = true;\n }", "title": "" }, { "docid": "97d37aaf900830c2276cab7f39c6e1c9", "score": "0.64510524", "text": "function videoClick() {\n\tcreatejs.Ticker.removeEventListener(\"tick\", tick);\n\tcc.stop();\n}", "title": "" }, { "docid": "a4880a5147ba7f93eb39cdd6fdaea6d8", "score": "0.6444853", "text": "disable() {\n this.children().forEach(child => child.disable && child.disable());\n if (!this.enabled()) {\n return;\n }\n this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n this.off(this.el_, 'mousemove', this.handleMouseMove);\n this.removeListenersAddedOnMousedownAndTouchstart();\n this.addClass('disabled');\n this.enabled_ = false;\n\n // Restore normal playback state if controls are disabled while scrubbing\n if (this.player_.scrubbing()) {\n const seekBar = this.getChild('seekBar');\n this.player_.scrubbing(false);\n if (seekBar.videoWasPlaying) {\n silencePromise(this.player_.play());\n }\n }\n }", "title": "" }, { "docid": "4d8f620928b19ebd4f7f9bc34a1445f0", "score": "0.64388466", "text": "handleVideoStop() {\n this.props.root.classList.remove('playing');\n this.props.onPause();\n }", "title": "" }, { "docid": "9c0a41f4deab14732119e2bfa815e121", "score": "0.6422472", "text": "disable() {\n if (!window.engine) {\n return;\n }\n this.controlsEnabled = false;\n if (engine.getMainPlayer()) {\n engine.getMainPlayer().clearInput();\n }\n }", "title": "" }, { "docid": "d695da692b0477992a05c1591d4bc7ea", "score": "0.6420126", "text": "function dvjs_video_onstop() { }", "title": "" }, { "docid": "7abae51433c0881254f092286f50a6a8", "score": "0.6387783", "text": "function stopVideoVin() {\r\n var v = document.getElementById('vin_video');\r\n v.pause();\r\n}", "title": "" }, { "docid": "e1a5fc31fb9b44e722bcd2fe34e4ff0f", "score": "0.63843983", "text": "function removeInkCanv() {\r\n if ($(\"#inkCanv\").length)\r\n $(\"#inkCanv\").remove();\r\n\r\n $(\"#rinplayer\").css({\r\n \r\n });\r\n }", "title": "" }, { "docid": "a08ed716220a50b0a00ed9e262403a4a", "score": "0.6368965", "text": "function disable(){\n gameover.style.display = 'none';\n options.style.display = 'none';\n authentication.style.display = 'none';\n game.style.display = 'none';\n remoteVideo.style.display = 'none';\n selectPlayer.style.display = 'none';\n mainPage.style.display = 'none';\n}", "title": "" }, { "docid": "fc72d8d3bd71ec538a372d8b4043afc6", "score": "0.63678", "text": "hidePlayer() {\n this.player.style.display = 'none';\n }", "title": "" }, { "docid": "87ed2c259342ee0cbe60c3f71d326c09", "score": "0.63634366", "text": "function stopVideo() {\n if (player.stopVideo !== undefined)\n player.stopVideo();\n }", "title": "" }, { "docid": "77f028a982f033e44c3130e358afcdc7", "score": "0.6353675", "text": "stop () {\n if (this._isTracking) {\n this.settings.debug.canvas.parent.style.display = 'none'\n this._isTracking = false\n this.video.srcObject.getTracks().forEach(track => track.stop())\n\n // Set body classes\n document.body.classList.remove('handsfree-is-started')\n document.body.classList.add('handsfree-is-stopped')\n\n // Stop running plugins. Deferred to run after final frame\n this.stopPlugins()\n Handsfree.stopDebugging.call(this)\n }\n }", "title": "" }, { "docid": "ee5b010a3ca775dd3e6c9ebf8056e2ad", "score": "0.6351917", "text": "function outVideoControl(evt) {\n var video = checkVideo(evt.currentTarget);\n if (video.id === \"teaser\") {\n teaserCtrlTl.play();\n }\n else {\n trailerCtrlTl.play();\n }\n}", "title": "" }, { "docid": "f34472b26b3628032eaf1c30d97c46a1", "score": "0.6319099", "text": "function remove_custom_video_elements() {\n console.log(\"[youtube-audio] Removing custom video elements\");\n $(\".audiox\").each(function() {\n console.log($(this));\n $(this)[0].pause();\n $(this).remove();\n });\n\n $(\"#player-api\").find('img').remove();\n}", "title": "" }, { "docid": "a92f4ac0bde9a039668a576119afe2ba", "score": "0.63142616", "text": "function ensureOpaqueVideo() {\n $('#showmoremodal IFRAME[src*=\"youtube\"]').each(function () {\n var src = this.src;\n\n if (src.indexOf('/embed/') != -1) {\n if (src.indexOf('wmode=transparent') == -1) {\n src += (src.indexOf('?') == -1) ? '?' : '&';\n src += 'wmode=transparent';\n }\n $(this).attr({\n \"src\": src,\n \"wmode\": \"transparent\"\n });\n }\n }); \n}", "title": "" }, { "docid": "24ebd06c7ae192d17b1e24536626e47f", "score": "0.63056093", "text": "function on_not_current_player()\n {\n current_player_buttons.style.display = 'none';\n allow_break_button.style.display = 'block';\n }", "title": "" }, { "docid": "a401c34c539d58af28945fd11294298e", "score": "0.6305593", "text": "reset() {\n this.seeking = false;\n this.videoPlaying = false;\n this.videoBeganPlaying = false;\n this.videoChangingSize = false;\n this.videoEndedPlaying = false;\n }", "title": "" }, { "docid": "e86d82756a8fc03484ff2c67e92157b8", "score": "0.63050836", "text": "function pauseVideoWhenInactive() {\n\tif (SETTINGS.mode.fisheye.video.active || SETTINGS.mode.equirectangular.video.active) {\n\t\tif (SETTINGS.input.video.paused == false) {\n\t\t\tSETTINGS.video_controlls.user_inactive = true;\n\t\t\tSETTINGS.input.video.pause();\n\t\t\tSETTINGS.video_controlls.object.btn.play.setAttribute('class', 'play_icon'); \n\t\t} else {\n\t\t\tSETTINGS.video_controlls.user_inactive = false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b0c49fbdcb5cc96792f79513427a991b", "score": "0.6303355", "text": "function stopVideoIntM() {\r\n var im = document.getElementById('interview_video_mobile');\r\n im.pause();\r\n}", "title": "" }, { "docid": "eb4282b753acf7584b5e5f1c364209d0", "score": "0.62991345", "text": "function fVideo() {\n $(\"#popup\").toggleClass(\"active\");\n var video = $(\"video\");\n video.pause();\n video.currentTime = 0;\n}", "title": "" }, { "docid": "70a265e8dc3dfec89bcfd65a9d4411db", "score": "0.6296562", "text": "function hidePlayerThumbnailBar () {\n windows.main.win.setThumbarButtons([])\n}", "title": "" }, { "docid": "e4a57be6c9a68ef93b8ad3157c368075", "score": "0.6295393", "text": "function stopVideo(){\n\n vidDiv.style.display = \"none\";\n nav.style.display = \"block\";\n vid.pause();\n vid.currentTime = 0;\n\n}", "title": "" }, { "docid": "ceda0e7b2677d593ba85c86524a870d5", "score": "0.6294157", "text": "function disableNoSleep() {\n if (has.iOS) {\n if (noSleepTimer) {\n clearInterval(noSleepTimer);\n noSleepTimer = null;\n }\n } else if (has.Android) {\n noSleepVideo.pause();\n noSleepVideo.src = '';\n }\n }", "title": "" }, { "docid": "39f3a8974678cacc95d61760d32df06c", "score": "0.6287201", "text": "function removeVideo() {\n var currentVideo = document.querySelector('.frame--show');\n if (!currentVideo) { return; }\n\n currentVideo.classList.add('frame--hide');\n currentVideo.classList.remove('frame--show');\n}", "title": "" }, { "docid": "b899a4833714f0b1332c91fca1ad812c", "score": "0.6283294", "text": "function stopVideo() {\n video.pause();\n video.currentTime = 0;\n}", "title": "" }, { "docid": "b899a4833714f0b1332c91fca1ad812c", "score": "0.6283294", "text": "function stopVideo() {\n video.pause();\n video.currentTime = 0;\n}", "title": "" }, { "docid": "11cc15bab79097db4d14e6bda81a2ebf", "score": "0.6278072", "text": "function videoStop() {\n let video = document.querySelector('#video');\n video.removeEventListener('timeupdate', video.listener);\n }", "title": "" }, { "docid": "011e84dc7d11c36e263c2153892aab70", "score": "0.6273895", "text": "function muteVideo(self, id) {\n const userStream = document.getElementById(id).srcObject;\n const deets = document.getElementById(id).nextElementSibling;\n if (userStream.getAudioTracks()[0].enabled) {\n userStream.getAudioTracks()[0].enabled = false;\n // userStream.getVideoTracks()[0].enabled = false;\n deets.children[1].classList.remove('icon-volume-2');\n deets.children[1].classList.add('icon-volume-off');\n } else {\n userStream.getAudioTracks()[0].enabled = true;\n // userStream.getVideoTracks()[0].enabled = true;\n deets.children[1].classList.add('icon-volume-2');\n deets.children[1].classList.remove('icon-volume-off');\n }\n}", "title": "" }, { "docid": "b98702cd7c2745a40f5385b9edb89e52", "score": "0.626455", "text": "onPressVideo() {\n // showing controls if they don't show\n if (this.state.hideControls) {\n this.setState({hideControls: false});\n this.timeoutHandle = setTimeout(() => {\n this.setState({hideControls: true});\n }, 8000);\n }\n }", "title": "" }, { "docid": "5ded96b5677e84b54e7e6b6b06cbe537", "score": "0.62566406", "text": "function stopVideo() {\n var iframe = document.querySelector( \".iframe\");\n if ( iframe ) {\n var iframeSrc = iframe.src;\n iframe.src = iframeSrc;\n }\n}", "title": "" }, { "docid": "6fb70b90f156863a5b89b9977d41c271", "score": "0.6250487", "text": "function stopVideoInt() {\r\n var i = document.getElementById('interview_video');\r\n i.pause();\r\n}", "title": "" }, { "docid": "80d680793ee1b9a25097211154c789c3", "score": "0.6243405", "text": "disableVideo() {\n this.enabled = false\n // If we have begun a setup process, call _teardown after it completes\n if (this._singleSetup) {\n this._singleSetup\n .then(this._teardown.bind(this))\n .catch((err) => this.onError(err))\n }\n }", "title": "" }, { "docid": "e13d9b35c1bdec9b400e799adbd59b4c", "score": "0.62393075", "text": "function capturingOff() {\r\n var i;\r\n //for (i = 0; i < tracks.length; i++) {\r\n // tracks[i].deselectKeyframe();\r\n //}\r\n dataHolder.mapTracks(function (i) {\r\n i.track.deselectKeyframe();\r\n });\r\n }", "title": "" }, { "docid": "c96cb79fe782e68ef6838b7c1890d495", "score": "0.6234636", "text": "function stopVids(patterns){\n console.log(\"hiding all vids\");\n for (var i = patterns.length - 1; i >= 0; i--) {\n if (patterns[i][2] == '')\n continue;\n var elem = document.getElementById(patterns[i][2]);\n console.log(\"hiding\", patterns[i][2], elem);\n elem.pause();\n elem.currentTime = 0;\n elem.style.display = \"none\";\n }\n}", "title": "" }, { "docid": "eac499a3bc921cbfe1e0783055a9ad6c", "score": "0.6233525", "text": "function hidePlay(){\n // hide play\n cp.hide(playID);\n // show pause\n cp.show(pauseID); \n }", "title": "" }, { "docid": "bbe1feafcd64b2d5eccd7b7f03801838", "score": "0.6230901", "text": "function stopVideoVinM() {\r\n var vm = document.getElementById('vin_video_mobile');\r\n vm.pause();\r\n}", "title": "" }, { "docid": "d2dce0a07465f79d64f309fa04de8566", "score": "0.62261784", "text": "function removeVideoBlock() {\n\t\tif (selectedBlock) {\n\t\t\tselectedBlock.$element[0].remove();\n\t\t}\n\t}", "title": "" }, { "docid": "d6e098624d1909a71c00183a85962dae", "score": "0.622151", "text": "function stopPlayback() {\n var Item_Propaganda = document.getElementById(\"Item_Propaganda\");\n Item_Propaganda.pause();\n Item_Propaganda.currentTime=0;\n\t LoopVideo = false;\n endPlayback();\n }", "title": "" }, { "docid": "ba38cfe4aa3acc8c274ec8f1f6bb9f7e", "score": "0.6207124", "text": "function stopVideo() {\n player.stopVideo();\n}", "title": "" }, { "docid": "874dfc355b1dadc60fa5128532ee8da1", "score": "0.61953485", "text": "function remove_video_elements() {\n console.log(\"[youtube-audio] Removing youtube video elements\");\n\n // Copy the element before removing\n var videoPlayer = $(\"#movie_player\");\n\n videoPlayer.removeClass();\n\n // pause the video before removing it.\n var videoElement = videoPlayer.find(\"video\")[0];\n if(videoElement != undefined || videoElement != null) {\n $(videoElement).removeClass();\n $(videoElement).src = \"\";\n videoElement.load();\n videoElement.pause();\n }\n\n // remove the element.\n videoPlayer.remove();\n}", "title": "" }, { "docid": "e8aafdcc69a2d59fc640915b534786de", "score": "0.619233", "text": "function stopVideo(){\n video.pause();\n video.currentTime = 0;\n}", "title": "" }, { "docid": "f227b08553db9baa84e1d4c33a9bac7f", "score": "0.617586", "text": "cleanVideoSource(videoElement) {\n try {\n videoElement.srcObject = null;\n }\n catch (err) {\n videoElement.src = '';\n }\n this.videoElement.removeAttribute('src');\n }", "title": "" }, { "docid": "cd85fe30dbbabb51397d3821c9751109", "score": "0.61710083", "text": "function previewStopVideo() {\n\t $scope.previewIsLoading = false;\n\t var player = jwplayer(\"expander-preview-row-\" + $scope.rowIndex);\n\t player.stop();\n\t }", "title": "" }, { "docid": "8ca23cb18e5449f1b676fecee1e47cdf", "score": "0.6160927", "text": "function videoStop($wrapper) {\n // if we're stopping all videos on page\n if (!$wrapper) {\n var $wrapper = $('.js-videoWrapper');\n var $iframe = $('.js-videoIframe');\n // if we're stopping a particular video\n } else {\n var $iframe = $wrapper.find('.js-videoIframe');\n }\n // reveal poster\n $wrapper.removeClass('videoWrapperActive');\n // remove youtube link, stopping the video from playing in the background\n $iframe.attr('src','');\n }", "title": "" }, { "docid": "954a200bb8013db85aed0e71628511b7", "score": "0.61579126", "text": "function removeContainer(){ // removees the whole video container but you can listen to the music\n for(let i of document.getElementsByClassName('html5-video-container')) i.remove()\n try{\n document.querySelector('#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > button').click()\n } catch{\n console.log('here')\n }\n}", "title": "" }, { "docid": "1d0f05a83c575b8ad8f18d737f554650", "score": "0.6150084", "text": "function fixVideoDeep() {\n\t$(\".video-container iframe\").each(function(){\n\t\t var ifr_source = $(this).attr('src');\n\t\t var wmode = \"wmode=transparent\";\n\t\t if(ifr_source.indexOf('?') != -1){ $(this).attr('src',ifr_source+'?'+wmode);}\n\t\t else $(this).attr('src',ifr_source+'?'+wmode);\n\t});\n}", "title": "" }, { "docid": "0730e7ee0f5578a7bee707dd614eb6d2", "score": "0.61456317", "text": "function stopVideoKas() {\r\n var k = document.getElementById('kasse_video');\r\n k.pause();\r\n}", "title": "" }, { "docid": "842667165f009b0f35e1edcb25c8f462", "score": "0.61437285", "text": "function handleVisibilityChange() {\n if (document[hidden]) {\n videoElement.pause();\n console.log(\"pausing video background\");\n } else {\n videoElement.play();\n console.log(\"resuming video background\");\n }\n}", "title": "" }, { "docid": "f807d9a28a5ea292af5cafaf220270af", "score": "0.61355436", "text": "function stopPlayer(videoID, player) {\r\n\r\n // Remove everything\r\n $('div_' + videoID).innerHTML = '';\r\n\r\n // Container div for the previews and button to play\r\n var stills = $E('div');\r\n\r\n // First preview\r\n var still0 = $E('img',\r\n { 'class': 'still0',\r\n 'src': 'http://i3.ytimg.com/vi/' + videoID + '/0.jpg' });\r\n still0.style.cssFloat = 'left';\r\n stills.appendChild(still0);\r\n\r\n // Button to play\r\n var play_btn = $E('img',\r\n { 'class': 'play_btn',\r\n 'src': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAABkCAYAAABkW8nwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABR9JREFUeNrsm21olWUYx69z5o57OxtJUjRaTIzJYrDQtl4oyZVNhKCoL4YQBEEfRlEkQYEkfgikPknRIIIgKcSiSBwI0UASRdictjRfivVOsTE5eM42z9Z1PZ2HDoezdbZzn5c9z+8Hf89kTnguft73dd/PZUSOTMkyaNE8rtmp2ajZLBBUkppxzXHNkGZ4OT8cKVCsVs2bml2aemoeSv7SvKc5oEkUK5atUK9pXkQoyBJsr2ZQk16JWLbVHct8AuRiW+OTmsl834wu8kP9mhGkgiXYqjml6ShULGvOv9I0UTv4H2zh+TbfApQrVo/msKaGmkGBrNN8kenH84plf+ATTYxawTLpzLiTV6z9mnZqBCvE+vLnck+FZtwYWyA4uIrYoEn4K9arSAUOWO+vWrZiWdP1u3ABCm64qNkUzVwvIBW4wu61uqKZpgvAJTtNrPuoAzimx8Rqow7gejuMchqEEtAapQZQApoQC0pBDWJBSUAsQCxALEAsAMQqms/ubZSNHIYRyzVP3FYrY31x2d9ZJ01rIhiAWO6or4nI65vq5NL2uDx7B5PYiOWYW+ui8uHmBjn1cFx6buLNFmI5xqQyuT6+p0Fa6ykJYjlm1+0xufBo3NsmbbsExHKGNfTW2JtgT7XWUhDEcktbQ1QO9zbKNw81SXcL/RdiOWbrzWtkpC8u79/dIOtibI+I5Zjn22Ny9bFmefnOtRKjaojlkpbaiLzdVS9jfc3Sfwv9F2I5piMelWMPNHrpbKb/QizH2Ko1si3urWK2mgFiOcP6Leu7rP96YcNaCoJYbrET47vd9d4J0k6SiAVOsTsvu/uy8Ry7C0MscIqN59jtfVjHcxCrhGSP5+xuiyEWuMXGcz7aEq7xHMQqI/54jklmsiEWOMW2Rdsegzyeg1gVwh/P+e6RuNfoIxY4pb0x6l1NBG08B7GqBLtUPbMt7l2yBmE8B7GqCGu37LWQP56zmtsvxKpC/hvPia/a8RzEqmJi0dW7ZPG2tAqZnluQfRdScvDKjMzOIxY44IOfZmXP+aRMzi6s6udArCph+O8b8tLZpIxOpwPxPIhVYSauz3sr1Ke/zAXquRCrQiRuLMhbP8zIO5dmJJleCNzzIVYFOPSz9VEp+TU5H9hnRKwycnoqLQOj173PoINYZeCP1Ly8MZ7yTnxhAbFKiPVO1kNZL2U9VZhArBLx+W9z3mnvcmI+lM+PWI45d836qKR3LxVmEMsRdlNufdTgjzOSXqAeiFUkJpG909v7fcp7xweIVTRDf87JK+dSMn4tTTEQq3isIR84m/TEAsQqmiCMsyBWlRGUcRbEqhKCNs6CWBUmqOMsiFUhgj7OglgVIAzjLIhVRsI0zoJYZSCM4yyIVULCPM6CWCUi7OMs5SIiR6b4JwvO4b/YA2IBYgFiASAWIBaEmFnEglKQMLF4nwGumTCxLlMHcMy4iTVMHcAxJ0ysr6kDOOaoiXVUM0ktwBEn/R4rqTlIPcARB+wXm26wzybNVc166gJFrlb32xf+PVZCs4+6QJHs8b/IviAd1JymNrBCrJ064f/G3wp92jRn2BJhmRzX7NCk861YxoRmO6dEWAYXNU9nS5VPLGNU0yvcyENhK5U169O531jsJbRJtUUzRO1giZ5qx2K721LTDdOZH3yG1QuysAPeg5qB3O2vULF8DmnuyvxFCBZeTmZ6qd7s099i5J4KC6Fb06/p0nTIv5erHdQ9UIxmVqPRTL7MHOwK5h8BBgAHUHTXJ6KlKQAAAABJRU5ErkJggg==' });\r\n stills.appendChild(play_btn);\r\n\r\n // Link to play the video\r\n var play_video_link = $E('a',\r\n { 'class': 'play_video_link',\r\n 'href': 'javascript:void(0);' });\r\n play_video_link.appendChild(stills);\r\n\r\n // Append the previews and the link (and a break)\r\n $('div_' + videoID).appendChild(play_video_link);\r\n $('div_' + videoID).appendChild($E('br'));\r\n\r\n // When clicked, that link should create the player\r\n play_video_link.addEventListener('click', function(e){buildPlayer(player,videoID)}, false);\r\n\r\n}", "title": "" }, { "docid": "1f4487f2a1caee4d995241fdff31e8f7", "score": "0.6134582", "text": "function unstarted() {\n stopUnstarted();\n nextVideo();\n}", "title": "" }, { "docid": "c716a28148342135020d4ec9d270c536", "score": "0.61190784", "text": "function onPlayerReady(event) {\n event.target.stopVideo();\n}", "title": "" }, { "docid": "54c5e23b22a05a45f57c2516794fc7c4", "score": "0.6117197", "text": "hide() {\n this.addClass('vjs-hidden');\n }", "title": "" }, { "docid": "54c5e23b22a05a45f57c2516794fc7c4", "score": "0.6117197", "text": "hide() {\n this.addClass('vjs-hidden');\n }", "title": "" }, { "docid": "5207be61a157080762ea163357f3e98c", "score": "0.611514", "text": "function stopVideo() {\n\tplayer.stopVideo();\n}", "title": "" }, { "docid": "277e8800009544b1a5d3bd33c77f00bf", "score": "0.6099447", "text": "function pauseVideo() {\n\t\thouseVideo.pause();\n\t}", "title": "" }, { "docid": "f8a78b3d3ffc553867117065e587a73e", "score": "0.6096061", "text": "function toggleVideo() {\n if (!isVideo) {\n document.getElementById(\"trackbutton\").style.backgroundColor = \"#167BFF\";\n document.getElementById(\"trackbutton\").style.borderColor = \"#167BFF\";\n document.getElementById(\"trackbutton\").style.color = \"white\";\n document.getElementById(\"trackbutton\").style.boxShadow = \"none\"; \n startVideo();\n } else {\n document.getElementById(\"trackbutton\").style.backgroundColor = \"#FDC208\";\n document.getElementById(\"trackbutton\").style.borderColor = \"#FDC208\";\n document.getElementById(\"trackbutton\").style.color = \"black\";\n handTrack.stopVideo(video);\n isVideo = false;\n }\n}", "title": "" }, { "docid": "42b62f3a1391b9d165c2a0615ad9ff60", "score": "0.60892665", "text": "function skip() {\n updateOverlayText('introduction');\n d3.select(\"#video_container\").remove();\n}", "title": "" }, { "docid": "1b774995aae970f488609be0304645c8", "score": "0.60884076", "text": "function destroyPreview() {\n video.pause();\n video.src = null;\n captureUI && document.body.removeChild(captureUI);\n\n if (videoStream) {\n videoStream.stop();\n videoStream = null;\n }\n }", "title": "" }, { "docid": "63d511416dc634524a67273d96bf267f", "score": "0.60868686", "text": "function hangUp() {\n userStream.current.getVideoTracks()[0].enabled = false;\n window.location.replace(\"/\");\n }", "title": "" }, { "docid": "e6fc6072d28fd3e04d44e5ad40dfe6e7", "score": "0.6085569", "text": "function stopVideo(container){\n\n\n container.find('#modal-content').empty();\n\n}", "title": "" }, { "docid": "136bcc0a4bc56eb5c7ddfdd279ed2900", "score": "0.60829484", "text": "function closeGenericVideoComponentCutter() {\n $('._video_component_cutter_arrow').hide('fade', {}, 250);\n $('._video_component_cutter').hide('fade', {}, 250, function() {\n $('._commit_media_element_editor').show();\n $('#video_editor_global_preview a').removeClass('disabled');\n $('._video_editor_bottom_bar').css('visibility', 'visible');\n resetVisibilityOfVideoEditorTransitions();\n $('#media_elements_list_in_video_editor .jspHorizontalBar').css('visibility', 'visible');\n $('._video_editor_bottom_bar').show();\n $('#video_editor_box_ghost').hide();\n $('._video_editor_component_hover').removeClass('selected');\n $('._new_component_in_video_editor_hover').removeClass('selected');\n $('._video_component_icon').removeClass('selected');\n });\n}", "title": "" }, { "docid": "4aa0142b94e925ad4d676d8cb4a7d97b", "score": "0.6073987", "text": "function muteVideo(muteButton) {\n var id = muteButton.id;\n id = parseInt(id);\n var videoObject = document.getElementById( getIdOfBox(id));\n if (videoObject.style.visibility=='hidden'){\n //videoObject.play(); //pause and play mute audio as well\n videoObject.style.visibility='visible';\n var paused = false;\n muteButton.setAttribute(\"style\",\"-webkit-filter:invert(0%)\")\n } else{\n //videoObject.pause();\n videoObject.style.visibility='hidden';\n var paused = true;\n muteButton.setAttribute(\"style\",\"-webkit-filter:invert(100%)\")\n }\n muteButton.src = paused?\"../images/videomute.svg\":\"../images/video.svg\";\n}", "title": "" }, { "docid": "ffa94d34b5dcc5a9007dfd6900d50c2d", "score": "0.6073596", "text": "function stopVideoKasM() {\r\n var km = document.getElementById('kasse_video_mobile');\r\n km.pause();\r\n}", "title": "" }, { "docid": "56aa7d1eb7f97deabe295b94aa9b8917", "score": "0.60523736", "text": "function vFact_dostop() {\n vFact_removeiframe();\n if (vFact_AudioPlayer.detectHTML5Audio()) {\n /* if (vFact_GetBestplayer()=='HTML5'){ */\n /* vFact_removeElement(\"vfactAudioPlayer\"); */\n vFact_HTML5Player.Stop();\n }\n}", "title": "" }, { "docid": "5fa61d2b64a92c536051c318fa382dc4", "score": "0.6044423", "text": "function stopAction() {\n startAction.disabled = false\n const stream = localVideo.srcObject\n const tracks = localStream.getTracks()\n\n tracks.forEach(function(track) {\n track.stop()\n })\n\n localVideo.srcObject = null\n}", "title": "" }, { "docid": "ecb1c19aa039b0149bff126c790c062e", "score": "0.6011243", "text": "function stopVideo() {\n if (player) {\n currentVideoIndex = -1;\n player.stopVideo();\n }\n}", "title": "" }, { "docid": "3be85198d98f3c9b3f32b65642f65d89", "score": "0.6010325", "text": "function stopVideoStream() {\n if (videoStream) {\n videoStream.getTracks().forEach((track) => {\n track.stop();\n });\n }\n }", "title": "" }, { "docid": "705439069c11c8b495d66fb9b65eb251", "score": "0.6006738", "text": "Unload() {\n const el = this.video;\n let elClone = null;\n if (this.initialized !== true) {\n this.logger.warn('not yet this.initialized!');\n return;\n }\n // remove all this.videochild\n elClone = el.cloneNode(true);\n el.parentNode.replaceChild(elClone, el);\n this.video = elClone;\n\n // hide the overlay , empty the div\n while (this.video.hasChildNodes()) {\n this.video.removeChild(this.video.firstChild);\n }\n // unset attr\n this.video.removeAttribute('poster');\n\n if (this.CurrentStreamType === this.StreamTypes.MP4_CLEAR) {\n this.video.removeEventListener('loadedmetadata', this.onStreamInitialized);\n this.video.removeEventListener('play', this.onPlayStart);\n this.video.removeEventListener('pause', this.onPlaybackPaused);\n this.video.removeEventListener('ended', this.onPlaybackEnded);\n this.video.removeEventListener('timeupdate', this.onPlayTimeUpdate);\n this.video.removeEventListener('seeking', this.onSeeking);\n this.video.removeEventListener('seeked', this.onSeeked);\n this.video.removeEventListener('error', this.onError);\n } else {\n // Unsetting Callbacks\n this.DashPlayer.removeEventListener('error', this.onShakaError);\n this.DashPlayer.removeEventListener('adaptation', this.onShakaEvent);\n this.DashPlayer.removeEventListener('buffering', this.onShakaEvent);\n this.DashPlayer.removeEventListener('emsg', this.onShakaEvent);\n this.DashPlayer.removeEventListener('expirationupdated', this.onShakaEvent);\n this.DashPlayer.removeEventListener('largegap', this.onShakaEvent);\n this.DashPlayer.removeEventListener('loading', this.onShakaEvent);\n this.DashPlayer.removeEventListener('texttrackvisibility', this.onShakaEvent);\n this.DashPlayer.removeEventListener('timelineregionadded', this.onShakaEvent);\n this.DashPlayer.removeEventListener('timelineregionenter', this.onShakaEvent);\n this.DashPlayer.removeEventListener('timelineregionexit', this.onShakaEvent);\n this.DashPlayer.removeEventListener('trackschanged', this.onShakaEvent);\n this.DashPlayer.removeEventListener('unloading', this.onShakaEvent);\n this.DashPlayer.destroy();\n this.DashPlayer = null;\n }\n this.CurrentStreamType = PlayerMedia.UNKNOWN;\n }", "title": "" }, { "docid": "316870f477ae2c201edb0c6eeaff354e", "score": "0.6006065", "text": "function ocxCtrlDisable(){\r\n\t\t//Only for IE browser\r\n\t\tidget(\"oMedia\").DisableMousePTZ();\r\n\t\tidget(\"oMedia\").DisablePixelsPTZ();\r\n\t\tidget(\"oMedia\").DisableRelativePTZ();\r\n\t}", "title": "" }, { "docid": "0744c4acfd4ddc29ce62177cb97f3670", "score": "0.60026383", "text": "function pausePlayback() {\n\tdocument.getElementById(\"meadow\").pause();\n\tthis.disabled=true;\n\tdocument.getElementById(\"start\").disabled=false;\n\tdocument.getElementById(\"stop\").disabled=true;\n}", "title": "" }, { "docid": "391c0d488dac10e14e6cd0d9e005b635", "score": "0.60005116", "text": "function videoStop($wrapper) {\n\t// if we're stopping all videos on page\n\tif (!$wrapper) {\n\t\tvar $wrapper = $('.js-videoWrapper');\n\t\tvar $iframe = $('.js-videoIframe');\n\t\t// if we're stopping a particular video\n\t} else {\n\t\tvar $iframe = $wrapper.find('.js-videoIframe');\n\t}\n\t// reveal poster\n\t$wrapper.removeClass('videoWrapperActive');\n\t// remove youtube link, stopping the video from playing in the background\n\t$iframe.attr('src', '');\n}", "title": "" }, { "docid": "5817b265ed384f8a1a062e3a424eb928", "score": "0.59980404", "text": "function videoStop($wrapper) {\n // if we're stopping all videos on page\n if (!$wrapper) {\n var $wrapper = $('.js-video-wrapper');\n var $iframe = $('.js-video-iframe');\n // if we're stopping a particular video\n } else {\n var $iframe = $wrapper.find('.js-video-iframe');\n }\n // reveal poster\n $wrapper.removeClass('video-wrapper-active');\n // remove youtube link, stopping the video from playing in the background\n $iframe.attr('src','');\n}", "title": "" }, { "docid": "bfdaa76d51c1d656850f8a7926e1ac8d", "score": "0.5994878", "text": "stopVideo() {\n return RNVoxeetConferencekit.stopVideo();\n }", "title": "" }, { "docid": "e28d073c1e003ac4cfeb0af66cf53e76", "score": "0.59911513", "text": "function stopAll() {\n var media = document.getElementsByClassName('video-tag'),\n i = media.length;\n\n while (i--) {\n media[i].pause();\n media[i].currentTime = 0;\n }\n}", "title": "" }, { "docid": "8a2d42c72962ac8bdbd180aa5ed41ed2", "score": "0.5989981", "text": "function togglePlayVideo(evt) {\n var control = checkVideoControl(evt.currentTarget);\n var overArea = checkOverVideo(evt.currentTarget);\n var over = overArea.over\n var video = 0;\n var button = 0;\n var vidBtn = 0;\n if (evt.currentTarget.id === \"teaser\") {\n video = teaser;\n button = playBtn[0];\n vidBtn = videoBtn[0];\n }\n else {\n video = trailer;\n button = playBtn[1];\n vidBtn = videoBtn[1];\n }\n if(video.paused) {\n video.play();\n button.src = \"images/button_pause_dark.png\"\n vidBtn.style.display = \"none\";\n\n over.addEventListener(\"mouseout\", outVideoControl, false);\n over.addEventListener(\"mouseover\", overVideoControl, false);\n control.addEventListener(\"mouseout\", outVideoControl, false);\n control.addEventListener(\"mouseover\", overVideoControl, false);\n\n mobileVideoControl(over);\n }\n else {\n video.pause();\n button.src = \"images/button_play_dark.png\"\n vidBtn.style.display = \"block\";\n\n over.removeEventListener(\"mouseout\", outVideoControl, false);\n over.removeEventListener(\"mouseover\", overVideoControl, false);\n control.removeEventListener(\"mouseout\", outVideoControl, false);\n control.removeEventListener(\"mouseover\", overVideoControl, false);\n }\n}", "title": "" }, { "docid": "d02374fdd721c929adeaab9a9c575b0a", "score": "0.59897083", "text": "function volumeOff(){\n var vid = video.element;\n var volumeButton = buttons.volume;\n if (vid.muted){\n vid.volume = 0.50;\n document.getElementById('volumeAdjust').value = \"50\";\n volumeButton.style.background = 'url(icons/volume-on-icon.png) black no-repeat center';\n vid.muted = false;\n\n } else {\n vid.volume = 0.0;\n document.getElementById('volumeAdjust').value = \"0\";\n volumeButton.style.background = 'url(icons/volume-off-icon.png) black no-repeat center';\n vid.muted = true;\n }\n }", "title": "" } ]
fd04af44e6fd0e350edc796fc6a00fb6
Callback function for jQuery.draggable which determines the serialized value for the positioning field via an ajax request.
[ { "docid": "6bdd7474f7fb889d34d82a1304826d99", "score": "0.0", "text": "function updateValues(overlay, parent) {\n\t\tvar hiddenInfos = jQuery('.hiddenInfos', parent);\n\t\tvar valueField = jQuery('.valueWrapper input', parent);\n\t\tvar datastring = 'ajaxID=' + ajaxID;\n\n\t\tjQuery('img', overlay).each(function() {\n\t\t\tvar self = jQuery(this);\n\t\t\tvar imageUid = self.attr('id');\n\n\t\t\tdatastring += '&ajax[images][' + imageUid + '][offsetX]=' + self.css('left');\n\t\t\tdatastring += '&ajax[images][' + imageUid + '][offsetY]=' + self.css('top');\n\t\t});\n\t\tjQuery('p.descriptionOverlay', overlay).each(function() {\n\t\t\tvar self = jQuery(this);\n\n\t\t\tdatastring += '&ajax[images][description][offsetX]=' + self.css('left');\n\t\t\tdatastring += '&ajax[images][description][offsetY]=' + self.css('top');\n\t\t});\n\n\t\tdatastring += '&ajax[frontend][offsetX]=' + jQuery('input[name=\"frontend[offsetX]\"]', hiddenInfos).val();\n\t\tdatastring += '&ajax[frontend][offsetY]=' + jQuery('input[name=\"frontend[offsetY]\"]', hiddenInfos).val();\n\n\t\tjQuery.ajax({\n\t\t\turl: 'ajax.php',\n\t\t\ttype: 'POST',\n\t\t\tdata: datastring,\n\t\t\tcontext: document.body,\n\t\t\tsuccess: function(data, textStatus, jqXHR){\n\t\t\t\tvalueField.val(data.serializedString);\n\t\t\t}\n\t\t});\n\t}", "title": "" } ]
[ { "docid": "9786ef218d64595d356e0b4ab7031880", "score": "0.5682795", "text": "callPosition(){\n var studentId = this.get('student.id');\n var draggableId = this.elementId;\n this.sendAction('position', studentId, draggableId);\n }", "title": "" }, { "docid": "0bfed4d4c1835f2495ae3b8a2dafbd71", "score": "0.5647264", "text": "function placeRobot() {\n\n var x = $('#txtX').val();\n var y = $('#txtY').val();\n var f = $('#slFace').val();\n\n //do some validation\n if (!$.isNumeric(x)) {\n alert('Please enter a valid X coordinate');\n return;\n }\n\n //do some validation\n if (!$.isNumeric(y)) {\n alert('Please enter a valid Y coordinate');\n return;\n }\n\n var json = '{\"RobotId\": \"\",\"Position\":{\"X\":' + x + ',\"Y\":' + y + ',\"Direction\":\"' + f + '\" }}';\n \n $.ajax({\n type: \"POST\",\n url: \"/api/command/place-robot\",\n data: json,\n dataType: 'json',\n contentType: 'application/json',\n success: initRobot,\n error: function(err) {\n console.log(err);\n alert(standarErrorMessage);\n }\n });\n }", "title": "" }, { "docid": "bf2e822a1f8ebb0700bc1640bc20ce76", "score": "0.56465536", "text": "function getPos(collar_type){\r\n $.ajax({\r\n method: \"POST\",\r\n //url: '<?php echo base_url(); ?>mak/recruitment/getPos/',\r\n url: base_url+'liveappcontroller/getPositions',\r\n data: { type: collar_type },\r\n success: function (result) {\r\n result = $.parseJSON(result);\r\n if (result.status == 'Success') {\r\n $(\"#userRequest_position\").html(result.html);\r\n //$('#loadingDiv').hide();\r\n } else { }\r\n }\r\n }); \r\n}", "title": "" }, { "docid": "2080e983de37a3818b4c88c7ad25d7df", "score": "0.5574136", "text": "function getPosition(position)\n{\n // set the form values to the location data\n $(\"#latitude\").val(position.coords.latitude);\n $(\"#longitude\").val(position.coords.longitude);\n \n // temporary debug tactic: developers want ti see cooridinates!\n console.log(position.coords.latitude + \", \" + position.coords.longitude);\n}", "title": "" }, { "docid": "e29eb9d87f591ad984849202ae090275", "score": "0.5567125", "text": "function getPosition() {\n for(var ship in ships) {\n if(ships.hasOwnProperty(ship)) {\n var $hzS = $('select#' + ship + '_hz').val();\n var $vtS = $('select#' + ship + '_vt').val();\n var $dir = $('input[type=\"radio\"][name=\"direction_' + ship + '\"]:checked').val();\n\n ships[ship].start.push($hzS);\n ships[ship].start.push($vtS);\n ships[ship].direction = $dir;\n }\n }\n setupBattlefield(ships);\n }", "title": "" }, { "docid": "3ef59647ece019aced831fbf3960d980", "score": "0.55314755", "text": "function updateInputPosition(input_id, left, top, width, height){\n\t\tconsole.log('In updateInputPosition');\n\t toggleSpinner();\n var csrftoken = getCookie('csrftoken');\n\t var uri = updateInputPositionURL;\n var xhr = new XMLHttpRequest();\n var fd = new FormData();\n \n xhr.open(\"POST\", uri, true);\n xhr.onreadystatechange = function() {\n if (xhr.readyState == 4 && xhr.status == 200) {\n // Handle response.\n\t\t //console.log(xhr.responseText);\n\t\t var data = JSON.parse(xhr.responseText)\n\t\t console.log(data);\n\t\t if (data.error) {alert(data.error);}\n\t\t else{\n\t\t\ttoggleSpinner();\n\t\t\tif (data.inputType=='work'){\n\t\t\t updateInputType(input_id, 'work');\n\t\t\t}\n\t\t }\n }\n };\n\t xhr.timeout = 4000;\n\t xhr.ontimeout = function () { location.reload(); }\n fd.append('userInfo_id', userInfo_id_ajax);\n fd.append('inputNumber', input_id);\n fd.append('left', left);\n fd.append('top', top);\n fd.append('width', width);\n fd.append('height', height);\n\t \n // Initiate a multipart/form-data upload\n xhr.setRequestHeader(\"X-CSRFToken\", csrftoken);\n\t xhr.send(fd);\n\t //console.log( xhr._object);\n }", "title": "" }, { "docid": "e14b3d5dbf6ed2e71cafd6512564cac7", "score": "0.5499749", "text": "function position_received_callback(position) {\n user_position = position;\n user_position.distance = parseInt(get_cookie(\"settings_distance\"));\n get_events(user_position, events_received_callback); \n }", "title": "" }, { "docid": "af6fc92eb699cee38b5fd84f317ce09e", "score": "0.5422935", "text": "function make_draggable() {\n var positions = JSON.parse(localStorage.positions || \"{}\");\n var d = $(\"[id=draggable]\").attr(\"id\", function (i) {\n return \"draggable_\" + i;\n });\n $.each(positions, function (id, pos) {\n $(\"#\" + id).css(pos);\n });\n d.draggable({\n containment: \"#displayArea\",\n stop: function (event, ui) {\n positions[this.id] = ui.position;\n localStorage.positions = JSON.stringify(positions);\n },\n });\n}", "title": "" }, { "docid": "6493ca557b5fbb2f88ae7feda79ce1d4", "score": "0.5408101", "text": "function dragMarker(){\n $(\"#other\").prop('checked', true);\n $('#lat_input').val(marker.getPosition().lat());\n $('#lng_input').val(marker.getPosition().lng());\n }", "title": "" }, { "docid": "8a2545ee44dd584d415f3f448d9a1f16", "score": "0.53985065", "text": "function GetSavedPositionAjax(id) {\n $.ajax({\n url: \"GetSavedPosition.php\",\n data: { userID: id, },\n type: \"POST\",\n success: function (data) {\n var obj = JSON.parse(data);\n getCookieMapStyle();\n initMap(\"52.232\", \"21.007\", 5, \"savePositionMap\", mapStyleName, false, obj);\n },\n error: function (xhr, status, error) {\n },\n });\n return \"ajax error\";\n}", "title": "" }, { "docid": "db0165943e33909a66521c2517d2c25b", "score": "0.538941", "text": "function setPosition(position) {\n var _location = {\n lng: position.coords.longitude,\n lat: position.coords.latitude\n }\n console.log(\"hi\")\n console.log(_location)\n $.post(loc_url, _location, function(response){\n\n });\n}", "title": "" }, { "docid": "d65b94d80bdd5dd06aabe506106832fe", "score": "0.53830063", "text": "function documentAddPosition(treeId, workSpaceId, workSpaceType)\r\n{\r\n var position = document.getElementById('selPos').value;\r\n\r\n if(position == \"\" || position == 0)\r\n {\r\n document.getElementById('documentAddPosErrorMessage').innerHTML=\"Please select position\";\r\n }\r\n else\r\n {\r\n\r\n // if(confirm(\"Are you sure you want to add?\"))\r\n // {\r\n\r\n document.getElementById('buttonDocumentAddPos').style.display = \"none\";\r\n document.getElementById('loaderDocumentAddPos').style.display = \"inline\";\r\n \r\n user_data=\"treeId=\"+treeId+\"&workSpaceId=\"+workSpaceId+\"&workSpaceType=\"+workSpaceType+\"&position=\"+position;\r\n \r\n var request = $.ajax({\r\n\r\n url: baseUrl+\"view_document/documentAddPositionSet\",\r\n\r\n async: true,\r\n\r\n type: \"POST\",\r\n\r\n data: user_data,\r\n\r\n dataType: \"html\",\r\n\r\n async:false,\r\n\r\n success:function(result)\r\n { \r\n document.getElementById('loaderDocumentAddPos').style.display = \"none\";\r\n if(result!='error'){\r\n window.top.location.href = baseUrl+result; \r\n }\r\n else\r\n {\r\n document.getElementById('documentAddPosErrorMessage').innerHTML=\"Something went wrong!\";\r\n }\r\n }\r\n });\r\n\r\n return true;\r\n // }\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "53ec8279a3a0df63592d06ab80bd6b6a", "score": "0.53816813", "text": "function airsliderUpdateSlidePos(){\n var slide_postion = new Array();\n //to reset position of all slides\n var slides = $('.air-admin .air-slider #air-slides .air-slide');\n var i=0;\n slides.each(function(){\n var slide_pos = $(this);\n var slide_id_pos = slide_pos.find('.air-save-slide').attr('data-slide-id');\n if(slide_id_pos!='' && slide_id_pos!=0 && slide_id_pos!='0'){\n slide_postion.push({\"position_pos\":i,\"slide_id_pos\":slide_id_pos});\n i++;\n }\n });\n \n jQuery.ajax({\n type : 'POST',\n dataType : 'json',\n url : ajaxurl,\n data : {\n action: 'airslider_updateSlidePos',\n slide_pos_datas : slide_postion,\n },\n success: function(response) {\n if(response !== false && response!='') {\n// airsliderShowMsg('Slides Position have been updated successfully.','success');\n }\n else {\n airsliderShowMsg(airslider_translations.slide_update_position_error,'danger');\n }\n },\n\n error: function(XMLHttpRequest, textStatus, errorThrown) { \n airsliderShowMsg('Error updating slides position!<br>Status:'+textStatus+' <br>Error:'+errorThrown,'danger');\n }\n });\n }", "title": "" }, { "docid": "f3362ce638ccb76b19a1a6d942991b2f", "score": "0.53487754", "text": "function success(position)\n{\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n\n // OBJETO CON LOS DATOS DE LA UBICACION\n var $objDataLocationArticle = {\n \tid_articles : $(\"#id_articles_hs\").val(),\n \tlatitude : latitude,\n \tlongitude : longitude,\n \taddres : \"\"\n };\n\n // LLAMAMOS A LA FUNCION QUE GUARDAR LA UBICACION DEL ARTICULO\n saveLastLocationArticle($objDataLocationArticle);\n}", "title": "" }, { "docid": "291079cc681b56349c81a60cffebce5b", "score": "0.5334579", "text": "function position(d) {\n\t var v = dragging[d];\n\t return v == null ? x(d) : v;\n\t}", "title": "" }, { "docid": "6af038f823401189a90a8a302f5d2ec4", "score": "0.532869", "text": "function success(pos) {\n var crd = pos.coords;\n latitude = crd.latitude\n longitude = crd.longitude\n }", "title": "" }, { "docid": "f361657c9ee20c29731d4d462a0908c4", "score": "0.53269374", "text": "function readPosition(data){\nposition = data.val();\nconsole.log(position.x);\nhypnoticBall.x = position.x;\nhypnoticBall.y= position.y;\n\n}", "title": "" }, { "docid": "85501d58d2118a414e39d62b7cbf6c25", "score": "0.53245825", "text": "function sendLocation() {\n\n var position = {\n lat: infoWindow.getPosition().lat(),\n lng: infoWindow.getPosition().lng()\n };\n\n console.log(position);\n\n $.ajax(\"/imb/map/set/\" + position.lat + \"/\" + position.lng, {\n method: \"POST\",\n success: function (data) {\n alert(data);\n },\n complete: function (data) {\n\n }\n });\n\n}", "title": "" }, { "docid": "989f24a79d7166804627835a3ee87719", "score": "0.53236306", "text": "function position(d) {\n var v = dragging[d];\n return v == null ? x(d) : v;\n }", "title": "" }, { "docid": "cd0f1b535bc96abb016842e32b587d87", "score": "0.52862644", "text": "function getPosition(transport) {\n var toURL = '/api/getposition';\n var toData = 'id=' + transport;\n return postWithMessageBack(toURL, toData);\n}", "title": "" }, { "docid": "8900572f9cb9c1b96e4ce567eec9d438", "score": "0.52845037", "text": "function handleMoveEnd() {\n if (!this.moved) {\n editField.call(this);\n return;\n }\n\n var o = this.field;\n o.x1 = this.attr('x') / pW;\n o.y1 = this.attr('y') / pH;\n o.x2 = (this.attr('x') + this.attr('width')) / pW;\n o.y2 = (this.attr('y') + this.attr('height')) / pH;\n $.post(setFieldPosUrl + o.id, {\n Field: o\n });\n}", "title": "" }, { "docid": "b27b539f8feffea30cfc7d13fbca7ea9", "score": "0.5200977", "text": "function showSelectedProposedPositionData(){\n\n $.ajax({\n method: 'POST',\n url: 'http://localhost:7000/proposed-position-data',\n beforeSend: function(req) {\n req.setRequestHeader('Authorization', getCookie('token'));\n req.setRequestHeader(\"Content-Type\", \"application/json\");\n },\n data: JSON.stringify({\n \"id\": $('#position-list').val()\n }),\n success: function(res){\n \n data = JSON.parse(res)\n $('#position-data').empty()\n $('#position-data').append(`\n <div class=\"listForm\">\n <p>COST CENTER</p>\n <div>\n <input type=\"text\" class=\"doubleinput1\" value=\"${data.cost_center_code}\"/><br>\n <input type=\"text\" class=\"doubleinput2\" value=\"${data.cost_center}\"/>\n </div>\n </div>\n <div class=\"listForm\">\n <p>DISTRIBUTION COST CENTER</p>\n <div>\n <input type=\"text\" id=\"distribution-cost\" class=\"database-input\" /><br>\n </div>\n </div>\n <div class=\"listForm\">\n <p>COMPANY</p>\n <input type=\"text\" value=\"${data.company}\"/>\n </div>\n <div class=\"listForm\">\n <p>PERSONNEL AREA</p>\n <input type=\"text\" value=\"${data.personal_area}\"/>\n </div>\n <div class=\"listForm\">\n <p>PERSONNEL SUB AREA</p>\n <input type=\"text\" value=\"${data.personal_sub_area}\"/>\n </div>\n <div class=\"listForm\">\n <p>EMPLOYEE TYPE</p>\n <input type=\"text\" value=\"${data.employee_type}\"/>\n </div>\n <div class=\"listForm\">\n <p>RECEIVER <small id=\"help\">(Position Minimum L4)</small></p>\n <input type=\"text\" id=\"receiver\" value=\"${data.receiver}\"/>\n </div>\n <div class=\"listForm\">\n <p>EFFECTIVE DATE START</p>\n <input type=\"date\" id=\"date-start\" name=\"trip-start\" value=\"yyyy-mm-dd\" min=\"2018-01-01\" max=\"2018-12-31\">\n </div>\n <div class=\"listForm\">\n <p>COMMENT</p>\n <input id=\"comment-requester\" type=\"text\" />\n </div>\n `)\n \n },\n error: function(err){\n console.log(err)\n }\n })\n}", "title": "" }, { "docid": "fd71a0a31e77fe87749274c282e4cb46", "score": "0.5197686", "text": "function successCallback(position)\n{\n console.log(position);\n}", "title": "" }, { "docid": "a733ad2635c17a7caf9b49730cb4feea", "score": "0.5181926", "text": "updatePosition(state,payload) {\n state.eventFormPositionX = payload.positionX;\n state.eventFormPositionY = payload.positionY;\n }", "title": "" }, { "docid": "17416de0f156264344b22314d511fc64", "score": "0.5179387", "text": "get posX() {return this.data.posX;}", "title": "" }, { "docid": "cc5179639841e39d875e9920bd25f2c3", "score": "0.5176958", "text": "function onDragHandler( event, ui ) {\n var draggableDivPos = $( \"#draggableDiv\" ).offset(); // get absolute position for overlap detection\n var text = \"\";\n /*\n // for debugging output\n text += draggableDivPos.left + \",\" + draggableDivPos.top;\n text += \", \" + (draggableDivPos.left + draggableDivW) + \",\" + (draggableDivPos.top + draggableDivH);\n text += \" st -> \" +staticDivPos.left + \",\" + staticDivPos.top;\n text += \" st -> \" +(staticDivPos.left + staticDivW) + \",\" + (staticDivPos.top + staticDivH);\n */\n if(\n ((draggableDivPos.left >= staticDivPos.left && draggableDivPos.left <= (staticDivPos.left + staticDivW) &&\n (draggableDivPos.top >= staticDivPos.top && draggableDivPos.top <= staticDivPos.top + staticDivH)) ||\n\n ((draggableDivPos.left >= staticDivPos.left && draggableDivPos.left <= staticDivPos.left + staticDivW) &&\n ((draggableDivPos.top + draggableDivH) >= staticDivPos.top && (draggableDivPos.top + draggableDivH) <= (staticDivPos.top + staticDivH))) ||\n \n (((draggableDivPos.left + draggableDivW) >= staticDivPos.left && (draggableDivPos.left + draggableDivW) <= (staticDivPos.left + staticDivW)) &&\n ((draggableDivPos.top + draggableDivH) >= staticDivPos.top && (draggableDivPos.top + draggableDivH) <= (staticDivPos.top + staticDivH))) ||\n\n (((draggableDivPos.left + draggableDivW) >= staticDivPos.left && (draggableDivPos.left + draggableDivW) <= (staticDivPos.left + staticDivW)) &&\n (draggableDivPos.top >= staticDivPos.top && draggableDivPos.top <= (staticDivPos.top + staticDivH))))\n )\n {\n var d = new Date();\n $( \"#dtlabel\" ).text(d.toLocaleTimeString());\n if(!$( \"#staticDiv\" ).hasClass(\"overlap\"))\n $( \"#staticDiv\" ).addClass(\"overlap\");\n if($( \"#staticDiv\" ).hasClass(\"nooverlap\"))\n $( \"#staticDiv\" ).removeClass(\"nooverlap\");\n }\n else\n {\n $( \"#dtlabel\" ).text(text + \"Static box for Overlap Detection\");\n if($( \"#staticDiv\" ).hasClass(\"overlap\"))\n $( \"#staticDiv\" ).removeClass(\"overlap\");\n if(!$( \"#staticDiv\" ).hasClass(\"nooverlap\"))\n $( \"#staticDiv\" ).addClass(\"nooverlap\");\n }\n }", "title": "" }, { "docid": "e7f576717840fe679e431f3072dccb10", "score": "0.51737994", "text": "function aggiungiPreferiti2(draggable) {\n\tnew Ajax.Request(\"http://tweb-lubiejewski.rhcloud.com/progetto/php/aggiungi.php\", \n\t {\n\t method: \"GET\",\n\t parameters: {beer: draggable.parentElement.id},\n\t onSuccess: esito2(draggable),\n\t onFailure: ajaxFailed,\n\t onException: ajaxFailed\n\t }\n\t);\n}", "title": "" }, { "docid": "aeb12be81d669a832eed7267941ef8a4", "score": "0.516856", "text": "function onSuccess(position) {\n // var element = document.getElementById('geolocation');\n // element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' +\n // 'Longitude: ' + position.coords.longitude + '<br />' +\n // '<hr />' + element.innerHTML;\n var coor = position.coords.latitude+','+position.coords.longitude;\n var nilai = '{ \"coordinate\":\"'+coor+'\" }';\n\n $.ajax({\n type: 'POST',\n url: api+'courier/post_loc',\n data : nilai,\n contentType: \"application/json\",\n dataType: 'json',\n success: function(data)\n { \n if (data.status == true){ toast(\"Location updated\");}else{ toast(data.error); }\n },\n error: function (request, status, error) {\n console.log('Request Failed...!'+error);\n }\n })\n return false;\n }", "title": "" }, { "docid": "4f8cb11c99a47ff6f07e36405ee219d9", "score": "0.5164244", "text": "function populate_location(pos) {\n $('[name=loc]').val(pos.coords.latitude + \", \" + pos.coords.longitude);\n}", "title": "" }, { "docid": "d22abc74b591ec4eace4536f7d6084c9", "score": "0.5161761", "text": "serialize() {\n var data = {};\n\n data.id = this.id;\n data.type = this.type;\n data.x = this.position.x;\n data.y = this.position.y;\n\n return data;\n }", "title": "" }, { "docid": "b5e02e120f3467bb5d0deb64d873aab2", "score": "0.51584095", "text": "getDraggable() {\n return this.state[POLYLINE].getDraggable()\n }", "title": "" }, { "docid": "adba770c148459d7c7a68b61e7646d71", "score": "0.515073", "text": "function successPosition(position) {\n\tconsole.log(\"successPosition\");\n\t//You can find out more details about what the position obejct contains here:\n\t// http://www.w3schools.com/html/html5_geolocation.as\n \n\n \n var unixtime = new Date(position.timestamp);\n var date = unixtime.toUTCString();\n \n var speed = position.coords.speed * 3.6;\n var altitude = position.coords.altitude;\n var wot = position.coords.heading;\n\tvar accNum = position.coords.accuracy;\n\tvar latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n\t\n\t//OK. Now we want to update the display with the correct values\n\t$('#time').val(\"Recieved data at \" + date);\n\t$('#lattext').val(\"Latitude \" + latitude);\n $('#longtext').val(\"Longitude \" + longitude);\n $('#accuracy').val(\"Accuracy is \" + accNum + \" Meters\");\n $('#compas').val(\"Way of travel is \" + wot);\n $('#alttext').val(\"Altitude is \" + altitude);\n $('#speedtext').val(\"Speed is \" + speed);\n\t\n}", "title": "" }, { "docid": "64317c9531bdff107a9000a9574d1a16", "score": "0.51361257", "text": "get position() { return this._position; }", "title": "" }, { "docid": "63f2213b2a3dad013818bd7b0e807ed0", "score": "0.51326215", "text": "function getPosition(e) {\t\n\t\t\t\n\t\t\t// get origin top/left position \n\t\t\tvar top = conf.relative ? trigger.position().top : trigger.offset().top, \n\t\t\t\t left = conf.relative ? trigger.position().left : trigger.offset().left,\n\t\t\t\t pos = conf.position[0];\n\n\t\t\ttop -= tip.outerHeight() - conf.offset[0];\n\t\t\tleft += trigger.outerWidth() + conf.offset[1];\n\t\t\t\n\t\t\t// adjust Y\t\t\n\t\t\tvar height = tip.outerHeight() + trigger.outerHeight();\n\t\t\tif (pos == 'center') \t{ top += height / 2; }\n\t\t\tif (pos == 'bottom') \t{ top += height; }\n\t\t\t\n\t\t\t// adjust X\n\t\t\tpos = conf.position[1]; \t\n\t\t\tvar width = tip.outerWidth() + trigger.outerWidth();\n\t\t\tif (pos == 'center') \t{ left -= width / 2; }\n\t\t\tif (pos == 'left') \t{ left -= width; }\t \n\t\t\t\n\t\t\treturn {top: top, left: left};\n\t\t}", "title": "" }, { "docid": "03523bfda9f659c1b0fb962b7e194d4e", "score": "0.5126652", "text": "function locationSuccess(position) {\n\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n \n \n //assign to values \n $('#geoLong').val(longitude);\n $('#geoLat').val(latitude);\n }", "title": "" }, { "docid": "241022c688fc496d88831540e547ab29", "score": "0.5105233", "text": "get position() {\n // console.log({\n // position: this._position\n // });\n return this._position;\n }", "title": "" }, { "docid": "fd93aebf5af924f1d3e6bc47fd7f0ac2", "score": "0.5103973", "text": "position() {\n return this.isoPosition;\n }", "title": "" }, { "docid": "5f61b433fd7b75bf3509d9726c86c4bd", "score": "0.5095371", "text": "function successFunction(position) {\n const lat = position.coords.latitude;\n const lng = position.coords.longitude;\n codeLatLng(lat, lng)\n coordArr = [];\n coordArr.push(lat);\n coordArr.push(lng);\n $('#latlng').val(coordArr)\n }", "title": "" }, { "docid": "5f841f6c88f9fabf869665e07afd0170", "score": "0.50886124", "text": "function positionClick(event) {\n // Send a new AJAX command to record a new move. Pass gotMoveResult as the callback\n var positionNumber = this.id.substr( this.id.length - 1 );\n\n if( gameID ) {\n if( myTurn ) {\n ajax( \"cmd=move&gameID=\" + gameID + \"&position=\" + positionNumber, gotMoveResult );\n } else {\n alert( \"It isn't your turn!\" );\n }\n }\n}", "title": "" }, { "docid": "cddd7f6c27b6cbc1a00fa2f69a167882", "score": "0.5082408", "text": "function DoUpdatePosition(old_position, id, cpage, page) {\n var old_position = old_position;\n var new_position = $('select#position' + id).val();\n // console.log(old_position + \" \" + new_position + \" \" + id);\n\n $.ajaxSetup({\n headers: {\n 'X-CSRF-TOKEN': $(\n 'meta[name=\"csrf-token\"]')\n .attr(\n 'content')\n }\n });\n $.ajax({\n url: \"/admin/pages/update/updateposition\",\n type: \"post\",\n data: {\n old_p: old_position,\n new_p: new_position,\n id: id\n },\n success: function(response) {\n // setTimeout(function() { // wait for 7 mili secs(2)\n\n // location.reload(); // then reload the page.(3)\n // }, 200);\n\n\n var url = page + '?page=' + cpage;\n // console.log(url);\n getPublished(url);\n\n function getPublished(url) {\n $.ajax({\n url: url\n }).done(function(data) {\n // console.log(data);\n $('#some_ajax').html(data);\n }).fail(function() {\n //Do some error\n });\n }\n\n },\n error: function(errors) {\n\n }\n });\n }", "title": "" }, { "docid": "1572459db7046ba682ea59eeff7a5c74", "score": "0.5068128", "text": "function updateCoords() {\r\n setCoords($input('latitude').val(), $input('longitude').val());\r\n }", "title": "" }, { "docid": "8e18b2303110dac15cc8bbcf4c6d2382", "score": "0.5058758", "text": "function getDropPosition($el) {\n\n var $curBox = null\n , x = null\n , y = null\n , marginOffset = 10;\n\n if(!DOM.$boxOne.hasClass(\"check\")) {\n $curBox = DOM.$boxOne;\n }\n else if(!DOM.$boxTwo.hasClass(\"check\")) {\n $curBox = DOM.$boxTwo;\n }\n else if(!DOM.$boxThree.hasClass(\"check\")) {\n $curBox = DOM.$boxThree;\n }\n\n if($curBox != null) {\n x = $curBox.offset().left + marginOffset;\n y = $curBox.offset().top + marginOffset;\n } else {\n // stay at origin\n x = getDragPosition($el).x;\n y = getDragPosition($el).y;\n }\n \n return {\"x\": x, \"y\": y};\n }", "title": "" }, { "docid": "d682dce380acde122db6fca8175028dc", "score": "0.50579864", "text": "function successPosition(position) {\n\n //save the below long/latitute/time in varaibles below ready to export to html\n var time = position.timestamp;\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n\n //jQuery for inputting the values into the html document\n $('#time').val(\"Recieved data at \" + time);\n $('#lattext').val(latitude);\n $('#longtext').val(longitude);\n\n}", "title": "" }, { "docid": "7a982dd964e260dab44bd00b5e4dfc9e", "score": "0.50570285", "text": "function get_coords_by_click(e) {\n let coords = e.get('coords');\n let pos = e.get('clientPixels');\n // if(visible_form){\n // let rect = $(\"#create_place_card\")[0].getBoundingClientRect();\n // if (!(pos[0] < rect.right && pos[0] > rect.left && pos[1] < rect.bottom && pos[1] > rect.top))\n // {\n // visible_form = false;\n // $(\"#create_place_card\").hide();\n // }\n // }\n // else{\n let constrain = function(v, min, max){\n return (v < min ? min : v) > max ? max : (v < min ? min : v);\n }\n let map_rect = $(\"#map\")[0].getBoundingClientRect();\n $(\"#create_place_card\").show();\n $(\"#create_place_card\")[0].style.left = constrain(pos[0] - $(\"#create_place_card\")[0].clientWidth*0.3, map_rect.left, map_rect.right - $(\"#create_place_card\")[0].clientWidth) + 'px';\n $(\"#create_place_card\")[0].style.top = constrain(pos[1] - $(\"#create_place_card\")[0].clientHeight, map_rect.top, map_rect.bottom - $(\"#create_place_card\")[0].clientHeight)+ 'px';\n $(\"#coords-field\")[0].value = coords[0] + \"; \" + coords[1];\n //visible_form = true;\n //}\n}", "title": "" }, { "docid": "927044a6238fcb2e0ef32e7c4af6a655", "score": "0.5056903", "text": "function showPosition(position) {\n console.log(\"show position() called\");\n alert(\" Your latitude is \" + position.coords.latitude);\n //jQuery for Display value to html doc by updated loc variable value\n $(loc).val(\"<p>Latitude: \" + position.coords.latitude +\n \"<br>Longitude: \" + position.coords.longitude + \"</p>\");\n\n}", "title": "" }, { "docid": "da9ad69624f9d024080b7173c6b06200", "score": "0.50510323", "text": "get_position() {\n return this.__position.clone();\n }", "title": "" }, { "docid": "329a4a330d572dcf08fba3ecdda1c644", "score": "0.5046283", "text": "function mUShareSetDefaultCoordinates(position) {\n jQuery(\"[id$='latitude']\").val(position.coords.latitude.toFixed(7));\n jQuery(\"[id$='longitude']\").val(position.coords.longitude.toFixed(7));\n mUShareNewCoordinatesEventHandler();\n}", "title": "" }, { "docid": "4cc2cd79dc15f51c87ed02d9da26af84", "score": "0.5045858", "text": "updatePosition() {\n var objects = document.querySelectorAll('.svgContainer')\n objects.forEach(function(elem) {\n if(elem.id == \"kingdom\" + String($localStorage.userObj.userId)) {\n elem.classList.add(\"ui-widget-content\")\n }\n })\n $(\".ui-widget-content\").draggable();\n }", "title": "" }, { "docid": "9a75eaafd38f9fd7aae6c9077c0ff07f", "score": "0.5041851", "text": "function set_location(){\n \n var lat = $(\"#user_lat\").val();\n var long = $(\"#user_long\").val();\n var name = $(\"#user_name\").val();\n var text = $(\"#user_text\").val();\n var img = $(\"#image_preview\").attr(\"data-path-to-file\");\n //We will send this data to record the location info after the ajax call\n var location_info = {\n \"latitude\" : lat,\n \"longitude\" : long,\n \"name\" : name,\n \"text\" : text,\n \"img\" : img\n };\n \n $.ajax({\n type: 'POST',\n url: 'php/ajax.php',\n// dataType: \"json\",\n data: ({\n request : \"set_location\",\n location_info: location_info\n }),\n success: function(response) {\n// console.log(response);\n $(\"#enable_location\").text(\"SUCCESS!\");\n $(\"#user_address\").val(response);\n setTimeout(function(){\n clear_a_form();\n },1000);\n }\n });//end ajax\n \n }//end setlocation", "title": "" }, { "docid": "70138d96e41c5de4ab22290aa57c6bca", "score": "0.50404954", "text": "function success(position) {\n var coords = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\n}", "title": "" }, { "docid": "2e3701ee6896f37b288d55059a01f41b", "score": "0.50318307", "text": "function getSnakePos(){\n\t\tsnaketop=$(\"#snake\").position().top;\n\t\tsnakeleft=$(\"#snake\").position().left;\n\t\t//console.log(\"Using position, Top: \"+snaketop+\", Left: \"+ snakeleft);\n\t}", "title": "" }, { "docid": "d292bc9003b735d6bdca2a94edfb387b", "score": "0.5023853", "text": "function copyPositionToDialog(position) {\n $('#domaato-lat').val(position.coords.latitude); \n $('#domaato-lon').val(position.coords.longitude);\n return true;\n}", "title": "" }, { "docid": "7d6f1bc5c8e757b08548415ce00b0d77", "score": "0.50023466", "text": "function formatAjaxData( x, y ) {\n x = x || $( '#x' ).val();\n y = y || $( '#y' ).val();\n return { 'x': x, 'y': y };\n}", "title": "" }, { "docid": "11cc94331e052baf8eea9cffc91b9310", "score": "0.49986145", "text": "function start_getPosition(){\n \tconsole.log(\"--- start get Location ----\");\n \t$(\"[setLocation='yes']\").each(function(i, item) {\n\t\t\t\tvar idName = $(item).attr(\"id\");\n\t\t\t\tconsole.log(\"--- SET POINT ------ \");\n\t\t\t\tsetGetPosition(item);\n\t\t\t\t//setPoint_create(item.name, i, unit, flay, min, max, styleX)\n\t\t});\n }", "title": "" }, { "docid": "0d3bffd3e3a9daa84a441c64c63dc832", "score": "0.49906135", "text": "function z_position(value){\n\tobjects[selectShape].position.setZ(value);\n}", "title": "" }, { "docid": "f48ef51eea2e7d9df062f153638a280f", "score": "0.49898648", "text": "get draggable() {\n return this._draggable;\n }", "title": "" }, { "docid": "9aedf71783b5931c8ac98bf0e5442cf4", "score": "0.4988969", "text": "function showLocation(position) {\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n //alert(\"Latitude : \" + latitude + \" Longitude: \" + longitude);\n //alert(\"about to send AJAX form\");\n $.post(\"/locations.json\",\n {\n \tlocation:\n {\n latitude: position.coords.latitude,\n longitude: position.coords.longitude,\n accuracy: position.coords.accuracy\n }\n }\n );\n }", "title": "" }, { "docid": "911b7e61b2e3ab675b21ae2e4c055b05", "score": "0.49781734", "text": "function position(d) {\n\t var v = dragging[d];\n\t return v == null ? xScale(d) : v;\n\t}", "title": "" }, { "docid": "eec31fd1e8c2f1bee99a021f593587ae", "score": "0.49696124", "text": "get position() {\n return this._position;\n }", "title": "" }, { "docid": "9ef5e86e4c661bfe0e2a0f24bad4abfc", "score": "0.4961535", "text": "function posicion_geo(localidad){\n\tif(localidad != ''){\n\t\tvar provincia = $('#provincia').val()\n\t\tvar departamento = $('#departamentos').val()\n\t\tvar localidad = localidad.value\n\n\t\t$.ajax({\n\t\t\ttype:\"GET\",\n\t\t\turl: \"pos.php\",\n\t\t\tdata: {\n\t\t\t\t'provincia': provincia,\n\t\t\t\t'departamento': departamento,\n\t\t\t\t'localidad': localidad,\n\t\t\t},\n\t\t\tsuccess:function(data){\n\t\t\t\tvar datos = data\n\t\t\t\talert(\"El procesamiento de los datos puede demorar unos segundos. Por favor espere\")\t\t\n\t\t\t\tgraficar_con_selects(datos,1)\n\t\t\t}\n\t\t})\n\t}\n}", "title": "" }, { "docid": "0e86f2518a9046cbed4c1f5aa499defb", "score": "0.49609154", "text": "function onPositionInfo(data) {\n\tif (\"Error\" in data) {\n\t\tonError(data.Error);\n\t} else if (\"Value\" in data) {\n\t\tobj = data.Value;\n\t\t$(\"#track\").text(obj.Track + \"/\" + queueSize);\n\t\t$(\"#track-duration\").text(formatDuration(obj.TrackDuration));\n\t\t$(\"#rel-time\").text(formatDuration(obj.RelTime));\n\t\t$(\"#title\").text(obj.Title);\n\t\t$(\"#album\").text(obj.Album);\n\t\t$(\"#progress-bar\").progressbar(\"value\", 100 * (obj.RelTime / obj.TrackDuration));\n\t\t$(\".progress-label\").text(formatDuration(obj.TrackDuration - obj.RelTime));\n\t\tsetCurrentTrack(obj.Track);\n\t}\n}", "title": "" }, { "docid": "c3b520e771239f5810df1d9929e0e752", "score": "0.49607873", "text": "function position(d) {\n var v = dragging[d];\n return v == null ? xScale(d) : v;\n }", "title": "" }, { "docid": "e81a34a20636986203b93a0a40df2376", "score": "0.4948483", "text": "function sendListOrder() {\n var data = $('#sortable').sortable('serialize'); //serialize list \n $.ajax({\n data: data,\n type: 'POST',\n url: 'updateSortable.php'\n }); \n }", "title": "" }, { "docid": "23c900b06963a6de75e53bc9cfb0f3da", "score": "0.49442405", "text": "function posiciona_nuevo_comentario() {\r\n\t\t\tx = window.event.pageX,\r\n\t\t\ty = window.event.pageY;\r\n\t\t\tconsole.log(x, y); \r\n\t\t\t//alert(\"x: \"+x+\", y: \"+y);\r\n\t\t\t$('.editing_comms_wrapper .posx').val(x);\r\n\t\t\t$('.editing_comms_wrapper .posy').val(y);\r\n\t\t\t//$('#new_comms_wrapper .width').val(w);\r\n\t\t\t//$('#new_comms_wrapper .height').val(h);\r\n\t\t}", "title": "" }, { "docid": "01758a8a28dd151b28110a7fb3b39662", "score": "0.4941257", "text": "function store_data() {\n $.post(\"/business/save_latlng/\"+$(\"#business_id\").val()+\"/\", {\n csrfmiddlewaretoken: $(\"input[name='id_csrfmiddlewaretoken\").val(),\n lat: $('#business_lat').val(),\n lng: $('#business_lng').val()\n }, function(data) {\n data = json_parse(data);\n if(data.status==\"success\") {\n return true;\n } else {\n console.log(\"status: \"+data.status)\n console.log(\"error: \"+data.error)\n $.each(data.data, function(i, n){\n console.log(\">\"+i+\": \"+n);\n });\n return false;\n }\n });\n }", "title": "" }, { "docid": "398c7cbc8ffb103fc1a8fd69a34045d9", "score": "0.49357373", "text": "function success(pos) { //call back for getCurrentPosition, will change lat and long if successful \n lat = pos.coords.latitude;\n long = pos.coords.longitude;\n}", "title": "" }, { "docid": "245497427e109fa903b77cab09903ce9", "score": "0.49349925", "text": "function position(d) {\n var v = draggingPoints[d];\n if (!v) {\n return x(d);\n } else {\n return v;\n }\n }", "title": "" }, { "docid": "dfbc5080a5041249992f8add0bb5cbfb", "score": "0.49347898", "text": "function ajaxForm(page,data,result_div){\n\t$.ajax({\n\t url: page,\n\t data: data,\n\t success: function(data) {\n\t\t$(result_div).hide();\n\t\t$(result_div).html(data);\n\t\t$(result_div).fadeIn('slow');\n\t\t//alert('ajax: success'+ data);\n\t\t$( \".draggable\" ).draggable({\n\t\t\tappendTo: \"body\",\n\t\t\thelper: \"clone\"\n\t\t});\n\t }\n\t});\n}", "title": "" }, { "docid": "744054d56b56e98d280603100fa1e9d5", "score": "0.4930621", "text": "function setDynamicPositioning() {\n\n //Start Auto Calculate Function\n $('.dynamic-slider-marker').each(function() {\n\n var getMinVal = $('.tool-slider-mainwrapper').attr('minval');\n var getMaxVal = $('.tool-slider-mainwrapper').attr('maxval');\n var getStepVal = $('.tool-slider-mainwrapper').attr('stepval');\n\n var getLabelValue = $(this).find('.slider-marker-label').html().replace(/[^0-9]/g, '');\n var getNewValue = ((getLabelValue - getMinVal) / (getMaxVal - getMinVal)) * 100\n\n var newPositionLeft = Math.round(getNewValue) + '%';\n var newPerPos = Math.round(getNewValue);\n\n $(this).css('left', newPositionLeft).attr('data-perpos', newPerPos)\n\n })\n}", "title": "" }, { "docid": "1f9e6f4095de6458aae88d21386cf8a3", "score": "0.4930292", "text": "get position() {\n return {\n x: this.x,\n y: this.y\n };\n }", "title": "" }, { "docid": "0be5eb4c4bcc1ea1b574e1dc7f8924e4", "score": "0.49252295", "text": "function getPositionForSticker(event) {\n var obj = {\n left: '0',\n top: '0',\n zIndex: '0'\n }\n // If the sticker is dropped on another sticker, change the position relative to that sticker\n // and update z-index\n if (event.toElement.classList.contains('dropped-sticker')) {\n obj.left = parseInt(event.toElement.style.left, 10) + (event.offsetX - STICKER_WIDTH_HALF) + 'px';\n obj.top = parseInt(event.toElement.style.top, 10) + (event.offsetY - STICKER_HEIGHT_HALF) + 'px';\n obj.zIndex = (parseInt(getComputedStyle(event.toElement).getPropertyValue('z-index')) + 1).toString();\n } else {\n obj.left = (event.offsetX - STICKER_WIDTH_HALF) + 'px';\n obj.top = (event.offsetY - STICKER_HEIGHT_HALF) + 'px';\n }\n return obj;\n }", "title": "" }, { "docid": "9b40818a8da41241985c8ea6349369e2", "score": "0.48972523", "text": "function airsliderDraggableElements() {\n $('.air-admin .air-elements .air-element').draggable({\n 'containment' : 'parent',\n\n start: function() {\n // Select when dragging\n airsliderSelectElement($(this));\n },\n\n drag: function(){\n // Set left and top positions on drag to the textbox\n var position = $(this).position();\n var left = position.left;\n var top = position.top;\n var index = $(this).index();\n\n $(this).closest('.air-elements').find('.air-elements-list .air-element-settings:eq(' + index + ') .air-element-data-left').val(left);\n $(this).closest('.air-elements').find('.air-elements-list .air-element-settings:eq(' + index + ') .air-element-data-top').val(top);\n },\n });\n }", "title": "" }, { "docid": "dad85207af3088b9efa86187ed1449ff", "score": "0.48964077", "text": "function getPosition() {\n \t\t\t\t\treturn {\n \t\t\t\t\t\twidth: element.prop( 'offsetWidth' ),\n \t\t\t\t\t\theight: element.prop( 'offsetHeight' ),\n \t\t\t\t\t\ttop: element.prop( 'offsetTop' ),\n \t\t\t\t\t\tleft: element.prop( 'offsetLeft' )\n \t\t\t\t\t};\n \t\t\t\t}", "title": "" }, { "docid": "b80718270baf8bc7a6e526cdc74e179f", "score": "0.48811477", "text": "function success(position){\n latitude = position.coords.latitude\n longitude = position.coords.longitude\n $.ajax({\n url: 'https://developers.zomato.com/api/v2.1/geocode',\n dataType: 'json',\n data: {\n lat: latitude,\n lon: longitude,\n },\n headers: {\n \"user-key\": \"f7b021777643a1e7a87e4d0f3a2792ff\"\n },\n success: datiArrivati,\n error: GeneralError\n })\n}", "title": "" }, { "docid": "329003f6d872db0e675d2116c55e7bce", "score": "0.48792633", "text": "function DispPopPlstDetails(obj, pl_id, us_id) {\r\n\r\n \r\n var p = $(obj);\r\n var position = p.position();\r\n\r\n if ($(\"#PP_PlstPreview\").position().left != position.left && $(\"#PP_PlstPreview\").position().top != position.top) {\r\n $(\"#PP_PlstPreview\").css(\"left\", position.left + \"px\");\r\n $(\"#PP_PlstPreview\").css(\"top\", (position.top + 49) + \"px\");\r\n\r\n $('#PP_PlstPreview').html(\"<div class='LdingPrev'>Loading...</div>\");\r\n $(\"#PP_PlstPreview\").css(\"display\", \"block\");\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: \"/playlist/getPlaylistDetailsPreviewPop?PL_ID=\" + pl_id + \"&US_ID=\" + us_id,\r\n async: true,\r\n success: function (data) {\r\n $('#PP_PlstPreview').html(data);\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "6e56fd055eff6840f4c787c1fa10adc5", "score": "0.48702857", "text": "function setGetPosition(item){\n\t\tconsole.log(\"--- pridavam get point down event ------ \"+$(item).attr('id'));\n\t\t\n\t\t//console.log(\"seGetPositin: \"+idName);\n\t\t//document.getElementById(idName).onmousedown = function(event) {\n\t\t$(item).mousedown ( function(event) {\n\t\t\tconsole.log(\"--- pridavam get point events ------ \");\n\t\t\tlet iitem=item;\n\t\t\tlet startRX = $(item).position().left;\n\t\t\tlet startRY = $(item).position().top;\n\t\t\tlet shiftX = event.pageX -$(item).position().left;\n\t\t\tlet shiftY = event.pageY -$(item).position().top;\n\n\t\t\t//if ($(item).find(\"div.get_position\").length == 0){\n\t\t\tif ($(item).find(\"div.get_position\").length == 0){\n\t\t\t\t$(item).append( \"<div class='get_position'></div>\");\n\t\t\t}\n\t \n\t\t function onMouseMove(event) {\n\t\t\t\tRnewX = Math.round(event.pageX-shiftX);\n\t\t\t\tRnewY = Math.round(event.pageY-shiftY);\n\t\t\t\t\n\t\t\t\tnewX = RnewX + 'px';\n\t\t\t\tnewY = RnewY + 'px';\n\n\t\t\t\t$(iitem).css({left: newX});\n\t\t\t\t$(iitem).css({top: newY});\n\t\t\t\t$(iitem).find(\"div.get_position\").text(\"left: \"+RnewX+\"px; top: \"+RnewY+\"px\");\n\t\t\t\t\n\t\t\t\t\n\t }\n\n \t\tdocument.addEventListener('mousemove', onMouseMove);\n\n\t\t\tdocument.onmouseup = function() { //spustu cvasu jsem stratil nat tim mez jsem zjistil ze odebrani eventu musim provest nad celym documnetem a ne nad posovanym objektem, protoze se obcas kurzor posune mimo objekt a to by se potom posovani nikdy neukoncilo\n\t\t\t\tconsole.log(\"--- posuvnik off------ \");\n\t\t\t\tdocument.removeEventListener('mousemove', onMouseMove);\n\t\t\t\t//document.getElementById(idName).onmouseup = null;\n\t\t\t\t$(iitem).mousedown ( null);\n\t\t\t};\n\t\t\n\t\t\t//document.getElementById(idName).ondragstart = function() {\n\t\t\t$(iitem)[0].ondragstart = function() {\n\t\t\t\treturn false;\n\t\t\t};\n\t\t});\n\n }", "title": "" }, { "docid": "41d9663faab61d4edc6c0718104504c9", "score": "0.48670846", "text": "function getCoordinates() {\n const coordinates = $(\"#lat\").val() + \", \" + $(\"#lng\").val();\n return {\n lat: Number($(\"#lat\").val()),\n lng: Number($(\"#lng\").val()),\n };\n }", "title": "" }, { "docid": "2004ce3da382472fd5e14e4933056512", "score": "0.48664537", "text": "function success(position) {\n\t\tmyPos = new google.maps.LatLng( position.coords.latitude,\n\t\t\t\t\t\t\t\t\t\tposition.coords.longitude);\n\t\tmyLat = position.coords.latitude;\n\t\tmyLng = position.coords.longitude;\n\t\tgetStoreList();\n\t}", "title": "" }, { "docid": "cc9c600caf09eb37f8b2288333f2a1e0", "score": "0.48614946", "text": "function showCoords(c)\n{\n $('#x1').val(c.x);\n $('#y1').val(c.y);\n $('#x2').val(c.x2);\n $('#y2').val(c.y2);\n $('#w').val(c.w);\n $('#h').val(c.h);\n}", "title": "" }, { "docid": "b15842b3600fb85ea5bd3c311503be41", "score": "0.48605993", "text": "function successCB(position) {\n setLat(position.coords.latitude);\n setLon(position.coords.longitude);\n }", "title": "" }, { "docid": "b5a8ea5eb73fd0c76b70251079e5da30", "score": "0.48562294", "text": "onPosition(fn) {\n this.eventEmitter.on(settings.socket.position, (data) => {\n let positionObject = JSON.parse(data);\n fn(positionObject);\n });\n }", "title": "" }, { "docid": "5e99a9f685d011855121809120b5480e", "score": "0.4854607", "text": "function onGetGeoPos(pos) {\n axios.post('/api/addListing', {\n lat: 40.71, //pos.coords.latitude,\n lng: 40.71, //pos.coords.longitude,\n title: lastAddedTitle,\n desc: lastAddedDescription,\n type: lastAddedType\n })\n .then((response) => {\n setMarkers(response.data.dbMarkers);\n })\n }", "title": "" }, { "docid": "003b9affc5c1d45d55b855689ea73a97", "score": "0.48526132", "text": "function changeBuildingPosition() {\n\n // clean DOM\n var $addCaptors = $(\"#add-captors\").empty();\n\n // append building name\n $addCaptors.append(\"<div><h2>\" + position.name + \"</h2></div>\");\n\n //We append a link to every room / place we can access from position\n for (var i = 0; i < buildings.length; i++) {\n $addCaptors.append(\n \"<div class=\\\"row\\\"><a class=\\\"node\\\" style=\\\"cursor : pointer;\\\" id=\\\"\" + i + \"\\\">\"\n + buildings[i].name + \"</a> - <span class=\\\"badge\\\" style=\\\"background:#4781ff;\\\">\"\n + buildings[i].amountOfSensors+\"</span></div>\"\n );\n }\n\n $addCaptors.append( \"<hr><div id='directSensors\"+position.name.replace(/ /g,\"_\")+\"' class='text-left'></div>\");\n var $directSensorsPosition = $(\"#directSensors\"+position.name.replace(/ /g,\"_\"));\n\n //Then, in position we check if there is any sensor\n if (position.directSensor != null && typeof(position.directSensor) !== 'undefined' && position.directSensor != [null]) {\n for (var i = 0; i < position.directSensor.length; i++) {\n\n if (position.directSensor[i] != null) {\n $directSensorsPosition.append(\n '<div class=\"draggableSensor\" id=\"' + position.directSensor[i].name + '\" style=\"cursor: -webkit-grab; cursor:-moz-grab;\">'\n + '<img class=\"sensorIcon\" src=\"/assets/images/sensorIcons/' + position.directSensor[i].kind + '.png\">'\n + position.directSensor[i].displayName\n + '</img> </div>'\n );\n }\n\n }\n }\n else {\n $directSensorsPosition.append(\"<div>There isn't any compatible sensor here. </div>\");\n }\n\n // make sensors draggable\n $(\".draggableSensor\").draggable({\n helper: function (event) {\n return $(\"<div style='cursor:-webkit-grabbing; cursor:-moz-grabbing;' id='\" + event.currentTarget.id + \"'>\" + event.currentTarget.innerHTML + \"</div>\");\n },\n revert: \"invalid\",\n cursorAt: { bottom: 10, left: 60 }\n });\n\n updateBuildingPath();\n}", "title": "" }, { "docid": "ad710edec5f133e4069a2892cb229b46", "score": "0.48473364", "text": "getPos(name){\n if(!this.data[name])\n return null;\n return this.data[name].position;\n }", "title": "" }, { "docid": "da929e5bdd65d658f3e5b29e3cf70603", "score": "0.48448738", "text": "getPosition() {\n return this.dataHelper.cleanPosition(this.dynamics.position.current);\n }", "title": "" }, { "docid": "2b6d7f3932901eac82c0e24edbdcaa48", "score": "0.4844512", "text": "function findMatch (evt){\n var draggedLat = marker.position.lat();\n console.log(draggedLat);\n console.log('test')\n var draggedLon = marker.position.lng();\n var matchDuration = $('#match_data').data('duration');\n var matchWaitTime = $('#match_data').data('wait-time');\n var matchScheduled = $('#match_data').data('scheduled');\n var matchDate = $('#match_data').data('date');\n var matchTime = $('#match_data').data('time');\n var inputs = {\"lat\": draggedLat, \"lon\": draggedLon, \"duration\": matchDuration, \"wait_time\": matchWaitTime, \"scheduled\": matchScheduled, \"date\": matchDate, \"time\": matchTime};\n\n//returning latitude and longitude to server, and changing html to success message.\n $.post('/finding_match', inputs , function(data){\n \n var message = \"Great! We got down your details and are texting your potential running buddy\";\n $('#runbutton').remove();\n $('#results').html('<div class= \"alert alert-success\">' + message + '</div>');\n\n });\n}", "title": "" }, { "docid": "6966ea5cb3db26ecd350ade7e3fefad2", "score": "0.4835636", "text": "function get_new_pos(self, pos, absolute_pos)\n {\n let ka_content_group = self.private._ka_content_group;\n let contentWidth = ka_content_group.width();\n let contentHeight = ka_content_group.height();\n\n const viewport_dim = self.private._ka_viewport_rect.getClientRect();\n if(absolute_pos) {\n pos.x -= viewport_dim.x;\n pos.y -= viewport_dim.y;\n }\n\n const minY = -(contentHeight - viewport_dim.height);\n const maxY = 0;\n let y = Math.max(\n minY,\n Math.min(\n pos.y,\n maxY\n )\n );\n\n const minX = -(contentWidth - viewport_dim.width);\n const maxX = 0;\n let x = Math.max(\n minX,\n Math.min(\n pos.x,\n maxX\n )\n );\n\n if(absolute_pos) {\n // return absolute pos\n x += viewport_dim.x;\n y += viewport_dim.y;\n }\n\n return {\n x: self.config.enable_hscroll? x: viewport_dim.x,\n y: self.config.enable_vscroll? y: viewport_dim.y\n };\n }", "title": "" }, { "docid": "9d90c06dd2f7c3e1ebe0c2c20058f71b", "score": "0.48348528", "text": "function dropIt(event, ui) {\n var self = this;\n var draggableId = ui.draggable.attr(\"id\");\n var droppableId = $(self).attr(\"id\");\n//Checking if it's already in the box for the sensors (more complicated than need)\n var alreadyHere = false;\n allTheNeeds[droppableId].sensors.forEach(function(completeSensor) { //checking if already in the box as a sensor\n if (completeSensor.name == draggableId) {\n alreadyHere = true;\n }\n });\n //If it's already in the box as a need\n if (($.inArray(draggableId, allTheNeeds[droppableId].needs) > -1)) {\n alreadyHere = true;\n }\n //This need or sensor mustn't already be in the box !\n if (!alreadyHere && !allTheNeeds[droppableId].noMoreSensors) {\n if ($.inArray(draggableId, needsSimpleOrigin) > -1) {\n allTheNeeds[droppableId].needs.push(draggableId);\n addToBox($(self), draggableId, droppableId, true);\n callCompositionAndDealWithIt(droppableId);\n }\n else {\n $.get(mainServer + \"sensor/\" + draggableId + \"/enhanced\")\n .done(function (enhancedSensor) {\n enhancedSensor[\"salle\"] = (position.name).replace(/ /g,\"_\");\n allTheNeeds[droppableId].sensors.push(enhancedSensor);\n addToBox($(self), draggableId, droppableId, false);\n callCompositionAndDealWithIt(droppableId);\n }).fail(function(error) {\n console.log('error in enhanced');\n });\n }\n\n\n }\n}", "title": "" }, { "docid": "37affc8fa39817623100e89d19272836", "score": "0.48235768", "text": "function dropHandler(ev){\n /* This object will be sent with the POST request */\n var obj = new Object();\n obj.name = ev.dataTransfer.getData('text/html');\n\n /* Precautionary. There should only be one element total in \"left\", \"swap\",\n or \"right\" */\n if( ($(\".left\").length + $(\".swap\").length + $(\".right\").length) > 1){\n alert (\"There was a problem moving the column\");\n return;\n }\n\n /* There should be a single element with the class \"left\", \"right\" or \"swap\"\n Find which class the element belongs to and update obj accordingly */\n if($(\".left\").length != 0){\n obj.name2 = $(\".left\")[0].innerHTML;\n obj.type = \"left\";\n }else if($(\".swap\").length != 0){\n obj.name2 = $(\".swap\")[0].innerHTML;\n obj.type = \"swap\";\n }else{\n obj.name2 = $(\".right\")[0].innerHTML;\n obj.type = \"right\";\n }\n\n /* Do not move any columns if the element was dropped on itself */\n if(obj.name2 == obj.name){\n return;\n }\n /* Make the POST request */\n $.post(\"myPHP/moveColumn.php\", obj,function(data){\n /* Update the window once the database is updated */\n window.location = \"index.php\";\n });\n}", "title": "" }, { "docid": "472f9748423c4b5e090d599829bd9013", "score": "0.48184946", "text": "function getPos(e){\n var x = e.pageX - self.document.$canvasHolder.get(0).offsetLeft;\n var y = e.pageY - self.document.$canvasHolder.get(0).offsetTop;\n\n return {x:x, y:y};\n }", "title": "" }, { "docid": "d1c4cae473ef3103937edd70385ac83c", "score": "0.48172176", "text": "function dragDrop() {\n // Set the ship that was dragged\n let shipNameWithLastId = draggedShip.lastChild.id;\n let shipClass = shipNameWithLastId.slice(0, -2);\n console.log(shipClass);\n let lastShipIndex = parseInt(shipNameWithLastId.substr(-1));\n let shipLastId = lastShipIndex + parseInt(this.dataset.id);\n console.log(shipLastId);\n // Set which squares are not allowed to hold a horizontal or vertical ship\n const notAllowedHorizontal = [0,10,20,30,40,50,60,70,80,90,1,11,21,31,41,51,61,71,81,91,2,22,32,42,52,62,72,82,92,3,13,23,33,43,53,63,73,83,93];\n const notAllowedVertical = [99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60];\n // Add to the list of which squares are not allowed to hold a horizontal or vertical ship\n let newNotAllowedHorizontal = notAllowedHorizontal.splice(0, 10 * lastShipIndex);\n let newNotAllowedVertical = notAllowedVertical.splice(0, 10 * lastShipIndex);\n // Set the selected ships index and Id\n selectedShipIndex = parseInt(selectedShipNameWithIndex.substr(-1));\n shipLastId = shipLastId - selectedShipIndex;\n console.log(shipLastId);\n // Check if the ship is horizontal and does not overlap with squares that do not allow horizontal ships\n if (isHorizontal && !newNotAllowedHorizontal.includes(shipLastId)) {\n for (let i = 0; i < draggedShipLength; i++) {\n let directionClass;\n if (i == 0) directionClass = 'start';\n if (i == draggedShipLength - 1) directionClass = 'end';\n // Add taken, horizontal, ship type, and ship direction attributes to squares that will be populated by a ship\n userSquares[parseInt(this.dataset.id) - selectedShipIndex + i].classList.add('taken', 'horizontal', directionClass, shipClass);\n }\n }\n // Check if the ship is vertical and does not overlap with squares that do not allow vertical ships\n else if (!isHorizontal && !newNotAllowedVertical.includes(shipLastId)) {\n for (let i = 0; i < draggedShipLength; i++) {\n let directionClass;\n if (i == 0) directionClass = 'start';\n if (i == draggedShipLength - 1) directionClass = 'end';\n // Add taken, vertical, ship type, and ship direction attributes to squares that will be populated by a ship\n userSquares[parseInt(this.dataset.id) - selectedShipIndex + width * i].classList.add('taken', 'vertical', directionClass, shipClass);\n }\n } else return\n // Remove the dropped ship from the display grid for ships to be placed\n displayGrid.removeChild(draggedShip);\n // When there are no more objects in the display grid with class of 'ship' ->\n if(!displayGrid.querySelector('.ship')) allShipsPlaced = true;\n }", "title": "" }, { "docid": "db222e273f3c1280d1014cf7a1ce8bc2", "score": "0.48104018", "text": "function GetPosition(id) {\n Pace.start();\n $.ajax({\n url: baseUrl() + \"WebServices/WebService_Position.asmx/GetPosition\",\n data: \"{ \" +\n \"'pos_id':'\" + id + \"' \" +\n \",'RequestID':'\" + get_current_user_id() + \"' \" +\n \" }\",\n dataType: 'json',\n type: \"POST\",\n contentType: \"application/json; charset=utf-8\",\n success: function (data) {\n if (data.d != null) {\n\n $(\"#tb_id\").val(data.d[\"PositionID\"]);\n\n $(\"#tab_detail_header\").html(data.d[\"PositionName\"]);\n $(\"#tb_name\").val(data.d[\"PositionName\"]);\n $(\"#tb_position_code\").val(data.d[\"PositionCode\"]);\n $(\"#tb_protocol\").val(data.d[\"Protocol\"]);\n $(\"#tb_description\").val(data.d[\"Description\"]);\n $(\"#tb_remark\").val(data.d[\"Remark\"]);\n $(\"#lbl_created\").text(\"စာရင်းသွင်းသူ : \" + data.d[\"CreatedByCode\"] + \" on \" + JsonDateToFormat(data.d[\"CreatedOn\"], 'DD/MM/YYYY HH:mm'));\n $(\"#lbl_modified\").text(\"ပြင်ဆင်သူ : \" + data.d[\"ModifiedByCode\"] + \" on \" + JsonDateToFormat(data.d[\"ModifiedOn\"], 'DD/MM/YYYY HH:mm'));\n \n ShowSuccessMessage(\"Loaded.\");\n $('#dialogBox_Detail_Form').modal('show');\n }\n else {\n ShowBoxMessage(\"Oops, we can't find the record. \");\n }\n\n },\n error: function (xhr, msg) {\n LogJSError('Web Service Fail: ' + msg + '\\n' + xhr.responseText);\n\n }\n });\n}", "title": "" }, { "docid": "adb76c6024c9f722eaffc56f19e69210", "score": "0.47988904", "text": "function setFormCoordinates(pos_x, pos_y, srid, zoom, form_id, uniqueId, cb) {\n try {\n _self.emit(\"log\", \"forms.js\", \"setFormCoordinates(\" + pos_x + \",\" + pos_y + \",\" + zoom + \",\" + form_id + \",\" + uniqueId + \")\", \"info\");\n\n var dataToSend = {};\n dataToSend.pos_x = pos_x;\n dataToSend.pos_y = pos_y;\n dataToSend.form_id = form_id;\n dataToSend.zoom = zoom;\n dataToSend.device = _device;\n dataToSend.srid = srid;\n dataToSend.uniqueId = uniqueId;\n dataToSend.token = _token;\n dataToSend.what = 'SET_FORM_COORDINATES';\n dataToSend.expected_api_version = _expected_api_version;\n axios.post(_baseHref + '/ajax.sewernet.php', dataToSend).then(function (response) {\n _self.emit(\"log\", \"forms.js\", \"setFormCoordinates\", \"success\", response.data.message);\n\n if (response.data.status === \"Accepted\") {\n cb(null, response.data.message);\n } else {\n cb(response.data.message, response.data.message);\n }\n })[\"catch\"](function (error) {\n _self.emit(\"log\", \"form.js\", \"setFormCoordinates\", \"error\", error);\n });\n } catch (e) {\n _self.emit(\"log\", \"form.js\", \"setFormCoordinates error\", \"error\", e);\n\n cb(e, false);\n }\n }", "title": "" }, { "docid": "cd9c00cdfc3f84c8806a1846d2c37df0", "score": "0.47734663", "text": "function applyDraggable(object){\n\t$(object).draggable({\n\t\tsnap: true,\n\t\t//connectToSortable: \"#formContainer\",\n\t\tcontainment: \"parent\"\n\t});\n}", "title": "" }, { "docid": "036873d2ef58385581cfb09e302d13d8", "score": "0.47690174", "text": "function getMove(coords, turn, cb) {\n $.post({\n url: \"/move\",\n dataType: \"json\",\n data: JSON.stringify({\n 'b': board,\n 'c': coords,\n 't': turn,\n 'o': opponent\n }),\n contentType: \"application/json\",\n success: function(data) {\n cb(data);\n }\n });\n}", "title": "" }, { "docid": "d3510a11395c07fb23ccecf89d489561", "score": "0.4768911", "text": "function showCoords(c) {\n\t\t\t\t$('#x1').val(c.x);\n\t\t\t\t$('#y1').val(c.y);\n\t\t\t\t$('#x2').val(c.x2);\n\t\t\t\t$('#y2').val(c.y2);\n\t\t\t\t$('#w').val(c.w);\n\t\t\t\t$('#h').val(c.h);\n\t\t\t\t$('#bx').val(boundx);\n\t\t\t\t$('#by').val(boundy);\n\t\t\t}", "title": "" }, { "docid": "87c5ec54fb53630780b2387422f0fec5", "score": "0.47684455", "text": "function DspPPDDG(obj, pl_id, us_id) {\r\n\r\n\r\n var p = $(obj);\r\n var position = p.position();\r\n\r\n if ($(\"#PP_PlstPreviewDG\").position().left != position.left && $(\"#PP_PlstPreviewDG\").position().top != position.top) {\r\n $(\"#PP_PlstPreviewDG\").css(\"left\", position.left + \"px\");\r\n $(\"#PP_PlstPreviewDG\").css(\"top\", (position.top + 49) + \"px\");\r\n\r\n $('#PP_PlstPreviewDG').html(\"<div class='LdingPrevDG'>Loading...</div>\");\r\n $(\"#PP_PlstPreviewDG\").css(\"display\", \"block\");\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: \"/playlist/getPlaylistDetailsPreviewPopDG?PL_ID=\" + pl_id + \"&US_ID=\" + us_id,\r\n async: true,\r\n success: function (data) {\r\n $('#PP_PlstPreviewDG').html(data);\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "d0533b597f8b55045755545544f16f84", "score": "0.47668114", "text": "function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/ {\n\t return {\n\t node: coreData.node,\n\t x: draggable.state.x + coreData.deltaX,\n\t y: draggable.state.y + coreData.deltaY,\n\t deltaX: coreData.deltaX,\n\t deltaY: coreData.deltaY,\n\t lastX: draggable.state.x,\n\t lastY: draggable.state.y\n\t };\n\t}", "title": "" }, { "docid": "0188cdb65a1cd9dc032f8154237e18e9", "score": "0.47567296", "text": "function getCoordsAndEvents(data){\n let lat = data.location.lat\n let lng = data.location.lng\n\n const URL = \"https://api.eventful.com/json/events/search?...&where=\"\n const CRITERIA = \"&within=10&date=Future\\&app_key=\"\n const EVENTFULAPI = \"cmMZxgb87BQPf3cQ\"\n\n $.ajax({\n url: `${URL}${lat},${lng}${CRITERIA}${EVENTFULAPI}`,\n dataType: \"jsonp\",\n success: parseEvents\n })\n}", "title": "" }, { "docid": "04a651bb4828c40eab72e9070c520a70", "score": "0.47545916", "text": "function updatePosition(position) {\r\n var location_field = document.getElementById(\"location_field\");\r\n var location_display = document.getElementById(\"location_display\");\r\n //location_field.value = position;\r\n //location_display.innerHTML = position;\r\n}", "title": "" }, { "docid": "c6b7b9ba2188eb84f2d9d7e7e0f742cb", "score": "0.47521", "text": "get draggable() {\n return this.getDraggable();\n }", "title": "" } ]
3429c5c2dfe5452464c698ea7527669e
Function to submit Data to process endpoint when a name is clicked
[ { "docid": "af64bea96c90dd2ed67a924d65f59cb7", "score": "0.0", "text": "function submitData() {\n $(\"#upload_window\").hide()\n $(\"#password_window\").hide()\n var chosen = $(\".header_image\").attr('id');\n $(\"#results_container\").empty();\n $(\"#instructions\").hide();\n $(\"#length_display\").attr('display', 'none');\n\n\n $.ajax({\n data: {\n tags: $('#search_term').val(),\n chosen: chosen\n },\n type: 'POST',\n url: '/process'\n })\n\n .done(function(data) {\n processData(data);\n });\n}", "title": "" } ]
[ { "docid": "17536cc948d5853c0d16017f5286e98c", "score": "0.6717379", "text": "function sendData(name) {\n var api = 'https://restcountries.eu/rest/v1/name/';\n\n $form.on('submit', function(e) {\n e.preventDefault();\n name = $titleInput.val();\n\n $.ajax({\n url: api + name,\n type: 'GET',\n dataType: 'json'\n }).done(function(response) {\n console.log(response);\n loadCountries(response[0].name);\n colorMap();\n }).fail(function(error) {\n $error.css('display','block');\n $titleInput.val('');\n })\n });\n }", "title": "" }, { "docid": "8080ccf918fdbe9bd05bd0a515619c2d", "score": "0.6384692", "text": "function nameClick(e) {\n\te.preventDefault();\n \n title = $(this).text().trim();\n \n\tconsole.log(\"This shareName is:\" + title);\n \n $.post(\"/getMapView\", {\"title\":title}, callbackFn);\n}", "title": "" }, { "docid": "9ecc0a05ae9ec0539cae205fc2f9d2f6", "score": "0.6354661", "text": "function submit(e) {\n if(typeof props.search === 'function') {\n props.search(term, location);\n }\n \n e.preventDefault();\n \n fetch('/r/dynamic', {\n method:\"POST\",\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({term,location})\n })\n .then((e)=>e.json())\n .then(data=>{\n console.log(data)\n props.setAPIdata(data);\n })\n \n }", "title": "" }, { "docid": "966518f7b19263c46757b10d50b529ed", "score": "0.6353668", "text": "function nameData(){\n\n\t\t$.ajax({\n\t\t\turl: 'http://www.behance.net/v2/users/' + userID + '?&api_key=' + apiKey,\n\t\t\tdataType: 'jsonp',\n\t\t\tsuccess: function(dataNames){\n\t\t\t\n\t\t\t\trunNames(dataNames);\n\n\t\t\t},\n\t\t\terror:function(error){\n\t\t\t\tconsole.log(error);\n\t\t\t}\t\t\n\t\t });\n\t}", "title": "" }, { "docid": "c0828ce6ffe407a065182898d7b80347", "score": "0.62839454", "text": "function onSubmit(event){\n // stop form from submitting normally\n event.preventDefault();\n\n let form = $(this);\n let name = form.find(\"input[name='fname']\").val();\n let json_data = { 'name' : name };\n let url_path = '/e/macid/test_ajax/';\n\n $.post(url_path,\n json_data,\n handleResponse\n );\n }", "title": "" }, { "docid": "411dd821541506c9fe933b466686c18c", "score": "0.6253368", "text": "function performAction(e) {\n e.preventDefault();\n // get user input values\n const newZip = document.getElementById('zip').value;\n const content = document.getElementById('feelings').value;\n \n getWeather(baseURL, newZip, apiKey)\n .then(function (userData) {\n // add data to POST request\n console.log(userData);\n \n postData('http://localhost:8000/add', { date: newDate, \n temp: userData.main.temp, \n content, \n description: userData.weather[0].description,\n city: userData.name, \n country: userData.sys.country, \n iconID: userData.weather[0].icon })\n }).then(function () {\n // call updateUI to update browser content\n updateUI();\n })\n}", "title": "" }, { "docid": "07d1e50306758d040471f8b1002ac001", "score": "0.62223613", "text": "function submit(){\r\n // getting the submitted input value\r\n let name = document.getElementById(\"name\").value;\r\n let comment =document.getElementById(\"comment\").value;\r\n // converting the data as an object\r\n const message = {name: name, comment: comment};\r\n // sending the parameters to the service\r\n const fetchOptions = {\r\n method : 'POST',\r\n headers : {\r\n \t\t\t'Accept': 'application/json',\r\n \t\t\t'Content-Type' : 'application/json'\r\n \t\t},\r\n \t\tbody : JSON.stringify(message)\r\n };\r\n\r\n \tlet url = \"http://localhost:3000\";\r\n // sending the data\r\n \tfetch(url, fetchOptions)\r\n \t\t.then(checkStatus)\r\n \t\t.then(function(responseText) {\r\n // displays a success message right next to the submit button\r\n \t\t\tdocument.getElementById(\"success\").innerHTML = responseText;\r\n \t\t})\r\n // catch function for possible error\r\n \t\t.catch(function(error) {\r\n \t\t\tdocument.getElementById(\"success\").innerHTML = error;\r\n \t\t});\r\n // clearing the input bar and text area after the data has been sent\r\n document.getElementById(\"name\").value=\"\";\r\n document.getElementById(\"comment\").value=\"\";\r\n }", "title": "" }, { "docid": "d38f3f8809447a0d8b6c9265c3a03a4a", "score": "0.61782944", "text": "function handleSubmit() {\n // Prevent the page from refreshing\n d3.event.preventDefault();\n \n // Select the input value from the form\n var inpu = d3.select(\"#selDataset\").node().value;\n //console.log(inpu);\n \n // clear the input value\n d3.select(\"#selDataset\").node().value = \"\";\n \n //call to run the process with the new input\n fill_info_panel(inpu);\n }", "title": "" }, { "docid": "c4f8d3720f3cb0bb66dd1cbae6bafdb9", "score": "0.61455", "text": "function submitName(event) {\n event.preventDefault()\n\n \n // gather data\n const inputField = document.getElementById('userName')\n let usersName = inputField.value\n\n if(checkValidation(usersName)) {\n return null\n } else {\n\n hero.name = usersName\n \n displayStats() \n }\n}", "title": "" }, { "docid": "9754b462b0017752b85d8943194f6893", "score": "0.6143122", "text": "function submitData (e) {\n e.preventDefault();\n item = e.target[0].value;\n e.target[0].value = \"\";\n var data = JSON.stringify({\n check: false,\n item: item\n });\n var xml = new XMLHttpRequest();\n xml.open(\"POST\", \"list\", true);\n xml.setRequestHeader(\"Content-type\", \"application/json\");\n xml.onreadystatechange = () => {\n if (xml.readyState == 4 && xml.status == 200) {\n location.reload();\n }\n };\n xml.send(data);\n}", "title": "" }, { "docid": "42c68f10b57cebd849e308e3abbb6dbf", "score": "0.61364335", "text": "function userSubmit() {\t\n\t$(\"#locsubmit\").click(function(event) {\n\t\tgetEntityDetailsBasedOnLocation(getRestaurantDetailFromAPI);\n\t});\n}", "title": "" }, { "docid": "1ddc1b262a05755888e296bdc36a76ce", "score": "0.6134543", "text": "fnSendName() {\n debugger;\n console.log(\"FnSendNameClicked\");\n let name = this.refs.name.value;\n getNameAction(name, this.props.dispatch);\n }", "title": "" }, { "docid": "b8b00cc39491a70c3f2a1bdd2b243229", "score": "0.61077785", "text": "function handleSubmit(event) {\n Axios.post(url, {\n name: name,\n net_id: netid,\n email: email,\n }).then((response) => {\n if (response.data.message !== \"FAILURE\") {\n refresh();\n } else {\n failOn();\n }\n });\n createStudentOff();\n event.preventDefault();\n }", "title": "" }, { "docid": "06e816cc8b09bc454c0158d2bd355c4e", "score": "0.6105261", "text": "function handleClick(info) {\n // our axios api call\n axios\n // our dummy post http route for testing purposes\n .post('https://jsonplaceholder.typicode.com/posts', info)\n .then(data => {\n // logging our data \n console.log(data)\n })\n // error catching\n .catch((err) => {\n console.log(err)\n })\n }", "title": "" }, { "docid": "74863232c94bb2a8a3804a78c82cecc5", "score": "0.6103162", "text": "handleSubmit(event) {\n console.log('Tripname was submitted:' + this.state.tripName);\n event.preventDefault();\n serverInt.sendServerTripName(this.state.tripName);\n }", "title": "" }, { "docid": "1d9e621346c8b24a9455b56a1202186e", "score": "0.6084702", "text": "submit(data) {\n const { name, date } = data;\n db.addNewEvent(name, date);\n }", "title": "" }, { "docid": "a5ddbfb5f2df256e277b506f3a3b7d04", "score": "0.606192", "text": "submit(data) {\n\t\tthis.data = data;\n\t}", "title": "" }, { "docid": "f1374a321eb2bb57515dca5522c62f5e", "score": "0.60483974", "text": "function postDataToApi(e) {\n console.log(e);\n e.preventDefault();\n const postTitle = document.querySelector('#title').value;\n// console.log(title);\n const postBody = document.querySelector('#bodyText').value;\n\n const url = 'https://jsonplaceholder.typicode.com/posts';\n\n addPostToApiUsingFetch(url, postTitle, postBody);\n\n\n}", "title": "" }, { "docid": "21ded97930228e24805c8eeff8c7d43a", "score": "0.6044509", "text": "function submitForm() {\n event.preventDefault();\n\n const title = event.target.title.value;\n const description = event.target.description.value;\n\n fetch('/api/data', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ title, description })\n })\n .then(() => {\n console.log(JSON.stringify({ title, description }))\n fetchAndPrintData()\n });\n\n}", "title": "" }, { "docid": "e6f638354b78b03d64290fba055acb9e", "score": "0.6024545", "text": "function submitData(event){\n\t\t/*!!!CHANGES ARE UNCONTROLLED BY REACT!!!*/\n\t\tconst {innerText, dataset} = event.target\n\t\tconst {index, name} = dataset\n\t\tif(!innerText){\n\t\t\treturn\n\t\t}\n\t\telse if(innerText){\n\t\t\t/* a props function is called with the value, index, and name as parameters */ \n\t\t\tprops.onChange(innerText, index, name)\n\t\t}\n\t}", "title": "" }, { "docid": "085f7baa4acbba936ea354d277e7d6b9", "score": "0.6015391", "text": "function handleSubmit(e) {\n e.preventDefault();\n const destCity = document.getElementById('dest').value;\n const startDate = document.getElementById('startDate').value;\n const endDate = document.getElementById('endDate').value\n let loader = `<img class=\"loading\" src=\"./media/loader.gif\" alt = \"Loading\">`;\n document.getElementById('heading').innerHTML = loader;\n Client.postData('/tripData', {dest: destCity, start: startDate, end: endDate})\n .then(function(response){\n console.log(response);\n Client.showCurrentTrip(response);\n })\n \n}", "title": "" }, { "docid": "c1058d57ac314b41727989ee1ecc7358", "score": "0.59911364", "text": "function handleEditItemName() {\n $('#js-edit-item').submit(event => {\n event.preventDefault();\n const itemName = $('.js-edit-item').val();\n changeNameTo(itemName);\n renderShoppingList();\n });\n}", "title": "" }, { "docid": "dab26ca896712612ab17080edb42fc35", "score": "0.59809643", "text": "function performAction(e) {\n const userResponse = document.getElementById('feelings').value;\n const zipCode = document.getElementById('zip').value;\n\n getWebData(baseURL, zipCode, apiKey)\n\n .then(function (data) {\n console.log('getWebData', data)\n postData('/weatherData', {\n temperature: data.main.temp,\n date: newDate,\n userResponse: userResponse\n })\n updateUI()\n });\n}", "title": "" }, { "docid": "6af5a329ea1ec3c4cdd913e5c0aec798", "score": "0.59796345", "text": "submitPage() {\n\t\tconsole.log(this.dataEntry);\n\t\tthis.dataEntry.date_created = new Date();\n\t\t//Need to set author\n\n\t\tconsole.log(this.dataEntry);\n\t\tfetch('PLACEHOLDER_URL', {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Accept': 'application/json',\n\t\t\t\t'Content-Type': 'appication/json'\n\t\t\t},\n\t\t\tbody: this\n\t\t});\n\n\n\t\tif (this.submitCallback) {\n\t\t\tthis.submitCallback(this.dataEntry);\n\t\t}\n\n\t\t// Clear form for future use\n\t\tthis.dataEntry = new DataEntryModel(\"\", \"\", \"\", \"\", \"\");\n\t}", "title": "" }, { "docid": "8b52d031ae2a627228ed67981212056c", "score": "0.59787107", "text": "handleSubmit(event) {\n event.preventDefault();\n console.log(\"handleSubmit\");\n this.props.getTripInfoFromButton({\n id: event.currentTarget.id,\n origin: event.currentTarget.dataset.origin,\n destination: event.currentTarget.dataset.destination,\n departure: event.currentTarget.dataset.departure,\n arrival: event.currentTarget.dataset.arrival,\n price: event.currentTarget.dataset.price,\n key: event.currentTarget.dataset.key\n });\n }", "title": "" }, { "docid": "bdbc8eac1bfb9e5adf6bb5dec5c5051d", "score": "0.59745216", "text": "function performAction(e){\n const zip = document.getElementById('zip').value; \n const feelings = document.getElementById('feelings').value;\n \n getTemp(baseURL, zip, apiKey)\n\n .then((data) => {\n //Add data\n console.log(data);\n if (data.main == undefined){\n alert(\"Please enter a German zip-code\")\n }\n postData('/add', { temp: data.main.temp, city: data.name, zip: zip, feelings: feelings, temp_max: data.main.temp_max, temp_min: data.main.temp_min });\n })\n\n .then(function(){\n updateUI()\n });\n}", "title": "" }, { "docid": "0e2a005f7aab86a6ad39a24904dd9f06", "score": "0.5971769", "text": "function submit() {\n let name = document.getElementById(\"name_input\").value;\n console.log(name);\n $.post(serverurl + 'submit', {name:name}, function (data) {\n let tbl = document.getElementById(\"names\");\n tbl.parentNode.removeChild(tbl);\n generate_list();\n alert(\"Hallo \" + data.name + \"! Du bist Besucher Nummer: \" + data.id);\n });\n}", "title": "" }, { "docid": "f2bf56ef991e8b744558c0614edca29d", "score": "0.5970126", "text": "function handleOnSubmit(e) {\n e.preventDefault();\n closeModal();\n \n //load data in user-bookings in strapi\n \n axios.post(\"https://pik-span-strapi.herokuapp.com/user-bookings\", {\n name: username,\n date: formValues.date,\n time: formValues.time,\n price:price,\n mobileNum: formValues.mobileNum,\n img:url,\n product: serviceId,\n users_permissions_user: userId\n }).then((res) => {\n console.log(\"this is the reponse after upload\",res);\n\n }).catch((err) => {\n\n console.log(err)\n });\n\n\n\n }", "title": "" }, { "docid": "38d6015af92caf71b482c96f3a20887f", "score": "0.596368", "text": "handleSubmit(event) {\n event.preventDefault();\n this.props.getRequestInfo([event.target.name], event.target.value)\n }", "title": "" }, { "docid": "acf7e1ea4a4850b3463fa007f3f57404", "score": "0.5959949", "text": "_requestEventHandler(e) {\n e.preventDefault();\n this.requestData(e.detail);\n }", "title": "" }, { "docid": "8c46ccc4863fd30048fbb32c07131ac6", "score": "0.59579194", "text": "function performAction(e){\n //getWeatherData(baseURL, apiKey)\n const feelings = document.getElementById('feelings').value;\n const zipCode = document.getElementById('zip').value;\n \n let theZip = `zip=${zipCode}`;\n \n let theAPIKey = `&apiKey=${apiKey}`;\n \n getWeatherData(baseURL, theZip, theAPIKey)\n .then(function(data){\n //console.log(data);\n postData('/addWeatherData', {temp:data.list[0].main.temp, pressure:data.list[0].main.pressure, feelings: feelings})\n \n updateUI()\n })\n}", "title": "" }, { "docid": "f0737416d36e134032b3f4e9e174be00", "score": "0.5953264", "text": "function submitBurger() {\n event.preventDefault();\n\n let newName = $(\"#inputBurger\").val().trim();\n // console.log(\"newName is \" + newName);\n\n let postData = {\n name: newName\n };\n\n // Send the POST request.\n $.ajax(\"/api/new\", {\n type: \"POST\",\n data: postData\n }).then(\n function() {\n // Reload the page to get the updated list\n location.reload();\n }\n );\n\n\n}", "title": "" }, { "docid": "7ec2f1ffcb713db259d15faed5d46818", "score": "0.5950697", "text": "function submit(e) {\n var payload = {};\n if (e.namedValues) {\n console.log('namedValues case');\n if (e.namedValues['Domain ID'][0] != '') {\n Logger.log('namedValues domainid not null ! submit form case');\n payload = processNamedValues(e);\n } else {\n Logger.log('namedValues domainid NULL ! edit form response case');\n payload = processRange(e);\n }\n } else {\n Logger.log('NO namedValues : edit sheet case');\n payload = processRange(e);\n }\n\n push(payload);\n}", "title": "" }, { "docid": "d4a6fb59392cf5e31f8e81327f22e18a", "score": "0.59275097", "text": "function submitData(id = -1)\n{\n if (directory === null)\n {\n console.log(\"Error: directory not defined in this page's JS file.\");\n return;\n }\n else if (getDataObject === null)\n {\n console.log(\"Error: getDataObject() function not defined in this page's JS file.\")\n return;\n }\n var dataObject;\n try\n {\n dataObject = getDataObject();\n }\n catch(err)\n {\n alert(err);\n return;\n }\n // Determining request type (POST for Create, PUT for Update)\n let requestType = \"POST\";\n let fullDir = directory + \"/create\";\n if (id != -1)\n {\n dataObject.id = id;\n requestType = \"PUT\";\n fullDir = directory + \"/update\";\n }\n let payload = dataObject;\n let reloadPage = function() {location.reload()};\n apiRequest(requestType, fullDir, payload, reloadPage);\n}", "title": "" }, { "docid": "0eef0bed979a6892ebde018d2af2a226", "score": "0.590712", "text": "function submitData(val) {\n socket.emit(\"submission\", { value: val });\n }", "title": "" }, { "docid": "3a46540cd38a9c1ab42b3acbd40e55c3", "score": "0.59065586", "text": "submitToCallback () {\n\t\tconst error = this.validateFields();\n\n\t\tif(error.length > 0){\n\t\t\tthis.submitCallback(error, null);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.submitCallback(null, {\n\t\t\tname: this.getNameValue(),\n\t\t\trating: this.getRatingValue(),\n\t\t\tcomments: this.getCommentValue(),\n\t\t\tcreatedAt: new Date()\n\t\t})\n\t}", "title": "" }, { "docid": "b2e627679e5f3354d9cd9dc415ecd4c5", "score": "0.59047633", "text": "function handleClick() {\n zip = document.getElementById(\"zip\").value;\n feelings = document.getElementById(\"feelings\").value;\n url = baseURL + zip + apiKey;\n getApiData(url)\n .then(data => {\n getPost(\"http://localhost:3000\", {\n temp: data.main.temp,\n date: newDate,\n userResponse: feelings\n })\n })\n .then(() => {\n updateUI();\n })\n\n}", "title": "" }, { "docid": "7864f8337acda756dad2bee2da6cf172", "score": "0.5901787", "text": "function performAction(e){\n\n // Reading out the content\n const newZIP = document.getElementById('zip').value;\n const content = document.getElementById('feelings').value;\n countryCode = document.getElementById('country-select').value;\n\n //Fetch the API Data from Openweather\n getApiWeather(baseURL,newZIP,apiKEY)\n //return the object in JSON and continue to work with it\n //by sending the relevant data + content to the server\n .then(function(weatherData){\n // Combine Data and get it to the server on the '/add' route\n postData('/add', {date:newDate, city: weatherData.name, temp: weatherData.main.temp, content})\n // Update the index.html with the combined data received from the Server\n updateUI();\n })\n}", "title": "" }, { "docid": "cfab800da0230483c3dd3a0e6d86acdd", "score": "0.5897385", "text": "function submit(eve) {\n eve.preventDefault()\n \n if(!name) {\n alert(\"please provide a name\")\n return\n }\n\n onAdd({ name, body, email })\n \n setName(\"\")\n setBody(\"\")\n setEmail(\"\")\n }", "title": "" }, { "docid": "916dec24c5d5e47a964d80f676a28ec6", "score": "0.58796805", "text": "onSubmit(e) {\r\n e.preventDefault();\r\n\r\n const wtID = this.getCurrentWtId();\r\n const viewID = document.querySelector(this.VIEW_SELECT).value;\r\n\r\n // Special case of \"other apps\" where we send the user out of the dynamic tree apps page to a page at WikiTree.\r\n if (viewID == \"otherapps\") {\r\n if (wtID) {\r\n window.open(`https://www.wikitree.com/treewidget/${wtID}/77`);\r\n } else {\r\n $(this.WT_ID_TEXT).focus();\r\n }\r\n return;\r\n }\r\n\r\n const view = this.views[viewID];\r\n view.id = viewID;\r\n\r\n const viewLoader = document.querySelector(this.VIEW_LOADER);\r\n\r\n // This shouldn't happen, but perhaps we should display an error so new View builders can see what happened.\r\n if (view === undefined) return;\r\n\r\n viewLoader.classList.remove(\"hidden\");\r\n\r\n const basicFields = [\"Id\", \"Name\", \"FirstName\", \"LastName\", \"Derived.BirthName\", \"Derived.BirthNamePrivate\"];\r\n\r\n try {\r\n WikiTreeAPI.postToAPI({\r\n appId: \"ViewRegistry\",\r\n action: \"getPerson\",\r\n key: wtID,\r\n fields: basicFields.join(),\r\n }).then((data) => this.onPersonDataReceived(view, data));\r\n } finally {\r\n viewLoader.classList.add(\"hidden\");\r\n }\r\n }", "title": "" }, { "docid": "aa3f180e0e6199b4fe8198639ca297fd", "score": "0.58664685", "text": "function doThing(name) {\n \n var inputName = name.value;\n //gets the name from the paramater\n \n console.log(\"Hello \" + inputName);\n // dvResponse.innerHTML = \"Good!\";\n}", "title": "" }, { "docid": "6bd7cdb1b44288bc263df478aec1be28", "score": "0.5853151", "text": "onSubmit( event ) {\n\t\tevent.preventDefault();\n\n\t\t// Send name and price to onAdd.\n\t\tthis.props.onAdd( this.nameInput.value, this.priceInput.value );\n\n\t\t// Set input values empty after submit.\n\t\tthis.nameInput.value = '';\n\t\tthis.priceInput.value = '';\n\n\t\tlet data = {\n\t\t\tname: this.state.name,\n\t\t\tprice: this.state.price\n\t\t}\n\n\t\tfetch( '/api/new-product', {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {'Content-Type': 'application/json'},\n\t\t\tbody: JSON.stringify( data )\n\t\t}).then( function( response ) {\n\t\t\tif ( response.status >= 400 ) {\n\t\t\t throw new Error( 'Bad response from server.' );\n\t\t\t}\n\t\t\treturn response.json();\n\t\t}).then( function() {\n\t\t\tconsole.log( 'Product added succesfully.' )\n\t\t}).catch( function( err ) {\n\t\t\tconsole.log( err )\n\t\t});\n\t}", "title": "" }, { "docid": "ce7a6521624bba7bce0bfa76a2fab445", "score": "0.58478767", "text": "getData(name, id) {\n this.handleData(data);\n }", "title": "" }, { "docid": "3503f3f32cccf1dc1e4bf18bfffb9b10", "score": "0.58464944", "text": "function submitData(name, image) {\n let formData = {\n name: name,\n image: image,\n likes: 0\n };\n\n// obj submits formData object to db.json\n let configObj = {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n },\n body: JSON.stringify(formData)\n };\n\n// fetch request submits a post to toys index\n// and then add the new toy object to the page via addNewToy function\n fetch('http://localhost:3000/toys', configObj)\n .then(function(resp) {\n return resp.json();\n })\n .then(function(obj) {\n addNewToy(obj[id], obj[\"name\"],obj[\"image\"], obj[\"likes\"]);\n })\n }", "title": "" }, { "docid": "fe72674f18253accfba108f50124a0c7", "score": "0.5836654", "text": "function sendData(e) {\n e.preventDefault();\n\n const newHall = {\n hallid, name, type, maxSeats, maxTables, features, state, price\n }\n\n axios.put(`http://localhost:5000/halls/update/${id}`, newHall).then(() => {\n\n }).catch((e) => {\n alert(\"error\");\n })\n\n }", "title": "" }, { "docid": "498abbb9f445be6328ae91bf4cf4b6c1", "score": "0.58331096", "text": "handleSubmit(input) {\r\n var name = input.name;\r\n var desc = input.desc;\r\n var body = { \"name\" : name, \"desc\" : desc };\r\n body['option'] = 'ADD'\r\n\r\n this.toggleAddProj();\r\n fetch(\"http://localhost:9000/editProjects\", {\r\n headers: { 'Content-Type': 'application/json'},\r\n method: 'POST',\r\n body: JSON.stringify(body)\r\n }).then(res => res.json()).then(res => this.props.onAddProj(res));\r\n }", "title": "" }, { "docid": "f7c0c357688f4363d01d19d364ea303c", "score": "0.58223474", "text": "function doPost(e){\n var data = e.postData.contents;\n saveData(data);\n \n run(data);\n}", "title": "" }, { "docid": "b07e83d19ae082fe3e98d1ba39eb78c8", "score": "0.5816838", "text": "function onClick() {\n const userZip = document.getElementById('zip').value;\n const mood = document.getElementById('feelings').value;\n\n retrieveData(baseURL, userZip, apiKey)\n .then(function (userData) {\n const apiData = {date: newDate, temp: userData.main.temp, mood};\n console.log(apiData);\n postData('/add', {date: newDate, temp: userData.main.temp, mood})\n }).then(function (newData) {\n updateUI()\n })\n }", "title": "" }, { "docid": "7479456b9efda48e2ed25cfdb859cb82", "score": "0.5813425", "text": "function performAction(e){\n const newZipCode = document.getElementById('zip').value;\n const feelings = document.getElementById('feelings').value;\n \n getWeather(baseURL, newZipCode, apiKey)\n // New Syntax!\n .then(function (data){\n // Add data\n postData('/weather', {date:newDate, 'temperature': data.main.temp, 'place': data.name, textFeeling:feelings});\n })\n .then (function (data){\n updateUI();\n });\n}", "title": "" }, { "docid": "cff00256c9eab614f2773839f15f3855", "score": "0.5805989", "text": "function processNewName() {\n if (window.entryFollowup == null) {\n // Can happen because of cancelling with escape key after some data was entered\n console.log(\"Not processing new name due to previous cancellation\")\n return\n }\n let newName = elem(\"nameInput\").value\n if (newName.trim() == \"\") {\n // Cancel request\n console.log(\"Cancel detected as empty name\")\n endNameEntry()\n return\n }\n console.log(\"Processing new name\", newName)\n if (isInvalidActionName(newName)) {\n postNameError(\"Invalid name\")\n } else if (isConflictingActionName(newName)) {\n postNameError(\"Conflicting Name\")\n } else {\n console.log(\"Valid new name\", newName)\n window.entryFollowup(newName) // leave remainder to the individual followups\n }\n}", "title": "" }, { "docid": "c09e360d6a4d60ff8ef5677c34a58856", "score": "0.5801094", "text": "async function nameSearchResultRequest(action_data) {\n let axiosConfig = {\n headers: {\n 'Content-Type': 'application/json',\n \"Authorization\": \"Bearer \" + localStorage.getItem('token'),\n \"Accept\": \"application/json\"\n }\n };\n\n var data = {\n type: 'name',\n keywords: action_data.data.keywords,\n min: action_data.data.min,\n max: action_data.data.max,\n };\n\n let response = await axios.post('http://127.0.0.1:8000/api/search/items', data, axiosConfig).then((response) => {\n return response.data.items;\n });\n return response;\n}", "title": "" }, { "docid": "b9e7696433e9d8e623ded77453dabadf", "score": "0.58005446", "text": "async function Onsubmit (r) {\n let data2 = {\n eventId:id, \n responder:r,\n }\n //calling the method in the controller\n addEventAttendanceAttended(data2).then(response =>{\n if (response.code == 200) {\n //loading the table again\n getData(id);\n loadData()\n Config.setToast(\"Attended Member Added Successfully\");\n }\n })\n }", "title": "" }, { "docid": "9d79e45be586bb0670528e9e6e47c159", "score": "0.57980084", "text": "postFavorite(event) {\n event.preventDefault();\n //console.log(\"post route hit in quicksearch\");\n API.postFavorite(this.state.companyName)\n .then(res => {\n //console.log('quicksearch data', res);\n })\n .catch(err => console.log(err));\n }", "title": "" }, { "docid": "fb88fafc41f279cb67b1b3b5eefda9a8", "score": "0.57888466", "text": "function submitRequest() \r\n{\r\n\r\n// Get all Data\r\ngetAllElementValues();\r\n\r\n}", "title": "" }, { "docid": "0cdefa5e784a9e864a9d3fb9f16da4a0", "score": "0.5786214", "text": "function performAction(e) {\n// Blocking default click handling\n e.preventDefault();\n // get user zipcode & feelings\n const newZip = document.getElementById('zip').value;\n const newFeeling = document.getElementById('feelings').value;\n\n getWeatherdata(baseURL, newZip, apiKey)\n .then(function (data) {\n // add data to POST request\n postData('/addWeatherdata', { date: newDate, temp: data.main.temp, newFeeling})\n }).then(function (newData) {\n // call updateUI to update browser content\n updateUI()\n })\n}", "title": "" }, { "docid": "6a517cbb5e8c63309c9f7681d002d445", "score": "0.57844496", "text": "function submitData(e) {\r\n e.preventDefault();\r\n const input = this.getElementsByTagName(\"input\")[0].value;\r\n let desc = e.target.parentElement.childNodes[3];\r\n desc.style.display = \"block\";\r\n desc.textContent = input;\r\n console.log(desc.value);\r\n\r\n const form = e.target.parentElement.lastChild;\r\n hideElement(form);\r\n\r\n storeTaskInLocalStorage(input);\r\n}", "title": "" }, { "docid": "ea8eea9ceb55cd4e6c959d02e6abbf51", "score": "0.5779241", "text": "function submitHandler(event) {\n event.preventDefault();\n\n const enteredTitle = titleInputRef.current.value;\n const enteredImage = imageInputRef.current.value;\n const enteredAddress = addressInputRef.current.value;\n const enteredDescription = descriptionInputRef.current.value;\n // const enteredDiscount = discountInputRef.current.value;\n\n const meetupData = {\n cname: enteredTitle,\n cnumber: enteredImage,\n cproducts: enteredAddress,\n cquantity: enteredDescription,\n // discount: enteredDiscount,\n };\n\n props.onAddMeetup(meetupData);\n }", "title": "" }, { "docid": "0468bd1356ae69e6ebf693c9e2e67ad0", "score": "0.57634115", "text": "onClickSubmit(e) {\n\t\te.preventDefault();\n\t\tconst { modern, historic, scifi, fantasy, num } = this.context\n\n\t\tthis.setState({ loading: true });\n\t\tfetch(config.API_ENDPOINT + `/generator?num=${num}&modern=${modern}&historic=${historic}&scifi=${scifi}&fantasy=${fantasy}`,\n\t\t\t{\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'content-type': 'application/json',\n\t\t\t\t\t'Authorization': `Bearer ${config.API_KEY}`\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(res => {\n\t\t\t\tif (!res.ok) {\n\t\t\t\t\tthrow new Error(res.status)\n\t\t\t\t}\n\t\t\t\treturn res.json()\n\t\t\t})\n\t\t\t.then(res => {\n\t\t\t\tthis.context.onSubmit(res);\n\t\t\t\tthis.setState({ loading: false });\n\t\t\t})\n\t\t\t.catch(error => this.setState({ error }))\n\t}", "title": "" }, { "docid": "89676f1ed054078b0aa152de0853cb81", "score": "0.57599294", "text": "function performAction(e){\n getZipCode(baseURL, zipCode.value, apiKey)\n .then(function(data) {\n let feelings = document.querySelector('#feelings').value;\n postData('/add', {\n date: newDate,\n temp: data.main.temp,\n userResponse: feelings,\n }).then(\n updateUI()\n )\n })\n}", "title": "" }, { "docid": "c35a4f1474958da6126ec35c1e54ab82", "score": "0.57592654", "text": "setName(name) {\r\n \tthis.data.name = name;\r\n }", "title": "" }, { "docid": "7f6d797beb65066846a042fe2e08d8a8", "score": "0.57588893", "text": "function addFruit(){\n var urlPost = 'https://se3316-nhall27-lab3-nhall27.c9users.io/products/create';\n var data ={\n name: document.getElementById(\"nameInput\").value,\n quantity: document.getElementById(\"quantityInput\").value,\n price: document.getElementById(\"priceInput\").value,\n tax: document.getElementById(\"taxInput\").value\n \n };\n \n fetch(urlPost, {\n method: 'POST', // or 'PUT'\n body: JSON.stringify(data), // data can be `string` or {object}!\n headers:{\n 'Content-Type': 'application/json'\n }\n }).then(res => res)\n .then(response => console.log('Success:', JSON.stringify(response)))\n .catch(error => console.error('Error:', error)); \n \n outPutData();\n \n}", "title": "" }, { "docid": "6481d4b214b66f82f2a7244ee6f0491d", "score": "0.57462835", "text": "function submit(e) {\n e.preventDefault();\n ApiServices.postData({ title: data }).then((res) => {\n const mydata = [...todoList, res.data];\n setTodoList(mydata);\n });\n }", "title": "" }, { "docid": "3a52e9e448229f5c2459e489a19dd993", "score": "0.5745764", "text": "async function submitFunction(){\n event.preventDefault()\n \n displayEventInfo()\n}", "title": "" }, { "docid": "9de536dedcadc07ca69597448857fb8f", "score": "0.57436347", "text": "function userSubmit(){\n checkVersion();\n userName = document.getElementById(\"userInputName\").value;\n userRegion = document.getElementById(\"userInputRegion\").value;\n if (userName!==\"\"){\n getData(userName, userRegion);\n }\n else {console.log(\"Please provide a summoner name\")}\n}", "title": "" }, { "docid": "fe5ca29a941f9d67278fe5860905dfb0", "score": "0.5738899", "text": "function sendData()\n{\n\n\tvar xhr = createRequest();\n\tvar dataSource = 'dataprocess.php';\n\tif(xhr)\n\t{\n\t\t\tvar requestbody = \"name=\" +encodeURIComponent(name)\n\t\t\t + \"&phone=\" +encodeURIComponent(phone)\n\t\t\t + \"&unit=\" +encodeURIComponent(unit)\n\t\t\t + \"&streetnum=\" +encodeURIComponent(streetnum)\n\t\t\t + \"&street=\" +encodeURIComponent(street)\n\t\t\t + \"&suburb=\" +encodeURIComponent(suburb)\n\t\t\t + \"&date=\" +encodeURIComponent(date)\n\t\t\t + \"&time=\" +encodeURIComponent(time)\n\t\t\t + \"&dropoff=\" +encodeURIComponent(dropoff) ;\n\t\t\txhr.open(\"POST\", dataSource, true);\n\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\txhr.onreadystatechange = function()\n\t\t\t{\n\t\t\t\t if (xhr.readyState == 4 && xhr.status == 200)\n\t\t\t\t {\n\t\t\t\t\t // the server gave us a response.\n\t\t\t\t\t var response = xhr.response;\n var target = document.getElementById(\"target\");\n target.innerHTML = response;\n\t\t\t\t\t console.log(response);\n\n\t\t\t\t }\n\t\t\t};\n\t\t\txhr.send(requestbody);\n \t}\n}", "title": "" }, { "docid": "69d7ff66ce9ea74eeb0602fd903f5ee0", "score": "0.57324576", "text": "function sbmt2(inputdata, url, func_name) {\n //inputdata = {\"name\": name, \"email\": email, \"number\": message, \"_token\": token, \"token\": token}\n //url = {.{ route('form_submit') }.}\n var request = new XMLHttpRequest();\n request.open(\"POST\", url, true);\n request.setRequestHeader(\"Content-Type\", \"application/json\");\n request.onreadystatechange = function () {\n if (request.readyState === 4 && request.status === 200) {\n //var jsonData = JSON.parse(request.response);\n func_name(request.response);\n //sdf = request.response;\n //alert(\"Принято\");\n }\n };\n var data = JSON.stringify(inputdata);\n request.send(data);\n request.onload = function() {\n //console.log(request.responseText);\n }\n}", "title": "" }, { "docid": "36978b8df4a835fa9d8d985aa1c1194e", "score": "0.57320565", "text": "function predictButton(value) {\n document.getElementById('nameText').value = value.innerHTML;\n document.getElementById('nameText').name = value.id;\n document.getElementById(\"submit-event\").className = \"ready\";\n // document.getElementById(\"subFoot\").className = \"bg-dark-float-on\";\n closeNav();\n}", "title": "" }, { "docid": "1a3d63cc6606bdceac034e131f5673d6", "score": "0.5728629", "text": "handleSubmit(event) {\n event.preventDefault()\n console.log(this.state.username)\n this.getData(this.state.username)\n \n }", "title": "" }, { "docid": "08c493a6e96ded55a6da154ac0747b44", "score": "0.57217246", "text": "function core_postDefault(dataName,data,action,callback,silent = false,divContainer = \"\"){\n if(!core_notEmpty(dataName) || !core_notEmpty(action)){\n throw new Error(\"some parameters is not provided\");\n }\n core_postForm(core_URL+\"/data.php\",data+\"&\"+action+\"=\"+dataName,divContainer,callback,silent,true);\n}", "title": "" }, { "docid": "1a155af75f315a194af62a9dbd9e7e65", "score": "0.57188", "text": "function updateData(id)\n{\n submitData(id);\n}", "title": "" }, { "docid": "8bd73d389e041fbb562da1afa05f7f82", "score": "0.5711971", "text": "async function submitLogic(e) {\n e.preventDefault();\n search(searchQ.name, \"job\")\n }", "title": "" }, { "docid": "2ca1439f664187f43fff86131579162d", "score": "0.57074195", "text": "function submitActivity(activityData) {\n $.post(\"/api/calories\", activityData, function() {\n window.location.href = \"/calculator/?user_id=\" + activityData.UserId;\n });\n console.log(\"activtiy added\");\n }", "title": "" }, { "docid": "ab714ed207c5ec08ad48a9876881f4f8", "score": "0.5705765", "text": "submitModel() {\n \t\tvar modelInfo = {\n \t\t\tname: \"Dean\",\n \t\t\tdesc: \"hey\"\n \t\t}\n \t\tapi.postModel(modelInfo);\n \t}", "title": "" }, { "docid": "59b611525cc28a4d7eb7c800e80d85fe", "score": "0.5701196", "text": "function handleSubmit(e){\n \n if(title && tag && reward && timed){\n const payload = { id: `F-${new Date().getTime() % 1000}`, stage: \"todo\", \n title: title, tag: tag, reward: reward, timed: timed \n };\n sendTask(payload); setTag(\"\"); setTitle(\"\");setTimed(\"\");setReward(\"\");\n }\n e.preventDefault();\n }", "title": "" }, { "docid": "00ecdeaacf95967ab75ae7573b910f37", "score": "0.5694965", "text": "function submitQuestionnaire() {\n const questionnaireData = getQuestionnaireValues();\n console.log('weddingData from getVal', questionnaireData);\n addEvent(questionnaireData);\n}", "title": "" }, { "docid": "947587b44a81efebe11174fe64f1d48f", "score": "0.5692988", "text": "function submit(e) {\n e.preventDefault();\n const id = props.match.params.id;\n ApiServices.updateData(id, data, date).then((res) => {\n props.history.push(\"/\");\n });\n }", "title": "" }, { "docid": "bc7129e6ef4201dae64acf2498fc1c0b", "score": "0.56928456", "text": "handleSubmit(event) {\n event.preventDefault();\n const itemData = { item: this.state.item, user: this.state.user, quantity: this.state.quantity, notes: this.state.notes, category: this.state.category};\n this.addItemService.sendData(itemData, res => {\n this.props.history.push({\n pathname: '/'\n });\n this.props.callbackFromHomepage(\"List updated from AddItem\");\n });\n }", "title": "" }, { "docid": "15f23736cfe4970cc44e3bb3c312366b", "score": "0.5691033", "text": "handleSubmit(e){\r\n e.preventDefault();\r\n\r\n // Create new account with the passed name\r\n fetch(\"http://localhost:8080/accountCreation/createAccount?userName=\" + this.state.name, {\r\n method: \"POST\",\r\n headers: {\"Content-Type\" : \"application/JSON\"}\r\n }).then(response => {\r\n // Account creation successful\r\n if(response.ok){\r\n this.setState({message : \"Account creation successful!\"});\r\n }\r\n\r\n // Account already exists\r\n else{\r\n this.setState({message : \"The account for \" + this.state.name + \" already exists.\"});\r\n }\r\n });\r\n }", "title": "" }, { "docid": "2cea807de888311fd9ab9e4b73bd29a0", "score": "0.56887436", "text": "function handleSubmitForm() {\n $('#submit')\n .off('click')\n .on('click', function () {\n var nameField = $('#nameInput').val();\n\n switch (statusForm) {\n case CREATE:\n insertItem({name: nameField})\n break;\n case UPDATE:\n updateItem(id, {name: nameField})\n break;\n }\n\n renderView();\n\n form.modal('hide');\n })\n }", "title": "" }, { "docid": "7d2942fdaa79d84cb5540be98a08dd1b", "score": "0.5681609", "text": "submit() {\n this.data.authors = this.finalAuthors;\n //this.data.utility.setSuccess(FieldList.AUTHOR, true);\n //this.data.utility.setFlow(FieldList.ABSTRACT, true);\n this.controller.ok();\n }", "title": "" }, { "docid": "bd20705ee927d4012e04d3d147c68600", "score": "0.5681119", "text": "function sendData(e) {\n e.preventDefault();\n \n const newItem = {\n order_no,item_id,name,quantity, unitPrice\n }\n const newItem2 = {\n order_no,total_amount,discount,customer_nic\n }\n \n axios.post(\" http://localhost:5000/orderItems/add\", newItem).then(() => {\n \n window.location = \"/viewbarorders\"\n \n }).catch((e) => {\n alert(\"error\");\n })\n axios.post(\" http://localhost:5000/barOrders/add\", newItem2).then(() => {\n \n window.location = \"/viewfinalorder\"\n \n }).catch((e) => {\n alert(\"error\");\n })\n \n }", "title": "" }, { "docid": "2989279bb3c66f040d0e1dc8e1665fdc", "score": "0.5680415", "text": "function submit(e) {\n document.getElementById('generate').addEventListener('click', submit);\n\n let srollToContent = document.getElementById('content');\n srollToContent.scrollIntoView({behavior: 'smooth', block: 'end'});\n console.log('Jumped to most recent entry.');\n\n let feelings = document.getElementById('feelings').value;\n let zip = document.getElementById('zip').value;\n\n // API Call \n getWeather(zip + '&units=imperial')\n .then(function(data) {\n // Add data\n console.log('API returned:', data);\n\n let toSave = {};\n let d = new Date();\n var months = ['Jan', 'Feb', 'March', 'April', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];\n toSave['date'] = months[d.getMonth()] + '.' + d.getDate() + '.' + d.getFullYear();\n toSave['temp'] = data.main.temp;\n toSave['feelings'] = feelings;\n\n postData(toSave).then(function(retrieveSavedData) {\n console.log('Returned from /all: ', retrieveSavedData);\n updateUI(retrieveSavedData);\n });\n });\n}", "title": "" }, { "docid": "36c3560f4da14d12c8a0c7865bb0ba3c", "score": "0.56775194", "text": "handleClick() {\n console.log(\"heres the info:\", this.state.address, this.state.code);\n axios.post(\"http://localhost:5000/2fa\", {\n data: {\n address: this.state.address,\n code: this.state.code\n }\n });\n }", "title": "" }, { "docid": "7a7d7b0f3001497e6d56388568cf9ad8", "score": "0.56758463", "text": "function generateResult(e) {\n const feeling = document.getElementById(\"feelings\").value;\n const zipInserted = document.getElementById(\"zip\").value;\n getWeatherData(apiBaseUrl, apiKey, zipInserted)\n .then(function(data){\n console.log(\"Posting\");\n postData(\"/addWeather\", \n {\n temp: data.main.temp,\n zip: zipInserted,\n city: data.name,\n weather: data.weather[0].description,\n icon: data.weather[0].icon,\n date: newDate, \n feeling: feeling\n });\n })\n .then(()=>updateUI()\n )\n}", "title": "" }, { "docid": "823bf6626385ad4ffb781ce88af38dce", "score": "0.567159", "text": "function performaction(e){\n const zip_code = document.getElementById('zip').value;\n const feeling = document.getElementById('feelings').value;\n // console.log(\"stop tickling me\", \"when clicking generate\");\n get_temp(base_url,zip_code,api_key)\n .then(function(data){\n let d1 = new Date(data.dt * 1000)\n let d1_str = d1.getFullYear() + '-' + (d1.getMonth()+1) + '-' + d1.getDate();\n\n postdata('/add',{temperature:data.main.temp, feel_like:data.main.feels_like, usr_inp: feeling});\n dynamicUI('/all');\n })\n}", "title": "" }, { "docid": "f11d6d56c1c22754c9418a6cd3ac7f0a", "score": "0.56683797", "text": "function onEvent(name, event){ \n console.log(name, JSON.stringify(event, null, 2));\n console.log('*++++++++++++++++++++'+name+'****************************')\n if(\"Data:\"==name)\n fnSuccess(event);\n }", "title": "" }, { "docid": "678c499591fd92f1775a1946151d1569", "score": "0.5668033", "text": "function onSubmitTextMessageAccepted(value){\r\n fetch('/send-text-userAccepted',{\r\n method: 'post',\r\n headers: {\r\n 'Content-Type':'application/json',\r\n 'Accept':'application/json'\r\n },\r\n body: JSON.stringify({\r\n serviceProviderName: value.serviceProviderName,\r\n phoneNumber: value.phoneNumber,\r\n })\r\n }).then(res => res.json({\r\n Message: 'Successfully Send message to the User'\r\n })) \r\n }", "title": "" }, { "docid": "4a53aa5c2a915084247e451ef525a4f3", "score": "0.5657674", "text": "function formSubmit(event) {\n var date = formatDate()\n var airline = document.getElementById(\"Airline\").value\n var tail = document.getElementById(\"Tail\").value\n var flightId = document.getElementById(\"FlightId\").value\n var all = \".*\"\n var InfoForEngNotes = CreateQueryInfo(url,airline,date,tail,\"Notes\",flightId)\n var dataEntry = document.getElementById(\"dataEntry\").value\n var Classification = document.getElementById(\"Classification\").value\n\n var apiUrl = \"/EngNotesSet\"\n if (event.target.id === \"formSurveySubmit\"){\n\t console.log(\"formSurveySubmit\")\n\t apiUrl = \"/SurveysNotesSet\"\n\t Classification = document.getElementById(\"SurveyClassification\").value\n\t dataEntry = document.getElementById(\"SurveyNotes\").value\n }\n\n var url = apiUrl+'?Airline='+InfoForEngNotes.airline+'&Parser='+InfoForEngNotes.parser+\n '&TailId='+InfoForEngNotes.tail+'&FlightId='+InfoForEngNotes.flightId+'&DateYYYYMMDD='+InfoForEngNotes.date+'&dataEntry='+dataEntry+'&Classification='+Classification\n console.log(\"SUBMIT TO\", url)\n\n var request = new XMLHttpRequest();\n request.open('POST', url, true);\n request.onload = function() { // request successful\n // we can use server response to our request now\n console.log(request.responseText);\n };\n\n request.onerror = function() {\n // request failed\n };\n\n request.send(new FormData(event.target)); // create FormData from form that triggered event\n event.preventDefault();\n}", "title": "" }, { "docid": "f031ca7d9ec7820461f95aaab86c3b53", "score": "0.5655741", "text": "function OnGenrateAction(e) {\n const zipcode = document.getElementById('zip').value;\n const userContent = document.getElementById('feelings').value;\n if ((zipcode.length < 5) || (isNaN(zipcode))) { alert(\"Zip Code must be Number only && Not less than 5 numbers\") } else {\n\n getWeather(baseURL, zipcode, apiKey)\n\n .then(function (data) {\n console.log('before post', data);\n\n postData('http://localhost:3000/postdata',\n { name: data.name, date: newDate, description: data.weather[0].description, temp: data.main.temp, userContent: userContent });\n console.log('afterpost', data);\n })\n .then(function () {\n updateUI()\n }\n );\n\n }\n}", "title": "" }, { "docid": "7a47bdbb620aabcce032b7c75e21cabf", "score": "0.5654155", "text": "static submitWishList(){\n event.preventDefault()\n \n const configObj = {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n \"Accept\": \"application/json\"\n },\n body: JSON.stringify({\n name: wishListInput.value\n })\n }\n \n fetch(wishListUrl, configObj)\n .then(res => res.json())\n .then(data => {\n let newWishList = new WishList(data)\n newWishList.renderWishList()\n })\n wishListForm.reset() \n }", "title": "" }, { "docid": "4560e936c6d1dce652a97a4db710fbd0", "score": "0.56483275", "text": "handleSubmitUpdatedName() {\n if (this.state.updatedName.length !== 0) {\n this.props.updateName(this.state.updatedName);\n this.handlePost(this.state.updatedName);\n }\n }", "title": "" }, { "docid": "4233662160a41c856bff56fba56e386c", "score": "0.5643923", "text": "async function handleSubmit(e) {\n await $.ajax({\n url: \"/api/newProperty\",\n method: \"POST\",\n data: {\n user_id: user_id,\n address: address,\n city: city,\n state: state,\n zip: zip,\n purchasePrice: purchasePrice,\n expenses: expenses,\n rent: rent,\n },\n }).then((res) => {\n console.log(res);\n });\n }", "title": "" }, { "docid": "567887af368720c36a5890da004183a7", "score": "0.5641206", "text": "function processResult(e) {\n // console.log(\"Submit Button clicked\");\n\n const zip = document.getElementById(\"zip\").value;\n const userResponse = document.getElementById(\"feelings\").value;\n\n getWeatherData(baseString, zip, key, userResponse).then(function(data) {\n updateWeatherData(data);\n });\n}", "title": "" }, { "docid": "36e109cb81b1614f8bcc5a43285896e2", "score": "0.56323385", "text": "function take_on_submit() {\n const form = document.getElementById('ad_itm_form');\n const ad_model = document.getElementById('ad_mdl');\n\n const isu_list = process_data(form);\n\n display_model(ad_model, isu_list, sendData);\n}", "title": "" }, { "docid": "011fdcacfaf019dc0f57bea3e6390130", "score": "0.5629641", "text": "function enterData(guestCreateData) {\n $.post(\"/api/guests\", {\n firstName: guestCreateData.firstName,\n lastName: guestCreateData.lastName,\n email: guestCreateData.email,\n phone: guestCreateData.phone,\n // event foreign key hard-code\n eventInfoId: guestCreateData.eventInfoId\n })\n .then(() => {\n console.log(guestCreateData);\n })\n .catch(err => {\n console.log(err);\n });\n }", "title": "" }, { "docid": "a7ee5e1bdfc51478ccfaa27e38cb8155", "score": "0.5629175", "text": "function checkName() {\r\n name = document.getElementById('name').value;\r\n fetch('/checkName', {\r\n method: 'POST',\r\n body: JSON.stringify({name}),\r\n headers: {\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json'\r\n }\r\n })\r\n .then(function(response) {\r\n if(response.ok) {\r\n console.log('Name taken.');\r\n return;\r\n }\r\n throw new Error('Request failed.');\r\n })\r\n .catch(function(error) {\r\n console.log(error);\r\n });\r\n}", "title": "" }, { "docid": "85ebc313a4ab757899b24e0274cf1252", "score": "0.561775", "text": "formSubmit(e) {\n var submit = wxRequest.putRequestWithToken(Api.getCustomer(getApp().globalData.userInfo.id), { [this.data.activeNav]: e.detail.value }, getApp().globalData.token)\n submit.then(\n response => {\n this.getData()\n wx.showToast({\n title: '已保存信息',\n icon: 'succes',\n duration: 1000,\n mask: true\n })\n })\n }", "title": "" }, { "docid": "ec31c42660603a369a69a31207ad91f5", "score": "0.561633", "text": "function createFormHandler(e) {\n e.preventDefault()\n const nameInput = document.querySelector('#input-name').value\n const descriptionInput = document.querySelector('#input-description').value\n const websiteInput = document.querySelector('#input-website').value\n const streetAddressInput = document.querySelector('#input-street_address').value\n const cityInput = document.querySelector('#input-city').value\n const stateInput = document.querySelector('#input-state').value\n const zipcodeInput = document.querySelector('#input-zipcode').value\n const categoryId = parseInt(document.querySelector('#categories').value)\n\n postFetch(nameInput, descriptionInput, websiteInput, streetAddressInput, cityInput, stateInput, zipcodeInput, categoryId)\n }", "title": "" }, { "docid": "1b1b5055679e9a98187920bf4402f42a", "score": "0.56129855", "text": "onSubmit(text){\n console.log(\"OrderID\", this.props.volunteer.orderId);\n console.log(\"onSUBMIT PROPS:\", this.props)\n this.props.postRequest(\n this.props.orderId,\n text,\n this.props.volunteer.order_user,\n this.props.volunteer.picture,\n this.props.volunteer.time,\n this.props.volunteer.location\n );\n this.setState({text:''});\n this.props.getDataForRendering();\n this.setState({requests:this.props.volunteer.requests})\n }", "title": "" }, { "docid": "bbc3838730f68f7fbc89a70bbbba70d0", "score": "0.56127787", "text": "generateRandomName(){\n //3.preventDefault();\n // call the query Random Name API\n names.queryRandomName()\n .then(data =>{\n const person = data.result;\n // call the showRandomPersonUI\n names.showRandomPersonUI(person);\n console.log(person);\n })\n .catch(data=>{console.log(data)});\n }", "title": "" }, { "docid": "b26253cae2a22f8daf93ace4b60bcd90", "score": "0.56127477", "text": "function updateitemaction (namedata,phonenodata) {\n return { \n type : \"UPDATE\",\n payload : {\n name: namedata,\n phoneno : phonenodata\n }\n } \n}", "title": "" } ]
18a2c9839d92a49b3f588b335b1f06d4
this function returns pokemonList array
[ { "docid": "3f762d3f41598355f1bbd52cc5a2fe4e", "score": "0.79618347", "text": "function getAll() {\n return pokemonList;\n }", "title": "" } ]
[ { "docid": "82fd8ccf99be3f91996e6110b6f43d36", "score": "0.8782653", "text": "function getPokemonArray() {\n return pokemonList;\n }", "title": "" }, { "docid": "892ad08b62658695661e895273b5a725", "score": "0.7985834", "text": "function getAll() {\n return pokemonList\n }", "title": "" }, { "docid": "6d5503717d5a2b007cf4fe4cc7f8dbda", "score": "0.7974152", "text": "function getAll(){\n return pokemonList;\n }", "title": "" }, { "docid": "83455638518f82d6a43150d95e6181af", "score": "0.7947977", "text": "function getAll() {\n return pokemonList;\n }", "title": "" }, { "docid": "0ba0ce5ec3eeb98e4de9e9e6c1a67bce", "score": "0.78762835", "text": "function getAll() {\n return pokemonList;\n }", "title": "" }, { "docid": "b8b6c81cdcff963d71b234479cf0856d", "score": "0.7876121", "text": "function getAll() {\n\t\treturn pokemonArray;\n\t}", "title": "" }, { "docid": "8d8532117b8a3438750e731ae9b29cdd", "score": "0.72927135", "text": "function getListOfAllPokemon() {\r\n axios.get('https://pokeapi.co/api/v2/pokemon/?offset=0&limit=946')\r\n .then((res) => {\r\n\r\n const thePokemon = res.data.results;\r\n\r\n for(let i = 0; i <= thePokemon.length - 1; i++) {\r\n pokemonArray.push(thePokemon[i].name);\r\n }\r\n})\r\n.catch((err) => {\r\n console.log(err);\r\n})\r\n}", "title": "" }, { "docid": "eb1630ad9801710ced66de55c362df03", "score": "0.71727884", "text": "async function getAllPokemonNames() {\n const res = await axios.get(API_CORE + \"pokemon?limit=2000\");\n\n let pokeList = res.data.results.map((poke) => {\n let id = poke.url.split(\"/\");\n id = id[id.length - 2];\n return { name: poke.name, id: id };\n });\n\n return pokeList;\n}", "title": "" }, { "docid": "65e85216b3497584205b1b8de8ecb4e5", "score": "0.6830808", "text": "static async getAllPokemons() {\n\n const pokemons = await pokemonURL.get('/?limit=950')\n .catch((err) => {\n throw new apiError(err);\n });\n return pokemons;\n }", "title": "" }, { "docid": "2a1275b354bb917acb61d8bf3bbdf248", "score": "0.6809811", "text": "loadPokemonList() {\n const setState = this.setState.bind(this);\n const axios = require('axios');\n\n // Pokemon objects put into this array\n var array = [];\n\n // Axios request for current page number\n axios.get(\"https://intern-pokedex.myriadapps.com/api/v1/pokemon?page=\" + this.state.page)\n .then(function (response) {\n // convert from JSON response to a usable array\n // for loop iterates through each pokemon in response\n for (var i = 0; i < response.data.data.length; i++) {\n var pokemon = response.data.data[i];\n var types = [];\n\n // get pokemon's types\n for (var index in pokemon.types) {\n types.push(pokemon.types[index]);\n }\n\n // push all attributes and types to array\n array.push([pokemon.id, pokemon.image, pokemon.name, types]);\n }\n\n setState({ data: array });\n });\n }", "title": "" }, { "docid": "82085d8727c08d1bb0f8d456fc43ed09", "score": "0.6596784", "text": "function pokemon() {\n return { \"name\": \"national\", \"region\": null, \"version_groups\": [], \"is_main_series\": true, \"descriptions\": [{ \"description\": \"Pok\\u00e9dex National complet\", \"language\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/language\\/5\\/\", \"name\": \"fr\" } }, { \"description\": \"Komplette Nationale Dex\", \"language\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/language\\/6\\/\", \"name\": \"de\" } }, { \"description\": \"Entire National dex\", \"language\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/language\\/9\\/\", \"name\": \"en\" } }], \"pokemon_entries\": [{ \"entry_number\": 1, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/1\\/\", \"name\": \"bulbasaur\" } }, { \"entry_number\": 2, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/2\\/\", \"name\": \"ivysaur\" } }, { \"entry_number\": 3, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/3\\/\", \"name\": \"venusaur\" } }, { \"entry_number\": 4, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/4\\/\", \"name\": \"charmander\" } }, { \"entry_number\": 5, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/5\\/\", \"name\": \"charmeleon\" } }, { \"entry_number\": 6, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/6\\/\", \"name\": \"charizard\" } }, { \"entry_number\": 7, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/7\\/\", \"name\": \"squirtle\" } }, { \"entry_number\": 8, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/8\\/\", \"name\": \"wartortle\" } }, { \"entry_number\": 9, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/9\\/\", \"name\": \"blastoise\" } }, { \"entry_number\": 10, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/10\\/\", \"name\": \"caterpie\" } }, { \"entry_number\": 11, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/11\\/\", \"name\": \"metapod\" } }, { \"entry_number\": 12, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/12\\/\", \"name\": \"butterfree\" } }, { \"entry_number\": 13, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/13\\/\", \"name\": \"weedle\" } }, { \"entry_number\": 14, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/14\\/\", \"name\": \"kakuna\" } }, { \"entry_number\": 15, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/15\\/\", \"name\": \"beedrill\" } }, { \"entry_number\": 16, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/16\\/\", \"name\": \"pidgey\" } }, { \"entry_number\": 17, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/17\\/\", \"name\": \"pidgeotto\" } }, { \"entry_number\": 18, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/18\\/\", \"name\": \"pidgeot\" } }, { \"entry_number\": 19, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/19\\/\", \"name\": \"rattata\" } }, { \"entry_number\": 20, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/20\\/\", \"name\": \"raticate\" } }, { \"entry_number\": 21, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/21\\/\", \"name\": \"spearow\" } }, { \"entry_number\": 22, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/22\\/\", \"name\": \"fearow\" } }, { \"entry_number\": 23, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/23\\/\", \"name\": \"ekans\" } }, { \"entry_number\": 24, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/24\\/\", \"name\": \"arbok\" } }, { \"entry_number\": 25, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/25\\/\", \"name\": \"pikachu\" } }, { \"entry_number\": 26, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/26\\/\", \"name\": \"raichu\" } }, { \"entry_number\": 27, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/27\\/\", \"name\": \"sandshrew\" } }, { \"entry_number\": 28, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/28\\/\", \"name\": \"sandslash\" } }, { \"entry_number\": 29, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/29\\/\", \"name\": \"nidoran-f\" } }, { \"entry_number\": 30, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/30\\/\", \"name\": \"nidorina\" } }, { \"entry_number\": 31, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/31\\/\", \"name\": \"nidoqueen\" } }, { \"entry_number\": 32, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/32\\/\", \"name\": \"nidoran-m\" } }, { \"entry_number\": 33, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/33\\/\", \"name\": \"nidorino\" } }, { \"entry_number\": 34, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/34\\/\", \"name\": \"nidoking\" } }, { \"entry_number\": 35, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/35\\/\", \"name\": \"clefairy\" } }, { \"entry_number\": 36, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/36\\/\", \"name\": \"clefable\" } }, { \"entry_number\": 37, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/37\\/\", \"name\": \"vulpix\" } }, { \"entry_number\": 38, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/38\\/\", \"name\": \"ninetales\" } }, { \"entry_number\": 39, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/39\\/\", \"name\": \"jigglypuff\" } }, { \"entry_number\": 40, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/40\\/\", \"name\": \"wigglytuff\" } }, { \"entry_number\": 41, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/41\\/\", \"name\": \"zubat\" } }, { \"entry_number\": 42, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/42\\/\", \"name\": \"golbat\" } }, { \"entry_number\": 43, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/43\\/\", \"name\": \"oddish\" } }, { \"entry_number\": 44, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/44\\/\", \"name\": \"gloom\" } }, { \"entry_number\": 45, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/45\\/\", \"name\": \"vileplume\" } }, { \"entry_number\": 46, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/46\\/\", \"name\": \"paras\" } }, { \"entry_number\": 47, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/47\\/\", \"name\": \"parasect\" } }, { \"entry_number\": 48, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/48\\/\", \"name\": \"venonat\" } }, { \"entry_number\": 49, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/49\\/\", \"name\": \"venomoth\" } }, { \"entry_number\": 50, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/50\\/\", \"name\": \"diglett\" } }, { \"entry_number\": 51, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/51\\/\", \"name\": \"dugtrio\" } }, { \"entry_number\": 52, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/52\\/\", \"name\": \"meowth\" } }, { \"entry_number\": 53, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/53\\/\", \"name\": \"persian\" } }, { \"entry_number\": 54, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/54\\/\", \"name\": \"psyduck\" } }, { \"entry_number\": 55, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/55\\/\", \"name\": \"golduck\" } }, { \"entry_number\": 56, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/56\\/\", \"name\": \"mankey\" } }, { \"entry_number\": 57, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/57\\/\", \"name\": \"primeape\" } }, { \"entry_number\": 58, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/58\\/\", \"name\": \"growlithe\" } }, { \"entry_number\": 59, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/59\\/\", \"name\": \"arcanine\" } }, { \"entry_number\": 60, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/60\\/\", \"name\": \"poliwag\" } }, { \"entry_number\": 61, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/61\\/\", \"name\": \"poliwhirl\" } }, { \"entry_number\": 62, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/62\\/\", \"name\": \"poliwrath\" } }, { \"entry_number\": 63, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/63\\/\", \"name\": \"abra\" } }, { \"entry_number\": 64, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/64\\/\", \"name\": \"kadabra\" } }, { \"entry_number\": 65, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/65\\/\", \"name\": \"alakazam\" } }, { \"entry_number\": 66, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/66\\/\", \"name\": \"machop\" } }, { \"entry_number\": 67, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/67\\/\", \"name\": \"machoke\" } }, { \"entry_number\": 68, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/68\\/\", \"name\": \"machamp\" } }, { \"entry_number\": 69, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/69\\/\", \"name\": \"bellsprout\" } }, { \"entry_number\": 70, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/70\\/\", \"name\": \"weepinbell\" } }, { \"entry_number\": 71, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/71\\/\", \"name\": \"victreebel\" } }, { \"entry_number\": 72, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/72\\/\", \"name\": \"tentacool\" } }, { \"entry_number\": 73, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/73\\/\", \"name\": \"tentacruel\" } }, { \"entry_number\": 74, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/74\\/\", \"name\": \"geodude\" } }, { \"entry_number\": 75, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/75\\/\", \"name\": \"graveler\" } }, { \"entry_number\": 76, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/76\\/\", \"name\": \"golem\" } }, { \"entry_number\": 77, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/77\\/\", \"name\": \"ponyta\" } }, { \"entry_number\": 78, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/78\\/\", \"name\": \"rapidash\" } }, { \"entry_number\": 79, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/79\\/\", \"name\": \"slowpoke\" } }, { \"entry_number\": 80, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/80\\/\", \"name\": \"slowbro\" } }, { \"entry_number\": 81, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/81\\/\", \"name\": \"magnemite\" } }, { \"entry_number\": 82, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/82\\/\", \"name\": \"magneton\" } }, { \"entry_number\": 83, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/83\\/\", \"name\": \"farfetchd\" } }, { \"entry_number\": 84, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/84\\/\", \"name\": \"doduo\" } }, { \"entry_number\": 85, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/85\\/\", \"name\": \"dodrio\" } }, { \"entry_number\": 86, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/86\\/\", \"name\": \"seel\" } }, { \"entry_number\": 87, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/87\\/\", \"name\": \"dewgong\" } }, { \"entry_number\": 88, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/88\\/\", \"name\": \"grimer\" } }, { \"entry_number\": 89, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/89\\/\", \"name\": \"muk\" } }, { \"entry_number\": 90, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/90\\/\", \"name\": \"shellder\" } }, { \"entry_number\": 91, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/91\\/\", \"name\": \"cloyster\" } }, { \"entry_number\": 92, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/92\\/\", \"name\": \"gastly\" } }, { \"entry_number\": 93, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/93\\/\", \"name\": \"haunter\" } }, { \"entry_number\": 94, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/94\\/\", \"name\": \"gengar\" } }, { \"entry_number\": 95, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/95\\/\", \"name\": \"onix\" } }, { \"entry_number\": 96, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/96\\/\", \"name\": \"drowzee\" } }, { \"entry_number\": 97, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/97\\/\", \"name\": \"hypno\" } }, { \"entry_number\": 98, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/98\\/\", \"name\": \"krabby\" } }, { \"entry_number\": 99, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/99\\/\", \"name\": \"kingler\" } }, { \"entry_number\": 100, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/100\\/\", \"name\": \"voltorb\" } }, { \"entry_number\": 101, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/101\\/\", \"name\": \"electrode\" } }, { \"entry_number\": 102, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/102\\/\", \"name\": \"exeggcute\" } }, { \"entry_number\": 103, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/103\\/\", \"name\": \"exeggutor\" } }, { \"entry_number\": 104, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/104\\/\", \"name\": \"cubone\" } }, { \"entry_number\": 105, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/105\\/\", \"name\": \"marowak\" } }, { \"entry_number\": 106, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/106\\/\", \"name\": \"hitmonlee\" } }, { \"entry_number\": 107, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/107\\/\", \"name\": \"hitmonchan\" } }, { \"entry_number\": 108, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/108\\/\", \"name\": \"lickitung\" } }, { \"entry_number\": 109, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/109\\/\", \"name\": \"koffing\" } }, { \"entry_number\": 110, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/110\\/\", \"name\": \"weezing\" } }, { \"entry_number\": 111, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/111\\/\", \"name\": \"rhyhorn\" } }, { \"entry_number\": 112, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/112\\/\", \"name\": \"rhydon\" } }, { \"entry_number\": 113, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/113\\/\", \"name\": \"chansey\" } }, { \"entry_number\": 114, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/114\\/\", \"name\": \"tangela\" } }, { \"entry_number\": 115, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/115\\/\", \"name\": \"kangaskhan\" } }, { \"entry_number\": 116, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/116\\/\", \"name\": \"horsea\" } }, { \"entry_number\": 117, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/117\\/\", \"name\": \"seadra\" } }, { \"entry_number\": 118, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/118\\/\", \"name\": \"goldeen\" } }, { \"entry_number\": 119, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/119\\/\", \"name\": \"seaking\" } }, { \"entry_number\": 120, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/120\\/\", \"name\": \"staryu\" } }, { \"entry_number\": 121, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/121\\/\", \"name\": \"starmie\" } }, { \"entry_number\": 122, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/122\\/\", \"name\": \"mr-mime\" } }, { \"entry_number\": 123, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/123\\/\", \"name\": \"scyther\" } }, { \"entry_number\": 124, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/124\\/\", \"name\": \"jynx\" } }, { \"entry_number\": 125, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/125\\/\", \"name\": \"electabuzz\" } }, { \"entry_number\": 126, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/126\\/\", \"name\": \"magmar\" } }, { \"entry_number\": 127, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/127\\/\", \"name\": \"pinsir\" } }, { \"entry_number\": 128, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/128\\/\", \"name\": \"tauros\" } }, { \"entry_number\": 129, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/129\\/\", \"name\": \"magikarp\" } }, { \"entry_number\": 130, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/130\\/\", \"name\": \"gyarados\" } }, { \"entry_number\": 131, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/131\\/\", \"name\": \"lapras\" } }, { \"entry_number\": 132, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/132\\/\", \"name\": \"ditto\" } }, { \"entry_number\": 133, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/133\\/\", \"name\": \"eevee\" } }, { \"entry_number\": 134, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/134\\/\", \"name\": \"vaporeon\" } }, { \"entry_number\": 135, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/135\\/\", \"name\": \"jolteon\" } }, { \"entry_number\": 136, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/136\\/\", \"name\": \"flareon\" } }, { \"entry_number\": 137, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/137\\/\", \"name\": \"porygon\" } }, { \"entry_number\": 138, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/138\\/\", \"name\": \"omanyte\" } }, { \"entry_number\": 139, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/139\\/\", \"name\": \"omastar\" } }, { \"entry_number\": 140, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/140\\/\", \"name\": \"kabuto\" } }, { \"entry_number\": 141, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/141\\/\", \"name\": \"kabutops\" } }, { \"entry_number\": 142, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/142\\/\", \"name\": \"aerodactyl\" } }, { \"entry_number\": 143, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/143\\/\", \"name\": \"snorlax\" } }, { \"entry_number\": 144, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/144\\/\", \"name\": \"articuno\" } }, { \"entry_number\": 145, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/145\\/\", \"name\": \"zapdos\" } }, { \"entry_number\": 146, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/146\\/\", \"name\": \"moltres\" } }, { \"entry_number\": 147, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/147\\/\", \"name\": \"dratini\" } }, { \"entry_number\": 148, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/148\\/\", \"name\": \"dragonair\" } }, { \"entry_number\": 149, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/149\\/\", \"name\": \"dragonite\" } }, { \"entry_number\": 150, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/150\\/\", \"name\": \"mewtwo\" } }, { \"entry_number\": 151, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/151\\/\", \"name\": \"mew\" } }, { \"entry_number\": 152, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/152\\/\", \"name\": \"chikorita\" } }, { \"entry_number\": 153, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/153\\/\", \"name\": \"bayleef\" } }, { \"entry_number\": 154, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/154\\/\", \"name\": \"meganium\" } }, { \"entry_number\": 155, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/155\\/\", \"name\": \"cyndaquil\" } }, { \"entry_number\": 156, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/156\\/\", \"name\": \"quilava\" } }, { \"entry_number\": 157, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/157\\/\", \"name\": \"typhlosion\" } }, { \"entry_number\": 158, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/158\\/\", \"name\": \"totodile\" } }, { \"entry_number\": 159, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/159\\/\", \"name\": \"croconaw\" } }, { \"entry_number\": 160, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/160\\/\", \"name\": \"feraligatr\" } }, { \"entry_number\": 161, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/161\\/\", \"name\": \"sentret\" } }, { \"entry_number\": 162, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/162\\/\", \"name\": \"furret\" } }, { \"entry_number\": 163, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/163\\/\", \"name\": \"hoothoot\" } }, { \"entry_number\": 164, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/164\\/\", \"name\": \"noctowl\" } }, { \"entry_number\": 165, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/165\\/\", \"name\": \"ledyba\" } }, { \"entry_number\": 166, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/166\\/\", \"name\": \"ledian\" } }, { \"entry_number\": 167, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/167\\/\", \"name\": \"spinarak\" } }, { \"entry_number\": 168, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/168\\/\", \"name\": \"ariados\" } }, { \"entry_number\": 169, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/169\\/\", \"name\": \"crobat\" } }, { \"entry_number\": 170, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/170\\/\", \"name\": \"chinchou\" } }, { \"entry_number\": 171, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/171\\/\", \"name\": \"lanturn\" } }, { \"entry_number\": 172, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/172\\/\", \"name\": \"pichu\" } }, { \"entry_number\": 173, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/173\\/\", \"name\": \"cleffa\" } }, { \"entry_number\": 174, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/174\\/\", \"name\": \"igglybuff\" } }, { \"entry_number\": 175, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/175\\/\", \"name\": \"togepi\" } }, { \"entry_number\": 176, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/176\\/\", \"name\": \"togetic\" } }, { \"entry_number\": 177, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/177\\/\", \"name\": \"natu\" } }, { \"entry_number\": 178, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/178\\/\", \"name\": \"xatu\" } }, { \"entry_number\": 179, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/179\\/\", \"name\": \"mareep\" } }, { \"entry_number\": 180, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/180\\/\", \"name\": \"flaaffy\" } }, { \"entry_number\": 181, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/181\\/\", \"name\": \"ampharos\" } }, { \"entry_number\": 182, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/182\\/\", \"name\": \"bellossom\" } }, { \"entry_number\": 183, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/183\\/\", \"name\": \"marill\" } }, { \"entry_number\": 184, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/184\\/\", \"name\": \"azumarill\" } }, { \"entry_number\": 185, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/185\\/\", \"name\": \"sudowoodo\" } }, { \"entry_number\": 186, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/186\\/\", \"name\": \"politoed\" } }, { \"entry_number\": 187, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/187\\/\", \"name\": \"hoppip\" } }, { \"entry_number\": 188, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/188\\/\", \"name\": \"skiploom\" } }, { \"entry_number\": 189, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/189\\/\", \"name\": \"jumpluff\" } }, { \"entry_number\": 190, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/190\\/\", \"name\": \"aipom\" } }, { \"entry_number\": 191, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/191\\/\", \"name\": \"sunkern\" } }, { \"entry_number\": 192, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/192\\/\", \"name\": \"sunflora\" } }, { \"entry_number\": 193, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/193\\/\", \"name\": \"yanma\" } }, { \"entry_number\": 194, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/194\\/\", \"name\": \"wooper\" } }, { \"entry_number\": 195, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/195\\/\", \"name\": \"quagsire\" } }, { \"entry_number\": 196, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/196\\/\", \"name\": \"espeon\" } }, { \"entry_number\": 197, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/197\\/\", \"name\": \"umbreon\" } }, { \"entry_number\": 198, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/198\\/\", \"name\": \"murkrow\" } }, { \"entry_number\": 199, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/199\\/\", \"name\": \"slowking\" } }, { \"entry_number\": 200, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/200\\/\", \"name\": \"misdreavus\" } }, { \"entry_number\": 201, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/201\\/\", \"name\": \"unown\" } }, { \"entry_number\": 202, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/202\\/\", \"name\": \"wobbuffet\" } }, { \"entry_number\": 203, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/203\\/\", \"name\": \"girafarig\" } }, { \"entry_number\": 204, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/204\\/\", \"name\": \"pineco\" } }, { \"entry_number\": 205, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/205\\/\", \"name\": \"forretress\" } }, { \"entry_number\": 206, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/206\\/\", \"name\": \"dunsparce\" } }, { \"entry_number\": 207, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/207\\/\", \"name\": \"gligar\" } }, { \"entry_number\": 208, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/208\\/\", \"name\": \"steelix\" } }, { \"entry_number\": 209, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/209\\/\", \"name\": \"snubbull\" } }, { \"entry_number\": 210, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/210\\/\", \"name\": \"granbull\" } }, { \"entry_number\": 211, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/211\\/\", \"name\": \"qwilfish\" } }, { \"entry_number\": 212, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/212\\/\", \"name\": \"scizor\" } }, { \"entry_number\": 213, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/213\\/\", \"name\": \"shuckle\" } }, { \"entry_number\": 214, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/214\\/\", \"name\": \"heracross\" } }, { \"entry_number\": 215, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/215\\/\", \"name\": \"sneasel\" } }, { \"entry_number\": 216, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/216\\/\", \"name\": \"teddiursa\" } }, { \"entry_number\": 217, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/217\\/\", \"name\": \"ursaring\" } }, { \"entry_number\": 218, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/218\\/\", \"name\": \"slugma\" } }, { \"entry_number\": 219, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/219\\/\", \"name\": \"magcargo\" } }, { \"entry_number\": 220, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/220\\/\", \"name\": \"swinub\" } }, { \"entry_number\": 221, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/221\\/\", \"name\": \"piloswine\" } }, { \"entry_number\": 222, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/222\\/\", \"name\": \"corsola\" } }, { \"entry_number\": 223, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/223\\/\", \"name\": \"remoraid\" } }, { \"entry_number\": 224, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/224\\/\", \"name\": \"octillery\" } }, { \"entry_number\": 225, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/225\\/\", \"name\": \"delibird\" } }, { \"entry_number\": 226, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/226\\/\", \"name\": \"mantine\" } }, { \"entry_number\": 227, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/227\\/\", \"name\": \"skarmory\" } }, { \"entry_number\": 228, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/228\\/\", \"name\": \"houndour\" } }, { \"entry_number\": 229, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/229\\/\", \"name\": \"houndoom\" } }, { \"entry_number\": 230, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/230\\/\", \"name\": \"kingdra\" } }, { \"entry_number\": 231, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/231\\/\", \"name\": \"phanpy\" } }, { \"entry_number\": 232, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/232\\/\", \"name\": \"donphan\" } }, { \"entry_number\": 233, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/233\\/\", \"name\": \"porygon2\" } }, { \"entry_number\": 234, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/234\\/\", \"name\": \"stantler\" } }, { \"entry_number\": 235, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/235\\/\", \"name\": \"smeargle\" } }, { \"entry_number\": 236, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/236\\/\", \"name\": \"tyrogue\" } }, { \"entry_number\": 237, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/237\\/\", \"name\": \"hitmontop\" } }, { \"entry_number\": 238, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/238\\/\", \"name\": \"smoochum\" } }, { \"entry_number\": 239, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/239\\/\", \"name\": \"elekid\" } }, { \"entry_number\": 240, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/240\\/\", \"name\": \"magby\" } }, { \"entry_number\": 241, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/241\\/\", \"name\": \"miltank\" } }, { \"entry_number\": 242, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/242\\/\", \"name\": \"blissey\" } }, { \"entry_number\": 243, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/243\\/\", \"name\": \"raikou\" } }, { \"entry_number\": 244, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/244\\/\", \"name\": \"entei\" } }, { \"entry_number\": 245, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/245\\/\", \"name\": \"suicune\" } }, { \"entry_number\": 246, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/246\\/\", \"name\": \"larvitar\" } }, { \"entry_number\": 247, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/247\\/\", \"name\": \"pupitar\" } }, { \"entry_number\": 248, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/248\\/\", \"name\": \"tyranitar\" } }, { \"entry_number\": 249, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/249\\/\", \"name\": \"lugia\" } }, { \"entry_number\": 250, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/250\\/\", \"name\": \"ho-oh\" } }, { \"entry_number\": 251, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/251\\/\", \"name\": \"celebi\" } }, { \"entry_number\": 252, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/252\\/\", \"name\": \"treecko\" } }, { \"entry_number\": 253, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/253\\/\", \"name\": \"grovyle\" } }, { \"entry_number\": 254, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/254\\/\", \"name\": \"sceptile\" } }, { \"entry_number\": 255, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/255\\/\", \"name\": \"torchic\" } }, { \"entry_number\": 256, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/256\\/\", \"name\": \"combusken\" } }, { \"entry_number\": 257, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/257\\/\", \"name\": \"blaziken\" } }, { \"entry_number\": 258, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/258\\/\", \"name\": \"mudkip\" } }, { \"entry_number\": 259, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/259\\/\", \"name\": \"marshtomp\" } }, { \"entry_number\": 260, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/260\\/\", \"name\": \"swampert\" } }, { \"entry_number\": 261, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/261\\/\", \"name\": \"poochyena\" } }, { \"entry_number\": 262, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/262\\/\", \"name\": \"mightyena\" } }, { \"entry_number\": 263, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/263\\/\", \"name\": \"zigzagoon\" } }, { \"entry_number\": 264, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/264\\/\", \"name\": \"linoone\" } }, { \"entry_number\": 265, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/265\\/\", \"name\": \"wurmple\" } }, { \"entry_number\": 266, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/266\\/\", \"name\": \"silcoon\" } }, { \"entry_number\": 267, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/267\\/\", \"name\": \"beautifly\" } }, { \"entry_number\": 268, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/268\\/\", \"name\": \"cascoon\" } }, { \"entry_number\": 269, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/269\\/\", \"name\": \"dustox\" } }, { \"entry_number\": 270, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/270\\/\", \"name\": \"lotad\" } }, { \"entry_number\": 271, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/271\\/\", \"name\": \"lombre\" } }, { \"entry_number\": 272, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/272\\/\", \"name\": \"ludicolo\" } }, { \"entry_number\": 273, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/273\\/\", \"name\": \"seedot\" } }, { \"entry_number\": 274, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/274\\/\", \"name\": \"nuzleaf\" } }, { \"entry_number\": 275, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/275\\/\", \"name\": \"shiftry\" } }, { \"entry_number\": 276, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/276\\/\", \"name\": \"taillow\" } }, { \"entry_number\": 277, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/277\\/\", \"name\": \"swellow\" } }, { \"entry_number\": 278, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/278\\/\", \"name\": \"wingull\" } }, { \"entry_number\": 279, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/279\\/\", \"name\": \"pelipper\" } }, { \"entry_number\": 280, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/280\\/\", \"name\": \"ralts\" } }, { \"entry_number\": 281, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/281\\/\", \"name\": \"kirlia\" } }, { \"entry_number\": 282, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/282\\/\", \"name\": \"gardevoir\" } }, { \"entry_number\": 283, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/283\\/\", \"name\": \"surskit\" } }, { \"entry_number\": 284, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/284\\/\", \"name\": \"masquerain\" } }, { \"entry_number\": 285, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/285\\/\", \"name\": \"shroomish\" } }, { \"entry_number\": 286, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/286\\/\", \"name\": \"breloom\" } }, { \"entry_number\": 287, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/287\\/\", \"name\": \"slakoth\" } }, { \"entry_number\": 288, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/288\\/\", \"name\": \"vigoroth\" } }, { \"entry_number\": 289, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/289\\/\", \"name\": \"slaking\" } }, { \"entry_number\": 290, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/290\\/\", \"name\": \"nincada\" } }, { \"entry_number\": 291, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/291\\/\", \"name\": \"ninjask\" } }, { \"entry_number\": 292, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/292\\/\", \"name\": \"shedinja\" } }, { \"entry_number\": 293, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/293\\/\", \"name\": \"whismur\" } }, { \"entry_number\": 294, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/294\\/\", \"name\": \"loudred\" } }, { \"entry_number\": 295, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/295\\/\", \"name\": \"exploud\" } }, { \"entry_number\": 296, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/296\\/\", \"name\": \"makuhita\" } }, { \"entry_number\": 297, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/297\\/\", \"name\": \"hariyama\" } }, { \"entry_number\": 298, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/298\\/\", \"name\": \"azurill\" } }, { \"entry_number\": 299, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/299\\/\", \"name\": \"nosepass\" } }, { \"entry_number\": 300, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/300\\/\", \"name\": \"skitty\" } }, { \"entry_number\": 301, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/301\\/\", \"name\": \"delcatty\" } }, { \"entry_number\": 302, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/302\\/\", \"name\": \"sableye\" } }, { \"entry_number\": 303, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/303\\/\", \"name\": \"mawile\" } }, { \"entry_number\": 304, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/304\\/\", \"name\": \"aron\" } }, { \"entry_number\": 305, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/305\\/\", \"name\": \"lairon\" } }, { \"entry_number\": 306, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/306\\/\", \"name\": \"aggron\" } }, { \"entry_number\": 307, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/307\\/\", \"name\": \"meditite\" } }, { \"entry_number\": 308, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/308\\/\", \"name\": \"medicham\" } }, { \"entry_number\": 309, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/309\\/\", \"name\": \"electrike\" } }, { \"entry_number\": 310, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/310\\/\", \"name\": \"manectric\" } }, { \"entry_number\": 311, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/311\\/\", \"name\": \"plusle\" } }, { \"entry_number\": 312, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/312\\/\", \"name\": \"minun\" } }, { \"entry_number\": 313, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/313\\/\", \"name\": \"volbeat\" } }, { \"entry_number\": 314, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/314\\/\", \"name\": \"illumise\" } }, { \"entry_number\": 315, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/315\\/\", \"name\": \"roselia\" } }, { \"entry_number\": 316, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/316\\/\", \"name\": \"gulpin\" } }, { \"entry_number\": 317, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/317\\/\", \"name\": \"swalot\" } }, { \"entry_number\": 318, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/318\\/\", \"name\": \"carvanha\" } }, { \"entry_number\": 319, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/319\\/\", \"name\": \"sharpedo\" } }, { \"entry_number\": 320, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/320\\/\", \"name\": \"wailmer\" } }, { \"entry_number\": 321, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/321\\/\", \"name\": \"wailord\" } }, { \"entry_number\": 322, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/322\\/\", \"name\": \"numel\" } }, { \"entry_number\": 323, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/323\\/\", \"name\": \"camerupt\" } }, { \"entry_number\": 324, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/324\\/\", \"name\": \"torkoal\" } }, { \"entry_number\": 325, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/325\\/\", \"name\": \"spoink\" } }, { \"entry_number\": 326, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/326\\/\", \"name\": \"grumpig\" } }, { \"entry_number\": 327, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/327\\/\", \"name\": \"spinda\" } }, { \"entry_number\": 328, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/328\\/\", \"name\": \"trapinch\" } }, { \"entry_number\": 329, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/329\\/\", \"name\": \"vibrava\" } }, { \"entry_number\": 330, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/330\\/\", \"name\": \"flygon\" } }, { \"entry_number\": 331, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/331\\/\", \"name\": \"cacnea\" } }, { \"entry_number\": 332, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/332\\/\", \"name\": \"cacturne\" } }, { \"entry_number\": 333, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/333\\/\", \"name\": \"swablu\" } }, { \"entry_number\": 334, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/334\\/\", \"name\": \"altaria\" } }, { \"entry_number\": 335, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/335\\/\", \"name\": \"zangoose\" } }, { \"entry_number\": 336, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/336\\/\", \"name\": \"seviper\" } }, { \"entry_number\": 337, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/337\\/\", \"name\": \"lunatone\" } }, { \"entry_number\": 338, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/338\\/\", \"name\": \"solrock\" } }, { \"entry_number\": 339, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/339\\/\", \"name\": \"barboach\" } }, { \"entry_number\": 340, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/340\\/\", \"name\": \"whiscash\" } }, { \"entry_number\": 341, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/341\\/\", \"name\": \"corphish\" } }, { \"entry_number\": 342, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/342\\/\", \"name\": \"crawdaunt\" } }, { \"entry_number\": 343, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/343\\/\", \"name\": \"baltoy\" } }, { \"entry_number\": 344, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/344\\/\", \"name\": \"claydol\" } }, { \"entry_number\": 345, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/345\\/\", \"name\": \"lileep\" } }, { \"entry_number\": 346, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/346\\/\", \"name\": \"cradily\" } }, { \"entry_number\": 347, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/347\\/\", \"name\": \"anorith\" } }, { \"entry_number\": 348, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/348\\/\", \"name\": \"armaldo\" } }, { \"entry_number\": 349, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/349\\/\", \"name\": \"feebas\" } }, { \"entry_number\": 350, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/350\\/\", \"name\": \"milotic\" } }, { \"entry_number\": 351, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/351\\/\", \"name\": \"castform\" } }, { \"entry_number\": 352, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/352\\/\", \"name\": \"kecleon\" } }, { \"entry_number\": 353, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/353\\/\", \"name\": \"shuppet\" } }, { \"entry_number\": 354, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/354\\/\", \"name\": \"banette\" } }, { \"entry_number\": 355, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/355\\/\", \"name\": \"duskull\" } }, { \"entry_number\": 356, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/356\\/\", \"name\": \"dusclops\" } }, { \"entry_number\": 357, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/357\\/\", \"name\": \"tropius\" } }, { \"entry_number\": 358, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/358\\/\", \"name\": \"chimecho\" } }, { \"entry_number\": 359, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/359\\/\", \"name\": \"absol\" } }, { \"entry_number\": 360, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/360\\/\", \"name\": \"wynaut\" } }, { \"entry_number\": 361, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/361\\/\", \"name\": \"snorunt\" } }, { \"entry_number\": 362, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/362\\/\", \"name\": \"glalie\" } }, { \"entry_number\": 363, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/363\\/\", \"name\": \"spheal\" } }, { \"entry_number\": 364, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/364\\/\", \"name\": \"sealeo\" } }, { \"entry_number\": 365, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/365\\/\", \"name\": \"walrein\" } }, { \"entry_number\": 366, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/366\\/\", \"name\": \"clamperl\" } }, { \"entry_number\": 367, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/367\\/\", \"name\": \"huntail\" } }, { \"entry_number\": 368, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/368\\/\", \"name\": \"gorebyss\" } }, { \"entry_number\": 369, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/369\\/\", \"name\": \"relicanth\" } }, { \"entry_number\": 370, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/370\\/\", \"name\": \"luvdisc\" } }, { \"entry_number\": 371, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/371\\/\", \"name\": \"bagon\" } }, { \"entry_number\": 372, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/372\\/\", \"name\": \"shelgon\" } }, { \"entry_number\": 373, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/373\\/\", \"name\": \"salamence\" } }, { \"entry_number\": 374, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/374\\/\", \"name\": \"beldum\" } }, { \"entry_number\": 375, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/375\\/\", \"name\": \"metang\" } }, { \"entry_number\": 376, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/376\\/\", \"name\": \"metagross\" } }, { \"entry_number\": 377, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/377\\/\", \"name\": \"regirock\" } }, { \"entry_number\": 378, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/378\\/\", \"name\": \"regice\" } }, { \"entry_number\": 379, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/379\\/\", \"name\": \"registeel\" } }, { \"entry_number\": 380, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/380\\/\", \"name\": \"latias\" } }, { \"entry_number\": 381, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/381\\/\", \"name\": \"latios\" } }, { \"entry_number\": 382, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/382\\/\", \"name\": \"kyogre\" } }, { \"entry_number\": 383, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/383\\/\", \"name\": \"groudon\" } }, { \"entry_number\": 384, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/384\\/\", \"name\": \"rayquaza\" } }, { \"entry_number\": 385, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/385\\/\", \"name\": \"jirachi\" } }, { \"entry_number\": 386, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/386\\/\", \"name\": \"deoxys\" } }, { \"entry_number\": 387, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/387\\/\", \"name\": \"turtwig\" } }, { \"entry_number\": 388, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/388\\/\", \"name\": \"grotle\" } }, { \"entry_number\": 389, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/389\\/\", \"name\": \"torterra\" } }, { \"entry_number\": 390, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/390\\/\", \"name\": \"chimchar\" } }, { \"entry_number\": 391, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/391\\/\", \"name\": \"monferno\" } }, { \"entry_number\": 392, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/392\\/\", \"name\": \"infernape\" } }, { \"entry_number\": 393, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/393\\/\", \"name\": \"piplup\" } }, { \"entry_number\": 394, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/394\\/\", \"name\": \"prinplup\" } }, { \"entry_number\": 395, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/395\\/\", \"name\": \"empoleon\" } }, { \"entry_number\": 396, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/396\\/\", \"name\": \"starly\" } }, { \"entry_number\": 397, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/397\\/\", \"name\": \"staravia\" } }, { \"entry_number\": 398, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/398\\/\", \"name\": \"staraptor\" } }, { \"entry_number\": 399, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/399\\/\", \"name\": \"bidoof\" } }, { \"entry_number\": 400, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/400\\/\", \"name\": \"bibarel\" } }, { \"entry_number\": 401, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/401\\/\", \"name\": \"kricketot\" } }, { \"entry_number\": 402, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/402\\/\", \"name\": \"kricketune\" } }, { \"entry_number\": 403, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/403\\/\", \"name\": \"shinx\" } }, { \"entry_number\": 404, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/404\\/\", \"name\": \"luxio\" } }, { \"entry_number\": 405, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/405\\/\", \"name\": \"luxray\" } }, { \"entry_number\": 406, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/406\\/\", \"name\": \"budew\" } }, { \"entry_number\": 407, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/407\\/\", \"name\": \"roserade\" } }, { \"entry_number\": 408, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/408\\/\", \"name\": \"cranidos\" } }, { \"entry_number\": 409, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/409\\/\", \"name\": \"rampardos\" } }, { \"entry_number\": 410, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/410\\/\", \"name\": \"shieldon\" } }, { \"entry_number\": 411, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/411\\/\", \"name\": \"bastiodon\" } }, { \"entry_number\": 412, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/412\\/\", \"name\": \"burmy\" } }, { \"entry_number\": 413, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/413\\/\", \"name\": \"wormadam\" } }, { \"entry_number\": 414, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/414\\/\", \"name\": \"mothim\" } }, { \"entry_number\": 415, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/415\\/\", \"name\": \"combee\" } }, { \"entry_number\": 416, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/416\\/\", \"name\": \"vespiquen\" } }, { \"entry_number\": 417, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/417\\/\", \"name\": \"pachirisu\" } }, { \"entry_number\": 418, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/418\\/\", \"name\": \"buizel\" } }, { \"entry_number\": 419, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/419\\/\", \"name\": \"floatzel\" } }, { \"entry_number\": 420, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/420\\/\", \"name\": \"cherubi\" } }, { \"entry_number\": 421, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/421\\/\", \"name\": \"cherrim\" } }, { \"entry_number\": 422, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/422\\/\", \"name\": \"shellos\" } }, { \"entry_number\": 423, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/423\\/\", \"name\": \"gastrodon\" } }, { \"entry_number\": 424, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/424\\/\", \"name\": \"ambipom\" } }, { \"entry_number\": 425, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/425\\/\", \"name\": \"drifloon\" } }, { \"entry_number\": 426, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/426\\/\", \"name\": \"drifblim\" } }, { \"entry_number\": 427, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/427\\/\", \"name\": \"buneary\" } }, { \"entry_number\": 428, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/428\\/\", \"name\": \"lopunny\" } }, { \"entry_number\": 429, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/429\\/\", \"name\": \"mismagius\" } }, { \"entry_number\": 430, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/430\\/\", \"name\": \"honchkrow\" } }, { \"entry_number\": 431, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/431\\/\", \"name\": \"glameow\" } }, { \"entry_number\": 432, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/432\\/\", \"name\": \"purugly\" } }, { \"entry_number\": 433, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/433\\/\", \"name\": \"chingling\" } }, { \"entry_number\": 434, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/434\\/\", \"name\": \"stunky\" } }, { \"entry_number\": 435, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/435\\/\", \"name\": \"skuntank\" } }, { \"entry_number\": 436, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/436\\/\", \"name\": \"bronzor\" } }, { \"entry_number\": 437, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/437\\/\", \"name\": \"bronzong\" } }, { \"entry_number\": 438, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/438\\/\", \"name\": \"bonsly\" } }, { \"entry_number\": 439, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/439\\/\", \"name\": \"mime-jr\" } }, { \"entry_number\": 440, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/440\\/\", \"name\": \"happiny\" } }, { \"entry_number\": 441, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/441\\/\", \"name\": \"chatot\" } }, { \"entry_number\": 442, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/442\\/\", \"name\": \"spiritomb\" } }, { \"entry_number\": 443, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/443\\/\", \"name\": \"gible\" } }, { \"entry_number\": 444, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/444\\/\", \"name\": \"gabite\" } }, { \"entry_number\": 445, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/445\\/\", \"name\": \"garchomp\" } }, { \"entry_number\": 446, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/446\\/\", \"name\": \"munchlax\" } }, { \"entry_number\": 447, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/447\\/\", \"name\": \"riolu\" } }, { \"entry_number\": 448, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/448\\/\", \"name\": \"lucario\" } }, { \"entry_number\": 449, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/449\\/\", \"name\": \"hippopotas\" } }, { \"entry_number\": 450, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/450\\/\", \"name\": \"hippowdon\" } }, { \"entry_number\": 451, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/451\\/\", \"name\": \"skorupi\" } }, { \"entry_number\": 452, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/452\\/\", \"name\": \"drapion\" } }, { \"entry_number\": 453, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/453\\/\", \"name\": \"croagunk\" } }, { \"entry_number\": 454, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/454\\/\", \"name\": \"toxicroak\" } }, { \"entry_number\": 455, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/455\\/\", \"name\": \"carnivine\" } }, { \"entry_number\": 456, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/456\\/\", \"name\": \"finneon\" } }, { \"entry_number\": 457, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/457\\/\", \"name\": \"lumineon\" } }, { \"entry_number\": 458, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/458\\/\", \"name\": \"mantyke\" } }, { \"entry_number\": 459, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/459\\/\", \"name\": \"snover\" } }, { \"entry_number\": 460, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/460\\/\", \"name\": \"abomasnow\" } }, { \"entry_number\": 461, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/461\\/\", \"name\": \"weavile\" } }, { \"entry_number\": 462, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/462\\/\", \"name\": \"magnezone\" } }, { \"entry_number\": 463, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/463\\/\", \"name\": \"lickilicky\" } }, { \"entry_number\": 464, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/464\\/\", \"name\": \"rhyperior\" } }, { \"entry_number\": 465, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/465\\/\", \"name\": \"tangrowth\" } }, { \"entry_number\": 466, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/466\\/\", \"name\": \"electivire\" } }, { \"entry_number\": 467, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/467\\/\", \"name\": \"magmortar\" } }, { \"entry_number\": 468, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/468\\/\", \"name\": \"togekiss\" } }, { \"entry_number\": 469, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/469\\/\", \"name\": \"yanmega\" } }, { \"entry_number\": 470, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/470\\/\", \"name\": \"leafeon\" } }, { \"entry_number\": 471, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/471\\/\", \"name\": \"glaceon\" } }, { \"entry_number\": 472, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/472\\/\", \"name\": \"gliscor\" } }, { \"entry_number\": 473, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/473\\/\", \"name\": \"mamoswine\" } }, { \"entry_number\": 474, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/474\\/\", \"name\": \"porygon-z\" } }, { \"entry_number\": 475, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/475\\/\", \"name\": \"gallade\" } }, { \"entry_number\": 476, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/476\\/\", \"name\": \"probopass\" } }, { \"entry_number\": 477, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/477\\/\", \"name\": \"dusknoir\" } }, { \"entry_number\": 478, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/478\\/\", \"name\": \"froslass\" } }, { \"entry_number\": 479, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/479\\/\", \"name\": \"rotom\" } }, { \"entry_number\": 480, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/480\\/\", \"name\": \"uxie\" } }, { \"entry_number\": 481, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/481\\/\", \"name\": \"mesprit\" } }, { \"entry_number\": 482, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/482\\/\", \"name\": \"azelf\" } }, { \"entry_number\": 483, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/483\\/\", \"name\": \"dialga\" } }, { \"entry_number\": 484, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/484\\/\", \"name\": \"palkia\" } }, { \"entry_number\": 485, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/485\\/\", \"name\": \"heatran\" } }, { \"entry_number\": 486, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/486\\/\", \"name\": \"regigigas\" } }, { \"entry_number\": 487, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/487\\/\", \"name\": \"giratina\" } }, { \"entry_number\": 488, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/488\\/\", \"name\": \"cresselia\" } }, { \"entry_number\": 489, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/489\\/\", \"name\": \"phione\" } }, { \"entry_number\": 490, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/490\\/\", \"name\": \"manaphy\" } }, { \"entry_number\": 491, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/491\\/\", \"name\": \"darkrai\" } }, { \"entry_number\": 492, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/492\\/\", \"name\": \"shaymin\" } }, { \"entry_number\": 493, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/493\\/\", \"name\": \"arceus\" } }, { \"entry_number\": 494, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/494\\/\", \"name\": \"victini\" } }, { \"entry_number\": 495, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/495\\/\", \"name\": \"snivy\" } }, { \"entry_number\": 496, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/496\\/\", \"name\": \"servine\" } }, { \"entry_number\": 497, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/497\\/\", \"name\": \"serperior\" } }, { \"entry_number\": 498, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/498\\/\", \"name\": \"tepig\" } }, { \"entry_number\": 499, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/499\\/\", \"name\": \"pignite\" } }, { \"entry_number\": 500, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/500\\/\", \"name\": \"emboar\" } }, { \"entry_number\": 501, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/501\\/\", \"name\": \"oshawott\" } }, { \"entry_number\": 502, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/502\\/\", \"name\": \"dewott\" } }, { \"entry_number\": 503, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/503\\/\", \"name\": \"samurott\" } }, { \"entry_number\": 504, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/504\\/\", \"name\": \"patrat\" } }, { \"entry_number\": 505, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/505\\/\", \"name\": \"watchog\" } }, { \"entry_number\": 506, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/506\\/\", \"name\": \"lillipup\" } }, { \"entry_number\": 507, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/507\\/\", \"name\": \"herdier\" } }, { \"entry_number\": 508, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/508\\/\", \"name\": \"stoutland\" } }, { \"entry_number\": 509, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/509\\/\", \"name\": \"purrloin\" } }, { \"entry_number\": 510, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/510\\/\", \"name\": \"liepard\" } }, { \"entry_number\": 511, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/511\\/\", \"name\": \"pansage\" } }, { \"entry_number\": 512, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/512\\/\", \"name\": \"simisage\" } }, { \"entry_number\": 513, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/513\\/\", \"name\": \"pansear\" } }, { \"entry_number\": 514, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/514\\/\", \"name\": \"simisear\" } }, { \"entry_number\": 515, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/515\\/\", \"name\": \"panpour\" } }, { \"entry_number\": 516, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/516\\/\", \"name\": \"simipour\" } }, { \"entry_number\": 517, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/517\\/\", \"name\": \"munna\" } }, { \"entry_number\": 518, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/518\\/\", \"name\": \"musharna\" } }, { \"entry_number\": 519, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/519\\/\", \"name\": \"pidove\" } }, { \"entry_number\": 520, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/520\\/\", \"name\": \"tranquill\" } }, { \"entry_number\": 521, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/521\\/\", \"name\": \"unfezant\" } }, { \"entry_number\": 522, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/522\\/\", \"name\": \"blitzle\" } }, { \"entry_number\": 523, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/523\\/\", \"name\": \"zebstrika\" } }, { \"entry_number\": 524, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/524\\/\", \"name\": \"roggenrola\" } }, { \"entry_number\": 525, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/525\\/\", \"name\": \"boldore\" } }, { \"entry_number\": 526, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/526\\/\", \"name\": \"gigalith\" } }, { \"entry_number\": 527, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/527\\/\", \"name\": \"woobat\" } }, { \"entry_number\": 528, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/528\\/\", \"name\": \"swoobat\" } }, { \"entry_number\": 529, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/529\\/\", \"name\": \"drilbur\" } }, { \"entry_number\": 530, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/530\\/\", \"name\": \"excadrill\" } }, { \"entry_number\": 531, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/531\\/\", \"name\": \"audino\" } }, { \"entry_number\": 532, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/532\\/\", \"name\": \"timburr\" } }, { \"entry_number\": 533, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/533\\/\", \"name\": \"gurdurr\" } }, { \"entry_number\": 534, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/534\\/\", \"name\": \"conkeldurr\" } }, { \"entry_number\": 535, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/535\\/\", \"name\": \"tympole\" } }, { \"entry_number\": 536, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/536\\/\", \"name\": \"palpitoad\" } }, { \"entry_number\": 537, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/537\\/\", \"name\": \"seismitoad\" } }, { \"entry_number\": 538, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/538\\/\", \"name\": \"throh\" } }, { \"entry_number\": 539, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/539\\/\", \"name\": \"sawk\" } }, { \"entry_number\": 540, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/540\\/\", \"name\": \"sewaddle\" } }, { \"entry_number\": 541, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/541\\/\", \"name\": \"swadloon\" } }, { \"entry_number\": 542, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/542\\/\", \"name\": \"leavanny\" } }, { \"entry_number\": 543, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/543\\/\", \"name\": \"venipede\" } }, { \"entry_number\": 544, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/544\\/\", \"name\": \"whirlipede\" } }, { \"entry_number\": 545, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/545\\/\", \"name\": \"scolipede\" } }, { \"entry_number\": 546, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/546\\/\", \"name\": \"cottonee\" } }, { \"entry_number\": 547, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/547\\/\", \"name\": \"whimsicott\" } }, { \"entry_number\": 548, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/548\\/\", \"name\": \"petilil\" } }, { \"entry_number\": 549, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/549\\/\", \"name\": \"lilligant\" } }, { \"entry_number\": 550, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/550\\/\", \"name\": \"basculin\" } }, { \"entry_number\": 551, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/551\\/\", \"name\": \"sandile\" } }, { \"entry_number\": 552, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/552\\/\", \"name\": \"krokorok\" } }, { \"entry_number\": 553, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/553\\/\", \"name\": \"krookodile\" } }, { \"entry_number\": 554, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/554\\/\", \"name\": \"darumaka\" } }, { \"entry_number\": 555, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/555\\/\", \"name\": \"darmanitan\" } }, { \"entry_number\": 556, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/556\\/\", \"name\": \"maractus\" } }, { \"entry_number\": 557, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/557\\/\", \"name\": \"dwebble\" } }, { \"entry_number\": 558, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/558\\/\", \"name\": \"crustle\" } }, { \"entry_number\": 559, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/559\\/\", \"name\": \"scraggy\" } }, { \"entry_number\": 560, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/560\\/\", \"name\": \"scrafty\" } }, { \"entry_number\": 561, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/561\\/\", \"name\": \"sigilyph\" } }, { \"entry_number\": 562, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/562\\/\", \"name\": \"yamask\" } }, { \"entry_number\": 563, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/563\\/\", \"name\": \"cofagrigus\" } }, { \"entry_number\": 564, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/564\\/\", \"name\": \"tirtouga\" } }, { \"entry_number\": 565, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/565\\/\", \"name\": \"carracosta\" } }, { \"entry_number\": 566, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/566\\/\", \"name\": \"archen\" } }, { \"entry_number\": 567, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/567\\/\", \"name\": \"archeops\" } }, { \"entry_number\": 568, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/568\\/\", \"name\": \"trubbish\" } }, { \"entry_number\": 569, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/569\\/\", \"name\": \"garbodor\" } }, { \"entry_number\": 570, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/570\\/\", \"name\": \"zorua\" } }, { \"entry_number\": 571, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/571\\/\", \"name\": \"zoroark\" } }, { \"entry_number\": 572, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/572\\/\", \"name\": \"minccino\" } }, { \"entry_number\": 573, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/573\\/\", \"name\": \"cinccino\" } }, { \"entry_number\": 574, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/574\\/\", \"name\": \"gothita\" } }, { \"entry_number\": 575, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/575\\/\", \"name\": \"gothorita\" } }, { \"entry_number\": 576, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/576\\/\", \"name\": \"gothitelle\" } }, { \"entry_number\": 577, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/577\\/\", \"name\": \"solosis\" } }, { \"entry_number\": 578, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/578\\/\", \"name\": \"duosion\" } }, { \"entry_number\": 579, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/579\\/\", \"name\": \"reuniclus\" } }, { \"entry_number\": 580, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/580\\/\", \"name\": \"ducklett\" } }, { \"entry_number\": 581, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/581\\/\", \"name\": \"swanna\" } }, { \"entry_number\": 582, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/582\\/\", \"name\": \"vanillite\" } }, { \"entry_number\": 583, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/583\\/\", \"name\": \"vanillish\" } }, { \"entry_number\": 584, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/584\\/\", \"name\": \"vanilluxe\" } }, { \"entry_number\": 585, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/585\\/\", \"name\": \"deerling\" } }, { \"entry_number\": 586, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/586\\/\", \"name\": \"sawsbuck\" } }, { \"entry_number\": 587, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/587\\/\", \"name\": \"emolga\" } }, { \"entry_number\": 588, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/588\\/\", \"name\": \"karrablast\" } }, { \"entry_number\": 589, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/589\\/\", \"name\": \"escavalier\" } }, { \"entry_number\": 590, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/590\\/\", \"name\": \"foongus\" } }, { \"entry_number\": 591, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/591\\/\", \"name\": \"amoonguss\" } }, { \"entry_number\": 592, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/592\\/\", \"name\": \"frillish\" } }, { \"entry_number\": 593, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/593\\/\", \"name\": \"jellicent\" } }, { \"entry_number\": 594, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/594\\/\", \"name\": \"alomomola\" } }, { \"entry_number\": 595, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/595\\/\", \"name\": \"joltik\" } }, { \"entry_number\": 596, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/596\\/\", \"name\": \"galvantula\" } }, { \"entry_number\": 597, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/597\\/\", \"name\": \"ferroseed\" } }, { \"entry_number\": 598, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/598\\/\", \"name\": \"ferrothorn\" } }, { \"entry_number\": 599, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/599\\/\", \"name\": \"klink\" } }, { \"entry_number\": 600, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/600\\/\", \"name\": \"klang\" } }, { \"entry_number\": 601, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/601\\/\", \"name\": \"klinklang\" } }, { \"entry_number\": 602, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/602\\/\", \"name\": \"tynamo\" } }, { \"entry_number\": 603, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/603\\/\", \"name\": \"eelektrik\" } }, { \"entry_number\": 604, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/604\\/\", \"name\": \"eelektross\" } }, { \"entry_number\": 605, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/605\\/\", \"name\": \"elgyem\" } }, { \"entry_number\": 606, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/606\\/\", \"name\": \"beheeyem\" } }, { \"entry_number\": 607, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/607\\/\", \"name\": \"litwick\" } }, { \"entry_number\": 608, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/608\\/\", \"name\": \"lampent\" } }, { \"entry_number\": 609, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/609\\/\", \"name\": \"chandelure\" } }, { \"entry_number\": 610, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/610\\/\", \"name\": \"axew\" } }, { \"entry_number\": 611, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/611\\/\", \"name\": \"fraxure\" } }, { \"entry_number\": 612, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/612\\/\", \"name\": \"haxorus\" } }, { \"entry_number\": 613, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/613\\/\", \"name\": \"cubchoo\" } }, { \"entry_number\": 614, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/614\\/\", \"name\": \"beartic\" } }, { \"entry_number\": 615, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/615\\/\", \"name\": \"cryogonal\" } }, { \"entry_number\": 616, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/616\\/\", \"name\": \"shelmet\" } }, { \"entry_number\": 617, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/617\\/\", \"name\": \"accelgor\" } }, { \"entry_number\": 618, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/618\\/\", \"name\": \"stunfisk\" } }, { \"entry_number\": 619, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/619\\/\", \"name\": \"mienfoo\" } }, { \"entry_number\": 620, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/620\\/\", \"name\": \"mienshao\" } }, { \"entry_number\": 621, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/621\\/\", \"name\": \"druddigon\" } }, { \"entry_number\": 622, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/622\\/\", \"name\": \"golett\" } }, { \"entry_number\": 623, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/623\\/\", \"name\": \"golurk\" } }, { \"entry_number\": 624, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/624\\/\", \"name\": \"pawniard\" } }, { \"entry_number\": 625, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/625\\/\", \"name\": \"bisharp\" } }, { \"entry_number\": 626, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/626\\/\", \"name\": \"bouffalant\" } }, { \"entry_number\": 627, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/627\\/\", \"name\": \"rufflet\" } }, { \"entry_number\": 628, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/628\\/\", \"name\": \"braviary\" } }, { \"entry_number\": 629, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/629\\/\", \"name\": \"vullaby\" } }, { \"entry_number\": 630, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/630\\/\", \"name\": \"mandibuzz\" } }, { \"entry_number\": 631, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/631\\/\", \"name\": \"heatmor\" } }, { \"entry_number\": 632, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/632\\/\", \"name\": \"durant\" } }, { \"entry_number\": 633, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/633\\/\", \"name\": \"deino\" } }, { \"entry_number\": 634, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/634\\/\", \"name\": \"zweilous\" } }, { \"entry_number\": 635, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/635\\/\", \"name\": \"hydreigon\" } }, { \"entry_number\": 636, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/636\\/\", \"name\": \"larvesta\" } }, { \"entry_number\": 637, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/637\\/\", \"name\": \"volcarona\" } }, { \"entry_number\": 638, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/638\\/\", \"name\": \"cobalion\" } }, { \"entry_number\": 639, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/639\\/\", \"name\": \"terrakion\" } }, { \"entry_number\": 640, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/640\\/\", \"name\": \"virizion\" } }, { \"entry_number\": 641, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/641\\/\", \"name\": \"tornadus\" } }, { \"entry_number\": 642, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/642\\/\", \"name\": \"thundurus\" } }, { \"entry_number\": 643, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/643\\/\", \"name\": \"reshiram\" } }, { \"entry_number\": 644, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/644\\/\", \"name\": \"zekrom\" } }, { \"entry_number\": 645, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/645\\/\", \"name\": \"landorus\" } }, { \"entry_number\": 646, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/646\\/\", \"name\": \"kyurem\" } }, { \"entry_number\": 647, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/647\\/\", \"name\": \"keldeo\" } }, { \"entry_number\": 648, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/648\\/\", \"name\": \"meloetta\" } }, { \"entry_number\": 649, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/649\\/\", \"name\": \"genesect\" } }, { \"entry_number\": 650, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/650\\/\", \"name\": \"chespin\" } }, { \"entry_number\": 651, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/651\\/\", \"name\": \"quilladin\" } }, { \"entry_number\": 652, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/652\\/\", \"name\": \"chesnaught\" } }, { \"entry_number\": 653, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/653\\/\", \"name\": \"fennekin\" } }, { \"entry_number\": 654, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/654\\/\", \"name\": \"braixen\" } }, { \"entry_number\": 655, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/655\\/\", \"name\": \"delphox\" } }, { \"entry_number\": 656, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/656\\/\", \"name\": \"froakie\" } }, { \"entry_number\": 657, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/657\\/\", \"name\": \"frogadier\" } }, { \"entry_number\": 658, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/658\\/\", \"name\": \"greninja\" } }, { \"entry_number\": 659, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/659\\/\", \"name\": \"bunnelby\" } }, { \"entry_number\": 660, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/660\\/\", \"name\": \"diggersby\" } }, { \"entry_number\": 661, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/661\\/\", \"name\": \"fletchling\" } }, { \"entry_number\": 662, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/662\\/\", \"name\": \"fletchinder\" } }, { \"entry_number\": 663, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/663\\/\", \"name\": \"talonflame\" } }, { \"entry_number\": 664, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/664\\/\", \"name\": \"scatterbug\" } }, { \"entry_number\": 665, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/665\\/\", \"name\": \"spewpa\" } }, { \"entry_number\": 666, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/666\\/\", \"name\": \"vivillon\" } }, { \"entry_number\": 667, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/667\\/\", \"name\": \"litleo\" } }, { \"entry_number\": 668, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/668\\/\", \"name\": \"pyroar\" } }, { \"entry_number\": 669, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/669\\/\", \"name\": \"flabebe\" } }, { \"entry_number\": 670, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/670\\/\", \"name\": \"floette\" } }, { \"entry_number\": 671, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/671\\/\", \"name\": \"florges\" } }, { \"entry_number\": 672, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/672\\/\", \"name\": \"skiddo\" } }, { \"entry_number\": 673, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/673\\/\", \"name\": \"gogoat\" } }, { \"entry_number\": 674, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/674\\/\", \"name\": \"pancham\" } }, { \"entry_number\": 675, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/675\\/\", \"name\": \"pangoro\" } }, { \"entry_number\": 676, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/676\\/\", \"name\": \"furfrou\" } }, { \"entry_number\": 677, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/677\\/\", \"name\": \"espurr\" } }, { \"entry_number\": 678, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/678\\/\", \"name\": \"meowstic\" } }, { \"entry_number\": 679, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/679\\/\", \"name\": \"honedge\" } }, { \"entry_number\": 680, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/680\\/\", \"name\": \"doublade\" } }, { \"entry_number\": 681, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/681\\/\", \"name\": \"aegislash\" } }, { \"entry_number\": 682, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/682\\/\", \"name\": \"spritzee\" } }, { \"entry_number\": 683, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/683\\/\", \"name\": \"aromatisse\" } }, { \"entry_number\": 684, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/684\\/\", \"name\": \"swirlix\" } }, { \"entry_number\": 685, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/685\\/\", \"name\": \"slurpuff\" } }, { \"entry_number\": 686, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/686\\/\", \"name\": \"inkay\" } }, { \"entry_number\": 687, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/687\\/\", \"name\": \"malamar\" } }, { \"entry_number\": 688, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/688\\/\", \"name\": \"binacle\" } }, { \"entry_number\": 689, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/689\\/\", \"name\": \"barbaracle\" } }, { \"entry_number\": 690, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/690\\/\", \"name\": \"skrelp\" } }, { \"entry_number\": 691, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/691\\/\", \"name\": \"dragalge\" } }, { \"entry_number\": 692, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/692\\/\", \"name\": \"clauncher\" } }, { \"entry_number\": 693, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/693\\/\", \"name\": \"clawitzer\" } }, { \"entry_number\": 694, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/694\\/\", \"name\": \"helioptile\" } }, { \"entry_number\": 695, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/695\\/\", \"name\": \"heliolisk\" } }, { \"entry_number\": 696, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/696\\/\", \"name\": \"tyrunt\" } }, { \"entry_number\": 697, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/697\\/\", \"name\": \"tyrantrum\" } }, { \"entry_number\": 698, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/698\\/\", \"name\": \"amaura\" } }, { \"entry_number\": 699, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/699\\/\", \"name\": \"aurorus\" } }, { \"entry_number\": 700, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/700\\/\", \"name\": \"sylveon\" } }, { \"entry_number\": 701, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/701\\/\", \"name\": \"hawlucha\" } }, { \"entry_number\": 702, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/702\\/\", \"name\": \"dedenne\" } }, { \"entry_number\": 703, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/703\\/\", \"name\": \"carbink\" } }, { \"entry_number\": 704, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/704\\/\", \"name\": \"goomy\" } }, { \"entry_number\": 705, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/705\\/\", \"name\": \"sliggoo\" } }, { \"entry_number\": 706, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/706\\/\", \"name\": \"goodra\" } }, { \"entry_number\": 707, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/707\\/\", \"name\": \"klefki\" } }, { \"entry_number\": 708, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/708\\/\", \"name\": \"phantump\" } }, { \"entry_number\": 709, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/709\\/\", \"name\": \"trevenant\" } }, { \"entry_number\": 710, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/710\\/\", \"name\": \"pumpkaboo\" } }, { \"entry_number\": 711, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/711\\/\", \"name\": \"gourgeist\" } }, { \"entry_number\": 712, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/712\\/\", \"name\": \"bergmite\" } }, { \"entry_number\": 713, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/713\\/\", \"name\": \"avalugg\" } }, { \"entry_number\": 714, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/714\\/\", \"name\": \"noibat\" } }, { \"entry_number\": 715, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/715\\/\", \"name\": \"noivern\" } }, { \"entry_number\": 716, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/716\\/\", \"name\": \"xerneas\" } }, { \"entry_number\": 717, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/717\\/\", \"name\": \"yveltal\" } }, { \"entry_number\": 718, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/718\\/\", \"name\": \"zygarde\" } }, { \"entry_number\": 719, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/719\\/\", \"name\": \"diancie\" } }, { \"entry_number\": 720, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/720\\/\", \"name\": \"hoopa\" } }, { \"entry_number\": 721, \"pokemon_species\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/pokemon-species\\/721\\/\", \"name\": \"volcanion\" } }], \"id\": 1, \"names\": [{ \"name\": \"National\", \"language\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/language\\/5\\/\", \"name\": \"fr\" } }, { \"name\": \"National\", \"language\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/language\\/6\\/\", \"name\": \"de\" } }, { \"name\": \"National\", \"language\": { \"url\": \"https:\\/\\/pokeapi.co\\/api\\/v2\\/language\\/9\\/\", \"name\": \"en\" } }] };\n}", "title": "" }, { "docid": "dc373a93f7f909f24d7558c6333a86bf", "score": "0.6583611", "text": "getPets() {\n var pets = [];\n apiClient.get('pokemon/').then(response => {\n // handle success\n //console.log(response);\n response.data.results.forEach(pet => {\n apiClient.get(pet.url).then(response => {\n //console.log(response.data);\n pets.push(response.data);\n });\n });\n }); // \"https://pokeapi.co/api/v2/pokemon/?offset=20&limit=20\"\n return pets;\n }", "title": "" }, { "docid": "9ee7fb2299da4b23e797c8e652db8cc4", "score": "0.65638566", "text": "parseTypes(pokemonArray){\n const typeArray = [];\n pokemonArray.forEach((pokemon) => {\n pokemon.type.forEach((type) => {\n if(typeArray.indexOf(type) < 0) {\n typeArray.push(type)\n }\n })\n })\n return typeArray;\n }", "title": "" }, { "docid": "8ed7577431b5103462653f6b4cbf1cad", "score": "0.6555196", "text": "async function buildPokemon() {\n const results = await fetch(pokemonUrl)\n .then(info => info.json())\n .then(data => data.results)\n .catch(console.error);\n let pokemonList = results.map(async result => {\n const pokeData = await fetch(result.url).then(d => d.json())\n let newPokemon = {\n id: pokeData.id,\n name: pokeData.name,\n height: pokeData.height,\n weight: pokeData.weight,\n sprite: pokeData.sprites.front_default,\n spriteB: pokeData.sprites.back_default,\n abilities: pokeData.abilities,\n types: pokeData.types,\n }\n return newPokemon\n })\n return Promise.all(pokemonList);\n}", "title": "" }, { "docid": "81cc7f119cfb82d7675a454900537299", "score": "0.6543162", "text": "function displayPokemons(pokemonList) {\n const htmlTemplate = pokemonList\n .map((pokemon) => {\n return `\n <li class=\"pokemon\">\n <img src=${pokemon.imgURL} class=\"pokemonImg\">\n <div class=\"pokemonHeader\">\n <h2 class=\"pokemonName\">${pokemon.name}</h2>\n <p class=\"pokemonId\">#${pokemon.id\n .toString()\n .padStart(3, \"0\")}</p>\n </div>\n <div class=\"typeContainer\"> \n Type(s): ${geTypes(pokemon.type)}\n </div>\n \n </li>\n `;\n })\n .join(\"\");\n\n pokedex.innerHTML = htmlTemplate;\n}", "title": "" }, { "docid": "d81ba941cd8257caaeda6d02d550b038", "score": "0.6515512", "text": "function add(pokemon){\n pokemonList.push(pokemon);\n }", "title": "" }, { "docid": "fd8abc605ba54679c141b2cdde60f12a", "score": "0.6503182", "text": "static async getPokemonsFromList(list) {\n let \n pokemons = [],\n errors = [];\n \n await Promise.all(\n list.map(async(url) => {\n try {\n let pokemonData = await axios.get(`https://pokeapi.co/api/v2/pokemon/${url}/`,{ httpsAgent });\n pokemons.push(pokemonData.data);\n } catch (err) {\n console.log(`Pokemon with name ${url} not found!`);\n errors.push({pokemon: `${url}`, err: `Invalid Pokemon name`});\n }\n }));\n \n return { pokemons, errors };\n }", "title": "" }, { "docid": "262d0ad7c7461da5f2fe257d1785d7f3", "score": "0.64993346", "text": "function add(pokemon) {\n\t\treturn pokemonArray.push(pokemon);\n\t}", "title": "" }, { "docid": "17dd172d8eb59926736a093f0b424139", "score": "0.6443853", "text": "function loadList() {\n return fetch(pokemonApiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (pokemonItem) {\n let pokemon = {\n detailsUrl: pokemonItem.url,\n name: pokemonItem.name\n };\n add(pokemon);\n });\n }).catch(function (err) {\n console.error(err);\n })\n }", "title": "" }, { "docid": "f2a29f70f74d5d8a968f5b10cafc1a18", "score": "0.63961685", "text": "function fetchPokemon(){\n\t\tfetch(pokeURL)\n\t\t.then(response => {\n\t\t\treturn response.json()\n\t\t})\n\t\t.then(pokemons => {\n\t\t\t// here we're setting the empty array, pokeArray, equal to the data\n\t\t\t// that was returned from the DB\n\t\t\tpokeArray = pokemons\n\t\t\t// console.log(pokeArray);\n\t\t\t// we'll map through all of the pokemon and return HTML for each\n\t\t\tlet pokeHTML = pokemons.map(pokemon => {\n\t\t\t\treturn renderSinglePokemon(pokemon)\n\t\t\t})\n\t\t\t// change the inner HTML of the pokeContainer to be the HTML string of\n\t\t\t// pokemon we just created\n\t\t\t// we need to join the strings together to create one massive string\n\t\t\t// otherwise there will be commas btw each of the pokemon and they will\n\t\t\t// render on the page\n\t\t\tpokeContainer.innerHTML = pokeHTML.join('')//this is the end of our map\n\t\t})\n\t}", "title": "" }, { "docid": "b78a8967410150ed755217261f0f119f", "score": "0.63799584", "text": "getPokemonList(number) {\n fetchAndParse(\n `https://pokeapi.co/api/v2/pokemon/?limit=${number}`,\n 'Error en la petición'\n )\n .then(data => {\n this.allPokemon = data.results.map((pokemon, index) => {\n return new Pokemon(pokemon.name, pokemon.url, index + 1);\n });\n return Promise.all(this.allPokemon.map(el => el.getAllInfo()));\n })\n .then(() => {\n this.allPokemon.forEach(pokemon => this.renderPokemonCard(pokemon));\n })\n .catch(err => console.log(err.message));\n }", "title": "" }, { "docid": "92774c224f333162400157d308f737da", "score": "0.63649726", "text": "function getAllPokemonCallback(response){\n var pokedex = response.results;\n pokedex.forEach(function(pokemon){\n console.log(pokemon.name);\n })\n}", "title": "" }, { "docid": "508cd9f2e1f4e132848ee2595cb1f76d", "score": "0.63282317", "text": "function randomListOfMoves() {\r\n let x = [];\r\n let y = [];\r\n for(let i = 0; i <= pokemonMoves.length - 1; i++) {\r\n x.push(pokemonMoves[i].move.name.toUpperCase());\r\n }\r\n for(let j = 0; j <= 2; j++) {\r\n y.push(x[Math.floor((Math.random() * x.length) + 1)]);\r\n }\r\n return y;\r\n}", "title": "" }, { "docid": "fbb43373f8890a04e6376e81ebff5e7e", "score": "0.63102484", "text": "function add(pokemon) {\n pokemonList.push(pokemon)\n }", "title": "" }, { "docid": "b4c4f6ffb5bba5eeed2b2db1117fd477", "score": "0.6283146", "text": "async findNames(n) {\n let pokeData = await fetch(`https://pokeapi.co/api/v2/pokemon?offset=0&limit=${n}`);\n let jsonData = await pokeData.json();\n let nameArray = jsonData.results.map(pokemon => pokemon.name);\n return nameArray;\n }", "title": "" }, { "docid": "2f9242a0c15493a76d3eef708f4fbc31", "score": "0.62591153", "text": "function add(pokemon) {\n pokemonList.push(pokemon);\n }", "title": "" }, { "docid": "a3f215f45402ba220dd5c8d5aa4d7955", "score": "0.62505794", "text": "function add(pokemon) {\n pokemonList.push(pokemon);\n }", "title": "" }, { "docid": "a3f215f45402ba220dd5c8d5aa4d7955", "score": "0.62505794", "text": "function add(pokemon) {\n pokemonList.push(pokemon);\n }", "title": "" }, { "docid": "a3f215f45402ba220dd5c8d5aa4d7955", "score": "0.62505794", "text": "function add(pokemon) {\n pokemonList.push(pokemon);\n }", "title": "" }, { "docid": "2121876883270ade80f39b1689a4d7f1", "score": "0.62293494", "text": "function createList () {\n for (var index = 1; index <= 10; index++) {\n pokemonList.push(`${baseUrl}${index}.png`);\n }\n}", "title": "" }, { "docid": "dad596f7fb2a4e85953019c720ed255f", "score": "0.6223711", "text": "function getAll(){\n return pokemons;\n}", "title": "" }, { "docid": "7d8d92690763831a77514b7273199113", "score": "0.61972225", "text": "function loadList () {\n return $.ajax(apiUrl).then(function (response) {\n response.results.forEach(function (item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url\n }\n add(pokemon)\n })\n }).catch(function (e) {\n console.error(e)\n })\n }", "title": "" }, { "docid": "bd3c73900eac022e3c9e19bed287e80d", "score": "0.61966044", "text": "function getPokemonNames() {\n\n var request = new XMLHttpRequest();\n request.open('GET', 'https://pokeapi.co/api/v2/pokemon/?offset=0&limit=151');\n request.responseType = 'json';\n\n // load function: randomly assign 10 creaturs to each player\n request.addEventListener('load', () => {\n\n // routine to read ALL pokemon creatures and push them to pokemonList\n for (var i = 0; i < request.response.results.length; i++) {\n pokemonList.push(request.response.results[i].name)\n }\n\n // randomly pick 10 creatures from pokemonList and assign them to each player\n var picks;\n for (let i = 1; i <= 20; i++) {\n picks = Math.floor(Math.random() * (150 - 0 + 1) + 0);\n getPokemonData(pokemonList[picks], i);\n }\n });\n request.send();\n}", "title": "" }, { "docid": "b1caf45ae4a52a54bd624d0057dad99e", "score": "0.61686873", "text": "all(){\n return this.pokemon;\n }", "title": "" }, { "docid": "a7d73b5cab9651df471fffb7d9f3225b", "score": "0.614292", "text": "function add(pokemon) {\n pokemonList.push(pokemon);\n }", "title": "" }, { "docid": "5b2e0589b9f35e553ba3372af0c8dabf", "score": "0.61429006", "text": "function pokemonAbilities(pokemon){\n var abilities = pokemon.abilities;\n console.log(abilities);\n}", "title": "" }, { "docid": "001756a726a69d96e5894737059fbf82", "score": "0.61313623", "text": "function fetchAllPokemon(_pokemons) {\n // empty cache\n pokemon_list.length = 0;\n // display loading animation\n loadingInformation.style.display = 'block';\n\n _pokemons.forEach(function (poke) {\n fetchPokemon(poke, addGridItems);\n });\n}", "title": "" }, { "docid": "1060df9ab2b8d208cd73e692c310318c", "score": "0.611165", "text": "parseWeaknesses(pokemonArray){\n const typeArray = [];\n pokemonArray.forEach((pokemon) => {\n pokemon.weaknesses.forEach((weakness) => {\n if(typeArray.indexOf(weakness) < 0) {\n typeArray.push(weakness)\n }\n })\n })\n return typeArray;\n }", "title": "" }, { "docid": "9b38c28560e02d3976b5dbdd2800c02e", "score": "0.6089883", "text": "async function getAllPokemon() {\n let res = await fetch(`${url}?limit=${10000}`);\n let data = await res.json();\n const resultDiv = document.getElementById('results');\n resultDiv.innerHTML = data.results.reduce( (acc, curr) => {\n const name = curr.name.charAt(0).toUpperCase() + curr.name.slice(1);\n return acc + `<span class=\"d-block\">${name}</span>`;\n },'');\n}", "title": "" }, { "docid": "484c3ed82fc7ce580bf8defa22b6a533", "score": "0.6084678", "text": "function loadList() {\n return $.ajax(apiUrl, {dataType: 'json'}).then(function(responseJSON) {\n return responseJSON;\n }).then(function(json) {\n json.results.forEach(function(item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function(e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "e73fb49fedb62ccf1fc84074ae7894fd", "score": "0.6072687", "text": "function loadList() {\n return $.ajax(apiUrl)\n .then(function (json) {\n json.results.forEach(function (item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url,\n };\n add(pokemon);\n console.log(pokemon);\n });\n })\n .catch(function (e) {\n console.error(e);\n });\n }", "title": "" }, { "docid": "08f97368df719082e76f895cbdce72c3", "score": "0.60714716", "text": "findNames(n) {\n \n let data = fetch(`https://pokeapi.co/api/v2/pokemon?limit=${n}`)\n .then( (response) => {\n let js = response.json();\n return js;\n })\n .then( (js) => {\n console.log(Array.isArray(js.results));\n return js.results;\n })\n .then( (arrayOfPokeObjs) => {\n return arrayOfPokeObjs.map((poke) => { return poke.name})\n });\n\n return data;\n }", "title": "" }, { "docid": "5328c6ffa72ae577568c1c488fa6d28c", "score": "0.60243523", "text": "static getAllPokemon(offset = 100, limit = 100) {\n const url = `${API_URL}/pokemon/?offset=${offset}&limit=${limit}`\n return axios.get(url)\n }", "title": "" }, { "docid": "a7f216692f22fec4b168fc4872962e7e", "score": "0.60004866", "text": "all(){\n return this.pokemon;\n }", "title": "" }, { "docid": "8f146a35a95b11f6eb8875f7a1373a6d", "score": "0.5999214", "text": "function getSinglePokemonCallback(pokemon) {\n // - pass it to the addPokemonToPage function.\n addPokemonToPage(pokemon.name, pokemon.sprites.front_default, pokemon.abilities);\n // - pass the necessary data to the Pokemon constructor\n var myPokemon = new Pokemon(pokemon.name, pokemon.sprites.front_default, pokemon.abilities);\n // - add it to the AllPokemon array\n allPokemonArr.push(myPokemon);\n}", "title": "" }, { "docid": "2309bc470dd10dc84718f129d1ace24f", "score": "0.59941506", "text": "async function getPokemon() {\n\tlet res = await axios.get(`${url}`);\n\tfor (let data of res.data.results) {\n\t\tconsole.log(`${data.name} : ${data.url}`);\n\t}\n}", "title": "" }, { "docid": "949dc249e78ec3275881376093e0a600", "score": "0.59816563", "text": "function loadList() {\n\t\treturn fetch(apiUrl)\n\t\t\t.then(function(response) {\n\t\t\t\treturn response.json();\n\t\t\t})\n\t\t\t.then(function(json) {\n\t\t\t\tjson.results.forEach(function(item) {\n\t\t\t\t\tvar pokemon = {\n\t\t\t\t\t\tname: item.name,\n\t\t\t\t\t\tdetailsUrl: item.url\n\t\t\t\t\t};\n\t\t\t\t\tadd(pokemon);\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(function(e) {\n\t\t\t\tconsole.error(e);\n\t\t\t});\n\t}", "title": "" }, { "docid": "352b589c54ffb855feffc382366b51dc", "score": "0.5973996", "text": "function loadApiList() {\n return fetch(apiUrl)\n .then((response) => response.json())\n .then((json) => {\n json.results.forEach((item) => {\n let pokemon = {\n name: item.name,\n detailsUrl: item.url,\n };\n //pass pokemon object to add() to include in pokemonList array\n addToPokemonArray(pokemon);\n });\n })\n .catch((err) => console.error(err));\n }", "title": "" }, { "docid": "5a43eb941852ceebb2065949e0aa92e3", "score": "0.5960954", "text": "function loadList() {\n\t\treturn fetch(apiURL)\n\t\t\t.then(function (response) {\n\t\t\t\treturn response.json();\n\t\t\t})\n\t\t\t.then(function (json) {\n\t\t\t\tjson.results.forEach(function (item) {\n\t\t\t\t\tlet pokemon = {\n\t\t\t\t\t\tname: item.name,\n\t\t\t\t\t\tdetailsUrl: item.url,\n\t\t\t\t\t};\n\t\t\t\t\tadd(pokemon);\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(function (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t});\n\t}", "title": "" }, { "docid": "8cd0f0a58528560d9e3dd3ae3be93bce", "score": "0.59487486", "text": "function parsePokedex($container, pokedex) {\n // Begin the unordered list\n var $ul = $('<ul class=\"list list-inline\">');\n\n // Loop over this for every pokemon\n for (var pokemon in pokedex) {\n var $li = $('<li class=\"pokemon-card\">'); // Start the item for the pokemon\n // Print the name of the pokemon as a H1 class name\n $li.append('<h3 class=\"name\"><span class=\"name\">' + pokemon + '</span><small class=\"id\"> #' + pokedex[pokemon][\"num\"] + '</small></h3>');\n // -- Abilities -- \n $li.append('<div class=\"ability-container\"><h4>Abilities</h4>' + (function(pokedex, pokemon) {\n var abilities = [];\n for (var ability in pokedex[pokemon][\"abilities\"]) {\n if (ability == \"0\") {\n abilities.push('<span class=\"abilitiy\"> '+ pokedex[pokemon][\"abilities\"][ability] +'</span>');\n }\n if (ability == \"1\") {\n abilities.push('<span class=\"abilitiy\"> '+ pokedex[pokemon][\"abilities\"][ability] +'</span>');\n }\n if (ability == \"h\") {\n abilities.push('<span class=\"hidden-ability abilitiy\"> '+ pokedex[pokemon][\"abilities\"][ability] +'</span>');\n }\n }\n return abilities;})(pokedex, pokemon) + '</div>');\n // -- Abilities --\n \n // Print the types of the pokemon\n $li.append('<div class=\"types-container\"><h4>Type(s)</h4> <span class=\"types\">' + pokedex[pokemon][\"types\"].join(\", \") + \"</span></div>\");\n\n // -- Weaknesses --\n var superEffective = [];\n var ultraEffective = [];\n var kindaResistant = [];\n var ultraResistant = [];\n var immune = [];\n var content = '<h4>Effectivness</h4><div class=\"weakness-container\"><table class=\"table-bordered weakness-table\">';\n for (var i = 0; i < types.length; i++) {\n if (pokedex[pokemon][\"types\"][1]) {\n if (weaknesschart[pokedex[pokemon][\"types\"][0]][types[i]] == 3|| weaknesschart[pokedex[pokemon][\"types\"][1]][types[i]] == 3) {\n immune.push(types[i]);\n } else {\n var typeSum = weaknesschart[pokedex[pokemon][\"types\"][0]] [types[i]] + weaknesschart[pokedex[pokemon][\"types\"][1]][types[i]];\n }\n } else {\n if (weaknesschart[pokedex[pokemon][\"types\"][0]][types[i]] == 3) {\n immune.push(types[i]);\n } else {\n var typeSum = weaknesschart[pokedex[pokemon][\"types\"][0]][types[i]];\n }\n }\n if (typeSum == 1) {\n superEffective.push(types[i]);\n } else if (typeSum == -1) {\n kindaResistant.push(types[i]);\n } else if (typeSum == -2) {\n ultraResistant.push(types[i]);\n } else if (typeSum == 2) {\n ultraEffective.push(types[i]);\n }\n }\n content += '<tr><td> Super Weak </td> <td>' + ultraEffective.join(\", \") + \"</td></tr>\";\n content += '<tr><td> Weak </td> <td>' + superEffective.join(\", \") + \"</td></tr>\";\n content += '<tr><td> Resistant </td> <td>' + kindaResistant.join(\", \") + \"</td></tr>\";\n content += '<tr><td> Super Resistant </td> <td>' + ultraResistant.join(\", \") + \"</tr>\";\n content += '<tr><td> Immune </td> <td>' + immune.join(\", \") + \"</tr>\";\n content += \"</table></div>\";\n $li.append(content);\n // -- Weaknesses --\n\n // Egg groups\n $li.append('<div class=\"egg-container\"><h4> Egg Group(s)</h4> <span class=\"egg-groups\">' + pokedex[pokemon][\"egg groups\"].join(\", \") + \"</span>\");\n // Create some base stat bars\n $li.append('<table class=\"stat-container\"><tr><td>HP: </td><td style=\"width:20\">' + makeStatBar(pokedex[pokemon][\"base stats\"][\"hp\"], \"#FF5050\") + \"</td></tr>\"\n + '<tr><td>Attack: </td><td>' + makeStatBar(pokedex[pokemon][\"base stats\"][\"atk\"], \"#FF9933\") + \"</td></tr>\"\n + '<tr><td>Defence: </td><td>' + makeStatBar(pokedex[pokemon][\"base stats\"][\"def\"], \"#FFFF94\") + \"</td></tr>\"\n + '<tr><td>Sp. Atk: </td><td>' + makeStatBar(pokedex[pokemon][\"base stats\"][\"spa\"], \"#0099FF\") + \"</td></tr>\"\n + '<tr><td>Sp. Def: </td><td>' + makeStatBar(pokedex[pokemon][\"base stats\"][\"spd\"], \"#0033CC\") + \"</td></tr>\"\n + '<tr><td>Speed: </td><td>' + makeStatBar(pokedex[pokemon][\"base stats\"][\"spe\"], \"#00CC00\") + \"</td></tr></table>\");\n // Create some Gender Ratio Bars\n if (pokedex[pokemon][\"gender ratio\"]){\n // if they have a gender ratio value, create a bar filled with blue to the percent male, therefore leaving the rest pink\n $li.append('<div class=\"gender-container\"><h4>Gender</h4>' + makeGenderBar(pokedex[pokemon][\"gender ratio\"][\"m\"]*100, '#3399FF', '#FF99CC'));\n // If the pokemon has a gender value (and therefore is all one gender)\n } else if (pokedex[pokemon][\"gender\"]) {\n // If they are all male, make an all male bar\n if (pokedex[pokemon][\"gender\"] == \"m\") {\n $li.append('<div class=\"gender-container\"><h4>Gender</h4>' + makeGenderBar(100, '#3399FF', '#FF99CC')+ '</div>');\n // If they are all female, make an all female bar\n } else if (pokedex[pokemon][\"gender\"] == \"f\"){\n $li.append('<div class=\"gender-container\"><h4>Gender</h4>' + makeGenderBar(0, '#3399FF', '#FF99CC')+ '</div>');\n // If they dont have either then make a genderless bar\n } else {\n $li.append('<div class=\"gender-container\"><h4>Gender</h4>' + makeGenderBar()+ '</div>');\n }\n // If they dont have a gender or a gender ratio then they are 50/50, make a 50% male bar\n } else {\n $li.append('<div class=\"gender-container\"><h4>Gender</h4>' + makeGenderBar(50, '#3399FF', '#FF99CC')+ '</div>');\n }\n $ul.append($li); // Add the item to the list\n }\n $container.append($ul); // Add the list to the div\n}", "title": "" }, { "docid": "54e57af705a6fb70c435304274359047", "score": "0.5924822", "text": "function handlePokemonList(data) {\n if (data.results) {\n data.results.forEach(pokemon => {\n let pokemonId = extractPokemonId(pokemon.url);\n let name = pokemon.name;\n getPokemonDetails(pokemonId, (pokemonInf) => {\n pokemons.push(pokemonInf);\n\n let pokemonImgUrl = pokemonInf.sprites.front_shiny;\n\n let template = `<div id=\"pokemonId_${pokemonId}\" class=\"pokemonPoster\">\n <img src=\"${pokemonImgUrl}\" class=\"image\" id=\"pokemonId_${pokemonId + '_' + name}\">\n <div class=\"pokemonName\">${name}</div>\n <div id=\"pokemonName_${name}\" class=\"pokemonButton\"></div> </div>`;\n $('#pokemonContainer').append(template);\n\n pokemonInf.types.forEach(typePokemon => {\n let pokemonTypeName = typePokemon.type.name;\n\n let template_ = `<input \n id=\"pokemonId_${pokemonId + '_' + pokemonTypeName}\"\n type=\"button\" \n class=\"${pokemonTypeName}Type type\" \n value=\"${pokemonTypeName === 'unknown' ? '???' : pokemonTypeName}\"></input>`;\n $(`#pokemonName_${name}`).append(template_); \n });\n\n $(`#pokemonId_${pokemonId}`).click(pokemonSkills);\n })\n });\n }\n }", "title": "" }, { "docid": "a1c9a61b65bec41980c103e6bd6ef858", "score": "0.59005743", "text": "async function getPokemonDetails(indexObjects) {\n let pokemonArr = [];\n\n for (let result of indexObjects) {\n let { url } = result;\n let pokemonRes = await fetch(url);\n let pokemonJson = await pokemonRes.json();\n pokemonArr.push(pokemonJson);\n\n }\n\n return pokemonArr;\n }", "title": "" }, { "docid": "11732058d9c9d31e6bb47942c124a9e8", "score": "0.5892837", "text": "function loadList() {\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n });\n }", "title": "" }, { "docid": "a9a2cfdff23f650ec2467e1fd3ff32ae", "score": "0.58876824", "text": "displayPokemon() {\n\t\tconst { queried_pokemon, pokemon_to_display } = this.props.pokemon;\n\n\t\tif (queried_pokemon.length > 0) {\n\t\t\treturn queried_pokemon.map(function (pokemon) {\n\t\t\t\treturn <PokemonCard pokemon={pokemon} key={pokemon.entry_number} />;\n\t\t\t});\n\t\t} else {\n\t\t\treturn pokemon_to_display.map(function (pokemon) {\n\t\t\t\treturn <PokemonCard pokemon={pokemon} key={pokemon.entry_number} />;\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "afb2ebbbf132517ac45851be504093fd", "score": "0.5881357", "text": "function getAllPokemonCallback(response){\n var pokeRay = response.results\n\n pokeRay.forEach(function(pokemon) {\n getSinglePokemon(pokemon.name, function(data) {\n pokemonImage(data);\n pokemonAbilities(data);\n addPokemonToPage(data.name, data.sprites.front_default, data.abilities);\n })\n })\n}", "title": "" }, { "docid": "a3a41f0b82c006e37f228bea21a3773f", "score": "0.587976", "text": "function loadList() {\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "a3a41f0b82c006e37f228bea21a3773f", "score": "0.587976", "text": "function loadList() {\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "a7afa30e9925db8cbc4c70dfa5aeff6f", "score": "0.5877204", "text": "function getPokemon (req,res){\n const pokeUrl = `https://pokeapi.co/api/v2/pokemon?limit=20&offset=0`;\n\n superagent.get(pokeUrl)\n .then(result => {\n let list = result.body.results;\n\n list.sort((a,b) => {\n if(a.name < b.name){\n return -1;\n } else if (a.name > b.name){\n return 1;\n } else {\n return 0;\n }\n });\n\n res.render('./show', {pokemon : list});\n })\n .catch(error => console.log(error));\n}", "title": "" }, { "docid": "08982db325d635414fb012a64733332f", "score": "0.5873666", "text": "function loadList() {\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (item) {\n let pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "08982db325d635414fb012a64733332f", "score": "0.5873666", "text": "function loadList() {\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (item) {\n let pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "08982db325d635414fb012a64733332f", "score": "0.5873666", "text": "function loadList() {\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (item) {\n let pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "16996269d6f1084f1270b55587844268", "score": "0.5870645", "text": "function loadList() {\n return $.ajax(apiUrl)\n .then(function(items) {\n $.each(items.results, function(item) {\n var poke = items.results[item];\n var pokemon = {\n name: poke.name,\n detailsUrl: poke.url\n };\n //adds the retrived data to the repository\n add(pokemon);\n });\n })\n .catch(function(e) {\n /* eslint-disable no-console */\n console.error(e);\n /* eslint-enable no-console */\n });\n }", "title": "" }, { "docid": "cec289eba26076bc0925bc9efaee1152", "score": "0.58578575", "text": "async function getPokemonStats(pokemon) {\n await fetch(pokemon.url)\n .then(response => response.json())\n .then(data => output = data.stats);\n //console.log(output);\n return output.map((item) => {\n //console.log(item);\n return `${item.stat.name}: ${item.base_stat}`;\n });\n}", "title": "" }, { "docid": "b5825956791659983a8cf55736d0cc9b", "score": "0.5842754", "text": "function getPokemon() \n{\n //use function callback to load json file \n loadJSON(function(response) \n {\n // Parse JSON string into object\n var pokemonData = JSON.parse(response);\n \n //displayData(pokemonData);\n findByName(pokemonData,\"Ivysaur\");\n isNextEvolution(pokemonData,\"Venusaur\");\n isWeakness(pokemonData,\"Fire\");\n \n });\n}", "title": "" }, { "docid": "b1d32b67efca05d8069c46220e26e628", "score": "0.5840657", "text": "function getPokemonData(name, index) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', 'https://pokeapi.co/api/v2/pokemon/' + name);\n xhr.responseType = 'json';\n xhr.addEventListener('load', () => {\n\n if (index <= 10) playersPicksObj.player1[index] = xhr.response;\n else playersPicksObj.player2[index] = xhr.response;\n\n });\n xhr.send();\n}", "title": "" }, { "docid": "81e3963ab7e3b88ba5ab9b763c8e9493", "score": "0.58382696", "text": "function fetchPokemons() {\n fetch(\"https://pokeapi.co/api/v2/pokemon?limit=151\") //fetchs 151 pokes, the annoying thing is we have to wait for too many requisitions, I don't think this API has a way around it with a single request, at least I can't see it in the documentation, so we've restricted it to the Kanto Era;\n .then((dataBlob) => dataBlob.json())\n .then((allpokemons) => {\n allpokemons.results.forEach((pokemon) => fetchPokemonData(pokemon));\n allpokemons.results.forEach((pokemon) =>\n allNames.push(\n pokemon.name.charAt(0).toUpperCase() +\n pokemon.name.slice(1).toLowerCase()\n )\n ); // it \"renders\" an array with all the pokémon's name we'll be using, it's here because dealing with the pokeData to do so became troublesome because the way the API utilizes the nested objects\n });\n // getting each Poke's data themselves\n function fetchPokemonData(pokemon) {\n let url = pokemon.url;\n fetch(url)\n .then((dataBlob) => dataBlob.json())\n .then((pokeData) => {\n pokeData.name =\n pokeData.name.charAt(0).toUpperCase() + pokeData.name.slice(1); //adjusts the first letter to uppercase\n usefulData.push(pokeData);\n displaysAllPokemons(); // initially showcases our Pokémons\n });\n }\n}", "title": "" }, { "docid": "59ad35fc33ccdcfa578cde85a36042ed", "score": "0.5831633", "text": "function setOptions() {\n var deferred = new Deferred();\n let pokenombres = [];\n return request.get(`https://pokeapi.co/api/v2/pokemon/?limit=-1`, {\n handleAs: \"json\"\n })\n .then(\n function(response) {\n\n listaPokemon = response.results;\n\n //listaPokemon = response.results;\n let cont = 1;\n const nombres = listaPokemon.map((pokemon) => pokemon.name).forEach(element => {\n pokenombres.push({\n\n name: element,\n value: element\n });\n cont++;\n });\n return pokenombres\n })\n return pokenombres\n }", "title": "" }, { "docid": "9e2fa5685b8356e38e12b66a88d4963b", "score": "0.5813571", "text": "findNames(n) {\n return fetch(`https://pokeapi.co/api/v2/pokemon/?limit=${n}`)\n .then((Response) => {\n return Response.json();\n\n })\n .then((json) => {\n return json.results.map((jsonElement) => {\n return jsonElement[\"name\"];\n });\n })\n \n }", "title": "" }, { "docid": "4ff32d6eab621dc418eb68256c091912", "score": "0.58058083", "text": "function generateArray(enemy, enemyPkm, myPkm) {\n enemy[0] = \"JK\";\n enemy[1] = \"CRONG\";\n enemy[2] = \"POBI\";\n enemy[3] = \"HONUX\";\n\n var mon0 = new makePokemon(\"캐터피\", 50, 50, 10, \"Caterpie.gif\");\n var mon1 = new makePokemon(\"이브이\", 150, 150, 60, \"Eevee.gif\");\n var mon2 = new makePokemon(\"꼬부기\", 200, 200, 60, \"Squirtle.gif\");\n var mon3 = new makePokemon(\"이상해씨\", 220, 220, 60, \"Bulbasaur.gif\");\n var mon4 = new makePokemon(\"파이리\", 250, 250, 60, \"Charmander.gif\");\n var mon5 = new makePokemon(\"고라파덕\", 50, 50, 300, \"Psyduck.gif\");\n var mon6 = new makePokemon(\"피카츄\", 300, 300, 100, \"pikachu.gif\");\n var mon7 = new makePokemon(\"우츠보트\", 500, 500, 150, \"uchboat.gif\");\n var mon8 = new makePokemon(\"잠만보\", 1000, 1000, 100, \"zambo.png\");\n var mon9 = new makePokemon(\"갸라도스\", 1500, 1500, 400, \"gara.png\");\n var mon10 = new makePokemon(\"[보스]호눅스\", 3000, 3000, 1200, \"honux.png\");\n\n var myMon0 = new makePokemon(\"피카츄\", 300, 300, 120, \"pikachuBack.png\");\n var myMon1 = new makePokemon(\"파이리\", 100, 100, 100, \"charmanderBack.png\");\n var myMon2 = new makePokemon(\"꼬부기\", 300, 300, 100, \"squirtleBack.png\");\n var myMon3 = new makePokemon(\"이상해씨\", 300, 300, 100, \"bulbasaurBack.png\");\n var myMon4 = new makePokemon(\"망나뇽\", 3000, 3000, 2000, \"boss.png\");\n\n enemyPkm[0] = mon0;\n enemyPkm[1] = mon1;\n enemyPkm[2] = mon2;\n enemyPkm[3] = mon3;\n enemyPkm[4] = mon4;\n enemyPkm[5] = mon5;\n enemyPkm[6] = mon6;\n enemyPkm[7] = mon7;\n enemyPkm[8] = mon8;\n enemyPkm[9] = mon9;\n enemyPkm[10] = mon10;\n\n myPkm[0] = myMon0;\n myPkm[1] = myMon1;\n myPkm[2] = myMon2;\n myPkm[3] = myMon3;\n myPkm[4] = myMon4;\n}", "title": "" }, { "docid": "8f8e078efda24105f8ec3597b66b9e62", "score": "0.58052665", "text": "function populateSelect(pokemons) {\n // sorts the list of Pokemon by their ID\n const pokemonList = pokemons.sort((a, b) => a.id - b.id);\n const options = pokemonList.map(pokemon => {\n // pads the ID string with 0's\n let paddedId = pokemon.id.toString().padStart(3, '0');\n return <option key={pokemon.id} value={pokemon.id}>{`${paddedId} - ${pokemon.name}`}</option>;\n });\n\n return options;\n}", "title": "" }, { "docid": "f44babe5f6fc8ba6089bffcf58df2cc4", "score": "0.5801113", "text": "function Pokemons(pokemon) {\n this.name = pokemon.name,\n this.gen = pokemon.gen,\n this.type = pokemon.type,\n this.region = pokemon.region,\n this.evolution = pokemon.evolution\n }", "title": "" }, { "docid": "1babc16be3464a489d9eae19f008dbdf", "score": "0.5794624", "text": "function loadList() {\n return fetch(apiUrl)\n .then(function (response) {\n return response.json();\n })\n .then(function (json) {\n json.results.forEach(function (item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url,\n };\n add(pokemon);\n });\n })\n .catch(function (e) {\n console.error(e);\n });\n }", "title": "" }, { "docid": "1c8328db83a2f8cff445d006912a5676", "score": "0.5783106", "text": "async function getPokemonName() {\n try {\n const res = await axios.get(`${url}${randomNum()}`);\n console.log(res.data.name);\n quotes_array.push(res.data.name);\n quotes_array.push(res.data.types[0].type.name)\n } catch (error) {\n console.log(error);\n }\n\n}", "title": "" }, { "docid": "5344a1fd9dbadd78b92febac0f3dedc4", "score": "0.57817906", "text": "function addPokemonToPage(pokemonObj){\n var $pokeLi = $(\"<li></li>\");\n var $movesList = $('<ul class=\"moves-list\"></ul>');\n var abilArr = pokemonObj.abilities;\n var pokeName = pokemonObj.name;\n var pokeSprite = pokemonObj.sprites.front_default;\n\n abilArr.forEach(function(abilityObj) {\n $movesList.append('<li>' + abilityObj.ability.name + '</li>');\n })\n\n $pokeLi.append(\"<h1>\" + pokeName + \"</h1>\");\n $pokeLi.append('<img src=\"' + pokeSprite + '\" alt=\"' + pokeName + '\" style=\"display: block;\" />');\n $pokeLi.append($movesList);\n $(\"#pokemon-list\").append($pokeLi);\n\n}", "title": "" }, { "docid": "5559a53324e1a1184980e8ccb44fac2c", "score": "0.5778977", "text": "searchPokemon(query) {\n const setState = this.setState.bind(this);\n const axios = require('axios');\n\n // Pokemon objects put into this array\n var array = [];\n\n axios.get(\"https://intern-pokedex.myriadapps.com/api/v1/pokemon?name=\" + query)\n .then(function (response) {\n for (var i = 0; i < response.data.data.length; i++) {\n var pokemon = response.data.data[i];\n var types = [];\n\n // get pokemon's types\n for (var index in pokemon.types) {\n types.push(pokemon.types[index]);\n }\n\n // push all attributes and types to array\n array.push([pokemon.id, pokemon.image, pokemon.name, types]);\n }\n\n setState({ data: array });\n });\n }", "title": "" }, { "docid": "9f8ebf5eb26f3f3635c38e839c98cc5d", "score": "0.57784617", "text": "function loadList() {\n return fetch(apiUrl)\n .then(function (response) {\n return response.json();\n })\n .then(function (json) {\n json.results.forEach(function (item) {\n let pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n })\n .catch(function (e) {\n console.error(e);\n });\n }", "title": "" }, { "docid": "e513e9f52c7bf4a9db361983eb7693ee", "score": "0.5758735", "text": "function _getPantries() {\n\n }", "title": "" }, { "docid": "5fb0898957846f2c58d3bf692a4f6f18", "score": "0.5741279", "text": "getCollidables(){\n let collidables = [];\n let pegsList = this.getAllPegMesh();\n\n this.cylinders.forEach(function(cylinder, index){\n let individualList = []; //list for each cylinder\n if (cylinder.mesh.children.length > 0){ //check it has more than 0 pegs\n pegsList.forEach(function(peg){\n if (cylinder.getPeg(peg.uuid) === undefined){ //if its not the cylinders own peg\n individualList.push(peg);\n }\n });\n }\n collidables.push(individualList);\n });\n console.log(collidables);\n return collidables;\n }", "title": "" }, { "docid": "f59c56d387256bf12452ce02c1f15951", "score": "0.5740881", "text": "function loadList() {\n showLoadingMessage();\n return fetch(apiUrl).then(function (response){\n return response.json();\n }).then(function (json) {\n hideLoadingMessage();\n json.results.forEach(function (item){\n let pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e){\n hideLoadingMessage();\n console.error(e);\n })\n }", "title": "" }, { "docid": "328e4e97a133255e54bd40213bdd9566", "score": "0.5738298", "text": "function results(index) {\n return \"ID: \" + pokemons.pokemon[index].id + \"\\nName: \" + pokemons.pokemon[index].name + \"\\n\\n\";\n\n}", "title": "" }, { "docid": "2c657dd9270920033f2f114cdc5b192e", "score": "0.573063", "text": "function preparePlayersData() {\n return globals.playerController.getPlayerList();\n}", "title": "" }, { "docid": "ae5d59ed37c03f0ada420d58b6a5548e", "score": "0.57293814", "text": "function loadList() {\n showLoadingMessage();\n return fetch(apiUrl)\n .then(function(response) {\n return response.json();\n })\n .then(function(json) {\n json.results.forEach(function(item) {\n let pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n hideLoadingMessage();\n });\n })\n .catch(function(e) {\n console.error(e);\n });\n }", "title": "" }, { "docid": "3d1ea64909ed94b7d89a9dd82e46e1ad", "score": "0.5725532", "text": "pungController(tileCode) {\n const arr = [];\n \n const tilesToPung = this.hand.main.filter(tile => {\n return tile.code.includes(this.getTileCodePrefix(tileCode) + this.getTileCodeNumber(tileCode))\n });\n\n if (tilesToPung.length >= 2) arr.push(tilesToPung[0], tilesToPung[1]);\n\n return arr;\n }", "title": "" }, { "docid": "50af7747498faef0fae9f27b7f2c5713", "score": "0.5716522", "text": "function loadList() {\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n json.results.forEach(function (item) {\n var pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "e7680c19169f06d0fc157aa7446c5071", "score": "0.5713963", "text": "function fetchPokemonData(pokemon) {\n let url = pokemon.url;\n fetch(url)\n .then((dataBlob) => dataBlob.json())\n .then((pokeData) => {\n pokeData.name =\n pokeData.name.charAt(0).toUpperCase() + pokeData.name.slice(1); //adjusts the first letter to uppercase\n usefulData.push(pokeData);\n displaysAllPokemons(); // initially showcases our Pokémons\n });\n }", "title": "" }, { "docid": "206ef10df7398accf38e3206f124401b", "score": "0.57086515", "text": "function ListOfPokemons(offset, limit) {\r\n $('#load-more').append(\"<i class='fa fa-spinner fa-spin' style='font-size:24px' id='spinner'></i>\");\r\n $.getJSON(pokeAPI + \"?limit=\" + limit + \"&offset=\" + offset, {\r\n format: \"json\"\r\n })\r\n .done(function (pokemonsList) {\r\n $.each(pokemonsList.objects, function (i, item) {\r\n $(\"#pokemons-container\")\r\n .append(\"<div class='col-lg-4 col-md-4 col-xs-6 col-sm-6'><div class='margin-wrap' data-id = \"\r\n + item.national_id + \"> <img src=\"\r\n + imageSource + item.national_id\r\n + \".png id='poke-image'><h4>\"\r\n + item.name + \"</h4><div class='types' id=\" + item.name + \"></div></div></div>\");\r\n\r\n for (var i = 0; i < item.types.length; i++) {\r\n $(\"#\" + item.name).append(\"<span class ='label label-primary pokemon-type' id =\"\r\n + item.types[i].name + \">\"\r\n + item.types[i].name + \"</span>\");\r\n }\r\n });\r\n $(\"#spinner\").remove();\r\n });\r\n\r\n}", "title": "" }, { "docid": "b7c8fefd8e43df0059a08bcafbffd3ba", "score": "0.5706917", "text": "function loadList() {\n loadMessage();\n return fetch(apiUrl).then(function (response) {\n return response.json();\n }).then(function (json) {\n removeMessage();\n json.results.forEach(function (item) {\n let pokemon = {\n name: item.name,\n detailsUrl: item.url\n };\n add(pokemon);\n });\n }).catch(function (e) {\n console.error(e);\n })\n }", "title": "" }, { "docid": "77d45592ef7bec6dc09cd47e72b94440", "score": "0.5703258", "text": "returnPlayersBoxArray() {\n\n let player_box = [];\n if(this.game_mod.seats) {\n player_box = this.game_mod.seats;\n } else {\n if (this.game_mod.game.players.length == 2) { player_box = [1, 4]; }\n if (this.game_mod.game.players.length == 3) { player_box = [1, 3, 5]; }\n if (this.game_mod.game.players.length == 4) { player_box = [1, 3, 4, 5]; }\n if (this.game_mod.game.players.length == 5) { player_box = [1, 2, 3, 5, 6]; }\n if (this.game_mod.game.players.length == 6) { player_box = [1, 2, 3, 4, 5, 6]; } \n }\n\n return player_box;\n }", "title": "" }, { "docid": "4cb6c3de375ea85f6e01462273e4f522", "score": "0.569042", "text": "function catchPokemon(pokeNameOrIdNumber){\n //must return the result of the ajax call\n return $.ajax({\n url: \"https://pokeapi.co/api/v2/pokemon/\" + pokeNameOrIdNumber,\n success: function(response){\n //populate the pokeHash with the ajax response\n pokeHash.name = response.name\n pokeHash.image = response.sprites.front_default\n pokeHash.pokeNum = response.id\n pokeHash.types = response.types.map(function(type){return type.type.name})\n pokeHash.height = response.height\n pokeHash.weight = response.weight\n getAbilities(response)\n getStats(response)\n //create a new pokemon\n let pokemon = new Pokemon(pokeHash)\n //clear the array of stats so that it's specific to the pokemon (REFACTOR?)\n pokeHash.stats = []\n pokeHash.abilities = []\n //return the pokemon\n pokeArray.push(pokemon)\n console.log(pokemon)\n },\n error: function(error){\n console.log(error)\n }\n })\n}", "title": "" }, { "docid": "b44a4b1123227d81756ed4df5d9af3df", "score": "0.5690246", "text": "function adopt() {\n totalPokemon++;\n pokemonGet.push(pokemon);\n alert(\"You have \" + totalPokemon + \" pokemon\")\n checkList();\n}", "title": "" }, { "docid": "97c9061d39b3e6ee050d59b756ff24f0", "score": "0.5690104", "text": "function obj2array(maxPplLoc){\n console.log(\"1111111111111\"+ JSON.stringify(maxPplLoc))\n var list = maxPplLoc[1].list\n var objarray = []\n for(let i=0;i<list.length;i++){\n var temp = list[i].split(\"cnt:\")\n var ele = {\n \tteamid:temp[0],\n\tnum:temp[1]\n }\n objarray.push(ele)\n }\n console.log(\"print objarray:\"+JSON.stringify(objarray))\n return objarray\n}", "title": "" }, { "docid": "8310ee1992e64a55d4cb95b63ea31631", "score": "0.56867456", "text": "getFilteredListOfPokemon(filterType, filterCriteria) {\n let filteredPokemonList = [];\n this.getAllowedPokemonFamilies().forEach((pokemonFamily) => {\n pokemonFamily.forEach((individualPokemon) => {\n try {\n let criteria = individualPokemon[filterType] === filterCriteria;\n if (filterType === 'meta') {\n let pokemonFilterTypes = individualPokemon[filterType].split(',');\n criteria = pokemonFilterTypes.includes(filterCriteria)\n }\n if (criteria || (filterType === 'candy' && filterCriteria === '>100' && individualPokemon['candy'] > 100)) {\n filteredPokemonList.push(individualPokemon.number);\n }\n } catch (e) {\n console.error(e);\n console.error(individualPokemon);\n }\n })\n })\n\n return filteredPokemonList;\n }", "title": "" }, { "docid": "9bb634c6af458281a8d6940774113bcf", "score": "0.5673708", "text": "function pokemons(offset, limit){\r\n for (var i = offset; i <= offset+limit; i++) {\r\n \t//Se llama a la funcón crearPokemon por cada ciclo\r\n \tcrearPokemon(i);\r\n }\t\r\n}", "title": "" }, { "docid": "1370fb596c885eb92d17cecba8b0e4c1", "score": "0.56719977", "text": "function getTypes(name) { \r\n for(var i = 0; i < pokemonData.length; i++) { \r\n if(name == pokemonData[i].name) { \r\n return pokemonData[i].types;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "95c36d15e0f2936ddb522c511477320c", "score": "0.56686556", "text": "function addToPokemonArray(pokemon) {\n //ensure only objects are added to pokemonRepository\n if (typeof pokemon == 'object') {\n //keyVal is array that holds keys of pokemon object\n let keyVal = Object.keys(pokemon);\n //ensure keyVal array includes keys 'name' and 'detailsUrl'\n if (keyVal.includes('name') && keyVal.includes('detailsUrl')) {\n //add pokemon object to pokemonList array\n pokemonList.push(pokemon);\n } else {\n alert('Incorrect JSON keys');\n }\n } else {\n alert('All items in pokemonRepository must be objects!');\n }\n }", "title": "" } ]
3edc5cdff5d9a6f8bf99a784785caf8b
getOwnPropertyNames is almost the same as Object.keys one key feature is that it returns hidden properties, since that can't be implemented, this feature gets reduced so it just shows the length property on arrays
[ { "docid": "1db8eba16b39ea29b53f53b600027796", "score": "0.6942999", "text": "function propertyShim(object) {\n\t if (notObject(object)) {\n\t throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n\t }\n\n\t var result = keysShim(object);\n\t if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n\t result.push('length');\n\t }\n\t return result;\n\t}", "title": "" } ]
[ { "docid": "b3092031a7a05203771bc776ee896d5d", "score": "0.7669976", "text": "function Object_getOwnPropertyNames_demo() {\n // properties added directly to the object are enumerable\n let student = {\n age: 21,\n name: 'Bob',\n greeting: function() { return `Hi, my name is ${this.name}.`; }\n };\n student['department'] = 'computer science';\n student.surname = 'Johnson';\n\n log(student.greeting()); // Hi, my name is Bob.\n\n log(Object.getOwnPropertyNames(student)); // age,name,greeting,department,surname\n log(Object.keys(student)); // age,name,greeting,department,surname\n\n // add read-only, non-enumerable property\n Object.defineProperty(student, 'yearOfAdmission', { value : 2012, writable : false } );\n // getOwnPropertyNames returns non-enumerable properties as well\n log(Object.getOwnPropertyNames(student)); // age,name,greeting,department,surname,yearOfAdmission\n // Object.keys (and for..in) does not return non-enumerable properties\n log(Object.keys(student)); // age,name,greeting,department,surname\n\n log('');\n //log(Object.getOwnPropertyNames(student.));\n\n\n log('');\n\n log(Object.getOwnPropertyNames('test')); // 0,1,2,3,length\n log(Object.getOwnPropertyNames([111, 222, 333])); // 0,1,2,length\n log(Object.getOwnPropertyNames(String)); // length,name,prototype,fromCharCode,fromCodePoint,raw\n log(Object.getOwnPropertyNames(new String())); // length\n log(Object.getOwnPropertyNames(new String('test'))); // 0,1,2,3,length\n}", "title": "" }, { "docid": "6cd9bdd7e9feaed40b104273177c661c", "score": "0.7225303", "text": "function __getProperties() {\n return [];\n let properties = [];\n for (let name of Object.getOwnPropertyNames()) {;\n }\n return properties;\n}", "title": "" }, { "docid": "13fe8d5e9e5e266156dbe4a46397a9cb", "score": "0.7140168", "text": "function testKeys() {\n var obj = {a: 0};\n Object.defineProperty(obj, 'b', {value: 1, enumerable: false});\n obj.c = 2;\n var names = Object.keys(obj);\n for (var p in names) {\n print(names[p]);\n }\n}", "title": "" }, { "docid": "43085d32f1bff859906096163b4103d8", "score": "0.7088754", "text": "function allOwnKeys(o) {\n return [...Object.getOwnPropertyNames(o),...Object.getOwnPropertySymbols(o)]\n \n}", "title": "" }, { "docid": "76ffc719b27708e9a17b015849a2005a", "score": "0.70550674", "text": "function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}", "title": "" }, { "docid": "bf4a2c527437baa3f13c15cf55c5c844", "score": "0.7030034", "text": "function arrayProperties(object) {\n console.log(Object.keys(object));\n}", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "26b3827576fd6cfacc207cfcecfe719b", "score": "0.702963", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "c219b21cc0110b2c8ff9a926622ecd50", "score": "0.7022233", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "c219b21cc0110b2c8ff9a926622ecd50", "score": "0.7022233", "text": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "3ae403bc1e90a27e37e50385b3a1ea87", "score": "0.6927567", "text": "function nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "035ae72689932d5231ecb2f55cbd6a0f", "score": "0.6896431", "text": "function Toastvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "d7fc5a71c4de8b599a043582c5a2075e", "score": "0.68738276", "text": "function getPropNamesAndSymbols() {\n\t var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t var listOfKeys = Object.getOwnPropertyNames(obj);\n\t return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* isFunction */])(Object.getOwnPropertySymbols) ? listOfKeys.concat(Object.getOwnPropertySymbols(obj)) : listOfKeys;\n\t }", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "5bbd4f08f3f9c0d78ab156bf5f86d3d6", "score": "0.6860431", "text": "function propertyShim(object) {\n if (notObject(object)) {\n throw new TypeError(\"Object.getOwnPropertyNames called on a non-object\");\n }\n\n var result = keysShim(object);\n if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) {\n result.push('length');\n }\n return result;\n}", "title": "" }, { "docid": "3a7b9575dcd971dfb489960d6cf30529", "score": "0.6833716", "text": "function getPropNamesAndSymbols() {\n\t var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t var listOfKeys = Object.getOwnPropertyNames(obj);\n\t return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"c\" /* isFunction */])(Object.getOwnPropertySymbols) ? listOfKeys.concat(Object.getOwnPropertySymbols(obj)) : listOfKeys;\n\t}", "title": "" }, { "docid": "b3edfb23ad7d470478163f882731752f", "score": "0.67999864", "text": "function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}", "title": "" }, { "docid": "b728fcbbef112ab993f11f3c7af4b0d7", "score": "0.6796606", "text": "function CToastervue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "e5ddb140fa8581ab1e403cc5b3e801a7", "score": "0.67804205", "text": "function im(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "fe239c6e71d7baec51a0b9fa0000cc79", "score": "0.6729028", "text": "function ki(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "e44bbcdbafd88fe52fe2092c58283a41", "score": "0.67083573", "text": "function Nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "b189f81c9b891d1cae137dca751fa5b1", "score": "0.6703828", "text": "function keys$1(obj) {\n if (!isObject$1(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var _keys = [];\n\n for (var key in obj) if (_has(obj, key)) _keys.push(key); // Ahem, IE < 9.\n\n\n if (hasEnumBug) collectNonEnumProps(obj, _keys);\n return _keys;\n } // Retrieve all the property names of an object.", "title": "" }, { "docid": "3c297b6062a65fca0f81b440579e4848", "score": "0.66651076", "text": "function qv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "8d020a045a8ee6ffcda6ef34c4bd7251", "score": "0.6665005", "text": "function Di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "24bb5b78857dda38023d47707f8e9d56", "score": "0.6654118", "text": "function jv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "55c1fb52d46d652841137f52e18dcf50", "score": "0.6639732", "text": "function _keys(obj) {\n //method returns an array of a given object's own property names.\n if (Object.keys)\n return Object.keys(obj);\n var keys = [];\n for (var key in obj)\n if (obj.has(obj, key))\n keys.push(key);\n return keys;\n}", "title": "" }, { "docid": "c9eb1508aff5fe5143941170d63c2775", "score": "0.6629789", "text": "function dm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "9421e655fefa2eea49d67ccdc5d1bfd1", "score": "0.6612122", "text": "function MultipleSelector_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }", "title": "" }, { "docid": "203ba8e8b7bab04b2dd66950b678fd78", "score": "0.65982604", "text": "function _m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "d89322d1f1eedcf4b39781cb5b02f743", "score": "0.65738255", "text": "getPropertyNames(aObject) {\n\t\tvar keys = ef.getPropertyNames(aObject);\n return keys;\n\t}", "title": "" }, { "docid": "d56167faab387c6dd7b14fd1d947377d", "score": "0.6569591", "text": "function keys(o)\n {\n \tif(typeof o !== \"object\") throw TypeError();\n \tvar result = [];\n \tfor(var prop in o){\n \t\tif(o.hasOwnProperty(prop))\n \t\t\tresult.push(prop);\n \t}\n \treturn result;\n }", "title": "" }, { "docid": "6acea7bb238ee740d9d606c8c3950df6", "score": "0.65695757", "text": "function Kc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}", "title": "" }, { "docid": "01ca3a8876c74a17d91e74a6147823a0", "score": "0.6560546", "text": "function Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "b88ddf30fb8d3c190a8f34f478b394ee", "score": "0.65600437", "text": "function jH(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}", "title": "" }, { "docid": "4cda281f50d8e1a5695d489bfdd62e95", "score": "0.65582746", "text": "function Qv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "136427008c9d05a2f268e2a6ccb5b310", "score": "0.65567803", "text": "function getPlainObjectKeys(object) {\n var keys = Object.keys(object); // Not supported in IE, so there are not going to be symbol props anyway...\n\n if (!hasGetOwnPropertySymbols) return keys;\n var symbols = Object.getOwnPropertySymbols(object);\n if (!symbols.length) return keys;\n return [].concat(keys, symbols.filter(function (s) {\n return objectPrototype.propertyIsEnumerable.call(object, s);\n }));\n } // From Immer utils", "title": "" }, { "docid": "53cbb32213f3922ff5c71d11e8e25862", "score": "0.6538675", "text": "function keys(o) {\n var a = [];\n for (var i in o) {\n if (o.hasOwnProperty(i) !== true) continue;\n a.push(i);\n }\n return a;\n}", "title": "" }, { "docid": "1b22a61711eb83fcb4021924599a61bf", "score": "0.65291476", "text": "function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"nonEnumerableProp\", {\n value: 10,\n enumerable: false,\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(obj);\n\n return result[0] === \"nonEnumerableProp\";\n }", "title": "" }, { "docid": "e9a0c52a9ff428c73c1ec8921002f833", "score": "0.65252215", "text": "function dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "d83f12f8057a66029c2bb26945d69a47", "score": "0.65226847", "text": "function hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "9ed6a3583dce002252e834168af33f08", "score": "0.6516434", "text": "function cm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "fc4fe736fb8e9636b05e92b695470471", "score": "0.6503172", "text": "function _keys(obj){\n\t\tif (!isObject(obj)) return [];\n\t\tif (Object.keys) return Object.keys(obj);\n\t\tvar keys = [];\n\t\tfor (var key in obj) if (_has(obj, key)) keys.push(key);\n\t\t// Ahem, IE < 9.\n\t\t// if (hasEnumBug) collectNonEnumProps(obj, keys);\n\t\treturn keys;\n\t}", "title": "" }, { "docid": "72c0d144a4132a9de42ebd931f147747", "score": "0.64805067", "text": "function ji(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "1806551b206cba44e6dc870b0d98dbbf", "score": "0.6477172", "text": "function Ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "32c8bbef9491d94acb836999414aec80", "score": "0.6465611", "text": "function Xv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "90094e033fdd7cf2e48a3d5bc19daf71", "score": "0.64625233", "text": "function pm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "7118d4e22744cc0bc77d460b358da3ad", "score": "0.64575636", "text": "function testAllProperty (obj) {\n var getAllPropertyNames = function (_obj) {\n var props = [];\n do {\n props = props.concat(Object.getOwnPropertyNames(_obj));\n } while (_obj = Object.getPrototypeOf(_obj));\n return props;\n }\n var propertys = getAllPropertyNames(obj);\n console.log(propertys.length); //276\n console.log(propertys.join(\"\\n\")); //toString等\n}", "title": "" }, { "docid": "910c1ec626107857e59491785e03bc66", "score": "0.64556557", "text": "function Vg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "383865a32c379fb90c542e57aaa6d04d", "score": "0.6450767", "text": "function Rv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "29c28005144049afdc8c58b35ba8a138", "score": "0.64449304", "text": "function Ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}", "title": "" }, { "docid": "0fc181189089b86cf92d5b1f7f1f4c8d", "score": "0.64329344", "text": "function getPlainObjectKeys(object) {\r\n var enumerables = new Set();\r\n for (var key in object)\r\n enumerables.add(key); // *all* enumerables\r\n Object.getOwnPropertySymbols(object).forEach(function (k) {\r\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\r\n enumerables.add(k);\r\n }); // *own* symbols\r\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\r\n // as there is no efficient iterator that returns *all* properties\r\n return Array.from(enumerables);\r\n}", "title": "" }, { "docid": "0fc181189089b86cf92d5b1f7f1f4c8d", "score": "0.64329344", "text": "function getPlainObjectKeys(object) {\r\n var enumerables = new Set();\r\n for (var key in object)\r\n enumerables.add(key); // *all* enumerables\r\n Object.getOwnPropertySymbols(object).forEach(function (k) {\r\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\r\n enumerables.add(k);\r\n }); // *own* symbols\r\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\r\n // as there is no efficient iterator that returns *all* properties\r\n return Array.from(enumerables);\r\n}", "title": "" }, { "docid": "9707c546cc2f7878032589c582163bb5", "score": "0.64259493", "text": "function og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "87780924e465e36e6cb991046ff43568", "score": "0.64247024", "text": "function Fi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}", "title": "" }, { "docid": "059da42143fe8f88f5be6480c5185748", "score": "0.6419272", "text": "_restrictedMethods() {\n return keys(this.dummyObj);\n }", "title": "" }, { "docid": "db8628ba3f6b400d53d0cbd7ff86859c", "score": "0.6416812", "text": "function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "aac219c4cf4afe76becc19feefd11657", "score": "0.6414525", "text": "function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has$1(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n }", "title": "" }, { "docid": "c7199b7ebe464bdc31184a64c430ea54", "score": "0.64138895", "text": "function keys() {\r\n return Object.keys(index);\r\n }", "title": "" }, { "docid": "c7199b7ebe464bdc31184a64c430ea54", "score": "0.64138895", "text": "function keys() {\r\n return Object.keys(index);\r\n }", "title": "" }, { "docid": "c7199b7ebe464bdc31184a64c430ea54", "score": "0.64138895", "text": "function keys() {\r\n return Object.keys(index);\r\n }", "title": "" }, { "docid": "f9358f26f96d62fe9bb5d938d4eae3d5", "score": "0.6412417", "text": "function keys(obj){\n\treturn Object.keys(obj);\n}", "title": "" }, { "docid": "252d32e7a7f5e707823ee469df6dcec3", "score": "0.64113003", "text": "function Em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "ed6c611e2e3db89128a1de4afc467fc4", "score": "0.6410184", "text": "function keys_keys() {\n var def = defs[\"a\" /* default */].get(this);\n /* istanbul ignore if */\n\n if (!def) {\n return [];\n }\n\n return Object.keys(def.keys);\n}", "title": "" }, { "docid": "83143c344bed9fd8c36e01491f76f801", "score": "0.6403192", "text": "function Pm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "784090e4f74f0a1133793035b0c7be02", "score": "0.6397911", "text": "function $v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "93b47a0fb1bea4a741d98c79e8214d5c", "score": "0.6392649", "text": "function Ii(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "7a68cea1eedf2e2a30521e6454e19b66", "score": "0.63888997", "text": "function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}", "title": "" }, { "docid": "6fdadc52321bc9a2d8cfc440bf338be0", "score": "0.6388851", "text": "function inheritedPropertyNames(obj) {\n var props = {};\n while (obj) {\n Object.getOwnPropertyNames(obj).map(function (name) {\n props[name] = true;\n });\n obj = Object.getPrototypeOf(obj);\n }\n return Object.getOwnPropertyNames(props);\n}", "title": "" }, { "docid": "45436a74832707741fce860450794125", "score": "0.6387079", "text": "function getOwnPropertyIdentifiers(object, options = { names: true, symbols: true, nonEnumerables: true }) {\n\t const symbols = !options.symbols ? [] : Object.getOwnPropertySymbols(object);\n\t const names = !options.names ? [] : options.nonEnumerables ? Object.getOwnPropertyNames(object) : Object.keys(object);\n\t return [...names, ...symbols];\n\t}", "title": "" }, { "docid": "73f4888c7e56acb90b2f353ec24d59b1", "score": "0.63803726", "text": "function getPlainObjectKeys(object) {\n var enumerables = new Set();\n for (var key in object)\n enumerables.add(key); // *all* enumerables\n Object.getOwnPropertySymbols(object).forEach(function (k) {\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\n enumerables.add(k);\n }); // *own* symbols\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\n // as there is no efficient iterator that returns *all* properties\n return Array.from(enumerables);\n}", "title": "" }, { "docid": "73f4888c7e56acb90b2f353ec24d59b1", "score": "0.63803726", "text": "function getPlainObjectKeys(object) {\n var enumerables = new Set();\n for (var key in object)\n enumerables.add(key); // *all* enumerables\n Object.getOwnPropertySymbols(object).forEach(function (k) {\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\n enumerables.add(k);\n }); // *own* symbols\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\n // as there is no efficient iterator that returns *all* properties\n return Array.from(enumerables);\n}", "title": "" }, { "docid": "730bb8c43c7b1bd3366fa0aa1d79b2f4", "score": "0.63799787", "text": "function Fm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}", "title": "" }, { "docid": "209025997636d5f1f099b5e9f1ffc971", "score": "0.63740027", "text": "function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var _keys = [];\n for (var key in obj) if (_has(obj, key)) _keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, _keys);\n return _keys;\n}", "title": "" }, { "docid": "dfc3a02f04ac3fbdd18fc314797eea37", "score": "0.636429", "text": "function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n }", "title": "" }, { "docid": "60e85241e3c66a57ea697924bd32d131", "score": "0.6356635", "text": "function Zc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}", "title": "" } ]
840d001d76554b4b13be96aab74770da
Create a new term term is a JS object from the API
[ { "docid": "74b3cb16d6adcb994a306d83ca8ce63b", "score": "0.7385111", "text": "function createTerm(term) {\n term.created_at = new java.util.Date();\n if(!term.ontology_id || !term.ontology_name)\n throw new Error(\"Missing references to ontology\");\n\n //term.parent = term.parent || null; // important to track the roots\n\n //term.normalized = normalize(term); // important for search\n\n if(term.comment)\n term.comment = new Text(term.comment);\n if(term.def)\n term.def = new Text(term.def);\n\n // XXX a bit hacky - make it faster\n for(var i in term) {\n if(term[i] != null && term[i].length && term[i].length > 400)\n term[i] = new Text(term[i]);\n }\n\n // create in datastore\n var termEntity;\n try {\n var termKey = googlestore.createKey(\"term\", term.id),\n termEntity = googlestore.get(termKey);\n googlestore.set(termEntity, term);\n } catch (e) {\n // no entity foudn with this id, create it\n termEntity = googlestore.entity(\"term\", term.id, term);\n }\n\n\n googlestore.put(termEntity);\n }", "title": "" } ]
[ { "docid": "7386cc5694f57591c4873c83c5b649a7", "score": "0.71586704", "text": "createTerm() {\n\t\tlet state = {\n\t\t\t_id: Helpers.getRandomID('t'),\n\t\t\ttitle: '',\n\t\t\tsortkey: '',\n\t\t\tdesc: '',\n\t\t}\n\t\tthis.apply(\n\t\t\tActions.create('terms', 'create', {state})\n\t\t)\n\t}", "title": "" }, { "docid": "a88a39ba4c844389765e8b74df5a8838", "score": "0.65669227", "text": "function _createTermDefinition(activeCtx, localCtx, term, defined) {\n if(term in defined) {\n // term already defined\n if(defined[term]) {\n return;\n }\n // cycle detected\n throw new JsonLdError(\n 'Cyclical context definition detected.',\n 'jsonld.CyclicalContext',\n {code: 'cyclic IRI mapping', context: localCtx, term: term});\n }\n\n // now defining term\n defined[term] = false;\n\n if(_isKeyword(term)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; keywords cannot be overridden.',\n 'jsonld.SyntaxError',\n {code: 'keyword redefinition', context: localCtx, term: term});\n }\n\n if(term === '') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a term cannot be an empty string.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // remove old mapping\n if(activeCtx.mappings[term]) {\n delete activeCtx.mappings[term];\n }\n\n // get context term value\n var value = localCtx[term];\n\n // clear context entry\n if(value === null || (_isObject(value) && value['@id'] === null)) {\n activeCtx.mappings[term] = null;\n defined[term] = true;\n return;\n }\n\n // convert short-hand value to object w/@id\n if(_isString(value)) {\n value = {'@id': value};\n }\n\n if(!_isObject(value)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context property values must be ' +\n 'strings or objects.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // create new mapping\n var mapping = activeCtx.mappings[term] = {};\n mapping.reverse = false;\n\n if('@reverse' in value) {\n if('@id' in value) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @reverse term definition must not ' +\n 'contain @id.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n var reverse = value['@reverse'];\n if(!_isString(reverse)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n\n // expand and add @id mapping\n var id = _expandIri(\n activeCtx, reverse, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be an ' +\n 'absolute IRI or a blank node identifier.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n mapping.reverse = true;\n } else if('@id' in value) {\n var id = value['@id'];\n if(!_isString(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an array ' +\n 'of strings or a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n if(id !== term) {\n // expand and add @id mapping\n id = _expandIri(\n activeCtx, id, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id) && !_isKeyword(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an ' +\n 'absolute IRI, a blank node identifier, or a keyword.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n }\n }\n\n // always compute whether term has a colon as an optimization for\n // _compactIri\n var colon = term.indexOf(':');\n mapping._termHasColon = (colon !== -1);\n\n if(!('@id' in mapping)) {\n // see if the term has a prefix\n if(mapping._termHasColon) {\n var prefix = term.substr(0, colon);\n if(prefix in localCtx) {\n // define parent prefix\n _createTermDefinition(activeCtx, localCtx, prefix, defined);\n }\n\n if(activeCtx.mappings[prefix]) {\n // set @id based on prefix parent\n var suffix = term.substr(colon + 1);\n mapping['@id'] = activeCtx.mappings[prefix]['@id'] + suffix;\n } else {\n // term is an absolute IRI\n mapping['@id'] = term;\n }\n } else {\n // non-IRIs *must* define @ids if @vocab is not available\n if(!('@vocab' in activeCtx)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context terms must define an @id.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx, term: term});\n }\n // prepend vocab to term\n mapping['@id'] = activeCtx['@vocab'] + term;\n }\n }\n\n // IRI mapping now defined\n defined[term] = true;\n\n if('@type' in value) {\n var type = value['@type'];\n if(!_isString(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be a string.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n\n if(type !== '@id' && type !== '@vocab') {\n // expand @type to full IRI\n type = _expandIri(\n activeCtx, type, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type value must be an ' +\n 'absolute IRI.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n if(type.indexOf('_:') === 0) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be an IRI, ' +\n 'not a blank node identifier.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n }\n\n // add @type to mapping\n mapping['@type'] = type;\n }\n\n if('@container' in value) {\n var container = value['@container'];\n if(container !== '@list' && container !== '@set' &&\n container !== '@index' && container !== '@language') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value must be ' +\n 'one of the following: @list, @set, @index, or @language.',\n 'jsonld.SyntaxError',\n {code: 'invalid container mapping', context: localCtx});\n }\n if(mapping.reverse && container !== '@index' && container !== '@set' &&\n container !== null) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value for a @reverse ' +\n 'type definition must be @index or @set.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n\n // add @container to mapping\n mapping['@container'] = container;\n }\n\n if('@language' in value && !('@type' in value)) {\n var language = value['@language'];\n if(language !== null && !_isString(language)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @language value must be ' +\n 'a string or null.', 'jsonld.SyntaxError',\n {code: 'invalid language mapping', context: localCtx});\n }\n\n // add @language to mapping\n if(language !== null) {\n language = language.toLowerCase();\n }\n mapping['@language'] = language;\n }\n\n // disallow aliasing @context and @preserve\n var id = mapping['@id'];\n if(id === '@context' || id === '@preserve') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context and @preserve cannot be aliased.',\n 'jsonld.SyntaxError', {code: 'invalid keyword alias', context: localCtx});\n }\n}", "title": "" }, { "docid": "770135feb55befd131c3e193edf1b2f3", "score": "0.65669227", "text": "function _createTermDefinition(activeCtx, localCtx, term, defined) {\n if(term in defined) {\n // term already defined\n if(defined[term]) {\n return;\n }\n // cycle detected\n throw new JsonLdError(\n 'Cyclical context definition detected.',\n 'jsonld.CyclicalContext',\n {code: 'cyclic IRI mapping', context: localCtx, term: term});\n }\n\n // now defining term\n defined[term] = false;\n\n if(_isKeyword(term)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; keywords cannot be overridden.',\n 'jsonld.SyntaxError',\n {code: 'keyword redefinition', context: localCtx, term: term});\n }\n\n if(term === '') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a term cannot be an empty string.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // remove old mapping\n if(activeCtx.mappings[term]) {\n delete activeCtx.mappings[term];\n }\n\n // get context term value\n var value = localCtx[term];\n\n // clear context entry\n if(value === null || (_isObject(value) && value['@id'] === null)) {\n activeCtx.mappings[term] = null;\n defined[term] = true;\n return;\n }\n\n // convert short-hand value to object w/@id\n if(_isString(value)) {\n value = {'@id': value};\n }\n\n if(!_isObject(value)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context property values must be ' +\n 'strings or objects.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // create new mapping\n var mapping = activeCtx.mappings[term] = {};\n mapping.reverse = false;\n\n if('@reverse' in value) {\n if('@id' in value) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @reverse term definition must not ' +\n 'contain @id.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n var reverse = value['@reverse'];\n if(!_isString(reverse)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n\n // expand and add @id mapping\n var id = _expandIri(\n activeCtx, reverse, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be an ' +\n 'absolute IRI or a blank node identifier.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n mapping.reverse = true;\n } else if('@id' in value) {\n var id = value['@id'];\n if(!_isString(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an array ' +\n 'of strings or a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n if(id !== term) {\n // expand and add @id mapping\n id = _expandIri(\n activeCtx, id, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id) && !_isKeyword(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an ' +\n 'absolute IRI, a blank node identifier, or a keyword.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n }\n }\n\n if(!('@id' in mapping)) {\n // see if the term has a prefix\n var colon = term.indexOf(':');\n if(colon !== -1) {\n var prefix = term.substr(0, colon);\n if(prefix in localCtx) {\n // define parent prefix\n _createTermDefinition(activeCtx, localCtx, prefix, defined);\n }\n\n if(activeCtx.mappings[prefix]) {\n // set @id based on prefix parent\n var suffix = term.substr(colon + 1);\n mapping['@id'] = activeCtx.mappings[prefix]['@id'] + suffix;\n } else {\n // term is an absolute IRI\n mapping['@id'] = term;\n }\n } else {\n // non-IRIs *must* define @ids if @vocab is not available\n if(!('@vocab' in activeCtx)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context terms must define an @id.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx, term: term});\n }\n // prepend vocab to term\n mapping['@id'] = activeCtx['@vocab'] + term;\n }\n }\n\n // IRI mapping now defined\n defined[term] = true;\n\n if('@type' in value) {\n var type = value['@type'];\n if(!_isString(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be a string.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n\n if(type !== '@id' && type !== '@vocab') {\n // expand @type to full IRI\n type = _expandIri(\n activeCtx, type, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type value must be an ' +\n 'absolute IRI.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n if(type.indexOf('_:') === 0) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be an IRI, ' +\n 'not a blank node identifier.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n }\n\n // add @type to mapping\n mapping['@type'] = type;\n }\n\n if('@container' in value) {\n var container = value['@container'];\n if(container !== '@list' && container !== '@set' &&\n container !== '@index' && container !== '@language') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value must be ' +\n 'one of the following: @list, @set, @index, or @language.',\n 'jsonld.SyntaxError',\n {code: 'invalid container mapping', context: localCtx});\n }\n if(mapping.reverse && container !== '@index' && container !== '@set' &&\n container !== null) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value for a @reverse ' +\n 'type definition must be @index or @set.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n\n // add @container to mapping\n mapping['@container'] = container;\n }\n\n if('@language' in value && !('@type' in value)) {\n var language = value['@language'];\n if(language !== null && !_isString(language)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @language value must be ' +\n 'a string or null.', 'jsonld.SyntaxError',\n {code: 'invalid language mapping', context: localCtx});\n }\n\n // add @language to mapping\n if(language !== null) {\n language = language.toLowerCase();\n }\n mapping['@language'] = language;\n }\n\n // disallow aliasing @context and @preserve\n var id = mapping['@id'];\n if(id === '@context' || id === '@preserve') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context and @preserve cannot be aliased.',\n 'jsonld.SyntaxError', {code: 'invalid keyword alias', context: localCtx});\n }\n}", "title": "" }, { "docid": "770135feb55befd131c3e193edf1b2f3", "score": "0.65669227", "text": "function _createTermDefinition(activeCtx, localCtx, term, defined) {\n if(term in defined) {\n // term already defined\n if(defined[term]) {\n return;\n }\n // cycle detected\n throw new JsonLdError(\n 'Cyclical context definition detected.',\n 'jsonld.CyclicalContext',\n {code: 'cyclic IRI mapping', context: localCtx, term: term});\n }\n\n // now defining term\n defined[term] = false;\n\n if(_isKeyword(term)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; keywords cannot be overridden.',\n 'jsonld.SyntaxError',\n {code: 'keyword redefinition', context: localCtx, term: term});\n }\n\n if(term === '') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a term cannot be an empty string.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // remove old mapping\n if(activeCtx.mappings[term]) {\n delete activeCtx.mappings[term];\n }\n\n // get context term value\n var value = localCtx[term];\n\n // clear context entry\n if(value === null || (_isObject(value) && value['@id'] === null)) {\n activeCtx.mappings[term] = null;\n defined[term] = true;\n return;\n }\n\n // convert short-hand value to object w/@id\n if(_isString(value)) {\n value = {'@id': value};\n }\n\n if(!_isObject(value)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context property values must be ' +\n 'strings or objects.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // create new mapping\n var mapping = activeCtx.mappings[term] = {};\n mapping.reverse = false;\n\n if('@reverse' in value) {\n if('@id' in value) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @reverse term definition must not ' +\n 'contain @id.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n var reverse = value['@reverse'];\n if(!_isString(reverse)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n\n // expand and add @id mapping\n var id = _expandIri(\n activeCtx, reverse, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be an ' +\n 'absolute IRI or a blank node identifier.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n mapping.reverse = true;\n } else if('@id' in value) {\n var id = value['@id'];\n if(!_isString(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an array ' +\n 'of strings or a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n if(id !== term) {\n // expand and add @id mapping\n id = _expandIri(\n activeCtx, id, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id) && !_isKeyword(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an ' +\n 'absolute IRI, a blank node identifier, or a keyword.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n }\n }\n\n if(!('@id' in mapping)) {\n // see if the term has a prefix\n var colon = term.indexOf(':');\n if(colon !== -1) {\n var prefix = term.substr(0, colon);\n if(prefix in localCtx) {\n // define parent prefix\n _createTermDefinition(activeCtx, localCtx, prefix, defined);\n }\n\n if(activeCtx.mappings[prefix]) {\n // set @id based on prefix parent\n var suffix = term.substr(colon + 1);\n mapping['@id'] = activeCtx.mappings[prefix]['@id'] + suffix;\n } else {\n // term is an absolute IRI\n mapping['@id'] = term;\n }\n } else {\n // non-IRIs *must* define @ids if @vocab is not available\n if(!('@vocab' in activeCtx)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context terms must define an @id.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx, term: term});\n }\n // prepend vocab to term\n mapping['@id'] = activeCtx['@vocab'] + term;\n }\n }\n\n // IRI mapping now defined\n defined[term] = true;\n\n if('@type' in value) {\n var type = value['@type'];\n if(!_isString(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be a string.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n\n if(type !== '@id' && type !== '@vocab') {\n // expand @type to full IRI\n type = _expandIri(\n activeCtx, type, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type value must be an ' +\n 'absolute IRI.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n if(type.indexOf('_:') === 0) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be an IRI, ' +\n 'not a blank node identifier.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n }\n\n // add @type to mapping\n mapping['@type'] = type;\n }\n\n if('@container' in value) {\n var container = value['@container'];\n if(container !== '@list' && container !== '@set' &&\n container !== '@index' && container !== '@language') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value must be ' +\n 'one of the following: @list, @set, @index, or @language.',\n 'jsonld.SyntaxError',\n {code: 'invalid container mapping', context: localCtx});\n }\n if(mapping.reverse && container !== '@index' && container !== '@set' &&\n container !== null) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value for a @reverse ' +\n 'type definition must be @index or @set.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n\n // add @container to mapping\n mapping['@container'] = container;\n }\n\n if('@language' in value && !('@type' in value)) {\n var language = value['@language'];\n if(language !== null && !_isString(language)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @language value must be ' +\n 'a string or null.', 'jsonld.SyntaxError',\n {code: 'invalid language mapping', context: localCtx});\n }\n\n // add @language to mapping\n if(language !== null) {\n language = language.toLowerCase();\n }\n mapping['@language'] = language;\n }\n\n // disallow aliasing @context and @preserve\n var id = mapping['@id'];\n if(id === '@context' || id === '@preserve') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context and @preserve cannot be aliased.',\n 'jsonld.SyntaxError', {code: 'invalid keyword alias', context: localCtx});\n }\n}", "title": "" }, { "docid": "770135feb55befd131c3e193edf1b2f3", "score": "0.65669227", "text": "function _createTermDefinition(activeCtx, localCtx, term, defined) {\n if(term in defined) {\n // term already defined\n if(defined[term]) {\n return;\n }\n // cycle detected\n throw new JsonLdError(\n 'Cyclical context definition detected.',\n 'jsonld.CyclicalContext',\n {code: 'cyclic IRI mapping', context: localCtx, term: term});\n }\n\n // now defining term\n defined[term] = false;\n\n if(_isKeyword(term)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; keywords cannot be overridden.',\n 'jsonld.SyntaxError',\n {code: 'keyword redefinition', context: localCtx, term: term});\n }\n\n if(term === '') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a term cannot be an empty string.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // remove old mapping\n if(activeCtx.mappings[term]) {\n delete activeCtx.mappings[term];\n }\n\n // get context term value\n var value = localCtx[term];\n\n // clear context entry\n if(value === null || (_isObject(value) && value['@id'] === null)) {\n activeCtx.mappings[term] = null;\n defined[term] = true;\n return;\n }\n\n // convert short-hand value to object w/@id\n if(_isString(value)) {\n value = {'@id': value};\n }\n\n if(!_isObject(value)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context property values must be ' +\n 'strings or objects.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // create new mapping\n var mapping = activeCtx.mappings[term] = {};\n mapping.reverse = false;\n\n if('@reverse' in value) {\n if('@id' in value) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @reverse term definition must not ' +\n 'contain @id.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n var reverse = value['@reverse'];\n if(!_isString(reverse)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n\n // expand and add @id mapping\n var id = _expandIri(\n activeCtx, reverse, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be an ' +\n 'absolute IRI or a blank node identifier.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n mapping.reverse = true;\n } else if('@id' in value) {\n var id = value['@id'];\n if(!_isString(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an array ' +\n 'of strings or a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n if(id !== term) {\n // expand and add @id mapping\n id = _expandIri(\n activeCtx, id, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id) && !_isKeyword(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an ' +\n 'absolute IRI, a blank node identifier, or a keyword.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n }\n }\n\n if(!('@id' in mapping)) {\n // see if the term has a prefix\n var colon = term.indexOf(':');\n if(colon !== -1) {\n var prefix = term.substr(0, colon);\n if(prefix in localCtx) {\n // define parent prefix\n _createTermDefinition(activeCtx, localCtx, prefix, defined);\n }\n\n if(activeCtx.mappings[prefix]) {\n // set @id based on prefix parent\n var suffix = term.substr(colon + 1);\n mapping['@id'] = activeCtx.mappings[prefix]['@id'] + suffix;\n } else {\n // term is an absolute IRI\n mapping['@id'] = term;\n }\n } else {\n // non-IRIs *must* define @ids if @vocab is not available\n if(!('@vocab' in activeCtx)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context terms must define an @id.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx, term: term});\n }\n // prepend vocab to term\n mapping['@id'] = activeCtx['@vocab'] + term;\n }\n }\n\n // IRI mapping now defined\n defined[term] = true;\n\n if('@type' in value) {\n var type = value['@type'];\n if(!_isString(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be a string.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n\n if(type !== '@id' && type !== '@vocab') {\n // expand @type to full IRI\n type = _expandIri(\n activeCtx, type, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type value must be an ' +\n 'absolute IRI.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n if(type.indexOf('_:') === 0) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be an IRI, ' +\n 'not a blank node identifier.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n }\n\n // add @type to mapping\n mapping['@type'] = type;\n }\n\n if('@container' in value) {\n var container = value['@container'];\n if(container !== '@list' && container !== '@set' &&\n container !== '@index' && container !== '@language') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value must be ' +\n 'one of the following: @list, @set, @index, or @language.',\n 'jsonld.SyntaxError',\n {code: 'invalid container mapping', context: localCtx});\n }\n if(mapping.reverse && container !== '@index' && container !== '@set' &&\n container !== null) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value for a @reverse ' +\n 'type definition must be @index or @set.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n\n // add @container to mapping\n mapping['@container'] = container;\n }\n\n if('@language' in value && !('@type' in value)) {\n var language = value['@language'];\n if(language !== null && !_isString(language)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @language value must be ' +\n 'a string or null.', 'jsonld.SyntaxError',\n {code: 'invalid language mapping', context: localCtx});\n }\n\n // add @language to mapping\n if(language !== null) {\n language = language.toLowerCase();\n }\n mapping['@language'] = language;\n }\n\n // disallow aliasing @context and @preserve\n var id = mapping['@id'];\n if(id === '@context' || id === '@preserve') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context and @preserve cannot be aliased.',\n 'jsonld.SyntaxError', {code: 'invalid keyword alias', context: localCtx});\n }\n}", "title": "" }, { "docid": "a88a39ba4c844389765e8b74df5a8838", "score": "0.65669227", "text": "function _createTermDefinition(activeCtx, localCtx, term, defined) {\n if(term in defined) {\n // term already defined\n if(defined[term]) {\n return;\n }\n // cycle detected\n throw new JsonLdError(\n 'Cyclical context definition detected.',\n 'jsonld.CyclicalContext',\n {code: 'cyclic IRI mapping', context: localCtx, term: term});\n }\n\n // now defining term\n defined[term] = false;\n\n if(_isKeyword(term)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; keywords cannot be overridden.',\n 'jsonld.SyntaxError',\n {code: 'keyword redefinition', context: localCtx, term: term});\n }\n\n if(term === '') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a term cannot be an empty string.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // remove old mapping\n if(activeCtx.mappings[term]) {\n delete activeCtx.mappings[term];\n }\n\n // get context term value\n var value = localCtx[term];\n\n // clear context entry\n if(value === null || (_isObject(value) && value['@id'] === null)) {\n activeCtx.mappings[term] = null;\n defined[term] = true;\n return;\n }\n\n // convert short-hand value to object w/@id\n if(_isString(value)) {\n value = {'@id': value};\n }\n\n if(!_isObject(value)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context property values must be ' +\n 'strings or objects.',\n 'jsonld.SyntaxError',\n {code: 'invalid term definition', context: localCtx});\n }\n\n // create new mapping\n var mapping = activeCtx.mappings[term] = {};\n mapping.reverse = false;\n\n if('@reverse' in value) {\n if('@id' in value) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @reverse term definition must not ' +\n 'contain @id.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n var reverse = value['@reverse'];\n if(!_isString(reverse)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n\n // expand and add @id mapping\n var id = _expandIri(\n activeCtx, reverse, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @reverse value must be an ' +\n 'absolute IRI or a blank node identifier.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n mapping.reverse = true;\n } else if('@id' in value) {\n var id = value['@id'];\n if(!_isString(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an array ' +\n 'of strings or a string.',\n 'jsonld.SyntaxError', {code: 'invalid IRI mapping', context: localCtx});\n }\n if(id !== term) {\n // expand and add @id mapping\n id = _expandIri(\n activeCtx, id, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(id) && !_isKeyword(id)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; a @context @id value must be an ' +\n 'absolute IRI, a blank node identifier, or a keyword.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx});\n }\n mapping['@id'] = id;\n }\n }\n\n // always compute whether term has a colon as an optimization for\n // _compactIri\n var colon = term.indexOf(':');\n mapping._termHasColon = (colon !== -1);\n\n if(!('@id' in mapping)) {\n // see if the term has a prefix\n if(mapping._termHasColon) {\n var prefix = term.substr(0, colon);\n if(prefix in localCtx) {\n // define parent prefix\n _createTermDefinition(activeCtx, localCtx, prefix, defined);\n }\n\n if(activeCtx.mappings[prefix]) {\n // set @id based on prefix parent\n var suffix = term.substr(colon + 1);\n mapping['@id'] = activeCtx.mappings[prefix]['@id'] + suffix;\n } else {\n // term is an absolute IRI\n mapping['@id'] = term;\n }\n } else {\n // non-IRIs *must* define @ids if @vocab is not available\n if(!('@vocab' in activeCtx)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context terms must define an @id.',\n 'jsonld.SyntaxError',\n {code: 'invalid IRI mapping', context: localCtx, term: term});\n }\n // prepend vocab to term\n mapping['@id'] = activeCtx['@vocab'] + term;\n }\n }\n\n // IRI mapping now defined\n defined[term] = true;\n\n if('@type' in value) {\n var type = value['@type'];\n if(!_isString(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be a string.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n\n if(type !== '@id' && type !== '@vocab') {\n // expand @type to full IRI\n type = _expandIri(\n activeCtx, type, {vocab: true, base: false}, localCtx, defined);\n if(!_isAbsoluteIri(type)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type value must be an ' +\n 'absolute IRI.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n if(type.indexOf('_:') === 0) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; an @context @type values must be an IRI, ' +\n 'not a blank node identifier.',\n 'jsonld.SyntaxError',\n {code: 'invalid type mapping', context: localCtx});\n }\n }\n\n // add @type to mapping\n mapping['@type'] = type;\n }\n\n if('@container' in value) {\n var container = value['@container'];\n if(container !== '@list' && container !== '@set' &&\n container !== '@index' && container !== '@language') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value must be ' +\n 'one of the following: @list, @set, @index, or @language.',\n 'jsonld.SyntaxError',\n {code: 'invalid container mapping', context: localCtx});\n }\n if(mapping.reverse && container !== '@index' && container !== '@set' &&\n container !== null) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @container value for a @reverse ' +\n 'type definition must be @index or @set.', 'jsonld.SyntaxError',\n {code: 'invalid reverse property', context: localCtx});\n }\n\n // add @container to mapping\n mapping['@container'] = container;\n }\n\n if('@language' in value && !('@type' in value)) {\n var language = value['@language'];\n if(language !== null && !_isString(language)) {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context @language value must be ' +\n 'a string or null.', 'jsonld.SyntaxError',\n {code: 'invalid language mapping', context: localCtx});\n }\n\n // add @language to mapping\n if(language !== null) {\n language = language.toLowerCase();\n }\n mapping['@language'] = language;\n }\n\n // disallow aliasing @context and @preserve\n var id = mapping['@id'];\n if(id === '@context' || id === '@preserve') {\n throw new JsonLdError(\n 'Invalid JSON-LD syntax; @context and @preserve cannot be aliased.',\n 'jsonld.SyntaxError', {code: 'invalid keyword alias', context: localCtx});\n }\n}", "title": "" }, { "docid": "c1ecd0d31d00f1b09eea53f2fd7f405e", "score": "0.63417095", "text": "function RDFMakeTerm(formula,val) {\r\n if (typeof val != 'object') { \r\n\tif (typeof val == 'string') {\r\n\t return new RDFLiteral(val);\r\n\t} else if (typeof val == 'undefined') {\r\n\t return undefined;\r\n\t} else { // @@ add converting of dates and numbers\r\n\t alert(\"Can't make term from \" + val + \" of type \" + typeof val); \r\n\t}\r\n }\r\n if (typeof formula.redirection == 'undefined') \r\n\talert('formula: '+ formula+', term: '+val);\r\n var y = formula.redirection[val.hashString()];\r\n if (typeof y == 'undefined') return val;\r\n// fyi(\" redirecting \"+val+\" to \"+y)\r\n return y;\r\n}", "title": "" }, { "docid": "3860177e1cb3b9cae0e78c4974280842", "score": "0.62501293", "text": "function Terms(term, def) {\n\tthis.term = [term];\n\tthis.definition = def;\n}", "title": "" }, { "docid": "b95c8f17959c540107b47d05279bcfd6", "score": "0.6136642", "text": "get termType() {\n return 'Literal';\n }", "title": "" }, { "docid": "b95c8f17959c540107b47d05279bcfd6", "score": "0.6136642", "text": "get termType() {\n return 'Literal';\n }", "title": "" }, { "docid": "b86ffddcf204f1b3b9f27af3e6f57d87", "score": "0.6045276", "text": "function taxonomy_saveTerm(term, callback) {\n var method = 'taxonomy.saveTerm';\n var timestamp = get_timestamp();\n var nonce = get_nonce();\n \n // Generating hash according to ServicesAPI Key method\n hash = get_hash(key, timestamp, domain, nonce, method);\n \n var term_content = json_encode(term);\n \n //array to pass all parameters\n var params = new Array(hash, domain, timestamp, nonce, term_content);\n \n //formatted xmlrpc call\n var xml = xmlrpc_encode(method, params);\n \n var xhr = Titanium.Network.createHTTPClient();\n xhr.open(\"POST\",url);\n xhr.onload = callback;\n \n Titanium.API.info(\"xmlrpc: xml: \"+xml);\n xhr.send(xml);\n Titanium.API.info(\"xmlrpc: end\");\n}", "title": "" }, { "docid": "8a88ff3c1209ab4c6b5bf49b2efd219e", "score": "0.6027039", "text": "async function GetTermById(id){\r\n\r\n\tlet obj = term.findById(id, {_id: false, __v: false});\r\n\r\n\treturn obj;\r\n\r\n}", "title": "" }, { "docid": "47241e0432d48213a76a2cc58a578fc3", "score": "0.59666663", "text": "static skolemizeTerm(term, sourceId) {\n if (term.termType === 'BlankNode') {\n return new BlankNodeScoped_1.BlankNodeScoped(`bc_${sourceId}_${term.value}`, DataFactory.namedNode(`${FederatedQuadSource.SKOLEM_PREFIX}${sourceId}:${term.value}`));\n }\n return term;\n }", "title": "" }, { "docid": "4479b7369c22faf669e23d670e9218aa", "score": "0.5940225", "text": "parseTerm() {\n const assertion = this.maybeParseAssertion();\n if (assertion) {\n return assertion;\n }\n return {\n type: 'Term',\n capturingParenthesesBefore: this.capturingGroups.length,\n Atom: this.parseAtom(),\n Quantifier: this.maybeParseQuantifier(),\n };\n }", "title": "" }, { "docid": "7ddb2c5aeab5c36ad2fb95032abb028e", "score": "0.5877291", "text": "toJSON() {\n return {\n termType: this.termType,\n value: this.value\n };\n }", "title": "" }, { "docid": "7ddb2c5aeab5c36ad2fb95032abb028e", "score": "0.5877291", "text": "toJSON() {\n return {\n termType: this.termType,\n value: this.value\n };\n }", "title": "" }, { "docid": "10065b49d681010c1750da9bd9a0e478", "score": "0.58143693", "text": "function callbackT411Terms(error,response,body)\n{\n\tif(!error && response.statusCode == 200)\n\t{\n\t\tvar jsonResult = JSON.parse(body);\n\t\tvar ids = Object.keys(jsonResult); // Get category ids\n\t\tids.forEach( function(idCat) {\n\t\t\tif(typeof jsonResult[idCat] != 'object')\n\t\t\t\treturn;\n\n\t\t\tvar listTermsCat = [];\n\t\t\tvar idTerms = Object.keys(jsonResult[idCat]);\n\t\t\tidTerms.forEach( function(idTerm) {\n\t\t\t\tif(typeof jsonResult[idCat][idTerm] != 'object')\n\t\t\t\t\treturn;\n\n\t\t\t\tvar currentTerm = {'name':jsonResult[idCat][idTerm]['type'],'id':idTerm,'values':[]};\n\t\t\t\tvar idValTerms = Object.keys(jsonResult[idCat][idTerm]['terms']);\n\t\t\t\tidValTerms.forEach( function(idValTerm) {\n\t\t\t\t\tcurrentTerm['values'].push({'val' : jsonResult[idCat][idTerm]['terms'][idValTerm],'id':idValTerm});\n\t\t\t\t});\n\t\t\t\tlistTermsCat.push(currentTerm);\n\n\t\t\t});\n\t\t\t// Now let's find the category to add the terms to\n\t\t\tfor(var i = 0; i < T411Categories.length ; i++)\n\t\t\t{\n\t\t\t\tif(T411Categories[i].id == idCat)\n\t\t\t\t{\n\t\t\t\t\tT411Categories[i]['terms'] = listTermsCat;\n\n\t\t\t\t\tif(T411Categories[i].id == _T411_CatTVShow.value)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar regexSeason = /Saison ([0-9]{2})/i;\n\t\t\t\t\t\tvar regexEpisode = /Episode ([0-9]{2})/i;\n\n\t\t\t\t\t\tvar ListTermsEpisode =_.find(listTermsCat, function(obj) { return obj.name == _T411_TermsPrefixEpisodes.name;});\n\t\t\t\t\t\t_T411_TermsPrefixEpisodes.idTerm = ListTermsEpisode.id;\n\t\t\t\t\t\t_.forEach(ListTermsEpisode.values,function(ob)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(regexEpisode.test(ob.val))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar episodeNumber = parseInt(ob.val.match(regexEpisode)[1],10);\n\t\t\t\t\t\t\t\t\t\t_T411_TermsPrefixEpisodes.values[episodeNumber] = ob.id;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvar ListTermsSeason =_.find(listTermsCat, function(obj) { return obj.name == _T411_TermsPrefixSeasons.name;});\n\t\t\t\t\t\t_T411_TermsPrefixSeasons.idTerm = ListTermsSeason.id;\n\t\t\t\t\t\t_.forEach(ListTermsSeason.values,function(ob)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(regexSeason.test(ob.val))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar seasonNumber = parseInt(ob.val.match(regexSeason)[1],10);\n\t\t\t\t\t\t\t\t\t\t_T411_TermsPrefixSeasons.values[seasonNumber] = ob.id;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tapp.listen (applicationPort);\n\t\t_logger.info ('Server listening on port ' + applicationPort);\n\t}\n}", "title": "" }, { "docid": "08010384d4d20a086453bd0ac943365f", "score": "0.5806857", "text": "get termType() {\n return 'Quad';\n }", "title": "" }, { "docid": "0be162cea9d77247841b58fa6ae32c8e", "score": "0.5779594", "text": "getInstantiatedResource(term) {\n return this.objectLoader.resources[(0, rdf_string_1.termToString)(term)];\n }", "title": "" }, { "docid": "7d8456eb202beafdcd84e1dd08f9585a", "score": "0.57480586", "text": "function addTerm(thing, property, value) {\n var _a, _b;\n if (value.termType === \"NamedNode\") {\n return addNamedNode(thing, property, value);\n }\n if (value.termType === \"Literal\") {\n return addLiteral(thing, property, value);\n }\n if (value.termType === \"BlankNode\") {\n internal_throwIfNotThing(thing);\n if (!internal_isValidUrl(property)) {\n throw new ValidPropertyUrlExpectedError(property);\n }\n const predicateIri = internal_toIriString(property);\n const existingPredicate = (_a = thing.predicates[predicateIri]) !== null && _a !== void 0 ? _a : {};\n const existingBlankNodes = (_b = existingPredicate.blankNodes) !== null && _b !== void 0 ? _b : [];\n const updatedBlankNodes = freeze(existingBlankNodes.concat(getBlankNodeId(value)));\n const updatedPredicate = freeze(Object.assign(Object.assign({}, existingPredicate), {\n blankNodes: updatedBlankNodes\n }));\n const updatedPredicates = freeze(Object.assign(Object.assign({}, thing.predicates), {\n [predicateIri]: updatedPredicate\n }));\n const updatedThing = freeze(Object.assign(Object.assign({}, thing), {\n predicates: updatedPredicates\n }));\n return updatedThing;\n }\n throw new Error(`Term type [${value.termType}] is not supported by @inrupt/solid-client.`);\n}", "title": "" }, { "docid": "e791906b177ac0f135868c0720c3e23d", "score": "0.5742179", "text": "function TermManager() {\n var self = this;\n\n /* All the keys in this object are bib-search-friendly attributes, but the\n * boolean values indicate whether they should be searched by their\n * field name as such, or simply mapped to \"keyword\". */\n this.bibFriendlyAttrNames = {\n \"author\": true, \"title\": true,\n \"isbn\": false, \"issn\": false, \"upc\": false\n };\n\n this.terms = {};\n [\"jub\", \"acqpl\", \"acqpo\", \"acqinv\"].forEach(\n function(hint) {\n var o = {};\n o.__label = fieldmapper.IDL.fmclasses[hint].label;\n fieldmapper.IDL.fmclasses[hint].fields.forEach(\n function(field) {\n if (!field.virtual) {\n o[field.name] = {\n \"label\": field.label, \"datatype\": field.datatype\n };\n }\n }\n );\n self.terms[hint] = o;\n }\n );\n\n this.terms.acqlia = {\"__label\": fieldmapper.IDL.fmclasses.acqlia.label};\n pcrud.retrieveAll(\"acqliad\", {\"order_by\": {\"acqliad\": \"id\"}}).forEach(\n function(def) {\n self.terms.acqlia[def.id()] = {\n \"label\": def.description(),\n \"datatype\": \"text\",\n \"bib_friendly\":\n (typeof(self.bibFriendlyAttrNames[def.code()]) !=\n \"undefined\"),\n \"bib_attr_name\":\n self.bibFriendlyAttrNames[def.code()] ?\n def.code() : \"keyword\"\n };\n }\n );\n\n this.selectorFactory = new TermSelectorFactory(this.terms);\n this.template = dojo.byId(\"acq-unified-terms-tbody\").\n removeChild(dojo.byId(\"acq-unified-terms-row-tmpl\"));\n dojo.attr(this.template, \"id\");\n\n this.lastResultType = null;\n\n this.rowId = 0;\n this.widgets = {};\n\n dojo.byId(\"acq-unified-result-type\").onchange = function() {\n self.resultTypeChange(this.getValue());\n };\n\n this.allRowIds = function() {\n return dojo.query(\"tr[id^='term-row-']\", \"acq-unified-terms-tbody\").\n map(function(o) { return o.id.match(/^term-row-(\\d+)$/)[1]; });\n };\n\n this._row = function(id) { return dojo.byId(\"term-row-\" + id); };\n this._selector = function(id) { return dojo.byId(\"term-\" + id); };\n this._match_how = function(id) { return dojo.byId(\"term-match-\" + id); };\n\n this._updateMatchHowForField = function(term, key) {\n /* NOTE important to use self, not this, in this function.\n *\n * Based on the selected field (its datatype and the kind of widget\n * that AutoFieldWidget provides for it) we update the possible\n * choices in the mach_how selector.\n */\n var w = self.widgets[key];\n var can_do_fuzzy, can_do_in;\n if (term.datatype == \"id\") {\n can_do_fuzzy = false;\n can_do_in = true;\n } else if (term.datatype == \"link\") {\n var target = self.getLinkTarget(term);\n can_do_fuzzy = (target == \"au\");\n can_do_in = (target == \"bre\"); /* XXX might revise later */\n } else if (typeof(w.declaredClass) != \"undefined\") {\n can_do_fuzzy = can_do_in =\n Boolean(w.declaredClass.match(/form\\.Text|XULT/));\n } else {\n var type = dojo.attr(w, \"type\");\n if (type)\n can_do_fuzzy = can_do_in = (type == \"text\");\n else\n can_do_fuzzy = can_do_in = false;\n }\n\n self.matchHowAllow(key, \"__fuzzy\", can_do_fuzzy);\n self.matchHowAllow(key, \"__in\", can_do_in);\n\n var inequalities = (term.datatype == \"timestamp\");\n self.matchHowAllow(key, \"__gte\", inequalities);\n self.matchHowAllow(key, \"__lte\", inequalities);\n };\n\n this.removerButton = function(n) {\n return dojo.create(\"button\", {\n \"innerHTML\": \"X\",\n \"class\": \"acq-unified-remover\",\n \"onclick\": function() { self.removeRow(n); }\n });\n };\n\n this.matchHowAllow = function(where, what, which, exact) {\n dojo.query(\n \"option[value\" + (exact ? \"\" : \"*\") + \"='\" + what + \"']\",\n typeof(where) == \"object\" ? where : this._match_how(where)\n ).forEach(function(o) { o.disabled = !which; });\n };\n\n this.getLinkTarget = function(term) {\n return fieldmapper.IDL.fmclasses[term.hint].\n field_map[term.field][\"class\"];\n };\n\n this.updateRowWidget = function(id, value, noFocus) {\n var where = nodeByName(\"widget\", this._row(id));\n\n delete this.widgets[id];\n dojo.empty(where);\n\n this._selector(id).makeWidget(\n where, this.widgets, this._match_how(id), value, noFocus,\n this._updateMatchHowForField\n );\n };\n\n this.resultTypeChange = function(resultType) {\n if (\n this.lastResultType == \"lineitem_and_bib\" &&\n resultType != \"lineitem_and_bib\"\n ) {\n /* Re-enable all non-bib-friendly fields in all search term\n * field selectors. */\n this.allRowIds().forEach(\n function(id) {\n self._selector(id).onlyBibFriendly(false);\n self.matchHowAllow(id, \"\", true, /* exact */ true);\n self.matchHowAllow(id, \"__not\", true, /* exact */ true);\n }\n );\n /* Tell the selector factory to create new search term field\n * selectors with all fields, not just bib-friendly ones. */\n this.selectorFactory.onlyBibFriendly = false;\n } else if (\n this.lastResultType != \"lineitem_and_bib\" &&\n resultType == \"lineitem_and_bib\"\n ) {\n /* Remove all search term rows set to non-bib-friendly fields. */\n this.allRowIds().forEach(\n function(id) {\n var term = self._selector(id).getTerm();\n if (term &&\n !self.terms[term.hint][term.field].bib_friendly) {\n self.removeRow(id);\n }\n }\n );\n /* Disable all non-bib-friendly fields in all remaining search term\n * field selectors. */\n this.allRowIds().forEach(\n function(id) {\n self._selector(id).onlyBibFriendly(true);\n self.matchHowAllow(id, \"\", false, /* exact */ true);\n self.matchHowAllow(id, \"__not\", false, /* exact */ true);\n }\n );\n /* Tell the selector factory to create new search term field\n * selectors with only bib friendly options. */\n this.selectorFactory.onlyBibFriendly = true;\n }\n this.lastResultType = resultType;\n };\n\n /* this method is particularly kludgy... puts back together a string\n * based on object properties that might arrive in indeterminate order. */\n this._term_reverse_match_how = function(term) {\n /* only two-key combination we use */\n if (term.__not && term.__fuzzy)\n return \"__not,__fuzzy\";\n\n /* only other possibilities are single-key or no key */\n for (var key in term) {\n if (/^__/.test(key))\n return key;\n }\n\n return null;\n };\n\n\n this._term_reverse_selector_field = function(term) {\n for (var key in term) {\n if (!/^__/.test(key))\n return key;\n }\n return null;\n };\n\n this._term_reverse_selector_value = function(term) {\n for (var key in term) {\n if (!/^__/.test(key))\n return term[key];\n }\n return null;\n };\n\n this.addRow = function(term, hint) {\n var uniq = (this.rowId)++;\n\n var row = dojo.clone(this.template);\n dojo.attr(row, \"id\", \"term-row-\" + uniq);\n\n var selector = this.selectorFactory.make(uniq);\n dojo.attr(\n selector, \"onchange\", function() { self.updateRowWidget(uniq); }\n );\n\n var match_how = dojo.query(\"select\", nodeByName(\"match\", row))[0];\n dojo.attr(match_how, \"id\", \"term-match-\" + uniq);\n dojo.attr(match_how, \"selectedIndex\", 0);\n dojo.attr(\n match_how, \"onchange\",\n function() {\n if (this.getValue() == \"__in\") {\n self.updateRowWidget(uniq);\n this.was_in = true;\n } else if (this.was_in) {\n self.updateRowWidget(uniq);\n this.was_in = false;\n }\n if (self.widgets[uniq]) self.widgets[uniq].focus();\n }\n );\n\n /* Kind of inelegant; could be improved: this section turns off\n * match-type options that don't apply to bib searching. */\n this.matchHowAllow(\n match_how, \"\",\n !this.selectorFactory.onlyBibFriendly, /* exact */ true\n );\n this.matchHowAllow(\n match_how, \"__not\",\n !this.selectorFactory.onlyBibFriendly, /* exact */ true\n );\n if (this.selectorFactory.onlyBibFriendly)\n match_how.setValue(\"__fuzzy\");\n\n nodeByName(\"selector\", row).appendChild(selector);\n nodeByName(\"remove\", row).appendChild(this.removerButton(uniq));\n\n dojo.place(row, \"acq-unified-terms-tbody\", \"last\");\n\n if (term && hint) {\n var attr = this._term_reverse_selector_field(term);\n var field = hint + \":\" + attr;\n selector.setValue(field);\n\n var match_how_value = this._term_reverse_match_how(term);\n if (match_how_value)\n match_how.setValue(match_how_value);\n\n var value = this._term_reverse_selector_value(term);\n if (this.terms[hint][attr].datatype == \"timestamp\")\n value = dojo.date.stamp.fromISOString(value);\n this.updateRowWidget(uniq, value, /* noFocus */ true);\n\n }\n }\n\n this.removeRow = function(id) {\n delete this.widgets[id];\n dojo.destroy(this._row(id));\n };\n\n this.reflect = function(search_object) {\n for (var hint in search_object) {\n search_object[hint].forEach(\n function(term) { self.addRow(term, hint); }\n );\n }\n };\n\n this.buildSearchObject = function() {\n var so = {};\n\n for (var id in this.widgets) {\n var kvlist = this._selector(id).getValue().split(\":\");\n var hint = kvlist[0];\n var attr = kvlist[1];\n if (!(hint && attr)) continue;\n\n var match_how =\n this._match_how(id).getValue().split(\",\").filter(Boolean);\n\n var value;\n if (typeof(this.widgets[id].declaredClass) != \"undefined\") {\n if (this.widgets[id].declaredClass.match(/Date/)) {\n value =\n dojo.date.stamp.toISOString(this.widgets[id].value).\n split(\"T\")[0];\n } else {\n value = this.widgets[id].attr(\"value\");\n if (this.widgets[id].declaredClass.match(/Check/))\n value = (value == \"on\") ? \"t\" : \"f\";\n }\n } else {\n value = this.widgets[id].value;\n }\n\n if (!so[hint])\n so[hint] = [];\n\n var unit = {};\n unit[attr] = value;\n match_how.forEach(function(key) { unit[key] = true; });\n if (this.terms[hint][attr].datatype == \"timestamp\")\n unit.__castdate = true;\n\n so[hint].push(unit);\n }\n return so;\n };\n\n this.buildBibSearchString = function() {\n var conj = {\"and\": \" \", \"or\": \" || \"}[\n dojo.byId(\"acq-unified-conjunction\").getValue()\n ];\n\n var sso = {};\n /* Notice that below we use conj in two places and a constant \" || \"\n * in one. That constant \" || \" is applied for the \"file of terms\"\n * search term type, which is in itself always an or search. */\n for (var id in this.widgets) {\n var term = this._selector(id).getTerm();\n var attr = term.bib_attr_name;\n var match_how = this._match_how(id).getValue();\n var widget = this.widgets[id];\n\n if (!sso[attr]) sso[attr] = [];\n var value = (\n typeof(widget.attr) == \"function\" ?\n widget.attr(\"value\") : widget.value\n );\n if (typeof(value) != \"string\")\n value = value.join(\" || \");\n sso[attr].push(\n (match_how.indexOf(\"__not\") == -1 ? \"\" : \"-\") + value\n );\n }\n var ssa = [];\n for (var attr in sso)\n ssa.push(attr + \": \" + sso[attr].join(conj));\n return \"(\" + ssa.join(conj) + \")\";\n };\n}", "title": "" }, { "docid": "ec59724bb861b1ffeed36334b71fb53e", "score": "0.56762123", "text": "static get tag() {\n return \"glossary-term\";\n }", "title": "" }, { "docid": "0a3095ec3f0c873f8d98fcb67f37df28", "score": "0.5668407", "text": "function createEntry(pokeTerm) {\r\n return (\r\n <Entry\r\n key={pokeTerm.id}\r\n img={pokeTerm.image}\r\n name={pokeTerm.name}\r\n description={pokeTerm.description}\r\n Evolutions={pokeTerm.Evolutions}\r\n />\r\n );\r\n}", "title": "" }, { "docid": "2351200cfde8753c0792ab61707d831f", "score": "0.56673837", "text": "get termType() {\n return 'Variable';\n }", "title": "" }, { "docid": "2351200cfde8753c0792ab61707d831f", "score": "0.56673837", "text": "get termType() {\n return 'Variable';\n }", "title": "" }, { "docid": "b4a771978373be4c177133e546e51413", "score": "0.5666196", "text": "function Term(hiragana, kanji, definition) {\n this.hiragana_ = hiragana;\n this.kanji_ = kanji;\n this.definition_ = definition;\n}", "title": "" }, { "docid": "c7fb544ffecad729e54609d226dd8bd7", "score": "0.5636425", "text": "applyTerm(term) {\n throw new Error('not implemented')\n }", "title": "" }, { "docid": "c881ce72e3148d513dcc2b39e70b105c", "score": "0.5619669", "text": "function termToId(term) {\n if (typeof term === 'string') return term;\n if (term instanceof Term && term.termType !== 'Quad') return term.id;\n if (!term) return DEFAULTGRAPH.id;\n\n // Term instantiated with another library\n switch (term.termType) {\n case 'NamedNode':\n return term.value;\n case 'BlankNode':\n return `_:${term.value}`;\n case 'Variable':\n return `?${term.value}`;\n case 'DefaultGraph':\n return '';\n case 'Literal':\n return `\"${term.value}\"${term.language ? `@${term.language}` : term.datatype && term.datatype.value !== xsd.string ? `^^${term.datatype.value}` : ''}`;\n case 'Quad':\n // To identify RDF* quad components, we escape quotes by doubling them.\n // This avoids the overhead of backslash parsing of Turtle-like syntaxes.\n return `<<${escapeQuotes(termToId(term.subject))} ${escapeQuotes(termToId(term.predicate))} ${escapeQuotes(termToId(term.object))}${(0, _N3Util.isDefaultGraph)(term.graph) ? '' : ` ${termToId(term.graph)}`}>>`;\n default:\n throw new Error(`Unexpected termType: ${term.termType}`);\n }\n}", "title": "" }, { "docid": "47fa164d0eeab5075ebc7f6838537de0", "score": "0.5596894", "text": "function insertTerm(term) {\n return knex(\"terms\").insert(term)\n}", "title": "" }, { "docid": "9fdbcd35798198bdc525e4a7bb0920f6", "score": "0.5566779", "text": "get term () {\n\t\treturn this._term;\n\t}", "title": "" }, { "docid": "a962fad5d721c9764abfd757c0e584b4", "score": "0.55487984", "text": "function crearTermostatoTipo0( id_term)\n{\n\tvar termostato1= new Object();\n\t\n\t\n\ttermostato1.parametros={temperatura:35.5, modo:0,temperaturaAmbiente:30.5,ValvulaAbierta:0};// datos recibidor del termostato\n\ttermostato1.configuracion={temperatura:35.5, modo:0, Caption:\"\"};// parametros que se envian al termostato \n\ttermostato1.configuracion.Caption=\"Termostato \"+id_term;\n\ttermostato1.iluminadoModo=false;\n\ttermostato1.Tipo=0;// tipo de objeto en este caso termostato sistena\n\ttermostato1.Caption=\"Termostato \"+id_term;\n\ttermostato1.visible=1;// se mira si es visible o no \n\ttermostato1.EstaMinimizado=1; // 0 maximizado, 1 minimizado\n\t//termostato1.temperatura=35.5;\n\t//termostato1.temperaturaAmbiente=30.5;\n\ttermostato1.estado=1; // donde 1 es on y 0 off \n\ttermostato1.actualizar=0; // donde 1 es que hay que enviar datos al servicio pass , 0 no hay datos actualizador\n\ttermostato1.dat=0;// ????\n\t//termostato.HayDatosCambiados=HayDatosCambiados_Term;\n\n\ttabla_valores.push(termostato1);\n\n\tvar t = document.querySelector('#termostato_tipo_1');\n\t\n\t\n\tvar clone = document.importNode(t.content, true);\n\t\n\tclone.getElementById(\"termostato\").id=\"termostato\"+id_term;\n\tclone.getElementById(\"marco_superior\").id=\"marco_superior\"+id_term;\n\tclone.getElementById(\"icono_despliegue\").id=\"icono_despliegue\"+id_term;\n\tclone.getElementById(\"caption_temp\").id=\"caption_temp\"+id_term;\n\tclone.getElementById(\"tempAmbiente\").id=\"tempAmbiente\"+id_term;\n\tclone.getElementById(\"icono_OnOffSup\").id=\"icono_OnOffSup\"+id_term;\n\tclone.getElementById(\"marco_inf\").id=\"marco_inf\"+id_term;\n\tclone.getElementById(\"zona_iconos\").id=\"zona_iconos\"+id_term;\n\tclone.getElementById(\"btn_mas\").id=\"btn_mas\"+id_term;\n\tclone.getElementById(\"icono_func_mas\").id=\"icono_func_mas\"+id_term;\n\tclone.getElementById(\"temp_grande\").id=\"temp_grande\"+id_term;\n\tclone.getElementById(\"btn_menos\").id=\"btn_menos\"+id_term;\n\tclone.getElementById(\"icono_func_menos\").id=\"icono_func_menos\"+id_term;\n\tclone.getElementById(\"icono_onoff\").id=\"icono_onoff\"+id_term;\n\tclone.getElementById(\"btn_onoff\").id=\"btn_onoff\"+id_term;\n\tclone.getElementById(\"marco_temp\").id=\"marco_temp\"+id_term;\n\tclone.getElementById(\"btn_conf\").id=\"btn_conf\"+id_term;\n\tclone.getElementById(\"temp_peque\").id=\"temp_peque\"+id_term;\n\tclone.getElementById(\"term_modo\").id=\"term_modo\"+id_term;\n\t\n\t\n\t$(\"#contenedor\").append(clone);\n\tdocument.getElementById(\"icono_despliegue\"+id_term).setAttribute( \"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"icono_OnOffSup\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_mas\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_menos\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_onoff\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_conf\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\t\n}", "title": "" }, { "docid": "9e07a1a6db1b9254a5baa6e0b1d87ca3", "score": "0.5518248", "text": "get termType() {\n return 'NamedNode';\n }", "title": "" }, { "docid": "9e07a1a6db1b9254a5baa6e0b1d87ca3", "score": "0.5518248", "text": "get termType() {\n return 'NamedNode';\n }", "title": "" }, { "docid": "e196f9c8d23e9c139d6df39ddd38fe9a", "score": "0.5518068", "text": "async function newSuggest(term) {\r\n let urlBase = `${URL_GIPHY}/v1/tags/related/${term}?api_key=${API_KEY}&limit=4`;\r\n let response = await fetch(urlBase);\r\n let suggestions = await response.json();\r\n return suggestions;\r\n}", "title": "" }, { "docid": "f3a4600352a1a7847654dac8f6ce76d4", "score": "0.5466697", "text": "function Add() {\n if (arguments.length === 1) {\n this.terms = arguments[0];\n } else {\n this.terms = _.toArray(arguments);\n }\n }", "title": "" }, { "docid": "eda30d03ec5c10f7055d960c259bea28", "score": "0.54292685", "text": "function termsGetDefinition()\r\n{\r\n terms = document.getElementsByClassName(\"simp-text-term\");\r\n\r\n for (var t = 0, len = terms.length; t < len; t++) {\r\n terms[t].setAttribute(\"id\", \"st\"+t);\r\n }\r\n\r\n for (var t = 0, len = terms.length; t < len; t++) {\r\n termToChange = document.getElementById(terms[t].id);\r\n changeTooltip(termToChange);\r\n }\r\n}", "title": "" }, { "docid": "da36dc4d630820b9e293ec25723b5fcb", "score": "0.53848976", "text": "function showTerm_extern(O) {\n return JSON.stringify(O)\n}", "title": "" }, { "docid": "97c8f9565dc49426baa6e29ba8ffbbdb", "score": "0.53793764", "text": "function addGlossaryTerm() {\n\t\t\n\tvar divGlossaryTermsList = \tdocument.getElementById('glossTermsListDiv');\n\t\n\tfor(cntGTerm=0; cntGTerm < gblArrGlossaryWords.length; cntGTerm++) {\n\t\tvar basePath = document.location.href.substring(0,document.location.href.indexOf('control.htm') - (courseInstanceId_dyn.length+1));\n\t\tvar descPath = basePath + gblArrGlossaryWords[cntGTerm].descFilePath;\n\t\t\n\t\tvar anchorLink = document.createElement('a');\n\t\tanchorLink.setAttribute(\"class\",\"clsGlossaryLinks\");\n\t\tanchorLink.setAttribute(\"href\",\"javascript:O(\\'\"+descPath+\"\\')\");\n\t\tanchorLink.setAttribute(\"title\",\"View this term\");\n\t\tanchorLink.innerHTML = gblArrGlossaryWords[cntGTerm].word;\n\t\tdivGlossaryTermsList.appendChild(anchorLink);\n\t\t\n\t\tvar subTag = document.createElement('sub');\n\t\tdivGlossaryTermsList.appendChild(subTag);\n\t\t\n\t\tvar brTag = document.createElement('br');\n\t\tdivGlossaryTermsList.appendChild(brTag);\n\t\t\n\t\t/* Add glossary words in glossaryTerm Array */\n\t\tglossaryTerm[descPath] = gblArrGlossaryWords[cntGTerm].word;\n\t}\n\t\n\t// Sort glossary\n\tsortGlossryTerms();\n\t\t\n}", "title": "" }, { "docid": "3a082c613ab10894ada6d760a76dff95", "score": "0.53728163", "text": "function termFromId(id, factory) {\n factory = factory || DataFactory;\n\n // Falsy value or empty string indicate the default graph\n if (!id) return factory.defaultGraph();\n\n // Identify the term type based on the first character\n switch (id[0]) {\n case '?':\n return factory.variable(id.substr(1));\n case '_':\n return factory.blankNode(id.substr(2));\n case '\"':\n // Shortcut for internal literals\n if (factory === DataFactory) return new Literal(id);\n // Literal without datatype or language\n if (id[id.length - 1] === '\"') return factory.literal(id.substr(1, id.length - 2));\n // Literal with datatype or language\n const endPos = id.lastIndexOf('\"', id.length - 1);\n return factory.literal(id.substr(1, endPos - 1), id[endPos + 1] === '@' ? id.substr(endPos + 2) : factory.namedNode(id.substr(endPos + 3)));\n case '<':\n const components = quadId.exec(id);\n return factory.quad(termFromId(unescapeQuotes(components[1]), factory), termFromId(unescapeQuotes(components[2]), factory), termFromId(unescapeQuotes(components[3]), factory), components[4] && termFromId(unescapeQuotes(components[4]), factory));\n default:\n return factory.namedNode(id);\n }\n}", "title": "" }, { "docid": "877e8067ce04a701e86f06d13837b114", "score": "0.5341563", "text": "function isTerm(object) { return !!object.termType; }", "title": "" }, { "docid": "4cb74717683e02a5867542b4d9a7cef1", "score": "0.5336427", "text": "function create(uri, languageId, version, text) {\r\n return { uri: uri, languageId: languageId, version: version, text: text };\r\n }", "title": "" }, { "docid": "4cb74717683e02a5867542b4d9a7cef1", "score": "0.5336427", "text": "function create(uri, languageId, version, text) {\r\n return { uri: uri, languageId: languageId, version: version, text: text };\r\n }", "title": "" }, { "docid": "a2595bd31b3745a8e8b95a3339103899", "score": "0.5320902", "text": "function create(uri, languageId, version, text) {\r\n return { uri: uri, languageId: languageId, version: version, text: text };\r\n }", "title": "" }, { "docid": "a2595bd31b3745a8e8b95a3339103899", "score": "0.5320902", "text": "function create(uri, languageId, version, text) {\r\n return { uri: uri, languageId: languageId, version: version, text: text };\r\n }", "title": "" }, { "docid": "a2595bd31b3745a8e8b95a3339103899", "score": "0.5320902", "text": "function create(uri, languageId, version, text) {\r\n return { uri: uri, languageId: languageId, version: version, text: text };\r\n }", "title": "" }, { "docid": "a2595bd31b3745a8e8b95a3339103899", "score": "0.5320902", "text": "function create(uri, languageId, version, text) {\r\n return { uri: uri, languageId: languageId, version: version, text: text };\r\n }", "title": "" }, { "docid": "2435373c447a60533026a308f1cc1d24", "score": "0.53206825", "text": "function create(uri, languageId, version, text) {\n return {\n uri: uri,\n languageId: languageId,\n version: version,\n text: text\n };\n }", "title": "" }, { "docid": "2435373c447a60533026a308f1cc1d24", "score": "0.53206825", "text": "function create(uri, languageId, version, text) {\n return {\n uri: uri,\n languageId: languageId,\n version: version,\n text: text\n };\n }", "title": "" }, { "docid": "2435373c447a60533026a308f1cc1d24", "score": "0.53206825", "text": "function create(uri, languageId, version, text) {\n return {\n uri: uri,\n languageId: languageId,\n version: version,\n text: text\n };\n }", "title": "" }, { "docid": "34f521354883d7e71f120b0f67188ebb", "score": "0.5311195", "text": "function create(uri, languageId, version, text) {\n return { uri: uri, languageId: languageId, version: version, text: text };\n }", "title": "" }, { "docid": "8733a420ff9a8e57877afc0dcf01fad9", "score": "0.5309462", "text": "function termLookup(info, tab){\n\tvar term = info.selectionText.replace(/\\s+/g, '-').toLowerCase(),\n\t\tfirstLetter = term.charAt(0);\n\n\tvar DOMAIN = 'http://www.investopedia.com',\n\t\tPATH = /terms/+firstLetter+'/'+term+'.asp',\n\t\tURL = DOMAIN+PATH;\n\n\t$.get(URL, parseResponse);\n}", "title": "" }, { "docid": "839d89b7c73377ec4517f15936b87700", "score": "0.5296633", "text": "function NeurolaxTerm(){}", "title": "" }, { "docid": "4e64729e0595b0af07607aad0c782d3d", "score": "0.5290291", "text": "function makeWord(text) {\n return {word: text, score: 1};\n}", "title": "" }, { "docid": "fdc16397321c8774bcd0053fa3577439", "score": "0.528715", "text": "function createEntry(emojiTerm) {\n return (\n <Entry\n key={emojiTerm.id}\n emoji={emojiTerm.emoji}\n name={emojiTerm.name}\n description={emojiTerm.meaning}\n />\n );\n}", "title": "" }, { "docid": "d08d37648aad61637f65e53a9e4d512d", "score": "0.52586955", "text": "function defineTerms(html) {\n let newHTML = html;\n\n glossary\n .sort((a, b) => b.term.length - a.term.length)\n .forEach((record) => {\n // join all regular expressions if needed\n const match =\n '\\\\b(' + (record.regexp || [record.term]).join('|') + ')\\\\b';\n\n // ensure we don't define terms within tags\n const regexp = new RegExp(match + '(?![^<]*>|[^<abbr>]*</)', 'ig');\n\n // show term and definition in title\n const title = [record.term, record.definition].join(': ');\n\n newHTML = reactStringReplace(newHTML, regexp, (value) => (\n <abbr title={title}>{value}</abbr>\n ));\n });\n\n return newHTML;\n }", "title": "" }, { "docid": "0a4bb4356ee9b746c1459123da47e694", "score": "0.5256354", "text": "static of(...args) {\n\t\treturn new RealTerm(...args)\n\t}", "title": "" }, { "docid": "c29514162a1e36a30a5c7cc23ff5c69e", "score": "0.52555215", "text": "function makeURL(term,year) {\n var api = 'https://api.nytimes.com/svc/search/v2/articlesearch.jsonp?callback=svc_search_v2_articlesearch&';\n var query = '?q='+term+'&begin_date='+year+'0101&end_date='+year+'1231';\n var test = '&facet_field=source&facet_filter=true';\n var fq = '&fq=headline:(\\\"'+ term +'\\\")';\n var fl = '&fl=headline,web_url,word_count,pub_date,type_of_material';\n var apikey = \"&api-key=1548985a281744b09be735431b84f704\";\n\n var url = api+query+fq+fl+apikey;\n return url;\n}", "title": "" }, { "docid": "4a84a00db378f176cea83bdf768f23b0", "score": "0.52198935", "text": "get termType() {\n return 'DefaultGraph';\n }", "title": "" }, { "docid": "4a84a00db378f176cea83bdf768f23b0", "score": "0.52198935", "text": "get termType() {\n return 'DefaultGraph';\n }", "title": "" }, { "docid": "e60cfb77df96bf481f5d5f0d36e7b1bb", "score": "0.52104205", "text": "get termType() {\n return 'BlankNode';\n }", "title": "" }, { "docid": "e60cfb77df96bf481f5d5f0d36e7b1bb", "score": "0.52104205", "text": "get termType() {\n return 'BlankNode';\n }", "title": "" }, { "docid": "7c58bfc85a0b2fd69716f61b6df8487b", "score": "0.5204161", "text": "function setTerms(terms) {\n $(\"#results ul.type li.result.default\").each(function () {\n $(this).data({\"terms\" : terms });\n $(this).find(\"span.terms\").html(highlight(terms, terms));\n });\n}", "title": "" }, { "docid": "b6299a2f0dabb39462041e49746a2830", "score": "0.5187097", "text": "function addRelated(term, dropdown){\n\tvar vocaburl = baseurl + \"vocab/skos/related/\" + encodeURI(term) + \"/json\";\n\tvar xmlhttp = new XMLHttpRequest();\n\txmlhttp.onreadystatechange = function() {\n\t\tif (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n\t\t\tvar obj = JSON.parse(xmlhttp.responseText);\n\t\t\tvar arr = obj.results.bindings;\n\n\t\t\tfor(i = 0; i < arr.length; i++) {\n\t\t\t\tvar thisTerm = arr[i].term.value;\n\t\t\t\t// check to see if value exists before selecting it\n\t\t\t\t$(dropdown + ' option').each(function(){\n\t\t\t\t\t//alert(this.value);\n\t\t\t\t\tvar exists = $(dropdown + ' option').filter(function(){ \n\t\t\t\t\t\treturn $(this).val() == thisTerm; \n\t\t\t\t\t}).length;\n\t\t\t\t\tif (exists) {\n\t\t\t\t\t\t$(dropdown).multiselect(\"selectOption\", \"'\" + thisTerm + \"'\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\txmlhttp.open(\"GET\", vocaburl, true);\n\txmlhttp.send();\n}", "title": "" }, { "docid": "9a72bf97b18e7e04685ef67142f84358", "score": "0.51843834", "text": "function TermSelectorFactory(terms) {\n var self = this;\n this.terms = terms;\n this.onlyBibFriendly = false;\n\n this.template = dojo.create(\"select\");\n this.template.appendChild(\n dojo.create(\"option\", {\n \"disabled\": \"disabled\",\n \"selected\": \"selected\",\n \"value\": \"\",\n \"innerHTML\": localeStrings.SELECT_SEARCH_FIELD\n })\n );\n\n /* Create abbreviations for class names to make field categories\n * more readable in field selector control. */\n this._abbreviate = function(s) {\n var last, result;\n for (var i = 0; i < s.length; i++) {\n if (s[i] != \" \") {\n if (!i) result = s[i];\n else if (last == \" \") result += s[i];\n }\n last = s[i];\n }\n return result;\n };\n\n var selectorMethods = {\n /* Important: within the following functions, \"this\" refers to one\n * HTMLSelect object, and \"self\" refers to the TermSelectorFactory. */\n \"getTerm\": function() { return this.valueToTerm(this.getValue()); },\n \"valueToTerm\": function(value) {\n var parts = value.split(\":\");\n if (!parts || parts.length != 2) return null;\n return dojo.mixin(\n self.terms[parts[0]][parts[1]],\n {\"hint\": parts[0], \"field\": parts[1]}\n );\n },\n \"onlyBibFriendly\": function(yes) {\n if (yes) {\n for (var i = 0; i < this.options.length; i++) {\n if (this.options[i].value) {\n var term = this.valueToTerm(this.options[i].value);\n this.options[i].disabled = !term.bib_friendly;\n }\n }\n } else {\n for (var i = 0; i < this.options.length; i++) {\n if (this.options[i].value)\n this.options[i].disabled = false;\n }\n }\n },\n \"makeWidget\": function(\n parentNode, wStore, matchHow, value, noFocus, callback\n ) {\n var term = this.getTerm();\n var widgetKey = this.uniq;\n var target = termManager.getLinkTarget(term);\n\n if (matchHow.getValue() == \"__in\") {\n new openils.widget.XULTermLoader({\n \"parentNode\": parentNode\n }).build(\n function(w) {\n wStore[widgetKey] = w;\n if (typeof(callback) == \"function\")\n callback(term, widgetKey);\n if (typeof(value) != \"undefined\")\n w.attr(\"value\", value);\n /* I would love for the following call not to be\n * necessary, so that updating the value of the dijit\n * would lead to this automatically, but I can't yet\n * figure out the correct way to do this in Dojo.\n */\n w.updateCount();\n }\n );\n } else if (term.hint == \"acqlia\" ||\n (term.hint == \"jub\" && term.field == \"eg_bib_id\") ||\n term.datatype == \"org_unit\" ||\n (term.datatype == \"link\" && target == \"au\")) {\n /* The test for jub.eg_bib_id is a special case to prevent\n * AutoFieldWidget from trying to render a ridiculous dropdown\n * of every bib record ID in the system. */\n wStore[widgetKey] = dojo.create(\n \"input\", {\"type\": \"text\"}, parentNode, \"only\"\n );\n if (typeof(value) != \"undefined\")\n wStore[widgetKey].value = value;\n if (!noFocus)\n wStore[widgetKey].focus();\n if (typeof(callback) == \"function\")\n callback(term, widgetKey);\n } else {\n new openils.widget.AutoFieldWidget({\n \"fmClass\": term.hint,\n \"fmField\": term.field,\n \"noDisablePkey\": true,\n \"parentNode\": dojo.create(\"span\", null, parentNode, \"only\")\n }).build(\n function(w) {\n wStore[widgetKey] = w;\n if (typeof(value) != \"undefined\") {\n if (w.declaredClass.match(/Check/))\n w.attr(\"checked\", value == \"t\");\n else\n w.attr(\"value\", value);\n }\n if (!noFocus)\n w.focus();\n if (typeof(callback) == \"function\")\n callback(term, widgetKey);\n\n // submit on enter\n openils.Util.registerEnterHandler(w.domNode,\n function() { \n resultManager.go(termManager.buildSearchObject());\n }\n );\n }\n );\n }\n }\n }\n\n for (var hint in this.terms) {\n var optgroup = dojo.create(\n \"optgroup\", {\"value\": \"\", \"label\": this.terms[hint].__label}\n );\n var prefix = this._abbreviate(this.terms[hint].__label);\n\n for (var field in this.terms[hint]) {\n if (!/^__/.test(field)) {\n optgroup.appendChild(\n dojo.create(\"option\", {\n \"class\": \"acq-unified-option-regular\",\n \"value\": hint + \":\" + field,\n \"innerHTML\": prefix + \" - \" +\n this.terms[hint][field].label\n })\n );\n }\n }\n\n this.template.appendChild(optgroup);\n }\n\n this.make = function(n) {\n var node = dojo.clone(this.template);\n node.uniq = n;\n dojo.attr(node, \"id\", \"term-\" + n);\n for (var name in selectorMethods)\n node[name] = selectorMethods[name];\n if (this.onlyBibFriendly)\n node.onlyBibFriendly(true);\n return node;\n };\n}", "title": "" }, { "docid": "2dfc6f46d0c7bcef697df408e9bc1a39", "score": "0.5176528", "text": "function createWordObject(word) {\n var randomArray = word.split(\"\");\n newWordObject = new Randomword(randomArray);\n newWordObject.createArrayObjects();\n}", "title": "" }, { "docid": "6c2343396bdbb76fae600bac0bde450e", "score": "0.5171348", "text": "function buildUrl(searchTerm){\n return {\n s: searchTerm,\n r: \"json\"\n }\n }", "title": "" }, { "docid": "f0358f296dd91675b0da3dc08c8b373c", "score": "0.5127307", "text": "function Define(termId) {\t\n\t// Decide on the content\n\tvar content;\n\t// XXX: only load the glossary once the user has clicked on a term\n\tif (window.T_ID == null) {\n\t\tLoad_Glossary(termId);\n\t\treturn\n\t}\n\tif (T_ID[termId] == null) {\n\t\tcontent = 'Not defined...';\n\t} else {\n\t\tcontent = T_ID[termId];\n\t}\n\t\n\t// Extract the full term and add other links if possible\n\tvar start = content.indexOf(\"<b>\") + 3;\n\tvar end = content.indexOf(\"</b>\");\n\tvar morelinks;\n\tif (start != -1 && end != -1) {\n\t\tvar term = content.substring(start, end);\n\t\t// Remove : if there\n\t\tterm = term.replace(/[:]/g, \"\");\n\n\t\t// Remove entities if there\n\t\tterm = term.replace(/\\&\\w+;/g, \"\");\n\n\t\t// remove parentheticals\n\t\tterm = term.replace(/ *\\([^)]+\\)/g, \"\");\n\n\t\t// replace spaces with + for google\n\t\tvar googleTerm = term.replace(/ /g, \"+\");\n\n\t\t// And add quotes around the whole thing\n\t\tgoogleTerm = '\"' + googleTerm + '\"';\n\n\t\t// replace spaces with _ for wikipedia\n\t\t//var wikiTerm = term.replace(/ /g, \"_\");\n\t\t\n\t\t// Add wikipedia and google links\t\n\t\t// morelinks = ' | <a class=\"ba\" href=\"http://en.wikipedia.org/wiki/' + wikiTerm + '\" target=\"_blank\">Wikipedia</a> | <a class=\"ba\" href=\\'http://www.google.com/search?q=' + googleTerm + '\\' target=\"_blank\">Google</a>';\n\t\t// XXX removed : | at start\n\t\tmorelinks = '<a class=\"ba\" href=\\'http://www.google.com/search?q=' + googleTerm + '\\' target=\"_blank\">Google</a>';\n\t} else {\n\t\tmorelinks = \"\";\n\t}\n\t\n\t// definitionWidth can be set in config.js;\n\t// if it's not set, it will be null, which is fine.\n\t// windowTop, windowLeft can be set in config.js; set to null in defaults.js\n\tShowPopInWindow_ebook(\"Glossary Definition\"\n\t\t\t\t\t, content\n\t\t\t\t\t, morelinks\n\t\t\t\t\t, null\n\t\t\t\t\t, null\n\t\t\t\t\t, null\n\t);\n\n\t// Record the term, so that if we jump to the glossary we'll go to this place\n\t// If we do so, use the first four letters of the termId, in hopes of getting some\n\t// additional helpful entries.\n\t// KC: Unfortunately, in IE, &para and &cent in the query string get rendered as a paragraph and cents symbol respectively, throwing an\n\t// error \n\tif (termId.substr(0,4) == \"para\" || termId.substr(0,4) == \"cent\") {\n\t\tlastDefinedTermId = termId.substr(0, 5);\n\t} else {\n\t\tlastDefinedTermId = termId.substr(0, 4);\n\t}\n}", "title": "" }, { "docid": "3e16ffadbb5a15e118d604a673ed4a22", "score": "0.512643", "text": "toJSON() {\n return {\n termType: this.termType,\n subject: this._subject.toJSON(),\n predicate: this._predicate.toJSON(),\n object: this._object.toJSON(),\n graph: this._graph.toJSON()\n };\n }", "title": "" }, { "docid": "50354413421a5d447f1d5647cfed9a2b", "score": "0.510002", "text": "function _addPreferredTerm(term, entry, typeOrLanguageValue) {\n if(!entry.hasOwnProperty(typeOrLanguageValue)) {\n entry[typeOrLanguageValue] = term;\n }\n }", "title": "" }, { "docid": "097a025b724dfc57af638b7af7e7a67d", "score": "0.5091736", "text": "function assignRequest (target, source, obj = {}, term) {\n _.merge(target, _.omit(source, ['term']), obj)\n if (term == true) target.term = source.term\n}", "title": "" }, { "docid": "2ae90af55a5b64446c28417fb2cf56c8", "score": "0.5070753", "text": "constructor(field, value) {\n super('span_term');\n\n if (!isNil(field)) this._field = field;\n if (!isNil(value)) this._queryOpts.value = value;\n }", "title": "" }, { "docid": "2a6a9be025fa147843fc44ba96521bba", "score": "0.50544894", "text": "function _addPreferredTerm(term, entry, typeOrLanguageValue) {\n if (!entry.hasOwnProperty(typeOrLanguageValue)) {\n entry[typeOrLanguageValue] = term;\n }\n }", "title": "" }, { "docid": "c8e64f9b1cb0755068e372f25620ef2b", "score": "0.5053336", "text": "term() {\n const startToken = this.currentToken;\n\n try {\n return this.binaryProduction(this.factor, OperatorsTerm);\n } catch (e) {\n throw new ParserException('Error processing TERM', startToken, e);\n }\n }", "title": "" }, { "docid": "b07a829b75f6138409a9c719389a2911", "score": "0.5052845", "text": "function create (req, res) {\n db.Article.findById(req.params.article_id, function(err, foundArticle){\n let newTag = new db.Tag({\n tagTitle: req.body.tagTitle\n })\n foundArticle.tags.push(newTag);\n foundArticle.save(function(err, savedArticle){\n console.log('New Tag Created: ', newTag);\n res.json(newTag)\n })\n })\n}", "title": "" }, { "docid": "7fe766bf0fa682da0eab715feb1d6a3c", "score": "0.5043668", "text": "static deskolemizeTerm(term, sourceId) {\n if (term.termType === 'BlankNode' && 'skolemized' in term) {\n term = term.skolemized;\n }\n if (term.termType === 'NamedNode') {\n if (term.value.startsWith(FederatedQuadSource.SKOLEM_PREFIX)) {\n const colonSeparator = term.value.indexOf(':', FederatedQuadSource.SKOLEM_PREFIX.length);\n const termSourceId = term.value.substr(FederatedQuadSource.SKOLEM_PREFIX.length, colonSeparator - FederatedQuadSource.SKOLEM_PREFIX.length);\n // We had a skolemized term\n if (termSourceId === sourceId) {\n // It came from the correct source\n const termLabel = term.value.substr(colonSeparator + 1, term.value.length);\n return DataFactory.blankNode(termLabel);\n }\n else {\n // It came from a different source\n return null;\n }\n }\n }\n return term;\n }", "title": "" }, { "docid": "12f81a0fe66782d6db28a496da317b4a", "score": "0.5029208", "text": "function newObject(){\n var newFlavor = document.getElementById(\"flavor\").textContent;\n var newGlaze = customizeGlazeToObject();\n var newQuantity = customizeQuantityToObject();\n var newPrice = customizePriceToObject();\n //var newID = customizeIDToObject();\n var newBun = new bun (newFlavor, newGlaze, newQuantity, newPrice);\n return newBun;\n}", "title": "" }, { "docid": "0a73729937edc94bfd8bf23406019fb9", "score": "0.50274646", "text": "function addWord(req, res) {\n const data = req.body;\n\n if (!data || !data.englishWord || !data.translation) {\n res.status(400).send('Bad request.');\n return;\n }\n\n Vocabulary.create(data, function (err, newWord) {\n if (err) {\n res.status(500).json({\n status: 'An error occurred in adding new word.',\n data: err\n });\n } else {\n res.status(201).json({\n status: 'OK',\n data: newWord\n });\n }\n });\n}", "title": "" }, { "docid": "cbe8d795bbcacba76f68e27bd8ec41c4", "score": "0.5025139", "text": "function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits\n };\n }", "title": "" }, { "docid": "cbe8d795bbcacba76f68e27bd8ec41c4", "score": "0.5025139", "text": "function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits\n };\n }", "title": "" }, { "docid": "cbe8d795bbcacba76f68e27bd8ec41c4", "score": "0.5025139", "text": "function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits\n };\n }", "title": "" }, { "docid": "e7c471a29ab752c6840e2c53ba43a570", "score": "0.50220937", "text": "function _createTodo(txt) {\n // const txt = txt\n return {\n _id: utilService.makeId(),\n txt\n }\n}", "title": "" }, { "docid": "1ea99e3c3ac4912ffcf2ef99180e2855", "score": "0.5021874", "text": "function searchTerms(d){\n\t\n\tpayload = implode_form(d);\n\n\td.getElementById('demo_results').style.display = \"block\";\n\trdiv = d.getElementById('results_status'); // locate the output div \n\trdiv.innerHTML = ''; // clear out the block, prepare for data!\n\n\tlaunchEngines(rdiv,apibase+'/terms.',payload);\n\t//console.log('APIBASE: ' + apibase);\n\n}", "title": "" }, { "docid": "1e7b8b8b526ad88087fab8b881784c92", "score": "0.50198376", "text": "function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits,\n };\n }", "title": "" }, { "docid": "a79ca0ffd7a88ea1d11ee6408cb3909b", "score": "0.5002658", "text": "constructor(text) {\n this._text = text;\n this._words = text\n .match(/[a-zA-ZÀ-ÖØ-öø-ÿ]+/g)\n .filter(word => {\n // Exclude very short terms and terms that start with a number\n // (stopwords are dealt with by the Corpus class)\n if (word.length < 2 || word.match(/^\\d/)) {\n return false;\n } else {\n return true;\n }\n })\n .map(word => word.toLowerCase());\n this._termFrequencies = null;\n }", "title": "" }, { "docid": "685abb5b0e7bf5187eefd806460c9d7e", "score": "0.49991277", "text": "function create(label, textEdit, additionalTextEdits) {\r\n return {\r\n label: label,\r\n textEdit: textEdit,\r\n additionalTextEdits: additionalTextEdits,\r\n };\r\n }", "title": "" }, { "docid": "685abb5b0e7bf5187eefd806460c9d7e", "score": "0.49991277", "text": "function create(label, textEdit, additionalTextEdits) {\r\n return {\r\n label: label,\r\n textEdit: textEdit,\r\n additionalTextEdits: additionalTextEdits,\r\n };\r\n }", "title": "" }, { "docid": "bc4eef96b6b71332c20efc2b59eb9367", "score": "0.4991861", "text": "static readObject (jsonObject) {\n let homonym = {}\n let context = []\n if (jsonObject.homonym) {\n homonym = WordItem.readHomonym(jsonObject)\n }\n if (jsonObject.context) {\n context = WordItem.readContext(jsonObject)\n }\n let worditem = new WordItem({\n targetWord: jsonObject.targetWord,\n languageCode: jsonObject.languageCode,\n important: jsonObject.important,\n currentSession: jsonObject.currentSession,\n context: context,\n homonym: homonym\n })\n return worditem\n }", "title": "" }, { "docid": "938d4db5b97aedb41685add00fea5000", "score": "0.4988857", "text": "function create(label, textEdit, additionalTextEdits) {\r\n return {\r\n label: label,\r\n textEdit: textEdit,\r\n additionalTextEdits: additionalTextEdits,\r\n };\r\n }", "title": "" }, { "docid": "938d4db5b97aedb41685add00fea5000", "score": "0.4988857", "text": "function create(label, textEdit, additionalTextEdits) {\r\n return {\r\n label: label,\r\n textEdit: textEdit,\r\n additionalTextEdits: additionalTextEdits,\r\n };\r\n }", "title": "" }, { "docid": "938d4db5b97aedb41685add00fea5000", "score": "0.4988857", "text": "function create(label, textEdit, additionalTextEdits) {\r\n return {\r\n label: label,\r\n textEdit: textEdit,\r\n additionalTextEdits: additionalTextEdits,\r\n };\r\n }", "title": "" }, { "docid": "938d4db5b97aedb41685add00fea5000", "score": "0.4988857", "text": "function create(label, textEdit, additionalTextEdits) {\r\n return {\r\n label: label,\r\n textEdit: textEdit,\r\n additionalTextEdits: additionalTextEdits,\r\n };\r\n }", "title": "" }, { "docid": "bf322835c331e55fc69118139ed3c6b0", "score": "0.4985501", "text": "function create(label) {\r\n return { label: label };\r\n }", "title": "" }, { "docid": "bf322835c331e55fc69118139ed3c6b0", "score": "0.4985501", "text": "function create(label) {\r\n return { label: label };\r\n }", "title": "" }, { "docid": "9726400a3d1ee6afe74b29cc14ad5d1d", "score": "0.49761623", "text": "function createObject(temp, city, feelings) {\n console.log(`app: selected cits ${city}`)\n console.log(`app: selected feeling ${feelings}`)\n return { cityInput: city, tempFetch: temp, feelingInput: feelings, date: newDate }\n}", "title": "" }, { "docid": "a1506fae5e8afea06f411716a8a6530d", "score": "0.49748987", "text": "function setTerm(){\n let userWordSelection = document.getElementById('termList');\n let targetTerm = userWordSelection.options[userWordSelection.selectedIndex].value;\n console.log(targetTerm);\n dispayCollocations(targetTerm);\n return targetTerm;\n}", "title": "" }, { "docid": "56cff423a3d858d8075d1bee606ca8c5", "score": "0.49733752", "text": "create({ body }, res) {\n\t\tbody.id = facets.length.toString(36);\n\t\tfacets.push(body);\n\t\tres.json(body);\n\t}", "title": "" }, { "docid": "3d2f0917d47dfba19e0a130cf86e430b", "score": "0.4973084", "text": "static initialize(obj, name, templateType, tokenizerType) { \n obj['name'] = name;\n obj['template-type'] = templateType;\n obj['tokenizer-type'] = tokenizerType;\n }", "title": "" }, { "docid": "993229a78c3cb2a0ccd198368cde6b06", "score": "0.49727854", "text": "termToString(term) {\n switch (term.termType) {\n case 'NamedNode':\n return `<${term.value}>`;\n case 'BlankNode':\n return `_:${term.value}`;\n case 'Literal':\n let suffix = '';\n if (term.language)\n suffix = `@${term.language}`;\n else if (term.datatype.value !== 'http://www.w3.org/2001/XMLSchema#string')\n suffix = `^^<${term.datatype.value}>`;\n return `\"${term.value.replace(/\"/g, '\\\\\"')}\"${suffix}`;\n default:\n throw new Error(`Could not convert a term of type ${term.termType}`);\n }\n }", "title": "" }, { "docid": "5c3cfc713dcf381edccd64f1a603a613", "score": "0.49672034", "text": "async function GetTerms(name, description, type, page = 1, count = 10){\r\n\r\n\tlet filter = {};\r\n\r\n\tif(name != null){\r\n\t\tfilter.name = new RegExp(\".*\" + name + \".*\", \"i\");\r\n\t}\r\n\r\n\tif(description != null){\r\n\t\tfilter.description = new RegExp(\".*\" + description + \".*\", \"i\");\r\n\t}\r\n\r\n\tif(type != null){\r\n\t\tfilter.type = new RegExp(\".*\" + type + \".*\", \"i\");\r\n\t}\r\n\r\n\tlet obj = await term.aggregate([\r\n\t\t{\r\n\t\t\t\"$match\": filter\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"$skip\": count * (page - 1)\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"$limit\": count\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"$project\":{\r\n \t\t\"id\": \"$_id\",\r\n \t\t\"_id\": false,\r\n \t\t\"name\": true,\r\n \t\t\"type\": true,\r\n \t\t\"description\": true,\r\n \t\t\"text\": true,\r\n \t\t\"comment\": true,\r\n \t\t\"reference\": true\r\n \t}\r\n\t\t}\r\n ]);\r\n\r\n\tlet total_filtered = await term.aggregate([{\"$match\": filter}, {$count: \"count\"}]);\r\n\r\n let out = {\r\n \t\"records\": obj,\r\n \t\"pagination\": {\r\n \t\t\"page\": page,\r\n \t\t\"total\": total_filtered.length === 0 ? 0 : total_filtered[0].count\r\n \t}\r\n }\r\n\r\n\treturn out;\r\n\r\n}", "title": "" }, { "docid": "6158e13bd529bfc4b14cb32904b26757", "score": "0.49659336", "text": "createVectorSpaceModel(query, doc) {\n query = Array.isArray(query) ? query: query.split(\" \");\n if (this.corpus == null) return null;\n let termFrequencyModel = [];\n let vectorSpaceModel = []\n for (let i = 0; i < query.length; i++){\n termFrequencyModel.push(this.calculateTermFrequency(query[i], doc));\n }\n let idfModel = this.createIdfModel(query);\n for (let j = 0; j < idfModel.length; j++){\n vectorSpaceModel[j] = idfModel[j] * termFrequencyModel[j];\n }\n this.vectorSpaceModel = vectorSpaceModel;\n return vectorSpaceModel\n }", "title": "" } ]
e7e2203231c9c245d5ebe327de7635f4
Test if the given table is wider than the screen. Used to add warning above large tables. Using .width() instead of innerWidth(), in order to grab width only with no padding. The '1' is due to width:auto randomly triggering the script.
[ { "docid": "a6dd7a728293e605dc72282be91016e9", "score": "0.7111355", "text": "function tableWiderThanScreen($el) {\n return ($el.outerWidth(true) - 1) > $('.region-content').width();\n }", "title": "" } ]
[ { "docid": "a95d1ef54c4b8bb2d8122e64403318ad", "score": "0.7187439", "text": "function tableWiderThanScreen($el) {\n return ($el.outerWidth(true) - 1) > $('#region-content').width();\n }", "title": "" }, { "docid": "e203d655c2d8a7f8fb0334703cb787dd", "score": "0.6479887", "text": "function calculateWidths(table) {\n // TODO Handle these cases\n var columnMinWidth = 10 / state_1.default().scaleFactor();\n if (columnMinWidth * table.columns.length > table.width) {\n console.error('Columns could not fit on page');\n }\n else if (table.minWidth > table.width) {\n console.error(\"Column widths to wide and can't fit page\");\n }\n var copy = table.columns.slice(0);\n var diffWidth = table.width - table.wrappedWidth;\n distributeWidth(copy, diffWidth, table.wrappedWidth);\n applyColSpans(table);\n fitContent(table);\n applyRowSpans(table);\n}", "title": "" }, { "docid": "e203d655c2d8a7f8fb0334703cb787dd", "score": "0.6479887", "text": "function calculateWidths(table) {\n // TODO Handle these cases\n var columnMinWidth = 10 / state_1.default().scaleFactor();\n if (columnMinWidth * table.columns.length > table.width) {\n console.error('Columns could not fit on page');\n }\n else if (table.minWidth > table.width) {\n console.error(\"Column widths to wide and can't fit page\");\n }\n var copy = table.columns.slice(0);\n var diffWidth = table.width - table.wrappedWidth;\n distributeWidth(copy, diffWidth, table.wrappedWidth);\n applyColSpans(table);\n fitContent(table);\n applyRowSpans(table);\n}", "title": "" }, { "docid": "67d7594e31311a191181847d9014668b", "score": "0.6403921", "text": "function checkWindowWidth () {\n return (window.innerWidth <= tabletWidth) ? true : false;\n }", "title": "" }, { "docid": "5c95771295f460d4a5ce2f004c826962", "score": "0.6343499", "text": "function maxWidth (table, theWrap, modifier) {\n let width = 0\n\n // table might be of the form [leftColumn],\n // or {key: leftColumn}\n if (!Array.isArray(table)) {\n table = Object.keys(table).map(key => [table[key]])\n }\n\n table.forEach((v) => {\n width = Math.max(\n stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]),\n width\n )\n })\n\n // if we've enabled 'wrap' we should limit\n // the max-width of the left-column.\n if (theWrap) width = Math.min(width, parseInt(theWrap * 0.5, 10))\n\n return width\n }", "title": "" }, { "docid": "7fb7205d725abc0603b5bdc3b0260bbc", "score": "0.6322835", "text": "function maxWidth (table, theWrap, modifier) {\n let width = 0;\n\n // table might be of the form [leftColumn],\n // or {key: leftColumn}\n if (!Array.isArray(table)) {\n table = Object.keys(table).map(key => [table[key]]);\n }\n\n table.forEach((v) => {\n width = Math.max(\n stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]),\n width\n );\n });\n\n // if we've enabled 'wrap' we should limit\n // the max-width of the left-column.\n if (theWrap) width = Math.min(width, parseInt(theWrap * 0.5, 10));\n\n return width\n }", "title": "" }, { "docid": "32f69f45d1e115d0d50fd5ea6991c433", "score": "0.6239696", "text": "function tablewidth(table){\n return ((table.cols.length + 2) * (100/13)) + '%';\n }", "title": "" }, { "docid": "32f69f45d1e115d0d50fd5ea6991c433", "score": "0.6239696", "text": "function tablewidth(table){\n return ((table.cols.length + 2) * (100/13)) + '%';\n }", "title": "" }, { "docid": "778b6d3b1a0cef64143af16902b1beef", "score": "0.62100846", "text": "function sytleTable () {\n var tableWidth = document.querySelector('.responsive-table').offsetWidth,\n windowWidth = window.innerWidth,\n responsiveTables = document.getElementsByClassName('responsive-table');\n\n if (tableWidth >= windowWidth) {\n if (!hasBeenSet) {\n tableMinWidth = tableWidth;\n hasBeenSet = true;\n }\n\n for (i = 0; i < responsiveTables.length; i += 1) {\n element = responsiveTables[i];\n element.classList.add(\"mobile\");\n }\n\n } else if (tableWidth >= tableMinWidth) {\n\n for (i = 0; i < responsiveTables.length ; i += 1) {\n element = responsiveTables[i];\n element.classList.remove(\"mobile\");\n }\n\n }\n }", "title": "" }, { "docid": "1f8edaba775fc394dbadd159dfe4833d", "score": "0.6060559", "text": "function get_width_util( )\n{\n return screen.availWidth;\n}", "title": "" }, { "docid": "f19f70afdcef0486047cf745683ac35c", "score": "0.60336673", "text": "static getMaxWidth(table) {\n var rowBitmap = [];\n //Generate initial bitmap based on first row\n for (var i = 0; i < table[0].length; i++) {\n rowBitmap[i] = (table[0][i].length > 3 ? table[0][i].length : 3);\n }\n // find max width for next columns column\n for (var i = 1; i < table.length; i++) {\n for (var j = 0; j < table[i].length; j++) {\n table[i][j].length > rowBitmap[j] ? rowBitmap[j] = table[i][j].length : {}\n }\n }\n return rowBitmap;\n }", "title": "" }, { "docid": "a5d70451a596a1589508591a9895d731", "score": "0.5986555", "text": "function findWidth() {\n return ($($(\"td\")[9]).width() + 2);\n}", "title": "" }, { "docid": "29c2c83c8811409a7bd13f6633c12170", "score": "0.5903312", "text": "function calculateWidths(doc, table) {\n calculate(doc, table);\n var resizableColumns = [];\n var initialTableWidth = 0;\n table.columns.forEach(function (column) {\n var customWidth = column.getMaxCustomCellWidth(table);\n if (customWidth) {\n // final column width\n column.width = customWidth;\n }\n else {\n // initial column width (will be resized)\n column.width = column.wrappedWidth;\n resizableColumns.push(column);\n }\n initialTableWidth += column.width;\n });\n // width difference that needs to be distributed\n var resizeWidth = table.getWidth(doc.pageSize().width) - initialTableWidth;\n // first resize attempt: with respect to minReadableWidth and minWidth\n if (resizeWidth) {\n resizeWidth = resizeColumns(resizableColumns, resizeWidth, function (column) {\n return Math.max(column.minReadableWidth, column.minWidth);\n });\n }\n // second resize attempt: ignore minReadableWidth but respect minWidth\n if (resizeWidth) {\n resizeWidth = resizeColumns(resizableColumns, resizeWidth, function (column) { return column.minWidth; });\n }\n resizeWidth = Math.abs(resizeWidth);\n if (resizeWidth > 0.1 / doc.scaleFactor()) {\n // Table can't get smaller due to custom-width or minWidth restrictions\n // We can't really do much here. Up to user to for example\n // reduce font size, increase page size or remove custom cell widths\n // to allow more columns to be reduced in size\n resizeWidth = resizeWidth < 1 ? resizeWidth : Math.round(resizeWidth);\n console.error(\"Of the table content, \" + resizeWidth + \" units width could not fit page\");\n }\n applyColSpans(table);\n fitContent(table, doc);\n applyRowSpans(table);\n}", "title": "" }, { "docid": "931e682dfa5071dba99477e6e2ef0d35", "score": "0.5884351", "text": "function calculateWidths(doc, pageWidth) {\n var table = config_1.Config.tableInstance();\n // Column and table content width\n var fixedWidth = 0;\n var autoWidth = 0;\n var dynamicColumns = [];\n table.columns.forEach(function (column) {\n column.contentWidth = 0;\n table.rows.concat(table.headerRow).forEach(function (row) {\n var cell = row.cells[column.dataKey];\n cell.contentWidth = cell.padding('horizontal') + common_1.getStringWidth(cell.text, cell.styles);\n if (cell.contentWidth > column.contentWidth) {\n column.contentWidth = cell.contentWidth;\n }\n });\n table.contentWidth += column.contentWidth;\n if (typeof column.widthStyle === 'number') {\n column.preferredWidth = column.widthStyle;\n fixedWidth += column.preferredWidth;\n column.width = column.preferredWidth;\n }\n else if (column.widthStyle === 'wrap') {\n column.preferredWidth = column.contentWidth;\n fixedWidth += column.preferredWidth;\n column.width = column.preferredWidth;\n }\n else {\n column.preferredWidth = column.contentWidth;\n autoWidth += column.contentWidth;\n dynamicColumns.push(column);\n }\n table.preferredWidth += column.preferredWidth;\n });\n if (typeof table.settings.tableWidth === 'number') {\n table.width = table.settings.tableWidth;\n }\n else if (table.settings.tableWidth === 'wrap') {\n table.width = table.preferredWidth;\n }\n else {\n table.width = pageWidth - table.margin('left') - table.margin('right');\n }\n distributeWidth(dynamicColumns, fixedWidth, autoWidth, 0);\n // Row height, table height and text overflow\n var all = table.rows.concat(table.headerRow);\n all.forEach(function (row) {\n table.columns.forEach(function (col) {\n var cell = row.cells[col.dataKey];\n config_1.Config.applyStyles(cell.styles);\n var textSpace = col.width - cell.padding('horizontal');\n var k = config_1.Config.scaleFactor();\n if (cell.styles.overflow === 'linebreak') {\n // Add one pt to textSpace to fix rounding error\n try {\n cell.text = doc.splitTextToSize(cell.text, textSpace + 1 / k, { fontSize: cell.styles.fontSize });\n }\n catch (e) {\n if (e instanceof TypeError && Array.isArray(cell.text)) {\n cell.text = doc.splitTextToSize(cell.text.join(' '), textSpace + 1 / k, { fontSize: cell.styles.fontSize });\n }\n else {\n throw e;\n }\n }\n }\n else if (cell.styles.overflow === 'ellipsize') {\n cell.text = common_1.ellipsize(cell.text, textSpace, cell.styles);\n }\n else if (cell.styles.overflow === 'visible') {\n // Do nothing\n }\n else if (cell.styles.overflow === 'hidden') {\n cell.text = common_1.ellipsize(cell.text, textSpace, cell.styles, '');\n }\n else if (typeof cell.styles.overflow === 'function') {\n cell.text = cell.styles.overflow(cell.text, textSpace);\n }\n else {\n console.error(\"Unrecognized overflow type: \" + cell.styles.overflow);\n }\n var lineCount = Array.isArray(cell.text) ? cell.text.length : 1;\n var fontHeight = cell.styles.fontSize / k * config_1.FONT_ROW_RATIO;\n cell.contentHeight = lineCount * fontHeight + cell.padding('vertical');\n if (cell.contentHeight > row.height) {\n row.height = cell.contentHeight;\n row.maxLineCount = lineCount;\n }\n });\n table.height += row.height;\n });\n}", "title": "" }, { "docid": "064663c0f7c8a966b1d522ce62aee3a0", "score": "0.58787143", "text": "function handle_table() {\n\n if ($(window).width() > parseInt(s.maxWidth, 10)) {\n\n $(element).show();\n\n if (responsive_table) {\n $(responsive_table).hide();\n }\n\n } else {\n\n $(element).hide();\n\n if (responsive_table) {\n $(responsive_table).show();\n } else {\n responsive_table = create_responsive_table(element, i);\n }\n\n }\n\n }", "title": "" }, { "docid": "141cb1baad1e7e36164d9b78249fce46", "score": "0.58702534", "text": "isFullWidth() {\n const $container = this.getContainer()\n const outerWidth = $container.outerWidth()\n const windowWidth = $(window).width()\n\n return outerWidth >= windowWidth\n }", "title": "" }, { "docid": "d665b7876b28d12e7f34b1ea76d89130", "score": "0.5841907", "text": "function AdjustTableWidth (table_name, width_percentage, margins) {\n // This function fixes the problem with IE and tables. When a table\n // is set to say 100% but is in a div that is not flush with the\n // left side of the browser window, IE does not take into account\n // the width of the div on the left. This function must be called\n // after the close of the div that the table is contained in. It\n // should also be called in the body tag for the onResize event in\n // case the browser window is resized.\n\n // If the browser is not IE and 5 or greater then return\n if (navigator.userAgent.indexOf (\"MSIE\") == -1 ||\n parseInt (navigator.appVersion) >= 5) {\n return;\n } // if\n\n // If width_percentage was not passed in then set it to 100%\n if (width_percentage == \"\" || width_percentage == null) {\n width_percentage = 1;\n } else {\n width_percentage = width_percentage / 100;\n } // if\n\n // If margins were not set then use 15 pixels\n if (margins == \"\" || margins == null) {\n margins = 15;\n } // if\n\n // Get table name\n var table = document.getElementById (table_name);\n\n if (table == null) {\n return; // no table, nothing to do!\n } // if\n\n // Get the width of the page in the browser\n var body_width = document.body.clientWidth;\n \n // Get the width of the left portion. Note this is hardcoded to the\n // value of \"leftbar\" for the MAPS application\n var sidebar_width = document.getElementById (\"leftbar\").clientWidth;\n\n // Now compute the new table width by subtracting off the sizes of\n // the sidebar_width and margins then multiply by the\n // width_percentage\n table.style.width = \n (body_width - sidebar_width - margins) * width_percentage;\n;} // AdjustTableWidth", "title": "" }, { "docid": "9baebe95909e29e6bb379022f7214cd0", "score": "0.5838463", "text": "function calculateWidths(doc, pageWidth) {\n var table = config_1.Config.tableInstance();\n // Column and table content width\n var fixedWidth = 0;\n var autoWidth = 0;\n var dynamicColumns = [];\n table.columns.forEach(function (column) {\n column.contentWidth = 0;\n table.rows.concat(table.headerRow).forEach(function (row) {\n var cell = row.cells[column.dataKey];\n cell.contentWidth = cell.padding('horizontal') + common_1.getStringWidth(cell.text, cell.styles);\n if (cell.contentWidth > column.contentWidth) {\n column.contentWidth = cell.contentWidth;\n }\n });\n table.contentWidth += column.contentWidth;\n if (typeof column.widthStyle === 'number') {\n column.preferredWidth = column.widthStyle;\n fixedWidth += column.preferredWidth;\n column.width = column.preferredWidth;\n }\n else if (column.widthStyle === 'wrap') {\n column.preferredWidth = column.contentWidth;\n fixedWidth += column.preferredWidth;\n column.width = column.preferredWidth;\n }\n else {\n column.preferredWidth = column.contentWidth;\n autoWidth += column.contentWidth;\n dynamicColumns.push(column);\n }\n table.preferredWidth += column.preferredWidth;\n });\n if (typeof table.settings.tableWidth === 'number') {\n table.width = table.settings.tableWidth;\n }\n else if (table.settings.tableWidth === 'wrap') {\n table.width = table.preferredWidth;\n }\n else {\n table.width = pageWidth - table.margin('left') - table.margin('right');\n }\n distributeWidth(dynamicColumns, fixedWidth, autoWidth, 0);\n // Row height, table height and text overflow\n var all = table.rows.concat(table.headerRow);\n all.forEach(function (row) {\n table.columns.forEach(function (col) {\n var cell = row.cells[col.dataKey];\n config_1.Config.applyStyles(cell.styles);\n var textSpace = col.width - cell.padding('horizontal');\n if (cell.styles.overflow === 'linebreak') {\n // Add one pt to textSpace to fix rounding error\n try {\n cell.text = doc.splitTextToSize(cell.text, textSpace + 1, { fontSize: cell.styles.fontSize });\n }\n catch (e) {\n if (e instanceof TypeError && Array.isArray(cell.text)) {\n cell.text = doc.splitTextToSize(cell.text.join(' '), textSpace + 1, { fontSize: cell.styles.fontSize });\n }\n else {\n throw e;\n }\n }\n }\n else if (cell.styles.overflow === 'ellipsize') {\n cell.text = common_1.ellipsize(cell.text, textSpace, cell.styles);\n }\n else if (cell.styles.overflow === 'visible') {\n // Do nothing\n }\n else if (cell.styles.overflow === 'hidden') {\n cell.text = common_1.ellipsize(cell.text, textSpace, cell.styles, '');\n }\n else if (typeof cell.styles.overflow === 'function') {\n cell.text = cell.styles.overflow(cell.text, textSpace);\n }\n else {\n console.error(\"Unrecognized overflow type: \" + cell.styles.overflow);\n }\n var k = config_1.Config.scaleFactor();\n var lineCount = Array.isArray(cell.text) ? cell.text.length : 1;\n var fontHeight = cell.styles.fontSize / k * config_1.FONT_ROW_RATIO;\n cell.contentHeight = lineCount * fontHeight + cell.padding('vertical');\n if (cell.contentHeight > row.height) {\n row.height = cell.contentHeight;\n row.maxLineCount = lineCount;\n }\n });\n table.height += row.height;\n });\n}", "title": "" }, { "docid": "d471c7e4c43454e2f7bccfb9f0c45668", "score": "0.5794369", "text": "function matchCellWidths(els) { // 247\n\tvar maxInnerWidth = 0; // 248\n // 249\n\tels.find('> span').each(function(i, innerEl) { // 250\n\t\tvar innerWidth = $(innerEl).outerWidth(); // 251\n\t\tif (innerWidth > maxInnerWidth) { // 252\n\t\t\tmaxInnerWidth = innerWidth; // 253\n\t\t} // 254\n\t}); // 255\n // 256\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance // 257\n // 258\n\tels.width(maxInnerWidth); // 259\n // 260\n\treturn maxInnerWidth; // 261\n} // 262", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "283a2d71aa6e0451eac11acf43b939b4", "score": "0.578343", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.find('> *').each(function (i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.width(maxInnerWidth);\n return maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "3172fab56af5af653d646964baa5ca98", "score": "0.5779333", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "93679f8ad008b6fd3467a54be48bea4b", "score": "0.57756543", "text": "function windowWidth() {\n // A shortcut, in case we're using Internet Explorer 6 in Strict Mode\n var de = document.documentElement;\n // If the innerWidth of the browser is available, use that\n return self.innerWidth ||\n // Otherwise, try to get the width off of the root node\n (de && de.clientWidth) ||\n // Finally, try to get the width off of the body element\n document.body.clientWidth;\n}", "title": "" }, { "docid": "8fa7cc1df60a3392b749524a18e28fd8", "score": "0.57601535", "text": "function matchCellWidths(els) {\n\t\tvar maxInnerWidth = 0;\n\n\t\tels.find('> *').each(function(i, innerEl) {\n\t\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\t\tif (innerWidth > maxInnerWidth) {\n\t\t\t\tmaxInnerWidth = innerWidth;\n\t\t\t}\n\t\t});\n\n\t\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\t\tels.width(maxInnerWidth);\n\n\t\treturn maxInnerWidth;\n\t}", "title": "" }, { "docid": "5100cb479cbd7dd8fecabe96e4cafc05", "score": "0.57530683", "text": "function widenPage()\r\n {\r\n var current_width = parseInt(document.body.children[1].style.width, 10);\r\n\r\n current_width += (false === script.preferences.showColumn['flag']) ? -20 : 0;\r\n current_width += (false === script.preferences.showColumn['referralName']) ? -100 : 0;\r\n current_width += (false === script.preferences.showColumn['referralSince']) ? -110 : 0;\r\n current_width += (false === script.preferences.showColumn['nextPayment']) ? -120 : 0;\r\n current_width += (false === script.preferences.showColumn['lastClick']) ? -80 : 0;\r\n current_width += (false === script.preferences.showColumn['totalClicks']) ? -60 : 0;\r\n current_width += (false === script.preferences.showColumn['average']) ? -60 : 0;\r\n\r\n current_width += (script.preferences.numeriseDates.referralSince && !script.preferences.referralSince_replace) ? 80 : 0;\r\n current_width += (script.preferences.numeriseDates.lastClick && !script.preferences.lastClick_replace) ? 5 : 0;\r\n current_width += (script.preferences.flag_textify) ? 15 : 0;\r\n current_width += (script.preferences.exactAverageShow && !script.preferences.exactAverageReplace) ? 20 : 0;\r\n\r\n if (100 >= refsPerPage && myAccountDetails.accountType.showUltimateFeatures)\r\n {\r\n current_width += (true === script.preferences.showColumn['clickText']) ? 88 : 0;\r\n current_width += (true === script.preferences.showColumn['average1']) ? 23 : 0;\r\n current_width += (true === script.preferences.showColumn['average2']) ? 23 : 0;\r\n current_width += (true === script.preferences.showColumn['SD']) ? 30 : 0;\r\n current_width += (true === script.preferences.showColumn['RSA']) ? 30 : 0;\r\n }\r\n\r\n current_width += (true === script.preferences.showColumn['profit']) ? 30 : 0;\r\n current_width = (902 > current_width) ? 902 : current_width;\r\n\r\n document.body.children[1].style.width = current_width + 'px';\r\n }", "title": "" }, { "docid": "38ebeddc2e975a808fdade54f5fbc4f5", "score": "0.5744423", "text": "function detectWidth() {\n var width = document.body.clientWidth;\n\n //TODO modify\n\n //smaller than some amount\n if (width > 1800) {\n themeBtn.innerText = \"Mode\";\n topBtn.innerText = \"Top\";\n saveBtn.innerText = \"Add\";\n removeBtn.innerText = \"Del\";\n goBtn.innerText = \"Go\";\n } else if (width > 1200) {\n themeBtn.innerText = \"M\";\n topBtn.innerText = \"T\";\n saveBtn.innerText = \"A\";\n removeBtn.innerText = \"R\";\n goBtn.innerText = \"G\";\n } else {\n themeBtn.innerText = \"\";\n topBtn.innerText = \"\";\n saveBtn.innerText = \"\";\n removeBtn.innerText = \"\";\n }\n}", "title": "" }, { "docid": "cdce109f538267173946353b43525f5f", "score": "0.57416457", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n\n els.find('> *').each(function(i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n els.width(maxInnerWidth);\n\n return maxInnerWidth;\n}", "title": "" }, { "docid": "71113ef00d1f091d694c407b3f5342d9", "score": "0.5710151", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n\n els.find('> *').each(function(i, innerEl) {\n var innerWidth = $(innerEl).outerWidth();\n if (innerWidth > maxInnerWidth) {\n maxInnerWidth = innerWidth;\n }\n });\n\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n els.width(maxInnerWidth);\n\n return maxInnerWidth;\n }", "title": "" }, { "docid": "fe634b47a7e1bbfa02e3166d88a46be8", "score": "0.5700773", "text": "function synchTables(tableArray) {\n var cellWidths = new Array();\n\n // get widest\n //alert('tableArray.length = ' + tableArray.length);\n for(i = 0; i < tableArray.length; i++) {\n for(j = 0; j < tableArray[i].rows[0].cells.length; j++) {\n var cell = tableArray[i].rows[0].cells[j];\n if(!cellWidths[j] || cellWidths[j] < cell.clientWidth)\n cellWidths[j] = cell.clientWidth;\n }\n }\n\n // set all columns to the widest width found\n for(i = 0; i < tableArray.length; i++) {\n for(j = 0; j < tableArray[i].rows[0].cells.length; j++) {\n \ttableArray[i].rows[0].cells[j].style.width = cellWidths[j]+'px';\n \t//tableArray[i].rows[0].cells[j].width = cellWidths[j]+'px';\n \t//tableArray[i].rows[0].cells[j].clientWidth = cellWidths[j];\n }\n }\n //alert('cellWidths.length = ' + cellWidths.length);\n}", "title": "" }, { "docid": "25093f35567fec563a9e5140d8a3f972", "score": "0.5688488", "text": "function trueInnerWidth(element) {\nreturn element.innerWidth() - (\nparseInt(element.css('padding-left')) + parseInt(element.css('padding-right'))\n);\n}", "title": "" }, { "docid": "d31b3bcd769304c5cfc4a1915b2ca42d", "score": "0.56765634", "text": "function pageWidth() {return window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;}", "title": "" }, { "docid": "ceae321bb0663a68bf390cba48ec7a06", "score": "0.567512", "text": "function getWidth() {\n return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n}", "title": "" }, { "docid": "96528f9cd4073de30a0d033e4b605b33", "score": "0.5674879", "text": "function calcWidth(){\n return window.innerWidth >= 1350 ? 1280 : 896\n}", "title": "" }, { "docid": "5c1cc6d43e9d1e2f5e016809cb411ea6", "score": "0.5637227", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.forEach(function (el) {\n var innerEl = el.firstChild; // hopefully an element\n if (innerEl instanceof HTMLElement) {\n var innerWidth_1 = innerEl.getBoundingClientRect().width;\n if (innerWidth_1 > maxInnerWidth) {\n maxInnerWidth = innerWidth_1;\n }\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.forEach(function (el) {\n el.style.width = maxInnerWidth + 'px';\n });\n return maxInnerWidth;\n}", "title": "" }, { "docid": "5c1cc6d43e9d1e2f5e016809cb411ea6", "score": "0.5637227", "text": "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.forEach(function (el) {\n var innerEl = el.firstChild; // hopefully an element\n if (innerEl instanceof HTMLElement) {\n var innerWidth_1 = innerEl.getBoundingClientRect().width;\n if (innerWidth_1 > maxInnerWidth) {\n maxInnerWidth = innerWidth_1;\n }\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.forEach(function (el) {\n el.style.width = maxInnerWidth + 'px';\n });\n return maxInnerWidth;\n}", "title": "" }, { "docid": "421f22f40caea65d91f80d849abf4586", "score": "0.56355906", "text": "function calculateTableWidth(colWidth, noColsToInsert, deleteColumns){\n\t\t\n\t\t//parse the column width to separate the width value and the unit type\n\t\tvar match = sizePatternNoPercent.exec(colWidth);\n\t\tvar colWidthVal = match[1];\n\t\tvar colUnitVal = match[2];\n\n\t\t//Get the table width and parse it to separate the width value and the unit type\n\t\tvar tableWidth = selectedTable.getStyle('width') ? selectedTable.getStyle('width') : selectedTable.getAttribute('width');\n\t\t\n\t\tif (sizePercentUnit.exec(tableWidth)){\t\t//do nothing for now if unit is %\n\t\t\treturn tableWidth;\n\t\t} else if (sizeNoUnit.exec(tableWidth)){\t//width attribute can be just a number value when units are px\n\t\t\ttableWidth += 'px';\n\t\t}\t\n\t\t\n\t\tmatch = sizePatternNoPercent.exec(tableWidth);\n\t\tif (match){\n\t\t\tvar tableWidthVal = match[1];\n\t\t\tvar tableUnitVal = match[2];\n\t\t} else {\n\t\t\treturn tableWidth;\n\t\t}\n\t\t\n\t\tvar newTableWidth;\n\t\t\n\t\t//convert to px if the unit types don't match\n\t\tif(colUnitVal != tableUnitVal){\n\t\t\tif (colUnitVal != 'px'){\n\t\t\t\tcolWidthVal = CKEDITOR.tools.convertToPx(colWidth);\n\t\t\t}\n\t\t\tif (tableUnitVal != 'px'){\n\t\t\t\ttableWidthVal = CKEDITOR.tools.convertToPx(tableWidth);\n\t\t\t\tvar origTableUnit = tableUnitVal;\t//keep a record of the original table unit so that we can convert back to it after the calculations are complete\n\t\t\t\ttableUnitVal = 'px';\n\t\t\t}\n\t\t}\n\t\t\n\t\ttableWidthVal = parseFloat(tableWidthVal);\n\t\tcolWidthVal = parseFloat(colWidthVal)\n\t\tif (deleteColumns){\t\t//subtract the column width\n\t\t\tnewTableWidth = tableWidthVal > colWidthVal ? tableWidthVal-colWidthVal : tableWidthVal;\n\t\t} else {\t\t\t//add the new column width\n\t\t\tnewTableWidth = tableWidthVal+(colWidthVal*noColsToInsert);\n\t\t}\n\t\t\n\t\tif (origTableUnit) {\t\t//table unit was changed to px during calculations\n\t\t\tnewTableWidth = convertToOrigUnit(newTableWidth, origTableUnit);\n\t\t\ttableUnitVal = origTableUnit;\n\t\t}\n\t\t\n\t\treturn newTableWidth+tableUnitVal;\n\t}", "title": "" }, { "docid": "1de9dfd26f504bb881070a80a079fc8f", "score": "0.56213224", "text": "function matchCellWidths(els) {\n\t\tvar maxInnerWidth = 0;\n\t\n\t\tels.find('> span').each(function(i, innerEl) {\n\t\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\t\tif (innerWidth > maxInnerWidth) {\n\t\t\t\tmaxInnerWidth = innerWidth;\n\t\t\t}\n\t\t});\n\t\n\t\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\t\n\t\tels.width(maxInnerWidth);\n\t\n\t\treturn maxInnerWidth;\n\t}", "title": "" }, { "docid": "ca0fe3ce4d7cf548cda664b84902875b", "score": "0.5610688", "text": "function sizeCheck() {\n window.innerWidth > 992 ? boostText() : shrinkText();\n }", "title": "" }, { "docid": "362bd64fd54ebb1af4aac9c6bdabdafe", "score": "0.5609649", "text": "function resizeTables(){\n\n //get all tables part of the synctable class\n var tableArr = document.getElementsByClassName('synctable');\n var cellWidths = new Array();\n\n //for each column, get the widest cell width across all tables\n for(i = 0; i < tableArr.length; i++){\n for(j = 0; j < tableArr[i].rows[0].cells.length; j++){\n var cell = tableArr[i].rows[0].cells[j];\n if(!cellWidths[j] || cellWidths[j] < cell.clientWidth)\n cellWidths[j] = cell.clientWidth;\n }\n }\n\n // set all columns to the widest width found above\n for(i = 0; i < tableArr.length; i++){\n for(j = 0; j < tableArr[i].rows[0].cells.length; j++){\n tableArr[i].rows[0].cells[j].style.width = cellWidths[j]+'px';\n }\n }\n}", "title": "" }, { "docid": "8cf2b170b74b14d890b097b62f355445", "score": "0.5569096", "text": "verifyWindowSize() {\n const maxPagesToShow = this.pagination.maxPagesToShow;\n if (window.innerWidth <= 700) {\n this.tableFirstColumn.innerHTML = 'Nome';\n this.pagination.maxPagesToShow = 3;\n } else {\n this.tableFirstColumn.innerHTML = 'Personagem';\n this.pagination.maxPagesToShow = 6;\n }\n\n if (maxPagesToShow !== this.pagination.maxPagesToShow) {\n this.updatePagination(this.pagination.totalItems);\n }\n }", "title": "" }, { "docid": "8aa24c94808059233cac79bae33f850e", "score": "0.5562093", "text": "function dialog_getThisDocumentWidthNS()\r\n{\r\n try\r\n {\r\n var bodyNode = document.getElementsByTagName(\"body\").item(0);\r\n var tNode = document.createElement(\"table\");\r\n var trNode = document.createElement(\"tr\");\r\n var tdNode1 = document.createElement(\"td\");\r\n var tdNode2 = document.createElement(\"td\");\r\n var aNode = document.createElement(\"a\");\r\n\r\n tdNode2.appendChild(aNode);\r\n tdNode2.setAttribute(\"style\", \"padding: 0px\");\r\n tdNode1.appendChild(bodyNode.cloneNode(true));\r\n tdNode1.setAttribute(\"style\", \"padding: 0px\");\r\n trNode.appendChild(tdNode1);\r\n trNode.appendChild(tdNode2);\r\n\r\n tNode.appendChild(trNode);\r\n tNode.setAttribute(\"style\", \"border: 0px\");\r\n\r\n bodyNode.appendChild(tNode);\r\n\r\n var nDocWidth = aNode.offsetLeft - 4;\r\n\r\n bodyNode.removeChild(tNode);\r\n\r\n return nDocWidth;\r\n } catch (e)\r\n {\r\n return 0;\r\n }\r\n}", "title": "" }, { "docid": "3595d642153fd72c28cb472f8f9c9d88", "score": "0.5561203", "text": "function screenWidth() {\n \n return window.innerWidth != null? \n window.innerWidth : document.documentElement && document.documentElement.clientWidth ?\n document.documentElement.clientWidth : document.body != null? \n document.body.clientWidth : null;\n }", "title": "" }, { "docid": "e1cc3cb78a01bba36eb1b3aeb080bd7c", "score": "0.5559163", "text": "isWide () {\n return !w ? true : w.innerWidth > 720\n }", "title": "" }, { "docid": "878604bd5aaed5411228d3526e78f1a8", "score": "0.55488944", "text": "function setRowWidth(){\n\t//-- Get generic widths --\n\tvar windowWidth\t\t= $(window).width();\n\tvar scrollWidth\t\t= $.getScrollbarWidth();\n\t\n\t//-- Get <thead /> widths (+ borders) --\n\tvar checkWidth\t\t= $('#check').innerWidth() + 2;\n\tvar deleteWidth\t\t= $('#delete').innerWidth() + 2;\n\tvar playWidth\t\t= $('#play').innerWidth() + 2;\n\t\n\t//-- Calculate new width --\n\tvar remainingWidth\t= windowWidth - checkWidth - deleteWidth - playWidth;\n\tvar stretchWidth\t= Math.floor(remainingWidth / 3);\n\tvar floorWidth\t\t= remainingWidth - (stretchWidth * 3);\n\t\n\t//-- Set new width (- padding) --\n\t$('#artist').css('width', stretchWidth - 16);\n\t$('#title').css('width', stretchWidth - 16);\n\t$('#album').css('width', stretchWidth - 16 + floorWidth);\n\t\n\t//-- Get <tbody /> widths (+ borders) --\n\tvar bCheckWidth\t\t= $('.check').innerWidth() + 1;\n\tvar bDeleteWidth\t= $('.delete').innerWidth() + 1;\n\tvar bPlayWidth\t\t= $('.play').innerWidth() + 1;\n\t\n\t//-- Calculate new width --\n\tvar bRemainingWidth\t= windowWidth - bCheckWidth - bDeleteWidth - bPlayWidth - scrollWidth;\n\tvar bStretchWidth\t= Math.floor(bRemainingWidth / 3);\n\tvar bFloorWidth\t\t= bRemainingWidth - (bStretchWidth * 3);\n\tvar offsetStretch\t= stretchWidth - bStretchWidth;\n\t\n\t//-- Set new width (- padding) --\n\t$('.artist').css('width', bStretchWidth + offsetStretch - 16);\n\t$('.title').css('width', bStretchWidth + offsetStretch - 16);\n\t$('.album').css('width', bStretchWidth + offsetStretch - (offsetStretch * 3) - 16 + bFloorWidth);\n}", "title": "" }, { "docid": "c5bc55f7db30ebca4da8ab1066bd9707", "score": "0.5543236", "text": "function getLargestCellWidth(tableMap, colIndex){\n\t\n\t\t//find the first cell in the column\n\t\tvar firstCellIndex = -1;\n\t\tfor (var i = 0; i < tableMap.length; i++){\n\t\t\tif (tableMap[ i ][ colIndex ]){\t\t//the cell may not be in all rows\n\t\t\t\tfirstCellIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (firstCellIndex == -1)\t\t//should never happen since the colIndex is retrieved from the selection\n\t\t\treturn;\n\t\t\n\t\t//get the width and unit of the first cell in the column so we have something to compare the rest against\n\t\tvar firstCell = new CKEDITOR.dom.element(tableMap[ firstCellIndex ][ colIndex ]);\t\t\t\t\n\t\tvar firstCellWidth = firstCell.getStyle('width') ? firstCell.getStyle('width') : firstCell.getAttribute('width');\n\t\t\n\t\tif (!firstCellWidth){\n\t\t\tfirstCellWidth = '0px';\n\t\t} else if (sizePercentUnit.exec(firstCellWidth)){\t\t//do nothing for now if unit is %\n\t\t\treturn;\n\t\t} else if (sizeNoUnit.exec(firstCellWidth)){\t//width attribute can be just a number value when units are px\n\t\t\tfirstCellWidth += 'px';\n\t\t}\n\t\t\t\n\t\tvar match = sizePatternNoPercent.exec(firstCellWidth);\n\t\tvar cellWidthVal = match[1];\n\t\tvar cellUnitVal = match[2];\n\t\n\t\tvar largestCellWidth = cellWidthVal,\n\t\t\tlargestCellUnit = cellUnitVal,\n\t\t\tcurrentCellWidthVal, currentCellUnitVal;\n\t\t\n\t\t//Go through the rest of the table to see if any of the other cells in the column has a larger width value\n\t\tfor (var j = firstCellIndex+1; j < tableMap.length; j++ )\n\t\t{\n\t\t\tvar cell = tableMap[ j ][ colIndex ] ? new CKEDITOR.dom.element(tableMap[ j ][ colIndex ]) : null;\n\t\t\t\n\t\t\tif (cell) {\n\t\t\t\n\t\t\t\tvar currentCellWidth = cell.getStyle('width') ? cell.getStyle('width') : cell.getAttribute('width');\n\t\t\t\t\n\t\t\t\tif (currentCellWidth){\n\t\t\t\t\n\t\t\t\t\tif (sizePercentUnit.exec(currentCellWidth)){\t\t//do nothing for now if unit is %\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if (sizeNoUnit.exec(currentCellWidth)){\t//width attribute can be just a number value when units are px\n\t\t\t\t\t\tcurrentCellWidth += 'px';\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tmatch = sizePatternNoPercent.exec(currentCellWidth);\n\t\t\t\t\tcurrentCellWidthVal = match[1];\n\t\t\t\t\tcurrentCellUnitVal = match[2];\n\t\t\t\t\n\t\t\t\t\t//convert to px if the unit types don't match\n\t\t\t\t\tif(currentCellUnitVal != largestCellUnit){\n\t\t\t\t\t\tif (currentCellUnitVal != 'px'){\n\t\t\t\t\t\t\tcurrentCellWidthVal = CKEDITOR.tools.convertToPx(currentCellWidth);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (largestCellUnit != 'px'){\n\t\t\t\t\t\t\tlargestCellWidth = CKEDITOR.tools.convertToPx(largestCellWidth+largestCellUnit);\n\t\t\t\t\t\t\tlargestCellUnit = 'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif(currentCellWidthVal > largestCellWidth){\t\n\t\t\t\t\t\tlargestCellWidth = currentCellWidthVal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\t\n\t\treturn largestCellWidth+largestCellUnit;\n\t}", "title": "" }, { "docid": "5a5ad1c0fb28c7d0a9b3eec192baba86", "score": "0.5538965", "text": "function widthOfBody() {\n\tvar w = (window.innerWidth && document.documentElement.clientWidth) ? Math.max(window.innerWidth, document.documentElement.clientWidth) :\n\t\t\twindow.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n\treturn w;\n}", "title": "" }, { "docid": "99801ca933fbe17fc9d59dac8b506083", "score": "0.5532154", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> span').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "99801ca933fbe17fc9d59dac8b506083", "score": "0.5532154", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> span').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "99801ca933fbe17fc9d59dac8b506083", "score": "0.5532154", "text": "function matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> span').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}", "title": "" }, { "docid": "7704895820e99908b39a24ef25a518c3", "score": "0.5503496", "text": "function responsiveTables(){\n\n var tables = document.querySelectorAll(\"table\"),\n container,\n table;\n\n _init(tables);\n\n // functions\n function _init(tables){\n if(tables.length > 0){\n // iterate possible instances and decide what to do\n for (var i = 0, tableCount = tables.length; i < tableCount; i++){\n // a closure to keep everything in the desired scope?\n (function(_table){\n table = _table;\n container = table.parentNode;\n\n //if( table.clientWidth > container.clientWidth ){\n if( table.clientWidth >= $(container).width() ){\n // skip if already has iScroll\n if( ! $.data(table, 'hasScroll') ){\n start();\n log(\"RWD Tables Activated\");\n }\n }else{\n // if has iScroll, destroy it\n if( $.data(table, 'hasScroll') ){\n destroy();\n log(\"RWD Tables Deactivated\");\n }\n }\n }(tables[i]));\n }\n }\n }\n\n function start(){\n // make sure table is wrapped in an iScrollWrapper div\n if( ! $.data(container, 'scrollWrapper') ){\n $(table).wrap(document.createElement(\"div\"));\n container = table.parentNode;\n $.data(container, \"scrollWrapper\", true);\n }\n $(container).addClass(\"overthrow rwdt\");\n $.data(table, \"hasScroll\", true);\n };\n\n function destroy(){\n $(container).removeClass(\"overthrow rwdt\");\n $.removeData(table, 'hasScroll');\n };\n\n // on screen resize, run through checks again: toggle overthrow classes as needed\n // on_resize(function(){\n // log('resized');\n // _init(tables);\n // });\n $(window).on(\"debouncedresize\", function(e){\n _init(tables);\n });\n}", "title": "" }, { "docid": "5afde5ec2adffc0f4c7ce3ecaa0ff56d", "score": "0.54866016", "text": "function elementOverflowScreenWidth(parent, element, useParentWidth) {\n if (useParentWidth) {\n return ((window.screen.width - $(parent).offset().left) <= ($(parent).outerWidth() + $(element).outerWidth()));\n } else {\n return ((window.screen.width - $(parent).offset().left) <= $(element).outerWidth());\n }\n }", "title": "" }, { "docid": "cab560f1f58e04c791b4277326396c6f", "score": "0.54765177", "text": "function checkWidth(){\n if ($(window).width() > options.filterButtonBelowWidth) {\n $('#'+options.filterButtonId).hide();\n } else {\n $('#'+options.filterButtonId).show();\n }\n }", "title": "" }, { "docid": "20f527cb88abb2f3b9d38c32cab60a57", "score": "0.5476382", "text": "function findWindowWidth()\n{\n\treturn window.innerWidth || document.documentElement.clientWidth;\n}", "title": "" }, { "docid": "1f9a079b5840531847f410fe0a629233", "score": "0.54762685", "text": "function fixWidth() {\n\t\tlet group, width,\n\t\t\thtml = \"\",\n\t\t\ttable = $(\"table.files\"),\n\t\t\ttableWidth = getWidth(table),\n\t\t\tcells = $$(\"tbody:last-child tr:last-child td\", table);\n\t\tif (table && cells.length > 1 && !$(\"colgroup\", table)) {\n\t\t\tgroup = document.createElement(\"colgroup\");\n\t\t\ttable.insertBefore(group, table.childNodes[0]);\n\t\t\tcells.forEach(el => {\n\t\t\t\t// keep two decimal point accuracy\n\t\t\t\twidth = parseInt(getWidth(el) / tableWidth * 1e4, 10) / 100;\n\t\t\t\thtml += `<col style=\"width:${width}%\">`;\n\t\t\t});\n\t\t\tgroup.innerHTML = html;\n\t\t}\n\t}", "title": "" }, { "docid": "a9bc592d485469808b98c0f3ef9ec1f9", "score": "0.54722357", "text": "function getWindowInnerWidth()\r\n{\r\n var width;\r\n if (window.innerWidth)\r\n {\r\n // All browsers but IE\r\n width = window.innerWidth;\r\n }\r\n else if (document.documentElement && document.documentElement.clientWidth)\r\n {\r\n // These functions are for IE6 when there is a DOCTYPE\r\n width = document.documentElement.clientWidth;\r\n }\r\n \r\n else if (document.body.clientWidth)\r\n {\r\n // These are for IE4, IE5, and IE6 without a DOCTYPE\r\n width = document.body.clientWidth;\r\n }\r\n return width || 0;\r\n}", "title": "" }, { "docid": "7c422a8159816eb0f1ab248fc6d97772", "score": "0.5455527", "text": "function getInsideWindowWidth() {\n if (window.innerWidth) {\n return window.innerWidth;\n } else if (isIE6CSS) {\n // measure the html element's clientWidth\n return document.body.parentElement.clientWidth;\n } else if (document.body && document.body.clientWidth) {\n return document.body.clientWidth;\n }\n return 0;\n}", "title": "" }, { "docid": "ce44c870bc39e11d71f0e01100b4f000", "score": "0.5451549", "text": "function _getPageWidth() {\n var width = window.innerWidth;\n if (typeof width === undefined) {\n if (document.documentElement && document.documentElement.clientWidth){\n width = document.documentElement.clientWidth;\n } else {\n width = document.body.clientWidth;\n }\n }\n return width;\n }", "title": "" }, { "docid": "d0a7394bd94612c0c809806572f9e41b", "score": "0.5443383", "text": "function checkWidth() {\n const mq = window.matchMedia('(max-width: 1199px)');\n return (mq.matches ? 50 : (document.getElementById('navigation') || '').scrollHeight);\n}", "title": "" }, { "docid": "e2d8f6ba16eeaa8e96f5db99010b222c", "score": "0.5431294", "text": "function pageWidth()\n{\n\treturn window.innerWidth != null ? window.innerWidth : document.body != null ? document.body.clientWidth:null;\n}", "title": "" }, { "docid": "d96f5db8c2c37e02565d12093b7afdff", "score": "0.5426671", "text": "function smallDisplay() {\r\n return window.innerWidth < 600;\r\n}", "title": "" }, { "docid": "ad93d03409996fcfd7dc4095e966df9f", "score": "0.5420266", "text": "function findWindowWidth()\n{\n\treturn(window.innerWidth ? window.innerWidth : document.documentElement.clientWidth);\n}", "title": "" }, { "docid": "29d42bba2e8eb1788c8fe328082932d4", "score": "0.5409753", "text": "fitToWidth() {\n this.mightZoom_(() => {\n this.fittingType_ = FittingType.FIT_TO_WIDTH;\n if (!this.documentDimensions_) {\n return;\n }\n // When computing fit-to-width, the maximum width of a page in the\n // document is used, which is equal to the size of the document width.\n this.setZoomInternal_(\n this.computeFittingZoom_(this.documentDimensions_, true, false));\n this.updateViewport_();\n });\n }", "title": "" }, { "docid": "3ea52c2091fb66c8fa5b595f183567ba", "score": "0.54039586", "text": "function getWidth(colspan){\n\tvar width = $(window).width();\n\tif (colspan == 3){\n\t\twidth = width-30;\n\t};\n\tif (colspan == 2){\n\t\twidth = width-35;\n\t};\n\tif (colspan == 1){\n\t\twidth = width-40;\n\t};\n\twidth = width/3;\n\treturn width*colspan;\n}", "title": "" }, { "docid": "d8e43a599f7db91f19ecd715ec719b2b", "score": "0.54010946", "text": "function pw() { return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth }", "title": "" }, { "docid": "f851777017447e77eaa7b67a85703eb4", "score": "0.5396394", "text": "function maxSizeColumn(item,grid){\n \n tbgrid = document.getElementById(grid);\n column = item.id;\n max = 0;\n for (k = 0;k < tbgrid.rows.length;k++){\n if (tbgrid.rows[k].cells[column]){ //Evitando que de erro ao tentar dar um display:none no footer\n cur = tbgrid.rows[k].cells[column].childNodes[0].scrollWidth;\n if ( cur > max ){\n max = cur;\n }\n } \n }\n item.width = (max+8);\n //tbpai = document.getElementById('tbpai');\n //tbpai.width +=this.sz; \n}", "title": "" }, { "docid": "e95b68b04fb4f4d37d5aa1dd1d9c02c7", "score": "0.53939664", "text": "get cellsWide() {\n // Canvas will render whole \"pixels\" (cells) only, and an even\n // number at that. Round up to the nearest even number of pixels.\n let cellsWide = Math.ceil(this._zoomArea.width / this.zoom);\n cellsWide += cellsWide % 2;\n\n return cellsWide;\n }", "title": "" }, { "docid": "af6390272666c4301aa4223d31860836", "score": "0.53892004", "text": "function calculateWidth(){\n const width = mainView.getWidth();\n if($('.right_content').is(':visible') || width >=1280 && width<2000){\n return width*0.5;\n }\n else if(width>2000){\n return 1200;\n }\n else{\n return width-50;\n }\n}", "title": "" }, { "docid": "ab356f0e9e300cd3082aa90d345c8b2e", "score": "0.5384642", "text": "function _fnConvertToWidth(e,a){if(!e||null===e||\"\"===e)return 0;\"undefined\"==typeof a&&(a=document.getElementsByTagName(\"body\")[0]);var t,n=document.createElement(\"div\");return n.style.width=e,a.appendChild(n),t=n.offsetWidth,a.removeChild(n),t}", "title": "" }, { "docid": "4f8d4f627ade879de461b175e508eab4", "score": "0.538438", "text": "isTablet() {\n let width = window.innerWidth;\n return width <= 1024 && width > 640;\n }", "title": "" }, { "docid": "8b9b3dfa09479b0e92e338af790a8bfa", "score": "0.5379956", "text": "function windowWidth() {\n let width = window.innerWidth\n || document.documentElement.clientWidth\n || document.body.clientWidth;\n return width\n}", "title": "" }, { "docid": "80635581ecb7a7e3b647d7f6ee47d82e", "score": "0.5376098", "text": "function getWidth() {\n\treturn (IE) ?\n\t\tdocument.body.clientWidth : window.innerWidth;\n}", "title": "" }, { "docid": "c3631e1556453508ab87c1cc0f5e1f37", "score": "0.53716874", "text": "function getWindowWidth()\n {\n var wWidth = -1;\n // use documentElement.clientWidth as document.innerWidth includes the vertical scrollbar\n if (sb_de && sb_de.clientWidth)\n {\n wWidth = sb_de.clientWidth;\n }\n return wWidth;\n }", "title": "" }, { "docid": "d9254abe72601c083b61a8ab5afece77", "score": "0.5363152", "text": "calculateWidths() {\n const { wot } = this;\n const { wtTable, wtViewport, cloneSource } = wot;\n const mainHolder = cloneSource ? cloneSource.wtTable.holder : wtTable.holder;\n const scrollbarCompensation = mainHolder.offsetHeight < mainHolder.scrollHeight ? getScrollbarWidth() : 0;\n let rowHeaderWidthSetting = wot.getSetting('rowHeaderWidth');\n\n wtViewport.columnsRenderCalculator.refreshStretching(wtViewport.getViewportWidth() - scrollbarCompensation);\n\n rowHeaderWidthSetting = wot.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);\n\n if (rowHeaderWidthSetting !== null && rowHeaderWidthSetting !== void 0) {\n const rowHeadersCount = wot.getSetting('rowHeaders').length;\n const defaultColumnWidth = wot.getSetting('defaultColumnWidth');\n\n for (let visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {\n let width = Array.isArray(rowHeaderWidthSetting)\n ? rowHeaderWidthSetting[visibleColumnIndex] : rowHeaderWidthSetting;\n\n width = (width === null || width === void 0) ? defaultColumnWidth : width;\n\n this.headerWidths.set(visibleColumnIndex, width);\n }\n }\n }", "title": "" }, { "docid": "fa3663024368554cdcc3b93e78ba3a5f", "score": "0.5361609", "text": "lineupGetColumnWidth (name, col, fixed) {\n var width = col.width || 0;\n // var colname = col.column || col.type;\n // /* Get the column scaling based on the user settings, if available */\n // if (actionState.lineupCol && actionState.lineupCol[name] && actionState.lineupCol[name][colname]) {\n // width = actionState.lineupCol[name][colname] + fixed;\n // }\n var colWidth = width < fixed ? 0 : (width - fixed);\n col.widthBasis = colWidth;\n col.widthFixed = fixed;\n return col.widthBasis;\n }", "title": "" }, { "docid": "7ec20f9f1eb817d3d231e85b3984e138", "score": "0.53563094", "text": "function windowWidth() {\n\tvar w;\n\tif (o3_frame.innerWidth) w=o3_frame.innerWidth;\n\telse if (eval('o3_frame.'+docRoot)&&eval(\"typeof o3_frame.\"+docRoot+\".clientWidth=='number'\")&&eval('o3_frame.'+docRoot+'.clientWidth')) \n\t\tw=eval('o3_frame.'+docRoot+'.clientWidth');\n\treturn w;\t\t\t\n}", "title": "" }, { "docid": "3f22d2052d6898a6948a60f67079cd17", "score": "0.5346804", "text": "function fixBoardWidth() {\n // Make board header fixed, this is not yet \"good\" enough...\n var table = jQuery(\"#boardTable\");\n var widths = [];\n\n table.find(\"tbody tr:first th, tbody tr:first td\").each(function(index) {\n var width = jQuery(this).outerWidth() - 2;\n\n widths.push(width);\n });\n\n if (widths.length === 0 || widths.length === 1) {\n return;\n }\n\n table.find(\"thead tr th\").each(function(index) {\n var width = widths[index];\n\n if (index == 0) {\n width = width - 20;\n } else if (index == (widths.length - 1)) {\n width = width + 20;\n }\n\n jQuery(this).width(width);\n });\n\n table.find(\"thead\").css({\n position: \"fixed\",\n \"z-index\": 200,\n \"margin-top\": \"-39px\",\n left: \"0px\",\n width: \"100%\"\n });\n\n table.css({\n \"margin-top\": \"39px\"\n });\n}", "title": "" }, { "docid": "586c91ab0f0ab24838aec5fbaed511f8", "score": "0.53393203", "text": "function makeTablesNotBlockIfSafeToDoSo() {\n // Tables which are narrower than their container look funny - this is caused by table\n // css 'display' being set to 'block'. But this *is needed* when the table content is\n // wider than the table's container. So conditionally set table display to 'table' if\n // the table isn't as wide as its container. Result: things which need horizontal\n // overflow scrolling still can do so, but things which don't need to scroll look\n // so much better. (See the \"San Francisco\" article with and without this method for\n // comparison.)\n var tbodies = document.getElementsByTagName('TBODY');\n for (var i = 0; i < tbodies.length; ++i) {\n var tbody = tbodies[i];\n var tbodyRect = tbody.getBoundingClientRect();\n var parentRect = tbody.parentElement.getBoundingClientRect();\n //var style = window.getComputedStyle(tbody);\n if(tbodyRect.width < parentRect.width){\n tbody.parentElement.style.float = \"\";\n tbody.parentElement.style.margin = \"\";\n tbody.parentElement.style.display = 'table';\n }\n }\n }", "title": "" }, { "docid": "03b10dd95f98604b76ef05ce597e3dc6", "score": "0.53329104", "text": "function calcWidth(width) {\n var colWidth;\n\n if (typeof width == \"string\") {\n if (width.indexOf(\"%\") > -1) {\n colWidth = totalWidth / 100 * parseInt(width);\n } else {\n colWidth = parseInt(width);\n }\n } else {\n colWidth = width;\n }\n\n return colWidth;\n } //ensure columns resize to take up the correct amount of space", "title": "" }, { "docid": "cfec0f9de045cbb5571d2d0d65638901", "score": "0.5324134", "text": "function _fnCalculateColumnWidths(e){var a,t,n=e.nTable.offsetWidth,o=0,s=0,i=e.aoColumns.length,r=$(\"thead:eq(0)>th\",e.nTable);/* Convert any user input sizes into pixel sizes */\nfor(t=0;t<i;t++)e.aoColumns[t].bVisible&&(s++,null!==e.aoColumns[t].sWidth&&(a=_fnConvertToWidth(e.aoColumns[t].sWidth,e.nTable.parentNode),/* Total up the user defined widths for later calculations */\no+=a,e.aoColumns[t].sWidth=a+\"px\"));/* If the number of columns in the DOM equals the number that we\n\t\t\t * have to process in dataTables, then we can use the offsets that are\n\t\t\t * created by the web-browser. No custom sizes can be set in order for\n\t\t\t * this to happen\n\t\t\t */\nif(i==r.length&&0===o&&s==i)for(t=0;t<e.aoColumns.length;t++)e.aoColumns[t].sWidth=r[t].offsetWidth+\"px\";else{/* Otherwise we are going to have to do some calculations to get\n\t\t\t\t * the width of each column. Construct a 1 row table with the maximum\n\t\t\t\t * string sizes in the data, and any user defined widths\n\t\t\t\t */\nvar l=e.nTable.cloneNode(!1);l.setAttribute(\"id\",\"\");var u='<table class=\"'+l.className+'\">',f=\"<tr>\",d=\"<tr>\";/* Construct a tempory table which we will inject (invisibly) into\n\t\t\t\t * the dom - to let the browser do all the hard word\n\t\t\t\t */\nfor(t=0;t<i;t++)if(e.aoColumns[t].bVisible)if(f+=\"<th>\"+e.aoColumns[t].sTitle+\"</th>\",null!==e.aoColumns[t].sWidth){var p=\"\";null!==e.aoColumns[t].sWidth&&(p=' style=\"width:'+e.aoColumns[t].sWidth+';\"'),d+=\"<td\"+p+' tag_index=\"'+t+'\">'+fnGetMaxLenString(e,t)+\"</td>\"}else d+='<td tag_index=\"'+t+'\">'+fnGetMaxLenString(e,t)+\"</td>\";f+=\"</tr>\",d+=\"</tr>\",/* Create the tmp table node (thank you jQuery) */\nl=$(u+f+d+\"</table>\")[0],l.style.width=n+\"px\",l.style.visibility=\"hidden\",l.style.position=\"absolute\",/* Try to aviod scroll bar */\ne.nTable.parentNode.appendChild(l);var g,c=$(\"tr:eq(1)>td\",l);/* Gather in the browser calculated widths for the rows */\nfor(t=0;t<c.length;t++){g=c[t].getAttribute(\"tag_index\");var h=$(\"td\",l).eq(t).width(),_=e.aoColumns[t].sWidth?e.aoColumns[t].sWidth.slice(0,-2):0;e.aoColumns[g].sWidth=Math.max(h,_)+\"px\"}e.nTable.parentNode.removeChild(l)}}", "title": "" }, { "docid": "9678f0812fb738047d9da661309614b9", "score": "0.5323175", "text": "function constrainWidth(col, width){\n var newWidth = width;\n\n // If the new width would be less than the column's allowably minimum width, don't allow it\n if (col.minWidth && newWidth < col.minWidth) {\n newWidth = col.minWidth;\n }\n else if (col.maxWidth && newWidth > col.maxWidth) {\n newWidth = col.maxWidth;\n }\n\n return newWidth;\n }", "title": "" }, { "docid": "8cf19ce65ac98e5c1c37d21d318ce504", "score": "0.53162545", "text": "function maxWidth() {return 900;}", "title": "" }, { "docid": "e3fa8bb9633e9dfda4e47fa69fdd3eef", "score": "0.5315299", "text": "function getHelpPageWidth(){\n if(root.width > units.gu(80))\n return peopleListPage.width/2 + units.gu(30) //tablet\n else\n return peopleListPage.width //phone\n}", "title": "" } ]
bf840bf83cece5bfb564784c2d5910b5
This method takes an array and converts it into a series of XML elements
[ { "docid": "ea8c4c568f578fde81f7478a84d9f733", "score": "0.72325367", "text": "function arrayToXml(name, array) {\n\tvar out = [];\n\tfor (var i = 0; i < array.length; i++) {\n\t\tvar val = array[i];\n\t\tif (typeof(val) == \"undefined\" || val == null) {\n\t\t\tout[out.length] = \"<\" + name + \" />\";\n\t\t}\n\t\telse if (typeof(val) == \"object\" && val.constructor == Array) {\n\t\t\tout[out.length] = arrayToXml(name, val);\n\t\t}\n\t\telse if (typeof(val) == \"object\") {\n\t\t\tout[out.length] = hashToXml(name, val);\n\t\t}\n\t\telse {\n\t\t\tout[out.length] = scalarToXml(name, val);\n\t\t}\n\t}\n\treturn out.join(\"\");\n}", "title": "" } ]
[ { "docid": "bb3391467f1d507d924d130f4741ddbb", "score": "0.6187231", "text": "function genarateLayout(array) {\r\n let fragment = document.createDocumentFragment();\r\n array.forEach((val, i) => {\r\n let item = document.createElement('div');\r\n item.innerText = val;\r\n item.classList.add('item');\r\n item.classList.add(`item-${val}`);\r\n fragment.appendChild(item);\r\n });\r\n randomContainer.appendChild(fragment);\r\n }", "title": "" }, { "docid": "88f3bf3dd436ca4f374123ef67734774", "score": "0.61533886", "text": "function nestElementBuilder() {\n for (let i = 0; i < nestElementsArray.length; i++) {\n nestElementsArray[i].nestElement();\n }\n}", "title": "" }, { "docid": "9eac29bdc4c241388f11929fee1cb892", "score": "0.5906577", "text": "addChilds(container, nodeArray) {\n const fragment = document.createDocumentFragment();\n for (const node of nodeArray) {\n fragment.appendChild(node);\n }\n container.appendChild(fragment);\n }", "title": "" }, { "docid": "000b4197eeb704efbefb965b7ad41422", "score": "0.5896504", "text": "function buildHTML(array) {\n for (let i = 0; i < array.length; i++) {\n \tdeck.children[i].innerHTML = '<i class=\"' + array[i] + '\"></i>';\n }\n}", "title": "" }, { "docid": "891d8d0000a610ea7af91059ffedaa64", "score": "0.5830365", "text": "function readyToPutInTheDOM(arr){\n return arr.map(dom=> {\n return \"<h1>\" + dom.name + \"</h1>\" + \"<h2>\" + dom.age + \"</h2>\"\n })\n}", "title": "" }, { "docid": "287641ee12595ad5e6879616c1072adb", "score": "0.5802283", "text": "function makeArrayValues (arg) {\n var str = \"\";\n for (var i=0; i!=arg.length; ++i){\n str += makeTag(\"value\", encodeXmlRpc(arg[i]))\n }\n return str\n}", "title": "" }, { "docid": "403b1db816efe7049dcf08b249990d3f", "score": "0.5752735", "text": "function readyToPutInTheDOM(arr){\n return arr.map(value => \"<h1>\" + value.name + \"</h1>\" + \"<h2>\" + value.age + \"</h2>\")\n }", "title": "" }, { "docid": "b2bacbd87978ad3037a5172b736f6766", "score": "0.56624323", "text": "function arrayToHTMLString(arr, className){\n let htmlString = \"\"\n arr.forEach(item => htmlString += `<div class=\"${className}\" tabindex=\"0\">${item}</div>`)\n return htmlString\n}", "title": "" }, { "docid": "e7afd5d0fb95f0ea579f436491bf8681", "score": "0.5649437", "text": "function listElements (array) {\n var text = ''\n for (var i = 0; i < array.length; i++) {\n text += ' ' + array[i] + ' '\n }\n return text\n}", "title": "" }, { "docid": "32c1b6d9e0805376ecdf974fd1176446", "score": "0.5645541", "text": "function readyToPutInTheDOM(arr){\n return arr.map(obj => `<h1>${obj.name}</h1><h2>${obj.age}</h2>`\n)}", "title": "" }, { "docid": "6d364874a99d659e5f81de6f7535212c", "score": "0.56390285", "text": "function readyToPutInTheDOM(arr){\n return arr.map(function(array){\n let h1= document.createElement(\"h1\")\n let h2= document.createElement(\"h2\")\n let name=array.name\n let age=array.age\n h1.append(name)\n document.body.append(h1)\n h2.append(age)\n return document.body.append(h2)\n })\n}", "title": "" }, { "docid": "dad7530015497d15361f94bc38e0cb38", "score": "0.5620042", "text": "function buildXML(xmlParams, xml, encodingFn) {\n xmlParams.forEach(param => {\n if (param.value !== undefined) {\n xml.push(`<${param.tag}>${encodingFn(param.value)}</${param.tag}>`);\n } else if (param.tag !== 'NextPartNumberMarker' &&\n param.tag !== 'PartNumberMarker') {\n xml.push(`<${param.tag}/>`);\n }\n });\n}", "title": "" }, { "docid": "10a4bda7e8f535cdeaf57fb889ec65df", "score": "0.55926174", "text": "function readyToPutInTheDOM(arr) {\n var value; \n return value = arr.map(function(item) {\n return \"<h1>\" + item.name + \"</h1><h2>\" + item.age + \"</h2>\";\n })\n}", "title": "" }, { "docid": "10697a6ab1420f0096bc4d857505698e", "score": "0.55903083", "text": "function generateShoppingItems(arr){\n let results = ``\n for(let i=0;i<arr.length;i++){\n results = results + generateItemElement(arr[i])\n }\n return results\n}", "title": "" }, { "docid": "ca1d5de2b30678610e280e3574ab3308", "score": "0.5578692", "text": "getTags (array) {\n return array.map(tag => `\n <p>${tag}</p>\n `).join('');\n }", "title": "" }, { "docid": "9d0888929b937275717d602de7dd7942", "score": "0.5577477", "text": "function stringifyTags(array) {\n return array.join(\" \");\n}", "title": "" }, { "docid": "e13e58f5e541c8bd973fd00752975ac0", "score": "0.55742705", "text": "function elementToObjects(array){\n let tmp = [];\n for(let i = 0;i<array.length;i++){\n tmp.push(objectFactory(array[i],i));\n }\n return tmp;\n }", "title": "" }, { "docid": "a96593e55141d5ef832b31e4e6877056", "score": "0.5503535", "text": "function exportToX(array) {\n let temp=[];\n for (i=0;i<array.length;i++) {\n temp[i] = {\n 'time' : Math.round((array[i]/ticks)*diffTimeStamp*1000,.001),\n 'bars' : '*',\n 'theme': '*'\n }\n }\n return temp;\n }", "title": "" }, { "docid": "9b39bfb3d22e8bc2b3cc8bfdff0cc18e", "score": "0.5477152", "text": "xmlify() {\n var trx;\n trx = function(key, val) {\n return XML(val);\n };\n return this.transformStrings([], trx);\n }", "title": "" }, { "docid": "38356232e91c04bcf7d894cfe37bba6d", "score": "0.5470542", "text": "function readyToPutInTheDOM(arr){\n // your code here\n return arr.map(function(dom){\n const h1 = document.createElement(\"h1\")\n const h2 = document.createElement(\"h2\")\n h1 = document.getElementsByTagName(\"h1\")\n h2= document.getElementsByTagName(\"h2\")\n h1.textContent = dom.name\n h2.textContent = dom.age\n })\n }", "title": "" }, { "docid": "b202b023e4edf3ec1670a534d90cdbca", "score": "0.5446819", "text": "function buildResList(resArray) {\n var resNumber = 1;\n res.forEach(reservation => {\n let curReservation = createHTML(reservation, resNumber);\n stringArray.push(curReservation);\n resNumber++;\n })\n\n}", "title": "" }, { "docid": "4e35fd3027e24bf6197f777d2dd43058", "score": "0.54288197", "text": "function readyToPutInTheDOM(arr)\n{\n return arr.map(function(s)\n {\n return \"<h1>\"+s.name + \"</h1><h2>\"+s.age+\"</h2>\";\n \n })\n\n}", "title": "" }, { "docid": "102fbc3e6c79e0f1f536c9681eca807e", "score": "0.5406618", "text": "function printProductArrayToDom(productArray) {\n for (var i = 0; i < productArray.length; i++) {\n var currentProduct = productArray[i];\n var productDomString = buildDomString(currentProduct);\n productContainer.innerHTML += productDomString;\n }\n}", "title": "" }, { "docid": "601250c57431f178c64294a753b1e026", "score": "0.5402822", "text": "function initElements() {\n for (let i = 0; i < elementCount; i++) {\n addDOMElement(elementsArr[i]);\n }\n}", "title": "" }, { "docid": "bdc175636dd8eee9034a00f6c33d8d2a", "score": "0.53763", "text": "function readyToPutInTheDOM(arr){\n // your code here\n return arr.map((i) => {\n return `<h1>${i['name']}</h1><h2>${i['age']}</h2>`;\n }); \n }", "title": "" }, { "docid": "d749d4539d58e06c0f10937428d77793", "score": "0.53595513", "text": "function createElements(sortClassArray, parentClassName) {\n sortClassArray.forEach((element) => {\n createOneElement(element, parentClassName);\n });\n}", "title": "" }, { "docid": "55f952ba11485294b518da7b5f42b707", "score": "0.53586566", "text": "function augmentElements(array, val){\n // base case\n if (array.length === 0) { return array }\n\n var head = array[0];\n var tail = array.slice(1);\n\n var result = augmentElements(tail, val);\n\n return [head.concat([val])].concat(result);\n\n}", "title": "" }, { "docid": "c5b59ba09cc544c429b20ed26d20fd03", "score": "0.5356496", "text": "function _mapDOM(arr, parentElement, newElement) {\n var text;\n for (var i = 0; i < arr.length; i++) {\n text = arr[i];\n parentElement.append($(newElement).text(text));\n }\n}", "title": "" }, { "docid": "13386844b0055e38ce9c80c23ec34435", "score": "0.532208", "text": "function addToDom3(array) {\n output = '';\n array.forEach((item, index) => {\n output += '<li> Region: ' + item.region + ', People: ' + item.inw + '</li>';\n });\n}", "title": "" }, { "docid": "0982f525455efa70603b7869324802b0", "score": "0.531921", "text": "function toAllElements(array, functionToApply){\n let resultArray = [];\n for (ele of array){\n resultArray.push( functionToApply(ele) );\n }\n return resultArray;\n}", "title": "" }, { "docid": "bd42cd2c8b62fc8887d19624f9befa93", "score": "0.5309785", "text": "function buildListFromArray(array) {\n console.log('buildListFromArray');\n let listTemplate = \"\";\n\n array.forEach(function(object) {\n listTemplate = listTemplate + `\n <li>${object.name}\n <a href=\"#\" data-id=\"${object.id}\">x</a>\n </li>\n `;\n });\n\n return listTemplate;\n }", "title": "" }, { "docid": "9fa4acb022cb9257e19dec1e7d168d1b", "score": "0.5216014", "text": "createApplianceList(array) {\n for (let i = 0; i < array.length; i++) {\n document.querySelector(this.selector_id_list).innerHTML += array[i].getApplianceHTML();\n }\n\n }", "title": "" }, { "docid": "22e941208d88762d87a031070f53698a", "score": "0.5211796", "text": "function encodeElements(elements) {\n var totalLength = 0;\n for (var i = 0; i < elements.length; i++) {\n var el = elements[i];\n totalLength += el.length;\n }\n var data;\n var copyPos;\n if (totalLength < SIZE_THRESHOLD) {\n data = new Uint8Array(1 + totalLength);\n data[0] = OFFSET_SHORT_LIST + totalLength;\n copyPos = 1;\n }\n else {\n // length of length = BX\n // prefix = [BX, [length]]\n var tmpLength = totalLength;\n var byteNum = 0;\n while (tmpLength !== 0) {\n ++byteNum;\n tmpLength = tmpLength >> 8;\n }\n tmpLength = totalLength;\n var lenBytes = new Uint8Array(byteNum);\n for (var i = 0; i < byteNum; ++i) {\n lenBytes[byteNum - 1 - i] = ((tmpLength >> (8 * i)) & 0xFF);\n }\n // first byte = F7 + bytes.length\n data = new Uint8Array(1 + lenBytes.length + totalLength);\n data[0] = OFFSET_LONG_LIST + byteNum;\n for (var i = 0; i < lenBytes.length; i++) {\n data[i + 1] = lenBytes[i];\n }\n copyPos = lenBytes.length + 1;\n }\n for (var i = 0; i < elements.length; i++) {\n var el = elements[i];\n for (var j = 0; j < el.length; j++) {\n data[j + copyPos] = el[j];\n }\n copyPos += el.length;\n }\n return data;\n}", "title": "" }, { "docid": "b5da17ab897015c8f58db26068c1c9e7", "score": "0.52077544", "text": "function convertArrayToHtmlRows(myArray) {\r\n var arrayHtml = \"\";\r\n if (myArray) {\r\n // create html for array\r\n for (var i = 0; i < myArray.length; i++) {\r\n arrayHtml += myArray[i] + \"<br/>\"\r\n }\r\n }\r\n return arrayHtml;\r\n}", "title": "" }, { "docid": "969a374a1a54af29015c7f661a0eb963", "score": "0.5195118", "text": "function formatHTML(array){\n\n \n\n var tableStart = \"<br><br><html><body><table border=\\\"1\\\">\";\n\n var tableEnd = \"</table></body></html>\";\n\n var rowStart = \"<tr>\";\n\n var rowEnd = \"</tr>\";\n\n var cellStart = \"<td>\";\n\n var cellEnd = \"</td>\";\n\n\n\n for (i in array){\n\n array[i] = rowStart + cellStart + array[i] + cellEnd + rowEnd;\n\n }\n\n\n\n array = array.join('');\n\n array = tableStart + array + tableEnd;\n\n\n\n return array;\n\n\n\n}", "title": "" }, { "docid": "960cf75c4153bf02129440749a5ec380", "score": "0.51783746", "text": "function createTree(array, obj) {\r\n array.append(createTreeDom(obj));\r\n}", "title": "" }, { "docid": "0ed630d145eaf17fb0a86b395dc2d2b4", "score": "0.517719", "text": "elements( name )\n\t{\n\t\tvar flat = [];\n\t\tthis.map( node => flat = flat.concat(Array.from( node.elements(name)) )\t);\n\t\treturn new XMLList( flat );\n\t}", "title": "" }, { "docid": "912c2926c25cfe7c73f331d13ec672d2", "score": "0.5165785", "text": "function joinElements(array) {\n return array.join();\n}", "title": "" }, { "docid": "7275bdf94cb405936c7ee653912132bf", "score": "0.5155772", "text": "function createDOMFromArray(){\r\n\tfor(var i=0;i<products.length;i++){ //run loop till all the products array length\r\n\t\tproducts[i].id=productID; //we may have some different product id in stored data we are creating DOM from scratch so\r\n\t\t //we will initialise the product id to remove unconsistencies\r\n\t\taddProductToDOM(products[i]);\r\n productID++;\t\t\r\n\t}\r\n}", "title": "" }, { "docid": "30cdc68d5e2fdc9ee2ffad2253dc5400", "score": "0.5128875", "text": "function OBJtoXML(obj) {\n var xml = \"\";\n for (var prop in obj) {\n xml += obj[prop] instanceof Array ? \"\" : \"<\" + prop + \">\";\n if (obj[prop] instanceof Array) {\n for (var array in obj[prop]) {\n xml += \"<\" + prop + \">\";\n // console.log(new Object(obj[prop][array]));\n xml += OBJtoXML(new Object(obj[prop][array]));\n xml += \"</\" + prop + \">\";\n }\n } else if (typeof obj[prop] == \"object\") {\n // console.log(new Object(obj[prop]));\n xml += OBJtoXML(new Object(obj[prop]));\n } else {\n xml += obj[prop];\n }\n xml += obj[prop] instanceof Array ? \"\" : \"</\" + prop + \">\";\n }\n var xml = xml.replace(/<\\/?[0-9]{1,}>/g, \"\");\n console.log(xml);\n return xml;\n }", "title": "" }, { "docid": "17d4efab91c2f5183b1ac4fa157acbc7", "score": "0.51096404", "text": "function generateTechUsed(array) {\n return array\n .map(tech => `<span class=\"tech-label\">${tech}</span>`)\n .join(' ')\n\n}", "title": "" }, { "docid": "c724b2c4d0a47e8b5463c7ba3412b6ed", "score": "0.5107982", "text": "function generateXML() {\n let x = \"<doc>\\n\";\n x += ` <id>${uuidv4()}</id>\\n`;\n x += ` <name>${loremIpsum({ count: 1, units: \"word\", format: \"plain\" })}</name>\\n`;\n x += ` <c0>${loremIpsum({ count: 1, units: \"word\", format: \"plain\" })}</c0>\\n`;\n x += ` <c1>${loremIpsum({ count: 1, units: \"word\", format: \"plain\" })}</c1>\\n`;\n x += ` <c2>${loremIpsum({ count: 1, units: \"word\", format: \"plain\" })}</c2>\\n`;\n x += ` <c3>${loremIpsum({ count: 1, units: \"word\", format: \"plain\" })}</c3>\\n`;\n x += ` <short>${loremIpsum({ count: 1, units: \"sentence\", format: \"plain\" })}</short>\\n`;\n x += ` <a0>${loremIpsum({ count: 1, units: \"paragraph\", format: \"plain\" })}</a0>\\n`;\n x += ` <a1>${loremIpsum({ count: 1, units: \"paragraph\", format: \"plain\" })}</a1>\\n`;\n x += ` <a2>${loremIpsum({ count: 1, units: \"paragraph\", format: \"plain\" })}</a2>\\n`;\n x += ` <a3>${loremIpsum({ count: 1, units: \"paragraph\", format: \"plain\" })}</a3>\\n`;\n x += \"</doc>\";\n return x;\n}", "title": "" }, { "docid": "c4d58b256577b61970ae71982dc90df1", "score": "0.5100181", "text": "appendChildren(elements) {\n let frag = document.createDocumentFragment();\n for (let element of elements) {\n frag.appendChild(element);\n }\n this.appendChild(frag);\n }", "title": "" }, { "docid": "01240eed3e1c86697f8140afb75ac344", "score": "0.50977176", "text": "function toNodeList(arrayOfNodes) { \n let fragment = document.createDocumentFragment();\n arrayOfNodes.forEach(function(item){\n fragment.appendChild(item.cloneNode());\n });\n return fragment.childNodes;\n}", "title": "" }, { "docid": "08cb78a647e5c75dad92f5241141cf3e", "score": "0.50913537", "text": "function createOutput(arr) {\n\t\treturn arr[0] + \"x20 \" + arr[1] + \"x10 \" \n\t\t + arr[2] + \"x5 \" + arr[3] + \"x2 \" + arr[4] + \"x1\";\n\t}", "title": "" }, { "docid": "96438696a5e4aab95cde9e17f0673b1e", "score": "0.50658464", "text": "function setAll(arr) {\n pxElements.length = 0;\n for ( var ind = 0; ind < arr.length; ind++ ) {\n pxElements[ind] = arr[ind];\n }\n if( debugging ) {\n window.setTimeout(\n function() { console.log(pxElements); }, 10);\n }\n init();\n }", "title": "" }, { "docid": "49039c32a7d2421d1db9182e9f0f33ff", "score": "0.5048125", "text": "function flattenToString(arr) {\r\n var i, iz, elem, result = '';\r\n for (i = 0, iz = arr.length; i < iz; ++i) {\r\n elem = arr[i];\r\n result += isArray(elem) ? flattenToString(elem) : elem;\r\n }\r\n return result;\r\n }", "title": "" }, { "docid": "a324fa7f94b1def737515c5e463f0877", "score": "0.50475556", "text": "domToHTML5(XML_dom, callback, perElementFn){\n\n this.els = learnElementNames(XML_dom, this.namespaces);\n\n let convertEl = (el) => {\n // Elements with defined namespaces get the prefix mapped to that element. All others keep\n // their namespaces and are copied as-is.\n let newElement;\n if (this.namespaces.has(el.namespaceURI ? el.namespaceURI : \"\")) {\n let prefix = this.namespaces.get(el.namespaceURI ? el.namespaceURI : \"\");\n newElement = document.createElement(`${prefix}-${el.localName}`);\n } else {\n newElement = document.importNode(el, false);\n }\n // Copy attributes; @xmlns, @xml:id, @xml:lang, and\n // @rendition get special handling.\n for (let att of Array.from(el.attributes)) {\n if (att.name == \"xmlns\") {\n //Strip default namespaces, but hang on to the values\n newElement.setAttribute(\"data-xmlns\", att.value);\n } else {\n newElement.setAttribute(att.name, att.value);\n }\n if (att.name == \"xml:id\") {\n newElement.setAttribute(\"id\", att.value);\n }\n if (att.name == \"xml:lang\") {\n newElement.setAttribute(\"lang\", att.value);\n }\n if (att.name == \"rendition\") {\n newElement.setAttribute(\"class\", att.value.replace(/#/g, \"\"));\n }\n }\n // Preserve element name so we can use it later\n newElement.setAttribute(\"data-origname\", el.localName);\n // If element is empty, flag it\n if (el.childNodes.length == 0) {\n newElement.setAttribute(\"data-empty\", \"\");\n }\n // Turn <rendition scheme=\"css\"> elements into HTML styles\n if (el.localName == \"tagsDecl\") {\n let style = document.createElement(\"style\");\n for (let node of Array.from(el.childNodes)){\n if (node.nodeType == Node.ELEMENT_NODE && node.localName == \"rendition\" && node.getAttribute(\"scheme\") == \"css\") {\n let rule = \"\";\n if (node.hasAttribute(\"selector\")) {\n //rewrite element names in selectors\n rule += node.getAttribute(\"selector\").replace(/([^#, >]+\\w*)/g, \"tei-$1\").replace(/#tei-/g, \"#\") + \"{\\n\";\n rule += node.textContent;\n } else {\n rule += \".\" + node.getAttribute(\"xml:id\") + \"{\\n\";\n rule += node.textContent;\n }\n rule += \"\\n}\\n\";\n style.appendChild(document.createTextNode(rule));\n }\n }\n if (style.childNodes.length > 0) {\n newElement.appendChild(style);\n this.hasStyle = true;\n }\n }\n // Get prefix definitions\n if (el.localName == \"prefixDef\") {\n this.prefixDefs.push(el.getAttribute(\"ident\"));\n this.prefixDefs[el.getAttribute(\"ident\")] = {\n \"matchPattern\": el.getAttribute(\"matchPattern\"),\n \"replacementPattern\": el.getAttribute(\"replacementPattern\")\n };\n }\n for (let node of Array.from(el.childNodes)) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n newElement.appendChild(convertEl(node));\n }\n else {\n newElement.appendChild(node.cloneNode());\n }\n }\n if (perElementFn) {\n perElementFn(newElement, el);\n }\n return newElement;\n };\n\n this.dom = convertEl(XML_dom.documentElement);\n\n this.applyBehaviors();\n this.done = true;\n if (callback) {\n callback(this.dom, this);\n window.dispatchEvent(ceteiceanLoad);\n } else {\n window.dispatchEvent(ceteiceanLoad);\n return this.dom;\n }\n }", "title": "" }, { "docid": "a4007ea7471cffcaf4ca9ae588f5c432", "score": "0.5045789", "text": "function populateButtons(arrayToUse, classToAdd, areaToAddTo) {\n \n // use .empty to empty child (and other descendant) elements, and any text within areaToAddTo\n $(areaToAddTo).empty();\n\n // for loop in which variable i is set to 0 when i is less than the number of elements in arrayToUse add 1 to i\n for (var i = 0; i < arrayToUse.length; i++) {\n var a = $(\"<button>\");\n // add class classToAdd to a\n a.addClass(classToAdd);\n // set the \"data-type\" attribute of a to arrayToUse[i]\n a.attr(\"data-type\", arrayToUse[i]);\n // set the text of a to the text value of arrayToUse\n a.text(arrayToUse[i]);\n \n //add 'a' to the end of areaToAddTo\n $(areaToAddTo).append(a);\n }\n\n }", "title": "" }, { "docid": "89f4fbea6723f96b105186ad63888716", "score": "0.50424343", "text": "function atos(array){\n\t\tvar retstr = \"[\";\n\t\tfor (i = 0; i < array.length; i++) {\n\t\t\tif (i)\n\t\t\t\tretstr += \",\";\n\t\t\tretstr += \"'\" + array[i] + \"'\";\n\t\t}\n\t\tretstr += \"]\";\n\t\treturn retstr;\n\t}", "title": "" }, { "docid": "3791902ae2324d1e5d0ea1e2fb8a3925", "score": "0.50423217", "text": "function convert(array) {\r\n html = \"\";\r\n for (var i = 0; i < array.length; i++) {\r\n html += amount.value * array[i][0] + array[i][1] + br;\r\n\r\n }\r\n chartDiv.innerHTML = html;\r\n}", "title": "" }, { "docid": "5ca0a8b8f76fd18f4f10609cbb7762f9", "score": "0.5036201", "text": "function helper (array) {\n // write a for loop\n for (let i = 0; i < array.length; i++) {\n let element = array[i];\n // if the element is an array then recurse with an helper function\n if(Array.isArray(element)) {\n helper(element);\n } else {\n // push the element into Blank Array\n arr.push(element)\n }\n }\n \n }", "title": "" }, { "docid": "342b3514feb2176bed6524b578e1e919", "score": "0.502379", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "342b3514feb2176bed6524b578e1e919", "score": "0.502379", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "342b3514feb2176bed6524b578e1e919", "score": "0.502379", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "342b3514feb2176bed6524b578e1e919", "score": "0.502379", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "6bf2777b70557e2f37a1fb1348961090", "score": "0.50236475", "text": "function transferArrayToString(tagsOnPage){\n tagsOnPage.forEach((element)=>{\n let sumTagsOfThisAnswer = [];\n if(Array.isArray(element[0])){\n element.forEach((arr)=>{\n sumTagsOfThisAnswer.push(arr.toString());\n\n });\n tagsOnPage[tagsOnPage.indexOf(element)] = sumTagsOfThisAnswer;\n }\n })\n}", "title": "" }, { "docid": "46b0954099b5a0ac8e4ed735ccce7500", "score": "0.50153244", "text": "function generateButtons(array) {\n return array\n .map(btn =>\n `\n <button\n class=\"showcase-button\"\n onclick=\"window.open('${btn.link}','_blank')\"\n >\n <i class=\"${btn.icon}\"></i>\n ${btn.title}\n </button>\n `\n )\n .join(' ')\n}", "title": "" }, { "docid": "5c87b781ac3aaab018cfc2d1a5a5a259", "score": "0.50007033", "text": "function appElement(arr){\n\t\t\t\t\tfor(var i = 0; i < arr.length; i++){\n\n\t\t\t\t\t\tvar pictureDiv = angular.element(\"<div class='view-picture'>\");\n\t\t\t\t\t\tvar aPicture = angular.element(\"<a class='view-a-picture'>\");\n\t\t\t\t\t\tvar img = angular.element(\"<img>\");\n\t\t\t\t\t\tvar span = angular.element(\"<span class='view-title'>\"); \n\t\t\t\t\t\tvar aAlbum = angular.element(\"<a class='view-a-album'>\");\n\n\t\t\t\t\t\tspan.text(arr[i].title);\n\t\t\t\t\t\taAlbum.text(\"Album \" + arr[i].albumId);\n\t\t\t\t\t\taAlbum.attr('href', '#/album/' + arr[i].albumId);\n\t\t\t\t\t\taPicture.attr('href', '#/picture/' + arr[i].id);\n\t\t\t\t\t\timg.attr(\"src\", arr[i].url);\n\n\t\t\t\t\t\taPicture.append(img);\n\t\t\t\t\t\tpictureDiv.append(aPicture);\n\t\t\t\t\t\tpictureDiv.append(aAlbum);\n\t\t\t\t\t\tpictureDiv.append(span);\n\t\t\t\t\t\tparentDiv.append(pictureDiv);\n\t\t\t\t\t};\t\n\t\t\t\t}", "title": "" }, { "docid": "90cc2b8e7d6fc9b522c23e8488dc969a", "score": "0.50002635", "text": "function createListItems(arr) {\n let items = \"\";\n for (let i = 0; i < arr.length; i++) {\n items += `<li>${arr[i]}</li>`;\n }\n return items;\n}", "title": "" }, { "docid": "6d7f6be254bcceb762e3effdb973a64f", "score": "0.49982256", "text": "_elementsToSource(options = {}, indent = \"\") {\n const type = this.renderType || this.type;\n const typeExpression = JSON.stringify(type);\n const attrExpression = this._propsToSource(options, indent);\n\n // output on one line if no children\n if (!this.children || this.children.length === 0) {\n return \"this.createElement(\" + typeExpression + \", \"+ attrExpression + \")\";\n }\n\n const childIndent = indent + \" \";\n const childExpressions =\n this.children.map(child => {\n if (typeof child === \"string\") return JSON.stringify(child);\n return child._elementsToSource(options, childIndent);\n })\n .join(\",\\n\" + childIndent);\n\n return \"this.createElement(\\n\"\n + childIndent + typeExpression + \",\\n\"\n + childIndent + attrExpression + \",\\n\"\n + childIndent + childExpressions + \"\\n\"\n + indent + \")\";\n }", "title": "" }, { "docid": "bad8869db1b5a4d9d08f2db753dd9a8c", "score": "0.49944758", "text": "function createEventList(arr) {\n let html = \"\";\n for (i = 0; i < arr.length; i++) {\n html += `<li><a target=\"_blank\" href=https://${getValue(\n \"domain\"\n )}/${getValue(\"clientname\")}/api/${arr[i][0]}>${arr[i][1]}</a></li>`;\n }\n return html;\n}", "title": "" }, { "docid": "930cd93294b5f955f78c15d0e7542499", "score": "0.49914417", "text": "function convertToArray(arr){\n if(arr && arr.child){\n finalResult.push(arr.node);\n arr.child.forEach(child=> convertToArray(child))\n \n }\n}", "title": "" }, { "docid": "1720429805d3f1bff633d644b32bb66c", "score": "0.49845156", "text": "function getHtmlList(sourceArray) {\n var html = \"<ul>\";\n for (let item of sourceArray) {\n html += `<li>${item}</li>`;\n }\n html += \"</ul>\";\n\n return html;\n }", "title": "" }, { "docid": "91601f640f58d826efddb3153efa3c6b", "score": "0.49830925", "text": "function xmlBuilderFactory(document_name,cellArray){\n var buildersList = builder.create(\"kml\")\n .att({\"xmlns\":\"http://www.opengis.net/kml/2.2\",\n //create(\"?xml\").att({\"version\":\"1.0\", \"encoding\":\"UTF-8\"})\n //.ele(\"kml\").att({\"xmlns\":\"http://www.opengis.net/kml/2.2\",\n \"xmlns:gx\":\"http://www.google.com/kml/ext/2.2\",\n \"xmlns:kml\":\"http://www.opengis.net/kml/2.2\",\n \"xmlns:atom\":\"http://www.w3.org/2005/Atom\"})\n .ele(\"Document\")\n .ele(\"name\",document_name).up();\n\n //var item = xml.ele(\"name\");\n cellArray.forEach(function(item){\n buildersList\n .ele(\"Placemark\")\n .ele(\"Point\")\n .ele(\"coordinates\",item)\n });\n cellArray.forEach(function(item){\n //buildersList.\n })\n var xml = buildersList.end({pretty: true});\n console.log(xml);\n }", "title": "" }, { "docid": "dec9372a9357962a6661c45aa3240752", "score": "0.49745917", "text": "function createButtons(arr){\n\tfor(var i = 0; i < arr.length; i++){\n\t\tcreateBtn(arr[i]);\n\t}\n}", "title": "" }, { "docid": "4cc803ca0e3ee5f45e1cae3927383826", "score": "0.49730465", "text": "function htmlCreator(arr) {\n arr.forEach(function(element) {\n var htmlEle = $(\"<div class= 'fizz-buzz-item'><span>\" + element + \"</span></div>\");\n if (element === \"fizz\" || element === \"buzz\" || element === \"fizzbuzz\"){\n htmlEle.addClass(element);\n }\n $('.js-results').append(htmlEle);\n\n });\n}", "title": "" }, { "docid": "2ac74412256c75927a46f39259012c2e", "score": "0.49474266", "text": "toXMLString()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "f5356519e704ac6690c20ed4c1f0e480", "score": "0.49404228", "text": "function createDataArray(arr) {\n arr = arr.split(',')\n var output = []\n for(var i=0; i < arr.length; i++) {\n n = {\n id: `${arr[i]}`,\n value: `${arr[i]}`,\n name: `${arr[i]}`,\n text: `${arr[i]}`,\n selected: 'selected'\n }\n output.push(n)\n }\n return output\n}", "title": "" }, { "docid": "f8e55f82ff629d57bdd543afe3609905", "score": "0.4937198", "text": "function populateButtons(arrayToUse, classToAdd, areaToAddTo){\n $(areaToAddTo).empty();\n\n for (var i = 0; i < arrayToUse.length; i++){\n var a = $('<button>')\n a.addClass(classToAdd);\n a.attr('data-type', arrayToUse[i]);\n a.text(arrayToUse[i]);\n $(areaToAddTo).append(a);\n }\n\n}", "title": "" }, { "docid": "e3c1ed071603963f6546575b5ccaacb6", "score": "0.49367258", "text": "function addDeckShuffled(array) {\n const fragment = document.createDocumentFragment();\n for (card of array) {\n fragment.appendChild(card);\n }\n document.getElementById(\"deck\").appendChild(fragment);\n}", "title": "" }, { "docid": "75e690461bf9e2677514a9c6afcb7f80", "score": "0.49339965", "text": "function hashToXml(name, tree) {\n\tvar elem = [];\n\tvar attr = [];\n\tfor (var key in tree) {\n\t\tif (!tree.hasOwnProperty(key)) continue;\n\t\tvar val = tree[key];\n\n\t\t// Check to see if the property name begins with `attr_prefix` (which defaults to `-`), if it does then this name/value pair \n\t\t// should be an attribute on the XML element, e.g. `age=\"15\"`\n\t\tif (key.charAt(0) != attr_prefix) {\n\n\t\t\t// If the property value is a null or undefined value, then we have a self-closing element, such as\n\t\t\t// `<br/>`\n\t\t\tif (typeof(val) == \"undefined\" || val == null) {\n\t\t\t\telem[elem.length] = \"<\" + key + \" />\";\n\t\t\t}\n\n\t\t\t// Check to see if the proeprty value is an `Array`, if it is then we handle it with the\n\t\t\t// `arrayToXml()` method, passing it the property name which is used for the root element that will \n\t\t\t// contain this array object\n\t\t\telse if (typeof(val) == \"object\" && val.constructor == Array) {\n\t\t\t\telem[elem.length] = arrayToXml(key, val);\n\t\t\t}\n\n\t\t\t// Check to see if the property value is an `Object`, if it is then we call `hashToXml()` recursively\n\t\t\telse if (typeof(val) == \"object\") {\n\t\t\t\telem[elem.length] = hashToXml(key, val);\n\t\t\t}\n\n\t\t\t// Otherwise we have a standard key value pair, e.g. <name>David</name>\n\t\t\telse {\n\t\t\t\telem[elem.length] = scalarToXml(key, val);\n\t\t\t}\n\t\t}\n\n\t\t// Create attributes on an element, such as `name=\"David\"`\n\t\telse {\n\t\t\tattr[attr.length] = \" \" + (key.substring(1)) + '=\"' + (escapeXml(val)) + '\"';\n\t\t}\n\t}\n\tvar joinedAttrs = attr.join(\"\");\n\tvar joinedElements = elem.join(\"\");\n\n\t// Check to see if there is a root element\n\tif (typeof(name) == \"undefined\" || name == null) {\n\t}\n\n\t// If the `elem` array contains elements, then add these elements to the root element\n\telse if (elem.length > 0) {\n\t\tjoinedElements = \"<\" + name + joinedAttrs + \">\" + joinedElements + \"</\" + name + \">\";\n\t}\n\t// Otherwise the root element is just a self-closing element\n\telse {\n\t\tjoinedElements = \"<\" + name + joinedAttrs + \" />\";\n\t}\n\treturn joinedElements;\n}", "title": "" }, { "docid": "1d5a4572f66012f1291c729fc7ae18f3", "score": "0.4927438", "text": "function buildMinMaxHTML(eleArr) {\n var buildStr = '<h2>Storefront Min/Maxes</h2>';\n for(var i = 0; i < eleArr.length; i++) {\n buildStr += buildMinMax(eleArr[i]);\n }\n return buildStr;\n}", "title": "" }, { "docid": "cf673d4fb0db39c47e1056512bd44308", "score": "0.4913744", "text": "function renderTweets(arr) {\n arr.forEach(function(item) {\n $('#tweets').prepend(createTweetElement(item));\n });\n }", "title": "" }, { "docid": "fb1108852a05aadbab85531478df3ca2", "score": "0.4913229", "text": "function createDomForArray(arr) { //creates function with arr contents\n theList.innerHTML = ''; //clears list\n for (var i = 0; i < arr.length; i++) { //counter: goes thru array\n var li = document.createElement('li'); //creates var to create a list item\n li.textContent = arr[i].name; //takes current arr content from counter\n theList.appendChild(li); //applies content to bottom of the list\n }\n}", "title": "" }, { "docid": "6e22843d5e695aeb6f5600a47c99d679", "score": "0.4895218", "text": "function printItems (arr, tag){\n for(i in arr) {\n var obj = arr[i];\n var newItem = '<' + tag + ' id=' + obj.id + '>' + obj.text + '</' + tag + '>';\n $('#qsContainer').append(newItem);\n }\n }", "title": "" }, { "docid": "6299ff8f245b2f586a3837f42bb6128f", "score": "0.48945585", "text": "function stampatore(array, selector) {\n array.forEach(element => {\n /* const {name, prefix, type, family} = element; //solo se si vuole levare element.prefix, element.name etc...//\n */\n\n //inseriamo le icone colorate nel container\n selector.append($(`<div>\n <i class=\"${element.prefix} ${element.type}\" style=\"color:${element.color}\"></i>\n <div class=\"title\">${element.name}</div>\n </div>`))\n\n });\n }", "title": "" }, { "docid": "bf120a5e04dd99bd766879647ef44071", "score": "0.48845044", "text": "_emitArray(arr) {\n for (let i = arr.length - 1; i >= 0; i--) {\n this.emitPush(arr[i]);\n }\n return this.emitPush(arr.length).emit(OpCode_1.default.PACK);\n }", "title": "" }, { "docid": "f379c26420e576debb6b9332f003a967", "score": "0.48814863", "text": "function definitionToTD(){\n for(let i = 0; i < definitionArray.length; i++){\n var setArray = [];\n\n for(let j = 0; j < definitionArray[i].length; j++){\n \n var data = document.createElement('td');\n data.setAttribute('class', definitionArray[i][0]);\n data.textContent = definitionArray[i][j];\n\n setArray.push(data);\n }\n tdArray.push(setArray);\n }\n}", "title": "" }, { "docid": "78ad6db4a6de073616d969e7611dea57", "score": "0.48752713", "text": "function wrapArrayEvaluators(arrayNodes) {\n if ( !arrayNodes ) {\n return [];\n }\n\n var result = [];\n for ( var i = arrayNodes.length - 1; i >= 0; i-- ) {\n result[i] = wrapLiteral(createEvaluator(arrayNodes[i]));\n }\n return result;\n }", "title": "" }, { "docid": "031ceb0bb6c43b9bee8700e6e7ea7f6a", "score": "0.48739034", "text": "function elementJoin(arrayOfElements){\n return arrayOfElements.join()\n\n}", "title": "" }, { "docid": "44454ee7ce0402518319f8ff4cdb0f57", "score": "0.4872745", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += Array.isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "44454ee7ce0402518319f8ff4cdb0f57", "score": "0.4872745", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += Array.isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "44454ee7ce0402518319f8ff4cdb0f57", "score": "0.4872745", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += Array.isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "44454ee7ce0402518319f8ff4cdb0f57", "score": "0.4872745", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += Array.isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "44454ee7ce0402518319f8ff4cdb0f57", "score": "0.4872745", "text": "function flattenToString(arr) {\n var i, iz, elem, result = '';\n for (i = 0, iz = arr.length; i < iz; ++i) {\n elem = arr[i];\n result += Array.isArray(elem) ? flattenToString(elem) : elem;\n }\n return result;\n }", "title": "" }, { "docid": "e6ae3d8959a7280987c4c4a1b480a0db", "score": "0.4863124", "text": "function writeXMLTableRows(tbl,arrayOfRows) {\n\tfor(i=0;i<arrayOfRows.length;i++) {\n\t\tvar tr=document.createElement(\"tr\");\n\t\tvar td1=document.createElement(\"td\");\n\t\ttd1.appendChild(document.createTextNode(arrayOfRows[i].network));\n\t\ttr.appendChild(td1);\n\t\tvar td2=document.createElement(\"td\");\n\t\ttd2.appendChild(document.createTextNode(arrayOfRows[i].owner));\n\t\ttr.appendChild(td2);\n\t\tvar td3=document.createElement(\"td\");\n\t\tvar ul=document.createElement(\"ul\");\n\t\tfor(j=0;j<arrayOfRows[i].feeds.length;j++) { // puts the feeds of each row into an unsorted list\n\t\t\tvar li=document.createElement(\"li\");\n\t\t\tli.appendChild(document.createTextNode(arrayOfRows[i].feeds[j]));\n\t\t\tul.appendChild(li);\n\t\t}\n\t\ttd3.appendChild(ul);\n\t\ttr.appendChild(td3);\n\t\tvar td4=document.createElement(\"td\");\n\t\ttd4.appendChild(document.createTextNode(arrayOfRows[i].notes));\n\t\ttr.appendChild(td4);\n\t\tvar td5=document.createElement(\"td\");\n\t\tvar a=document.createElement(\"a\");\n\t\tvar href=document.createAttribute(\"href\");\n\t\thref.value=arrayOfRows[i].homepage;\n\t\ta.setAttributeNode(href);\n\t\ta.appendChild(document.createTextNode(arrayOfRows[i].homepage)); // the hyperlink text is the same as its address\n\t\ttd5.appendChild(a);\n\t\ttr.appendChild(td5);\n\t\tvar td6=document.createElement(\"td\");\n\t\tvar img=document.createElement(\"img\");\n\t\tvar src=document.createAttribute(\"src\");\n\t\tsrc.value=arrayOfRows[i].logo;\n\t\timg.setAttributeNode(src);\n\t\ttd6.appendChild(img);\n\t\ttr.appendChild(td6);\n\t\ttbl.appendChild(tr);\n\t}\n\tdocument.getElementById(\"table\").appendChild(tbl); // all the formatted table is inserted into the div id=\"table\"\n\tdocument.getElementById(\"table\").appendChild(document.createElement(\"br\"));\n}", "title": "" }, { "docid": "19c08ebfc7d343325f92507db5eea4a4", "score": "0.48625264", "text": "genResultGroups() {\n let text = \"\";\n text += this.genTopBlurb();\n for (let rg in this.props.data.INSP.result_groups) {\n let group = this.props.data.INSP.result_groups[rg];\n text += \"<refInspResultGroup>\";\n text += \"<inspResultGroup>\"+group.name+\"</inspResultGroup>\";\n text += \"<resultCatrgory>RESULT</resultCatrgory>\";\n text += this.genServProvCode();\n\n text += \"<inspectionResultGroupModels>\";\n let counter = 0;\n for (let i in group.items) {\n let item = group.items[i];\n text += '<inspectionResultGroupModel refId=\"'+counter+'@InspectionResultGroupModel\">';\n counter++;\n text += this.genServProvCode();\n text += \"<inspResultGroup>\"+group.name+\"</inspResultGroup>\";\n text += \"<inspResult>\"+item.result+\"</inspResult>\";\n text += \"<resultCatrgory>RESULT</resultCatrgory>\";\n text += this.genAuditModel();\n text += \"<inspResultDisplayOrder>\"+item.order+\"</inspResultDisplayOrder>\";\n text += \"<inspResultGroupI18Ns/>\";\n text += \"<inspResultType>\"+item.type+\"</inspResultType>\";\n\n text += \"<lowerMajorViolation>\"+item.min_vio+\"</lowerMajorViolation>\";\n text += \"<lowerScore>\"+item.min_score+\"</lowerScore>\";\n text += \"<upperMajorViolation>\"+item.max_vio+\"</upperMajorViolation>\";\n text += \"<upperScore>\"+item.max_score+\"</upperScore>\";\n\n text += \"</inspectionResultGroupModel>\";\n }\n\n text+= \"</inspectionResultGroupModels>\"\n text += \"</refInspResultGroup>\";\n }\n text += \"</list>\"\n return text;\n }", "title": "" }, { "docid": "0aefdf2b208d07256979aea865018de3", "score": "0.4858411", "text": "function createAccountsItems(targetArr, domElement) {\n for (let i = 0; i < targetArr.length; i++) {\n let accountItem = createDomElement(\"div\", \"accountItem\", domElement)\n accountItem.setAttribute(\"tabindex\", \"0\")\n createDomElement(\"img\", \"accountItemImg\", accountItem).setAttribute(\"src\", targetArr[i].img)\n createDomElement(\"div\", \"accountItemTitle\", accountItem).innerText = targetArr[i].title\n }\n}", "title": "" }, { "docid": "3f6de069e297a0c369f428e829b3cb2b", "score": "0.4857806", "text": "function returnList(arr){\n var newList = \"<ul>\";\n arr.forEach(function (element) {\n newList += \"<li>\" +element + \"</\\li>\";\n\n\n })\n }", "title": "" }, { "docid": "e58fc680e340ce738a3d151ce43d38ae", "score": "0.48498464", "text": "treeFromArray(arr = []){\r\n var tree = new jsUtils.binaryTree()\r\n tree.fromArray(arr);\r\n return tree;\r\n }", "title": "" }, { "docid": "881aa1fbe2fa4d5deadcd9b8ceb291df", "score": "0.48490217", "text": "function flatten(arr) {\r\n return ([].concat(...arr))\r\n }", "title": "" }, { "docid": "c15fd6441df6bcd3e04c284f492d10f2", "score": "0.4846903", "text": "function $Elements(elements) {\n _.push.apply(this, _.map.call(elements, $Element));\n}", "title": "" }, { "docid": "fb1365f817dbe6a11a1799c92be59318", "score": "0.48446515", "text": "function print(array, selectorContainer) {\n\n array.forEach(iconElement => {\n\n const {name, prefix, type, color} = iconElement; //Cosi si destruttura un elemento, cioé le sue proprietà vengono \"Estratte\" dagli elementi.\n\n let markup =\n `\n <div>\n <i class=\"${prefix} ${type}\" style=\"color:${color}\"></i>\n <div class=\"title\">${name}</div>\n </div>\n `;\n\n //\"Stampo\" all'interno del contenitore selezionato, il markup da inserire per ottenere le icone.\n selectorContainer.insertAdjacentHTML('beforeend',markup);\n });\n\n}", "title": "" }, { "docid": "27f2d0f905955fe44e2afafd4da54cb2", "score": "0.4834807", "text": "function generateBtn(arrayToUse, classToAdd, areaToAddTo) {\n\t$(areaToAddTo).empty();\n\n\tfor(let i = 0; i < arrayToUse.length; i ++) {\n\t\tlet a = $(\"<button>\");\n\t\ta.addClass(classToAdd);\n\t\ta.attr(\"data-type\", arrayToUse[i]);\n\t\ta.text(arrayToUse[i]);\n\t\t$(areaToAddTo).append(a);\n\n\t}\n}", "title": "" }, { "docid": "3d4c25a46c0ac47c87617f9da8009a0e", "score": "0.48285294", "text": "function createStringFromElements(someArray) {\n let newString = \"\";\n let element;\n for (let i = 0; i < someArray.length; i++) {\n element = someArray[i];\n if (element.length >= 2) {\n console.log(element);\n for (let j = 0; j < 2; j++) {\n newString += element[j];\n }\n }\n }\n return newString;\n}", "title": "" }, { "docid": "04de9551ce710c098441d8f8dbc9607b", "score": "0.48235327", "text": "function concatEls(array) {\n // ['a', ['b', 'd']]\n let finalString = ''; // 'abd'\n for (let i = 0; i < array.length; i++) {\n let element = array[i]; //\n // checking to see is this nested\n if (Array.isArray(element)) {\n // recursive case\n const nestedArr = element;\n // nestedConcat => 'bd'\n nestedArr = concatEls(nestedArr); // concatEls(['b', 'd'])\n finalString += nestedConcat; // \n } else {\n // base case\n finalString += element;\n }\n }\n // 'abd'\n return finalString;\n}", "title": "" }, { "docid": "9f00cf0b452475031d9dea3780cbce84", "score": "0.48223096", "text": "function addElement(type) {\n let node = document.createElement(type);\n for (let i = 1; i < arguments.length; i++) {\n let child = arguments[i];\n if (typeof child == \"string\")\n child = document.createTextNode(child);\n if (Array.isArray(child))\n child = child.join(\", \");\n node.append(child);\n }\n return node;\n}", "title": "" }, { "docid": "693bfb177962a4afeea7d660ac167270", "score": "0.4820385", "text": "function addAnnotationsToString(xmlArr, xmlDoc) {\n var annotatedText = text;\n\n //start loop at the end \n //adds formatting text without messing up the start/end count of the rest of the annotations\n for (var i = xmlArr.length - 1; i > -1; i--) {\n\n //find category for class name\n var category = xmlDoc.getNodeCategory(i);\n\n //find start, end counts to slice text\n var start = xmlDoc.getNodeCharPosition(i, 'START');\n var end = xmlDoc.getNodeCharPosition(i, 'END') + 1;\n\n var editButton = \"<br><label>Edit Category:</label><select class='edit'><option>Select An Option</option><option value='PERSON'>PERSON</option><option value='LOCATION'>LOCATION</option><option value='ORGANIZATION'>ORGANIZATION</option></select>\";\n var deleteButton = \"<button class='removeButton'>Remove</button>\";\n var insertText = \"<span class='\" + category.toLowerCase() + \"'>\" + annotatedText.slice(start, end) + \"<div class='tooltip' id='i\" + i + \"'><h4>Category: \" + category + \"</h4>\" + editButton + deleteButton + \"</div></span>\";\n\n //adds formatting, updates string so it can be appended to DOM\n annotatedText = annotatedText.substring(0, start) + insertText + annotatedText.substring((start + (end - start)), annotatedText.length + end + insertText.length);\n }\n //replaces carriage returns with br tags\n return annotatedText;\n }", "title": "" }, { "docid": "66dd584f035ea293295f1cf1d82ca245", "score": "0.48145944", "text": "makeHTML5(XML, callback, perElementFn){\n // XML is assumed to be a string\n let XML_dom = ( new DOMParser() ).parseFromString(XML, \"text/xml\");\n return this.domToHTML5(XML_dom, callback, perElementFn);\n }", "title": "" } ]
8b7dc059801bdf7b3dc59db5075be043
pop(): return & remove last item.
[ { "docid": "a202cb859a29f16e4271ac987fafd9e4", "score": "0.0", "text": "pop() {\n // nothing in list\n if (this.head === null || this.tail === null) return null;\n else if (this.head === this.tail) {\n let val = this.head.val;\n this.head = null;\n this.tail = null;\n this.length--;\n return val;\n } else {\n let current = this.head;\n while (current.next.next !== null) {\n current = current.next;\n }\n this.tail = current;\n let val = this.tail.next.val;\n this.tail.next = null;\n this.length--;\n return val;\n }\n }", "title": "" } ]
[ { "docid": "ed15cf1a48e2cd33bee338a21d010d64", "score": "0.8449444", "text": "pop() {\n const lastItem = this.data[this.length - 1];\n delete this.data[this.length - 1];\n this.length--;\n return lastItem;\n }", "title": "" }, { "docid": "17d3f75594d915629e18715c11a7a635", "score": "0.84286535", "text": "pop() {\n const lastItem = this.data[this.size - 1];\n delete this.data[this.size - 1];\n this.size--;\n return lastItem;\n }", "title": "" }, { "docid": "5e7f99c486703f114e3baa3f6f8dc8cf", "score": "0.8399656", "text": "pop(){\n const lastItem = this.data[this.length - 1]; // create reference to make return of deleted item\n delete this.data[this.length - 1];\n this.length--;\n return lastItem;\n }", "title": "" }, { "docid": "2bdab9737604f1327de5c53214154c25", "score": "0.8366178", "text": "pop() {\n const lastItem = this.data[this.index - 1]; // index was ++ while pushing the item, so to grab the item, we need to go back from ++\n delete this.data[this.index - 1];\n this.index--; // last item is removed -- so removed its index too\n return lastItem;\n }", "title": "" }, { "docid": "e76176a2494f2934b9939b65dbd34ec2", "score": "0.82157964", "text": "pop() {\n return this.removeAt(this.length - 1);\n }", "title": "" }, { "docid": "993529e8c52d92d7a95f2a9103bf065d", "score": "0.8214441", "text": "pop() {\n if ( ! this.length ) { return undefined; }\n let item = this.data[this.length - 1];\n delete this.data[this.length - 1];\n this.length--;\n return item;\n }", "title": "" }, { "docid": "9849bb46725f1e595f381847bf51b7ec", "score": "0.81799096", "text": "pop() {\n this.size--;\n return this.list.remove(0);\n }", "title": "" }, { "docid": "880f6328f03be982837191fa7b44b1a0", "score": "0.8126234", "text": "pop() {\n const last = this.getLast()\n let current = this.head;\n\n // if the list has nothing return nothing\n if(!this.head){\n return;\n }\n\n // if the list has only one item remove it from the start\n if (this.length === 1){\n return this.shift()\n }\n\n while (current.next !== last){\n current = current.next\n }\n\n current.next = null;\n this.length-- ;\n\n return last\n }", "title": "" }, { "docid": "992f7abad2a52bcaad46bcac1710bb44", "score": "0.8114185", "text": "pop() {\n let element = this._storage[this._length - 1];\n delete this._storage[this._length - 1];\n this._length--;\n return element;\n }", "title": "" }, { "docid": "2fd0740abb36cf6b94670ee80e8e80b8", "score": "0.8074517", "text": "pop () {\n return this.remove(this.length - 1)\n }", "title": "" }, { "docid": "a7158f0b028de33e58d865786cb0f5a2", "score": "0.80467045", "text": "pop() {\n if (this.isEmpty()){\n return undefined;\n }\n this.count--;\n const result = this.items[this.count];\n delete this.items[this.count];\n return result;\n }", "title": "" }, { "docid": "a0404b6f1c1af8f2997d79c3ae197953", "score": "0.8025164", "text": "pop()\n\t{\n\t\treturn this.remove(this.head);\n\t}", "title": "" }, { "docid": "72cef9b667257fa897b3fe22bcf9ff84", "score": "0.7987173", "text": "pop(){\n return this.removeAt(this.length - 1);\n }", "title": "" }, { "docid": "e3ac0957862f59077b0d94608b2bc381", "score": "0.79831725", "text": "pop() {\n return list.deleteFirst();\n }", "title": "" }, { "docid": "e780c6038a42262738da31e4da28108f", "score": "0.79596543", "text": "pop() {\n return this._list.shift();\n }", "title": "" }, { "docid": "67706c1b9cc0b54968441263b87b4ab9", "score": "0.7953861", "text": "pop() {\n if (!this.first) return null; // if no first, then can't shift.\n\n let removedTop = this.first;\n // removedTop.next = null; garbage collecting in js cleans up, b/c old first will not be used.\n if (this.first === this.last) { // only 1 element left?\n this.last = null; // set last to null to avoid it being populated w/ last item\n }\n this.first = this.first.next; // set to null or next element\n this.size--;\n return removedTop;\n }", "title": "" }, { "docid": "038400b12114d49197053f80fb253921", "score": "0.7931347", "text": "pop(){\r\n if(!this.first) return null\r\n if(this.length === 1){\r\n this.first = null;\r\n this.last = null;\r\n }else{\r\n var removed = this.first\r\n this.first = this.first.next\r\n }\r\n this.length--\r\n return removed\r\n }", "title": "" }, { "docid": "47f4cbe69a42e91e0803b63bbd5d9d52", "score": "0.7909433", "text": "pop() {\n const val = this._list.pop();\n this.first = this._list.head;\n this.last = this._list.tail;\n this.size = this._list.length;\n return val;\n }", "title": "" }, { "docid": "88e3722fe05fdbc156987f925a0716b4", "score": "0.7894734", "text": "pop() {\n if(this.count == 0) return undefined\n let deleteItem = this.items[this.count - 1]\n this.count -= 1\n console.log( deleteItem + \" removed\")\n return deleteItem\n }", "title": "" }, { "docid": "7a09a751b4c65f2c7f56b17af99aa8c1", "score": "0.7885282", "text": "pop() {\n return this.items.pop();\n }", "title": "" }, { "docid": "0e38fb72cdf7a1084866361d6975ef30", "score": "0.7882025", "text": "pop(){\n if(this.size === 0){\n return null;\n }\n var temp = this.first;\n if(this.first === this.last){\n this.last = null;\n }\n this.first = this.first.next;\n this.size --;\n return temp.val();\n }", "title": "" }, { "docid": "1887dc8809d5d263c52247a8b9fdd9bd", "score": "0.7879298", "text": "pop(){\n if (this.length === 0) return undefined;\n var current = this.head;\n var newTail = current;\n while(current.next){\n newTail = current;\n current = current.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n\n // if there is one item there is a problem because we are never setting the head and the tail to be null\n // we can do that by setting the tail and head to null when the list length is 0\n\n if(this.length === 0){\n this.tail = null;\n this.head = null;\n }\n return current;\n }", "title": "" }, { "docid": "40cf04e1c33b61726a7aa7d2acedd602", "score": "0.78779507", "text": "pop() {\n if (!this.head) {\n return null;\n }\n var removed = this.head.value;\n this.head = this.head.next;\n this.length--;\n return removed;\n }", "title": "" }, { "docid": "d1fc8c8ca2449ebc69c4f2a8523532dd", "score": "0.7871161", "text": "pop(){\n\t\tvar currentNode=this.tail.value;\n\t\tthis.tail=this.tail.prev;\n\t\tthis.tail.next=null;\n\t\tthis.length--;\n\t\treturn currentNode;\n\t}", "title": "" }, { "docid": "0532de75124b6915c76c40f9ab53f715", "score": "0.7859517", "text": "pop() {\n \n if (!this.items.length) {\n return null;\n }\n if (item === this.maxItems.peek()) {\n this.maxItems.pop();\n }\n return this.items.pop();\n }", "title": "" }, { "docid": "fe29fb5df59434a045d9f785d2712d26", "score": "0.78394204", "text": "pop() {\n const index = this.length - 1;\n const value = this.get(index);\n\n if (index >= 0) {\n // shortens array, does not include last element\n this.array = truncateArr(this.array, index);\n }\n\n return value;\n }", "title": "" }, { "docid": "d03605e9b830c5744bea3fdf4960f196", "score": "0.78163874", "text": "pop(){\n if(!this.head) return undefined;\n var current = this.head;\n var newTail = current;\n while(current.next){\n newTail = current;\n current = current.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n if(this.length === 0){\n this.head = null;\n this.tail = null;\n }\n return current;\n }", "title": "" }, { "docid": "21d5bc5a26515037e321f770e68f4fd2", "score": "0.7804591", "text": "pop() {\n if (this.size == 0) return undefined;\n let deleteItem = this.items[this.size - 1];\n this.size -= 1;\n console.log(`${deleteItem} removed `);\n return deleteItem;\n }", "title": "" }, { "docid": "54fad94375e4bf088736b1f17b7683bd", "score": "0.77876115", "text": "pop() {\r\n\t\t//if the list is empty return nothing\r\n\t\tif(!this.head) { return undefined };\r\n\t\t//set current and new tail to head\r\n\t\tlet current = this.head;\r\n\t\tlet newTail = this.head;\r\n\t\t//iterate until current.next = null to get item before tail\r\n\t\twhile(current.next) {\r\n\t\t\tnewTail = current;\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\t//set new tail with next as null\r\n\t\tthis.tail = newTail;\r\n\t\tthis.tail.next = null;\r\n\t\t//decrement the length\r\n\t\tthis.length--;\r\n\t\t//for case where there was only 1 item\r\n\t\tif(this.length === 0) {\r\n\t\t\t//set head and tail back to null\r\n\t\t\tthis.head = null;\r\n\t\t\tthis.tail = null;\r\n\t\t}\r\n\t\treturn current;\r\n\t}", "title": "" }, { "docid": "66271844d6b20484a92b4c3712466b7f", "score": "0.77829874", "text": "pop() {\n if (!this.head) return;\n let current = this.head;\n let newTail = current;\n while(current.next) {\n newTail = current;\n current = current.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n if (this.length === 0) {\n this.head = null;\n this.tail = null;\n }\n return current;\n }", "title": "" }, { "docid": "e9bb41cf6c7268a970aa54cc6c2f7b0a", "score": "0.7782041", "text": "pop() { // remove item from end of list\n let ptr;\n if (this.prev === null) return null; // list is already empty\n if (this.prev === this.next) { // one item in list\n ptr = this.prev;\n this.prev = this.next = null;\n } else {\n // more than one item on the list.\n ptr = this.prev;\n this.prev = this.prev.prev;\n this.prev.next = this;\n }\n ptr.next = ptr.prev = null;\n return ptr.value;\n }", "title": "" }, { "docid": "4a93951c0a06c1e441a3c30f5641524d", "score": "0.7766984", "text": "pop() {\n if (this.length === 0) return undefined;\n var current = this.tail;\n if (this.length === 1) {\n this.head = null;\n this.tail = null;\n } else {\n this.tail = current.next;\n this.tail = null;\n current.prev = null;\n }\n this.length--;\n return current;\n }", "title": "" }, { "docid": "35e746c80489e52d445b17f1c1c80022", "score": "0.7765646", "text": "remove() {\n return this.item.pop();\n }", "title": "" }, { "docid": "57135ffec9a6051c7d3999efb62362ba", "score": "0.7743325", "text": "pop() {\n if(!this.head) return undefined;\n var current = this.head;\n var newTail= current;\n while(current.next) {\n newTail = current;\n current = current.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n if(length == 0) {\n // Reset \n this.head = null;\n this.tail = null;\n }\n return current;\n }", "title": "" }, { "docid": "be06e4011c53209357ef12cb1ff488c6", "score": "0.7733894", "text": "remove() {\n if(this.items.length > 0) {\n return this.items.pop();\n }\n }", "title": "" }, { "docid": "e92ed56987c2c562e5a7f03c1d5b0561", "score": "0.77320486", "text": "pop() {\n return this.list.pop();\n }", "title": "" }, { "docid": "f66ce2d1de6d8cd14bb802f2bf9711d5", "score": "0.7716366", "text": "pop() {\n if (!this.first || this.size === 0) return null;\n const temp = this.first;\n if (this.size === 1) {\n this.first = null;\n this.last = null;\n } else {\n this.first = temp.next;\n }\n this.size--;\n return temp.val;\n }", "title": "" }, { "docid": "8e9360b7e13516aa6ccc8cde052e98ff", "score": "0.7709907", "text": "pop() {\n if (this.length === 0) {\n return undefined;\n }\n\n const node = this._list.tail;\n this._list.remove(node);\n\n return node.data;\n }", "title": "" }, { "docid": "b657b486132ebea724aa7aa01f78747c", "score": "0.7705467", "text": "pop() {\n if (!this.head) return undefined;\n let currentTail = this.tail;\n if (this.length === 1) {\n this.head = null;\n this.tail = null;\n } else {\n this.tail = currentTail.prev;\n this.tail.next = null;\n currentTail.prev = null;\n }\n this.length--;\n return currentTail;\n }", "title": "" }, { "docid": "b11bf2c056afcb8f8f179eba13b371ce", "score": "0.77042115", "text": "pop() {\r\n\t\t//if the list is empty return nothing\r\n\t\tif(!this.head) { return undefined };\r\n\t\tlet poppedNode = this.tail\r\n\t\t//if you are popping the last item\r\n\t\tif(this.length === 1) {\r\n\t\t\t//set head and tail back to null\r\n\t\t\tthis.head = null;\r\n\t\t\tthis.tail = null;\r\n\t\t} else {\r\n\t\t\t//otherwise set the tail to the node before poppedNode\r\n\t\t\tthis.tail = poppedNode.previous;\r\n\t\t\t//set next on the tail and previous on the popped node to null\r\n\t\t\tthis.tail.next = null;\r\n\t\t\tpoppedNode.previous = null;\r\n\t\t}\r\n\t\t//decrement\r\n\t\tthis.length--;\r\n\t\treturn poppedNode;\r\n\t}", "title": "" }, { "docid": "2d806b78a5a23102dbd5eda5f1056bb1", "score": "0.7695229", "text": "function pop(arr) {\n var temp = arr[arr.length-1];\n arr.length = arr.length -1;\n return temp;\n}", "title": "" }, { "docid": "f380a011e9325737980e918334d5a71d", "score": "0.76945364", "text": "pop () {\n let current = this.head;\n\n if (current === null) {\n return;\n } else {\n while (current.next) {\n current = current.next;\n }\n const previous = current.prev;\n previous.next = null;\n this.tail = previous;\n current.prev = null;\n }\n\n this.length -= 1;\n return current.val;\n }", "title": "" }, { "docid": "725d3937adb1ee6cdf2a3cb9f82f84e3", "score": "0.76679957", "text": "pop () {\n if (this._last) {\n let current = this._last\n\n if (this._head === this._last) {\n this._head = null\n this._last = null\n } else {\n let newLast = current.prev\n newLast.next = null\n this._last = newLast\n }\n\n this.length--\n\n return current.value\n }\n\n return undefined\n }", "title": "" }, { "docid": "756f39a3dc8f26fe9cf9a96213604cab", "score": "0.76580703", "text": "function pop(arr) {\n var value = arr[arr.length - 1];\n arr.length = arr.length - 1;\n return value;\n}", "title": "" }, { "docid": "be4ac68a6c8d267f5606ef24047e7693", "score": "0.7653781", "text": "pop() {\n const item = this.data[this.index - 1]; // index was +1 when last item was pushed, so to grab last item , index has to be -1\n delete this.data[this.index - 1]; // we can't do -- delete item -- here, bcz we wanna delete property of actual object\n this.index--; // last item is deleted, so its index is removed\n return item;\n }", "title": "" }, { "docid": "03ee90332fc56e3b4b61abb2b4432f1b", "score": "0.7646118", "text": "pop() {\n\n // If the stack is empty, return null\n // (It would also be reasonable to throw an exception)\n if (!this.items.length) {\n return null;\n }\n return this.items.pop();\n }", "title": "" }, { "docid": "03ee90332fc56e3b4b61abb2b4432f1b", "score": "0.7646118", "text": "pop() {\n\n // If the stack is empty, return null\n // (It would also be reasonable to throw an exception)\n if (!this.items.length) {\n return null;\n }\n return this.items.pop();\n }", "title": "" }, { "docid": "a1130d62757473af60177280aa5162df", "score": "0.7636392", "text": "pop() {\n let deleted = this.storage[this.length - 1]\n\n this.storage.splice(this.length - 1, 1)\n this.length--;\n\n return deleted;\n }", "title": "" }, { "docid": "ce35101eb4b0b183ab684af9c30225da", "score": "0.76286566", "text": "pop() {\n this.length -= 1;\n return this.array[this.length];\n }", "title": "" }, { "docid": "ce35101eb4b0b183ab684af9c30225da", "score": "0.76286566", "text": "pop() {\n this.length -= 1;\n return this.array[this.length];\n }", "title": "" }, { "docid": "ce35101eb4b0b183ab684af9c30225da", "score": "0.76286566", "text": "pop() {\n this.length -= 1;\n return this.array[this.length];\n }", "title": "" }, { "docid": "2d2cb3cc458826b46b0144dc748f9095", "score": "0.762619", "text": "pop(){\n if(!this.head) return undefined;\n let current = this.head;\n let newTail = current;\n while(current.next){\n newTail = current;\n current = current.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n if(this.length === 0){\n this.head = null;\n this.tail = null;\n }\n return current;\n }", "title": "" }, { "docid": "12ceaa299a75a40bba0f562c6fe8ca54", "score": "0.76186436", "text": "pop() {\n // save item to return\n const item = this.first.item;\n \n // delete first node\n this.first = this.first.next;\n\n // return saved item\n return item;\n }", "title": "" }, { "docid": "3e272dc17db187e6139681d2e6a0b010", "score": "0.76182747", "text": "pop() {\n if(this.head === null){\n return undefined;\n } else {\n var current = this.head;\n var newTail = current;\n while (current.next){\n newTail = current;\n current = current.next;\n }\n\n newTail.next = null;\n this.tail = newTail;\n this.length--;\n if(this.length === 0){\n this.head = null;\n this.tail = null;\n }\n return current;\n }\n }", "title": "" }, { "docid": "e9747c4a6f1e48fedcd50da80950fb83", "score": "0.7617689", "text": "pop() {\n if (!this.head) return undefined;\n else {\n let current = this.head;\n let newTail = current;\n\n while (current.next) {\n newTail = current;\n current = current.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n if (this.length === 0) {\n this.head = null;\n this.tail = null;\n }\n return current;\n }\n }", "title": "" }, { "docid": "6b5f933dfe2c02916a749bb71e821818", "score": "0.75978655", "text": "function pop(arr) { arr.pop(); }", "title": "" }, { "docid": "7f292219b017b6c265f6823f118be553", "score": "0.75884545", "text": "pop() {\n if(this.count === 0) {\n return undefined;\n }\n\n this.count--;\n const result = this.storage[this.count];\n delete this.storage[this.count];\n return result;\n }", "title": "" }, { "docid": "4a1a0e8ff814e9b58880c0d0aeb51705", "score": "0.7581467", "text": "pop(){\n if(this.size <= 0) return null;\n var removedNode = this.first;\n if(this.size === 1){\n this.first = null;\n this.last = null;\n } else {\n this.first = removedNode.next;\n }\n removedNode.next = null;\n this.size--;\n return removedNode.val; \n }", "title": "" }, { "docid": "ca0e6800eb53f9f605458ba16aee02f2", "score": "0.7576743", "text": "pop() {\n let a = this._v._inner[this._v.count - 1];\n this._v.removeAt(this._v.count - 1);\n a = this._f(a);\n return a;\n }", "title": "" }, { "docid": "5143adf7bcbe2c5eb0ffc465c60fa1f5", "score": "0.75760037", "text": "pop() {\n if (this.length === 0) return undefined;\n const temp = this.top;\n this.top = this.top.next;\n temp.next = null;\n this.length--;\n return temp;\n }", "title": "" }, { "docid": "7cb6d48dffd30b3470d6366e35502721", "score": "0.7566533", "text": "pop(){\n\t\tif(this.curSet == 0 && this.set[this.curSet].length==0){\n\t\t\treturn null;\n\t\t}\n\t\tif(this.curSet > 0 && this.set[this.curSet].length==0){\n\t\t\tthis.curSet-=1;\n\t\t}\n\t\treturn this.set[this.curSet].pop();\n\n\t}", "title": "" }, { "docid": "012e2fa996a57dec9758f06f61bc933c", "score": "0.7564454", "text": "pop() {\n assert(this.size > 0);\n\n const value = this.head.value;\n if (this.head === this.tail) {\n this.head = null;\n this.tail = null;\n } else {\n this.head = this.head.next;\n }\n\n this.size = this.size - 1;\n return value;\n }", "title": "" }, { "docid": "637a04301d3c5783ecc5b26b496bbaad", "score": "0.7560644", "text": "pop() {\n const deleteItem = this.items[this.count - 1];\n console.log(\n `Element ${this.items[this.count - 1]} is removed from position ${\n this.count - 1\n }`\n );\n this.count--;\n return deleteItem;\n }", "title": "" }, { "docid": "6a700c1e2d19a7b6fd260f8f122c9d52", "score": "0.7546968", "text": "pop() {\n let current = this;\n let previous = null;\n while(current.next !== null) {\n previous = current;\n current = current.next;\n }\n previous.next = null;\n\n return current;\n }", "title": "" }, { "docid": "8a613db32bb34a2ca0fb6079343adc95", "score": "0.7538207", "text": "pop() {\n if (!this.head) return undefined;\n let currentNode = this.head;\n let oldTailVal = this.tail;\n\n if (this.length === 1) {\n this.head = this.tail = null;\n } else {\n while (currentNode.next.next !== null) {\n currentNode = currentNode.next;\n }\n currentNode.next = null;\n this.tail = currentNode;\n }\n this.length--;\n return oldTailVal;\n }", "title": "" }, { "docid": "7d97b84c0bf75883c01116307782eec8", "score": "0.75330555", "text": "pop() {\n if (!this.head) return null\n let removed = this.head\n if (this.length === 1) {\n this.head = null\n this.tail = null\n } else {\n // 1 --> 2 --> 3 --> 4\n // 2 --> 3 --> 4\n this.head = removed.next\n removed.next = null\n }\n this.length--\n return removed\n }", "title": "" }, { "docid": "0e16bc1ea9de9958d949d97c1233c335", "score": "0.75285345", "text": "pop() {\n if(this.tail) {\n this.length--;\n if(this.tail.prev) {\n let previousTail = this.tail;\n this.tail.prev.next = null\n this.tail = this.tail.prev;\n return previousTail\n }\n this.tail = null;\n this.head = null;\n }\n return null\n }", "title": "" }, { "docid": "e1ed0d56b6b5d5e742a8d86c74d1541c", "score": "0.7527823", "text": "pop(){\n // null check on head\n if(!this.head) return undefined;\n\n // set current and prev element to the head\n let current = this.head;\n let prev = current;\n\n // Loop until the end of the LL has been reached\n while(current.next){\n prev = current;\n current = current.next;\n }\n\n // Reasign LL's Tail to the second last item, instead of last item\n this.tail = prev;\n // After reassigning, remove the next from the last item\n this.tail.next = null;\n\n // decrement the length by 1\n this.length--;\n\n // check if only one element was there in the list\n if(this.length === 0){\n // If yes, then reset both the head and tail to nulll\n this.head = null;\n this.tail = null;\n }\n return current;\n\n }", "title": "" }, { "docid": "c855ba1dda54ac37b2d1307f8290cb96", "score": "0.75235385", "text": "pop() {\n \n delete this.data[this.length-1];\n this.length--;\n return this.length;\n }", "title": "" }, { "docid": "8af5b9b63cef4841a1e1666d910edf79", "score": "0.7519043", "text": "pop(){\n if(!this.head){\n return undefined\n }\n let currentNode = this.head\n let pre = currentNode\n while(currentNode.next){\n pre = currentNode\n currentNode = currentNode.next\n }\n this.tail = pre\n this.tail.next = null\n this.length--\n if(this.length == 0){\n this.head = null\n this.tail = null\n }\n // special case, if only 1 item b/c we never set head tial to be null\n return currentNode\n\n\n }", "title": "" }, { "docid": "1dbf3626fb20c54fa589bee21bfd7fe9", "score": "0.75131214", "text": "pop() {\n var val = this.peek();\n this.data[this.count - 1] = undefined;\n this.count--;\n\n return val;\n }", "title": "" }, { "docid": "7ad8408434c7a3935175a6008fcac5a4", "score": "0.749645", "text": "pop() {\n if (!this.length) {\n return undefined;\n }\n let poppedTail = this.tail;\n if (this.length === 1) {\n this.head = null;\n this.tail = null;\n } else {\n this.tail = poppedTail.prev;\n this.tail.next = null;\n poppedTail.prev = null;\n }\n this.length--;\n return poppedTail;\n }", "title": "" }, { "docid": "62081e66716be110192cdd753dbb88a1", "score": "0.7481349", "text": "_pop() {\n let temp = this.head;\n \n if(temp){\n this.head = this.head.next;\n\n this.length--;\n return temp.value;\n }\n\n return null;\n }", "title": "" }, { "docid": "586ac8ade432b425d19c460644511504", "score": "0.7471329", "text": "pop() {\n if (!this.isSorted && this.autoSort) {\n this.sort();\n } // remove last element;\n\n\n if (this.length > 0) {\n var el = this.get(-1);\n\n this._elements.pop();\n\n this._offsetDict.delete(el);\n\n el.sites.remove(this);\n this.coreElementsChanged({\n clearIsSorted: false\n });\n return el;\n } else {\n return undefined;\n }\n }", "title": "" }, { "docid": "dd82289cd381746edfefba9b56602c97", "score": "0.745728", "text": "pop(){\n if (this.length === 0){\n return undefined\n }\n let current = this.head\n let newTail;\n while (current.next){\n newTail = current\n current = current.next\n }\n newTail.next = null;\n this.tail = newTail;\n this.length--;\n // special case, where the list only has one element, that you pop \n // otherwise the head and tail will still be set to that element, even though it's been removed and list is empty\n if (this.length === 0){\n this.head = null;\n this.tail = null\n }\n return current;\n \n }", "title": "" }, { "docid": "32a45be4b8e8f92ec743e54bc2826124", "score": "0.7446353", "text": "pop() {\n let current = this.head;\n let previous \n\n if (this.length === 0) {\n return null;\n }\n\n if (this.length === 1) {\n let last = this.head;\n this.head = null;\n this.next = null;\n this.length -= 1;\n return last;\n }\n\n while (current.next !== null) {\n previous = current;\n current = current.next;\n }\n previous.next = null;\n this.length -= 1;\n return current;\n }", "title": "" }, { "docid": "a5b507fee728e343ee6e6cc2c1d928c4", "score": "0.7443009", "text": "removeBack(){\n if(this.isEmpty()){\n return undefined;\n }\n this.count--;\n const result = this.items[this.count];\n delete this.items[this.count];\n return result;\n }", "title": "" }, { "docid": "8a755c0488ad0f595aee44001e094d8f", "score": "0.74346924", "text": "function getLastItem(arr) {\r\n return arr.pop();\r\n}", "title": "" }, { "docid": "84db984e5231385e0bf3c851f0ab244f", "score": "0.74288905", "text": "function getLastItem(arr) {\n return arr.pop();\n}", "title": "" }, { "docid": "2c6a6b4bd73a1c39ba587d04171cafcd", "score": "0.74285656", "text": "function pop(arr) {\n return arr.slice(arr, arr.length - 1);\n}", "title": "" }, { "docid": "631fa03437c94609c169f362a1543b84", "score": "0.74190354", "text": "pop() {\n if(this.isEmpty()) return undefined;\n\n const temp = this.tail;\n\n let listLength = this.length - 2;\n\n this.length --;\n \n if(listLength === -1) {\n this.head = null;\n this.tail = null;\n\n return temp;\n }\n\n let current = this.head;\n\n while(listLength--) {\n current = current.next;\n }\n\n current.next = null;\n\n this.tail = current;\n\n return temp;\n }", "title": "" }, { "docid": "1c29e39f9b431a91e66b5c9d7cb1b275", "score": "0.739819", "text": "function pop(list) {\n return list.slice(0, list.length - 1);\n}", "title": "" }, { "docid": "69610ea09641604ba851c126b01e76a5", "score": "0.7390298", "text": "pop() {\n if (!this.head) {\n return;\n } else if (this.head == this.tail) {\n this.head = this.tail = null;\n this.length = 0;\n return;\n }\n let secondLastNode = null;\n let currentNode = this.head;\n while (currentNode != this.tail) {\n secondLastNode = currentNode;\n currentNode = currentNode.next;\n }\n const temp = this.tail;\n secondLastNode.next = null;\n this.tail = secondLastNode;\n this.length -= 1;\n return temp;\n }", "title": "" }, { "docid": "5fd8de4498a2a5675897e9c59b7c4808", "score": "0.7387122", "text": "deleteLast() {\n // removing element from the queue \n // returns underflow when called \n // on empty queue \n if (this.isEmpty())\n return \"Underflow\";\n return this.items.pop();\n }", "title": "" }, { "docid": "e72a08abf5dd2dbd42676d9e33195f06", "score": "0.73861814", "text": "pop(){\n //checking if the list is empty and there's nothing to remove\n if(!this.head) return null;\n let temp = this.head //to keep track of the current value\n let newTail = temp; \n while(temp.next){\n newTail = temp;\n temp = temp.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n //checking when the list is empty\n if(this.length === 0){\n this.head = null;\n this.tail = null;\n }\n return temp;\n }", "title": "" }, { "docid": "37342cf1566031c69ea2ae7de6dc46be", "score": "0.73851126", "text": "pop() {\n if (this.head === null || this.length === 0) {\n return undefined;\n }\n let tailToBeRemoved = this.tail;\n if (this.length === 1) {\n this.head = null;\n this.tail = null;\n } else {\n this.tail = tailToBeRemoved.prev;\n this.tail.next = null;\n tailToBeRemoved.prev = null; // old tail previous should be removed so that there is no connection at all\n }\n this.length--;\n return tailToBeRemoved;\n }", "title": "" }, { "docid": "c03aab2ddd0e417263e19b268ddd538d", "score": "0.73557514", "text": "pop() {\r\n\t\tthis.set.delete(this.stack.pop());\r\n\t}", "title": "" }, { "docid": "a74f062b9d6330ace7a367492e5ccfc1", "score": "0.7351397", "text": "pop(){\n if (this.end == null || this.start == null){\n return null\n }else if (this.end == this.start){\n this.length = 0;\n let temp = this.end;\n this.end = null;\n this.start = null;\n return temp;\n }else{\n this.length --;\n let oldl = this.end;\n let newl = this.end.last\n oldl.break();\n this.end = newl;\n return oldl\n }\n this.update();\n }", "title": "" }, { "docid": "8891ea3b9936c836877a15d814d01ca3", "score": "0.7323415", "text": "pop(){\n //store the current tail\n let nodetoremove = this.tail;\n //if list is empty return undefine\n if(this.length===0)return undefined;\n //if list have only one element then set head and tail to null\n if(this.length==1){\n this.head=null;\n this.tail=null;\n }else{\n //update tail to last node's previous node { which is node-to-remove's previous nodes } \n this.tail=nodetoremove.prev;//this becomes current code\n //set current tail's next to null\n this.tail.next=null;\n //set node-to-remove {which is old tail} to null \n nodetoremove.prev=null;\n }\n //decreament the length and return the old tail's value\n this.length--;\n return nodetoremove.val\n }", "title": "" }, { "docid": "73642cd8d4099973692d8099b0817c8c", "score": "0.7319952", "text": "pop() {\n if (!this.head) return undefined;\n let current = this.head;\n let newTail = current;\n while (current.next) {\n newTail = current;\n current = current.next;\n }\n this.tail = newTail;\n this.tail.next = null;\n this.length--;\n if (this.length === 0) {\n this.head = null;\n this.tail = null;\n }\n return current;\n // console.log(current.val);\n // console.log(newTail.val);\n }", "title": "" }, { "docid": "435485b24847ba159a546e66adb70f90", "score": "0.7319247", "text": "pop() {\n if (!this.head) return null;\n\n const temp = this.head;\n if (this.head === this.tail) {\n this.tail = null;\n }\n\n this.head = this.head.next;\n this.count--;\n\n return temp.value;\n }", "title": "" }, { "docid": "8d03e070102d5d6cf46ce6fa94ab083c", "score": "0.7313602", "text": "pop() {\n if (this.isEmpty()) {\n return 'Stack Underflow';\n }\n const lastItemIdx = this.size - 1; //descubro o idx do ultimo item \n const lastItem = this.stackControl.splice(lastItemIdx,1)[0]; //vejo qual é o ultimo item do meu array e retiro...[0] é pra eu ver qual é o item removido -splice retorna array, o idx 0 vai ser o que eu removi-\n this.size -= 1;\n return lastItem;\n //isso tudo pra não sar o .pop -.-\"\n }", "title": "" }, { "docid": "6a9eba1549295fe09cd7c84fc7d1f52a", "score": "0.730988", "text": "pop(){\n return this.items.pop();\n }", "title": "" }, { "docid": "03a7b00729161b176ee8596c747474a6", "score": "0.7305301", "text": "remove() {\n // move everything into temp stack\n while (this.queueStack.peek() !== undefined) {\n this.tempStack.push(this.queueStack.pop())\n };\n //then pop off the last value and store in var\n let dequeuedItem = this.tempStack.pop()\n // put items back into queue stack\n while (this.tempStack.peek() !== undefined) {\n this.queueStack.push(this.tempStack.pop())\n };\n // finally, return the dequeued item\n return dequeuedItem;\n }", "title": "" }, { "docid": "9bd6d57f98a539b1ccb0afc8da475132", "score": "0.7296372", "text": "pop() {\n let curr = this.head;\n let returnValue = curr.value;\n if (this.length === 1) {\n this.head = null;\n this.tail = null;\n }\n if (this.length > 0) {\n while (curr.next) {\n if (curr.next.next === null) {\n returnValue = curr.next.value;\n curr.next = null;\n this.tail = curr;\n } else {\n curr = curr.next;\n }\n }\n } else {\n return 'Nothing to pop.'\n }\n this.length--;\n return returnValue;\n }", "title": "" }, { "docid": "9c9035791819eefcd21108038d00313c", "score": "0.728682", "text": "pop() {\n return this.data.pop();\n }", "title": "" }, { "docid": "c90ac066d6a3bb7ab7bcface73bda4e5", "score": "0.7272317", "text": "pop() {\n if (this.isEmpty()) {\n throw new RangeError('Ring buffer is empty.');\n }\n this.end = this.wrap(this.end - 1);\n const result = this.get(this.end);\n this.set(this.end, undefined);\n return result;\n }", "title": "" }, { "docid": "ecf52946fca2dc2d26b2a920e812d2fc", "score": "0.7270918", "text": "function removeLast(arr) {\n arr.pop();\n}", "title": "" }, { "docid": "34661a4f7818ab72e7cd3a70d6f9a555", "score": "0.7266991", "text": "removeBack(){\n if (this.isEmpty()){\n return console.log(\"Dequeue is Empty\");\n }\n const dequeueLength = Object.values(this.items).length;\n delete this.items[dequeueLength-1];\n return this.items;\n }", "title": "" }, { "docid": "790472023cffabbae05839532e3009f8", "score": "0.7265402", "text": "pop() {\n if (this.length === 0) return new Error('Cannot remove element from empty list');\n\n let currentNode = this.head;\n\n if (currentNode.next === null) {\n this.head = null;\n this.tail = null;\n this.length--;\n return currentNode.val;\n }\n\n while (currentNode) {\n const nextNode = currentNode.next;\n\n if (nextNode.next === null) {\n this.tail = currentNode;\n currentNode.next = null;\n this.length--;\n return nextNode.val;\n }\n currentNode = nextNode;\n }\n }", "title": "" }, { "docid": "8a2b47e3ef9eae622912efc612099b7c", "score": "0.72644335", "text": "pop() {\n if (this.length == 0) {\n throw new Error('Index error');\n }\n const value = Memory.get(this.ptr + this.length - 1);\n this.length--;\n return value;\n }", "title": "" } ]
aa53177cc8183db50d91e0d042c50a17
Regions in database are stored as coordinates, but without comma or point this function get coordinates without comma or point and return LatLon
[ { "docid": "2c9f40c2bc7ec380a4e45d007e6d9562", "score": "0.71931124", "text": "function getLatLon(region) {\r\n /* \r\n Regions stored in data base have 4 values separated with spaces \r\n Example: 47 60 26 23 is the region that includes all coordinates between:\r\n [47.6000, 26.2300] - [47.6999, 26.2399] \r\n */\r\n let split = region.split(\" \");\r\n if (split.length != 4 || !isNumber(split)) return null;\r\n /* Rebuild region coordinates - string to LatLng class */\r\n let lat = parseFloat(split[0] + \".\" + split[1]);\r\n let lon = parseFloat(split[2] + \".\" + split[3]);\r\n return new google.maps.LatLng(lat, lon);\r\n}", "title": "" } ]
[ { "docid": "5d27b77af78068c5c6ad6b40e7b1bbdb", "score": "0.65385854", "text": "function splitGeo(data){\n parts = data.trim().split(\",\");\n if (parts.length == 2) {\n return [parseFloat(parts[0]), parseFloat(parts[1])];\n }\n console.error(\"Couldn't split the geo into lat and long\");\n return null;\n}", "title": "" }, { "docid": "43d688f42ec829dac29e0216426cbc61", "score": "0.6246284", "text": "function getCoordinates(value){\n var cor = new Array();\n cor= value.split(',');\n //return mapboxgl.LngLat(cor[0],cor[1]);\n return cor;\n}", "title": "" }, { "docid": "25d7c69bca63601cca036db7b4fa21d6", "score": "0.61861265", "text": "getCoordinates() {\r\n\t\tif (this.getLatLng) {\r\n\t\t\treturn [structuredClone(this.getLatLng())];\r\n\t\t} else if (this.getLatLngs) {\r\n\t\t\tlet latLngs = structuredClone(this.getLatLngs());\r\n\t\t\treturn (latLngs.length > 1) ? latLngs : latLngs[0];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d2479832481146af734d2d212f29410e", "score": "0.60559946", "text": "function extracts_lat_lon(lat_lon)\n {\n var lat_lon_regex = /POINT \\((.*)\\)/;\n var lat_lon_array_with_space = lat_lon.match(lat_lon_regex); // puts the match into an array\n var lat_lon_array = lat_lon_array_with_space[1].split(/\\s/); // removes the space between the two coordinates and puts the two results in an array (the first element is the raw data)\n var current_occurrence_lat = lat_lon_array[0];\n var current_occurrence_lon = lat_lon_array[1];\n\n return new L.LatLng(current_occurrence_lat, current_occurrence_lon);\n }", "title": "" }, { "docid": "60dd0314ab82e58937ecbec7b69820a5", "score": "0.6013309", "text": "getLatLonCoords() {\n // TODO: The projection should be stored in the store,\n // and defined by the user.\n const mapProj = new proj.get(\"EPSG:3857\");\n const latlonProj = new proj.get(\"EPSG:4326\");\n\n // transform the point\n return proj.transform(this.props.coords, mapProj, latlonProj);\n }", "title": "" }, { "docid": "d86506e7441477102b9cf01a0756c857", "score": "0.59642845", "text": "function getLatLngFromString(location) {\n let latlng = location.replace(/[()]/g, '').split(',');\n //locate = new google.maps.LatLng(parseFloat(latlng[0]) , parseFloat(latlng[1])); return locate; \n return latlng.map(e => parseFloat(e));\n}", "title": "" }, { "docid": "c3b62f04c778d86736565abaaa5f694e", "score": "0.58596003", "text": "function getAllGeocoordinates() {\n var loc = [];\n var isdAs;\n for (isdAs in self.jLoc) {\n var ifNum = isdAs.split('-');\n if (self.jLoc.hasOwnProperty(isdAs)) {\n var coord = [ latlong[self.jLoc[isdAs]][0],\n latlong[self.jLoc[isdAs]][1] ];\n loc.push(coord);\n }\n }\n console.log('all coordinates', loc);\n return loc;\n}", "title": "" }, { "docid": "c4d8c6ec753347dd5ebd9f07b51fa509", "score": "0.581158", "text": "function parseLatlng(str) {\n var len = str.length\n var comma = str.indexOf(\",\")\n var lat = str.substring(1, comma)\n var lon = str.substring(comma+2, len)\n return [parseFloat(lat), parseFloat(lon)]\n}", "title": "" }, { "docid": "b6b3fad2314ee0c42bc963868f0505de", "score": "0.5771207", "text": "function getCoords(data) {\r\n\t//Declare original values\r\n\tvar minLat = data[0]['longitude'];\r\n\tvar minLong = data[0]['latitude'];\r\n\tvar maxLat = data[0]['longitude'];\r\n\tvar maxLong = data[0]['latitude'];\r\n\r\n\t//Loop through to find values\r\n\t//Ugly af, sorry\r\n\tfor (x in data) {\r\n\t\tif ((data[x]['longitude'] != null) && (data[x]['latitude'] != null)) {\r\n\t\t\tif (minLat > data[x]['longitude']) {\r\n\t\t\t\tminLat = data[x]['longitude'];\r\n\t\t\t}\r\n\t\t\tif (minLong > data[x]['latitude']) {\r\n\t\t\t\tminLong = data[x]['latitude'];\r\n\t\t\t}\r\n\t\t\tif (maxLat < data[x]['longitude']) {\r\n\t\t\t\tmaxLat = data[x]['longitude'];\r\n\t\t\t}\r\n\t\t\tif (maxLong < data[x]['latitude']) {\r\n\t\t\t\tmaxLong = data[x]['latitude'];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//Add buffer\r\n\tminLat = minLat - 0.1;\r\n\tminLong = minLong - 0.1;\r\n\tmaxLat = maxLat + 0.1;\r\n\tmaxLong = maxLong + 0.1;\r\n\r\n\t//Print\r\n\tconsole.log(minLat);\r\n\tconsole.log(minLong);\r\n\tconsole.log(maxLat);\r\n\tconsole.log(maxLong);\r\n\r\n\t//Set new values\r\n\tmapBounds = [\r\n\t\t[minLat, minLong], //Southwest\r\n\t\t[maxLat, maxLong] //Northeast\r\n\t]\r\n\r\n\t//Return value\r\n\t//return mapBounds;\r\n}", "title": "" }, { "docid": "678fb4fda47c6b47b35e34e72c533282", "score": "0.57602036", "text": "function makeDbinfo(region, index){\n var area = region.areas[index];\n return area.min_latitude.toFixed(1) + ',' +\n area.max_latitude.toFixed(1) + ',' +\n area.min_longitude.toFixed(1) + ',' +\n area.max_longitude.toFixed(1);\n}", "title": "" }, { "docid": "83a97ac0dfa4e31ad27cf8b3f764134f", "score": "0.5749696", "text": "function getCoords()\n{\n var address = document.getElementById('loc').value; \n geocoder.geocode({ 'address': address }, function (results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n var s_tring = (results[0].geometry.location).toString(); // stoes google lat and log values\n var remove = s_tring.substr(1, (s_tring.length - 2)); // remove brackets from coordinates \n var lat = remove.split(\",\"); // splits coordinates in two, [0] = the lat, [1] = long\n Lat_array.push(lat[0]); // stores value to array\n Ling_array.push(lat[1]); // stores value to array\n\n } else {\n alert(\"Geocode was not successful for the following reason: \" + status);\n }\n setMarker(lat[0].lat[1]); // sets marker at lat and long location \n });\n\n}", "title": "" }, { "docid": "3722a9ea0c6743f54f27aeda538e2dc8", "score": "0.5744552", "text": "function get_coordinates_from_text(text){\n return text.split('\\n')\n .filter(c=>c.trim())\n .map(c=>{\n let [lon,lat] = c.split(',').slice(0,2).map(o=>Number(o.trim()));\n return [lat,lon];\n })\n \n}", "title": "" }, { "docid": "9ac8415b182623b0f8f5c38389e7e14d", "score": "0.5734165", "text": "function point(coordenadas){//coordenadas [1231,123123]\n final = [ ];\n for (var i = 0; i < coordenadas.length; i++) {\n var punto = ol.proj.transform(coordenadas[i], 'EPSG:4326', 'EPSG:3857'); \n final.push(punto);\n }\n return final;\n}", "title": "" }, { "docid": "c93c6d1148929882fa4030353aff8af5", "score": "0.5700914", "text": "function toLatLng(geo_loc){\n //var array = \"45 -73\".split(\" \").map(element => +element); //returns [45, -73]\n var array = geo_loc.split(\" \")\n .map(element => +element);\n \n var latLng = { lat: array[0], lng: array[1]};\n return latLng;\n}", "title": "" }, { "docid": "805c77f027f681975f29720f8bd95f82", "score": "0.56926435", "text": "function getCoordinates(dirtyCoordinates) {\n \n // Create empty array\n const coordinatesArray = [];\n\n for (const coor in dirtyCoordinates) {\n \n // Check if the coordinates are in a 'Degree, Minutes, Seconds'-format\n // Then: Replace the quotes and degrees by using .replace\n // RegEx code adapted from: https://stackoverflow.com/questions/7760262/replace-both-double-and-single-quotes-in-javascript-string\n if (dirtyCoordinates[coor].includes(\"'\")) {\n const schoner = dirtyCoordinates[coor]\n .replace(/[\"en]+/g, \"\")\n .replace(/[°']+/g, \" \")\n .split(\" \");\n const dms = schoner.map(a => parseFloat(a)); \n coordinatesArray.push(convertDMS2DD(dms[0], dms[1], dms[2], dms[3], dms[4], dms[5])); // Convert to lat/long\n }\n // Check if the remaining coordinates are longer than 10 characters, they don't contain any letters (using test()) and it includes a space.\n // Letter checking code adapted from: https://stackoverflow.com/questions/23476532/check-if-string-contains-only-letters-in-javascript/23476587\n // Extra information about test() used from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test\n else if (dirtyCoordinates[coor].length > 10 && /[a-z]+/g.test(dirtyCoordinates[coor]) == false && dirtyCoordinates[coor].includes(\" \")) {\n const schoner = dirtyCoordinates[coor]\n .replace(/[()]+/g, \"\");\n const output = schoner.split(\". \");\n const object = {lat: output[0], long: output[1]};\n coordinatesArray.push(object);\n }\n }\n return coordinatesArray; \n}", "title": "" }, { "docid": "d3f6b294158f2b03f8a485117ed1d759", "score": "0.56851137", "text": "function getLatLng(data) {\n const coordinates = data[0].split(',');\n return new google.maps.LatLng(coordinates[0], coordinates[1]);\n }", "title": "" }, { "docid": "ea60b0d372849275f53db4340883f103", "score": "0.5680799", "text": "_defaultCoordinates() {\n return capstone_args.map_default_location.split(',').map(function (point) {\n return Number(point);\n });\n }", "title": "" }, { "docid": "0e7b75c27256e853ee6550605cdac1d2", "score": "0.5618669", "text": "function getLatLonByAddress(address)\r\n{\r\n var DestinationAddress = address;\r\n var endLat;\r\n var endLng; \r\n geocoder = new google.maps.Geocoder();\r\n geocoder.geocode({\r\n 'address': DestinationAddress\r\n }, function(results, status) { \r\n console.log(results[0].geometry.location.lat());\r\n endLat=results[0].geometry.location.lat(); \r\n endLng=results[0].geometry.location.lng(); \r\n });\r\n\r\n console.log(\"rnt \"+endLat+\",\"+endLng);\r\n return (endLat+\",\"+endLng);\r\n}", "title": "" }, { "docid": "4b074b7a4d1730bb21f781b9bd002774", "score": "0.5609869", "text": "function nodeCoords(node) { \n var lon = parseFloat(node.Lon), lat = parseFloat(node.Lat);\n if (isNaN(lon) || isNaN(lat)) return null;\n return [lon, lat]; \n }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "ec3439c20b8201d32ca586917ec9ceab", "score": "0.55966794", "text": "function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); }", "title": "" }, { "docid": "fcaae6aaaf24362aa12fb5c187a636be", "score": "0.55876315", "text": "function getCoords(areaTags) {\n if (!areaTags || !areaTags.length) return\n return map(areaTags, function(tag) {\n var coords = tag.getAttribute('coords')\n if (coords)\n return map(coords.split(','), function(val) { return parseInt(val) })\n })\n }", "title": "" }, { "docid": "7851e75bdcb8d5233a3a674f787a3508", "score": "0.558578", "text": "function extractCoordinates(str) {\r\n strArr= str.split('');\r\n // console.log(\"coordinates 0 => \", strArr);\r\n strArr = strArr.filter((_)=> {\r\n if(_ !== '(' && _!== ')' && _!== ' ') {\r\n return _;\r\n }\r\n });\r\n // console.log(\"coordinates 1 => \", strArr);\r\n return strArr;\r\n }", "title": "" }, { "docid": "f7424384cb79fcce7e0a1db0b0655f5d", "score": "0.55750924", "text": "function getBounds(data) {\n var latLngArray = [];\n var dataRows = data.replace(/\\s/g, '').split(\";\");\n// if (dataRows.length > (pltNum + 1)) {\n// startingIndex = dataRows.length - (pltNum + 1)\n// } else {\n var startingIndex = 0;\n// }\n for (var i = startingIndex, l = dataRows.length - 1; i < l; i++) {\n var dataComponents = dataRows[i].split(\",\");\n var lat = dataComponents[1];\n var lon = dataComponents[2];\n var arr = new Array([lat, lon]);\n if (checkifNaN(lat) != \"Unknown\" && checkifNaN(lon) != \"Unknown\") {\n latLngArray.push(arr);\n }\n }\nreturn latLngArray ;\n}", "title": "" }, { "docid": "1a1cffa5bfd32b8d7a26450a3c1f7673", "score": "0.5536071", "text": "function getLatLng(point){\n var result;\n //just extracts the coordinates from the parenthesis:\n var matches = point.match(/\\((.+?)\\)/);\n if (matches) {\n result = matches[1].split(\" \");\n }\n\n return result;\n}", "title": "" }, { "docid": "cb062767cfbcaf481d75f2dad7dbdc76", "score": "0.5515184", "text": "function getSSOLatLng(feature){\n if (feature.geometry.coordinates[0].length > 1){\n findMidpoint(feature.geometry.coordinates[0], feature.geometry.coordinates[1]);\n }\n else{\n $('#coords', init.formframe).text(feature.geometry.coordinates[0] + ', ' + feature.geometry.coordinates[1]);\n }\n}", "title": "" }, { "docid": "173a6c875e4f01398511b001445889dd", "score": "0.551048", "text": "function get_google_coordinates(location, latID, longID){\n\t_addressToGeoCode = location;\n\t_latID = latID;\n\t_longID = longID;\n\tif(!location){\n\t\t//alert('nothing entered');\n\t\tclearCoordinateFields();\n\t}\n \t_geocoder.getLocations(_addressToGeoCode, foundLocation);\n\t\n}", "title": "" }, { "docid": "f616e03a38c3def92c4994b7f487dc20", "score": "0.5499184", "text": "function pointToGeo(point) {\r\n return { longitude: point[0], latitude: point[1] };\r\n}", "title": "" }, { "docid": "311ce18f9adcb16e6e5270c0ad6e3438", "score": "0.54991806", "text": "static fromLatLngs(lls) {\n function allIdsEqual(lls, level) {\n let first = Cell.fromLatLng(lls[0], level);\n\n for(let i = 1; i < lls.length; i++) {\n const id2 = Cell.fromLatLng(lls[i], level).id;\n if(first.id !== id2)\n return false;\n }\n\n return first;\n }\n\n for(let level = MAX_LEVEL; level > 0; level--) {\n const cell = allIdsEqual(lls, level);\n if(cell !== false) {\n return cell;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "efcf94a9ba39f47279735cd83299423e", "score": "0.5486589", "text": "function parseCoordinate(s)\n{\n if (typeof s === 'string') {\n if (s.length != 2) {\n console.log('Error: data-made must have two integers', s);\n return null;\n }\n const ix = parseInt(s[0]);\n const iy = parseInt(s[1]);\n\n if (ix && iy) return [ix, iy];\n }\n\n return null;\n}", "title": "" }, { "docid": "8412965d19cca06c86373ec8b5d1625e", "score": "0.5479666", "text": "function obtCoordenasPuntoEnMapa(){ \n // posicion marcador origen\n var lat = marcadorEnMapa.getPosition().lat();\n var lng = marcadorEnMapa.getPosition().lng();\n latLng = lat+','+lng;\n //Este cambia dependiendo de la posición\n idGrid = $(\"#idGrid\").val();\n //console.log(idGrid);\n if(idGrid==\"origen\"){\n //$(\"#OrigenesPorProveedorGrid_mt_nr_OrigenesPorProveedorGrid_mt_c6_input\").val(latLng);\n //Se reemplazo porque en el servidor de 3cmaquinaria no funciona el grid para actualizar y agregar un origen\n $(\"#coordenadaText\").val(latLng);\n }\n if(idGrid==\"destino\"){\n $(\"#DestinosPorClienteGrid_mt_nr_DestinosPorClienteGrid_mt_c6_input\").val(latLng);\n }\n if(idGrid==\"obras_cat\"){\n $(\"#obrasGrid_mt_nr_obrasGrid_mt_c8_input\").val(latLng);\n //$(\"#obrasGrid_mt_nr_obrasGrid_mt_c4_input\").val(latLng); \n }\n idRowTmpEdit = $(\"#idRowTmp\").val();\n // console.log(idRowTmpEdit);\n $(\"#\"+idRowTmpEdit).val(latLng);\n}", "title": "" }, { "docid": "e95e9157a83737349177443e445969b8", "score": "0.54790676", "text": "async getCoordinates({ br, km }) {\n try {\n const vgeo = new Vgeo(); //{ br , uf, data, km }\n\n const object = { br, uf, data, km };\n const {\n geometry: {\n coordinates\n }\n } = await vgeo.coordenadas(object);\n\n return coordinates\n\n } catch (err) {\n return `erro getCoordinates ${err}`\n }\n }", "title": "" }, { "docid": "4acc54653dfb184488f058514674b34b", "score": "0.5477501", "text": "function getNormalizedLocationFromCoord(lat, lon) {\n\n var x_val = (lon-LON_MIN)/(LON_MAX-LON_MIN);\n var y_val = (lat-LAT_MIN)/(LAT_MAX-LAT_MIN);\n\n var loc = {\n x: x_val,\n y: y_val\n };\n return loc;\n}", "title": "" }, { "docid": "82915c31404be293e67ff7fd6fd19750", "score": "0.546631", "text": "function multiLineToGeo(multiLine) {\n return _core_utils_Array__WEBPACK_IMPORTED_MODULE_0__[\"map\"](multiLine, function (multiLine) {\n return multiPointToGeo(multiLine);\n });\n }", "title": "" }, { "docid": "c2fa52990b52c54eecef0392291b8abe", "score": "0.54510087", "text": "function geoToPoint(geoPoint) {\n return [geoPoint.longitude, geoPoint.latitude];\n }", "title": "" }, { "docid": "758dcdf36f27d5fd09ef0eac72313f6c", "score": "0.54483014", "text": "function getOpere(lat, long, id_museo, callback) {\r\n\tgetOpereFromDb(lat, long, id_museo, callback);\r\n}", "title": "" }, { "docid": "87f62121d1c854d159433bace080430d", "score": "0.5445237", "text": "function getCoordinates(response) {\n var coordinates = Maybe(response).bind(function(r) {\n return r.location;\n }).bind(function(r) {\n return r.city;\n }).bind(function(r) {\n return r.coordinates;\n });\n\n var latitude = coordinates.bind(function(r) {return r.latitude});\n var longitude = coordinates.bind(function(r) {return r.longitude});\n\n if (latitude === Nothing || longitude === Nothing) {\n return \"Error: Coordinates cannot be null\";\n }\n return [latitude, longitude];\n}", "title": "" }, { "docid": "c31f2465cf403317ce85865bf8f09946", "score": "0.5425997", "text": "function getCoordintes() {\n\tvar options = {\n\t\tenableHighAccuracy: true,\n\t\ttimeout: 5000,\n\t\tmaximumAge: 0\n\t};\n\n\tfunction success(pos) {\n\t\tvar crd = pos.coords;\n\t\tvar lat = crd.latitude.toString();\n\t\tvar lng = crd.longitude.toString();\n\t\tvar coordinates = [lat, lng];\n\t\tconsole.log(`Latitude: ${lat}, Longitude: ${lng}`);\n\t\tgetCity(coordinates);\n\t\treturn;\n\n\t}\n\n\tfunction error(err) {\n\t\tconsole.warn(`ERROR(${err.code}): ${err.message}`);\n\t}\n\n\tnavigator.geolocation.getCurrentPosition(success, error, options);\n}", "title": "" }, { "docid": "0c5a816a719e8ea60f28830588bd5281", "score": "0.5424125", "text": "function geoToPoint(geoPoint) {\r\n return [geoPoint.longitude, geoPoint.latitude];\r\n}", "title": "" }, { "docid": "3df8997ad9c938a9ec7dfbec3a50c4ed", "score": "0.54090315", "text": "function parseCoordinates(stringCoordinates) {\n return stringCoordinates.split(',').map(function(item) { return Number(item)});\n}", "title": "" }, { "docid": "a739b3b528f4aaed8dafc49ebbe990ff", "score": "0.5403411", "text": "function getLatLon(lat, lon){\n\treturn new google.maps.LatLng(lat, lon);\n}", "title": "" }, { "docid": "e96968e7e453e88cfea634f0914cf052", "score": "0.5386263", "text": "function GetSiteLatLon() {\n\t\t//gets coordinates of sample sites from fusion table using ecospark API key\n\t\tvar url = 'https://www.googleapis.com/fusiontables/v1/query?sql=SELECT%20*%20FROM%201MwenfK4wOxpVYHkyGrpm3WsxNuGKY2neyyg6Dp0&key=AIzaSyBnmhkx6kdlllf6x3PlW7ApNuuv5hosM6E';\n\t\treturn $.ajax({\n\t\t\turl : url,\n\t\t\tdataType : 'jsonp'\n\t\t});\n\t}", "title": "" }, { "docid": "275d5ad019b35e69b5989b784eb6b8a4", "score": "0.53754336", "text": "getLatLngs () {\n let axis = this.domain.axes.get('composite')\n let ix = axis.components.indexOf(this._projX)\n let iy = axis.components.indexOf(this._projY)\n let coords = []\n for (let i=0; i < axis.values.length; i++) {\n let x = axis.values[i][ix]\n let y = axis.values[i][iy]\n let latlng = this.projection.unproject({x,y})\n let coord = L.latLng(latlng)\n coords.push(coord)\n }\n return coords\n }", "title": "" }, { "docid": "2c01994c04a538a96b2c7c3f3cbf4b23", "score": "0.53550255", "text": "function dmsToDecimal(latDegrees, latMinutes, latSeconds, lonDegrees, lonMinutes, lonSeconds) {\n var bigNumber = 1000000.0;\n var latsign = 1;\n var lonsign = 1;\n var absdlat = 0;\n var absdlon = 0;\n var absmlat = 0;\n var absmlon = 0;\n var absslat = 0;\n var absslon = 0;\n var coordinates = new Array();\n\n if (latDegrees < 0) {\n latsign = - 1;\n }\n //Store absolute value of degrees, minutes and seconds as big integers for\n //decimal precision\n absdlat = Math.abs(Math.round(latDegrees * bigNumber));\n absmlat = Math.abs(Math.round(latMinutes * bigNumber));\n latSeconds = Math.abs(Math.round(latSeconds * bigNumber) / bigNumber);\n absslat = Math.abs(Math.round(latSeconds * bigNumber));\n\n if (lonDegrees < 0) {\n lonsign = - 1;\n }\n //Store absolute value of degrees, minutes and seconds as big integers for\n //decimal precision\n absdlon = Math.abs(Math.round(lonDegrees * bigNumber));\n absmlon = Math.abs(Math.round(lonMinutes * bigNumber));\n lonSeconds = Math.abs(Math.round(lonSeconds * bigNumber) / bigNumber);\n absslon = Math.abs(Math.round(lonSeconds * bigNumber));\n\n //If input values exceed limits, null is returned as coordinates\n if (absdlat > (90 * bigNumber) || absmlat >= (60 * bigNumber) || absslat > (59.99999999 * bigNumber) || absdlon > (180 * bigNumber) || absmlon >= (60 * bigNumber) || absslon > (59.99999999 * bigNumber)) {\n //Null will be returned since coordinates are invalid\n }\n else {\n //Add degrees, minutes and seconds and divide by the big Integer used\n //at the begining\n coordinates[0] = Math.round(absdlat + (absmlat / 60) + (absslat / 3600)) * latsign / bigNumber;\n coordinates[1] = Math.round(absdlon + (absmlon / 60) + (absslon / 3600)) * lonsign / bigNumber;\n }\n return coordinates;\n}", "title": "" }, { "docid": "c41f3309b812e1c5fc4f413e2de2d9ec", "score": "0.5350524", "text": "function tagIdToLatLong(tag){\n if(tag==\"110177\") return \"-19.66882,146.864\"; //Spring Creek\n else if(tag==\"110171\") return \"-19.66574,146.8462\"; //Double Barrel\n else if(tag==\"110163\") return \"-19.66872,146.8642\"; //Junction//-19.66872,146.8642\n }", "title": "" }, { "docid": "2534e4d6df0de410261a3bcef9800ad9", "score": "0.53478426", "text": "function separateFromMMGIS() {\n\n }", "title": "" }, { "docid": "bdf7bfe218dc9195bcf77f30cdebe67a", "score": "0.534586", "text": "function xytolatlng(x, y) {\n return [-y-123, x+2392]; //lat, lng\n}", "title": "" }, { "docid": "a9194c028002fb8b8c41444795208b20", "score": "0.53452814", "text": "processarJogada(jogada) {\n var linha, coluna;\n linha = jogada.substring(1, 2);\n coluna = jogada.substring(2, 3);\n var coordenadas = {linha: linha, coluna: coluna};\n return coordenadas;\n }", "title": "" }, { "docid": "70c2e97f2fbde7ba45fc3b484122dd80", "score": "0.53449863", "text": "function GetTownCoordinates() {\n var center = $('.cityMenu.selected > div:nth-child(5) > span:first')\n .text().split(' | ');\n return [parseInt(center[0]), parseInt(center[1])];\n}", "title": "" }, { "docid": "cb54d260a939b0fdad5c62fa48f2d20d", "score": "0.53315264", "text": "function parse_pt(point)\n{\n var lat = 0;\n var lng = 0;\n var latitude = \"\";\n var longitude = \"\";\n for (i=0; i<(point.length - 1); i++) {\n //when lat == 1 the incoming values of point[i] will be part of the lat\n if (lat == 1) {\n latitude = latitude + point[i];\n if (point[i+1] === \",\") {\n lat = 0;\n }\n }\n\n //when lng == 1 the incoming values of point[i] will be part of the lng\n if (lng == 1) {\n longitude = longitude + point[i];\n }\n\n if (point[i] === \"(\") {\n lat = 1;\n }\n\n if (point[i] === \" \") {\n lng = 1;\n }\n }\n //return the point\n var pt = {lat: Number(latitude), lng:Number(longitude)};\n return pt;\n}", "title": "" }, { "docid": "b0a9b092ab45c375c3f5c072842e65f8", "score": "0.5325913", "text": "function getOpereFromDb(lat, lng, id_museo, callback) {\r\n\triceviOpere(id_museo, id_lingua, callback);\r\n}", "title": "" }, { "docid": "721f191e6c342b4c62596f7a6b8bbd2c", "score": "0.53220344", "text": "function fromLL(lon,lat) {\n // derived from https://gist.github.com/springmeyer/871897\n var extent = 20037508.34;\n\n var x = lon * extent / 180;\n var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);\n y = y * extent / 180;\n\n return [(x + extent) / (2 * extent), 1 - ((y + extent) / (2 * extent))];\n }", "title": "" }, { "docid": "4a28385690cb7d14d396b8e85fa83b5d", "score": "0.5308511", "text": "function processPoint(lat, long) {\n\n var data = {lat: lat, long: long};\n var geojson = GeoJSON.parse(data, {Point: ['lat', 'long']});\n\n if(!GJV.valid(geojson)){\n throw \"Invalid GeoJSON Point generated\";\n }\n\n return geojson;\n \n}", "title": "" }, { "docid": "a7672e7bddfae67f41187b2a745aa994", "score": "0.53073806", "text": "function getCoordinates(coordinatesString) {\n const point = {};\n\n // avoid more than 2 divisions\n const coordinates = coordinatesString.split(',', 2);\n point.lat = coordinates[0];\n point.lon = coordinates[1];\n\n return point;\n}", "title": "" }, { "docid": "027c01883f68fe20fd033ad9a3ffdd04", "score": "0.5303458", "text": "function padLatLons(dataset) {\n\t$.each(dataset, function( i, d ) {\n\t\tif (d.geoid == 45) { // Sacramento\n\t\t\td.lon = d.lon + 0.75;\n\t\t} else if (d.geoid == 49) { // San Francisco\n\t\t\td.lon = d.lon - 0.5;\n\t\t} else if (d.geoid == 3) { // Austin\n\t\t\td.lat = d.lat + 0.6;\n\t\t} else if (d.geoid == 37) { // Orlando\n\t\t\td.lon = d.lon + 0.5;\n\t\t} else if (d.geoid == 52) { // Tampa Bay\n\t\t\td.lon = d.lon - 0.5;\n\t\t} else if (d.geoid == 19) { // Greenville\n\t\t\td.lon = d.lon + 0.5;\n\t\t\td.lat = d.lat - 0.9;\n\t\t} else if (d.geoid == 42) { // Raleigh\n\t\t\td.lon = d.lon + 0.7;\n\t\t} else if (d.geoid == 18) { // Greensburro\n\t\t\td.lat = d.lat + 0.3;\n\t\t} else if (d.geoid == 53) { // Virgina Beach\n\t\t\td.lon = d.lon + 0.5;\n\t\t} else if (d.geoid == 1) { // Albany\n\t\t\td.lat = d.lat + 0.5;\n\t\t} else if (d.geoid == 5) { // Boston\n\t\t\td.lon = d.lon + 0.7;\n\t\t} else if (d.geoid == 20) { // Hartford\n\t\t\td.lon = d.lon + 0.2;\n\t\t\td.lat = d.lat + 0.2;\n\t\t} else if (d.geoid == 35) { // NYC\n\t\t\td.lat = d.lat + 0.2;\n\t\t} else if (d.geoid == 38) { // Philly\n\t\t\td.lon = d.lon - 0.5;\n\t\t\td.lat = d.lat + 0.2;\n\t\t} else if (d.geoid == 44) { // Rochester\n\t\t\td.lon = d.lon + 1.1;\n\t\t} else if (d.geoid == 31) { // Milwaukee\n\t\t\td.lon = d.lon - 0.3;\n\t\t\td.lat = d.lat + 0.3;\n\t\t} else if (d.geoid == 28) { // Louisville\n\t\t\td.lon = d.lon - 0.7;\n\t\t\td.lat = d.lat - 0.3;\n\t\t} else if (d.geoid == 9) { // Cincinnati\n\t\t\td.lon = d.lon + 0.3;\n\t\t\td.lat = d.lat - 0.5;\n\t\t} else if (d.geoid == 11) { // Columbus, OH\n\t\t\td.lon = d.lon + 0.8;\n\t\t\td.lat = d.lat - 0.5;\n\t\t} else if (d.geoid == 13) { // Dayton, OH\n\t\t\td.lon = d.lon + 0.2;\n\t\t\td.lat = d.lat + 0.5;\n\t\t} else if (d.geoid == 22) { // Indy\n\t\t\td.lon = d.lon - 0.2;\n\t\t}\t\t\t\n\t});\n\t\n}", "title": "" }, { "docid": "edc7e97d5cc37074eedef97b923a27e4", "score": "0.5300117", "text": "function multiLineToGeo(multiLine) {\r\n return _core_utils_Array__WEBPACK_IMPORTED_MODULE_0__[\"map\"](multiLine, function (multiLine) {\r\n return multiPointToGeo(multiLine);\r\n });\r\n}", "title": "" }, { "docid": "e71ff37a38a11305950f4266644d6655", "score": "0.52942806", "text": "function ll_to_xy(lat, lon) {\n var x = lon / 360. + .5;\n var rlat = lat * Math.PI / 180.;\n var merc_y = Math.log(Math.tan(.5 * rlat + .25 * Math.PI));\n var y = .5 - merc_y / (2. * Math.PI);\n return {x: x, y: y};\n}", "title": "" }, { "docid": "c4cdc4d20aacd1d118e63f0356561c59", "score": "0.52917063", "text": "function convertToLonLat(coordinates) {\n\treturn ol.proj.transform(coordinates, 'EPSG:3857', 'EPSG:4326');\n}", "title": "" }, { "docid": "33c2cb9f2307adb1cd68518699f0b686", "score": "0.5290634", "text": "function getCoordinatePoint(address1, address2, city, state, zipcode){\n // TODO: call to google API to get lat,lng value for given address\n\n // for now, return \"LAT, LNG\"\n const api_key = 'AIzaSyA0-MhQbt1EKRMfIPHm3WdCbC_fzpmUXAA'\n const full_address = encodeURIComponent(address1 + ',' + address2 + ',' + city + ',' + state + ',' + zipcode);\n console.log(full_address);\n // const url = `https://maps.googleapis.com/maps/api/geocode/json?address=${full_address}&key=${api_key}`\n\n // console.log(url);\n // request(url, { json: true }, (err, res, body) => {\n // console.log(\"sent url\", url)\n // if (!err && res.statusCode == 200){\n // console.log(body.url);\n // console.log(body.explanation);\n // }\n // else{\n // console.log(err);\n // }\n \n // });\n \n return \"LAT, LNG\"\n}", "title": "" }, { "docid": "eb14e802c5e5b597696520d0a3aa0875", "score": "0.5290431", "text": "function coordinate(lng, lat) {\n return {\n longitude: Number(lng),\n latitude: Number(lat),\n };\n}", "title": "" }, { "docid": "c2d0f2efbea0d0807598e21e23bcf5cc", "score": "0.52743345", "text": "function pointToGeo(point) {\n return {\n longitude: point[0],\n latitude: point[1]\n };\n }", "title": "" }, { "docid": "f7b212fda83df07216c52d115a049249", "score": "0.52554977", "text": "function getLonLat(request, response, city) {\n let lonLatSQL = 'SELECT longitude, latitude, search_query FROM location WHERE search_query = $1;';\n let lat;\n let lon;\n client.query(lonLatSQL, [city])\n .then(results => {\n lon = results.rows[0].longitude;\n lat = results.rows[0].latitude;\n getTrailsAPI(request, response, city, lon, lat);\n })\n}", "title": "" }, { "docid": "65cf42e5a8a707eaea573f71b53798cc", "score": "0.5254642", "text": "function multiPointToGeo(points) {\n return _core_utils_Array__WEBPACK_IMPORTED_MODULE_0__[\"map\"](points, function (point) {\n return pointToGeo(point);\n });\n }", "title": "" }, { "docid": "a779e8865c961257da4c2c5aa36f0a91", "score": "0.52531654", "text": "convertInputCoordinates(input) {\n let numCoordinates = [];\n let stringCoordinates = input.split(\",\");\n for (let i in stringCoordinates) {\n let coordinate = stringCoordinates[i].trim();\n numCoordinates[i] = +coordinate;\n }\n return numCoordinates;\n }", "title": "" }, { "docid": "4356138416f3a3e3fb9eb3c5502d0b9d", "score": "0.5247918", "text": "function pegaCoordenadas () {\r\n\tvar retorno = {};\r\n\tvar rua = $('#prua').val();\r\n\tvar num = $('#pnumero').val();\r\n\tvar bairro = $('#pbairro').val();\r\n\tvar cidade = $('#pcidade').val();\r\n\tvar uf = $('#puf').val();\r\n\tvar address = rua+', '+num+' - '+bairro+', '+cidade+' - '+uf;\r\n\tvar map_url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\" + address;\r\n\t//alert(\"PEga coordenadas\");\r\n\t$.ajax({\r\n\t\turl: map_url,\r\n\t\tmethod: 'GET',\r\n\t\tsuccess: function (dados){\r\n\t\t\t//console.log(dados.results);\r\n\t\t\tretorno.titulo = dados.results[0].formatted_address;\r\n\t\t\tretorno.geometry = dados.results[0].geometry;\r\n\t\t\t$('#ptitulo').val(retorno.titulo);\r\n\t\t\t$('#plat').val(retorno.geometry.location.lat);\r\n\t\t\t$('#plon').val(retorno.geometry.location.lng);\r\n\t\t}\r\n\t});\r\n\t//alert(\"Retorno\");\r\n\t//console.log(retorno);\r\n\treturn retorno;\r\n}", "title": "" }, { "docid": "f1d2934d766af98bd3866e7df0135320", "score": "0.524701", "text": "function multiPointToGeo(points) {\r\n return _core_utils_Array__WEBPACK_IMPORTED_MODULE_0__[\"map\"](points, function (point) {\r\n return pointToGeo(point);\r\n });\r\n}", "title": "" }, { "docid": "ecd670e633eebdba45f045c1aa396ee8", "score": "0.52369523", "text": "nztmToLatLng(coordinates) {\n return proj4('NZTM', 'WGS84', coordinates).reverse()\n }", "title": "" }, { "docid": "512e298701e6ed6233d1fd799fb7b58f", "score": "0.5236309", "text": "function getCoordinates(response) {\n var latitude = response.location.city.coordinates.latitude;\n var longitude = response.location.city.coordinates.longitude;\n return [latitude, longitude];\n}", "title": "" }, { "docid": "512e298701e6ed6233d1fd799fb7b58f", "score": "0.5236309", "text": "function getCoordinates(response) {\n var latitude = response.location.city.coordinates.latitude;\n var longitude = response.location.city.coordinates.longitude;\n return [latitude, longitude];\n}", "title": "" }, { "docid": "412453c95d83c61374855f2de0283336", "score": "0.52337104", "text": "function getLatLon()\r\n{\r\n\t// get lat lon coordinates\r\n\tvar lnkConv = document.getElementById(lnkConvId);\r\n\tif (lnkConv)\r\n\t{\r\n\t\tvar ll = lnkConv.href.match(/-?\\d+\\.?\\d*/g);\r\n\t\tlat = ll[0];\r\n\t\tlon = ll[1];\r\n\t}\r\n}", "title": "" }, { "docid": "b1343087478e2392ca797428e09cb9e3", "score": "0.5229774", "text": "function getWeatherByLatLon(lat, lon) {\n lat = lat.replace(',', '.').trim();\n lon = lon.replace(',', '.').trim();\n\n var validatedCoords = validateCoords(lat, lon);\n clearError();\n\n if(validatedCoords === true) {\n getWeather(lat, lon, weatherAppID);\n } else {\n showError(validatedCoords);\n }\n}", "title": "" }, { "docid": "1f122f5e41c2d7e026572a5ab8fd07ba", "score": "0.52207947", "text": "function reverseGeoCoding(latitude, longitude) {\n var geoCodingUrl = \"https://maps.googleapis.com/maps/api/geocode/json?latlng=\" + latitude + \",\" + longitude + \"&key=\" + GOOGLE_API_KEY\n return $.get(geoCodingUrl)\n }", "title": "" }, { "docid": "522ac6d8879b5e561ce4899d6fa08150", "score": "0.5214003", "text": "getLatLonArr(tle, optionalTimestamp = Date.now()) {\n const ll = this.getLatLon(tle, optionalTimestamp);\n return [ll.lat, ll.lng];\n }", "title": "" }, { "docid": "d0718ce44d601bbb797d0eb57e3e984d", "score": "0.5199696", "text": "function getCoordinates(response) {\n var coordinates = Maybe(response).bind(function(r) {\n return r.location;\n }).bind(function(r) {\n return r.city;\n }).bind(function(r) {\n return r.coordinates;\n }).maybe(\"Error: Coordinates cannot be null\", function(r) {\n return [r.latitude, r.longitude];\n });\n}", "title": "" }, { "docid": "7b55ef1ce571bfbc747aa3c1b87027ad", "score": "0.51991224", "text": "getPinCoordinates () {\n try {\n if (!_this.map) {\n console.log('map object does not exist? Has the view been rendered?')\n return []\n }\n\n const map = _this.map\n\n const pinCoords = []\n\n // Get the coordinates for each pin.\n map.eachLayer(function (layer) {\n // console.log('layer: ', layer)\n // console.log(`layer._latlng: ${JSON.stringify(layer._latlng, null, 2)}`)\n\n // Add the pin coordinates to the array if it has a lat and lng. Not\n // all layers have these, and we want to ignore those that don't.\n if (layer._latlng) pinCoords.push(layer._latlng)\n })\n\n // Filter out the duplicates.\n const filteredCoords = _this.removeDuplicates(pinCoords)\n // console.log(`filteredCoords: ${JSON.stringify(filteredCoords, null, 2)}`)\n\n return filteredCoords\n } catch (err) {\n console.error('Error in map.js/getPinCoordinates()')\n throw err\n }\n }", "title": "" }, { "docid": "aad8e1d3ded7f7c0f9a33b931a0abbcc", "score": "0.51974714", "text": "function get_coords() {\n var row;\n\n if (row = getRow()) { /* If we can get a row */\n\tvar coords = coords_function(row, req, px_per_second);\n\n\t/* Make sure the y-coordinate is within bounds */\n\tcoords.y = (coords.y >= 0) ? coords.y : 0;\n\tcoords.y = (coords.y <= size.y) ? coords.y : size.y;\n\n\t/* If the x-coordinate is within bounds */\n\tif (coords.x <= size.x && coords.x >= 0) {\n\t return coords; /* Return a valid set of coordinates */\n\t}\n }\n return null;\n }", "title": "" }, { "docid": "2482ee2af16a32865a086302732dd444", "score": "0.5193633", "text": "function addrFromCoords(geoPoint) {\n console.log(geoPoint)\n if (geoPoint !== \"\" && geoPoint !== [0, 0]) {\n return new Promise((resolve, reject) => {\n let lat = geoPoint[1];\n let lng = geoPoint[0];\n Geocode.fromLatLng(lat, lng).then(\n (response) => {\n const address = response.results[0].formatted_address;\n let city, state, country;\n for (let i = 0; i < response.results[0].address_components.length; i++) {\n for (\n let j = 0;\n j < response.results[0].address_components[i].types.length;\n j++\n ) {\n switch (response.results[0].address_components[i].types[j]) {\n case \"locality\":\n city = response.results[0].address_components[i].long_name;\n break;\n case \"administrative_area_level_1\":\n state = response.results[0].address_components[i].long_name;\n break;\n case \"country\":\n country = response.results[0].address_components[i].long_name;\n break;\n default:\n break;\n }\n }\n }\n let output = { city, state, country, address }\n resolve(output);\n })\n .catch((error) => {\n console.error(error)\n reject(error)\n }\n );\n })\n } else {\n return null\n }\n}", "title": "" }, { "docid": "2f8c0ed1459e1506ef6e978375b0b993", "score": "0.5189987", "text": "function getLongitude(txt, i) {\r\n var start = i; //where to start searching\r\n i = txt.indexOf(\"lon=\", start);\r\n i += 5; //move to index after tag name (start of lon)\r\n var num = \"\";\r\n while(txt[i] != '\"') { //while char not a \"\r\n num += txt[i];\r\n i++;\r\n }\r\n return num; \r\n}", "title": "" }, { "docid": "c33a6efd8f5d265e20b5b8c80b1d6699", "score": "0.51862675", "text": "function toLatLng (mixed, emptyReturnMixed, noFlat){\n var empty = emptyReturnMixed ? mixed : null;\n if (!mixed || (typeof mixed === \"string\")){\n return empty;\n }\n // defined latLng\n if (mixed.latLng) {\n return toLatLng(mixed.latLng);\n }\n // google.maps.LatLng object\n if (mixed instanceof google.maps.LatLng) {\n return mixed;\n } \n // {lat:X, lng:Y} object\n else if ( numeric(mixed.lat) ) {\n return new google.maps.LatLng(mixed.lat, mixed.lng);\n }\n // [X, Y] object \n else if ( !noFlat && $.isArray(mixed)){\n if ( !numeric(mixed[0]) || !numeric(mixed[1]) ) {\n return empty;\n }\n return new google.maps.LatLng(mixed[0], mixed[1]);\n }\n return empty;\n }", "title": "" }, { "docid": "ae36ee0197a4eb39887f6bd2f1d59f88", "score": "0.51845986", "text": "function gml2coord(posList) {\n var pnts = posList.split(/[ ,]+/);\n var coords = [];\n for (var i = 0; i < pnts.length; i+=2) {\n coords.push([parseFloat(pnts[i+1]), parseFloat(pnts[i])]);\n }\n return coords;\n}", "title": "" }, { "docid": "9524c5946a9f80f3dbaee1bc02f348e4", "score": "0.51835495", "text": "function lonlat2xyz( coord ){\n\n\tvar lon = coord[0] * to_radians;\n\tvar lat = coord[1] * to_radians;\n\n\tvar x = Math.cos(lat) * Math.cos(lon);\n\n\tvar y = Math.cos(lat) * Math.sin(lon);\n\n\tvar z = Math.sin(lat);\n\n\treturn [x, y, z];\n}", "title": "" }, { "docid": "351f5f7bcb67fab4f9b39ba5771691ab", "score": "0.51757747", "text": "getLatLng(){\r\n var gps = this.getGps();\r\n var lat = this.convertGPS2LatLng(gps.lat);\r\n var lng = this.convertGPS2LatLng(gps.lon);\r\n var location = {\"lat\": lat, \"lng\": lng};\r\n return location;\r\n }", "title": "" }, { "docid": "a323d11f53e1a8a09dfd999eb65c37ed", "score": "0.51744473", "text": "function pointTolngLat(x, y) {\n\t\treturn MercatorProjection.convertMC2LL(new BMap.Point(x, y));\n\t\t// return projection.pointToLngLat(new BMap.Pixel(x,y));\n\t}", "title": "" }, { "docid": "befa863262c58686d82697dc5adfbe12", "score": "0.5170042", "text": "function toLatLong(points,centre){\n\n var coords = [];\n var earthRadius = 6371000; //radius in metres\n\n for(var i = 0; i < points.dots.length; i++){\n var dx = points.dots[i].x;\n var dy = points.dots[i].y;\n\n var newLatitude = centre.lat + (dy / earthRadius) * (180 / Math.PI); // calculate new latitude\n var newLongitude = centre.long + (dx / earthRadius) * (180 / Math.PI) / Math.cos(centre.lat * Math.PI/180); //calculate new longitude\n\n coords.push({ // create enw object\n lat: newLatitude,\n long: newLongitude,\n });\n }\n\n return coords;\n \n}", "title": "" }, { "docid": "348fa2c58a94c1ea7b180e7dda4990f0", "score": "0.51693237", "text": "function lonlat2xyz( coord ){\n\n var lon = coord[0] * to_radians;\n var lat = coord[1] * to_radians;\n\n var x = Math.cos(lat) * Math.cos(lon);\n\n var y = Math.cos(lat) * Math.sin(lon);\n\n var z = Math.sin(lat);\n\n return [x, y, z];\n}", "title": "" }, { "docid": "15f35c604020b62ef92c73325093aacb", "score": "0.51655227", "text": "function _getGeocode(latlon, callback) {\n const opt = {\n url: config.nominatimUrl + 'reverse?&format=json&lat=' + latlon[0] + '&lon=' + latlon[1] + '&addressdetails=1&accept-language=en',\n method: 'GET'\n };\n\n _nominatimHttp(opt, (err, res, body) => {\n if (err) {\n return callback(err);\n }\n\n if (!body || res.statusCode !== 200) {\n return callback('Failed to get response from nominatim');\n }\n\n let json;\n\n try {\n json = JSON.parse(body);\n } catch (e) {\n return callback('Failed to parse response from nominatim');\n }\n\n joi.validate(_.get(json, 'address'), validators.geocode, { allowUnknown: true }, (jerr, geocode) => {\n if (jerr) {\n console.log('jerr: ', jerr);\n return callback('Invalid response from nominatim');\n }\n\n callback(null, geocode);\n });\n });\n}", "title": "" }, { "docid": "dad0d56ece4110ebea08f4f96174dea4", "score": "0.51642615", "text": "function extractGeocodeResult(data)\n{\n\tif (data)\n\t{\n\t\tif (data.results)\n\t\t{\n\t\t\tif (data.results[0])\n\t\t\t{\n\t\t\t\treturn [data.results[0].geometry.location.lat, data.results[0].geometry.location.lng];\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n}", "title": "" }, { "docid": "92cb13554badf17936ddeee11af5a4c0", "score": "0.5161988", "text": "function convert_coordinates(coordinates){\n let less_coordinates = []\n\n coordinates[0].forEach(function(coordinates, i){\n\n if( (i% RESOLUTION_X_FACTOR) === 0 ){\n less_coordinates.push(makeLatLngObj(coordinates))\n }\n\n })\n\n return less_coordinates\n}", "title": "" }, { "docid": "53a64a66e023392a6cbf1cf7b8c9e8b2", "score": "0.5160532", "text": "function getLatLon(address) {\n\tconst url = `https://maps.googleapis.com/maps/api/geocode/json?region=uk&address=${address}`\n\tconsole.log(url)\n\tconst res = sync('GET', url)\n\tconst data = JSON.parse(res.getBody().toString('utf8'))\n\tconst loc = data.results[0].geometry.location\n\treturn `${loc.lat.toFixed(6)}, ${loc.lng.toFixed(6)}`\n}", "title": "" }, { "docid": "48ac025d44986b63f7da4787b6846526", "score": "0.51592535", "text": "function coord(v) {\n var coords = v.replace(trimSpace, '').split(splitSpace),\n o = [];\n for (var i = 0; i < coords.length; i++) {\n o.push(coord1(coords[i]));\n }\n return o;\n }", "title": "" }, { "docid": "8f5d54637a9ee31ef46c60f2e0b86f04", "score": "0.51542264", "text": "get coordinates() {\n\t\tconst { coordinates } = storage.get(this);\n\n\t\treturn coordinates;\n\t}", "title": "" }, { "docid": "8691ee539c78bfd2fb6d40318a525962", "score": "0.5153425", "text": "function getLatLon(data, stateName) {\n\t\t\t// Get the current state from the data.states array\n\t\t\tvar i,\n\t\t\t\tlat = 0, // The latitude of the state\n\t\t\t\tlon = 0, // The longitude of the state\n\t\t\tstateName = $.trim(stateName); // Checking for equality doesn't work unless statename is trimmed\n\t\t\tfor (i in data.states) {\n\t\t\t\tif (data.states[i].name.toLowerCase() === stateName.toLowerCase()) {\n\t\t\t\t\tlat = data.states[i].latitude;\n\t\t\t\t\tlon = data.states[i].longitude;\n\t\t\t\t\treturn new google.maps.LatLng(lat, lon);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"error: couldn't find state in getLatLon function\");\n\t\t\t\t}\n\t\t\t}\n\t\t} // end getLatLon function", "title": "" } ]
e3f950e87b356d817f23b4b2fb161690
Convert a value to a string that is actually rendered.
[ { "docid": "4566164735337018571e8ce560b8c455", "score": "0.0", "text": "function toString (val) {\n return val == null\n ? ''\n : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n ? JSON.stringify(val, null, 2)\n : String(val)\n}", "title": "" } ]
[ { "docid": "efacd9e7658b1abb40792baa3c22cea1", "score": "0.74436134", "text": "function renderString(val){return val==null?'':(typeof val==='undefined'?'undefined':_typeof(val))==='object'?JSON.stringify(val,null,2):String(val);}", "title": "" }, { "docid": "da50565c1e53645634dae09a6c57ce86", "score": "0.73092353", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "2e7b45860b534d27dec3fbc0d6581853", "score": "0.7300044", "text": "function toString(value) {\n return '' + value;\n }", "title": "" }, { "docid": "acfd3d302185957d702f14fcac3d7e44", "score": "0.7255612", "text": "function valuetext (value) {\n return `${value}`\n}", "title": "" }, { "docid": "ab8c5df439acf5767a2b108df7573c0f", "score": "0.72496134", "text": "function valuetext(value) {\n return `${value}`;\n}", "title": "" }, { "docid": "7f35b7790489b6fb5639f2ac28fff1a3", "score": "0.72031265", "text": "function toText(value) {\r\n if (hasValue(value) && !isString(value)) {\r\n if (isNumber(value)) {\r\n return castString(value);\r\n }\r\n else if (isObject(value)) {\r\n return value.toString();\r\n }\r\n }\r\n return value;\r\n}", "title": "" }, { "docid": "3ad5a8708656821ae7ed63961c04d410", "score": "0.7135294", "text": "function toString(value) {\n\t return '' + value;\n\t}", "title": "" }, { "docid": "3ad5a8708656821ae7ed63961c04d410", "score": "0.7135294", "text": "function toString(value) {\n\t return '' + value;\n\t}", "title": "" }, { "docid": "82805230180ab9a916e920b99f026656", "score": "0.71076083", "text": "valueAsString() {\n if (typeof value === 'number' && !this.value.isInteger()) {\n // Floating point.\n const NumDecimals = 4;\n return this.value.toFixed(NumDecimals);\n }\n return `${this.value}`;\n }", "title": "" }, { "docid": "8739076ca775f81c594c65ae6258832f", "score": "0.70722187", "text": "function toString(value) {\r\n return '' + value;\r\n}", "title": "" }, { "docid": "445ae2d3e52b9e394d7bfab7f488c0cc", "score": "0.6999165", "text": "valueAsString() {\n return `${this.value}`;\n }", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" }, { "docid": "0d3ad9c495b45fe85a38aff6ec02702b", "score": "0.69858086", "text": "function toString(value) {\n return '' + value;\n}", "title": "" } ]
73d7dd72d5aeab8aee52c977a621ca82
pular so deixa lugar em branco ,,,
[ { "docid": "b74868d7d237a84353764096798ee3e4", "score": "0.0", "text": "function criar() {\r\n \treturn [1,2,3];\r\n }", "title": "" } ]
[ { "docid": "822cb804184f2aec3bb721dbfe84ac0d", "score": "0.62728775", "text": "function mascaraMoeda(num) {\n //num.split('.')\n //var num = num.toLocaleString('pt-BR')\n var num = num.toLocaleString('pt-BR')\n var spli = num.split(',')\n\n if (spli.length == 1) {\n var centavos = \"00\"\n } else {\n var centavos = +spli[1]+\"0\"\n }\n return 'R$ '+spli[0]+','+centavos //gambiarra - arrumar!\n}", "title": "" }, { "docid": "e2366ffcda08ede71ec7f61b8cf7d9da", "score": "0.62515736", "text": "function gerarBoleto(fatura) {\n \n }", "title": "" }, { "docid": "559f808522dafa655bd25fe094832e98", "score": "0.61739963", "text": "function eliminarCaracteresNoPermitidos(palabra){\r\n var binario_sin_espacios = \"\";\r\n for(var i = 0; i< palabra.length;i++){\r\n if(palabra[i] != \" \" && palabra[i]== \"0\"||palabra[i] != \" \" && palabra[i]== \"1\" ){\r\n binario_sin_espacios = binario_sin_espacios + palabra[i];\r\n }\r\n }\r\n return binario_sin_espacios;\r\n }", "title": "" }, { "docid": "354e906c95f9258aa74e5b8ec24f4ee5", "score": "0.6159705", "text": "function marcador_bbdd() {\n //@ TODO\n\n let resultado = '';\n return resultado;\n}", "title": "" }, { "docid": "09b5291e71ac84068a4aaff840a3506e", "score": "0.61385816", "text": "nombreCompleto(){\n return super.nombreCompleto() +\", \"+ this._departamento;\n }", "title": "" }, { "docid": "d51d73df8b0375fc161232a431f56c41", "score": "0.6123536", "text": "geranovoCpf(){\n const cpfParcial = this.Limpo.slice(0, -2);\n const digito1 = Validacpf.criaDigito(cpfParcial);\n const digito2 = Validacpf.criaDigito(cpfParcial + digito1);\n this.novoCPF = cpfParcial + digito1 + digito2;\n\n }", "title": "" }, { "docid": "d1b5f3be4ff5cd27378dccc959a07cf9", "score": "0.61030436", "text": "function limparConteudo(conteudo) {\n const linhasEmBranco = removerLinhasEmBranco(conteudo.conteudoOriginal)\n const datasEParenteses = removerCaracteres(linhasEmBranco)\n conteudo.conteudoLimpo = datasEParenteses\n\n function removerLinhasEmBranco(texto) {\n const todasLinhas = texto.split('\\n')\n const linhasEmBranco = todasLinhas.filter((line) => {\n if (line.trim().length === 0 || line.trim().startsWith('=')) {\n return false\n }\n return true\n })\n return linhasEmBranco.join('')\n }\n }", "title": "" }, { "docid": "78c25c8aa8360f11cca1f92588ff2a45", "score": "0.60667616", "text": "function obterNumerosSemVirgulaEPonto(valor){\n\n\tvar begin = false;\n\t\n\tif (valor.length > 0){\n\t\tbegin = true;\n\t\tvar valorReplaceVirgula = valor.replace(\",\",\"\");\n\t\tvar valorReplacePonto = valorReplaceVirgula.replace(\".\",\"\");\n\t}\n\n\treturn valorReplacePonto;\n}", "title": "" }, { "docid": "57a689cb282cf85d7da01cea6e820f9f", "score": "0.60646063", "text": "decrire() {\r\n return `${this.noms} a ${this.sante} points de vie, ${ this.pouvoirs} en pouvoir, ${this.xps} points d'expérience, une ${this.armures} et en point d'attaque ${this.pointsDattaque}`;\r\n \r\n }", "title": "" }, { "docid": "b5e536385f2816cdd0f722dc7dd4b7d7", "score": "0.60605997", "text": "function cargarPromedio() {\n var prom = segundoParcial.empleados.reduce(function (anterior, actual) {\n return Number(anterior) + Number(actual.edad);\n }, 0) / segundoParcial.empleados.length;\n if (!isNaN(prom)) {\n $(\"#promedio\").val(prom + \" años\");\n }\n else {\n $(\"#promedio\").val(\"Sin datos\");\n }\n }", "title": "" }, { "docid": "cb44c442a172efa54a091815e805c4b6", "score": "0.6051851", "text": "function comienzo() {\n palabra = palabras[random(0, 9)];\n cadena = palabra.split('');\n\n for (let index = 0; index < cadena.length; index++) {\n\n\n if (index == 0 || index == cadena.length - 1) {\n $(\"#controles\").append(\"<span id=\" + index + \">\" + cadena[index] + \"</span>\");\n //acumula las letras de las pistas y las muestra como usadas\n letrasusadas += cadena[index];\n $(\"#usadas\").append(\"<span> \" + cadena[index] + \" </span>\");\n } else {\n //dibuja los guiones\n $(\"#controles\").append(\"<span id=\" + index + \"> _ </span\");\n }\n }\n\n }", "title": "" }, { "docid": "db5cf4a3dd8d056a67d04e8607ae3d82", "score": "0.60420454", "text": "function recorrerCarrito() {\n carrito.forEach(producto => {\n acumularTitulosCarrito = acumularTitulosCarrito + ' ' + producto.titulo + ',';\n });\n}", "title": "" }, { "docid": "0f8be97ca19da0e8fe79dab0fffa7aba", "score": "0.6028549", "text": "getBiografia(){\n //(super) voy invocar el metodo de la clase Padre(Persona)\n return super.getBiografia() + `Puesto: ${this.puesto}, Salario ${this.sueldo} `\n }", "title": "" }, { "docid": "889a105a635cafc2903a88876f0f8a35", "score": "0.598854", "text": "function formatPrezzo(prezzo) {\n var s = String(prezzo);\n return prezzo ? s.slice(0, -2) + ',' + s.slice(-2) : '0';\n }", "title": "" }, { "docid": "fb39b4764bdd417885be414c27a99caa", "score": "0.597351", "text": "decrirePerso() {\r\n const description = this.nom + \"possède\" + this.sante + \"et fait \" + this.degat + \" points de dégâts avec son arme\";\r\n return description;\r\n }", "title": "" }, { "docid": "a9bc893570482f2d774007521eec4f2b", "score": "0.5949109", "text": "function formataCelular()\r\n{\r\nvar celular=document.cadastro.celular.value;\r\nif (celular.length==0)\r\n{document.cadastro.celular.value=document.cadastro.celular.value+\"(\";\r\n}\r\nelse if(celular.length==3) \r\n{document.cadastro.celular.value=document.cadastro.celular.value+\")\";\r\n}\r\nelse if (celular.length==9)\r\n{document.cadastro.celular.value=document.cadastro.celular.value+\"-\";\r\n}\r\n}", "title": "" }, { "docid": "053ca8e2d9264cd9ccd21dc316123806", "score": "0.59361655", "text": "function formataValorLabel(campo) {\r\n\tvar vr = campo;\r\n\tvar tam = campo.length;\r\n\r\n\tif ( tam <= 2 ){ \r\n \t\tcampo = vr ; }\r\n \tif ( (tam > 2) && (tam <= 5) ){\r\n \t\tcampo = vr.substr( 0, tam - 2 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 6) && (tam <= 8) ){\r\n \t\tcampo = vr.substr( 0, tam - 5 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 9) && (tam <= 11) ){\r\n \t\tcampo = vr.substr( 0, tam - 8 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 12) && (tam <= 14) ){\r\n \t\tcampo = vr.substr( 0, tam - 11 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 15) && (tam <= 18) ){\r\n \t\tcampo = vr.substr( 0, tam - 14 ) + '.' + vr.substr( tam - 14, 3 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ;}\r\n \treturn campo;\r\n \t\t\r\n}", "title": "" }, { "docid": "fe9931a954fdfd23c9239e78febf5c5d", "score": "0.5874487", "text": "function formataValor3(campo) {\r\n\t\tvar vr = campo;\r\n\t\tvar tam = campo.length;\r\n\r\n\t\tif ( tam < 2 ){ \r\n\t \t\tcampo = '0,0' + vr ; }\r\n\t\tif ( tam == 2 ){ \r\n\t \t\tcampo = '0,' + vr ; }\t\t\t\r\n\t \tif ( (tam > 2) && (tam <= 5) ){\r\n\t \t\tcampo = vr.substr( 0, tam - 2 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n\t \tif ( (tam >= 6) && (tam <= 8) ){\r\n\t \t\tcampo = vr.substr( 0, tam - 5 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n\t \tif ( (tam >= 9) && (tam <= 11) ){\r\n\t \t\tcampo = vr.substr( 0, tam - 8 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n\t \tif ( (tam >= 12) && (tam <= 14) ){\r\n\t \t\tcampo = vr.substr( 0, tam - 11 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n\t \tif ( (tam >= 15) && (tam <= 18) ){\r\n\t \t\tcampo = vr.substr( 0, tam - 14 ) + '.' + vr.substr( tam - 14, 3 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ;}\r\n\t \treturn campo;\r\n\t \t\t\r\n\t}", "title": "" }, { "docid": "e7556c4b5c2adca7779dc5e8ea398537", "score": "0.5865664", "text": "function formataDataBrasileira(data){\n if ((data !== '') && (data != null)){\n let dia = data.substr(8,2);\n let mes = data.substr(5,2);\n let ano = data.substr(0,4);\n return dia + '/' + mes + '/' + ano;\n } \n else\n return '';\n}", "title": "" }, { "docid": "7879d11dda1181cafe4a48058b1f7473", "score": "0.5849451", "text": "function pegarNome() {\n var ondeMostraONome = document.getElementById(\"nome-cliente\");\n var ondePegaONome = document.getElementById(\"nome\");\n\n if (ondePegaONome.value) {\n ondeMostraONome.innerText = ondePegaONome.value + \",\";\n } else {\n ondeMostraONome.innerText = \"Por onde devemos contatar?\";\n }\n }", "title": "" }, { "docid": "68cfa793b5b164e86d381f67c8f161c5", "score": "0.5845957", "text": "function partes_relacion1(expresion) {\n var objeto = [];\n var text = \"\";\n var partes = \"\";\n var hacer = false;\n\n for (var i = 0; i < expresion.length; i++){\n /*\n cuando encuentra un partesis derecho parte por comas el text acomulado\n y guarda en el arreglo un object con atributo izquierda y derecha y vacia el text\n */\n if(expresion.charAt(i)==')'){\n hacer = false;\n partes = text.split(\",\");\n objeto.push({izquierda:partes[0],derecha:partes[1],valor:parseFloat(partes[2]),color:'#f1660f'});\n text = \"\";\n }\n //cuando encuentra parentesis izquierdo habilita hacer para guardar el acomulado de string\n if(expresion.charAt(i)=='('){\n i++;\n hacer = true;\n }\n //guarda texto acomulado\n if(hacer){\n text = text + expresion.charAt(i);\n }\n }\n\n return objeto; \n}", "title": "" }, { "docid": "4a42cf84aec9af4d8660e8e2405f68ec", "score": "0.5836925", "text": "function buscaPais(){\n\tvar texto = $(DIV_TABELA_DETALHES + \" input[name=em_paiscod]\").val().trim();\n\tvar naopesquisa = false;\n if (texto.trim() === ''){\n naopesquisa = true;\n }\n\n if (texto == $(DIV_TABELA_DETALHES + \" input[name=em_paiscod]\").attr('em_paiscod')){\n return;\n }\n\n cnsPais_abre(texto.trim(), 'box-inc-pais', '1', naopesquisa);\n}", "title": "" }, { "docid": "b20cedd82054ddae4196d246befcf2c2", "score": "0.57974523", "text": "function prendi_notificati(){\n var stringa = \"\";\n for(i = 0; i < posizioneNotificato; i++){\n if(i == (posizioneNotificato-1)){\n stringa += programmiObj.programmi[posizioneProgramma].notifiche[i].id;\n }else{\n stringa += programmiObj.programmi[posizioneProgramma].notifiche[i].id + \",\";\n } \n }\n var vett = new Array(stringa);\n modulo.notificati.value = vett;\n}", "title": "" }, { "docid": "85d6a13b98deddbf9cf7f4d58b9e192d", "score": "0.5787144", "text": "static tiposEspecialidad(){\n return [\"medico\",\"enfermero\",\"celador\"];\n }", "title": "" }, { "docid": "ab0b20b39ac0642b61fe52347b137732", "score": "0.57687014", "text": "toString(){\n //se aplica poliformismo(multiples formas en tiempo de ejecucion)\n //el metodo que se ejecuta depende si es una referencia de tipo padre\n //o de tipo hijo \n return this.nombreCompleto();\n }", "title": "" }, { "docid": "1f325a9ec22351f6a35e9d8a173467e1", "score": "0.5767059", "text": "function removeMascaraValor(texto){\n let aux = \"\";\n aux = texto.replace(/\\./g,\"\").replace(/\\,/g,\".\").replace(/\\R$/g,\"\");\n return aux;\n}", "title": "" }, { "docid": "367d733c8e9f0272a30a90b64984cbf0", "score": "0.5740902", "text": "function getTextoSSA(Linea) {\n\tvalor1 = Linea.indexOf(\",\", 0);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\tvalor1 = Linea.indexOf(\",\", valor1 + 1);\n\t//valor1=Linea.indexOf(\"0000,,\",0);\n\tTexto = Linea.substring(valor1 + 1, Linea.length);\n\treturn Texto;\n\t//alert(Texto);\n}", "title": "" }, { "docid": "0630a220e3ecb56b835262f27ec8542b", "score": "0.5735039", "text": "function imprimirArreglo( encabezado, elArreglo, salida ){ \r\n\tsalida.innerHTML = encabezado + elArreglo.join( \" \" ); \r\n} // fin de la función imprimirArreglo ", "title": "" }, { "docid": "610080c4859ea75cf12ab0414c9bf39d", "score": "0.5721936", "text": "function inviertePalabras(cad) {\r\n \r\n }", "title": "" }, { "docid": "e7e860ad68a0115af36fdfb8651305c8", "score": "0.5720863", "text": "function SubstituiVirgulaPorPonto(campo)\n{\n\tcampo.value = campo.value.replace(/,/gi, \".\");\n}", "title": "" }, { "docid": "5ef00686b6313f8daf49507a00b30c37", "score": "0.5716929", "text": "mostrar(){\n // se revisa si existe la cabeza\n if(this.cabeza === null){\n return \"No existe la cabeza no hay mucho que mostrar X-X\";\n }\n // existe la cabeza la lista enlazada tiene datos\n // variable auxiliar que usaremos para ir recorriendo \n // auxiliarmente entre cada nodo de la lista\n let nodo_actual = this.cabeza;\n // variable que usaremos para irle concatenando el valor\n // o dato que tiene cada nodo\n let respuesta = \"\";\n // mientras cada nodo_actual en su atributo siguiente tenga \n // otro objecto lo recorrera\n while(nodo_actual.siguiente){\n // valido si la informacion es string\n if(typeof(nodo_actual.info)==\"string\"){\n // concateno la informacion\n respuesta += nodo_actual.info += ' -> ';\n }else{\n // no es string simplemente imprimo el tipo de dato\n respuesta += `tipo: ${typeof(nodo_actual.info)} -> `;\n }\n \n // cambiamos el valor del nodo_actual por el siguiente nodo\n nodo_actual = nodo_actual.siguiente;\n }\n // se termina concatenando null o cola\n respuesta += 'null o cola';\n return respuesta;\n }", "title": "" }, { "docid": "79c1d6075d19851f49d2ab34d17fe790", "score": "0.57113284", "text": "nombreCompleto()\r\n {\r\n return super.nombreCompleto()+\" \"+this.departamento;\r\n }", "title": "" }, { "docid": "365325e58af4cc7ebac218a1f318a7f8", "score": "0.5696571", "text": "function abrirBlancosCercanos(fila, columna, numeroFilas, numeroColumnas) {\n /*\n Se recorren en un ciclo for las 8 adyacencias (arriba, izq, der, etc etc)\n Por cada adyacencia: \n 1. Si es numero, marca destapado.\n 2. Si es un blanco y no esta destapado, marca destapado y llama a esta misma funcion\n */\n \n // Declarando variables para adyacencias\n var arribaIzq = null, arriba = null, arribaDer = null, izquierda = null;\n var abajoIzq = null, abajo = null, abajoDer = null, derecha = null;\n // Asignando Variables\n if (fila > 0 && columna > 0) {\n arribaIzq = filas[fila - 1][columna - 1];\n }\n if (columna > 0) {\n izquierda = filas[fila][columna - 1]\n if (fila < numeroFilas - 1) {\n abajoIzq = filas[fila + 1][columna - 1]\n }\n }\n if (fila > 0) {\n arriba = filas[fila - 1][columna]\n if (columna < numeroColumnas - 1) {\n arribaDer = filas[fila - 1][columna + 1]\n }\n }\n if (columna < numeroColumnas - 1) {\n derecha = filas[fila][columna + 1]\n }\n if (fila < numeroFilas - 1) {\n abajo = filas[fila + 1][columna]\n }\n if ((fila < numeroFilas - 1) && (columna < numeroColumnas - 1)) {\n abajoDer = filas[fila + 1][columna + 1]\n }\n // Verificando adyacencias\n if (arribaIzq != null) {\n if (arribaIzq.contenido == 'numero') {\n arribaIzq.estado = 'descubierto'\n }\n if (arribaIzq.contenido == 'blanco' && arribaIzq.estado != 'descubierto') {\n arribaIzq.estado = \"descubierto\";\n abrirBlancosCercanos(fila - 1, columna - 1, numeroFilas, numeroColumnas)\n }\n }\n if (arriba != null) {\n if (arriba.contenido == 'numero') {\n arriba.estado = 'descubierto'\n }\n if (arriba.contenido == 'blanco' && arriba.estado != 'descubierto') {\n arriba.estado = \"descubierto\";\n abrirBlancosCercanos(fila - 1, columna, numeroFilas, numeroColumnas)\n }\n }\n if (arribaDer != null) {\n if (arribaDer.contenido == 'numero') {\n arribaDer.estado = 'descubierto'\n }\n if (arribaDer.contenido == 'blanco' && arribaDer.estado != 'descubierto') {\n arribaDer.estado = \"descubierto\";\n abrirBlancosCercanos(fila - 1, columna + 1, numeroFilas, numeroColumnas)\n }\n }\n if (derecha != null) {\n if (derecha.contenido == 'numero') {\n derecha.estado = 'descubierto'\n }\n if (derecha.contenido == 'blanco' && derecha.estado != 'descubierto') {\n derecha.estado = \"descubierto\";\n abrirBlancosCercanos(fila, columna + 1, numeroFilas, numeroColumnas)\n }\n }\n if (abajoDer != null) {\n if (abajoDer.contenido == 'numero') {\n abajoDer.estado = 'descubierto'\n }\n if (abajoDer.contenido == 'blanco' && abajoDer.estado != 'descubierto') {\n abajoDer.estado = \"descubierto\";\n abrirBlancosCercanos(fila + 1, columna + 1, numeroFilas, numeroColumnas)\n }\n }\n if (abajo != null) {\n if (abajo.contenido == 'numero') {\n abajo.estado = 'descubierto'\n }\n if (abajo.contenido == 'blanco' && abajo.estado != 'descubierto') {\n abajo.estado = \"descubierto\";\n abrirBlancosCercanos(fila + 1, columna, numeroFilas, numeroColumnas)\n }\n }\n if (abajoIzq != null) {\n if (abajoIzq.contenido == 'numero') {\n abajoIzq.estado = 'descubierto'\n }\n if (abajoIzq.contenido == 'blanco' && abajoIzq.estado != 'descubierto') {\n abajoIzq.estado = \"descubierto\";\n abrirBlancosCercanos(fila + 1, columna - 1, numeroFilas, numeroColumnas)\n }\n }\n if (izquierda != null) {\n if (izquierda.contenido == 'numero') {\n izquierda.estado = 'descubierto'\n }\n if (izquierda.contenido == 'blanco' && izquierda.estado != 'descubierto') {\n izquierda.estado = \"descubierto\";\n abrirBlancosCercanos(fila, columna - 1, numeroFilas, numeroColumnas)\n }\n }\n}", "title": "" }, { "docid": "74188cfb4d87ef22b7b00b5778741dfa", "score": "0.569379", "text": "getSep(){\n if (this.state.sepia > 0) {\n return `sepia(${this.state.sepia}%) `;\n }else { return ''; }\n }", "title": "" }, { "docid": "062549d6b86acd22eee82fea0c03ce35", "score": "0.56884295", "text": "function formataValor(obj) {\n obj.value = soNumero(obj.value);\n if (obj.value.length == 0) {\n obj.value = \"0,00\";\n }\n else if (obj.value.length < 3) {\n obj.value = obj.value + \",00\";\n }\n else {\n formataValorDigitando(obj);\n }\n}", "title": "" }, { "docid": "2ddbb62f7585eff4faa732147123ba0f", "score": "0.56841093", "text": "function prendi_giorni(){\n var stringa = \"\";\n for(i = 0; i < nPeriodicita; i++){\n if(i == (nPeriodicita-1)){\n stringa += programmiObj.programmi[posizioneProgramma].periodicita[i].giorno + \",\" + programmiObj.programmi[posizioneProgramma].periodicita[i].ora;\n }else{\n stringa += programmiObj.programmi[posizioneProgramma].periodicita[i].giorno + \",\" + programmiObj.programmi[posizioneProgramma].periodicita[i].ora + \",\";\n } \n }\n var vett = new Array(stringa);\n modulo.calendario.value = vett;\n}", "title": "" }, { "docid": "3d3333d681def16baeabab5ad1ab4562", "score": "0.56799084", "text": "function ParDeBarreiras(altura, abertura, x) {\n this.elemento = novoElemento('div', 'par-de-barreiras')\n\n this.superior = new Barreira(true)\n this.inferior = new Barreira(false)\n\n this.elemento.appendChild(this.superior.elemento)\n this.elemento.appendChild(this.inferior.elemento)\n\n this.sortearAbertura = () => {//this deixa acessivel fora do metodo\n const alturaSuperior = Math.random() * (altura - abertura)\n const alturaInferior = altura - abertura - alturaSuperior\n this.superior.setAltura(alturaSuperior)\n this.inferior.setAltura(alturaInferior)\n }\n\n this.getX = () => parseInt(this.elemento.style.left.split('px')[0])\n this.setX = (x) => this.elemento.style.left = `${x}px`\n this.getLargura = () => this.elemento.clientWidth\n\n this.sortearAbertura()\n this.setX(x)\n}", "title": "" }, { "docid": "e0028d309091464a28c5a0d4fab68363", "score": "0.56796753", "text": "function montoEscrito(monto)\n{\n\n var posicion ;\n posicion=monto.indexOf(\".\");\n var dif;\n dif=monto.length-posicion;\n\n if (posicion==-1)\n monto=monto + \"00\" ;\n if(dif==2)\n monto=monto + \"0\" ;\n\n\n monto=monto.replace(\".\",\"\")\n monto=\"00000000000000\".substr(1,14 - monto.length ) + monto;\n\n\tUnidad = new Array(10);\n\tDecena = new Array(10);\n\tCentena = new Array(10);\n\tDeca = new Array(10);\n\tVenti\t= new Array(10);\n\n\tUnidad[1] = new String(\"UN\");\n\tUnidad[2] = new String(\"DOS\");\n\tUnidad[3] = new String(\"TRES\");\n\tUnidad[4] = new String(\"CUATRO\");\n\tUnidad[5] = new String(\"CINCO\");\n\tUnidad[6] = new String(\"SEIS\");\n\tUnidad[7] = new String(\"SIETE\");\n\tUnidad[8] = new String(\"OCHO\");\n\tUnidad[9] = new String(\"NUEVE\");\n\n\tDecena[1] = new String(\"DIEZ\");\n\tDecena[2] = new String(\"VEINTE\");\n\tDecena[3] = new String(\"TREINTA\");\n\tDecena[4] = new String(\"CUARENTA\");\n\tDecena[5] = new String(\"CINCUENTA\");\n\tDecena[6] = new String(\"SESENTA\");\n\tDecena[7] = new String(\"SETENTA\");\n\tDecena[8] = new String(\"OCHENTA\");\n\tDecena[9] = new String(\"NOVENTA\");\n\n\tCentena[1] = new String(\"CIEN\");\n\tCentena[2] = new String(\"DOSCIENTOS\");\n\tCentena[3] = new String(\"TRESCIENTOS\");\n\tCentena[4] = new String(\"CUATROCIENTOS\");\n\tCentena[5] = new String(\"QUINIENTOS\");\n\tCentena[6] = new String(\"SEISCIENTOS\");\n\tCentena[7] = new String(\"SIETECIENTOS\");\n\tCentena[8] = new String(\"OCHOCIENTOS\");\n\tCentena[9] = new String(\"NOVECIENTOS\");\n\n\tDeca[1] = new String(\"ONCE\");\n\tDeca[2] = new String(\"DOCE\");\n\tDeca[3] = new String(\"TRECE\");\n\tDeca[4] = new String(\"CATORCE\");\n\tDeca[5] = new String(\"QUINCE\");\n\tDeca[6] = new String(\"DIECISEIS\");\n\tDeca[7] = new String(\"DIECISIETE\");\n\tDeca[8] = new String(\"DIECIOCHO\");\n\tDeca[9] = new String(\"DIECINUEVE\");\n\n\tVenti[1] = new String(\"VEINTIUN\");\n\tVenti[2] = new String(\"VEINTIDOS\");\n\tVenti[3] = new String(\"VEINTITRES\");\n\tVenti[4] = new String(\"VEINTICUATRO\");\n\tVenti[5] = new String(\"VEINTICINCO\");\n\tVenti[6] = new String(\"VEINTISEIS\");\n\tVenti[7] = new String(\"VEINTISIETE\");\n Venti[8] = new String(\"VEINTIOCHO\");\n\tVenti[9] = new String(\"VEINTINUEVE\");\n\n\tParteEntera = new String(\"\");\n\tParteDecimal = new String(\"00\");\n\tEspacio = new String(\" \");\n\n\tMil = new String(\"MIL\");\n\tMillones = new String(\"MILLONES\");\n\tSalida = new String(\"\");\n\n\tMonto = new String(monto); //creo Monto como string para poder usar los metodos\n\t//quitar el formato el importe\n\t//Rellena con ceros a la izquiera\n\n\tParteDecimal = Monto.substr(monto.length-2,2);\n\tParteEntera = Monto.substr(0,12);\n\n MonedaDisp = \"DOLARES AMERICANOS\";\n\n//\tSalida = Espacio + MonedaDisp + Espacio;\n\tSalida = Espacio;\n\tif (ParteEntera == \"000000000000\")\n\t\tSalida = Salida + \"CERO\" + Espacio;\n\n\t//*********************************************************************\n\t// MIL MILLONES\n\t//*********************************************************************\n\n\tvar Paso1 = ParteEntera.substr(0,1);\n\tvar Paso2 = ParteEntera.substr(1,1);\n\tvar Paso3 = ParteEntera.substr(2,1);\n\n\tif (Paso1==\"0\"){} //case 0\n\n\telse\n\t{\n\t\tif (Paso1==\"1\") //case 1\n\t\t{\n\t\t\tif ( (Paso2!=\"0\") || (Paso3!=\"0\") )\n\t\t\t\tSalida = Salida + \"CIENTO\";\n\t\t\telse\n\t\t\t\tSalida = Salida + Centena[1];\n\t\t}\n\t\telse\n\t\t\tSalida = Salida + Centena[Paso1]; //case 2,3,4,5,6,7,8,9\n\t}\n\n\tif ( (Salida.length!=0) && (Paso1!=\"0\") )\n\t\tSalida = Salida + Espacio;\n\n\t//Segundo Digito\n\tif (Paso2==\"0\"){} //case 0\n\n\telse\n\t{\n\t\tif (Paso2==\"1\") //case 1\n\t\t{\n\t\t\tif (Paso3==\"0\")\n\t\t\t\tSalida = Salida + Decena[1];\n\t\t\telse\n\t\t\t\tSalida = Salida + Deca[Paso3];\n\t\t}\n\t\telse\n\t\t\tif (Paso2==\"2\") //case 2\n\t\t\t{\n\t\t\t\tif (Paso3==\"0\")\n\t\t\t\t\tSalida = Salida + Decena[2];\n\t\t\t\telse\n\t\t\t\t\tSalida = Salida + Venti[Paso3];\n\t\t\t}\n\t\t\telse //case 2,3,4,5,6,7,8,9\n\t\t\t\tSalida = Salida + Decena[Paso2];\n\t}\n\n\tif ( (Salida.length!=0) && (Paso2!=\"0\") )\n\t\tSalida = Salida + Espacio\n\n\t//Tercer Digito\n\tif ( (Paso2!=\"1\") && (Paso2!=\"2\") )\n\t{\n\t\tif (Paso3==\"0\"){} //case 0\n\t\telse //case 1,2,3,4,5,6,7,8,9\n\t\t{\n\t\t\tif (Paso2>=\"3\")\n\t\t\t\tSalida = Salida + \"Y \";\n\t\t\tSalida = Salida + Unidad[Paso3];\n\t\t}\n\t}\n\n\tif (Salida.length!=0)\n\t{\n\t\tif ( (Paso1==\"0\") && (Paso2==\"0\") && (Paso3==\"0\") ){}\n\t\telse\n\t\t\tSalida = Salida + Espacio + Mil + Espacio + Millones + Espacio;\n\t}\n\t//*********************************************************************\n\t// MILLONES\n\t//*********************************************************************\n\t//Primer Digito\n\tPaso1 = ParteEntera.substr(3,1);\n\tPaso2 = ParteEntera.substr(4,1);\n\tPaso3 = ParteEntera.substr(5,1);\n\n\tif (Paso1==\"0\"){}\t\t\t //case 0\n\n\telse\n\t{\n\t\tif (Paso1==\"1\") //case 1\n\t\t{\n\t\t\tif ((Paso2!=\"0\") || (Paso3!=\"0\"))\n\t\t\t\tSalida = Salida + \"CIENTO\";\n\t\t\telse\n\t\t\t\tSalida = Salida + Centena[1];\n\t\t}\n\t\telse //case 2,3,4,5,6,7,8,9\n\t\t\tSalida = Salida + Centena[Paso1];\n\t}\n\n\tif ( (Salida.length!=0) && (Paso1!=\"0\") )\n\t\tSalida = Salida + Espacio;\n\n\t//Segundo Digito\n\tif (Paso2==\"0\"){}\t //case 0\n\n\telse\n\t{\n\t\tif (Paso2==\"1\") //case 1\n\t\t{\n\t\t\tif (Paso3==\"0\")\n\t\t\t\tSalida = Salida + Decena[1];\n\t\t\telse\n\t\t\t\tSalida = Salida + Deca[Paso3];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (Paso2==\"2\")\t //case 2\n\t\t\t{\n\t\t\t\tif (Paso3==\"0\")\n\t\t\t\t\tSalida = Salida + Decena[2];\n\t\t\t\telse\n\t\t\t\t\tSalida = Salida + Venti[Paso3];\n\t\t\t}\n\t\t\telse //case 3,4,5,6,7,8,9\n\t\t\t\tSalida = Salida + Decena[Paso2];\n\t\t}\n\t}\n\n\tif ( (Salida.length!=0) && (Paso2!=\"2\") )\n\t\tSalida = Salida + Espacio;\n\n\t//Tercer Digito\n\tif ( (Paso2!=\"1\") && (Paso2!=\"2\") )\n\t{\n\t\tif (Paso3==\"0\"){} //case 0\n\t\telse\n\t\t{\n\t\t\tif (Paso2>=\"3\") //case 1,2,3,4,5,6,7,8,9\n\t\t\t\tSalida = Salida + \"Y \";\n\t\t\tSalida = Salida + Unidad[Paso3];\n\t\t}\n\t}\n\tif (Salida.length!=0)\n\t{\n\t\tif ( (Paso1==\"0\") && (Paso2==\"0\") && (Paso3==\"0\") ){}\n\t\telse\n\t\t{\n\t\t\tSalida = Salida + Espacio + Millones;\n\t\t\tif ( (Paso1==\"0\") && (Paso2==\"0\") && (Paso3==\"1\") )\n\t\t\t\tSalida = Salida.substr(0,Salida.length-2) + Espacio;\n\t\t\tSalida = Salida + Espacio;\n\t\t}\n\t}\n\t//*********************************************************************\n\t// MILES\n\t//*********************************************************************\n\t//Primer Digito\n\tPaso1 = ParteEntera.substr(6,1);\n\tPaso2 = ParteEntera.substr(7,1);\n\tPaso3 = ParteEntera.substr(8,1);\n\n\tif (Paso1==\"0\"){} //case 0\n\telse\n\t{\n\t\tif (Paso1==\"1\") //case 1\n\t\t{\n\t\t\tif ((Paso2!=\"0\") || (Paso3!=\"0\") )\n\t\t\t\tSalida = Salida + \"CIENTO\";\n\t\t\telse\n\t\t\t\tSalida = Salida + Centena[1];\n\t\t}\n\t\telse //case 2,3,4,5,6,7,8,9\n\t\t\tSalida = Salida + Centena[Paso1];\n\t}\n\n\tif ( (Salida.length!=0) && (Paso1!=\"0\") )\n\t\tSalida = Salida + Espacio;\n\n\t//Segundo Digito\n\tif (Paso2==\"0\"){} //case 0\n\telse\n\t{\n\t\tif (Paso2==\"1\") //case 1\n\t\t{\n\t\t\tif (Paso3==\"0\")\n\t\t\t\tSalida = Salida + Decena[1];\n\t\t\telse\n\t\t\t\tSalida = Salida + Deca[Paso3];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (Paso2==\"2\") //case 2\n\t\t\t{\n\t\t\t\tif (Paso3==\"0\")\n\t\t\t\t\tSalida = Salida + Decena[2];\n\t\t\t\telse\n\t\t\t\t\tSalida = Salida + Venti[Paso3];\n\t\t\t}\n\t\t\telse //case 3,4,5,6,7,8,9\n\t\t\t\tSalida = Salida + Decena[Paso2];\n\t\t}\n\t}\n\tif ( (Salida.length!=0) && (Paso2!=\"0\") )\n\t\tSalida = Salida + Espacio;\n\n\t//Tercer Digito\n\tif ( (Paso2!=\"1\") && (Paso2!=\"2\") )\n\t{\n\t\tif (Paso3==\"0\"){} //case 0\n\t\telse\n\t\t{\n\t\t\tif (Paso2>=\"3\") //case 1,2,3,4,5,6,7,8,9\n\t\t\t\tSalida = Salida + \"Y \";\n\t\t\tSalida = Salida + Unidad[Paso3];\n\t\t}\n\t}\n\n\tif (Salida.length!=0)\n\t{\n\t\tif ( (Paso1==\"0\") && (Paso2==\"0\") && (Paso3==\"0\") ){}\n\t\telse\n\t\t\tSalida = Salida + Espacio + Mil + Espacio;\n\t}\n\n\t//*********************************************************************\n\t// UNIDADES\n\t//*********************************************************************\n\t//Primer Digito\n\tPaso1 = ParteEntera.substr(9,1);\n\tPaso2 = ParteEntera.substr(10,1);\n\tPaso3 = ParteEntera.substr(11,1);\n\n\tif (Paso1==\"0\"){} //case 0\n\n\telse\n\t{\n\t\tif (Paso1==\"1\") //case 1\n\t\t{\n\t\t\tif ( (Paso2!=\"0\") || (Paso3!=\"0\") )\n\t\t\t\tSalida = Salida + \"CIENTO\";\n\t\t\telse\n\t\t\t\tSalida = Salida + Centena[1];\n\t\t}\n\t\telse\n\t\t\tSalida = Salida + Centena[Paso1]; //case 2,3,4,5,6,7,8,9\n\t}\n\tif ( (Salida.length!=0) && (Paso1!=\"0\") )\n\t\tSalida = Salida + Espacio;\n\n\t//Segundo Digito\n\tif (Paso2==\"0\"){} //case 0\n\telse\n\t{\n\t\tif (Paso2==\"1\") //case 1\n\t\t{\n\t\t\tif (Paso3==\"0\")\n\t\t\t\tSalida = Salida + Decena[1];\n\t\t\telse\n\t\t\t\tSalida = Salida + Deca[Paso3];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (Paso2==\"2\") //case 2\n\t\t\t{\n\t\t\t\tif (Paso3==\"0\")\n\t\t\t\t\tSalida = Salida + Decena[2];\n\t\t\t\telse\n\t\t\t\t\tSalida = Salida + Venti[Paso3];\n\t\t\t}\n\t\t\telse //case 3,4,5,6,7,8,9\n\t\t\t\tSalida = Salida + Decena[Paso2];\n\t\t}\n\t}\n\tif ( (Salida.length!=0) && (Paso2!=\"0\") )\n\t\tSalida = Salida + Espacio;\n\n\t//Tercer Digito\n\tif ( (Paso2!=\"1\") && (Paso2!=\"2\") )\n\t{\n\t\tif (Paso3==\"0\"){} //case 0\n\n\t\telse //case 1,2,3,4,5,6,7,8,9\n\t\t{\n\t\t\tif (Paso2>=\"3\")\n\t\t\t\tSalida = Salida + \"Y \";\n\t\t\tSalida = Salida + Unidad[Paso3];\n\t\t}\n\t}\n//\tSalida = Salida + Espacio + \"CON\" + Espacio + ParteDecimal + \"/100\" + Espacio + MonedaDisp ;\n Salida = Salida + Espacio + MonedaDisp ;\n\treturn Salida;\n}", "title": "" }, { "docid": "37ded8cba143759f82be75522b9101f3", "score": "0.5667265", "text": "function convertirTexto(texto) {\n let nuevoTexto = \"\"\n \n if (texto !== null) {\n // elimino caracteres en blanco al inicio y al final \n texto = texto.trim()\n // lo convierto en array de palabras usando \" \" como separador\n let listaPalabras = texto.split(\" \")\n //Guardo la longitud del array\n let c = listaPalabras.length\n // recorro el arreglo y transaformo cada palabra\n for (let i=0; i<c; i++){\n let primera = listaPalabras[i].slice(0, 1)\n let segunda= listaPalabras[i].slice(1, 2).toUpperCase()\n let medio= listaPalabras[i].slice(2, listaPalabras[i].lenght)\n let final=\"ay, \"\n // Si la última palabra de la lista, cierro con \"ay!\"\n if (i===(c-1)) {\n final=\"ay!\"\n } \n nuevoTexto = nuevoTexto + segunda + medio + primera + final \n } \n \n }\n return nuevoTexto\n}", "title": "" }, { "docid": "d64344d03a043f3d9955867bdb3fb94e", "score": "0.5660837", "text": "function FormatearCantidad(cantidad) {\r\n //Seperates the components of the number\r\n var n = cantidad.toString().split(\".\");\r\n //Comma-fies the first part\r\n n[0] = n[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n //Combines the two sections\r\n return n.join(\".\");\r\n}", "title": "" }, { "docid": "dea701391e3c6af965f6c42c7386008d", "score": "0.5652859", "text": "function incluyeOpcionVacia(datos) {\n\t var datos2 = new Array();\n\t datos2[0] = ['',''];\n\t \n\t for (var i=0;i<datos.length;i++) {\n\t \tdatos2[i+1] = datos[i];\n\t }\n\t return datos2;\n\t}", "title": "" }, { "docid": "a099ca187145a5b34001b329d32b1370", "score": "0.5639244", "text": "function Mesas(Mesa) {\n\tcurrentCompra = [];\n\tcurMesa = Mesa;\n\tvida.innerHTML = \"\";\n\ttotalCompra = 0;\n\tif (Mesa == 0) {\n\t\tcurrentMesa.innerHTML = \"UBER\";\n\t\tesUber = true;\n\t} else {\n\t\tcurrentMesa.innerHTML = \"MESA \" + curMesa;\n\t\tesUber = false;\n\t}\n\tTotal.innerHTML = \"$\" + totalCompra;\n\tif (cuentaMesas[Mesa].items != null) {\n\t\tfor (i = 0; i < cuentaMesas[Mesa].items.length; i++) {\n\t\t\tcurrentCompra.push({ name: cuentaMesas[Mesa].items[i].name, price: cuentaMesas[Mesa].items[i].price, code: cuentaMesas[Mesa].items[i].code });\n\t\t\ttotalCompra += cuentaMesas[Mesa].items[i].price;\n\t\t}\n\t\tfor (i = 0; i < currentCompra.length; i++) {\n\t\t\tvida.innerHTML += currentCompra[i].name + \" $\" + currentCompra[i].price + \"<br />\";\n\t\t}\n\t\tTotal.innerHTML = \"$\" + totalCompra;\n\t}\n}", "title": "" }, { "docid": "de79de0b71be350c8c809c81199f07a7", "score": "0.5637948", "text": "function gestioneImpegnoCaricato(e) {\n var imp = e.subimpegno ? e.subimpegno : e.impegno;\n var capitolo = imp.capitoloUscitaGestione;\n var provvedimento = imp.attoAmministrativo;\n\n // Ottengo la disponibilita\n var disponibilita = imp.disponibilitaLiquidare || 0;\n // Carico i dati\n // Disponibilita\n $(\"#SPAN_disponibileMovimentoGestione\").html(disponibilita.formatMoney());\n\n // Capitolo\n if(capitolo) {\n $(\"#numeroCapitoloCapitolo\").html(createStringForHtml(capitolo.numeroCapitolo));\n $(\"#numeroArticoloCapitolo\").html(createStringForHtml(capitolo.numeroArticolo));\n $(\"#descrizioneCapitolo\").html(createStringForHtml(capitolo.descrizione));\n $(\"#numeroUEBCapitolo\").html(createStringForHtml(capitolo.numeroUEB));\n $(\"#strutturaAmministrativoContabileCapitolo\").html(createStringForHtml(capitolo.strutturaAmministrativoContabile && capitolo.strutturaAmministrativoContabile.codice || \"\"));\n $(\"#tipoFinanziamentoCapitolo\").html(createStringForHtml(capitolo.tipoFinanziamento && capitolo.tipoFinanziamento.codice || \"\"));\n }\n // Atto Amministrativo\n if(provvedimento) {\n $(\"#tipoAttoAttoAmministrativo\").html(createStringForHtml(provvedimento.tipoAtto && provvedimento.tipoAtto.codice || \"\"));\n $(\"#annoAttoAmministrativo\").html(createStringForHtml(provvedimento.anno));\n $(\"#numeroAttoAmministrativo\").html(createStringForHtml(provvedimento.numero));\n $(\"#strutturaAmmContabileAttoAmministrativo\").html(createStringForHtml(provvedimento.strutturaAmmContabile && provvedimento.strutturaAmmContabile.codice || \"\"));\n $(\"#oggettoAttoAmministrativo\").html(createStringForHtml(provvedimento.oggetto));\n $(\"#statoOperativoAttoAmministrativo\").html(createStringForHtml(provvedimento.statoOperativo));\n }\n\n // Mostro i dati\n $(\"#containerDisponibileMovimentoGestione\").removeClass(\"hide\");\n $(\"#datiCapitoloStrutturaMovimentoGestione\").removeClass(\"hide\");\n }", "title": "" }, { "docid": "10814df1de84e67ae79f9f59a7d84e6d", "score": "0.56351596", "text": "function calculaDados(actual_Potion, callback) {\n var preco_normal = actual_Potion.preconormal.trim();\n var preco_promo = actual_Potion.precopromo.trim();\n var num_parc = actual_Potion.parcelas;\n var val_parc_n = 0;\n var economia_n = 0;\n\n if (preco_promo === preco_normal) {\n preco_promo = '';\n }\n\n if (preco_normal && preco_promo) {\n preco_final = preco_promo;\n } else if (preco_normal) {\n preco_final = preco_normal;\n } else if (preco_promo) {\n preco_final = preco_promo;\n }\n\n preco_normal = preco_normal.replace(\",\", \".\");\n preco_final = preco_final.replace(\",\", \".\");\n preco_normal_n = parseFloat(preco_normal).toFixed(2);\n preco_final_n = parseFloat(preco_final).toFixed(2);\n\n economia_n = (preco_normal_n - preco_final_n).toFixed(2);\n\n if (num_parc && num_parc > 0) {\n val_parc_n = (preco_final_n / num_parc).toFixed(2);\n }\n\n if (preco_normal !== '') {\n preco_normal = preco_normal_n.toString();\n }\n preco_final = preco_final_n.toString();\n economia = economia_n.toString();\n parcela = val_parc_n.toString();\n\n preco_normal = preco_normal.replace(\".\", \",\");\n preco_final = preco_final.replace(\".\", \",\");\n economia = economia.replace(\".\", \",\");\n parcela = parcela.replace(\".\", \",\");\n\n retorno = preco_normal + \"~\";\n retorno += preco_promo + \"~\";\n retorno += preco_final + \"~\";\n retorno += num_parc + \"~\";\n retorno += parcela + \"~\";\n retorno += economia + \"~\";\n if (typeof callback === \"function\") {\n callback(retorno);\n }\n }", "title": "" }, { "docid": "e901cd304b76395d67836e3c4556a30d", "score": "0.56351215", "text": "function formatoImprimirResultado_test5 (resultado){\n if (resultado){ \n let res = \"\";\n for(valor in resultado)\n res += `<p> <b>${parseInt(valor) + 1}:</b> ${resultado[valor]}</p>`;\n return res;\n }else\n return null;\n}", "title": "" }, { "docid": "dfcb11576686bbc15e08169c12ab22b9", "score": "0.5634326", "text": "function ordenarPorNombre() {\n\n}", "title": "" }, { "docid": "81a79893e89216804901e52a5ef85fb1", "score": "0.5631596", "text": "function inserirReparoInjetor(botao) {\n radios(qtd)\n busca(qtd , \" Reparo Injetor\", botao)\n}", "title": "" }, { "docid": "018e8dcf56004ca934d43817dc3fe337", "score": "0.56295216", "text": "function cracionDeCampos(iParrafo) {\n let fragment = '';\n for (var i = 0; i < parrafos[iParrafo].length; i++) {\n if (parrafos[iParrafo][i] === '*') {\n fragment += `\n <input id=\"${campo}\" type=\"text\" size=\"1\" maxlength=\"1\">\n `;\n campo++;\n } else {\n fragment += `${parrafos[iParrafo][i]}`;\n }\n }\n campo = 1;\n enunciado.innerHTML = fragment;\n }", "title": "" }, { "docid": "6e5a5f7e449742bb6cec7b136ba0baa7", "score": "0.5629039", "text": "function gørBeskedPersonlig(navn) {\n let newLine = faktiskeBesked.replace(/,/g,' ')\n console.log(newLine.replace('bro!', navn))\n}", "title": "" }, { "docid": "2dc566535752c3874a510f2595637917", "score": "0.56270874", "text": "function cadaCuantoHaceLaParada(){\n return destino.cadaCuantoParada();\n}", "title": "" }, { "docid": "b449cf7f1d6f50c1b456dee20e4a3060", "score": "0.56266063", "text": "function ParDeBarreiras(altura, abertura, x) {\n // Construtor do elemento Par de Barreiras. Passamos como parâmetro a altura do jogo, a abertura\n // entre as parreiras, e a posição x com relação à lateral esquerda do par de barreiras\n this.elemento = novoElemento('div', 'par-de-barreiras')\n\n // Instanciamos duas barreiras, a superior e inferior.\n this.superior = new Barreira(true)\n this.inferior = new Barreira(false)\n\n // O objeto a ser inserido na DOM é o .elemento, como mostra a função construtora Barreira()\n\n this.elemento.appendChild(this.superior.elemento)\n this.elemento.appendChild(this.inferior.elemento)\n\n // Este método sorteia a posição da abertura, com relação à vertical.\n this.sortearAbertura = () => {\n // A altura da barreira superior é calculada aleatóriamente\n const alturaSuperior = Math.random() * (altura - abertura)\n // A altura da barreira inferior é o que resta da altura do jogo, menos o tamanho da abertura, \n //menos a altura da barreira superior.\n const alturaInferior = altura - abertura - alturaSuperior\n this.superior.setAltura(alturaSuperior)\n this.inferior.setAltura(alturaInferior)\n }\n\n // Este método capta a posição em relação à lateral esquerda na qual o par de barreiras se encontra\n this.getX = () => parseInt(this.elemento.style.left.split('px')[0])\n // Este método define a posição em relação à lateral esquerda para o par de barreiras\n this.setX = (x) => this.elemento.style.left = `${x}px`\n // Este método capta a largura do elemento par de barreiras. É necessário para o cálculo da colisão\n // Do pássaro com a barreira.\n this.getLargura = () => this.elemento.clientWidth\n\n // Chamada do método sortearAbertura e setando a posição x do par de aberturas.\n this.sortearAbertura()\n this.setX(x)\n}", "title": "" }, { "docid": "7496f10a4987915beb206833a2819646", "score": "0.56247663", "text": "function inserirReparo(botao) {\n radios(qtd)\n busca(qtd , \" Reparo Bomba Alta\", botao)\n}", "title": "" }, { "docid": "3b57f994459b1c1e58294cc0264a56cb", "score": "0.56218016", "text": "function prendi_autorizzati(){\n var stringa = \"\";\n for(i = 0; i < posizioneAutorizzato; i++){\n if(i == (posizioneAutorizzato-1)){\n stringa += programmiObj.programmi[posizioneProgramma].autorizzati[i].id;\n }else{\n stringa += programmiObj.programmi[posizioneProgramma].autorizzati[i].id + \",\";\n } \n }\n var vett = new Array(stringa);\n modulo.autorizzati.value = vett;\n}", "title": "" }, { "docid": "201721e3b3febfd5e7348e2da927a1ab", "score": "0.56183654", "text": "decrireArme() {\n const description = this.nom + \" fait \" + this.degat + \" points de dégâts\";\n return description;\n }", "title": "" }, { "docid": "0d6129ae13435974cc0fd09189ccf90f", "score": "0.56179804", "text": "function ControlComa(id, precio) {\n\t\"use strict\";\n\tif(precio.indexOf(',') !== -1){\n\t\tdocument.getElementById(id).value = \"\";\n\t\talert(\"El valor debe llevar punto en vez de coma\");\n\t}\n}", "title": "" }, { "docid": "f50961d03f8a963013f2239f9a31ec17", "score": "0.56177187", "text": "function etapaBuscaBanco(){\n //...\n }", "title": "" }, { "docid": "ecb9a8735ce61d6647d912cfa9205f7c", "score": "0.5611796", "text": "function displayCaddie() {\n let list = \"\";\n\n\n // je parcours tous les elements du panier\n for (let i = 0; i < productList.length; i++) {\n // je récupère le produit i\n const product = productList[i];\n\n // si l'element courant a été ajouté au panier\n // alors on ajoute \" X code,\" à la variable list\n\n if ( product.total > 0){\n list = list + product.total; // ou list + = product.total + \" \" + product.name + \", \";\n list = list + \" \";\n list = list + product.name;\n list = list + \",\" + \" \";\n }\n }\n\n document.getElementById(\"resultat\").innerHTML = list;\n}", "title": "" }, { "docid": "829f7fde8b517d4f34b21b262d2a417d", "score": "0.56067663", "text": "function setBusqueda(form) {\r\n\tform.busqueda.value=form.apellido1.value+\" \"+form.apellido2.value+\", \"+form.nombres.value;\r\n}", "title": "" }, { "docid": "3409c25325f75a9e2950228406574b12", "score": "0.5588247", "text": "function calcolaStringaCapitolo(obj) {\n var capitolo = obj.capitolo;\n var descrizioneElementoSelezionato = '';\n\n if(capitolo && capitolo.annoCapitolo && capitolo.numeroCapitolo && capitolo.numeroArticolo !== undefined){\n descrizioneElementoSelezionato = capitolo.annoCapitolo + '/' + capitolo.numeroCapitolo + '/' + capitolo.numeroArticolo;\n if($('HIDDEN_gestioneUEB').val() === 'true' && capitolo.numeroUEB) {\n descrizioneElementoSelezionato += '/' + capitolo.numeroUEB;\n }\n }\n return descrizioneElementoSelezionato;\n }", "title": "" }, { "docid": "017df1e2c361d2b047dd3d5c88771369", "score": "0.55773383", "text": "function formataCep(cep){\n if ((cep != '') && (cep != null)){\n let primeiraParte = cep.substr(0,5);\n let segundaParte = cep.substr(5,3);\n return primeiraParte + '-' + segundaParte;\n }\n else\n return '';\n}", "title": "" }, { "docid": "771521e90087c02f6b1cc72cc1af6c1f", "score": "0.55770415", "text": "function posicionEspacios() {\r\n var ubiEsp = [];\r\n // este ciclo recorrera letra por letra\r\n for(var i=0; i<can;i++) {\r\n if(res[i]==\" \"){\r\n var cantEs=+1;\r\n ubiEsp.push(i);\r\n } \r\n }\r\n}", "title": "" }, { "docid": "621f2440ff115063b50649b2de2e2f4f", "score": "0.557556", "text": "function pluriel(nombre,mot){\n // console.log('nombre : ' +nombre + 'mot ' + mot);\n if(nombre > 1){\n mot += \"s\";\n }\n return mot;\n}", "title": "" }, { "docid": "e1819949eb69fd291bc22bb95074106c", "score": "0.557179", "text": "function montaImoveisEmAberto(transaction, result){ \n if (result != null && result.rows != null) { \n if (result.rows.item(0).aberto > 0){\n $('.cw-home').append(\"<span class='ui-li-count cw-li-count'>\" + result.rows.item(0).aberto + \"</span>\"); \n }\n }\n}", "title": "" }, { "docid": "b8fe688fd7cabe59387a5e5e72a2741a", "score": "0.5571202", "text": "function alianzaMercado(){\r\n\t\tvar a = find(\"//tr[@class='rbg']\", XPFirst).parentNode;\r\n\r\n\t\t// Prepara la insercion de la nueva columna\r\n\t\tvar b = a.getElementsByTagName(\"TR\");\r\n\t\t// FIXME: Apanyo para Firefox. FF mete nodos de tipo texto vacios\r\n\t\tb[0].childNodes[b[0].childNodes.length == 3 ? 1 : 0].setAttribute('colspan', '8');\r\n\t\tb[b.length - 1].childNodes[0].setAttribute(\"colspan\", \"8\");\r\n\r\n\t\t// Crea e inserta la columna\r\n\t\tvar columna = elem(\"TD\");\r\n\t\tcolumna.innerHTML = T('ALIANZA');\r\n\t\tb[1].appendChild(columna);\r\n\r\n\t\t// Rellena la columna con los nombres de las alianzas\r\n\r\n\t\tfor(var i = 2; i < b.length - 1; i++){\r\n\t\t\tvar alianza = elem(\"TD\");\r\n\t\t\t// FIXME: Apanyo para Firefox. FF mete nodos de tipo texto vacios\r\n\t\t\tvar alianza_txt = b[i].childNodes[b[i].childNodes.length == 12 ? 8 : 4].getAttribute('title');\r\n\t\t\tif (alianza_txt != null) alianza.innerHTML = alianza_txt;\r\n\t\t\tb[i].appendChild(alianza);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "eb713219cafa7066fbdfc6bb39ff7d4d", "score": "0.5561258", "text": "function comecarEtapa() {\n let etapa = etapas[etapaAtual]\n console.log('Etapa atual: ' + etapa['titulo'])\n\n numeroDigitado = ''\n votoEmBranco = false\n\n numeros.style.display = 'block'\n numeros.innerHTML = ''\n rVotoPara.style.display = 'none'\n rCandidato.style.display = 'none'\n rVice.style.display = 'none'\n rDescricao.style.display = 'none'\n rMensagem.style.display = 'none'\n rNomeCandidato.style.display = 'none'\n rPartidoPolitico.style.display = 'none'\n rNomeVice.style.display = 'none'\n rRodape.style.display = 'none'\n\n for (let i = 0; i < etapa['numeros']; i++) {\n let pisca = i == 0 ? ' pisca' : ''\n numeros.innerHTML += `\n <div class=\"numero${pisca}\"></div>\n `\n }\n\n rCargo.innerHTML = etapa['titulo']\n}", "title": "" }, { "docid": "b8b42aeded8f7551677bba5290905a8f", "score": "0.555972", "text": "function formataAgenciaConta(campo){\r\n\tcampo.value = filtraCampo(campo);\r\n\tvr = campo.value;\r\n\ttam = vr.length;\r\n\tif ( tam <= 1 )\r\n\t\tcampo.value = vr;\r\n\tif ( tam > 1 ) \r\n\t\tcampo.value = vr.substr(0, tam-1 ) + '-' + vr.substr(tam-1, tam); \r\n}", "title": "" }, { "docid": "71c2cf24104dd08b361290f503e6ebb6", "score": "0.55580336", "text": "function PegaColuna() {\r\n var LarguraColuna = largura / colunas.length;\r\n var AlturaLinha = altura / linhas.length;\r\n\r\n return LarguraColuna, AlturaLinha;\r\n}", "title": "" }, { "docid": "ce8c492e27351de40f4b274050444adf", "score": "0.5557533", "text": "function recuperarValorComillas(valor){\n\tvar i_antes = valor.indexOf(\"\\\"\");\n\tvalor = valor.substring(i_antes+1);\n\n\tvar i_despu = valor.indexOf(\"\\\"\");\n\tvalor = valor.substring(0,i_despu);\n\n\treturn valor;\n}", "title": "" }, { "docid": "ed46e91764a116b189aa638991f35e3f", "score": "0.5547685", "text": "function formatearEmpresa(empresa) {\n const {nombre, saldo, categoria} = empresa;\n return `El cliente ${nombre} tiene un saldo de ${saldo} y pertenece a la categoria ${categoria}`; \n}", "title": "" }, { "docid": "5b4e0f41e8c426e32602abdd0975727b", "score": "0.55442894", "text": "function Barreiras(altura, largura, abertura, espaco, notificarPonto) { // função construtora\n this.pares = [ // array onde vai ter dentro vários pares de barreiras.\n new ParDeBarreiras(altura, abertura, largura), // par de barreiras, a posição inicial do primeiro par de barreiras vai ser a posição logo fora do jogo e qd começar a animar ele entra no jogo.\n new ParDeBarreiras(altura, abertura, largura + espaco), // aqui o espaço é o parâmetro que define o espaço entre os pares de barreiras, a primeiro par vai ficar na largura do jogo, o segundo par vai calcular a largura mais o tamanho do espaço criando assim um distanciamento entre os pares de barreiras.\n new ParDeBarreiras(altura, abertura, largura + espaco * 2), // aqui vai inserir o espaço * 2 pra criar um novo distanciamento.\n new ParDeBarreiras(altura, abertura, largura + espaco * 3) // aqui vai inserir o espaço * 3 pra criar um novo distanciamento.\n ]\n\n const deslocamento = 3 // constante criada que define de quanto em quantos pixel vai ser deslocado as barreiras qd for feita a animação.\n this.animar = () => { // função criada para gerar o movimento dos pares de barreiras.\n this.pares.forEach(par => { // aqui o array de barreiras this.pares vai usar a funçao forEach() que através de uma arrow function vai varrer o pares de barreiras e vão fazer o valor de 'x' - valor do deslocamento,\n par.setX(par.getX() - deslocamento) // com isso as barreiras vão se movimentar.\n\n // quando o elemento sair da área do jogo\n if (par.getX() < -par.getLargura()) { // aqui foi criado um loop para aproveitar os 04 pares de barreiras e reutilizá-los mudando apenas o local da abertura entre as barreiras.\n par.setX(par.getX() + espaco * this.pares.length) // aqui define a posição da barreira depois que o valor de 'x' sai do jogo(fim na posição left) e coloca 'x' novamente no jogo pelo lado direito do jogo que é onde as barreiras iniciam.\n par.sortearAbertura() // aqui chama a função sortearAbertura() para definir um novo lugar para a abertura das barreiras que estão no mesmo par.\n // com isso vão ser sempre reaproveitados os pares de barreiras e vai passar para o usuário a sensação que são barreiras novas que estão apareceram.\n }\n\n const meio = largura / 2 // aqui foi craida a constante meio que define o meio do jogo dividindo a largura do jogo por 2.\n const cruzouOMeio = par.getX() + deslocamento >= meio\n && par.getX() < meio // aqui mostra se o par de barreiras cruzou o meio do jogo.\n if (cruzouOMeio) notificarPonto() // aqui mostra que se o par de barreiras tiver cruzado o meio do jogo chama a função notificarPonto().\n })\n }\n}", "title": "" }, { "docid": "13d82132288d2023674054791359a331", "score": "0.5538677", "text": "function formatarMoedaCadastroValor() {\n var elemento = document.getElementById('valorCadastro');\n var valor = elemento.value;\n\n valor = valor + '';\n valor = parseInt(valor.replace(/[\\D]+/g, ''));\n valor = valor + '';\n valor = valor.replace(/([0-9]{2})$/g, \",$1\");\n\n if (valor.length > 6) {\n valor = valor.replace(/([0-9]{3}),([0-9]{2}$)/g, \".$1,$2\");\n }\n\n elemento.value = valor;\n if(valor == 'NaN') elemento.value = '';\n}", "title": "" }, { "docid": "f1dffeebc548ff218a3e1bcdef15c512", "score": "0.55369556", "text": "function mostrardia(){\n var boletosDias = parseInt(pase_dia.value, 10) || 0,\n boleto2Dias = parseInt(pase_2dias.value,10) || 0,\n boletoCompleto = parseInt(pase_completo.value,10) || 0;\n\n var diaselegidos = [];\n\n if (boletosDias > 0) {\n diaselegidos.push('viernes');\n \n }\n\n if (boleto2Dias >0) {\n diaselegidos.push('viernes','sabado');\n \n\n }\n\n if (boletoCompleto>0) {\n diaselegidos.push('viernes','sabado','domingo')\n \n }\n\n for (let index = 0; index < diaselegidos.length; index++) {\n document.getElementById(diaselegidos[index]).style.display = 'block';\n \n }\n\n\n }", "title": "" }, { "docid": "e207f4bd2f621eef12f42153f8d6db60", "score": "0.5531819", "text": "function aprovarAluno(nome) {\n /* \n Ao receber um aluno devidamente cadastrado em nossa lista, deverá dizer se o mesmo está aprovado ou não. \n Os critérios de aprovação são: ter no máximo 3 faltas e média 7 em notas.\n Só o aluno só poderá ser aprovado se o mesmo tiver matriculado em um curso.\n */\n let isAluno = false;\n let matriculado = false;\n let media = 0;\n\n for (const aluno of alunosDaEscola) {\n if (aluno.nome == nome) {\n isAluno = true;\n if (aluno.cursos.length > 0) {\n matriculado = true;\n var total = aluno.notas.reduce((acum, atual) => acum + atual)\n media += total / aluno.notas.length;\n console.log(`Média do aluno ${aluno.nome}: ${media}\nTotal de faltas: ${aluno.faltas}`);\n if (media >= 7 && aluno.faltas <= 3 ){console.log(\"Aluno Aprovado\")} else {console.log(\"Aluno Reprovado!\")}\n }\n }\n }\n if (!matriculado && isAluno) { console.log(\"Aluno não está matriculado em nenhum curso. Matricule o aluno antes de continuar\") }\n if (!isAluno) { console.log(\"Esse aluno não existe 🙁. Cadastre o aluno antes de continuar!\") }\n\n}", "title": "" }, { "docid": "26d9f687e92186a636ce0129d04c2f31", "score": "0.55304337", "text": "function nomeCompletoFormatter(value, row) {\r\n return row.curriculo.candidato.pessoa.nome + \" \" + row.curriculo.candidato.pessoa.sobrenome;\r\n}", "title": "" }, { "docid": "8a0de01c8bbdb820e45899513a0260a0", "score": "0.5528419", "text": "function mostraStoricoIncassi(data){\n\t\n\tdata[0].giorno != undefined ? $(\"#giorno\").html(parseFloat(data[0].giorno).toFixed(2)+\"&euro;\") : $(\"#giorno\").html(\"0.00&euro;\");\n\tdata[1].settimana != undefined ? $(\"#settimana\").html(parseFloat(data[1].settimana).toFixed(2)+\"&euro;\"): $(\"#settimana\").html(\"0.00&euro;\");\n\tdata[2].mese != undefined ? $(\"#mese\").html(parseFloat(data[2].mese).toFixed(2)+\"&euro;\"): $(\"#mese\").html(\"0.00&euro;\");\n\tdata[3].anno != undefined ? $(\"#anno\").html(parseFloat(data[3].anno).toFixed(2)+\"&euro;\"): $(\"#anno\").html(\"0.00&euro;\");\n}", "title": "" }, { "docid": "a41605801046b9a7b7fbc235b609356f", "score": "0.55277014", "text": "function alianzaMercado(){\r\n\t\tvar a = find(\"//tr[@class='rbg']\", XPFirst).parentNode;\r\n\r\n\t\t// Prepara la insercion de la nueva columna\r\n\t\tvar b = a.getElementsByTagName(\"TR\");\r\n\t\t// FIXME: Apaño para Firefox. FF mete nodos de tipo texto vacios\r\n\t\tb[0].childNodes[b[0].childNodes.length == 3 ? 1 : 0].setAttribute('colspan', '8');\r\n\t\tb[b.length - 1].childNodes[0].setAttribute(\"colspan\", \"8\");\r\n\r\n\t\t// Crea e inserta la columna\r\n\t\tvar columna = document.createElement(\"TD\");\r\n\t\tcolumna.innerHTML = T('ALIANZA');\r\n\t\tb[1].appendChild(columna);\r\n\r\n\t\t// Rellena la columna con los nombres de las alianzas\r\n\t\tfor(var i = 2; i < b.length - 1; i++){\r\n\t\t\tvar alianza = document.createElement(\"TD\");\r\n\t\t\t// FIXME: Apaño para Firefox. FF mete nodos de tipo texto vacios\r\n\t\t\tvar alianza_txt = b[i].childNodes[b[i].childNodes.length == 12 ? 8 : 4].getAttribute('title');\r\n\t\t\tif (alianza_txt != null) alianza.innerHTML = alianza_txt;\r\n\t\t\tb[i].appendChild(alianza);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f2817ff321d913b1c90aa6e901aba377", "score": "0.55194736", "text": "function hacerHelado(cantidad) { //Utiliza la pabra reservada. Recibe \"hacerHelado\" como nombre y \"(cantidad)\" como parametro, en este caso un number.\n return '🍦'.repeat(cantidad); //Retorna la cantidad de 🍦 que se haya pasado como numero en el parametro\n} //Cierre de la funcion", "title": "" }, { "docid": "a8276e4fbf45337a98dbfb322eade606", "score": "0.5514843", "text": "borrarHumano(nombre,tipo){\n let posicionBorrar = this.buscarHumano(nombre,tipo);\n \n let listado = (tipo === PERSONAL) ? this.personal: this.pacientes;\n listado.splice(posicionBorrar,1);\n }", "title": "" }, { "docid": "4e952d76f6371f3638342379a7485cb9", "score": "0.55146664", "text": "get() {\n //traer\n return (\n this.getDataValue(\"descripcion\").slice(8) + \" lo hice con un virtual\"\n );\n }", "title": "" }, { "docid": "f914e916aa2aacc48d421e4451855c6d", "score": "0.55078423", "text": "function obtenerTextoContenido(celda) {\n if (celda.estado == 'cubierto') {\n return '.';\n }\n if (celda.estado == 'marcado') {\n return 'P';\n }\n if (celda.estado == 'descubierto') {\n if (celda.contenido == 'blanco') {\n return '_';\n }\n if (celda.contenido == 'numero') {\n return celda.numero;\n }\n if (celda.contenido == 'mina') {\n return '*';\n }\n }\n}", "title": "" }, { "docid": "03bfe1f50fc668ebcaf3e0612f9d24b6", "score": "0.5507194", "text": "function puntos(numero)\r\n{\r\n var cadena = \"\";\r\n numero = parseInt(numero,10);\r\n if (numero==0) return \"0\";\r\n //cambiamos 1.000.000 por 1M\r\n if (numero%1000000 == 0) cadena = (numero/1000000)+\"M\";\r\n else\r\n {\r\n //cambiamos 900.000 por 900k\r\n if ((numero%1000 == 0) && (numero<1000000) ) cadena = (numero/1000)+\"k\";\r\n else\r\n {\r\n //si no es cifra redonda, agregamos los puntos\r\n if (numero<1000) cadena = numero + \"\";\r\n else\r\n {\r\n unidades=numero%1000 + \"\";\r\n while (unidades.length < 3) {\r\n unidades = '0' + unidades;\r\n }\r\n if (numero<1000000)\r\n {\r\n cadena = Math.floor(numero/1000) + \".\" + unidades;\r\n }\r\n else\r\n {\r\n millones=Math.floor(numero/1000000);\r\n miles=Math.floor((numero-millones*1000000)/1000) + \"\";\r\n while (miles.length < 3) {\r\n miles = '0' + miles;\r\n }\r\n cadena = millones + \".\" + miles + \".\" + unidades;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return cadena;\r\n}", "title": "" }, { "docid": "308705fd912557f70a54f18a0c513cd0", "score": "0.5505741", "text": "function formateaFechaOnblur(fecha) {\n var largo = fecha.length;\n\n if (largo < 10) {\n fecha = \"\";\n } else {\n fecha = fechaValida(fecha);\n }\n\n return (fecha);\n}", "title": "" }, { "docid": "273c2502e53e6497d44a149f0703a93f", "score": "0.5502743", "text": "function mostrar(resultados, numeros){\n resultElement.value = \"Common dividers between \"+numeros[0]+\" and \"+numeros[1]+\": \";\n console.log(\"DENTRO DO MOSTRAR\");\n resultados.forEach(function(valor, index){\n if (index != resultados.length - 1){\n resultElement.value += valor+\", \"; \n }\n else{\n resultElement.value += valor+\".\";\n }\n })\n console.log(\"saiu do mostrar!\");\n return;\n}", "title": "" }, { "docid": "ce4e4bb1f444071c9c92019b8fad57e7", "score": "0.54981816", "text": "function cnsPais_retorno() {\n $(DIV_TABELA_DETALHES + \" input[name=em_paiscod]\").attr('em_paiscod', objpais.codigo);\n\t $(DIV_TABELA_DETALHES + \" input[name=em_paiscod]\").val(objpais.codigo);\n\t $(DIV_TABELA_DETALHES + \" input[name=em_pais]\").val(objpais.pais.substring(0,12));\n $(DIV_TABELA_DETALHES + \" input[name=em_fone]\").focus();\n}", "title": "" }, { "docid": "c0b48ce6c3a710a0a56eeaee8efa7f88", "score": "0.54931223", "text": "function getVettoreFrasi(min, max) {\n var vettoreFrasi = [\n \"Tondo non so come mai (mi pia) riesco a dormire così tanto\",\n \"- Buona festa della liberazione bisc!<br>- PERCHÈ NON ABBIAMO UN GIORNO IN PIÙ :(\",\n \"Tondo la vostra luce sembra un cannone!\",\n \"Tondo perché? :( ...<br>PERCHÈ DOBBIAMO ALZARCI!??\",\n \"- Tigro cosa ne sai tu?<br>- Di che cosa?<br>- Della democrazia\",\n \"Indiana Jones se sei in rischio fai un occhiolino eh\",\n \"Cazzo ti ridi Davide? Pensi di poter ridere?\",\n \"Bravo Tigro anche oggi ti sei giocato da solo\",\n \"Non so perchè mi viene così tanto tanto tanto da dormire\",\n \"Minchia Davide che spari le conoscenze\",\n \"Tondo mi alzo eh...Oppure un'altra mezzora???😏... No dai...\",\n \"Tigro che carino che sei [da il pollo]<br>Rosicaaa[a Leon]\",\n \"[al telefono] Franci tu hai dei problemi tecnici molto seri\",\n \"Tigro...volevo darti una botta.....se questo è quello che volevi tu\",\n \"Top 5 band metal:<br>Lost in the forest<br>Night animals<br>Trattore non perdona<br>Shout in the sky<br>Cut the leather Jacket\",\n \"Che lampadona qua fuori\",\n \"Tondo, Tondo🎶<br>Non ti arriverà un domani!🎶\",\n \"I fiori!!!<br>Per te!!!<br>Auguri!!!!\",\n \"Tondo tu sei quelle tazze...<br>che vanno in giro\",\n \"- Bisco che cos'è questo? [barattolo di 🍪] - Non chiedere le domande troppo scomode\",\n \"Ranieri, Ranieri🎶<br>Tu bevi l'acqua senza bicchieri!🎶\",\n \"Il tappeto con sopra gli arabi\",\n \"Tigrol tu non puoi muovere\",\n \"Tondo sei scorretto\",\n \"Faccio caffè e mi metto a urlare\",\n 'Riccordati di usare questo <img src=\"imgs/mollettin.png\" width=\"18\"> per pulire le chiappe',\n \"Un anziano che si pulisce...\",\n '<span style=\"font-size:58px\">🧀 👤 🐩</span>'\n ];\n return vettoreFrasi;\n}", "title": "" }, { "docid": "0962280d93acb7716ba70c4e6b397300", "score": "0.54927075", "text": "function numeroBlur(campo) {\r\n\tvar numero = new Number(setNumero(campo.value));\r\n\tif (numero == 0) campo.value = \"0,00\";\r\n\telse campo.value = setNumeroFormato(numero, 2, \".\", \",\");\r\n}", "title": "" }, { "docid": "fcb8c25d658eafa7d15eca65a1d3a32c", "score": "0.54887456", "text": "mostrarVehiculo(){\n console.log(\"El auto es un \" +(this.marca) + \"\\nEl modelo es \" + (this.modelo) + \"\\nSu color es \" + (this.color) + \"\\nSu año es \" +(this.anio));\n }", "title": "" }, { "docid": "77278ddc4eab97c6fdb6161e2390e708", "score": "0.5474065", "text": "function criaMascara(_RefObjeto, _Modelo){\n \n var valorAtual = _RefObjeto.value; \n var valorNumerico = '';\n var nIndexModelo = 0;\n var nIndexString = 0;\n var valorFinal = '';\n var adicionarValor = true;\n \n \n // limpa a string valor atual para verificar \n // se todos os caracteres são números\n for (i=0;i<_Modelo.length;i++){\n if (_Modelo.substr(i,1) != '#'){\n valorAtual = valorAtual.replace(_Modelo.substr(i,1),'');\n }}\n \n // verifica se todos os caracteres são números\n for (i=0;i<valorAtual.length;i++){\n if (!isNaN(parseFloat(valorAtual.substr(i,1)))){\n valorNumerico = valorNumerico + valorAtual.substr(i,1);\n }}\n \n // aplica a máscara ao campo informado usando\n // o modelo de máscara informado no script\n for (i=0;i<_Modelo.length;i++){\n \n if (_Modelo.substr(i,1) == '#'){\n if (valorNumerico.substr(nIndexModelo,1) != ''){\n valorFinal = valorFinal + valorNumerico.substr(nIndexModelo,1);\n nIndexModelo++;nIndexString++;\n } \n else {\n adicionarValor = false;\n }}\n \n else {\n if (adicionarValor && valorNumerico.substr(nIndexModelo,1) != ''){\n valorFinal = valorFinal + _Modelo.substr(nIndexString,1)\n nIndexString++;\n }}\n }\n \n //alert(valorFinal)\n _RefObjeto.value = valorFinal \n\n }", "title": "" }, { "docid": "f6927f2c54a7e8eaef85b76977d9ae9a", "score": "0.547061", "text": "function Parametros() {\n //expF:= <Asignacion_de_Tipo> ID\n // | <Asignacion_de_Tipo> ID ,\n // | Epsilon\n Asignacion_de_Tipo();\n Codigo_Python += tokenActual.Lexema;\n emparejar(\"Identificador\");\n if (tokenActual.Tipo === \"Coma\") {\n emparejar(\"Coma\");\n Codigo_Python += \", \";\n Parametros();\n }\n}", "title": "" }, { "docid": "875441ab68ab86d4918d8798897bed5b", "score": "0.54681516", "text": "function formatarMascaraControlesDatas() {\n $(ctPeriodoInicio).mask(ctMascaraCampoData);\n $(ctPeriodoFim).mask(ctMascaraCampoData);\n }", "title": "" }, { "docid": "ed5022b57045918411ef03e50e647846", "score": "0.546796", "text": "function formataValor(campo) {\r\n\tcampo.value = filtraCampoValor(campo); \r\n\tvr = campo.value;\r\n\ttam = vr.length;\r\n\r\n\tif ( tam <= 2 ){ \r\n \t\tcampo.value = vr ; }\r\n \tif ( (tam > 2) && (tam <= 5) ){\r\n \t\tcampo.value = vr.substr( 0, tam - 2 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 6) && (tam <= 8) ){\r\n \t\tcampo.value = vr.substr( 0, tam - 5 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 9) && (tam <= 11) ){\r\n \t\tcampo.value = vr.substr( 0, tam - 8 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 12) && (tam <= 14) ){\r\n \t\tcampo.value = vr.substr( 0, tam - 11 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ; }\r\n \tif ( (tam >= 15) && (tam <= 18) ){\r\n \t\tcampo.value = vr.substr( 0, tam - 14 ) + '.' + vr.substr( tam - 14, 3 ) + '.' + vr.substr( tam - 11, 3 ) + '.' + vr.substr( tam - 8, 3 ) + '.' + vr.substr( tam - 5, 3 ) + ',' + vr.substr( tam - 2, tam ) ;}\r\n \t\t\r\n}", "title": "" }, { "docid": "308c20c2929f9aeb91b28f8b4605ad2c", "score": "0.54645807", "text": "function modulosEstado(){\r\n\tvar estado = \"\";\r\n\t\r\n\tfor( var m in modulos ){\r\n\t\testado += m + \": \";\r\n\t\t\r\n\t\tif( modulos[m].interpretado ){\r\n\t\t\testado += \"Interpretado\";\r\n\t\t}\r\n\t\telse if( modulos[m].cargado ){\r\n\t\t\testado += \"Creado\";\r\n\t\t}\r\n\t\telse if( modulos[m].creado ){\r\n\t\t\testado += \"Interpretado\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\testado += \"No creado\";\r\n\t\t}\r\n\t\t\r\n\t\testado += \", \";\r\n\t}\r\n\t\r\n\testado = estado.substr(0, estado.length - 2);\r\n\t\r\n\treturn estado;\r\n}", "title": "" }, { "docid": "0563f368c8dbc4a367cf243aff9b5346", "score": "0.546277", "text": "function impostaCapitoloDaCausale(capitolo) {\n var numeroCapitolo = '';\n var numeroArticolo = '';\n var numeroUEB = '';\n var datiCapitolo = '';\n // Se ho il capitolo, popolo i campi correttamente\n if(capitolo) {\n numeroCapitolo = capitolo.numeroCapitolo;\n numeroArticolo = capitolo.numeroArticolo;\n numeroUEB = capitolo.numeroUEB;\n }\n\n // Imposto i valori\n $('#numeroCapitolo').val(numeroCapitolo);\n $('#numeroArticolo').val(numeroArticolo);\n $('#numeroUEB').val(numeroUEB);\n $('#datiRiferimentoCapitoloSpan').html(datiCapitolo);\n }", "title": "" }, { "docid": "579d913d43ff6f3bad8d399881097160", "score": "0.5462105", "text": "function ip1983828() { return ', fal'; }", "title": "" }, { "docid": "5dbd89a9a9625f7426f5c4009f126a18", "score": "0.54573095", "text": "function ComprobarCaracter() {\n var acertado=false;\n var palabraIntroducida=\"\";\n palabraIntroducida = letraUsuario.value;\n if (isNaN(palabraIntroducida)) {\n for (var i = 0; i < adivinar.length; i++) {\n if (adivinar.charAt(i)==palabraIntroducida) {\n palabra0[i]=adivinar.charAt(i);\n acertado=true;\n aciertos++;\n }\n caja2.value=palabra0;\n if (aciertos>=adivinar.length) {\n caja2.value=\"Tu palabra era: \"+adivinar\n boton=document.getElementById(\"boton\");\n } else if (intentosUsuario>=5) {\n caja2.value=\"Has fallado\";\n boton=document.getElementById(\"boton\");\n }\n letraUsuario.value=\"\";\n }\n if (acertado==true) {\n caja1.value=\"Has adivinado la letra\";\n } else {\n caja1.value=\"Has fallado\";\n intentosUsuario++;\n caja3.value=caja3.value+palabraIntroducida+\"-\";\n }\n console.log(palabra0);\n console.log(intentosUsuario);\n } else {\n caja1.value=\"Una letra por favor\";\n\n }\n }", "title": "" }, { "docid": "9be561b87037fadc7b64d2da1937ef5d", "score": "0.5455592", "text": "function unKurabiye(){\r\n alert(\"Ingrediënten \\n- 1 paket Yağ \\n- 1 sb Pudra şekeri \\n- 1 çb Siviyağ \\n- 4 sb Un \\n- 1 sb Nişasta \\n- 1 paket Vanilya \\n- 1/2 paket Kabartmatozu\")\r\n}", "title": "" }, { "docid": "7f0bc726eb481d7a6fd13deba49a7dd0", "score": "0.54548085", "text": "function setBusquedaPersona(form) {\r\n\tform.busqueda.value=form.apellido1.value+\" \"+form.apellido2.value+\", \"+form.nombres.value;\r\n\tform.nom_completo.value=form.apellido1.value+\" \"+form.apellido2.value+\", \"+form.nombres.value;\r\n}", "title": "" }, { "docid": "212bc3f26393e086dbc562b2c22b6e2b", "score": "0.5453931", "text": "function contagemCaracteres(){\n campo.on(\"input\", function(){\n var conteudo = campo.val();\n\n var qtdPalavras = conteudo.split(/\\S+/).length -1;\n $(\"#contador-palavras\").text(qtdPalavras);\n\n var qtdLetras = conteudo.length;\n $(\"#contador-letras\").text(qtdLetras);\n })\n}", "title": "" }, { "docid": "94372ff79291afdb0a51e26d2f6d7f4e", "score": "0.5445153", "text": "constructor(v,c)\n {\n this.valor = v; // Valor del billete\n this.cantidad = c; // Cantidad de billetes\n }", "title": "" }, { "docid": "eb4a2408b133adf0c41feaeeb34a1641", "score": "0.5442081", "text": "function DobleEspacio(campo, event) {\n\n CadenaaReemplazar = \" \";\n CadenaReemplazo = \" \";\n CadenaTexto = campo.value;\n CadenaTextoNueva = CadenaTexto.split(CadenaaReemplazar).join(CadenaReemplazo);\n campo.value = CadenaTextoNueva;\n\n }", "title": "" }, { "docid": "1e618997e1d2b5905977093fec71208d", "score": "0.5441276", "text": "function comidaMenosGustosa(persona){\n if(persona.listaDeComidas.length > 0){\n return persona.listaDeComidas[persona.listaDeComidas.length-1]\n }else{\n return 'No tiene comidas';\n }\n \n}", "title": "" } ]
44019b96254db55d9ad24eefab177393
Helper function that calculates the next layed out height.
[ { "docid": "f37077bbb4120af0cce2ed7d9c28fa36", "score": "0.6848514", "text": "function _calcNextHeight() {\n\t var height = 0;\n\t this._nodes.forEach(function(node) {\n\t if ((node.scrollLength === undefined) || node.trueSizeRequested) {\n\t height = undefined; // can't determine height\n\t return true;\n\t }\n\t height += node.scrollLength;\n\t }.bind(this), true);\n\t return height;\n\t }", "title": "" } ]
[ { "docid": "e8fb1dae864e7a0de2331bdfb7d9ed24", "score": "0.72397643", "text": "get layoutHeight() {\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tlet top = this.element[0].getBoundingClientRect().top;\t\t\t// Find the offset of the top of the bounding element from the top of the displayport\n\t\treturn this.layout.reduce((height, el) => {\t\t\t\t\t// Iterate over all the children, looking for the one with the lowest bottom\n\t\t\tlet bottom = el.getBoundingClientRect().bottom - top;\t// The bottom of the bounding rectangle is the *real* lowest point of the rendered element, even if the element is split between multiple columns. This is relative to the displayport though, so it needs corrected by the offest of the wrapper's top.\n\t\t\treturn bottom > height ? bottom : height;\t\t\t\t// If this element's bottom is lower than the record, the record is updated.\n\t\t}, 46);\n\t}", "title": "" }, { "docid": "c759622213fee5472a1bb2cb535f6656", "score": "0.6990522", "text": "function getIH() {\n return innerHeight;\n }", "title": "" }, { "docid": "7f94d107362ad6cf12a4629c9381f449", "score": "0.69691753", "text": "getHeight() {\n return Math.max.apply(Math, this.texts.map(el => el.y + el.size)) + 20;\n }", "title": "" }, { "docid": "9cbede0c9ff54ace08c7131ee47e5401", "score": "0.6905414", "text": "get outerHeight() {\n const bottom = parseFloat(this.css('margin-bottom'));\n const top = parseFloat(this.css('margin-top'));\n return (this.height + bottom + top) || 0;\n }", "title": "" }, { "docid": "e5deba8f33fe1f5f82ef98578ef3af6f", "score": "0.6901695", "text": "getHeight() {\n return Math.max.apply(Math, this.ellipses.map(el => el.height * 2 + el.y)) + 20;\n }", "title": "" }, { "docid": "f1d330bcbfd86e771a642fac0e80f6d4", "score": "0.6831332", "text": "get innerHeight() { return Math.max(0, this._height - this._padding * 2); }", "title": "" }, { "docid": "6a484ee4c072afe82b3f89bb6b6f1be3", "score": "0.6743565", "text": "getHeight() {\n return Math.max.apply(Math, this.lines.map(el => {\n if (el.y0 > el.y1) {\n return el.y0;\n }\n else {\n return el.y1;\n }\n })) + 20;\n }", "title": "" }, { "docid": "076a0164b8d3dc887ddfc9e4a1b9946d", "score": "0.6738468", "text": "get estimatedHeight() { return -1; }", "title": "" }, { "docid": "076a0164b8d3dc887ddfc9e4a1b9946d", "score": "0.6738468", "text": "get estimatedHeight() { return -1; }", "title": "" }, { "docid": "a8e669052e1e307beaf00677311aba12", "score": "0.6729192", "text": "get innerHeight() {\n const bottom = parseFloat(this.css('padding-bottom'));\n const top = parseFloat(this.css('padding-top'));\n return this._el.clientHeight - bottom - top;\n }", "title": "" }, { "docid": "a5e2c31a052c19f04d9619f199119e46", "score": "0.6650843", "text": "getHeight() {\n return Math.max.apply(Math, this.rectangulars.map(el => el.height + el.y)) + 20;\n }", "title": "" }, { "docid": "66f7df419cb66588283428ba1f71cfd7", "score": "0.66377467", "text": "async getCurHeight() {\n let block = await this.getHeadBlock();\n return block ? block.height : -1;\n }", "title": "" }, { "docid": "c6da5dd3da8d0278641b4cae1da93191", "score": "0.6613042", "text": "_calcHeight( ) {\n\t\t\treturn this.store.getCount( ) * this.rowHeight;\n\t\t}", "title": "" }, { "docid": "e6458c47b72b9a522531f41a3a04a508", "score": "0.65828377", "text": "function getHeight() {\n return h;\n }", "title": "" }, { "docid": "e286543e2d363657677439f6c53ac37c", "score": "0.655152", "text": "function height() {\n return this.eachAfter(\n (n) => (n.value = Math.max(0, ...n.children.map((c) => 1 + c.value)))\n );\n }", "title": "" }, { "docid": "9894b6e6d707980bfe42a1885685f85b", "score": "0.654874", "text": "getAfterFillerHeight(lastIndex) {\n if (lastIndex === 0) {\n // A special case handled in the parent class, delegate it back to parent.\n return super.getAfterFillerHeight(lastIndex);\n }\n const itemHeight = this.getDefaultItemHeight_();\n const countOfGroupHeadings =\n this.getGroupHeadingCountAfterIndex_(lastIndex);\n return (this.dataModel.length - lastIndex) * itemHeight +\n countOfGroupHeadings * this.getGroupHeadingHeight_();\n }", "title": "" }, { "docid": "4737f148c39298883d21778d85a576be", "score": "0.65241617", "text": "function estimateHeight(cm){var th=textHeight(cm.display),wrapping=cm.options.lineWrapping;var perLine=wrapping&&Math.max(5,cm.display.scroller.clientWidth/charWidth(cm.display)-3);return function(line){if(lineIsHidden(cm.doc,line))return 0;var widgetsHeight=0;if(line.widgets)for(var i=0;i<line.widgets.length;i++){if(line.widgets[i].height)widgetsHeight+=line.widgets[i].height;}if(wrapping)return widgetsHeight+(Math.ceil(line.text.length/perLine)||1)*th;else return widgetsHeight+th;};}", "title": "" }, { "docid": "fe817d3485ab00a37ba8c340e7cff82c", "score": "0.65138274", "text": "get pixelHeight() {}", "title": "" }, { "docid": "b1f7105ec2cea11b92b80f46a923fdd2", "score": "0.6510444", "text": "getHeight() {\n return Math.max.apply(Math, this.paths.map(el => el.y +\n Math.max.apply(Math, el.path.replace(/[^0-9 ]/g, '').replace(/\\s\\s+/g, ' ').split(' ').filter((element, index) => index % 2 !== 0)))) + 20;\n }", "title": "" }, { "docid": "2dfdd176cc5a0a956b99c242ef18e421", "score": "0.6463081", "text": "height (prm) {\n try {\n this.child()[0].height(prm);\n\t return this.child()[1].height(comutl.sizediff(prm,\"0.01rem\"));\n } catch (e) {\n console.error(e.stack);\n throw e;\n }\n }", "title": "" }, { "docid": "176d72c147e28435e782f44b73ae4283", "score": "0.64617246", "text": "function sortByHeight() {}", "title": "" }, { "docid": "74d2b5d765b8956bd507445b49b5849c", "score": "0.64499325", "text": "function chunkHeight(){\n\tvar ckHeight = 0;\n\tif (ckTab[Math.floor(PosX/ckSize)] > 0){\n\t\tckHeight = ckTab[Math.floor(PosX/ckSize)];\n\t}\n\tif (ckTab[Math.floor((PosX + persW)/ckSize)] > 0){\n\t\tckHeight = ckTab[Math.floor((PosX + persW)/ckSize)];\n\t}\n\treturn ckHeight;\n}", "title": "" }, { "docid": "b48f27505cfdff180d790455039d0388", "score": "0.6425175", "text": "function getHeight() {\n return getRootElement().clientHeight;\n }", "title": "" }, { "docid": "1f08d7c7be7e21be4a4ea55f7ca6b408", "score": "0.6424166", "text": "getHeight() {\n return Math.max.apply(Math, this.images.map(el => el.height + el.y)) + 20;\n }", "title": "" }, { "docid": "423101aa9335d0a3836e5b687edce99f", "score": "0.641946", "text": "function getHeight(size) {\n return BASE_SIZE / (function() {\n switch(size) {\n case '1':\n case '2h':\n return 1;\n case '2v':\n case '3':\n return 2;\n case '4':\n return 4;\n }\n })();\n}", "title": "" }, { "docid": "5ca4a629a92cef0e224257d19bb605ba", "score": "0.6406432", "text": "function TRectF$Height(Self$11) {\n var Result = 0;\n Result = Self$11.Bottom-Self$11.Top;\n return Result\n}", "title": "" }, { "docid": "929586ba593a3db1af367f4b494bf681", "score": "0.6377144", "text": "function container_calculations(){\n\n var container_height,\n minimum_viewport = 768,\n browser_viewport = $(window).height(); //returns height of browser viewport\n\n if (browser_viewport > minimum_viewport){\n container_height = browser_viewport * 4;\n } else {\n container_height = minimum_viewport * 4;\n next_button_noArrow();\n }\n\n return container_height;\n\n }", "title": "" }, { "docid": "7a45095b89faa380278772e375b601ff", "score": "0.63615793", "text": "height() {\n function helper(root){\n if (root === null) return 0\n let left = helper(root.left) + 1;\n let right = helper(root.right) + 1;\n console.log(`L${left} R${right} together${left + right}`)\n return left > right ? left : right;\n }\n return helper(this.root)\n }", "title": "" }, { "docid": "7c71601822cf035ac383fd806a1e95b3", "score": "0.63562584", "text": "getOuterHeight(withMargin) { // eslint-disable-line no-unused-vars\r\n return 0\r\n }", "title": "" }, { "docid": "67b6552b2e3c88588c92662d96ba6286", "score": "0.63473177", "text": "function breakHeight(bp) {\n bp == 'xs' ? y = 250 : y = 500;\n return y;\n}", "title": "" }, { "docid": "04d197b6669dea4d61beb4c87dcd8d95", "score": "0.633248", "text": "getHeight () {\r\n return this.maxY - this.minY;\r\n }", "title": "" }, { "docid": "6debab99346e292ae0729202a1e55f4c", "score": "0.631825", "text": "function calculateVerticalLayout(n,offset,height) {\n\tif(!offset) {\n\t\toffset = {x:0,y:0};\n\t}\n\tvar pos = {\n\t\tx:offset.x,\n\t\ty:offset.y\n\t};\n\tif(!height) {\n\t\theight = 100;\n\t}\n\tpos.y += n*height;\n\treturn pos;\n}", "title": "" }, { "docid": "94225e345c9025bb3100e27d5668d4f5", "score": "0.63139755", "text": "function _calcPrevHeight() {\n\t var height = 0;\n\t this._nodes.forEach(function(node) {\n\t if ((node.scrollLength === undefined) || node.trueSizeRequested) {\n\t height = undefined; // can't determine height\n\t return true;\n\t }\n\t height += node.scrollLength;\n\t }.bind(this), false);\n\t return height;\n\t }", "title": "" }, { "docid": "d8cdfcb829c8a124e9d2f94cf4abd0fc", "score": "0.630498", "text": "function getHeight(el) {\n\t return el.offsetHeight;\n\t }", "title": "" }, { "docid": "281f4ad7d9a65e3e43cd529a0e68eeb0", "score": "0.6303424", "text": "height(height){return null==height?this.bbox().height:this.size(this.bbox().width,height)}", "title": "" }, { "docid": "547088c826d635a07444d9d7835e6b8f", "score": "0.62898296", "text": "function foldedItemHeight() {\n return settings.nav_summaryLines * ITEM_LINE_HEIGHT + FOLDED_ITEM_OUTER_HEIGHT_EXTRAS;\n}", "title": "" }, { "docid": "299a92bb70544d40dcd3684f506b2d44", "score": "0.6285806", "text": "height() {\n return this.svg_height - this.margin.top - this.margin.bottom;\n }", "title": "" }, { "docid": "c5e931fec305a28e3d41df3cd8216626", "score": "0.6284109", "text": "function outerHeight(elem) {\n\tvar style = window.getComputedStyle(elem, null);\n\tvar h = (! style) ? 0 : parseInt(style.getPropertyValue(\"height\"))\n\t + parseInt(style.getPropertyValue(\"margin-top\"))\n\t + parseInt(style.getPropertyValue(\"margin-bottom\"))\n\t + parseInt(style.getPropertyValue(\"padding-top\"))\n\t + parseInt(style.getPropertyValue(\"padding-bottom\"));\n\treturn h;\n }", "title": "" }, { "docid": "bf4daab511bb038267f81ad24f81f61b", "score": "0.62839913", "text": "function estimateHeight(cm) {\n\t var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n\t var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n\t return function(line) {\n\t if (lineIsHidden(cm.doc, line)) return 0;\n\n\t var widgetsHeight = 0;\n\t if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n\t if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n\t }\n\n\t if (wrapping)\n\t return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n\t else\n\t return widgetsHeight + th;\n\t };\n\t }", "title": "" }, { "docid": "a93aa7686acfb38a4a3573ffa75b13db", "score": "0.6283851", "text": "function getGridHeight()\n\t\t{\n\t\tif(settings.height == \"\")\n\t\t\treturn Math.round($(this).parent().height()-25); // return Math.round($(tipo+''+table).parent().height()-70);\t// return Math.round($(window).height()-70);\n\t\telse\n\t\t\treturn settings.height;\n\t\t}", "title": "" }, { "docid": "fa6656b887474dc6937a4a73f07ba1f6", "score": "0.62805086", "text": "function TRect$Height$1(Self$14) {\n var Result = 0;\n Result = Self$14.Bottom$1-Self$14.Top$1;\n return Result\n}", "title": "" }, { "docid": "b69b09f596ac8bfa49cb2d42ae83ab3c", "score": "0.6276151", "text": "getHeight() { return this.height; }", "title": "" }, { "docid": "158d669a0c9f5a71fbba7b946159d196", "score": "0.6269792", "text": "function HeightSlideCur(id) {\n return M.OuterHeight(va.$s.eq(id), true) + va.ma[0] + va.ma[1];\n }", "title": "" }, { "docid": "5576c3fb3cdf5af007730de0e3e0c74a", "score": "0.62614655", "text": "getHeight()\n {\n return this.showHoldMiddle.current.clientHeight;\n }", "title": "" }, { "docid": "8d274693550f9ea766867c8e02bbdf5c", "score": "0.62563527", "text": "function findMainPanelHeights (){\n\t\t// find uniq mainPanels id\n\t\t//self.mainPanels=[];\n\t\tself.elem.forEach(function(item) {\n\t\t\tif (self.mainPanels.indexOf(item.panMainId)==-1) {\n\t\t\t\tself.mainPanels.push(item.panMainId);\n\t\t\t}\t\n\t\t});\n\t\t// fill max height\n\t\tself.mainPanels=self.mainPanels.map(function(item) {\n\t\t\tvar k=self.panels.reduce(function(sum, current) {\n\t\t\t\tif (+current.mainId == +item) {\n\t\t\t\t\t//alert(\"head\"+current.header + \" h=\"+current.height);\n\t\t\t\t\tsum.height+=current.header+current.height;\n\t\t\t\t}\n\t\t\t\treturn sum; \n\t\t\t},{height: 0});\n\t\t\t//alert (\" m \"+k.height);\n\t\t\treturn {\n\t\t\t\t\tid:\t+item,\n\t\t\t\t\theight: k.height,\n\t\t\t\t\tfold: self.initFolding\n\t\t\t\t};\n\t\t});\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a9245e6043b0ce80842beddf647e946a", "score": "0.6244842", "text": "function _calculateHeight() {\n var itemsHeight;\n if (!self.options.paginate) {\n itemsHeight = self.visibleIndexes.length * self.options.rowHeight;\n } else {\n itemsHeight = self.options.showTotal * self.options.rowHeight;\n self.rangeMargin = 0;\n }\n $('.tb-tbody-inner').height(itemsHeight);\n return itemsHeight;\n }", "title": "" }, { "docid": "50d7855e3c9c262e80131c163282d0d6", "score": "0.6230536", "text": "static renderHeight(pilotProps) {\n const height = pilotProps.height;\n\n if (height == null) {\n return \"--m (--m)\";\n }\n\n return (\n Math.round(height) +\n \"m (\" +\n Math.round(Math.max(0, height - pilotProps.elevation)) +\n \"m)\"\n );\n }", "title": "" }, { "docid": "ff74b792bdca9a084fc12a68f28629af", "score": "0.6226417", "text": "getHeight(link) {\n if (!link)\n return 0;\n else {\n this.height = this.heightHelper(link);\n return;\n }\n }", "title": "" }, { "docid": "e67d3157736dfb1e0b471be438f709be", "score": "0.6222669", "text": "getPoleHeight(){return this.height}", "title": "" }, { "docid": "0a44a5ae416772d1ce023ee6399add19", "score": "0.6222644", "text": "height() {\r\n return this.heightVisitor(this.root)\r\n }", "title": "" }, { "docid": "d99c76b2bb6889a3d009f5016e23e2d2", "score": "0.6219157", "text": "updateHeight(newHeight) {\n\t\t\t\t\tif(this.relativeHeight >= newHeight)\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\tconst delta = newHeight - this.relativeArea.height;\n\t\t\t\t\tthis.relativeArea.height = newHeight;\n\t\t\t\t\tif(this.nodeArea != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.nodeArea.height += delta;\n\t\t\t\t\t\tthis.nodeArea.paddingTop += (delta/2);\n\t\t\t\t\t\tthis.nodeArea.paddingBottom += (delta/2);\n\t\t\t\t\t}\n\t\t\t\t\telse if(this.defineArea != null)\n\t\t\t\t\t\tthis.defineArea.height += delta;\n\t\t\t\t\telse if(this.labelArea != null)\n\t\t\t\t\t\tthis.labelArea.height += delta;\n\t\t\t\t\treturn delta;\n\t\t\t\t}", "title": "" }, { "docid": "7f74b879665419381efb0c91bb2317ed", "score": "0.6202405", "text": "function setDivHeightPosition(totalBlocks, pixelsPerDay) {\n var heightFromTop = totalBlocks * pixelsPerDay + 52;\n document.getElementById(\"container\").style.height = heightFromTop + 95 + \"px\";\n //document.getElementById(\"markers\").style.height = heightFromTop + \"px\";\n //document.getElementById(\"blocksTotal\").style.height = heightFromTop + \"px\";\n document.getElementById(\"stats\").style.top = heightFromTop + 12 + \"px\";\n}", "title": "" }, { "docid": "10bd5714657d5a19d1bc99f24c033145", "score": "0.61865056", "text": "function estimateHeight(cm) {\n\t var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n\t var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n\t return function (line) {\n\t if (lineIsHidden(cm.doc, line)) { return 0 }\n\t\n\t var widgetsHeight = 0;\n\t if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n\t if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n\t } }\n\t\n\t if (wrapping)\n\t { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n\t else\n\t { return widgetsHeight + th }\n\t }\n\t}", "title": "" }, { "docid": "10bd5714657d5a19d1bc99f24c033145", "score": "0.61865056", "text": "function estimateHeight(cm) {\n\t var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n\t var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n\t return function (line) {\n\t if (lineIsHidden(cm.doc, line)) { return 0 }\n\t\n\t var widgetsHeight = 0;\n\t if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n\t if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n\t } }\n\t\n\t if (wrapping)\n\t { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n\t else\n\t { return widgetsHeight + th }\n\t }\n\t}", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "acc9aecafae87c39daa8cae2ae21820e", "score": "0.6170072", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }", "title": "" }, { "docid": "41fbf7833972e4dc498ff9291020c1ad", "score": "0.61695224", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display),\n wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) {\n return 0;\n }\n\n var widgetsHeight = 0;\n if (line.widgets) {\n for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) {\n widgetsHeight += line.widgets[i].height;\n }\n }\n }\n\n if (wrapping) {\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n } else {\n return widgetsHeight + th;\n }\n };\n }", "title": "" }, { "docid": "321e8c17a2f4b6fa36a505efc1c4aade", "score": "0.6168814", "text": "function getHeight(d,i){\n\n return yScale(d.height);\n\n}", "title": "" }, { "docid": "538c7ee1d26b8b49b92f2781dabeb4c4", "score": "0.6168727", "text": "function estimateHeight(cm) {\n\t var th = textHeight(cm.display), wrapping = cm.options.lineWrapping\n\t var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3)\n\t return function (line) {\n\t if (lineIsHidden(cm.doc, line)) { return 0 }\n\n\t var widgetsHeight = 0\n\t if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n\t if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height }\n\t } }\n\n\t if (wrapping)\n\t { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n\t else\n\t { return widgetsHeight + th }\n\t }\n\t}", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "3bb76f55f557432ee5235d65cb1f403f", "score": "0.6163304", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }", "title": "" }, { "docid": "002e9e9619bcdb14615646f10b0733e5", "score": "0.6162882", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display),\n wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) {\n return 0;\n }\n\n var widgetsHeight = 0;\n\n if (line.widgets) {\n for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) {\n widgetsHeight += line.widgets[i].height;\n }\n }\n }\n\n if (wrapping) {\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n } else {\n return widgetsHeight + th;\n }\n };\n }", "title": "" }, { "docid": "002e9e9619bcdb14615646f10b0733e5", "score": "0.6162882", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display),\n wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) {\n return 0;\n }\n\n var widgetsHeight = 0;\n\n if (line.widgets) {\n for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) {\n widgetsHeight += line.widgets[i].height;\n }\n }\n }\n\n if (wrapping) {\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n } else {\n return widgetsHeight + th;\n }\n };\n }", "title": "" }, { "docid": "002e9e9619bcdb14615646f10b0733e5", "score": "0.6162882", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display),\n wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) {\n return 0;\n }\n\n var widgetsHeight = 0;\n\n if (line.widgets) {\n for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) {\n widgetsHeight += line.widgets[i].height;\n }\n }\n }\n\n if (wrapping) {\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n } else {\n return widgetsHeight + th;\n }\n };\n }", "title": "" }, { "docid": "002e9e9619bcdb14615646f10b0733e5", "score": "0.6162882", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display),\n wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) {\n return 0;\n }\n\n var widgetsHeight = 0;\n\n if (line.widgets) {\n for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) {\n widgetsHeight += line.widgets[i].height;\n }\n }\n }\n\n if (wrapping) {\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n } else {\n return widgetsHeight + th;\n }\n };\n }", "title": "" }, { "docid": "4e63c98ebae8bfe570873517a30c8ee5", "score": "0.6154427", "text": "function getCellHeight() {\n var containerEl = $(defaults.container);\n var cellHeight = Math.round((containerEl.height() - containerEl.find(\".cl-header\").height() - containerEl.find(\".cl-weekTitle\").height() - 34) / dateRowLength);\n if (cellHeight < 20) {\n cellHeight = 20;\n }\n return cellHeight;\n }", "title": "" }, { "docid": "aca09e22e6a6bbc8bfdb04fca98cff50", "score": "0.61508465", "text": "function getWrapperHeight(){\n\t\t\t// if displaying multiple slides, multiple wrapper width by number of slides to display\n\t\t\tvar wrapperHeight = $firstChild.outerHeight() * options.displaySlideQty;\n\t\t\treturn wrapperHeight;\n\t\t}", "title": "" }, { "docid": "0ed488d4a9e1d95eb8511fd023d141fc", "score": "0.6145299", "text": "getEntryHeight(entry) {\n\t\tconst ret =\n\t\t\t(!entry)\n\t\t\t\t? 25 // This should not be used but returns something sane just in case\n\t\t\t\t: (entry.matches('.expanded') && entry.children[0].offsetHeight)\n\t\t\t\t\t? entry.children[0].offsetHeight\n\t\t\t\t\t: entry.offsetHeight;\n\t\treturn ret;\n\t}", "title": "" }, { "docid": "eadecb026dda15e562c5f31aa76dbcd6", "score": "0.6131633", "text": "getH(ah) {\n if (AppConfig.IDEHeight == undefined) {\n if (isLandscape) {\n return OreDeviceHeight * ah / 288\n } else {\n return OreDeviceHeight * ah / 560\n }\n }\n else {\n if (isLandscape) {\n return OreDeviceHeight * ah / AppConfig.IDEWidth\n } else {\n return OreDeviceHeight * ah / AppConfig.IDEHeight\n }\n }\n }", "title": "" }, { "docid": "409b82a3e036bdee9e9d096b800a8e81", "score": "0.612916", "text": "function getAvailableHeight( direction ){\n\t\tif( !availableHeight ){\n\t\t\tif( within.isWindow || within.isDocument ){\n\t\t\t\tavailableHeight = { \n\t\t\t\t\t\t\t\t\ttop: targetOffset.top - within.scrollTop,\n\t\t\t\t\t\t\t\t\tbottom: within.height - ( targetOffset.top + targetHeight - within.scrollTop ),\n\t\t\t\t\t\t\t\t\tcomplete: within.height\n\t\t\t\t\t\t\t\t }\n\t\t\t}else{\n\t\t\t\tavailableHeight = {};\n\t\t\t\tif( within.offset.top < win.scrollTop ){\n\t\t\t\t\tavailableHeight.top = targetOffset.top - win.scrollTop;\n\t\t\t\t}else{\n\t\t\t\t\tavailableHeight.top = targetOffset.top - within.scrollTop;\n\t\t\t\t}\n\t\t\t\tavailableHeight.bottom = ( within.offset.top + within.height ) - ( targetOffset.top + targetHeight );\n\t\t\t\tvar diffHeight = ( win.height + win.scrollTop ) - ( within.offset.top + within.height );\n\t\t\t\tif( diffHeight < 0 ){\n\t\t\t\t\tavailableHeight.bottom += diffHeight;\n\t\t\t\t}\t\n\t\t\t\tavailableHeight.complete = \tavailableHeight.top + availableHeight.bottom + targetHeight;\n\t\t\t}\n\t\t}\n\t\tif(!direction){\n\t\t\treturn availableHeight;\n\t\t}\n\t\tdirection = direction.split('-')[0];\t//No I18N\n\t\tif(direction === 'top'){\t//No I18N\n\t\t\treturn availableHeight.top;\n\t\t}else if(direction === 'bottom'){\t//No I18N\n\t\t\treturn availableHeight.bottom;\n\t\t}else{\n\t\t\treturn availableHeight.complete;\n\t\t}\t\n\t}", "title": "" }, { "docid": "8edcd897334ec2f9afdf97bbe6dace2b", "score": "0.6125247", "text": "function getHeight(){\n return document.getElementById(\"mybeans_panel\").offsetHeight;\n}", "title": "" }, { "docid": "2f9c9dfe0bbc6cb912ce87fc098e8ef7", "score": "0.61213005", "text": "function getDisplayHeight() {\n return (globals.NOTE_HEIGHT + globals.NOTE_GAP) * 128;\n }", "title": "" }, { "docid": "64b4a1db7cfe83c3cabe93baf2c6a744", "score": "0.61186105", "text": "getMaxHeight() {\n\t\n\t\tif (this.maxHeight >= 0) {\n\t\n\t\t\treturn this.maxHeight;\n\t\n\t\t} else {\n\t\n\t\t\treturn this.h + this.maxHeight;\n\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "edcca2c839a378b176b8facdd671239e", "score": "0.6116702", "text": "get height() { return this._el.offsetHeight; }", "title": "" }, { "docid": "3e9e1c05a1974e407ec8c09ffbb9dd96", "score": "0.6106468", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n}", "title": "" }, { "docid": "3e9e1c05a1974e407ec8c09ffbb9dd96", "score": "0.6106468", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n}", "title": "" }, { "docid": "3e9e1c05a1974e407ec8c09ffbb9dd96", "score": "0.6106468", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n}", "title": "" }, { "docid": "3e9e1c05a1974e407ec8c09ffbb9dd96", "score": "0.6106468", "text": "function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n}", "title": "" } ]
1064a88e6cc4005d5a350eb5adc7cba9
converts button text depending on status
[ { "docid": "28e145b7a3c353477bf583261d62d4e4", "score": "0.6209756", "text": "function buttonCheckIn(status) {\n if (status == true) {\n return 'Check Out';\n } else if (status == false){\n return 'Check In';\n }\n}", "title": "" } ]
[ { "docid": "b291fec79b1db78efbc2702e7ba0fe4e", "score": "0.7563675", "text": "function buttonText() {\n if (vm.inventorymanagement.inactive) {\n return 'Activate';\n }\n else {\n return 'Deactivate';\n }\n }", "title": "" }, { "docid": "c3c15288ebd5aa4fdd17c6caeaabbaa6", "score": "0.75041723", "text": "function buttonText() {\n if (vm.clientmanagement.inactive) {\n return 'Activate';\n }\n else {\n return 'Deactivate';\n }\n }", "title": "" }, { "docid": "6c336a8050c872f79d8e18fa89cdc402", "score": "0.69154435", "text": "function updateTestButton(status) {\n testbutton.textContent = status;\n}", "title": "" }, { "docid": "616e616e016ad6534ba1db360a277975", "score": "0.6755869", "text": "function displayStatus(status) {\n\n var statusBtn = \"\";\n switch (status) {\n case 'Draft':\n statusBtn = \"<span class='label bg-blue fg-white'>\" + status + \"</span>\";\n break;\n case 'Canceled':\n statusBtn = \"<span class='btn bg-red fg-white'>\" + status + \"</span>\";\n break;\n case 'Unpaid':\n statusBtn = \"<span class='btn bg-amber fg-white'>\" + status + \"</span>\";\n break;\n case 'Partial':\n statusBtn = \"<span class='btn bg-lime fg-white'>\" + status + \"</span>\";\n break;\n case 'Paid':\n statusBtn = \"<span class='btn bg-emerald fg-white'>\" + status + \"</span>\";\n break;\n\n }\n\n return statusBtn;\n}", "title": "" }, { "docid": "441ea25727a8cc77c70d35755a400921", "score": "0.6728604", "text": "function change_btn_text(){\n if($(\".btn-inventory\").text() == \"Display Inventory\"){\n $(\".btn-inventory\").text(\"Hide Inventory\");\n }\n else{\n $(\".btn-inventory\").text(\"Display Inventory\");\n }\n}", "title": "" }, { "docid": "9b58dc8598377c56a5372ad36b838ef6", "score": "0.671408", "text": "getButtonText() {\n if (this.props.type === 'Add' && this.state.published) {\n return this.props.type + ' and Publish Quiz';\n }\n if (this.state.published && !this.state.orig_published) {\n return this.props.type + ' and Publish Quiz';\n }\n if (!this.state.published && this.state.orig_published) {\n return this.props.type + ' and Unpublish Quiz';\n }\n return this.props.type + ' Quiz';\n }", "title": "" }, { "docid": "fea7902519277f86bd35a141cc3f4700", "score": "0.6589478", "text": "function queryButtonText(options){var buttonText=options.buttonText||{};return buttonText[requestedViewType]||(spec.singleUnit?buttonText[spec.singleUnit]:null);} // highest to lowest priority", "title": "" }, { "docid": "8d812fd69321d70c5961b8fd0b0e58e6", "score": "0.6532653", "text": "function updateButtonText() {\n if (globalData.state === 'open') {\n $('.js-loadButton-text').html('Hide Episodes');\n $('.js-load-btn').addClass('loadButton--minus').removeClass('loadButton--plus');\n return\n }\n $('.js-loadButton-text').html('Show More Episodes');\n $('.js-load-btn').removeClass('loadButton--minus').addClass('loadButton--plus');\n}", "title": "" }, { "docid": "e8a0e8840ef403c83e8343b318d7b255", "score": "0.65269697", "text": "function queryButtonText(options){var buttonText=options.buttonText || {};return buttonText[requestedViewType] || (spec.singleUnit?buttonText[spec.singleUnit]:null);} // highest to lowest priority", "title": "" }, { "docid": "3c61a046394112798af83a88272dc9b0", "score": "0.635684", "text": "function getButtonText(button) {\r\n let buttonText = null;\r\n if (button.tagName.toLowerCase() === \"input\") {\r\n buttonText = button.value;\r\n }\r\n else {\r\n buttonText = button.innerText;\r\n }\r\n return buttonText;\r\n }", "title": "" }, { "docid": "1ff43254cafca74736e36752dcbde87b", "score": "0.6304032", "text": "function getButtonText() {\n return 'Click on Me!';\n}", "title": "" }, { "docid": "bb29fa0461d707a0b5c847b3f0c558f8", "score": "0.6297468", "text": "function setBtnText(){\n var tipData = getTipData(currentTip);\n if(tipData==null) return;\n if(tipData.action.roleTexts.nextBt)\n document.querySelector(\"[data-iridize-role=\\\"nextBt\\\"]\").text = tipData.action.roleTexts.nextBt;\n}", "title": "" }, { "docid": "ce8d1451fd7ddc489c18a92a649f54ff", "score": "0.62564206", "text": "function change1()\n{\n\tvar plus = '\\u2606';\n\tvar minus = '\\u2605';\n\n var sb = document.getElementById(\"saveButton1\");\n if ( sb.innerText == plus ) \n \tsb.innerText = minus;\n else \n \tsb.innerText = plus;\n}", "title": "" }, { "docid": "ecf0eb79d50bb58cc39140743cf873c3", "score": "0.62329906", "text": "static updateButton() {\n let firstButton = $('#ButtonList span')[0].innerHTML;\n $('#focus #question-contents b').html(firstButton);\n }", "title": "" }, { "docid": "188a6301b1dd0f02a03ba69ba577e546", "score": "0.6228453", "text": "function handleTextChangeInFilterButtons() {\n $(\"#btn-tz\").text(computeTimezoneButtonText());\n $(\"#btn-auth\").text(computeAuthButtonText());\n $(\"#btn-remote\").text(computeRemoteButtonText());\n}", "title": "" }, { "docid": "38e7fad95d2796a276605d7cb41e1537", "score": "0.6187869", "text": "function buttonStatusInProgress( message ){\n $button.addClass('updating-message').removeClass('button-disabled aux-not-installed installed').text( message );\n }", "title": "" }, { "docid": "7b1ae0ad8a6ae372d26450c65068ad59", "score": "0.61530185", "text": "function buttonStatusDisabled( message ){\n $button.removeClass('updating-message aux-not-installed installed')\n .addClass('button-disabled')\n .text( message );\n }", "title": "" }, { "docid": "e2ea98a240b009d905ba1188b4bac562", "score": "0.6139792", "text": "function change3()\n{\n\tvar plus = '\\u2606';\n\tvar minus = '\\u2605';\n\t\n var sb = document.getElementById(\"saveButton3\");\n if ( sb.innerText == plus ) \n \tsb.innerText = minus;\n else \n \tsb.innerText = plus;\n}", "title": "" }, { "docid": "ace44f4804ebc17ec6fbfbbf265b775d", "score": "0.6131374", "text": "function getButtonText() {\n return \"ClickMe!!!\";\n}", "title": "" }, { "docid": "8b46891f8b6bed06ea19b6b384453608", "score": "0.6117232", "text": "function change4()\n{\n\tvar plus = '\\u2606';\n\tvar minus = '\\u2605';\n\n var sb = document.getElementById(\"saveButton4\");\n if ( sb.innerText == plus ) \n \tsb.innerText = minus;\n else \n \tsb.innerText = plus;\n}", "title": "" }, { "docid": "f3071f530b13bb646f62e3fef0349a9e", "score": "0.6110599", "text": "function getButtonStatusHTML(event, status, idToPopulate) {\n if (status == 'owner') {\n return (\"<button class=\\\"chat\\\" id=\\\"\" + event['_id'] + \"\\\" onclick=\\\"chatGroup(this.id)\\\">CHAT</button><button class=\\\"join-del-leave\\\" id=\\\"\" + event['_id'] + \" \" + idToPopulate + \"\\\" data-toggle=\\\"modal\\\" data-target=\\\"#deleteGroupModal\\\" onclick=\\\"handleDelete(this.id)\\\">DELETE</button></div></div>\");\n }\n else if (status == 'member') {\n return (\"<button class=\\\"chat\\\" id=\\\"\" + event['_id'] + \"\\\" onclick=\\\"chatGroup(this.id)\\\">CHAT</button><button class=\\\"join-del-leave\\\" id=\\\"\" + event['_id'] + \" \" + idToPopulate + \"\\\" onclick=\\\"leaveGroup(this.id)\\\">LEAVE</button></div></div>\");\n }\n else {\n return (\"<button class=\\\"join-del-leave join\\\" id=\\\"\" + event['_id'] + \" \" + idToPopulate + \"\\\" onclick=\\\"joinGroup(this.id)\\\">JOIN</button></div></div>\");\n }\n}", "title": "" }, { "docid": "fde4b91a1c49bd10f440298f1c8ad727", "score": "0.6103796", "text": "function change2()\n{\n\tvar plus = '\\u2606';\n\tvar minus = '\\u2605';\n\n var sb = document.getElementById(\"saveButton2\");\n if ( sb.innerText == plus ) \n \tsb.innerText = minus;\n else \n \tsb.innerText = plus;\n}", "title": "" }, { "docid": "1359cd8725a2f654b89250894d4c53b1", "score": "0.6093133", "text": "function setButtonTextcontact(id, str) {\n $j(id).html(str).parent().find('.ui-btn-text').text(str);\n}", "title": "" }, { "docid": "b0120968581ffbfe26fb0e69bddd300a", "score": "0.60832846", "text": "function changeButtonType(btn, value) {\n\tbtn.title = value;\n\tbtn.innerHTML = value;\n\tbtn.className = value;\n}", "title": "" }, { "docid": "8c23a27d211bc9198307595f6eba8173", "score": "0.60689414", "text": "function change3()\n\t\t\t{\n\t\t\t\tvar plus = '\\u2295';\n\t\t\t\tvar minus = '\\u2296';\n\n\t\t\t var sb = document.getElementById(\"saveButton3\");\n\t\t\t if ( sb.innerText == plus ) \n\t\t\t \tsb.innerText = minus;\n\t\t\t else \n\t\t\t \tsb.innerText = plus;\n\t\t\t}", "title": "" }, { "docid": "e08dbcc8eaa261a2c58718545d4bbc2d", "score": "0.6063018", "text": "statusButton(serial, code, jobStatus) {\n let buttonType;\n switch (jobStatus) {\n case JOB_STATUS.PENDING:\n buttonType = (<button onClick={() => this.getIngestionJobDetailById(serial, code)}>Fetch Status</button>);\n break;\n case JOB_STATUS.COMPLETED:\n buttonType = (<button onClick={() => this.viewUids(code)}>View Uid</button>);\n break;\n default:\n buttonType = null;\n }\n return buttonType;\n\n }", "title": "" }, { "docid": "4544fb8ef65314f38bceddccb1462a5a", "score": "0.605771", "text": "function status_button( message, level, btext, bfunc ) {\n\tvar b = createDOM( \"A\", { \"href\" : \"#\" }, btext );\n\tconnect( b, \"onclick\", function() { status_click(); bfunc(); } );\n\n\tvar m = [ message, \" -- \", b ]\n\n\treturn status_msg( m, level );\n}", "title": "" }, { "docid": "6b29d72d4aa1ed5cb8074b3a99b5eb6e", "score": "0.60487723", "text": "function change2()\n\t\t\t{\n\t\t\t\tvar plus = '\\u2295';\n\t\t\t\tvar minus = '\\u2296';\n\n\t\t\t var sb = document.getElementById(\"saveButton2\");\n\t\t\t if ( sb.innerText == plus ) \n\t\t\t \tsb.innerText = minus;\n\t\t\t else \n\t\t\t \tsb.innerText = plus;\n\t\t\t}", "title": "" }, { "docid": "3504f48849ea3a3e3c0acbd82a244876", "score": "0.6046182", "text": "function status(text) {\n document.getElementById('status').textContent = text;\n }", "title": "" }, { "docid": "ffb33d1100147598ce2e8e5cc8bfb9ca", "score": "0.6034249", "text": "function buttonMessage (text, buttons) {\n return {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text,\n buttons\n }\n };\n}", "title": "" }, { "docid": "fc8cfd3675ea63e629986190f8561227", "score": "0.60331875", "text": "function typeFunc() {\n var $thistext = $(this).text();\n $typesbtn.text($thistext);\n }", "title": "" }, { "docid": "b0cd89d541087a3a1696bc64942665bc", "score": "0.6025385", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "b0cd89d541087a3a1696bc64942665bc", "score": "0.6025385", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "b0cd89d541087a3a1696bc64942665bc", "score": "0.6025385", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "b0cd89d541087a3a1696bc64942665bc", "score": "0.6025385", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "3516ba70b176aeee7cbb82cae178ffbd", "score": "0.6012454", "text": "function change4()\n\t\t\t{\n\t\t\t\tvar plus = '\\u2295';\n\t\t\t\tvar minus = '\\u2296';\n\n\t\t\t var sb = document.getElementById(\"saveButton4\");\n\t\t\t if ( sb.innerText == plus ) \n\t\t\t \tsb.innerText = minus;\n\t\t\t else \n\t\t\t \tsb.innerText = plus;\n\t\t\t}", "title": "" }, { "docid": "c9204c31b85e7472a13f6f114e86d00c", "score": "0.5980029", "text": "function setButtonsTitle() {\n // not need for mobile\n if (isMobileDevice) return;\n\n // left buttons\n tippy(shareRoomBtn, {\n content: \"Invite people to join\",\n placement: \"right-start\",\n });\n tippy(callRoomBtn, {\n content: \"join call\",\n placement: \"right-start\",\n });\n \n \n tippy(leaveRoomBtn, {\n content: \"Leave this room\",\n placement: \"right-start\",\n });\n\n // chat room buttons\n \n tippy(msgerClean, {\n content: \"Clean messages\",\n });\n tippy(msgerSaveBtn, {\n content: \"Save messages\",\n });\n \n tippy(msgerEmojiBtn, {\n content: \"Emoji\",\n });\n tippy(msgerSendBtn, {\n content: \"Send\",\n });\n\n // emoji picker\n tippy(msgerCloseEmojiBtn, {\n content: \"Close emoji\",\n });\n\n // settings\n \n\n // whiteboard btns\n \n // room actions btn\n \n}", "title": "" }, { "docid": "6311f0301dec64abc67836d2890a522f", "score": "0.59706354", "text": "function resetButtonText() {\n console.log('Resetting button texts');\n $(\"#floorNumberButton\").text(floorNum);\n $(\"#comfortLevelButton\").text(\"Comfort Level\");\n}", "title": "" }, { "docid": "58c1efaa8514b1e04f677687744fb4fa", "score": "0.59123814", "text": "updateButton(val) {\n if (val !== '') {\n this.mainButtonText = 'Search';\n return;\n }\n this.mainButtonText = 'Feeling Lucky?';\n }", "title": "" }, { "docid": "96595d8ff6fd6ec331a2c3abad46c2cb", "score": "0.5908325", "text": "function queryButtonText(options) {\n var buttonText = options.buttonText || {};\n return buttonText[requestedViewType] ||\n // view can decide to look up a certain key\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n // a key like \"month\"\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\n }", "title": "" }, { "docid": "d14e7f415efed8f1d3beb63f489ad877", "score": "0.5888814", "text": "function buttonColor () {\n if (vm.inventorymanagement.inactive) {\n return 'btn btn-success';\n }\n else {\n return 'btn btn-warning';\n }\n }", "title": "" }, { "docid": "7e9e30806af8864d505602555574977f", "score": "0.588295", "text": "function getButtonText(type,link)\n{\n var result;\n switch(link) {\n case('search'): {result = type=='base' ? \"Simple Search\" : \"Advanced Search\" ;}\n break;\n case('topProducts'): {result = type=='base' ? \"Hide Top Products\" : \"Show Top Products\";}\n break;\n default: {result = \"Search\";}\n break;\n }\n return result;\n}", "title": "" }, { "docid": "065eb68c44f0ec232e3b2a37f165a662", "score": "0.5880317", "text": "function changeCaps() {\n if (shiftBtn.classList.contains(\"off\")) {\n shiftBtn.classList.replace(\"off\", \"on\");\n letters.forEach(function (letter) {\n letter.innerText = letter.innerText.toUpperCase();\n });\n\n } else if (shiftBtn.classList.contains(\"on\")) {\n shiftBtn.classList.replace(\"on\", \"off\");\n letters.forEach(function (letter) {\n letter.innerText = letter.innerText.toLowerCase();\n });\n }\n }", "title": "" }, { "docid": "bd54e6e492e3a40a6c6c38920fe496d3", "score": "0.58674085", "text": "ButtonText() {\r\n if (this.props.waitingOnContract) {\r\n return <div>Waiting on Transactions.............</div>;\r\n }\r\n return <div>Invest Tokens</div>;\r\n }", "title": "" }, { "docid": "c8a6fe118eefd625403697bf8f63844e", "score": "0.5860265", "text": "function setSwitchButtonText() {\n\tif (onClickPutData) {\n\t\tdocument.getElementById('buttonSwitchDataOrClusterCenter').value = \"data point\";\n\t} else {\n\t\tdocument.getElementById('buttonSwitchDataOrClusterCenter').value = \"cluster center\";\n\t}\n}", "title": "" }, { "docid": "c6a8ea94ff4998c41c82b1e369394642", "score": "0.58585083", "text": "function getButtonText() {\n if (moment(tier.registrationEndDate).isBefore()) return \"Closed\";\n else if (moment(tier.registrationStartDate).isAfter()) return \"Coming soon\";\n else if (!tier.hasAvailability) return \"Sold out\";\n else return `$${tier.price}`;\n }", "title": "" }, { "docid": "8e586eb034cca8e908cdc4ac9026893f", "score": "0.58535", "text": "function buttonColor() {\n if (vm.clientmanagement.inactive) {\n return 'btn btn-success';\n }\n else {\n return 'btn btn-warning';\n }\n }", "title": "" }, { "docid": "47a83e669d414d6917cf4517784c49ec", "score": "0.5853096", "text": "function updateButton(){\r\n const icon = this.paused ? 'play' : 'pause';\r\n console.log(icon);\r\n toggle.textContent = icon;\r\n}", "title": "" }, { "docid": "b8fa025be364471899d33fa54f2b28e2", "score": "0.58466643", "text": "function queryButtonText(options) {\r\n var buttonText = options.buttonText || {};\r\n return buttonText[requestedViewType] ||\r\n // view can decide to look up a certain key\r\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\r\n // a key like \"month\"\r\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\r\n }", "title": "" }, { "docid": "e0353adc866a4839f8671ae5ac705763", "score": "0.5837395", "text": "static textButton(options) {\n return { options, kind: 'text' };\n }", "title": "" }, { "docid": "2770ef16b75b3b27aa56250370b0339e", "score": "0.5832656", "text": "function changeBNButton () {\r\n // change button font family\r\n beautifyNameBtn.style.fontFamily = (nameToBeBeautified.style.fontFamily);\r\n // change button font weight\r\n beautifyNameBtn.style.fontWeight = (nameToBeBeautified.style.fontWeight);\r\n }", "title": "" }, { "docid": "f9efe6cc2811b4797454085d5738bebf", "score": "0.5830564", "text": "function queryButtonText(options) {\n var buttonText = options.buttonText || {};\n return buttonText[requestedViewType] ||\n // view can decide to look up a certain key\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n // a key like \"month\"\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\n }", "title": "" }, { "docid": "f9efe6cc2811b4797454085d5738bebf", "score": "0.5830564", "text": "function queryButtonText(options) {\n var buttonText = options.buttonText || {};\n return buttonText[requestedViewType] ||\n // view can decide to look up a certain key\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n // a key like \"month\"\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\n }", "title": "" }, { "docid": "f9efe6cc2811b4797454085d5738bebf", "score": "0.5830564", "text": "function queryButtonText(options) {\n var buttonText = options.buttonText || {};\n return buttonText[requestedViewType] ||\n // view can decide to look up a certain key\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n // a key like \"month\"\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\n }", "title": "" }, { "docid": "f9efe6cc2811b4797454085d5738bebf", "score": "0.5830564", "text": "function queryButtonText(options) {\n var buttonText = options.buttonText || {};\n return buttonText[requestedViewType] ||\n // view can decide to look up a certain key\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n // a key like \"month\"\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\n }", "title": "" }, { "docid": "f9efe6cc2811b4797454085d5738bebf", "score": "0.5830564", "text": "function queryButtonText(options) {\n var buttonText = options.buttonText || {};\n return buttonText[requestedViewType] ||\n // view can decide to look up a certain key\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n // a key like \"month\"\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\n }", "title": "" }, { "docid": "012420f44e3cb7b4843989d2aeb4ff6c", "score": "0.5829904", "text": "function setBtnUI(btn, text, color, backgroundColor) {\n btn.innerText = text;\n btn.style.color = color;\n btn.style.backgroundColor = backgroundColor;\n }", "title": "" }, { "docid": "e948979faa91d31c2253c6cc9c93b50a", "score": "0.5827179", "text": "function analysesRunningStatusBtn(){\n return function(param){\n if (typeof param !== \"undefined\") {\n if (param.preprocessing !== \"SUCCESS\") {\n return \"icon-circle-arrow-down\";\n } else if (param.execution !== \"SUCCESS\") {\n return \"icon-cog\";\n } else if (param.postprocessing !== \"SUCCESS\") {\n return \"icon-circle-arrow-up\";\n } else {\n return \"icon-question-sign\";\n }\n }else{\n return \"refinery-spinner analyses-view\";\n }\n };\n}", "title": "" }, { "docid": "deb38aa1cca4b0559ec351cee157c332", "score": "0.58213836", "text": "function buttonState(value) {\n if (value == 1) {\n $('#alarmButton').html('Deaktiver').css(\"background-color\", \"red\").click(function () {\n deActivateAlarmModal();\n });\n } else {\n $('#alarmButton').html('Aktiver').css(\"background-color\", \"green\").click(function () {\n activateAlarmModal();\n });\n }\n}", "title": "" }, { "docid": "8d411a150af172c7e7d4e377b8083bb7", "score": "0.5811313", "text": "function textBtnOn(obj) {\r\n\tvar outTextarea = $(obj).parents(\".btn-wrap\").next();\r\n\tvar str = outTextarea.val().replace(/\\s+/g, \"\");\r\n\toutTextarea.val(str);\r\n}", "title": "" }, { "docid": "74568260ead21762524e2b980d5d3160", "score": "0.5806572", "text": "function getStatusText(status) {\n switch (status) {\n case \"A\":\n status = \"Approved\";\n break;\n case \"D\":\n status = \"Declined\";\n break;\n case \"S\":\n status = \"Under Manager Review\";\n break;\n case \"F\":\n status = \"Forwarded for Review\";\n break;\n default:\n status = \"Not Yet Submitted\";\n }\n return status;\n}", "title": "" }, { "docid": "539f7fd17a355eb1b44b56f3d5b8ee07", "score": "0.5804756", "text": "function createDecryptButtonHtml()\n{\n return \"<button class='decryptButton'>\" + oMsgs.decrypt + \"</button>\";\n}", "title": "" }, { "docid": "467677da8133c71ff23eb178f2e92efc", "score": "0.57999194", "text": "function checkButtons(){\n\t\tvar outstr = ''\n\t\tif (featureInfo.length > 1){outstr = '<button type = \"button\" name =\"backButton\" onclick = \"backOne()\"><b><</b></button> Record ' + (i+1) + ' of ' + featureInfo.length + ' <button type = \"button\" id =\"nextButton\" onclick = \"forwardOne()\"><b>></b></button>'};\n\t\treturn outstr;\n\t\t}", "title": "" }, { "docid": "c33fd5de26120bdf4d46394cee055486", "score": "0.57989067", "text": "setButtonText() {\n const chart = this.chart, exportDivElements = chart.exportDivElements, exportingOptions = chart.options.exporting, menuItems = (exportingOptions &&\n exportingOptions.buttons &&\n exportingOptions.buttons.contextButton.menuItems), lang = chart.options.lang;\n if (exportingOptions &&\n exportingOptions.menuItemDefinitions &&\n lang &&\n lang.exitFullscreen &&\n lang.viewFullscreen &&\n menuItems &&\n exportDivElements) {\n const exportDivElement = exportDivElements[menuItems.indexOf('viewFullscreen')];\n if (exportDivElement) {\n AST.setElementHTML(exportDivElement, !this.isOpen ?\n (exportingOptions.menuItemDefinitions.viewFullscreen\n .text ||\n lang.viewFullscreen) : lang.exitFullscreen);\n }\n }\n }", "title": "" }, { "docid": "d7e0adab50b598c16db868a5a76170ed", "score": "0.5798844", "text": "function toggleButton() {\n var currentText = startButton.textContent;\n if(currentText === 'Start'){\n startButton.textContent = 'Stop'; //.textContent gets and changes the text from an HTML element\n startButton.style.backgroundColor = 'red'; //.style pulls the CSS of an HTML element. You can specify the property after (like .backgroundColor -- use camelCase)\n\n } else {\n startButton.textContent = 'Start';\n startButton.style.backgroundColor = 'green';\n }\n }", "title": "" }, { "docid": "ef161c3e44b778d2ce99b35a6256f565", "score": "0.57899225", "text": "function renderButton(component) {\n var selectedLabels = getSelectedLabels(component);\n var label = isImplicitAll(component) ? getImplicitAllLabel(component) : selectedLabels.join(', ');\n component.$btn.text(label);\n }", "title": "" }, { "docid": "3b0dbb8f811cb28c983f8bb2256ae10b", "score": "0.5786088", "text": "function updateButtonStatus(elementArrayType) {\n if (_.contains(elementArrayType, ELEMENT_TYPE.VALIDATED)) {\n $('#order-action button.deny, #order-action button.send, #order-action button.reset').hide();\n $('#order-action span.action-text').html(\n window.orderItemData.translatedText.alreadyValidated +\n '<i class=\"fa fa-check\" aria-hidden=\"true\"></i>'\n );\n $('#order-action span.action-text').show();\n } else if (\n _.contains(elementArrayType, ELEMENT_TYPE.WAITINGFORVALIDATION)\n ) {\n $('#order-action button.deny, #order-action button.send, #order-action span.action-text').hide();\n $('#order-action button.reset').show();\n //$('#order-action button.send').show();\n //$('#order-action button.send').prop('disabled', true);\n } else if (_.contains(elementArrayType, ELEMENT_TYPE.DENIED)) {\n $('#order-action button.deny, #order-action button.reset').hide();\n $('#order-action span.action-text').html('window.orderItemData.translatedText.refusedPreviously');\n //$('#order-action button.send').prop('disabled', false);\n $('#order-action button.send, #order-action span.action-text').show();\n } else {\n // $('#order-action button.send, #order-action button.deny').prop('disabled', false);\n $('#order-action button.send, #order-action button.deny').show();\n $('#order-action span.action-text, #order-action button.reset').hide();\n }\n }", "title": "" }, { "docid": "c52fcd484e112987da861154d0f78abc", "score": "0.5780065", "text": "function _updateSnipcartButtonsText(value){\n DOM.$btnBuyBanner.attr('data-item-custom1-value', value);\n DOM.$btnBuyCutSunStrip.attr('data-item-custom1-value', value);\n DOM.$btnBuyTextSunStrip.attr('data-item-custom1-value', value);\n}", "title": "" }, { "docid": "32096ad48fa860f3d074edfb1ab22930", "score": "0.5772401", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "32096ad48fa860f3d074edfb1ab22930", "score": "0.5772401", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "32096ad48fa860f3d074edfb1ab22930", "score": "0.5772401", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "32096ad48fa860f3d074edfb1ab22930", "score": "0.5772401", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "32096ad48fa860f3d074edfb1ab22930", "score": "0.5772401", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "32096ad48fa860f3d074edfb1ab22930", "score": "0.5772401", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "32096ad48fa860f3d074edfb1ab22930", "score": "0.5772401", "text": "function queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}", "title": "" }, { "docid": "afdfb32db9c75eda6fdf43836d26eb78", "score": "0.57690793", "text": "function fjernAlt() {\n var fjernEllerIkke = document.getElementById('fjernStatus');\n fjernEllerIkke.textContent = 'Er du sikker?';\n var nbsp = document.createTextNode('\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0');\n document.getElementById('fjernStatus').appendChild(nbsp);\n var knapp = document.createElement('BUTTON');\n var tekst = document.createTextNode('OK');\n knapp.appendChild(tekst);\n document.getElementById('fjernStatus').appendChild(knapp);\n knapp.id = 'erDuSikker';\n document.getElementById('erDuSikker').addEventListener('click', function() {\n chrome.storage.sync.clear(function() {\n var status = document.getElementById('fjernStatus');\n status.textContent = 'Alle elementer fjernet';\n setTimeout(function() {\n status.textContent = '';\n }, 2000);\n });\n });\n}", "title": "" }, { "docid": "0f6c7fdecda3760d48571bb3aae4102f", "score": "0.57625383", "text": "function switchSyncSymbol(status) {\n if(status === 0) {\n if(syncButton.hasClass(\"sync_red\") === false){\n syncButton.addClass('sync_red');\n }\n\n setTimeout(function() {\n syncTooltip.text(wunderlist.language.data.no_sync);\n stopSyncAnimation();\n }, 1000);\n\n } else {\n syncButton.removeClass('sync_red');\n syncTooltip.text(wunderlist.language.data.sync);\n }\n }", "title": "" }, { "docid": "ccaaa8e1caaf07f391679df0c195e123", "score": "0.57619596", "text": "function textoRead(comparador)\n{\n comparador == \"true\" ? btnRead.innerText = \"Read Less\" : btnRead.innerText = \"Read More\"\n}", "title": "" }, { "docid": "88ed9e17301ad03c3f16e62aba7c46ea", "score": "0.57550514", "text": "function btnStatus(){\n clearInterval(timer)\n clearTimeout(clearTime)\n if (button.innerHTML === 'Start!' || button.innerHTML === 'Continue') {\n button.innerHTML = 'Pause';\n startInterval();\n }\n else if (button.innerHTML === 'Pause') {\n button.innerHTML = 'Continue';\n pauseTime();\n }\n}", "title": "" }, { "docid": "4caba4500d3fc9135f0b4054378fd2bc", "score": "0.57542026", "text": "function toggleBtnText(isInList, listKey) {\n const targetBtn = document.querySelector(`.${listKey}`);\n if (isInList) {\n setCurrentModalRemoveLang(listKey);\n targetBtn.dataset.action = `remove-from-${listKey}`;\n } else {\n setCurrentModalLang(listKey);\n targetBtn.dataset.action = `add-to-${listKey}`;\n }\n}", "title": "" }, { "docid": "b9f91b974acf7a6d6ab4e61b9d021c9a", "score": "0.5751678", "text": "function buttonStatusInstalled( message ){\n $button.removeClass('updating-message aux-not-installed')\n .addClass('installed')\n .text( message );\n }", "title": "" }, { "docid": "6c2005167d3a19fc02e18107b5eafd7c", "score": "0.5749994", "text": "function updateButton() {\n\trecNum--;\n\tif (recNum == 0) {\n\t\tdocument.getElementById(\"recButton\").innerHTML = \"NO RECOMMENDATIONS\";\n\t} \n\telse if (recNum == 1){\n\t\tdocument.getElementById(\"recButton\").innerHTML = \"<span class='notification'>\" + recNum + \"</span> RECOMMENDATION\";\n\t}\n\telse {\n\t\tdocument.getElementById(\"recButton\").innerHTML = \"<span class='notification'>\" + recNum + \"</span> RECOMMENDATIONS\";\n\t}\n}", "title": "" }, { "docid": "3afb5e3f0b841255c880bde2389371d9", "score": "0.5747499", "text": "function operatorButtons() {\n console.log('operators is working');\n operator = $(this).text();\n console.log('operator', operator)\n}", "title": "" }, { "docid": "b34e46b068d786fb80497b973b2917ca", "score": "0.574325", "text": "function setupStatus(){\n // set status and gain colour. // the default gain could be in css but id have to make special case in css\n // easier to do it here while I remember\n currentStatus = \"gain\";\n gain_button.style = \"background-color:#004df3;\";\n}", "title": "" }, { "docid": "6fc175b65ae2cdd8711f7759b5a07cae", "score": "0.5742833", "text": "function setInnerText() {\n\n /**\n * For every menuButton inside menuDiv\n */\n for(var i = 0; i < menuButtons.length; i++) {\n const menuButton = menuButtons.item(i);\n const bar = getBar(i);\n\n /**\n * For the main menuButtons\n */\n switch(i) {\n case 0: menuButton.innerHTML = \"Informationen\"; break;\n case 1: menuButton.innerHTML = \"Fun Features\";break;\n case 2: menuButton.innerHTML = \"Memes\";break;\n case 3: menuButton.innerHTML = \"Mathe\";break;\n }\n\n /**\n * For every menuButton contained in certain bar\n */\n for(var j = 0; j < bar.getElementsByClassName(\"menuButton\").length; j++) {\n const menuButton = getMenuButton(i,j);\n if(i == 0) {\n switch(j) {\n case 0: menuButton.innerText = \"Über Mich\"; break;\n case 1: menuButton.innerText = \"Zu dieser Website\"; break;\n case 2: menuButton.innerText = \"Kontakt\"; break;\n case 3: menuButton.innerText = \"Dummes gelaber\"; break;\n\n }\n }\n if(i == 1) {\n switch(j) {\n case 0: menuButton.innerText = \"Tag 1\"; break;\n case 1: menuButton.innerText = \"Tag 2\"; break;\n case 2: menuButton.innerText = \"Tag 3\"; break;\n case 3: menuButton.innerText = \"Tag 4\"; break;\n }\n }\n }\n }\n}", "title": "" }, { "docid": "51e5da03e9f5a4bf952ab3cc054b240e", "score": "0.5739771", "text": "function defaultProductBtns() {\n let productBtns = document.querySelectorAll('article button');\n for (let blackBtns of productBtns) {\n blackBtns.style.backgroundColor = '#000';\n blackBtns.innerText = 'Buy';\n blackBtns.style.textTransform = 'UPPERCASE'\n blackBtns.style.fontSize = '0.8333rem';\n blackBtns.style.transform = 'none'\n }\n}", "title": "" }, { "docid": "aa426db0a4e4cf3b789201a3609536f1", "score": "0.5715431", "text": "function renderButton(playerStatus) {\n if (playerStatus) {\n return <button onClick={pause} className=\"media-button\">\n <FontAwesomeIcon icon={faPause} className=\"player-fa-icon\"/>\n </button>\n } else {\n return <button onClick={play} className=\"media-button\">\n <FontAwesomeIcon icon={faPlay} className=\"player-fa-icon\"/>\n </button>\n }\n }", "title": "" }, { "docid": "cbfed751572e3268a3e88b12ecb9e860", "score": "0.57059884", "text": "function _formatButton(state, activeReservation) {\n var button = {};\n if (state === 'available') {\n button.unavailable = false;\n button.class = 'checkout';\n return button;\n } else if (activeReservation) {\n if (vm.isAdmin) {\n button.class = 'checkin';\n } else { //User is not admin\n button.unavailable = true;\n button.class = 'checkin';\n if (vm.deviceData['active_reservations'][0].borrower.name.first === 'You') {\n button.unavailable = false;\n }\n }\n return button;\n } else {\n return {\n unavailable: true,\n class: 'checkout'\n };\n }\n }", "title": "" }, { "docid": "0b5131c97853ab703f491dac2f09af42", "score": "0.5699828", "text": "function getViewButtonText(viewType) {\n\t\tvar spec = getViewSpec(viewType);\n\n\t\tif (spec) {\n\t\t\treturn spec.buttonText;\n\t\t}\n\t}", "title": "" }, { "docid": "0b5131c97853ab703f491dac2f09af42", "score": "0.5699828", "text": "function getViewButtonText(viewType) {\n\t\tvar spec = getViewSpec(viewType);\n\n\t\tif (spec) {\n\t\t\treturn spec.buttonText;\n\t\t}\n\t}", "title": "" }, { "docid": "06f6abb924900f9e03f18eb6e93d66e0", "score": "0.56976205", "text": "function translateTag(t) {\n if ( t === \"#btn\" ) {\n return \"button\";\n }\n\n if ( t === \"btn\" ) {\n return \"button\";\n }\n\n if ( t === \"#btnToggle\" ) {\n return \"toggle\";\n }\n\n if ( t === \"btnToggle\" ) {\n return \"toggle\";\n }\n\n if ( t === \"#icon\" ) {\n return \"image\";\n }\n\n if ( t === \"icon\" ) {\n return \"image\";\n }\n\n if ( t === \"#txt\" ) {\n return \"text\";\n }\n\n if ( t === \"txt\" ) {\n return \"text\";\n }\n\n if ( t === \"#text\" ) {\n return \"text\";\n }\n\n if ( t === \"#valueBar\" ) {\n return \"valueBar\";\n }\n\n if ( t === \"#fillingBar\" ) {\n return \"fillingBar\";\n }\n\n if ( t === \"#rectangle\" ) {\n return \"rectangle\";\n }\n\n if ( t === \"#bg\" ) {\n return \"rectangle\";\n }\n\n if ( t === \"bg\" ) {\n return \"rectangle\";\n }\n\n return t;\n}", "title": "" }, { "docid": "96adf4c0f68c591869ce06615a2c8707", "score": "0.56939125", "text": "function toggleButton() {\n fonts.index = fonts.index + 1;\n let i = (fonts.index) % fonts.list.length;\n $('#fontButton').text(fonts.list[i]);\n $('#fontButton').css('font-family', fonts.list[i] + ', sans-serif');\n updatePreview(cm.getValue());\n}", "title": "" }, { "docid": "36ec9b8c8c69ce5d8bfd0b2b5748d42a", "score": "0.569007", "text": "setColorAndTitle(status){\n switch(status){\n case 0:\n this.color = '#afafaf';\n this.title = 'Need to send to drop point';\n break\n case 1:\n this.color = '#ffaf30';\n this.title = 'Active';\n break\n case 2:\n this.color = '#81d129';\n this.title = 'Completed';\n break\n }\n }", "title": "" }, { "docid": "e0dab1aa06fbd6d2bbcabd2150a71eaf", "score": "0.56870514", "text": "buttonSwitcher() {\n if (this.props.withinBounds) {\n if (this.props.greenLight) {\n return (\n <button\n className=\"button primary hero\"\n onClick={() => {\n this.executeTransaction();\n }}\n disabled={this.props.acyncButtonFlag}\n >\n {this.props.acyncButtonFlag === false ? (\n <Text id=\"Exchange.ExecuteTrade\" />\n ) : (\n <Squares color=\"white\" />\n )}\n </button>\n );\n } else {\n return (\n <button\n className=\"button primary hero\"\n onClick={() => {\n this.getQuote();\n }}\n disabled={this.props.acyncButtonFlag}\n >\n {this.props.acyncButtonFlag === false ? (\n <Text id=\"Exchange.QUOTE\" />\n ) : (\n <Squares color=\"white\" />\n )}\n </button>\n );\n }\n }\n }", "title": "" }, { "docid": "0334698c7858e16e1addf5c181acdb9c", "score": "0.5664597", "text": "function handleCopySuccess(button) {\n var originalText = button.text();\n button.text(\"Success!\");\n button.addClass(\"btn-success\");\n setTimeout(function(){ \n button.text(originalText);\n button.removeClass(\"btn-success\");\n }, 500); \n}", "title": "" }, { "docid": "bfdbc27feff4cf031216563ca2ee2d71", "score": "0.5664262", "text": "conformButtonType() {\n // check only needed on visible and not simple buttons\n let buttons = calImipBar\n .getButtons()\n .filter(aElement => aElement.hasAttribute(\"type\") && !aElement.hidden);\n // change button if appropriate\n for (let button of buttons) {\n let items = calImipBar.getMenuItems(button).filter(aItem => !aItem.hidden);\n if (button.type == \"menu\" && items.length == 0) {\n // hide non functional buttons\n button.hidden = true;\n } else if (button.type == \"menu-button\") {\n if (\n items.length == 0 ||\n (items.length == 1 &&\n button.hasAttribute(\"oncommand\") &&\n items[0].hasAttribute(\"oncommand\") &&\n button.getAttribute(\"oncommand\").endsWith(items[0].getAttribute(\"oncommand\")))\n ) {\n // convert to simple button\n button.removeAttribute(\"type\");\n }\n }\n }\n }", "title": "" }, { "docid": "07ea6e78477ce4780046bfc8ffdb9793", "score": "0.56641775", "text": "function buttonClick() {\n var buttonText = this.innerHTML;\n\n if (buttonText === 'C') {\n handleClear();\n } else if (buttonText === '=') {\n handleEquals();\n } else {\n handleOther(buttonText);\n }\n }", "title": "" }, { "docid": "d5a8e4492ded788084128701d19b042e", "score": "0.5661219", "text": "function controlButton() {\n if ( flag_name && flag_tel && flag_email && flag_agree_rules && flag_agree_privacy ) {\n $btn_next.removeClass('status-disabled');\n } else {\n $btn_next.addClass('status-disabled');\n }\n }", "title": "" }, { "docid": "dedbbc82b626cb09fbf64ab854f45941", "score": "0.5659316", "text": "_refreshLabelsButtons() {\n this._label_Bet.SetText(this._playerBet.toString());\n this._label_Money.SetText(this._playerMoney.toString());\n this._label_Winning.SetText((this._winningMoney > 0 ? \"+\" : \"\") + this._winningMoney.toString());\n this._label_Winning.color = this._winningMoney < 0 ? \"#FF0000\" : \"#00FF00\";\n this._label_Jackpot.SetText((this._wonjackpot ? \"Jackpot win!\" : \"Jackpot: \" + this._jackpot.toString()));\n this._label_Jackpot.color = this._wonjackpot ? \"#00FF00\" : \"#FFFF00\";\n this._button_0.SetEnable(this._playerBet > 0);\n this._button_1.SetEnable(this._playerMoney >= this._playerBet + 1);\n this._button_5.SetEnable(this._playerMoney >= this._playerBet + 5);\n this._button_10.SetEnable(this._playerMoney >= this._playerBet + 10);\n this._button_spin.SetEnable(this._playerBet > 0);\n }", "title": "" }, { "docid": "d96219b899eae05a27e6d14c5eafa941", "score": "0.5659111", "text": "displayMessageButton (button, newValue, color) {\n const oldValue = button === this.$searchButton ? \"Search\"\n : button === this.$positionButton ? \"Get your position \\uD83D\\uDEA9\"\n : button === this.$saveButton ? \"Save position \\u2B73\"\n : \"Upload position \\u2B71\";\n \n button.style.color = color;\n button.value = newValue;\n setTimeout(() => {\n button.style.color = \"#fff\";\n button.value = oldValue;\n }, 1500)\n }", "title": "" } ]
a61fe486d2274f686cae953e2880fc8c
get 5 day forecast
[ { "docid": "7e8bd8795b7a42a1c9a44d2b24f561fd", "score": "0.0", "text": "function getForecast() {\n let queryURLForecast = 'https://api.openweathermap.org/data/2.5/forecast/daily?q=' + searchLocations[0] + '&cnt=6&units=imperial&appid=' + APIKey;\n\n $.ajax({\n url: queryURLForecast,\n method: 'GET'\n }).then(function (forecastResponse) {\n if (searchLocations.length > 0) {\n $('#weather-forecast > h2 > span').text(searchLocations[0])\n\n // reset forecast cards\n resetForecastCards()\n\n for (let k = 1; k < forecastResponse.list.length; k++) {\n let nextDay = forecastResponse.list[k]\n let momentDate = moment.unix(nextDay.dt)\n let newDivElement = $('<div>').addClass('forecast-card')\n let newPDate = $('<p>').addClass('future-date')\n let newPTemp = $('<p>').addClass('future-temp')\n let newPHum = $('<p>').addClass('future-humidity')\n let newImgElement = $('<img>')\n let forecastIcon = 'https://openweathermap.org/img/w/' + nextDay.weather[0].icon + '.png';\n let forecastDate = momentDate.format('MM/DD/YYYY');\n\n newPDate.text(forecastDate)\n newImgElement.attr('src', forecastIcon)\n newPTemp.html('Temp: <span></span> &#8457')\n newPTemp.children().text(nextDay.temp.day)\n newPHum.html('Humidity: <span></span>%')\n newPHum.children().text(nextDay.humidity)\n\n newDivElement.append(newPDate)\n newDivElement.append(newImgElement)\n newDivElement.append(newPTemp)\n newDivElement.append(newPHum)\n\n $('#forecast-container').append(newDivElement)\n }\n }\n }).catch(function (error) {\n // console.log(error)\n })\n}", "title": "" } ]
[ { "docid": "ca196d50dcac0601d2b52f20e380a9e9", "score": "0.71304107", "text": "function getWeather() {\n var forecast = jsonForecast.list;\n var day = date.getDate();\n\n for (i = day; i < (day + 5); i++) {\n fiveDayDaily.push(forecast.filter(\n function(forecast) {\n return (getDate(forecast.dt) == i);\n }\n )[0]);\n\n fiveDayForcast.push(forecast.filter(\n function(forecast) {\n return (getDate(forecast.dt) == i);\n }\n ));\n }\n}", "title": "" }, { "docid": "fcaaa9e1d42b1310e961ce952ccb58c4", "score": "0.7033062", "text": "function display5DayForecast(response) {\n for (var i = 1; i <= 5; i++) {\n displayDailyDate(response, i);\n displayDailyForecastIcon(response, i);\n dailyForecast(response, i);\n }\n }", "title": "" }, { "docid": "238205af7e853b97521d75ca194ad813", "score": "0.6805804", "text": "function get5DayForecast(id){\n fiveDayWeather.setAttribute(\"style\",\"\");\n let fiveDayMorningArr = [];\n let fiveDayNoonArr = [];\n let fiveDayEveningArr = [];\n fetch(`https://api.openweathermap.org/data/2.5/forecast?id=${id}&appid=86caed8984442f53f479ce0a825d902d&units=imperial`)\n .then(function (response) {\n return response.json();\n })\n\n //Grabs only the applicable arrays.\n .then(function (data) {\n for (var i = 0; i < data.list.length; i++) {\n if ([\"05\",\"06\",\"07\"].includes(timeConvertHourOnly((data.list[i].dt)+(timezoneOffset)))){\n fiveDayMorningArr.push(data.list[i]);\n }\n if ([11,12,13].includes(timeConvertHourOnly((data.list[i].dt)+(timezoneOffset)))){\n fiveDayNoonArr.push(data.list[i]);\n }\n if ([17,18,19].includes(timeConvertHourOnly((data.list[i].dt)+(timezoneOffset)))){\n fiveDayEveningArr.push(data.list[i]);\n }\n }\n morningFiveDay(fiveDayMorningArr);\n noonFiveDay(fiveDayNoonArr);\n eveningFiveDay(fiveDayEveningArr);\n })\n}", "title": "" }, { "docid": "45492c72351e15edf926ac616efeb7f2", "score": "0.66938853", "text": "function getFiveDayForecast(lon, lat) {\n forecastElement.innerHTML = '';\n fetch(`https://api.openweathermap.org/data/2.5/forecast?lat=${lat}&lon=${lon}&units=metric&appid=ad48a33f3b48cd0e6865e7b3613dcfa6`)\n .then(response => response.json())\n .then(data => {\n //converting unix time stamp to a date time\n var list = data.list;\n console.log(moment.unix(list[0].dt).format(\"MM/DD/YYYY\"))\n for(var i = 7; i < list.length; i+=7){\n var forecastNode = document.createElement('div')\n forecastNode.setAttribute('class', 'col-sm-2.4 fiveForecastStyle')\n forecastNode.innerHTML = `\n <h6>${moment.unix(list[i].dt).format(\"MM/DD/YYYY\")}</h6>\n <img src= \"https://openweathermap.org/img/wn/${list[i].weather[0].icon}.png\" alt = \"${list[i].weather[0].icon}\">\n <p>Temp: ${list[i].main.temp} ºC</p>\n <p>Humidity: ${list[i].main.humidity}%</p>\n `\n forecastElement.append(forecastNode)\n }\n })\n .catch(error => console.error(error))\n}", "title": "" }, { "docid": "e0fce52edb9152fe163eb29a4a963bfc", "score": "0.6644546", "text": "function getFiveDay() {\n var queryURL =\n \"https://api.openweathermap.org/data/2.5/forecast?q=\" +\n cityName +\n \"&cnt=6&units=imperial&APPID=d3fd98847acde993dd3979c78e2e807f\";\n $.ajax({\n url: queryURL,\n method: \"GET\",\n }).then(function (response) {\n // information for first of 5 days\n\n var date = $(\"<h5>\").append(new moment().add(1, \"day\").format(\"L\"));\n var icon = $(\"<img>\").attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[1].weather[0].icon +\n \"@2x.png\"\n );\n var temp = $(\"<h5>\").text(\"temp: \" + response.list[1].main.temp);\n var humid = $(\"<h5>\").text(\"humidity: \" + response.list[1].main.humidity);\n var wind = $(\"<h5>\").text(\"wind: \" + response.list[1].wind.speed);\n $(\"#card1\").empty().append(date, icon, temp, humid, wind);\n\n // // information for second of 5 days\n\n var date = $(\"<h5>\").append(new moment().add(2, \"day\").format(\"L\"));\n var icon = $(\"<img>\").attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[2].weather[0].icon +\n \"@2x.png\"\n );\n var temp = $(\"<h5>\").text(\"temp: \" + response.list[2].main.temp);\n var humid = $(\"<h5>\").text(\"humidity: \" + response.list[2].main.humidity);\n var wind = $(\"<h5>\").text(\"wind: \" + response.list[2].wind.speed);\n $(\"#card2\").empty().append(date, icon, temp, humid, wind);\n\n // // information for 3rd of 5 days\n\n var date = $(\"<h5>\").append(new moment().add(3, \"day\").format(\"L\"));\n var icon = $(\"<img>\").attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[3].weather[0].icon +\n \"@2x.png\"\n );\n var temp = $(\"<h5>\").text(\"temp: \" + response.list[3].main.temp);\n var humid = $(\"<h5>\").text(\"humidity: \" + response.list[3].main.humidity);\n var wind = $(\"<h5>\").text(\"wind: \" + response.list[3].wind.speed);\n $(\"#card3\").empty().append(date, icon, temp, humid, wind);\n\n // information for 4th of 5 days\n\n var date = $(\"<h5>\").append(new moment().add(4, \"day\").format(\"L\"));\n var icon = $(\"<img>\").attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[4].weather[0].icon +\n \"@2x.png\"\n );\n var temp = $(\"<h5>\").text(\"temp: \" + response.list[4].main.temp);\n var humid = $(\"<h5>\").text(\"humidity: \" + response.list[4].main.humidity);\n var wind = $(\"<h5>\").text(\"wind: \" + response.list[4].wind.speed);\n $(\"#card4\").empty().append(date, icon, temp, humid, wind);\n\n // // information for 5th of 5 days\n\n var date = $(\"<h5>\").append(new moment().add(5, \"day\").format(\"L\"));\n var icon = $(\"<img>\").attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[5].weather[0].icon +\n \"@2x.png\"\n );\n var temp = $(\"<h5>\").text(\"temp: \" + response.list[5].main.temp);\n var humid = $(\"<h5>\").text(\"humidity: \" + response.list[5].main.humidity);\n var wind = $(\"<h5>\").text(\"wind: \" + response.list[5].wind.speed);\n $(\"#card5\").empty().append(date, icon, temp, humid, wind);\n });\n }", "title": "" }, { "docid": "afaa2ca78a5355e4fda50b67221b50ea", "score": "0.6637337", "text": "function getFiveDay(long, lat) {\n\t\tvar fiveQuery =\n\t\t\t\"https://api.openweathermap.org/data/2.5/onecall?lat=\" +\n\t\t\tlat +\n\t\t\t\"&lon=\" +\n\t\t\tlong +\n\t\t\t\"&units=imperial&appid=\" +\n\t\t\tapiKey;\n\t\t$.ajax({\n\t\t\turl: fiveQuery, //API Call\n\t\t\tdataType: \"json\",\n\t\t\ttype: \"GET\",\n\t\t\tsuccess: function (data) {\n\t\t\t\t$(\".fiveDay\").empty();\n\t\t\t\tfor (var i = 1; i < 6; i++) {\n\t\t\t\t\t// Set five day forecast variables\n\t\t\t\t\tvar dayDiv = $(\n\t\t\t\t\t\t\"<div class='col-2 bg-primary text-white ml-3 mb-3 rounded'></div>\"\n\t\t\t\t\t);\n\t\t\t\t\tvar day = dayjs().date();\n\t\t\t\t\tvar adjDay = day + i;\n\t\t\t\t\tvar month = dayjs().format(\"MM\");\n\t\t\t\t\tvar year = dayjs().format(\"YYYY\");\n\t\t\t\t\tvar dayDisp = $(\"<p>\" + month + \"/\" + adjDay + \"/\" + year + \"</p>\");\n\t\t\t\t\tvar maxTemp = $(\"<p>High: \" + data.daily[i].temp.max + \"\\u2109</p>\");\n\t\t\t\t\tvar minTemp = $(\"<p>Low: \" + data.daily[i].temp.min + \"\\u2109</p>\");\n\t\t\t\t\tvar dayHumid = $(\"<p>Humidity: \" + data.daily[i].humidity + \"%</p>\");\n\t\t\t\t\tvar dayImg = $(\n\t\t\t\t\t\t'<img src=\"https://openweathermap.org/img/wn/' +\n\t\t\t\t\t\t\tdata.daily[i].weather[0].icon +\n\t\t\t\t\t\t\t'@2x.png\" alt=\"weather icon\">'\n\t\t\t\t\t);\n\n\t\t\t\t\t//Appended all the info to the faveDay class //\n\n\t\t\t\t\t$(\".fiveDay\").append(dayDiv);\n\t\t\t\t\tdayDiv.append(dayDisp, dayImg, maxTemp, minTemp, dayHumid);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}", "title": "" }, { "docid": "d2ffc8276be81036912e459caccbde3e", "score": "0.65721345", "text": "function getFiveDay()\n{\n var requesturl = `https://api.openweathermap.org/data/2.5/forecast?q=${city}&appid=${API_KEY}&units=imperial`;\n\n $.ajax({\n url: requesturl,\n method: \"GET\",\n success: function (response) {\n populateFiveDayForecast(response);\n }\n });\n}", "title": "" }, { "docid": "c4a8092346a4033074ce484a16dda40f", "score": "0.65615946", "text": "function foreCast(resp) {\n var daily = resp.daily;\n daily.map((itm, i) => {\n if (i < 5) {\n // get forecast dates\n var dateFormat = new Date(daily[i].dt * 1000).toLocaleDateString(\"en-US\");\n document.getElementById(\"fDate\" + i).innerHTML = dateFormat;\n // get forecast icon images\n var foreCastIcon = daily[i].weather[0].icon + \".png\";\n foreCastIconImg = \"https://openweathermap.org/img/w/\" + foreCastIcon;\n document.getElementById(\"fImg\" + i).src = foreCastIconImg;\n // get forecast temperature\n var foreCastTemp = Math.round(parseFloat(daily[i].temp.max) - 273.15);\n document.getElementById(\"fTemp\" + i).innerHTML = foreCastTemp + \"°C\";\n // get forecast humidity\n var foreCastHumidity = daily[i].humidity;\n document.getElementById(\"fHumidity\" + i).innerHTML =\n foreCastHumidity + \"%\";\n }\n });\n}", "title": "" }, { "docid": "97a9de037db89adb71ac5dbf5d9c0a9a", "score": "0.65489995", "text": "function populateFiveDayForecast(data)\n{\n var arrayofdays = [data.list[3], data.list[11], data.list[19], data.list[27], data.list[35]];\n for (var i = 1; i < arrayofdays.length + 1; i++)\n {\n futureForecastCardArray.children(`:nth-child(${i})`).children(\".future-date\").text(CurrentDate.plus({days: i}).toLocaleString(CurrentDate.DATE_SHORT));\n futureForecastCardArray.children(`:nth-child(${i})`).children(\"img\").attr(\"src\", `http://openweathermap.org/img/wn/${arrayofdays[i - 1].weather[0].icon}@2x.png`);\n futureForecastCardArray.children(`:nth-child(${i})`).children(\".future-temp\").children(\"span\").text(arrayofdays[i - 1].main.temp);\n futureForecastCardArray.children(`:nth-child(${i})`).children(\".future-humidity\").children(\"span\").text(arrayofdays[i - 1].main.humidity);\n }\n}", "title": "" }, { "docid": "4f02072589ada075098e7c46dc5d6cf0", "score": "0.6546597", "text": "function getForecastDays(currentDay){\n daysList = [\"Mon\", \"Tue\", \"Wed\", \"Thr\", \"Fri\", \"Sat\", \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thr\", \"Fri\", \"Sat\", \"Sun\"];\n days = [];\n\n for(var i = 0; i < 5; i++){\n days[i] = daysList[currentDay + i]\n }\n\n return days;\n}", "title": "" }, { "docid": "dd581f430b9ac92ecbdb82e00d68e999", "score": "0.65163267", "text": "function getFiveDayForecast(latitude, longitude){\n // clear any existing five-day forecast cards\n $(\"#fiveDayCardsRow\").empty();\n\n $.ajax({\n method: \"GET\",\n url: `https://api.openweathermap.org/data/2.5/onecall?lat=${latitude}&lon=${longitude}&exclude=current,minutely,hourly,alerts&appid=${APIKEY}`\n }).then(function(fiveDayResponse){\n var fiveDayForecastList = fiveDayResponse.daily;\n for (var l = 1; l < 6; l++){ //search through list of forecasts and extract five\n\n // display each of the five-day forecasts on the screen\n var dailyDate = moment(fiveDayForecastList[l].dt,\"X\");\n var fiveDayCardDateTxt = dailyDate.format(\"DD/M/YYYY\");\n var fiveDayCardIconSrc = `https://openweathermap.org/img/wn/${fiveDayForecastList[l].weather[0].icon}@2x.png`;\n var fiveDayCardTempTxt = `Temp: ${tempKtoC(fiveDayForecastList[l].temp.day)} °C`;\n var fiveDayCardHumidTxt = `Humidity: ${fiveDayForecastList[l].humidity}%`;\n\n // make html\n var newFiveDayCard = document.createElement(\"div\");\n $(newFiveDayCard).attr(\"class\", \"fiveDayCard card m-3\");\n $(\"#fiveDayCardsRow\").append(newFiveDayCard);\n var newFiveDayCardBody = $(\"<div>\");\n $(newFiveDayCard).append(newFiveDayCardBody);\n $(newFiveDayCardBody).attr(\"class\", \"card-body\");\n \n // date heading\n var newFiveDayCardHeading = document.createElement(\"h4\");\n $(newFiveDayCardHeading).attr(\"class\", \"card-title fiveDayDate\");\n $(newFiveDayCardHeading).text(fiveDayCardDateTxt);\n $(newFiveDayCardBody).append(newFiveDayCardHeading);\n \n // weather icon\n var newFiveDayCardIcon = document.createElement(\"img\");\n $(newFiveDayCardIcon).attr(\"src\", fiveDayCardIconSrc);\n $(newFiveDayCardBody).append(newFiveDayCardIcon);\n \n // temperature\n var newFiveDayCardTemp = document.createElement(\"p\");\n $(newFiveDayCardTemp).text(fiveDayCardTempTxt);\n $(newFiveDayCardBody).append(newFiveDayCardTemp);\n \n // humidity\n var newFiveDayCardHumidity = document.createElement(\"p\");\n $(newFiveDayCardHumidity).text(fiveDayCardHumidTxt);\n $(newFiveDayCardBody).append(newFiveDayCardHumidity);\n }\n });\n }", "title": "" }, { "docid": "5107272443a3eb835aa60122e5917830", "score": "0.6438483", "text": "function populateFiveDay(){\n\tvar jObj = JSON.parse(localStorage.getItem(\"5dayWeatherObj\"));\n\t//array of list\n\tvar length = jObj.list.length;\n\t//object with dt = date, main.temp, etc\n\tvar date;\n\tvar temp;\n\tvar id;\n\n/* 5 day forecast returns items every three hours (8 per day)\nfind every 8th value and use it for the day.\n@note: I would prefer to use the API 16 day daily forecast, but it cost\nmoney to use\n*/\n\tfor(var i = 0; i < length; i += 8){\n\t\t//get variables\n\t\ttimestamp = jObj.list[i].dt;\n\t\ttemp = convertToFahrenheit(jObj.list[i].main.temp);\n\t\tid = jObj.list[i].weather[0].id;\n\t\tconsole.log(\"i:\"+ i);\n\t\tconsole.log(\"id:\"+id);\n\t\t//display date as day of week\n\t\tvar myDate = new Date(timestamp * 1000);\n\t\tvar day = getDayOfWeek(myDate.getDay());\n\n\t\t//populate date\n\t\tvar int = i / 8; //only pull one per day\n\t\tif(int <= 6 && int > 0){ //only populate 5 days\n\t\tvar dateId = \"dateDay\"+ int ;\n\t\tdocument.getElementById(dateId).innerHTML = day;\n\t\t//populate weatherIcon\n\t\tvar str = \"iconDay\" + int; \n\t\tselectWeatherAnimation(id, str);\n\t\t//populate the temperature\n\t\tvar tempDay = \"tempDay\" + int;\n\t\tdocument.getElementById(tempDay).innerHTML = Math.round(temp) + \"&#176\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7b8139f78a41e5713332e9525cd3ee73", "score": "0.6392185", "text": "render5DayForecast() {\n\t\tif (this.props.forecast.daily && this.props.location) {\n\t\t\tconst days = this.props.forecast.daily.data.slice(0, 5);\n\t\t\tconst icons = this.props.icons;\n\t\t\tconst { city } = this.props.location;\n\t\t\treturn (\n\t\t\t\t<div className=\"fiveday-wrapper\">\n\t\t\t\t\t{days.map(weather => (\n\t\t\t\t\t\t<FiveDayForecast key={weather.time} weather={weather} icons={icons} city={city} />\n\t\t\t\t\t))}\n\t\t\t\t</div>)\n\t\t}\n\t}", "title": "" }, { "docid": "7958eac5907ec3745ea17941e85dffd4", "score": "0.63740915", "text": "function getForecastData7DaysOld(cb) {\n if (adapter.config.Days7Forecast) {\n const url = adapter.config.Days7Forecast;\n adapter.log.debug('calling forecast: ' + url);\n\n request(url, (error, response, body) => {\n if (!error && response.statusCode === 200) {\n\n try {\n //adapter.log.debug('got body: ' + body);\n parseString(body, (err, result) => {\n //adapter.log.debug('parsed7: ' + JSON.stringify(result));\n for (let d = 0; d < 7; d++) {\n const id = 'NextDays.' + d + 'd.';\n const vars = result.report.location[0].const || result.report.location[0].var;\n insertIntoList(id + 'Temperature_Min', vars[0].data[0].forecast[d].$.value);\n insertIntoList(id + 'Temperature_Max', vars[1].data[0].forecast[d].$.value);\n insertIntoList(id + 'WindID', vars[2].data[0].forecast[d].$.id);\n insertIntoList(id + 'WindIDB', vars[2].data[0].forecast[d].$.idB);\n insertIntoList(id + 'Wind', vars[2].data[0].forecast[d].$.value);\n insertIntoList(id + 'WindB', vars[2].data[0].forecast[d].$.valueB);\n insertIntoList(id + 'ConditionID', vars[3].data[0].forecast[d].$.id);\n insertIntoList(id + 'Condition', vars[3].data[0].forecast[d].$.value);\n insertIntoList(id + 'ConditionID2', vars[3].data[0].forecast[d].$.id2);\n insertIntoList(id + 'Condition2', vars[3].data[0].forecast[d].$.value2);\n insertIntoList(id + 'day', vars[4].data[0].forecast[d].$.value);\n insertIntoList(id + 'atmosphere', vars[5].data[0].forecast[d].$.value);\n /*\n adapter.setState(id + 'Temperature_Min', { ack: true, val: vars[0].data[0].forecast[d].$.value });\n adapter.setState(id + 'Temperature_Max', { ack: true, val: vars[1].data[0].forecast[d].$.value });\n adapter.setState(id + 'WindID', { ack: true, val: vars[2].data[0].forecast[d].$.id });\n adapter.setState(id + 'WindIDB', { ack: true, val: vars[2].data[0].forecast[d].$.idB });\n adapter.setState(id + 'Wind', { ack: true, val: vars[2].data[0].forecast[d].$.value });\n adapter.setState(id + 'WindB', { ack: true, val: vars[2].data[0].forecast[d].$.valueB });\n adapter.setState(id + 'ConditionID', { ack: true, val: vars[3].data[0].forecast[d].$.id });\n adapter.setState(id + 'Condition', { ack: true, val: vars[3].data[0].forecast[d].$.value });\n adapter.setState(id + 'ConditionID2', { ack: true, val: vars[3].data[0].forecast[d].$.id2 });\n adapter.setState(id + 'Condition2', { ack: true, val: vars[3].data[0].forecast[d].$.value2 });\n adapter.setState(id + 'day', { ack: true, val: vars[4].data[0].forecast[d].$.value });\n adapter.setState(id + 'atmosphere', { ack: true, val: vars[5].data[0].forecast[d].$.value });\n */\n }\n adapter.log.debug('7 days forecast done, objects in list ' + tasks.length);\n getForecastData5DaysOld(cb);\n });\n } catch (e) {\n adapter.log.error('exception in 7DaysForecast [' + e + ']');\n getForecastData5DaysOld(cb);\n }\n } else {\n // ERROR\n adapter.log.error('DasWetter.com reported an error: ' + error + \" or response \" + response.statusCode);\n getForecastData5DaysOld(cb);\n }\n });\n }\n else {\n getForecastData5DaysOld(cb);\n }\n}", "title": "" }, { "docid": "a406efcb5595c5c0e4269bf06218b85b", "score": "0.63494414", "text": "function retrieve5DayWeather(lat, lon) {\n let queryURLfor5DayWeather =\n oneCallAPI + lat + \"&lon=\" + lon + units + APIkey;\n\n $.ajax({\n url: queryURLfor5DayWeather,\n method: \"GET\",\n }).then(function (responseForecast) {\n let forecasted = responseForecast;\n for (var i = 1; i < 6; i++) {\n let forecastDate = forecasted.daily[i].dt;\n let forecastDateFormatted = new Date(\n forecastDate * 1000\n ).toLocaleDateString(\"en-AU\");\n let forecastImg = forecasted.daily[i].weather[0].icon;\n let forecastImgRetrieved = getWeatherIcon + forecastImg + \".png\";\n let forecastTempMin = Math.round(forecasted.daily[i].temp.min);\n let forecastTempMax = Math.round(forecasted.daily[i].temp.max);\n let forecastHum = forecasted.daily[i].humidity;\n let forecastUVI = forecasted.daily[i].uvi;\n\n $(\"#day\" + i + \"Date\").text(forecastDateFormatted);\n $(\"#day\" + i + \"Img\").attr(\"src\", forecastImgRetrieved);\n $(\"#day\" + i + \"TempMin\").text(\"Min Temp: \" + forecastTempMin + \" °C\");\n $(\"#day\" + i + \"TempMax\").text(\"Max Temp: \" + forecastTempMax + \" °C\");\n $(\"#day\" + i + \"Hum\").text(\"Humidity: \" + forecastHum + \"%\");\n $(\"#day\" + i + \"UVI\").text(\"UVI: \" + forecastUVI);\n }\n });\n showHistory();\n}", "title": "" }, { "docid": "0bcf413e51cf5914287923cbdc134de9", "score": "0.6292545", "text": "function getForecast5Days(city) {\n var requestUrl = \"https://api.openweathermap.org/data/2.5/forecast?q=\"+city+\"&appid=\"+api+\"&units=\"+unit;\n \n fetch(requestUrl)\n .then(function (response) {\n return response.json();\n })\n .then(function (data) {\n var days=[8,16,24,32,39]\n for(var i=0;i<5;i++){ \n $('.day-'+`${i + 1}`+'-header').text(data.list[days[i]].dt_txt.split(' ')[0])\n var icon=data.list[days[i]].weather[0].icon;\n var imageURL=\"http://openweathermap.org/img/wn/\"+icon+\"@2x.png\";\n $('.weather-image-'+`${i + 1}`).attr(\"src\",imageURL);\n $('.day-'+`${i + 1}`+'-temp').text('Temp: '+data.list[days[i]].main.temp+String.fromCharCode(176)+' C') \n $('.day-'+`${i + 1}`+'-wind').text('Wind: '+data.list[days[i]].wind.speed+' MPH')\n $('.day-'+`${i + 1}`+'-humidity').text('Humidity: '+data.list[days[i]].main.humidity+' %') \n } \n });\n}", "title": "" }, { "docid": "0c44e123944e04c96734f228c8fc21a0", "score": "0.6261619", "text": "function getFiveDay(city, unixTime) {\n var queryURL = `https://api.openweathermap.org/data/2.5/forecast?q=${city}&units=imperial&appid=${apiKey}`\n\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response) {\n // sets array to start at 12 noon on following day\n var arrayIndex = 4;\n\n // FOR LOOP RUNS 5 TIMES FOR 5 DAY WEATHER DATA \n for (i = 1; i < 6; i++) {\n var day = moment.unix(unixTime).add(i, 'days').format('MM-DD-YYYY');\n var iconURL = `https://openweathermap.org/img/w/${response.list[arrayIndex].weather[0].icon}.png`\n\n $(`#forecast-date-${i}`).text(day);\n $(`#forecast-temp-${i}`).text(`${response.list[arrayIndex].main.temp.toFixed(1)} \\xB0F`);\n $(`#forecast-humid-${i}`).text(response.list[arrayIndex].main.humidity + '%');\n $(`#forecast-image-${i}`).attr('src', iconURL);\n\n // moves array index up 24 hours\n arrayIndex += 8;\n }\n })\n}", "title": "" }, { "docid": "f0555d9390f7392547c5b88b63f64d40", "score": "0.62356645", "text": "function getForecast(url) {\n $.ajax({\n url: url,\n method: \"GET\"\n })\n .fail(function(res) {\n console.log(\"error\");\n })\n .then(function(res) {\n\n // variables for each forecast day \n var clear1 = 0; // # of clear descriptions on first day etc.\n var clouds1 = 0;\n var rain1 = 0;\n var snow1 = 0;\n var thunderstorm1 = 0;\n var temps1 = []; // all the temps for given day\n var humidities1 = []; // all the humidities for the given day\n\n var clear2 = 0;\n var clouds2 = 0;\n var rain2 = 0;\n var thunderstorm2 = 0;\n var snow2 = 0;\n var temps2 = [];\n var humidities2 = [];\n\n var clear3 = 0;\n var clouds3 = 0;\n var rain3 = 0;\n var thunderstorm3 = 0;\n var snow3 = 0;\n var temps3 = [];\n var humidities3 = [];\n\n var clear4 = 0;\n var clouds4 = 0;\n var rain4 = 0;\n var thunderstorm4 = 0;\n var snow4 = 0;\n var temps4 = [];\n var humidities4 = [];\n\n var clear5 = 0;\n var clouds5 = 0;\n var rain5 = 0;\n var thunderstorm5 = 0;\n var snow5 = 0;\n var temps5 = [];\n var humidities5 = [];\n\n\n for (var i = 0; i < res.list.length; i++) {\n localTime = res.list[i].dt; \n localTime = new Date(localTime * 1000); // converts to local time of browser\n \n // tomorrow\n if (localTime >= tomorrow && localTime < secondDay ) {\n if (res.list[i].weather[0].main === \"Clear\") {\n clear1++;\n } else if (res.list[i].weather[0].main === \"Clouds\") {\n clouds1++;\n } else if (res.list[i].weather[0].main === \"Rain\") {\n rain1++; \n } else if (res.list[i].weather[0].main === \"Thunderstorm\") {\n thunderstorm1++; \n }\n else if (res.list[i].weather[0].main === \"Snow\") {\n snow1++; \n }\n temps1.push(res.list[i].main.temp)\n humidities1.push(res.list[i].main.humidity);\n\n }\n // secondDay\n else if (localTime >= secondDay && localTime < thirdDay) {\n if (res.list[i].weather[0].main === \"Clear\") {\n clear2++;\n } else if (res.list[i].weather[0].main === \"Clouds\") {\n clouds2++;\n } else if (res.list[i].weather[0].main === \"Rain\") {\n rain2++; \n } else if (res.list[i].weather[0].main === \"Thunderstorm\") {\n thunderstorm2++; \n }\n else if (res.list[i].weather[0].main === \"Snow\") {\n snow2++; \n }\n\n temps2.push(res.list[i].main.temp)\n humidities2.push(res.list[i].main.humidity);\n }\n // third\n else if (localTime >= thirdDay && localTime < fourthDay) {\n if (res.list[i].weather[0].main === \"Clear\") {\n clear3++;\n } else if (res.list[i].weather[0].main === \"Clouds\") {\n clouds3++;\n } else if (res.list[i].weather[0].main === \"Rain\") {\n rain3++; \n } else if (res.list[i].weather[0].main === \"Thunderstorm\") {\n thunderstorm3++; \n }\n else if (res.list[i].weather[0].main === \"Snow\") {\n snow3++; \n }\n\n temps3.push(res.list[i].main.temp)\n humidities3.push(res.list[i].main.humidity);\n }\n // fourth\n else if (localTime >= fourthDay && localTime < fifthDay) {\n if (res.list[i].weather[0].main === \"Clear\") {\n clear4++;\n } else if (res.list[i].weather[0].main === \"Clouds\") {\n clouds4++;\n } else if (res.list[i].weather[0].main === \"Rain\") {\n rain4++; \n } else if (res.list[i].weather[0].main === \"Thunderstorm\") {\n thunderstorm4++; \n }\n else if (res.list[i].weather[0].main === \"Snow\") {\n snow4++; \n }\n\n temps4.push(res.list[i].main.temp)\n humidities4.push(res.list[i].main.humidity);\n }\n // fifth\n else if (localTime >= fifthDay) {\n if (res.list[i].weather[0].main === \"Clear\") {\n clear5++;\n } else if (res.list[i].weather[0].main === \"Clouds\") {\n clouds5++;\n } else if (res.list[i].weather[0].main === \"Rain\") {\n rain5++; \n } else if (res.list[i].weather[0].main === \"Thunderstorm\") {\n thunderstorm5++; \n }\n else if (res.list[i].weather[0].main === \"Snow\") {\n snow5++; \n }\n\n temps5.push(res.list[i].main.temp)\n humidities5.push(res.list[i].main.humidity);\n\n }\n } // end for\n \n // sort arrays\n $(\".highTemp1\").text(`${temps1.sort(function(a,b) {return b-a})[0]} F`);\n $(\".lowTemp1\").text(`${temps1.sort()[0]} F`);\n $(\".humidity1\").text(`${humidities1.sort()[humidities1.length-1]}`);\n\n $(\".highTemp2\").text(`${temps2.sort(function(a,b) {return b-a})[0]} F`);\n $(\".lowTemp2\").text(`${temps2.sort()[0]} F`);\n $(\".humidity2\").text(`${humidities2.sort()[humidities2.length-1]}`);\n\n $(\".highTemp3\").text(`${temps3.sort(function(a,b) {return b-a})[0]} F`);\n $(\".lowTemp3\").text(`${temps3.sort()[0]} F`);\n $(\".humidity3\").text(`${humidities3.sort()[humidities3.length-1]}`);\n\n $(\".highTemp4\").text(`${temps4.sort(function(a,b) {return b-a})[0]} F`);\n $(\".lowTemp4\").text(`${temps4.sort()[0]} F`);\n $(\".humidity4\").text(`${humidities4.sort()[humidities4.length-1]}`);\n\n\n $(\".highTemp5\").text(`${temps5.sort(function(a,b) {return b-a})[0]} F`);\n $(\".lowTemp5\").text(`${temps5.sort()[0]} F`);\n $(\".humidity5\").text(`${humidities5.sort()[humidities5.length-1]}`);\n\n \n weatherIcon(clear1, clouds1, rain1, snow1, thunderstorm1, $(\".icon1\"));\n weatherIcon(clear2, clouds2, rain2, snow2, thunderstorm2, $(\".icon2\"));\n weatherIcon(clear3, clouds3, rain3, snow3, thunderstorm3, $(\".icon3\"));\n weatherIcon(clear4, clouds4, rain4, snow4, thunderstorm4, $(\".icon4\"));\n weatherIcon(clear5, clouds5, rain5, snow5, thunderstorm5, $(\".icon5\"));\n \n\n \n });\n}", "title": "" }, { "docid": "bc71745cf4d0d3c97de31d39d1af00c7", "score": "0.62259096", "text": "function fiveDayForecast(forecastResponse) {\n console.log(forecastResponse);\n //variable to display the forecastResponse list which had 40 items.\n var forecastArray = forecastResponse.list;\n // for loop to start at index 4 (Noon hour of each day) and for the length of the array (40 items)\n // increment by 8 to get the 12th hour conditions for each day of the 5 day forecast.\n var foreCastItemsArray = [];\n for (var i = 4; i < forecastArray.length; i += 8) {\n var foreCastItem = {\n temp: forecastArray[i].main.temp,\n wind: forecastArray[i].wind.speed,\n humidity: forecastArray[i].main.humidity,\n icon: forecastArray[i].weather[0].icon,\n };\n foreCastItemsArray.push(foreCastItem);\n }\n\n //icon variable.\n\n // Created For Loop to iterate over the foreCastItemsArray to get each day(s) value(s)\n for (var i = 0; i < foreCastItemsArray.length; i++) {\n document.getElementById(\"fivedaycardtemp\" + i).innerHTML =\n \"Temp: \" + foreCastItemsArray[i].temp + \" °F\";\n document.getElementById(\"fivedaycardwind\" + i).innerHTML =\n \"Wind: \" + foreCastItemsArray[i].wind + \" mph.\";\n document.getElementById(\"fivedaycardhumidity\" + i).innerHTML =\n \"Humidity: \" + foreCastItemsArray[i].humidity + \"%\";\n //adding the icons to the 5 day forecast.\n // Step 1: saving the foreCastItemsArray index icon value to a variable\n var fiveDayWeatherIcon = foreCastItemsArray[i].icon;\n // Step 2: creating variable for the image URL to update according to the fiveDayWeatherIcon Index.\n var fiveDayWeatherIconURL =\n \"https://openweathermap.org/img/wn/\" + fiveDayWeatherIcon + \".png\";\n // Step 3: created Icon HTML element variable via HTML Id.\n var fiveDayIconEl = document.getElementById(\"fivedaycardicon\" + i);\n // Step 4: set the image src for the fiveDayIconEl as the fiveDayWeatherIconURL.\n fiveDayIconEl.src = fiveDayWeatherIconURL;\n }\n}", "title": "" }, { "docid": "d094c967489f7bbcd820d42161cb15bf", "score": "0.62236625", "text": "function fiveDay(place) {\n fetch('https://api.openweathermap.org/data/2.5/forecast?q=' + place + '&appid=' + api + '&units=imperial')\n .then(function(response) {return response.json()})\n .then(function(data) {\n \n var date = moment();\n var time = \" 15:00:00\";\n \n // Adds 1 day to the current day to search the array for the next day's weather\n var date1 = moment(date).add(1, 'd').format(\"YYYY-MM-DD\");\n // places date and time in a format to compare to the JSON data received from the fetch\n date1 = date1 + time;\n const day1 = new Array();\n // for loop to search for the next day's weather from the array\n for (i = 0; i < data.list.length; i++) {\n if (data.list[i].dt_txt === date1) {\n day1.push(data.list[i]);\n \n day1El.innerHTML = \"<div class=\\\"days\\\"><h4>\" + moment(date).add(1,'d').format(\"MM/DD/YYYY\") + \"</h4>\"\n + \"<p><img src=\\\"http://openweathermap.org/img/wn/\" + day1[0].weather[0].icon + \".png\\\"></p>\"\n + \"<h6>Temp:&nbsp;\" + day1[0].main.temp + \"&#8457;</h6>\"\n + \"<h6>Wind:&nbsp;\" + day1[0].wind.speed + \"&nbsp;Mph&nbsp;💨</h6>\"\n + \"<h6>Humidity:&nbsp;\" + day1[0].main.humidity + \"&nbsp;&#37;</h6></div>\"\n }\n }\n\n // Adds 2 days to the current day to search the array for the next day's weather\n var date2 = moment(date).add(2, 'd').format(\"YYYY-MM-DD\");\n // places date and time in a format to compare to the JSON data received from the fetch\n date2 = date2 + time;\n const day2 = new Array();\n // for loop to search for the next day's weather from the array\n for (i = 0; i < data.list.length; i++) {\n if (data.list[i].dt_txt === date2) {\n day2.push(data.list[i]);\n \n day2El.innerHTML = \"<div class=\\\"days\\\"><h4>\" + moment(date).add(2,'d').format(\"MM/DD/YYYY\") + \"</h4>\"\n + \"<p><img src=\\\"http://openweathermap.org/img/wn/\" + day2[0].weather[0].icon + \".png\\\"></p>\"\n + \"<h6>Temp:&nbsp;\" + day2[0].main.temp + \"&#8457;</h6>\"\n + \"<h6>Wind:&nbsp;\" + day2[0].wind.speed + \"&nbsp;Mph&nbsp;💨</h6>\"\n + \"<h6>Humidity:&nbsp;\" + day2[0].main.humidity + \"&nbsp;&#37;</h6></div>\"\n }\n }\n // Adds 3 days to the current day to search the array for the next day's weather\n var date3 = moment(date).add(3, 'd').format(\"YYYY-MM-DD\");\n // places date and time in a format to compare to the JSON data received from the fetch\n date3 = date3 + time;\n const day3 = new Array();\n // for loop to search for the next day's weather from the array\n for (i = 0; i < data.list.length; i++) {\n if (data.list[i].dt_txt === date3) {\n day3.push(data.list[i]);\n \n day3El.innerHTML = \"<div class=\\\"days\\\"><h4>\" + moment(date).add(3,'d').format(\"MM/DD/YYYY\") + \"</h4>\"\n + \"<p><img src=\\\"http://openweathermap.org/img/wn/\" + day3[0].weather[0].icon + \".png\\\"></p>\"\n + \"<h6>Temp:&nbsp;\" + day3[0].main.temp + \"&#8457;</h6>\"\n + \"<h6>Wind:&nbsp;\" + day3[0].wind.speed + \"&nbsp;Mph&nbsp;💨</h6>\"\n + \"<h6>Humidity:&nbsp;\" + day3[0].main.humidity + \"&nbsp;&#37;</h6></div>\"\n }\n }\n // Adds 4 days to the current day to search the array for the next day's weather\n var date4 = moment(date).add(4, 'd').format(\"YYYY-MM-DD\");\n // places date and time in a format to compare to the JSON data received from the fetch\n date4 = date4 + time;\n const day4 = new Array();\n // for loop to search for the next day's weather from the array\n for (i = 0; i < data.list.length; i++) {\n if (data.list[i].dt_txt === date4) {\n day4.push(data.list[i]);\n \n day4El.innerHTML = \"<div class=\\\"days\\\"><h4>\" + moment(date).add(4,'d').format(\"MM/DD/YYYY\") + \"</h4>\"\n + \"<p><img src=\\\"http://openweathermap.org/img/wn/\" + day4[0].weather[0].icon + \".png\\\"></p>\"\n + \"<h6>Temp:&nbsp;\" + day4[0].main.temp + \"&#8457;</h6>\"\n + \"<h6>Wind:&nbsp;\" + day4[0].wind.speed + \"&nbsp;Mph&nbsp;💨</h6>\"\n + \"<h6>Humidity:&nbsp;\" + day4[0].main.humidity + \"&nbsp;&#37;</h6></div>\"\n }\n }\n // Adds 4 days to the current day to search the array for the next day's weather\n var date5 = moment(date).add(5, 'd').format(\"YYYY-MM-DD\");\n // places date and time in a format to compare to the JSON data received from the fetch\n date5 = date5 + time;\n const day5 = new Array();\n // for loop to search for the next day's weather from the array\n for (i = 0; i < data.list.length; i++) {\n if (data.list[i].dt_txt === date5) {\n day5.push(data.list[i]);\n \n day5El.innerHTML = \"<div class=\\\"days\\\"><h4>\" + moment(date).add(5,'d').format(\"MM/DD/YYYY\") + \"</h4>\"\n + \"<p><img src=\\\"http://openweathermap.org/img/wn/\" + day5[0].weather[0].icon + \".png\\\"></p>\"\n + \"<h6>Temp:&nbsp;\" + day5[0].main.temp + \"&#8457;</h6>\"\n + \"<h6>Wind:&nbsp;\" + day5[0].wind.speed + \"&nbsp;Mph&nbsp;💨</h6>\"\n + \"<h6>Humidity:&nbsp;\" + day5[0].main.humidity + \"&nbsp;&#37;</h6></div>\"\n }\n }\n\n })\n}", "title": "" }, { "docid": "fff4bfe64bb398eb1a683a7de10bbe2c", "score": "0.6220322", "text": "function getForecast(searchValue) {\n\t\tconsole.log(\"-- || Start getForecast function || --\");\n\t\t$.ajax({\n\t\t\ttype: \"GET\",\n\t\t\t// https:api.openweathermap.org/data/2.5/forecast?q=[City]&units=imperial&appid=38f55767a0c60100721a848c0be8deb5\n\t\t\turl:\n\t\t\t\t\"https://api.openweathermap.org/data/2.5/forecast?q=\" +\n\t\t\t\tsearchValue +\n\t\t\t\timperialUnits +\n\t\t\t\tapiOpenWeatherMap,\n\t\t\tdataType: \"json\",\n\t\t\tsuccess: function (data) {\n\t\t\t\t// log forecast\n\t\t\t\tconsole.log(\"getForecast data:\", data.list);\n\t\t\t\t// overwrite any existing content with title and empty row\n\t\t\t\t$(\"#forecast\").empty();\n\n\t\t\t\t// create title \"5-Day Forecast:\"\n\t\t\t\tvar fiveTitle = $(\"<div>\", {\n\t\t\t\t\tid: \"five-title\",\n\t\t\t\t});\n\t\t\t\tfiveTitle.text(\"5-Day Forecast:\");\n\n\t\t\t\t// Forecast card container\n\t\t\t\tvar fiveContent = $(\"<div>\", {\n\t\t\t\t\tclass: \"card-container\",\n\t\t\t\t\tid: \"five-content\",\n\t\t\t\t});\n\n\t\t\t\t// loop over all forecasts (by 3-hour increments)\n\t\t\t\tconsole.log(\"-- || Start Forecast for loop || --\");\n\t\t\t\t// var i = 0 makes forecast start on current day\n\t\t\t\tfor (var i = 0; i < data.list.length; i++) {\n\t\t\t\t\t// only look at forecasts around 3:00pm\n\t\t\t\t\tif (data.list[i].dt_txt.indexOf(\"15:00:00\") !== -1) {\n\t\t\t\t\t\t// create html elements for a bootstrap card\n\t\t\t\t\t\tvar fiveCard = $(\"<div>\", {\n\t\t\t\t\t\t\tclass: \"card\",\n\t\t\t\t\t\t\tid: \"five-card\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconsole.log(\"Card:\", fiveCard);\n\n\t\t\t\t\t\t// Forecast Time Conversion\n\t\t\t\t\t\tconsole.log(\"-- || Forecast Time Loop Conversion || --\");\n\t\t\t\t\t\tvar fivesec = data.list[i].dt;\n\t\t\t\t\t\tvar fiveforecastdate = new Date(fivesec * 1000);\n\t\t\t\t\t\tvar fivedatestr = fiveforecastdate.toLocaleDateString();\n\t\t\t\t\t\t// Day of the week conversion\n\t\t\t\t\t\tvar fivedaystr = fiveforecastdate.getUTCDay();\n\t\t\t\t\t\tvar fiveweekday = new Array(7);\n\t\t\t\t\t\tfiveweekday[0] = \"Sunday\";\n\t\t\t\t\t\tfiveweekday[1] = \"Monday\";\n\t\t\t\t\t\tfiveweekday[2] = \"Tuesday\";\n\t\t\t\t\t\tfiveweekday[3] = \"Wednesday\";\n\t\t\t\t\t\tfiveweekday[4] = \"Thursday\";\n\t\t\t\t\t\tfiveweekday[5] = \"Friday\";\n\t\t\t\t\t\tfiveweekday[6] = \"Saturday\";\n\t\t\t\t\t\tvar fiveweekdaystr = fiveweekday[fivedaystr];\n\n\t\t\t\t\t\t// Date\n\t\t\t\t\t\tvar fiveDay = $(\"<h4>\", {\n\t\t\t\t\t\t\tclass: \"card-title\",\n\t\t\t\t\t\t\tid: \"five-day\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfiveDay.text(fiveweekdaystr);\n\t\t\t\t\t\tconsole.log(\"5-Day Day of the Week\", fiveweekdaystr);\n\n\t\t\t\t\t\tvar fiveDate = $(\"<h5>\", {\n\t\t\t\t\t\t\tclass: \"card-title\",\n\t\t\t\t\t\t\tid: \"five-date\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfiveDate.text(fivedatestr);\n\t\t\t\t\t\tconsole.log(\"5-Date:\", fivedatestr);\n\n\t\t\t\t\t\t// IMG Icon\n\t\t\t\t\t\tvar fiveImg = $(\"<p>\", {\n\t\t\t\t\t\t\tclass: \"card-body\",\n\t\t\t\t\t\t\tid: \"five-img\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// Render Icon\n\t\t\t\t\t\tvar fiveIconImg = $(\"<img>\");\n\t\t\t\t\t\tfiveIconImg.attr(\n\t\t\t\t\t\t\t\"src\",\n\t\t\t\t\t\t\t\"https://openweathermap.org/img/w/\" +\n\t\t\t\t\t\t\t\tdata.list[i].weather[0].icon +\n\t\t\t\t\t\t\t\t\".png\",\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfiveImg.append(fiveIconImg);\n\t\t\t\t\t\tconsole.log(\"5-Icon:\", data.list[i].weather[0].icon);\n\n\t\t\t\t\t\t// Temp\n\t\t\t\t\t\tvar fiveTemp = $(\"<p>\", {\n\t\t\t\t\t\t\tclass: \"card-body\",\n\t\t\t\t\t\t\tid: \"five-temp\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfiveTemp.text(\"Temperature: \" + data.list[i].main.temp + \" °F\");\n\t\t\t\t\t\tconsole.log(\"5-Temp\", data.list[i].main.temp);\n\n\t\t\t\t\t\t//Humidity\n\t\t\t\t\t\tvar fiveHumidity = $(\"<p>\", {\n\t\t\t\t\t\t\tclass: \"card-body\",\n\t\t\t\t\t\t\tid: \"five-humid\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfiveHumidity.text(\"Humidity: \" + data.list[i].main.humidity + \"%\");\n\t\t\t\t\t\tconsole.log(\"5-Humid:\", data.list[i].main.humidity);\n\n\t\t\t\t\t\t// the next 5 lines are where my problem is...\n\t\t\t\t\t\tfiveCard.append(\n\t\t\t\t\t\t\tfiveDay,\n\t\t\t\t\t\t\tfiveDate,\n\t\t\t\t\t\t\tfiveIconImg,\n\t\t\t\t\t\t\tfiveTemp,\n\t\t\t\t\t\t\tfiveHumidity,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// merge together and put on page\n\t\t\t\t\t\t$(\"#forecast .card-container\").append(fiveCard);\n\n\t\t\t\t\t\t// render cards in container\n\t\t\t\t\t\tfiveContent.append(fiveCard);\n\n\t\t\t\t\t\tconsole.log(\"-- || End Loop #\", i, \" || --\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Append Forecast Title and Container\n\t\t\t\t$(\"#forecast\").append(fiveTitle, fiveContent);\n\t\t\t},\n\t\t\terror: function (xhr, status, error) {\n\t\t\t\talert(\n\t\t\t\t\t\"Result: \" +\n\t\t\t\t\t\tstatus +\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\terror +\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\txhr.status +\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\txhr.statusText,\n\t\t\t\t);\n\t\t\t},\n\t\t});\n\t}", "title": "" }, { "docid": "5554a40e2387818a8a58e1199960ac02", "score": "0.62129444", "text": "function savedFiveDayForecast(data) {\n //change everything with forecastResponse to \"data\"\n console.log(data);\n //variable to display the forecastResponse list which had 40 items.\n var forecastArray = data.list;\n // for loop to start at index 4 (Noon hour of each day) and for the length of the array (40 items)\n // increment by 8 to get the 12th hour conditions for each day of the 5 day forecast.\n var foreCastItemsArray = [];\n for (var i = 4; i < forecastArray.length; i += 8) {\n var foreCastItem = {\n temp: forecastArray[i].main.temp,\n wind: forecastArray[i].wind.speed,\n humidity: forecastArray[i].main.humidity,\n icon: forecastArray[i].weather[0].icon,\n };\n foreCastItemsArray.push(foreCastItem);\n }\n\n //icon variable.\n\n // Created For Loop to iterate over the foreCastItemsArray to get each day(s) value(s)\n for (var i = 0; i < foreCastItemsArray.length; i++) {\n document.getElementById(\"fivedaycardtemp\" + i).innerHTML =\n \"Temp: \" + foreCastItemsArray[i].temp + \" °F\";\n document.getElementById(\"fivedaycardwind\" + i).innerHTML =\n \"Wind: \" + foreCastItemsArray[i].wind + \" mph.\";\n document.getElementById(\"fivedaycardhumidity\" + i).innerHTML =\n \"Humidity: \" + foreCastItemsArray[i].humidity + \"%\";\n //adding the icons to the 5 day forecast.\n // Step 1: saving the foreCastItemsArray index icon value to a variable\n var fiveDayWeatherIcon = foreCastItemsArray[i].icon;\n // Step 2: creating variable for the image URL to update according to the fiveDayWeatherIcon Index.\n var fiveDayWeatherIconURL =\n \"https://openweathermap.org/img/wn/\" +\n fiveDayWeatherIcon +\n \".png\";\n // Step 3: created Icon HTML element variable via HTML Id.\n var fiveDayIconEl = document.getElementById(\n \"fivedaycardicon\" + i\n );\n // Step 4: set the image src for the fiveDayIconEl as the fiveDayWeatherIconURL.\n fiveDayIconEl.src = fiveDayWeatherIconURL;\n }\n }", "title": "" }, { "docid": "39375ebb4279289f57d9db6d2332472c", "score": "0.62082744", "text": "function getForecast(url) {\n\tfetch(url)\n\t\t.then(function(response) {\n\t\t\treturn response.json();\n\t\t})\n\t\t.then(function(data) {\n\t\t\t//Removes 5-day forecast cards that are currently displaying when getForecast() is called\n\t\t\tfiveDay.children().remove();\n\n\t\t\t//Goes through data list from forecast API call and only gets the forecast days that are at 3PM,\n\t\t\t//returning forecast data for 5 days only\n\t\t\tfor (var i = 0; i < data.list.length; i++) {\n\t\t\t\tvar timeCheck = data.list[i].dt_txt.search('15:00:00');\n\t\t\t\tif (timeCheck > -1) {\n\t\t\t\t\t//Creates bootstrap card to be filled with forecast data\n\t\t\t\t\tvar forecastDay = $('<div class=\"card col text-white bg-primary mx-1 forecast-day\">');\n\t\t\t\t\tvar forecast = data.list[i];\n\t\t\t\t\tvar temp = forecast.main.temp;\n\t\t\t\t\tvar humidity = forecast.main.humidity;\n\t\t\t\t\tvar wind = forecast.wind;\n\n\t\t\t\t\t//Gets weather symbol from forecast data\n\t\t\t\t\tvar weather = forecast.weather;\n\t\t\t\t\tvar iconUrl = iconBaseUrl + weather[0].icon + '.png';\n\n\t\t\t\t\t//Defines divs as bootstrap card titles to be appended to forecastDay\n\t\t\t\t\tvar day = moment(forecast.dt_txt).format('dddd, MMMM Do');\n\t\t\t\t\tvar dayText = $('<div class= \"row-3 my-3 card-title day-text\">');\n\t\t\t\t\tvar tempText = $('<div class= \"row-3 my-3 card-title temp-text\">');\n\t\t\t\t\tvar humidityText = $('<div class= \"row-3 my-3 card-title humidity-text\">');\n\t\t\t\t\tvar weatherIcon = $('<img class= \"icon-name\" />');\n\t\t\t\t\tvar windText = $('<div class= \"row-3 my-3 card-title wind-text\">');\n\n\t\t\t\t\t//sets text values and weather icons in forecast area to their corresponding data\n\t\t\t\t\tdayText.text(day);\n\t\t\t\t\tweatherIcon.attr('src', iconUrl);\n\t\t\t\t\tweatherIcon.attr('style', 'width: 75px;');\n\t\t\t\t\ttempText.text('Temperature: ' + temp + '°F');\n\t\t\t\t\thumidityText.text('Humidity: ' + humidity + '%');\n\t\t\t\t\twindText.text('Wind Speed: ' + wind.speed + ' MPH');\n\n\t\t\t\t\t//appends divs with text values to forecastDay\n\t\t\t\t\tforecastDay.append(dayText);\n\t\t\t\t\tforecastDay.append(weatherIcon);\n\t\t\t\t\tforecastDay.append(tempText);\n\t\t\t\t\tforecastDay.append(humidityText);\n\t\t\t\t\tforecastDay.append(windText);\n\t\t\t\t}\n\t\t\t\t//appends forecastDay to forecast area\n\t\t\t\tfiveDay.append(forecastDay);\n\t\t\t}\n\t\t});\n}", "title": "" }, { "docid": "4b7c0026a3c27940416e2ced2afeb77d", "score": "0.6205434", "text": "function getDays() {\n for (var i = 1; i < 6; i++) {\n var newDay = moment().add(i, \"days\").format(\"MM-DD-YYYY\");\n forecastDay.push(newDay);\n }\n}", "title": "" }, { "docid": "ab02b40ec16737b3f9a03ccc4c2f959a", "score": "0.61925954", "text": "fetchForecastDaily(forecasts) {\n\t\t// initial variable declaration\n\t\tconst days = [];\n\t\t// variables for temperature range and rain\n\t\tlet minTemp = [];\n\t\tlet maxTemp = [];\n\t\t// variable for date\n\t\tlet date = \"\";\n\t\tlet weather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits, this.config.useKmh);\n\t\tweather.precipitation = 0;\n\n\t\tfor (const forecast of forecasts) {\n\t\t\tif (date !== moment(forecast.startTime).format(\"YYYY-MM-DD\")) {\n\t\t\t\t// calculate minimum/maximum temperature, specify rain amount\n\t\t\t\tweather.minTemperature = Math.min.apply(null, minTemp);\n\t\t\t\tweather.maxTemperature = Math.max.apply(null, maxTemp);\n\n\t\t\t\t// push weather information to days array\n\t\t\t\tdays.push(weather);\n\t\t\t\t// create new weather-object\n\t\t\t\tweather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits, this.config.useKmh);\n\n\t\t\t\tminTemp = [];\n\t\t\t\tmaxTemp = [];\n\t\t\t\tweather.precipitation = 0;\n\n\t\t\t\t// set new date\n\t\t\t\tdate = moment(forecast.startTime).format(\"YYYY-MM-DD\");\n\n\t\t\t\t// specify date\n\t\t\t\tweather.date = moment(forecast.startTime);\n\n\t\t\t\t// use the forecast isDayTime attribute to help build the weatherType label\n\t\t\t\tweather.weatherType = this.convertWeatherType(forecast.shortForecast, forecast.isDaytime);\n\t\t\t}\n\n\t\t\tif (moment(forecast.startTime).format(\"H\") >= 8 && moment(forecast.startTime).format(\"H\") <= 17) {\n\t\t\t\tweather.weatherType = this.convertWeatherType(forecast.shortForecast, forecast.isDaytime);\n\t\t\t}\n\n\t\t\t// the same day as before\n\t\t\t// add values from forecast to corresponding variables\n\t\t\tminTemp.push(forecast.temperature);\n\t\t\tmaxTemp.push(forecast.temperature);\n\t\t}\n\n\t\t// last day\n\t\t// calculate minimum/maximum temperature\n\t\tweather.minTemperature = Math.min.apply(null, minTemp);\n\t\tweather.maxTemperature = Math.max.apply(null, maxTemp);\n\n\t\t// push weather information to days array\n\t\tdays.push(weather);\n\t\treturn days.slice(1);\n\t}", "title": "" }, { "docid": "f59e8e7e73d48a7b1b12667575462f60", "score": "0.61506516", "text": "function fiveDayForecast(city) {\n var apiKey = \"20d3501773a839af3857d2b0374101f6\";\n var queryURL =\n \"https://api.openweathermap.org/data/2.5/forecast?q=\" +\n city +\n \"&units=Imperial&appid=\" +\n apiKey;\n\n $.ajax({\n url: queryURL,\n method: \"GET\",\n }).then(function (response) {\n console.log(response);\n var counter = 1;\n for (var i = 0; i < response.list.length; i += 8) {\n var date = moment(response.list[i].dt_txt).format(\"l\");\n var weatherIcon = response.list[i].weather[0].icon;\n var temp = response.list[i].main.temp;\n\n $(\"#date\" + counter).text(date);\n $(\"#icon\" + counter).attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" + weatherIcon + \"@2x.png\"\n );\n $(\"#temp\" + counter).text(temp.toFixed(0) + \" F\");\n $(\"#humid\" + counter).text(response.list[i].main.humidity + \"%\");\n counter++;\n }\n\n $(\"#fiveDay\").show();\n });\n }", "title": "" }, { "docid": "24b5119b6c676c10dd15f6e9277bf7f4", "score": "0.6149637", "text": "function populateFiveDay(city) {\n var queryURL =\n \"https://api.openweathermap.org/data/2.5/forecast?q=\" +\n city +\n \"&units=imperial&mode=JSON&appid=4074b5f07760c717f95e1eec3f81ef1f\";\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function(response) {\n // add the elements to hold the 5 day forecast\n var title = $(\"<h2>\").text(\"5-Day Forecast\");\n\n var forecastDayOne = $(\"<div>\").addClass(\n \"card-body text-white bg-info mb-3 day-one col-sm-3\"\n );\n var forecastDayTwo = $(\"<div>\").addClass(\n \"card-body text-white bg-info mb-3 day-two col-sm-3\"\n );\n var forecastDayThree = $(\"<div>\").addClass(\n \"card-body text-white bg-info mb-3 day-three col-sm-3\"\n );\n var forecastDayFour = $(\"<div>\").addClass(\n \"card-body text-white bg-info mb-3 day-four col-sm-3\"\n );\n var forecastDayFive = $(\"<div>\").addClass(\n \"card-body text-white bg-info mb-3 day-five col-sm-3\"\n );\n var fiveDayForecast = $(\"<div>\").addClass(\"five-day card-group\");\n // populate cards for each day starting with the day after today\n //date\n var dateOne = $(\"<h5>\")\n .addClass(\"date\")\n .text(moment(response.list[5].dt_txt).format(\"M/D/YYYY\"));\n var dateTwo = $(\"<h5>\")\n .addClass(\"date\")\n .text(moment(response.list[13].dt_txt).format(\"M/D/YYYY\"));\n var dateThree = $(\"<h5>\")\n .addClass(\"date\")\n .text(moment(response.list[21].dt_txt).format(\"M/D/YYYY\"));\n var dateFour = $(\"<h5>\")\n .addClass(\"date\")\n .text(moment(response.list[29].dt_txt).format(\"M/D/YYYY\"));\n var dateFive = $(\"<h5>\")\n .addClass(\"date\")\n .text(moment(response.list[37].dt_txt).format(\"M/D/YYYY\"));\n forecastDayOne.append(dateOne);\n forecastDayTwo.append(dateTwo);\n forecastDayThree.append(dateThree);\n forecastDayFour.append(dateFour);\n forecastDayFive.append(dateFive);\n // include data, icon for conditions, temp and humidity.\n // populate condition icon\n var iconOne = $(\"<img>\")\n .addClass(\"weather-icon\")\n .attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[5].weather[0].icon +\n \"@2x.png\"\n );\n forecastDayOne.append(iconOne);\n var iconTwo = $(\"<img>\")\n .addClass(\"weather-icon\")\n .attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[13].weather[0].icon +\n \"@2x.png\"\n );\n forecastDayTwo.append(iconTwo);\n var iconThree = $(\"<img>\")\n .addClass(\"weather-icon\")\n .attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[21].weather[0].icon +\n \"@2x.png\"\n );\n forecastDayThree.append(iconThree);\n var iconFour = $(\"<img>\")\n .addClass(\"weather-icon\")\n .attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[29].weather[0].icon +\n \"@2x.png\"\n );\n forecastDayFour.append(iconFour);\n var iconFive = $(\"<img>\")\n .addClass(\"weather-icon\")\n .attr(\n \"src\",\n \"https://openweathermap.org/img/wn/\" +\n response.list[37].weather[0].icon +\n \"@2x.png\"\n );\n forecastDayFive.append(iconFive);\n // temp\n var tempOne = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Temp: ${response.list[5].main.temp}˚F`);\n var tempTwo = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Temp: ${response.list[13].main.temp}˚F`);\n var tempThree = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Temp: ${response.list[21].main.temp}˚F`);\n var tempFour = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Temp: ${response.list[29].main.temp}˚F`);\n var tempFive = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Temp: ${response.list[37].main.temp}˚F`);\n forecastDayOne.append(tempOne);\n forecastDayTwo.append(tempTwo);\n forecastDayThree.append(tempThree);\n forecastDayFour.append(tempFour);\n forecastDayFive.append(tempFive);\n // humidity\n var humidityOne = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Humidity: ${response.list[3].main.temp}%`);\n var humidityTwo = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Humidity: ${response.list[11].main.temp}%`);\n var humidityThree = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Humidity: ${response.list[19].main.temp}%`);\n var humidityFour = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Humidity: ${response.list[27].main.temp}%`);\n var humidityFive = $(\"<p>\")\n .addClass(\"forecast-temp\")\n .text(`Humidity: ${response.list[35].main.temp}%`);\n forecastDayOne.append(humidityOne);\n forecastDayTwo.append(humidityTwo);\n forecastDayThree.append(humidityThree);\n forecastDayFour.append(humidityFour);\n forecastDayFive.append(humidityFive);\n // append elements to div and then to parent element in html.\n fiveDayForecast.append(forecastDayOne);\n fiveDayForecast.append(forecastDayTwo);\n fiveDayForecast.append(forecastDayThree);\n fiveDayForecast.append(forecastDayFour);\n fiveDayForecast.append(forecastDayFive);\n $(\".five-day-forecast\").append(title);\n $(\".day-forecasts\").append(fiveDayForecast);\n });\n }", "title": "" }, { "docid": "97dbdcf9e6ad26754d03b60bb187a598", "score": "0.61304766", "text": "function getFiveDayForCast(userCity) {\n var APIKey = \"4641272d610c090cce9d1120a51b5feb\";\n\n var queryURL = \"https://api.openweathermap.org/data/2.5/forecast?units=imperial&q=\" + userCity + \"&appid=\" + APIKey;\n\n\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response) {\n\n $(\"#fiveday\").empty();\n console.log(\"five days\", response);\n for (var i = 1; i < 6; i++) {\n var day = response.list[i];\n var date = moment().add(i, 'days').format('L');\n var humidity = day.main.humidity;\n var icon = \"http://openweathermap.org/img/wn/\" + day.weather[0].icon + \".png\";\n var temp = day.main.temp;\n\n\n\n var dateEl = $(\"<p>\").text(\"Date: \" + date);\n var humidityEl = $(\"<p>\").text(\"Humidity: \" + humidity + \"%\");\n var iconEl = $(\"<img>\").attr(\"src\", icon);\n var tempEL = $(\"<p>\").text(\"Temperature: \" + temp + String.fromCharCode(176) + \"F\");\n\n var forecastCol = $(\"<div class='col'>\");\n var forecastMainDiv = $(\"<div class='forecastDays'>\");\n forecastCol.append(forecastMainDiv);\n forecastMainDiv.append(dateEl, iconEl, tempEL, humidityEl);\n $(\"#fiveday\").append(forecastCol);\n };\n\n\n\n\n\n });\n\n\n\n\n\n getCurrent();\n\n // getFiveDayForCast();\n}", "title": "" }, { "docid": "48a05ded65f9a33f646ff32291717b64", "score": "0.61055416", "text": "generateWeatherObjectsFromForecast(ECdoc) {\n\t\t// Declare an array to hold each day's forecast object\n\n\t\tconst days = [];\n\n\t\tconst weather = new WeatherObject();\n\n\t\tconst foreBaseDates = ECdoc.querySelectorAll(\"siteData forecastGroup dateTime\");\n\t\tconst baseDate = foreBaseDates[1].querySelector(\"timeStamp\").textContent;\n\n\t\tweather.date = moment(baseDate, \"YYYYMMDDhhmmss\");\n\n\t\tconst foreGroup = ECdoc.querySelectorAll(\"siteData forecastGroup forecast\");\n\n\t\tweather.precipitationAmount = null;\n\n\t\t//\n\t\t// The EC forecast is held in a 12-element array - Elements 0 to 11 - with each day encompassing\n\t\t// 2 elements. the first element for a day details the Today (daytime) forecast while the second\n\t\t// element details the Tonight (nightime) forecast. Element 0 is always for the current day.\n\t\t//\n\t\t// However... the forecast is somewhat 'rolling'.\n\t\t//\n\t\t// If the EC forecast is queried in the morning, then Element 0 will contain Current\n\t\t// Today and Element 1 will contain Current Tonight. From there, the next 5 days of forecast will be\n\t\t// contained in Elements 2/3, 4/5, 6/7, 8/9, and 10/11. This module will create a 6-day forecast using\n\t\t// all of these Elements.\n\t\t//\n\t\t// But, if the EC forecast is queried in late afternoon, the Current Today forecast will be rolled\n\t\t// off and Element 0 will contain Current Tonight. From there, the next 5 days will be contained in\n\t\t// Elements 1/2, 3/4, 5/6, 7/8, and 9/10. As well, Elelement 11 will contain a forecast for a 6th day,\n\t\t// but only for the Today portion (not Tonight). This module will create a 6-day forecast using\n\t\t// Elements 0 to 11, and will ignore the additional Todat forecast in Element 11.\n\t\t//\n\t\t// We need to determine if Element 0 is showing the forecast for Current Today or Current Tonight.\n\t\t// This is required to understand how Min and Max temperature will be determined, and to understand\n\t\t// where the next day's (aka Tomorrow's) forecast is located in the forecast array.\n\t\t//\n\n\t\tlet nextDay = 0;\n\t\tlet lastDay = 0;\n\t\tconst currentTemp = ECdoc.querySelector(\"siteData currentConditions temperature\").textContent;\n\n\t\t//\n\t\t// If the first Element is Current Today, look at Current Today and Current Tonight for the current day.\n\t\t//\n\n\t\tif (foreGroup[0].querySelector(\"period[textForecastName='Today']\")) {\n\t\t\tthis.todaytempCacheMin = 0;\n\t\t\tthis.todaytempCacheMax = 0;\n\t\t\tthis.todayCached = true;\n\n\t\t\tthis.setMinMaxTemps(weather, foreGroup, 0, true, currentTemp);\n\n\t\t\tthis.setPrecipitation(weather, foreGroup, 0);\n\n\t\t\t//\n\t\t\t// Set the Element number that will reflect where the next day's forecast is located. Also set\n\t\t\t// the Element number where the end of the forecast will be. This is important because of the\n\t\t\t// rolling nature of the EC forecast. In the current scenario (Today and Tonight are present\n\t\t\t// in elements 0 and 11, we know that we will have 6 full days of forecasts and we will use\n\t\t\t// them. We will set lastDay such that we iterate through all 12 elements of the forecast.\n\t\t\t//\n\n\t\t\tnextDay = 2;\n\t\t\tlastDay = 12;\n\t\t}\n\n\t\t//\n\t\t// If the first Element is Current Tonight, look at Tonight only for the current day.\n\t\t//\n\t\tif (foreGroup[0].querySelector(\"period[textForecastName='Tonight']\")) {\n\t\t\tthis.setMinMaxTemps(weather, foreGroup, 0, false, currentTemp);\n\n\t\t\tthis.setPrecipitation(weather, foreGroup, 0);\n\n\t\t\t//\n\t\t\t// Set the Element number that will reflect where the next day's forecast is located. Also set\n\t\t\t// the Element number where the end of the forecast will be. This is important because of the\n\t\t\t// rolling nature of the EC forecast. In the current scenario (only Current Tonight is present\n\t\t\t// in Element 0, we know that we will have 6 full days of forecasts PLUS a half-day and\n\t\t\t// forecast in the final element. Because we will only use full day forecasts, we set the\n\t\t\t// lastDay number to ensure we ignore that final half-day (in forecast Element 11).\n\t\t\t//\n\n\t\t\tnextDay = 1;\n\t\t\tlastDay = 11;\n\t\t}\n\n\t\t//\n\t\t// Need to map EC weather icon to MM weatherType values. Always pick the first Element's icon to\n\t\t// reflect either Today or Tonight depending on what the forecast is showing in Element 0.\n\t\t//\n\n\t\tweather.weatherType = this.convertWeatherType(foreGroup[0].querySelector(\"abbreviatedForecast iconCode\").textContent);\n\n\t\t// Push the weather object into the forecast array.\n\n\t\tdays.push(weather);\n\n\t\t//\n\t\t// Now do the rest of the forecast starting at nextDay. We will process each day using 2 EC\n\t\t// forecast Elements. This will address the fact that the EC forecast always includes Today and\n\t\t// Tonight for each day. This is why we iterate through the forecast by a a count of 2, with each\n\t\t// iteration looking at the current Element and the next Element.\n\t\t//\n\n\t\tlet lastDate = moment(baseDate, \"YYYYMMDDhhmmss\");\n\n\t\tfor (let stepDay = nextDay; stepDay < lastDay; stepDay += 2) {\n\t\t\tlet weather = new WeatherObject();\n\n\t\t\t// Add 1 to the date to reflect the current forecast day we are building\n\n\t\t\tlastDate = lastDate.add(1, \"day\");\n\t\t\tweather.date = moment(lastDate);\n\n\t\t\t// Capture the temperatures for the current Element and the next Element in order to set\n\t\t\t// the Min and Max temperatures for the forecast\n\n\t\t\tthis.setMinMaxTemps(weather, foreGroup, stepDay, true, currentTemp);\n\n\t\t\tweather.precipitationAmount = null;\n\n\t\t\tthis.setPrecipitation(weather, foreGroup, stepDay);\n\n\t\t\t//\n\t\t\t// Need to map EC weather icon to MM weatherType values. Always pick the first Element icon.\n\t\t\t//\n\n\t\t\tweather.weatherType = this.convertWeatherType(foreGroup[stepDay].querySelector(\"abbreviatedForecast iconCode\").textContent);\n\n\t\t\t// Push the weather object into the forecast array.\n\n\t\t\tdays.push(weather);\n\t\t}\n\n\t\treturn days;\n\t}", "title": "" }, { "docid": "66055fc1937e30c8d0d3f5dea5145a28", "score": "0.60885", "text": "async function getSixteenDayForecast (lat, lon, days) {\n // eslint-disable-next-line no-useless-catch\n try {\n const protocol = 'https'\n const weatherBitUrl = 'api.weatherbit.io/v2.0/forecast/daily'\n const params = {\n lat: `${lat}`,\n lon: `${lon}`,\n days: `${days}`,\n key: `${process.env.WEATHERBIT_API_KEY}`\n }\n\n const options = {\n method: 'GET'\n }\n\n const apiQuery = `${protocol}://${weatherBitUrl}?${querystring.stringify(params)}`\n // DEBUG:\n // console.log(apiQuery)\n const result = await fetch(apiQuery, options)\n const resultJson = await result.json()\n return resultJson\n } catch (error) {\n throw (error)\n }\n}", "title": "" }, { "docid": "f3d20d5fc5eacb743327b059beabac8b", "score": "0.60833025", "text": "async function fiveDayWeather(forecastUrl) {\n const response = await fetch(forecastUrl);\n const data = await response.json();\n displayFiveDayWeather(data);\n}", "title": "" }, { "docid": "56371ef9ecd5454de549c8ca294dc012", "score": "0.6077449", "text": "function displayFiveDayWeather(data) {\n $(\"#text\").text(\"5 Day Forecast\");\n //use an array with numbers corresponding to the index of the data you want to extract\n let arr = [0, 8, 16, 24, 32];\n //loop over the array and create a div for each day with the weather conditions as list items\n arr.forEach(function (i) {\n let futureDate = new Date(data.list[i].dt * 1000);\n futureDate = futureDate.toLocaleDateString(\"en-US\");\n $(\".futureForecast\").append(\n `<div>${futureDate}<figure><img src=\"https://openweathermap.org/img/wn/${data.list[i].weather[0].icon}@2x.png\" alt=\"icon showing the weather\"></figure> <ul><li>Temp: ${data.list[i].main.temp} \\u2109</li><li>Wind: ${data.list[i].wind.speed} MPH</li><li>Humidity: ${data.list[i].main.humidity}%</li></ul></div`\n );\n });\n}", "title": "" }, { "docid": "b718caada18ba7f9e00b0fba012448d5", "score": "0.60527873", "text": "function display5DayForecast(response) {\n let daysList = response.list;\n let elIdx = 7;\n\n $(daysList).each(function (i, e) {\n //Get the data if the index is equal to the elIdx number\n if (i === elIdx) {\n //Get data\n tempKlv = e.main.temp;\n let date = e.dt_txt.slice(0, 11);//Remove time\n let iconCode = e.weather[0].icon;\n\n kelvinToFharenheit(tempKlv);\n\n //Modify URL according to the icon code\n iconsURL = \"https://openweathermap.org/img/wn/\" + iconCode + \"@2x.png\";\n\n //Create elements\n let card = $('<div>');\n let dateP = $('<p>');\n let icon = $('<img>');\n let tempP = $('<p>');\n let humP = $('<p>');\n\n //Add classes\n $(card).addClass('row-start-1 row-end-4 shadow-xl p-5 text-green-900');\n $(dateP).addClass('mt-3');\n $(tempP).addClass('mt-3');\n $(humP).addClass('mt-3');\n\n //Add text\n $(dateP).text(date);\n $(tempP).text('Temp: ' + tempFharenheit + 'ºF');\n $(humP).text('Humidity: ' + e.main.humidity + '%');\n\n //Add attributes\n $(icon).attr(\"src\", iconsURL);\n\n //Append to the cards container div\n $('#cards-container').append(card);\n $(card).append(dateP);\n $(card).append(icon);\n $(card).append(tempP);\n $(card).append(humP);\n\n //Sum 7 to the local variable\n elIdx += 7;\n }\n });\n}", "title": "" }, { "docid": "4db7219e294b4991e30405a983916d3d", "score": "0.6038958", "text": "function getForecast() {\n\t\tvar php = \"forecast/daily?q=\" + city + \",\" + state + \",\" + country + \n\t\t\"&zip=\" + zip + \"&mode=json&units=\" + units + \n\t\t\"&cnt=7&appid=84905f46868c1a6db7f06ff90f12e9ff\";\n\t\tajax(API_URL, php, loadForecast, \"GET\", false);\n\t}", "title": "" }, { "docid": "0a08b8801d561d5f2a0c632d2294c820", "score": "0.6015865", "text": "forecastsForDay(daysAhead) {\n const currentDayOfWeek = new Date().getDay();\n return this.state.forecastWeatherData.list.filter((weather) => {\n const timestamp = new Date(weather.dt * 1000);\n const dayOfWeek = timestamp.getDay();\n return dayOfWeek === (currentDayOfWeek + daysAhead) % 7;\n });\n }", "title": "" }, { "docid": "037a3fd4b58ad51c6679f208fbc6a59c", "score": "0.6010903", "text": "function requestFiveDayForecast (requestCityName) {\n let fiveDayForecastQueryURL = `https://api.openweathermap.org/data/2.5/forecast?q=${requestCityName}&units=metric&appid=${API_KEY}`;\n fetch (fiveDayForecastQueryURL)\n .then( response => response.json())\n .then(function (data) {\n\n // Request current weather for city, temp, humidity, feels like, wind speed and weather icon for next 5 days\n // Daily weather icon\n const fiveDayIcons = [];\n for (var i = 0; i < data.list.length; i+=8){\n fiveDayIcons.push(data.list[2].weather.icon);\n }\n for(var i = 0; i < fiveDayIcons.length; i++){\n var dailyIcon = `https://openweathermap.org/img/wn/${fiveDayIcons[i]}@2x.png`;\n var fiveDayIconLocation = $('<div>');\n var fiveDayIconImg =$('<img>').attr('src', dailyIcon);\n fiveDayIconLocation.append(fiveDayIconImg);\n $('#day-' + (i + 1)).append(fiveDayIconImg);\n }\n\n // Daily weather temperature\n const fiveDayTemps = [];\n for (var i = 0; i < data.list.length; i+=8){\n fiveDayTemps.push(data.list[1].main.temp);\n }\n for(var i = 0; i < fiveDayTemps.length; i++){\n var dailyTemp = fiveDayTemps[i];\n var parent = $('<div>');\n var child = $ ('<p>').text('Temperature: ' + dailyTemp + ' \\u00B0C');\n parent.append(child);\n $('#day-' + (i + 1).toString()).html(parent);\n }\n\n // Daily Feels Like Weather\n const fiveDayFeelsLike = [];\n for (var i = 0; i < data.list.length; i+=8){\n fiveDayFeelsLike.push(data.list[1].main.feels_like);\n }\n for(var i = 0; i < fiveDayFeelsLike.length; i++){\n var dailyFeelsLike = fiveDayFeelsLike[i];\n var parent = $('<div>');\n var child = $ ('<p>').text('Feels Like: ' + dailyFeelsLike + ' \\u00B0C');\n parent.append(child);\n $('#day-' + (i + 1).toString()).html(parent);\n }\n\n // Daily Humidity Weather\n const fiveDayHumidity = [];\n for (var i = 0; i < data.list.length; i+=8){\n fiveDayHumidity.push(data.list[1].main.humidity);\n }\n for(var i = 0; i < fiveDayHumidity.length; i++){\n var dailyHumidity = fiveDayHumidity[i];\n var parent = $('<div>');\n var child = $ ('<p>').text('Humidity : ' + dailyHumidity + ' %');\n parent.append(child);\n $('#day-' + (i + 1).toString()).html(parent);\n }\n\n })\n}", "title": "" }, { "docid": "7260fe9dbf1ce140c20960e586d3f835", "score": "0.6006542", "text": "function getForecast(searchValue) {\n\t\n\t\t$.ajax({\n\t\t\ttype: \"GET\",\n\t\t\turl:\n\t\t\t\"https://api.openweathermap.org/data/2.5/forecast?q=\" +\n\t\t\tsearchValue +\n\t\t\tmetricUnits +\n\t\t\topenWeatherMap,\n\t\t\tdataType: \"json\",\n\t\t\tsuccess: function (data) {\n\t\t\t$(\"#forecast\").empty();\n\n\t// HTML Title and Div Container\n\tvar fiveTitle = $(\"<div>\", {\n\t\t\tid: \"five-title\",\n\t\t});\n fiveTitle.text(\"5-Day Forecast:\");\n \n\tvar fiveContent = $(\"<div>\", {\n\t\t\tclass: \"card-container\",\n\t\t\tid: \"five-content\",\n\t\t});\n\n\t\t\n\t\t\t\n\t// Start Forecase Based on Current Day\n\t\tfor (var i = 0; i < data.list.length; i++) {\n\t\t\t\t\t\n\t\tif (data.list[i].dt_txt.indexOf(\"12:00:00\") !== -1) {\n\tvar fiveCard = $(\"<div>\", {\n\t\t\t\tclass: \"card\",\n\t\t\t\tid: \"five-card\",\n\t\t\t});\n\t\t\t\t\n\tvar fivesec = data.list[i].dt;\n\tvar fiveforecastdate = new Date(fivesec * 1000);\n\tvar fivedatestr = fiveforecastdate.toLocaleDateString();\n // Assign Current Day var = i=0 Current Day\n \n var fivedaystr = fiveforecastdate.getUTCDay();\n\tvar fiveweekday = new Array(7);\n\t\t\tfiveweekday[0] = \"Sunday\";\n\t\t\tfiveweekday[1] = \"Monday\";\n\t\t\tfiveweekday[2] = \"Tuesday\";\n\t\t\tfiveweekday[3] = \"Wednesday\";\n\t\t\tfiveweekday[4] = \"Thursday\";\n\t\t\tfiveweekday[5] = \"Friday\";\n\t\t\tfiveweekday[6] = \"Saturday\";\n var fiveweekdaystr = fiveweekday[fivedaystr];\n \n\tvar fiveDay = $(\"<h4>\", {\n\t\t\t\tclass: \"card-title\",\n\t\t\t\tid: \"five-day\",\n\t\t\t});\n\t\t\tfiveDay.text(fiveweekdaystr);\n\t\t\t\t\t\n\n\tvar fiveDate = $(\"<h5>\", {\n\t\t\t\tclass: \"card-title\",\n\t\t\t\tid: \"five-date\",\n\t\t\t});\n\t\t\tfiveDate.text(fivedatestr);\n\t\t\t\t\t\n\n\tvar fiveImg = $(\"<p>\", {\n\t\t\t\tclass: \"card-body\",\n\t\t\t\tid: \"five-img\",\n\t\t\t});\n\tvar fiveIconImg = $(\"<img>\");\n\t\t\t fiveIconImg.attr(\n\t\t\t\t\"src\",\n\t\t\t\t\"https://openweathermap.org/img/wn/\" +\n\t\t\t\tdata.list[i].weather[0].icon +\n\t\t\t\t\"@2x.png\",\n\t\t\t);\n fiveImg.append(fiveIconImg);\n \n \n\t\t\t\t\t\n\n\t\t\t\t\t\n\tvar fiveTemp = $(\"<p>\", {\n\t\t\t class: \"card-body\",\n\t\t\t id: \"five-temp\",\n\t\t});\n\t\tfiveTemp.text(\"Temperature: \" + data.list[i].main.temp + \" °C\");\n\t\t\t\t\t\n\tvar fiveHumidity = $(\"<p>\", {\n\t\t\tclass: \"card-body\",\n\t\t\tid: \"five-humid\",\n\t\t\t});\n\t\t\tfiveHumidity.text(\"Humidity: \" + data.list[i].main.humidity + \"%\");\n\t\t\t\t\n\t\tfiveCard.append(\n\t\t\t\tfiveDay,\n\t\t\t\tfiveDate,\n\t\t\t\tfiveIconImg,\n\t\t\t\tfiveTemp,\n\t\t\t\tfiveHumidity,\n\t\t\t\t\t\t);\n\n\t\t\t\t$(\"#forecast .card-container\").append(fiveCard);\n\t\t\t\tfiveContent.append(fiveCard);\n }\n\t\t\t\t}\n\t\t\t\t$(\"#forecast\").append(fiveTitle, fiveContent);\n\t\t},\n\t\t});\n\t}", "title": "" }, { "docid": "6b6eb8163407c156522ce3e0c8394c8a", "score": "0.5998903", "text": "function fiveDayWeather(response){\n console.log('5 day', response)\n let data = response.list\n let day = 1;\n for(let i = 7; i < data.length; i=(i+8)){\n let nextDay = $('<h5>').text(toDate(data[i].dt));\n let weatherInfo = $('<div>');//.attr('class', 'info');\n let icon = getIcon(data[i]);\n weatherInfo.append(icon);\n weatherInfo.append($('<div>').text(`Temp: ${kToF(data[i].main.temp, 2)} \\u00B0F`));\n weatherInfo.append($('<div>').text(`Humidity: ${data[i].main.humidity}%`));\n let card = $(`.${day}`)\n card.empty();\n card.append(nextDay, weatherInfo);\n day++;\n }\n }", "title": "" }, { "docid": "e8a3f77a57cdbf8bb5ffdc5c920e3894", "score": "0.5990231", "text": "function forecast(arr) {\n// change code below this line\n return arr.slice(2, 4); //My solution\n}", "title": "" }, { "docid": "e0b85064de8089d064a445c90d678923", "score": "0.59542733", "text": "function fiveDayForecastQuery(apiKey, location, numberOfDays) {\n\n var queryFiveDay = \"https://api.weatherbit.io/v2.0/forecast/daily?city=\" + location + \"&days=\" + numberOfDays + \"&units=I&key=\" + apiKey;\n\n //Runs the ajax query for weatherbit.io API to get the five day forecast data\n $.ajax({\n url: queryFiveDay,\n method: \"GET\"\n }).then(function (respFiveDay) {\n\n //This line empties the fiveDayForecast div of any elements and data that contains from previous searches\n $(\"#fiveDayForecast\").empty();\n\n //Global variables that are used for dynamically adding data to html\n var fivedayRowDiv1 = $(\"<div>\").attr(\"class\", \"row ml-2\");\n var fivedayRowDiv2 = $(\"<div>\").attr(\"class\", \"row ml-2\");\n\n //Adds a header that says \"five day forecast\" to first row div and adds that to fivedayforecast\n $(\"#fiveDayForecast\").append(fivedayRowDiv1.append($(\"<h3>\").text(\"Five Day Forecast\")));\n //adds a second row div to fivedayforecast\n $(\"#fiveDayForecast\").append(fivedayRowDiv2);\n //adds a class to fivedayforecast that is used for css styling\n $(\"#fiveDayForecast\").addClass(\"backgroundData\");\n\n //runs the code contained within for each index of the data object returned by the ajax query\n $.each(respFiveDay.data, function (index) {\n\n //below variable increase the index by one because the first index is todays date and this is a forecast for the next five days\n var xIndex = index + 1;\n //assigns the date from data object respFiveDay to a variable\n var date = $(\"<h3>\").text(respFiveDay.data[xIndex].valid_date);\n //assigns high-temp from data object to a variable\n var highTemp = $(\"<p>\").text(\"High Temp(F): \" + respFiveDay.data[xIndex].high_temp);\n //assigns weather icon from data object to a variable\n var iconCode = respFiveDay.data[xIndex].weather.icon\n //assigns low temp from data object to a variables\n var lowTemp = $(\"<p>\").text(\"Low Temp(F): \" + respFiveDay.data[xIndex].low_temp);\n //assigns humidity from data object to a variable\n var humidity = $(\"<p>\").text(\"Humidity(%): \" + respFiveDay.data[xIndex].rh);\n //creates a column div used for boostrap styling of data and adds appropriate classes to it\n var columnDiv = $(\"<div>\").addClass(\"fiveDayForecastEl col-xl-2 col-lg-4 col-md-4 col-sm-4 col-xs-6\");\n //grabs row div and adds the column div into and then adds the date\n fivedayRowDiv2.append(columnDiv.append(date));\n //executes the weatherBitIconquery function that grabs the object via icon code pulled from data object and then appends it to the divs given via the parameters\n weatherBitIconQuery(iconCode, columnDiv, fivedayRowDiv2);\n //This line of code then appends the column div to the second row div and appends the rest of the data pulled from data object to it\n fivedayRowDiv2.append(columnDiv.append(highTemp, lowTemp, humidity));\n\n });\n\n });\n\n}", "title": "" }, { "docid": "3e726ca521533304e4d69bebbe0aab1d", "score": "0.5953384", "text": "function fiveDay(data){\n for(let i=1; i<=5; i++){\n let futureDate = moment().add(i, 'd').format('L');\n let icon = data.daily[i].weather[0].icon;\n let src = `http://openweathermap.org/img/wn/${icon}@2x.png`;\n $(`#day${i}`).html(`\n <h4>${futureDate}</h4>\n <img src=\"${src}\" style=\"margin: -1.5em;\">\n <p>Temp: ${data.daily[i].temp.day} °F</p>\n <p>Wind: ${data.daily[i].wind_speed} MPH</p>\n <p>Humidity: ${data.daily[i].humidity} %</p>\n `);\n $(`#day${i}`).removeClass('hide');\n }\n}", "title": "" }, { "docid": "1a21edd1d94e7f80510184d76349da42", "score": "0.594984", "text": "function getForecast(city){\n let fetchString = `https://api.openweathermap.org/data/2.5/forecast?q=${city}&units=metric&APPID=3ae19ea0d52400ef8dfbd919977321df`;\n fetch(fetchString)\n .then(function (response) {\n return response.json();\n })\n .then(function (weather) {\n let forecast = Array.from(weather.list);\n\n for(let i = 0; i < DAYS_IN_FORECAST; i++){\n let checkingDay;\n let date; //= new Date(forecast[5].dt_txt);\n let dayBeingProcessed = [];\n\n if (TODAY.getDay() + i > LAST_WEEKDAY){\n checkingDay = TODAY.getDay() + i - DAYS_IN_WEEK;\n } else {checkingDay = TODAY.getDay() + i;}\n\n forecast.forEach(function (dataPoint){ //Error around midnight\n date = new Date(dataPoint.dt_txt);\n if (date.getDay() === checkingDay){\n dayBeingProcessed.push(dataPoint);\n }\n });\n\n //Show aggregated data in console\n consoleLogData(dayBeingProcessed);\n //fill template and append\n fillTemplate(dayBeingProcessed, city);\n }\n })\n }", "title": "" }, { "docid": "6463c474f251251bf01b52f6036c6dc0", "score": "0.5948086", "text": "function forecast(arr) {\n return arr.slice(2, 4);\n}", "title": "" }, { "docid": "3fdf8ad4b6349d7d31304bc6d398ef0e", "score": "0.59276164", "text": "function fiveDay() {\n\n\n var APIKey2 = \"a0bebcdf3f3421ef2b632b830fa93f18\";\n var queryURL2 = \"https://api.openweathermap.org/data/2.5/forecast?q=\" + getWeath + \"&units=imperial&appid=\" + APIKey2;\n\n $(\".fiveDay\").empty()\n $.ajax({\n url: queryURL2,\n method: \"GET\"\n }).then(function (response) {\n for (let i = 0; i < response.list.length; i++) {\n var timeWeather = response.list[i]\n if (timeWeather.dt_txt.split(\" \")[1] === \"15:00:00\") {\n \n var day = $(\"<div>\").text(timeWeather.dt_txt.split(\" \")[0]);\n day.addClass(\"col-md-2 boxy\")\n var iconIns1 = timeWeather.weather[0].icon;\n var icon1 = $(\"<img>\").attr(\"src\", \"http://openweathermap.org/img/wn/\" + iconIns1 + \"@2x.png\");\n var tempF1 = $(\"<div>\").text(\"Temp: \" + timeWeather.main.temp + \"F\");\n var humid = $(\"<div>\").text(\"Humidity:\" + timeWeather.main.humidity + \"%\");\n day.append(icon1, tempF1, humid)\n $(\".fiveDay\").append(day)\n }\n\n }\n\n //day one\n\n // $(\"#day1-date\").text(response.list[10].dt_txt);\n // var iconIns1 = (response.list[10].weather[0].icon);\n // var icon1 = \"http://openweathermap.org/img/wn/\" + iconIns1 + \"@2x.png\"; \n // $(\"#day1-icon\").attr(\"src\", icon1);\n // var tempF1 = (Math.floor(response.list[10].main.temp - 273.15) * 1.80 + 32).toFixed(2);\n // $(\"#day1-temp\").text(\"Temp: \" + tempF1 + \"F\");\n // $(\"#day1-humidity\").text(\"Humidity:\" + response.list[10].main.humidity + \"%\");\n\n // //day two \n // $(\"#day2-date\").text(response.list[18].dt_txt);\n\n // var iconIns2 = (response.list[18].weather[0].icon);\n // var icon2 = \"http://openweathermap.org/img/wn/\" + iconIns2 + \"@2x.png\";\n // console.log(icon2);\n // $(\"#day2-icon\").attr(\"src\", icon2);\n // var tempF2 = (Math.floor(response.list[18].main.temp - 273.15) * 1.80 + 32).toFixed(2);\n // $(\"#day2-temp\").text(\"Temp: \" + tempF2 + \"F\");\n // $(\"#day2-humidity\").text(\"Humidity:\" + response.list[18].main.humidity + \"%\");\n\n // //day three \n // $(\"#day3-date\").text(response.list[26].dt_txt); \n // var iconIns3 = (response.list[26].weather[0].icon);\n // var icon3 = \"http://openweathermap.org/img/wn/\" + iconIns3 + \"@2x.png\";\n // $(\"#day3-icon\").attr(\"src\", icon3);\n // var tempF3 = (Math.floor(response.list[26].main.temp - 273.15) * 1.80 + 32).toFixed(2);\n // $(\"#day3-temp\").text(\"Temp: \" + tempF3 + \"F\");\n // $(\"#day3-humidity\").text(\"Humidity:\" + response.list[26].main.humidity + \"%\");\n\n\n // //day four \n // $(\"#day4-date\").text(response.list[34].dt_txt); \n // var iconIns4 = (response.list[34].weather[0].icon);\n // var icon4 = \"http://openweathermap.org/img/wn/\" + iconIns4 + \"@2x.png\";\n // $(\"#day4-icon\").attr(\"src\", icon4);\n // var tempF4 = (Math.floor(response.list[34].main.temp - 273.15) * 1.80 + 32).toFixed(2);\n // $(\"#day4-temp\").text(\"Temp: \" + tempF4 + \"F\");\n // $(\"#day4-humidity\").text(\"Humidity:\" + response.list[34].main.humidity + \"%\");\n\n // //day five \n // $(\"#day5-date\").text(response.list[39].dt_txt); \n // var iconIns5 = (response.list[39].weather[0].icon);\n // var icon5 = \"http://openweathermap.org/img/wn/\" + iconIns5 + \"@2x.png\";\n // $(\"#day5-icon\").attr(\"src\", icon5);\n // var tempF5 = (Math.floor(response.list[39].main.temp - 273.15) * 1.80 + 32).toFixed(2);\n // $(\"#day5-temp\").text(\"Temp: \" + tempF5 + \"F\");\n // $(\"#day5-humidity\").text(\"Humidity:\" + response.list[39].main.humidity + \"%\");\n\n\n\n\n\n\n\n\n });\n\n\n }", "title": "" }, { "docid": "81667213e200ed23644af4c2f7f2262f", "score": "0.5921806", "text": "function display5day(city) {\n var request = urlBase + \"data/2.5/forecast?q=\" + city + urlEnd;\n var forecast = $(\"#forecast\");\n forecast.empty();\n fetch(request)\n .then (response => response.json())\n .then (function (data) {\n for (var i=0 ; i<data.list.length ; i++) {\n var wDay;\n var formattedDate = new Date(data.list[i].dt_txt);\n var t = formattedDate.getHours();\n if (t == 12) {\n var day = formattedDate.getDay();\n switch (day) {\n case 0:\n wDay = \"Sunday\";\n break;\n case 1:\n wDay = \"Monday\";\n break;\n case 2:\n wDay = \"Tuesday\";\n break;\n case 3:\n wDay = \"Wednesday\";\n break;\n case 4:\n wDay = \"Thursday\";\n break;\n case 5:\n wDay = \"Friday\";\n break;\n default:\n wDay = \"Saturday\"; \n }\n var d = formattedDate.getDate();\n var m = formattedDate.getMonth();\n m++; // JavaScript months are 0-11\n var y = formattedDate.getFullYear();\n var html = ` <div class=\"card day-card\">\n <img src=\"https://openweathermap.org/img/wn/`+ data.list[i].weather[0].icon +`@2x.png\" alt=\"`+data.list[i].weather[0].description+`\" class=\"card-img\">\n <div class=\"card-body\"><hr>\n <h6 class=\"card-title\">`;\n html += wDay+\"<br>\"+m+\"/\"+d+\"/\"+y;\n html += `</h6><hr>\n <div class=\"card-text\">`\n html += \"<p>Temp:<br>\"+data.list[i].main.temp+\" &deg;F</p>\";\n html += `<p>Humidity:<br>`+data.list[i].main.humidity+`%</p> \n\n </div>\n </div>\n </div>`;\n forecast.append(html);\n }\n }\n });\n}", "title": "" }, { "docid": "826c5650843f955781162799b8593a83", "score": "0.5906406", "text": "function setFiveDayForecast (data) {\n forecastHeader.classList.remove('d-none');\n for (i = 0; i <fiveDayForecast.length; i++) {\n fiveDayForecast[i].innerHTML = '';\n var forecastDate = new Date(data.daily[i+1].dt * 1000);\n var day = forecastDate.getDate();\n var month = forecastDate.getMonth() + 1;\n var year = forecastDate.getFullYear();\n var dailyDate = document.createElement('h3')\n dailyDate.innerHTML = month + \"/\" + day + \"/\" + year;\n fiveDayForecast[i].appendChild(dailyDate);\n var weatherIcon = data.daily[i+1].weather[0].icon;\n var forecastIcon = document.createElement('img');\n forecastIcon.setAttribute(\"src\", \"https://openweathermap.org/img/wn/\" + weatherIcon + \"@2x.png\");\n fiveDayForecast[i].appendChild(forecastIcon);\n var forecastTemp = document.createElement('p');\n forecastTemp.innerHTML = \"Temperature: \" + data.daily[i+1].temp.day + \"&#8457\";\n fiveDayForecast[i].appendChild(forecastTemp);\n var forecastWind = document.createElement('p');\n forecastWind.innerHTML = \"Wind Speed: \" + data.daily[i+1].wind_speed +\" MPH\";\n fiveDayForecast[i].appendChild(forecastWind);\n var forecastHumidity = document.createElement('p');\n forecastHumidity.innerHTML = \"Humidity: \" + data.daily[i+1].humidity + \"%\";\n fiveDayForecast[i].appendChild(forecastHumidity);\n }\n\n\n}", "title": "" }, { "docid": "92a224c2023100df1987e0a36ffac7c1", "score": "0.5903636", "text": "predicted(){\n\t\tvar last = this.last().data[0];\n\t\tvar date = dayjs(last.date, \"DD/MM/YYYY\").add(4, 'weeks');\n\n\t\treturn module.exports([{\n\t\t\tdate: date.format('DD/MM/YYYY'),\n\t\t\tweight: last.weight + (this.trend() * 4)\n\t\t}]);\n\t}", "title": "" }, { "docid": "8938d3ac6a505461b3dbe4766ba1f967", "score": "0.58688796", "text": "function fiveDayForecast(cityInfo) {\n var query5DayURL = `https://api.openweathermap.org/data/2.5/forecast?q=${cityInfo},us&appid=${api_key}&units=imperial`;\n // console.log(query5DayURL);\n $(\".fiveDayList\").html(\"\");\n var forecastHeader = $(\"<h2>\").text(\"5-Day Forecast: \").attr({\n class: \"w-100\",\n id: \"fiveDayHead\",\n });\n $(\"#fiveHead\").append(forecastHeader);\n $.ajax({\n url: query5DayURL,\n method: \"GET\",\n }).then(function (res) {\n // console.log(res.list);\n for (var i = 7; i < 40; i += 8) {\n console.log(res.list[i]);\n var dateElement = $(\"<h6>\").text(\n moment(res.list[i].dt_txt).format(\"dddd\")\n );\n $(\".fiveDayList\").append(dateElement);\n var fiveDayIcon = $(\"<img>\").attr(\n \"src\",\n \"https://openweathermap.org/img/w/\" +\n res.list[i].weather[0].icon +\n \".png\"\n );\n dateElement.append(fiveDayIcon);\n var tempForecast = $(\"<p>\").text(\n \"Temperature: \" + Math.round(res.list[i].main.temp) + \"F\"\n );\n $(\".fiveDayList\").append(tempForecast);\n var humidForecast = $(\"<p>\").text(\n \"Humidity: \" + res.list[i].main.humidity + \"%\"\n );\n $(\".fiveDayList\").append(humidForecast);\n }\n });\n }", "title": "" }, { "docid": "d8fe0580926ba8b2bcafaf00f21ea8db", "score": "0.58603984", "text": "function fiveDaysForecast(searchValue) {\n $.ajax({\n url: \"https://api.openweathermap.org/data/2.5/forecast?q=\" + searchValue + \"&appid=36e0a25f774c30702ff855cbef613566&units=imperial\",\n method: \"GET\"\n\n }).then(function (response) {\n console.log(response)\n $(\"#forecast\").html(\"<h3> 5- day Forecast</h3>\").append(\"<div class=\\\"row\\\">\")\n for (var i = 0; i < response.list.length; i++) {\n //Only rendering the results if time is eqals to next day\n if (response.list[i].dt_txt.indexOf(\"00:00:00\") !== -1) {\n var icon = (\"<img src='https://openweathermap.org/img/w/\" + response.list[i].weather[0].icon + \".png'>\")\n var newCol = $(\"<div>\").addClass(\"col-md\")\n var newCard = $(\"<div>\").addClass(\"card bg-primary text-white mt-3\")\n var cardBody = $(\"<div>\").addClass(\"card-body p-2\")\n //Forecast date\n var newDate = $(\"<h5>\").addClass(\"card-title\").text(new Date(response.list[i].dt_txt).toLocaleDateString())\n //Forecast icon\n var newIcon = $(\"<p>\").html(icon)\n //description\n var description = $(\"<p>\").text(response.list[i].weather[0].description)\n //Forecast temperature\n var newTemerature = $(\"<p>\").addClass(\"card-text\").text(\"Temp : \" + parseInt(response.list[i].main.temp - 32) + \" °C\")\n\n //Minimum Temperature\n var windSpeed = $(\"<p>\").addClass(\"card-text\").text(\"Wind Speed : \" + response.list[i].wind.speed)\n\n //Maximum Temperature\n var newMaxTemerature = $(\"<p>\").addClass(\"card-text\").text(\"Max Temp : \" + parseInt(response.list[i].main.temp_max - 32) + \" °C\")\n //Forecast humidity\n var newHumidity = $(\"<p>\").addClass(\"card-text\").text(\"Humidity : \" + response.list[i].main.humidity + \" %\")\n $(\"#forecast .row\").append(newCol.append(newCard.append(cardBody.append(newDate, newIcon, description, newTemerature,windSpeed,newMaxTemerature, newHumidity))))\n }\n }\n })\n}", "title": "" }, { "docid": "bbb25ec2ba61956b8df97ffa3f4b6149", "score": "0.5850565", "text": "function getForecastButtons5Days(event,city) {\n var requestUrl = \"https://api.openweathermap.org/data/2.5/forecast?q=\"+city+\"&appid=\"+api+\"&units=\"+unit;\n \n fetch(requestUrl)\n .then(function (response) {\n return response.json();\n })\n .then(function (data) {\n var days=[8,16,24,32,39]\n for(var i=0;i<5;i++){ \n $('.day-'+`${i + 1}`+'-header').text(data.list[days[i]].dt_txt.split(' ')[0])\n var icon=data.list[days[i]].weather[0].icon;\n var imageURL=\"http://openweathermap.org/img/wn/\"+icon+\"@2x.png\";\n $('.weather-image-'+`${i + 1}`).attr(\"src\",imageURL);\n $('.day-'+`${i + 1}`+'-temp').text('Temp: '+data.list[days[i]].main.temp+String.fromCharCode(176)+' C') \n $('.day-'+`${i + 1}`+'-wind').text('Wind: '+data.list[days[i]].wind.speed+' MPH')\n $('.day-'+`${i + 1}`+'-humidity').text('Humidity: '+data.list[days[i]].main.humidity+' %') \n } \n });\n\n}", "title": "" }, { "docid": "7aa9569a35325f5ba76a3b089159975a", "score": "0.58475155", "text": "function AggregateForecastToDaily(threeHourArray){\r\n\t\t\r\n\t\tfor (var j = 0; j < 5; j++) {\r\n\t\t\ttempDailyForecastList.push(new DailyForecastViewModel());\r\n\t\t}\r\n\t\t\r\n\t\tvar now = new Date();\r\n\t\t\r\n\t\tvar selectedDate = new Date();\r\n\t\t\r\n\t\tselectedDate.setDate(selectedDate.getDate() + 1);\r\n\t\t\r\n\t\tvar dayCounter = 0;\r\n\t\t\r\n\t\t// loop through 3 hour forecasts, ignore those with today's date, populate array of dailies (where dailies will hold each days forecast)\r\n\t\tfor (var i = 0; i < threeHourForecast.length; i++) {\r\n\t\t\t\r\n\t\t\t// ignore today\r\n\t\t\tif (now.getDate() < moment.unix(threeHourForecast[i].dateTimeNum()).date()){\r\n\t\t\t\t\r\n\t\t\t\tif (selectedDate.getDate() == moment.unix(threeHourForecast[i].dateTimeNum()).date()){\r\n\t\t\t\t\ttempDailyForecastList[dayCounter].AddThreeHourForecast(threeHourForecast[i]);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ttempDailyForecastList[dayCounter].dateTimeText(ReturnDay(selectedDate.getDay()) + ' ' + selectedDate.getDate());\r\n\t\t\t\t\ttempDailyForecastList[dayCounter].AggregateToDaily();\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar tempSelectedDate = selectedDate;\r\n\t\t\t\t\tselectedDate.setDate(tempSelectedDate.getDate() + 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tdayCounter++;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttempDailyForecastList[dayCounter].AddThreeHourForecast(threeHourForecast[i]);\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttempDailyForecastList[4].dateTimeText(ReturnDay(selectedDate.getDay()) + ' ' + selectedDate.getDate());\r\n\t\ttempDailyForecastList[4].AggregateToDaily();\r\n\t}", "title": "" }, { "docid": "55beb7b6bcd69e21af1566f51bb4f43a", "score": "0.58428264", "text": "function display5day() {\n // clear container\n $fiveday.text('')\n var queryURL3 = \"https://api.openweathermap.org/data/2.5/onecall?units=imperial&lat=\" + lat + \"&lon=\" + lon + \"&appid=\" + APIKey;\n // make api request for 5 day forecast\n $.ajax({\n url: queryURL3,\n method: \"GET\"\n }).then(function(response) {\n // for loop dynamically adding forecasts one day at a time\n for (let i = 1; i<6; i++) {\n // create a div\n var $newdiv = $('<div>')\n // add date\n var $newp1 = $('<p>')\n $newp1.text(moment().add(i, 'days').format('l'))\n $newdiv.append($newp1)\n // add icon\n var $newimg = $('<img>')\n $newimg.attr(\"src\", 'https://openweathermap.org/img/wn/'+ response.daily[i].weather[0].icon + '@2x.png')\n $newdiv.append($newimg)\n // add temp\n var $newp3 = $('<p>')\n $newp3.text('Temp: ' + response.daily[i].temp.day + ' °F');\n $newdiv.append($newp3)\n // add humidity\n var $newp4 = $('<p>')\n $newp4.text('Humidity: ' + response.daily[i].humidity + '%');\n $newdiv.append($newp4)\n $newdiv.css({\n 'background-color': 'lightblue',\n 'margin': '10px'\n })\n // add div to fiveday container\n $fiveday.append($newdiv)\n }\n});\n}", "title": "" }, { "docid": "6ca63de10a543524ffc23d9339214275", "score": "0.5837399", "text": "function cityForecast() {\n // 5 day forecast\n var city = $(\"#cityInput\").val();\n $.ajax({\n url: queryUrl + (\"forecast?q=\" + city) + impUnit + apiKey1,\n method: \"GET\"\n }).then(function(response) {\n var dy1temp = (response.list[4].main.temp).toFixed(1);\n var dy2temp = (response.list[12].main.temp).toFixed(1);\n var dy3temp = (response.list[20].main.temp).toFixed(1);\n var dy4temp = (response.list[28].main.temp).toFixed(1);\n var dy5temp = (response.list[36].main.temp).toFixed(1);\n // display date, icon, temp, humidity\n $(\"#fiveDayRow\").empty();\n $(\"#fiveDayRow\").append(\"<div class='card bg-primary text-white fiveDayEl' id='dayOneEl'><h5>\" + moment().add(1, \"d\").format(\"M/D/YY\") + \"</h5> <img src='https://openweathermap.org/img/wn/\" + response.list[4].weather[0].icon + \"@2x.png' title='\" + response.list[4].weather[0].description + \"'> <h6>Temp: \" + dy1temp + \" °F</h6> <h6>Humidity: \" + response.list[4].main.humidity + \"%</h6></div>\");\n\n $(\"#fiveDayRow\").append(\"<div class='card bg-primary text-white fiveDayEl'><h5>\" + moment().add(2, \"d\").format(\"M/D/YY\") + \"</h5> <img src='https://openweathermap.org/img/wn/\" + response.list[12].weather[0].icon + \"@2x.png' title='\" + response.list[12].weather[0].description + \"'> <h6>Temp: \" + dy2temp + \" °F</h6> <h6>Humidity: \" + response.list[12].main.humidity + \"%</h6></div>\");\n\n $(\"#fiveDayRow\").append(\"<div class='card bg-primary text-white fiveDayEl'><h5>\" + moment().add(3, \"d\").format(\"M/D/YY\") + \"</h5> <img src='http://openweathermap.org/img/wn/\" + response.list[20].weather[0].icon + \"@2x.png' title='\" + response.list[20].weather[0].description + \"'> <h6>Temp: \" + dy3temp + \" °F</h6> <h6>Humidity: \" + response.list[20].main.humidity + \"%</h6></div>\");\n \n $(\"#fiveDayRow\").append(\"<div class='card bg-primary text-white fiveDayEl'><h5>\" + moment().add(4, \"d\").format(\"M/D/YY\") + \"</h5> <img src='http://openweathermap.org/img/wn/\" + response.list[28].weather[0].icon + \"@2x.png' title='\" + response.list[28].weather[0].description + \"'> <h6>Temp: \" + dy4temp + \" °F</h6> <h6>Humidity: \" + response.list[28].main.humidity + \"%</h6></div>\");\n\n $(\"#fiveDayRow\").append(\"<div class='card bg-primary text-white fiveDayEl'><h5>\" + moment().add(5, \"d\").format(\"M/D/YY\") + \"</h5> <img src='https://openweathermap.org/img/wn/\" + response.list[36].weather[0].icon + \"@2x.png' title='\" + response.list[36].weather[0].description + \"'><h6>Temp: \" + dy5temp + \" °F</h6> <h6>Humidity: \" + response.list[36].main.humidity + \"%</h6></div>\");\n \n // current weather\n $.ajax({\n url: queryUrl + (\"weather?q=\" + city) + impUnit + apiKey1,\n method: \"GET\"\n }).then(function(response) {\n // display city name date and icon in h2\n $(\".currentEl\").empty();\n $(\".currentEl\").append(\"<h2>\" + response.name + \" \" + moment().format(\"M/D/YY\") + \"</h2><img src='https://openweathermap.org/img/wn/\" + response.weather[0].icon + \"@2x.png' title='\" + response.weather[0].description + \"'>\");\n \n // display temperature\n $(\".currentEl\").append(\"<h4 class='currentLI'>Temperature: \" + response.main.temp + \"°F</h4>\");\n \n // display humidity\n $(\".currentEl\").append(\"<h4 class='currentLI'>Humidity: \" + response.main.humidity + \"%</h4>\");\n \n // display wind speed\n $(\".currentEl\").append(\"<h4 class='currentLI'>Wind Speed: \" + response.wind.speed + \" MPH</h4>\");\n \n // display UV index w/ color\n lon = response.coord.lon;\n lat = response.coord.lat;\n \n // uv index for current weather\n $.ajax({\n url: queryUrl + (\"uvi?lat=\" + lat + \"&lon=\" + lon) + apiKey1,\n method: \"GET\"\n }).then(function(response) {\n $(\".currentEl\").append(\"<h4 class='currentLI'>UV Index: <span id='uvValue'>\" + response.value + \"</span></h4>\")\n var uvRating = document.getElementById(\"uvValue\");\n if (response.value < 3) {\n uvRating.style.backgroundColor = \"#00f900\";\n }\n else if (response.value < 6) {\n uvRating.style.backgroundColor = \"#f5f900\";\n }\n else if (response.value < 8) {\n uvRating.style.backgroundColor = \"#f97300\";\n }\n else if (response.value < 11) {\n uvRating.style.backgroundColor = \"#f53b3b\";\n }\n else {\n uvRating.style.backgroundColor = \"#a758fd\";\n }\n });\n });\n }); \n}", "title": "" }, { "docid": "d13b53c7b5dfd23131f8d016466d102f", "score": "0.5835635", "text": "function setFiveDayForecastDataInDOM(arrayTemperatures, arrayWeatherSums) {\n var arrayAllRowsNodes = [getRowNodes(2), getRowNodes(3), getRowNodes(4), getRowNodes(5), getRowNodes(6)];\n\n // SET DATES IN DOM\n var calendarDays = setCalendarDays();\n var date;\n for (var row = 0; row < arrayAllRowsNodes.length; row++) {\n date = new Date(0);\n date.setUTCSeconds(forecastData[calendarDays[row]][0][\"H21\"][0].dt);\n arrayAllRowsNodes[row][0].innerHTML = getStringDate(date);\n }\n // SET AVERAGE TEMPERATURE AND WEATHER IMAGE IN DOM\n var row = 0;\n var col = 0;\n\n // HANDLE FIRST ROW (TODAY'S WEATHER FORECAST)\n var arrayTodayTemperatures = arrayTemperatures[row];\n var arrayTodayWeatherSums = arrayWeatherSums[row];\n // offset required to position the data in correct column (when certain time period(s) has passed and the connected data is removed)\n var offset = 5 - arrayTodayTemperatures.length;\n for (col = 0; col < arrayTodayTemperatures.length; col++) {\n var clothes = chooseArrayClothes(arrayTodayTemperatures[col])\n var clothing1 = clothes [0];\n var clothing2 = clothes [1];\n var clothing3 = clothes [2];\n var accessoriesImg = chooseAccessories(arrayTodayWeatherSums[col]);\n arrayAllRowsNodes[row][col + 1 + offset].innerHTML = generateHTMLItemToday(arrayTodayTemperatures[col], getTempImage(arrayTodayWeatherSums[col]), clothing1, clothing2, clothing3, accessoriesImg);\n var backgroundImg = getBackground(arrayTodayWeatherSums[col]);\n arrayAllRowsNodes[row][col + 1 + offset].setAttribute(\"style\", \"background-image: url(\" + backgroundImg + \")\");\n }\n document.getElementById(\"message\").innerHTML = getMessage(arrayTodayTemperatures, arrayTodayWeatherSums);\n\n // HANDLE SECOND+ ROWS\n for (row = 1; row < arrayTemperatures.length; row++) {\n for (col = 0; col < arrayTemperatures[row].length; col++) {\n var clothesImg = chooseClothes(arrayTemperatures[row][col])\n accessoriesImg = chooseAccessories(arrayWeatherSums[row][col]);\n arrayAllRowsNodes[row][col + 1].innerHTML = generateHTMLItemForecast(arrayTemperatures[row][col], getTempImage(arrayWeatherSums[row][col]), clothesImg, accessoriesImg);\n var backgroundImg = getBackground(arrayWeatherSums[row][col]);\n arrayAllRowsNodes[row][col + 1].setAttribute(\"style\", \"background-image: url(\" + backgroundImg + \")\");\n }\n }\n}", "title": "" }, { "docid": "de4e512a8de93e4ca37ea6424441d9a8", "score": "0.5826792", "text": "function renderForecast(data) {\n forecastTitleEl.textContent = '5-Day Forecast:';\n var forecastDate = moment();\n var forecast = data.list;\n for(var i=5; i < forecast.length; i++) {\n console.log(forecast[i]);\n forecastDateEl.textContent = forecastDate.add(1, \"days\").format(\"MMM Do, YYYY\");\n forecastTempEl.textContent = 'Temperature: ' + Math.round(((data.list[i].main.temp-273.15)*1.8)+32) + '\\u00B0' + 'F';\n forecastHumidityEl.textContent = 'Humidity: ' + data.list[i].main.humidity + '%';\n}\n}", "title": "" }, { "docid": "1b4248c86142d2bd032a92fabfca82b7", "score": "0.58226186", "text": "function getValues(city = \"New Delhi\") {\n const main = new XMLHttpRequest();\n const urlweather = 'https://api.weatherapi.com/v1/forecast.json?key=b237bbd52a554e65b4b62837202010&q=' + `${city}` + '+&days=5';\n main.open(\"GET\", urlweather);\n main.send();\n\n main.onload = (e) => {\n var res = JSON.parse(main.responseText);\n var temp = res.current.temp_c;\n var cond = res.current.condition.text;\n var wind_speed = res.current.wind_kph;\n var wind_dir = res.current.wind_dir;\n var humidity = res.current.humidity;\n var visibility = res.current.vis_km;\n var uv = res.current.uv;\n var lat = res.location.lat;\n var lng = res.location.lon;\n long = lng;\n latitude = lat;\n var daydata = res.forecast;\n let daytemp = new Array();\n let dayWeatherCond = new Array();\n for (var i = 0; i < 3; i++) {\n // console.log(daydata.forecastday[i].day.avgtemp_c)\n daytemp.push(daydata.forecastday[i].day.avgtemp_c);\n dayWeatherCond.push(daydata.forecastday[i].day.condition.text);\n }\n\n dayWeatherCond.push(dayWeatherCond[0]);\n console.log(daytemp)\n var sunrise = daydata.forecastday[0].astro.sunrise;\n var sunset = daydata.forecastday[0].astro.sunset;\n var rain = daydata.forecastday[0].day.daily_chance_of_rain;\n var time = new Date();\n var daynum = time.getDay();\n var date = time.getDate();\n var monthnum = time.getMonth();\n var year = time.getFullYear();\n var day = dayOfWeek[daynum];\n var month = monthOfYear[monthnum];\n var weathercond = daydata.forecastday[0].day.condition.text;\n var lastDay = Math.round((temp + daytemp[1] + daytemp[2]) / 3);\n\n var todayDate = day + \", \" + date + \" \" + month + \" \" + year;\n //console.log(todayDate);\n\n // console.log(sunrise,sunset)\n //console.log(temp, cond, wind_speed, wind_dir, rain, humidity, visibility, uv);\n\n\n document.getElementById(\"date\").innerHTML = todayDate;\n document.getElementById(\"today\").innerHTML = temp;\n document.getElementById(\"weather\").innerHTML = weathercond;\n document.getElementById(\"windspeedright\").innerHTML = wind_speed + \"km/h\";\n document.getElementById(\"humidityright\").innerHTML = humidity + \"%\";\n document.getElementById(\"precipitation\").innerHTML = rain + \"%\";\n document.getElementById(\"day\").innerHTML = Math.round(temp) + '<span class=\"unitx\"><span class=\"cel\"><sup>&#8451;</sup></span></span>';\n document.getElementById(\"day1\").innerHTML = Math.round(daytemp[1]) + '<span class=\"unitx\"><span class=\"cel\"><sup>&#8451;</sup></span></span>';\n document.getElementById(\"day2\").innerHTML = Math.round(daytemp[2]) + '<span class=\"unitx\"><span class=\"cel\"><sup>&#8451;</sup></span></span>';\n document.getElementById(\"day3\").innerHTML = lastDay + '<span class=\"unitx\"><span class=\"cel\"><sup>&#8451;</sup></span></span>';\n document.getElementById(\"daytwo\").innerHTML = dayOfWeek[(daynum + 2) % 7];\n document.getElementById(\"daythree\").innerHTML = dayOfWeek[(daynum + 3) % 7];\n\n document.getElementById(\"uv-index\").innerHTML = uv;\n var perct = uv * 10;\n //console.log(\"percentage: \"+perct)\n document.getElementById(\"bar\").style.width = perct + \"%\";\n if (uv <= 3) {\n document.getElementById(\"uv-desc\").innerHTML = uvmap[0]\n }\n else if (uv <= 7) {\n document.getElementById(\"uv-desc\").innerHTML = uvmap[1]\n }\n else {\n document.getElementById(\"uv-desc\").innerHTML = uvmap[2]\n }\n\n document.getElementById(\"sunrise\").innerHTML = sunrise;\n document.getElementById(\"sunset\").innerHTML = sunset;\n document.getElementById(\"wind-speed\").innerHTML = wind_speed;\n document.getElementById(\"wind-dir\").innerHTML = wind_dir;\n\n //Visibility\n document.getElementById(\"vis-val\").innerHTML = visibility;\n if (visibility <= 2) {\n document.getElementById(\"vis-status\").innerHTML = \"Poor\";\n }\n else if (visibility <= 9) {\n document.getElementById(\"vis-status\").innerHTML = \"Moderate\";\n }\n else if (visibility <= 19) {\n document.getElementById(\"vis-status\").innerHTML = \"Good\";\n }\n else if (visibility <= 39) {\n document.getElementById(\"vis-status\").innerHTML = \"Very Good\";\n }\n else {\n document.getElementById(\"vis-status\").innerHTML = \"Excellent\";\n }\n\n //Humidity\n console.log(humidity)\n document.getElementById(\"humidity\").innerHTML = humidity;\n if (humidity <= 20) {\n document.getElementById('humidity-status').innerHTML = \"Very Dry\";\n }\n\n else if (humidity <= 30) {\n document.getElementById('humidity-status').innerHTML = \"Dry\";\n }\n\n else if (humidity <= 45) {\n document.getElementById('humidity-status').innerHTML = \"Moderate\";\n }\n\n else if (humidity <= 60) {\n document.getElementById('humidity-status').innerHTML = \"Humid\";\n }\n\n else {\n document.getElementById('humidity-status').innerHTML = \"Very Humid\"\n }\n\n var weatherCond = weathercond;\n // console.log(cloudy.includes(weatherCond));\n if (thunderstorm.includes(weatherCond)) {\n document.getElementById('thunderstorm-icon').style.display = \"block\";\n document.getElementById('rainy-icon').style.display = \"none\";\n document.getElementById('snowy-icon').style.display = \"none\";\n document.getElementById('sunCloud-icon').style.display = \"none\";\n document.getElementById('misty-icon').style.display = \"none\";\n document.getElementById('cloudy-icon').style.display = \"none\";\n document.getElementById('sunny-icon').style.display = \"none\";\n }\n\n else if (rainy.includes(weatherCond)) {\n document.getElementById('thunderstorm-icon').style.display = \"none\";\n document.getElementById('rainy-icon').style.display = \"block\";\n document.getElementById('snowy-icon').style.display = \"none\";\n document.getElementById('sunCloud-icon').style.display = \"none\";\n document.getElementById('misty-icon').style.display = \"none\";\n document.getElementById('cloudy-icon').style.display = \"none\";\n document.getElementById('sunny-icon').style.display = \"none\";\n }\n\n else if (snowy.includes(weatherCond)) {\n document.getElementById('thunderstorm-icon').style.display = \"none\";\n document.getElementById('rainy-icon').style.display = \"none\";\n document.getElementById('snowy-icon').style.display = \"block\";\n document.getElementById('sunCloud-icon').style.display = \"none\";\n document.getElementById('misty-icon').style.display = \"none\";\n document.getElementById('cloudy-icon').style.display = \"none\";\n document.getElementById('sunny-icon').style.display = \"none\";\n }\n\n else if (sunCloud.includes(weatherCond)) {\n document.getElementById('thunderstorm-icon').style.display = \"none\";\n document.getElementById('rainy-icon').style.display = \"none\";\n document.getElementById('snowy-icon').style.display = \"none\";\n document.getElementById('sunCloud-icon').style.display = \"block\";\n document.getElementById('misty-icon').style.display = \"none\";\n document.getElementById('cloudy-icon').style.display = \"none\";\n document.getElementById('sunny-icon').style.display = \"none\";\n }\n\n else if (misty.includes(weatherCond)) {\n document.getElementById('thunderstorm-icon').style.display = \"none\";\n document.getElementById('rainy-icon').style.display = \"none\";\n document.getElementById('snowy-icon').style.display = \"none\";\n document.getElementById('sunCloud-icon').style.display = \"none\";\n document.getElementById('misty-icon').style.display = \"block\";\n document.getElementById('cloudy-icon').style.display = \"none\";\n document.getElementById('sunny-icon').style.display = \"none\";\n }\n\n else if (cloudy.includes(weatherCond)) {\n document.getElementById('thunderstorm-icon').style.display = \"none\";\n document.getElementById('rainy-icon').style.display = \"none\";\n document.getElementById('snowy-icon').style.display = \"none\";\n document.getElementById('sunCloud-icon').style.display = \"none\";\n document.getElementById('misty-icon').style.display = \"none\";\n document.getElementById('cloudy-icon').style.display = \"block\";\n document.getElementById('sunny-icon').style.display = \"none\";\n }\n\n else {\n document.getElementById('thunderstorm-icon').style.display = \"none\";\n document.getElementById('rainy-icon').style.display = \"none\";\n document.getElementById('snowy-icon').style.display = \"none\";\n document.getElementById('sunCloud-icon').style.display = \"none\";\n document.getElementById('misty-icon').style.display = \"none\";\n document.getElementById('cloudy-icon').style.display = \"none\";\n document.getElementById('sunny-icon').style.display = \"block\";\n }\n\n\n var ids = [\"day-today-icon\", \"day-tomorrow-icon\", \"day-2-icon\", \"day-3-icon\"];\n for (var i = 0; i < dayWeatherCond.length; i++) {\n var weatherCond = dayWeatherCond[i];\n var ic = document.getElementById(ids[i]);\n if (thunderstorm.includes(weatherCond)) {\n ic.innerHTML = '<div class=\"cloud\"></div>' +\n '<div class=\"lightning\">' +\n '<div class=\"bolt\"></div>' +\n '<div class=\"bolt\"></div>' +\n '</div>';\n }\n\n else if (rainy.includes(weatherCond)) {\n ic.innerHTML = '<div class=\"cloud\"></div>'\n + '<div class=\"rain\"></div>';\n }\n\n else if (snowy.includes(weatherCond)) {\n ic.innerHTML = '<div class=\"cloud\"></div>' +\n '<div class=\"snow\">' +\n '<div class=\"flake\"></div>' +\n '<div class=\"flake\"></div>' +\n '</div>';\n }\n\n else if (sunCloud.includes(weatherCond)) {\n ic.innerHTML = '<div class=\"cloud\"></div>' +\n '<div class=\"sunny\">' +\n '<div class=\"rays\"></div>' +\n '</div>' +\n '<div class=\"rain\"></div>';\n }\n\n else if (misty.includes(weatherCond)) {\n ic.innerHTML = '<div class=\"cloud\"></div>'\n + '<div class=\"fog\"></div>';\n }\n\n else if (cloudy.includes(weatherCond)) {\n ic.innerHTML = '<div class=\"cloud\"></div>' +\n '<div class=\"cloud\"></div>'\n }\n\n else {\n ic.innerHTML = '<div class=\"sunny\">' +\n '<div class=\"rays\"></div>' +\n '</div>'\n }\n }\n\n }\n\n //AirQuality Index api Call\n const aqi = new XMLHttpRequest();\n const urlaqi = \"https://api.waqi.info/feed/\" + `${city}` + \"/?token=46b6b9160865cef800dde9b691d76cf2dea5cd40\";\n aqi.open(\"GET\", urlaqi);\n aqi.send();\n\n aqi.onload = (e) => {\n var resaqi = JSON.parse(aqi.responseText);\n var aqi_val = resaqi.data.aqi;\n // console.log(resaqi)\n console.log(aqi_val);\n\n document.getElementById('aqi-val').innerHTML = aqi_val;\n if (aqi_val < 50) {\n document.getElementById('aqi-status').innerHTML = \"Good\";\n }\n\n else if (aqi_val < 150) {\n document.getElementById('aqi-status').innerHTML = \"Moderate\";\n }\n\n else if (aqi_val < 200) {\n document.getElementById('aqi-status').innerHTML = \"Unhealthy\";\n }\n\n else if (aqi_val < 500) {\n document.getElementById('aqi-status').innerHTML = \"Very Unhealthy\";\n }\n else if(aqi_val == undefined || aqi_val == \"-\"){\n document.getElementById('aqi-status').innerHTML = \"Not Available\";\n document.getElementById('aqi-val').innerHTML = \"NA\";\n }\n else {\n document.getElementById('aqi-status').innerHTML = \"Hazardous\";\n }\n }\n\n document.getElementById(\"city\").innerHTML = city;\n document.getElementById(\"country\").innerHTML = dict[city].country;\n var url = \"images/\" + `${dict[city].country.toLowerCase()}` + '.png';\n document.getElementById('country-image').src = url;\n}", "title": "" }, { "docid": "db9220d4afe22e247066eba96f6cdece", "score": "0.5814038", "text": "function forecast(arr) {\n arr = arr.slice(2,4);\n return arr;\n}", "title": "" }, { "docid": "f366e5ccb56ce3f46b4286371a4fce20", "score": "0.5806179", "text": "function getFiveDayApi(lat, lon) {\n\n //one call request\n\n var oneCallQueryUrl = \"https://api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&exclude=minutely,hourly&units=imperial&appid=\" + APIKey;\n\n // This request is for \n fetch(oneCallQueryUrl)\n .then(function (response) {\n return response.json();\n })\n .then(function (data) {\n //before we enter the loop to create and append elements to the forecastAnchor\n //we need to clean it of any previously attached elements\n while (forecastAnchor.firstChild) {\n forecastAnchor.removeChild(forecastAnchor.firstChild);\n }\n\n //[0] is the current day so start at 1\n for(i = 1; i <6; i++){\n // need to populate the 5 day forcast containers\n // steps create a variable with the value I want to display\n // create the elements I need on my html page but alo make the\n // containers to hold them\n // append the items to each other, the appended item is a child\n // set the attributes, notice multiple classes in one statement\n // append the new container to the document as the last step\n\n // create the variables\n var iterationMoment = moment().add(i, 'days');\n var date = (iterationMoment.format('MM/D/YY'));\n //console.log(\"displayMoment\", displayMoment);\n var temp = data.daily[i].temp.max;\n var icon = data.daily[i].weather[0].icon;\n var iconHttp = \"https://openweathermap.org/img/wn/\" + icon + \"@2x.png\";\n var humidity = data.daily[i].humidity;\n var uv = data.daily[i].uvi;\n //create an element\n var col = document.createElement(\"div\");\n var card = document.createElement(\"div\");\n var cardTitle = document.createElement(\"h4\");\n var body = document.createElement(\"div\");\n var iconEl = document.createElement(\"img\");\n var tempEl = document.createElement(\"p\");\n var humEl = document.createElement(\"p\");\n var uviEl = document.createElement(\"p\");\n\n //append to html - need to append before attaching a class\n col.append(card);\n card.append(body);\n body.append(cardTitle, iconEl, tempEl, humEl, uviEl);\n \n //attach a class - set attribute\n col.setAttribute('class', \"col weatherDay\");\n\n //use text content to to assign content to html elements\n cardTitle.textContent = date;\n iconEl.setAttribute('src', iconHttp);\n tempEl.textContent = \"Temp (F): \" + temp;\n humEl.textContent = \"Humidity (%): \" + humidity;\n uviEl.textContent = \"UV Index: \" + uv;\n\n //appened the new container to the document\n forecastAnchor.append(col);\n }\n\n //variable for current day uvi\n var currentDayUvi = data.current.uvi;\n\n searchUVindex.textContent = \"UV Index: \" + currentDayUvi;\n\n //Need to set a backgournd color, maybe by setting class depending on the UV index value\n if (currentDayUvi <= 2) {\n searchUVindex.setAttribute('class', \"uvilow\");\n } else if (currentDayUvi <= 5) {\n searchUVindex.setAttribute('class', \"uvimod\");\n } else if (currentDayUvi <= 7) {\n searchUVindex.setAttribute('class', \"uvihigh\");\n } else if (currentDayUvi > 7) {\n searchUVindex.setAttribute('class', \"uviveryhigh\");\n }\n });\n }", "title": "" }, { "docid": "cb09b2112ad0b65adc5c6716586c6b67", "score": "0.57917404", "text": "function fiveDay(name) {\n $.ajax({\n type: \"GET\",\n url: \"https://api.openweathermap.org/data/2.5/forecast?q=\" + name + \"&appid=ebdcfef8b5f11a300f888ec06cffdf1c&units=imperial\",\n dataType: \"json\",\n }).then(function (response) {\n var date = $(\"<h5>\");\n var temp = $(\"<p>\");\n var humidity = $(\"<p>\");\n var img = $(\"<img>\");\n img.attr(\"src\", \"https://openweathermap.org/img/wn/\" + response.list[3].weather[0].icon + \".png\");\n // new Date - turns into a date object\n var dateFormat = new Date(response.list[3].dt_txt).toLocaleString().split(\",\");\n date.text(dateFormat[0]);\n temp.text(\"Temp: \" + response.list[3].main.temp + \" °F\");\n humidity.text(\"Humidity: \" + response.list[3].main.humidity + \" %\");\n $(\"#1\").append(date);\n $(\"#1\").append(img);\n $(\"#1\").append(temp);\n $(\"#1\").append(humidity);\n\n var date2 = $(\"<h5>\");\n var temp2 = $(\"<p>\");\n var humidity2 = $(\"<p>\");\n var img2 = $(\"<img>\");\n img2.attr(\"src\", \"https://openweathermap.org/img/wn/\" + response.list[11].weather[0].icon + \".png\");\n var dateFormat2 = new Date(response.list[11].dt_txt).toLocaleString().split(\",\");\n date2.text(dateFormat2[0]);\n temp2.text(\"Temp: \" + response.list[11].main.temp + \" °F\");\n humidity2.text(\"Humidity: \" + response.list[11].main.humidity + \" %\");\n $(\"#2\").append(date2);\n $(\"#2\").append(img2);\n $(\"#2\").append(temp2);\n $(\"#2\").append(humidity2);\n\n var date3 = $(\"<h5>\");\n var temp3 = $(\"<p>\");\n var humidity3 = $(\"<p>\");\n var img3 = $(\"<img>\");\n img3.attr(\"src\", \"https://openweathermap.org/img/wn/\" + response.list[19].weather[0].icon + \".png\");\n var dateFormat3 = new Date(response.list[19].dt_txt).toLocaleString().split(\",\");\n date3.text(dateFormat3[0]);\n temp3.text(\"Temp: \" + response.list[19].main.temp + \" °F\");\n humidity3.text(\"Humidity: \" + response.list[19].main.humidity + \" %\");\n $(\"#3\").append(date3);\n $(\"#3\").append(img3);\n $(\"#3\").append(temp3);\n $(\"#3\").append(humidity3);\n\n var date4 = $(\"<h5>\");\n var temp4 = $(\"<p>\");\n var humidity4 = $(\"<p>\");\n var img4 = $(\"<img>\");\n img4.attr(\"src\", \"https://openweathermap.org/img/wn/\" + response.list[27].weather[0].icon + \".png\");\n var dateFormat4 = new Date(response.list[27].dt_txt).toLocaleString().split(\",\");\n date4.text(dateFormat4[0]);\n temp4.text(\"Temp: \" + response.list[27].main.temp + \" °F\");\n humidity4.text(\"Humidity: \" + response.list[27].main.humidity + \" %\");\n $(\"#4\").append(date4);\n $(\"#4\").append(img4);\n $(\"#4\").append(temp4);\n $(\"#4\").append(humidity4);\n\n var date5 = $(\"<h5>\");\n var temp5 = $(\"<p>\");\n var humidity5 = $(\"<p>\");\n var img5 = $(\"<img>\");\n img5.attr(\"src\", \"https://openweathermap.org/img/wn/\" + response.list[35].weather[0].icon + \".png\");\n var dateFormat5 = new Date(response.list[35].dt_txt).toLocaleString().split(\",\");\n date5.text(dateFormat5[0]);\n temp5.text(\"Temp: \" + response.list[35].main.temp + \" °F\");\n humidity5.text(\"Humidity: \" + response.list[35].main.humidity + \" %\");\n $(\"#5\").append(date5);\n $(\"#5\").append(img5);\n $(\"#5\").append(temp5);\n $(\"#5\").append(humidity5);\n });\n }", "title": "" }, { "docid": "c2f9957f5e8d526466e18d57e128cf0f", "score": "0.577035", "text": "function renderFiveDay() {\n $(\"#fiveDayForecast\").empty();\n\n // use 5 day / 3 hour Forecast\n let fiveDayUrl = \"https://api.openweathermap.org/data/2.5/forecast?q=\" + city + \"&units=imperial&appid=5cea1d9c8d9729e3deba8cb0ccf8f1d8\"\n $(\"#fiveDayForecast\").append($(\"<h2>\").text(\"5-Day Forecast\").addClass(\"m-3\"));\n $.ajax({\n url: fiveDayUrl,\n method: \"GET\"\n }).then(function (forecastData) {\n\n /* \n 5 day / 3 hour Forecast provides 5 day forecast with the granularity of 3 hours.\n And once forecastData is returned, it contains 40 weather elements list ordered by the time. \n \n e.g: \n \n API is called at 04:00 UTC on 5/1, \n forecastData.list[0].dt is 5/1 06:00\n forecastData.list[1].dt is 5/1 09:00\n ...\n forecastData.list[7].dt is 5/2 03:00\n ...\n forecastData.list[15].dt is 5/3 03:00\n ...\n\n The loop will iterate the list with indices 7,15,23,31,39\n\n */\n\n for (let i = 0; i < 5; i++) {\n\n // create card elements to display the forecast for each day\n let cardElm = $(\"<div>\").addClass(\"weather-card flex-fill\");\n let cardData = $(\"<div>\").addClass(\"border text-white rounded m-3 bg-primary\");\n\n // format and display the date\n let date = new Date(forecastData.list[8 * i + 7].dt * 1000);\n\n let dateFormatted = (parseInt(date.getMonth()) + 1) + \"/\" + date.getDate() + \", \" + date.getFullYear();\n\n cardData.append($(\"<h2>\").text(dateFormatted).addClass(\"m-1 text-center\"));\n\n // get a icon picture and display\n let iconUrl = \"http://openweathermap.org/img/wn/\" + forecastData.list[8 * i + 7].weather[0].icon + \"@2x.png\";\n cardData.append($(\"<img>\").attr(\"src\", iconUrl).attr(\"style\", \"width:25%;\")).addClass(\" text-center\");\n\n // display temp and humidity\n cardData.append($(\"<p>\").addClass(\"m-1 text-center\").text(\"Temp: \" + forecastData.list[8 * i + 7].main.temp + \" °F\"));\n cardData.append($(\"<p>\").addClass(\"m-1 text-center\").text(\"Humidity: \" + forecastData.list[8 * i + 7].main.humidity + \" %\"));\n\n // append card element to #fiveDayForecast\n cardElm.append(cardData);\n $(\"#fiveDayForecast\").append(cardElm);\n }\n\n })\n\n // displays #fiveDayForecast, which was hidden at the initial visit of the page.\n $(\"#fiveDayForecast\").attr(\"style\", \"display:flex;\")\n}", "title": "" }, { "docid": "e05069556e30576518e34c450e87aa12", "score": "0.5754509", "text": "function forecast(arr) {\n arr = arr.slice(2,4)\n\n return arr;\n}", "title": "" }, { "docid": "e27643b330dfa4f4d79369ef20a19801", "score": "0.57460594", "text": "function getForecast(){\n \n $.ajax({\n\n url: \"https://api.openweathermap.org/data/2.5/onecall?lat=\" + localStorage.getItem(\"lat\") + \"&lon=\" + localStorage.getItem(\"long\") + \"&exclude=current,minutely,hourly,alerts&units=metric&appid=\" + apiKey,\n method: \"GET\",\n dataType: \"json\",\n success: function (forecastResponse){\n\n for(let x = 1; x<=5; x++){\n\n $(`#head${x}`).html(function(){\n\n let getOffset = localStorage.getItem(\"timeOffset\");\n \n let setDate = (DateTime.fromMillis(+getOffset)).plus({ days: x }).toFormat(\"EEE',' dd LLL\");\n \n return setDate;\n })\n \n $(`#desc${x}`).html(forecastResponse.daily[x].weather[0].description);\n $(`#desc${x}`).css(\"text-transform\", \"capitalize\");\n \n $(`#temp${x}`).html(\"<strong>Temp:</strong> \" + forecastResponse.daily[x].temp.day + \"&degC\");\n \n $(`#iconday${x}`).show();\n $(`#iconday${x}`).attr(\"src\",`http://openweathermap.org/img/wn/${forecastResponse.daily[x].weather[0].icon}@2x.png` )\n \n $(`#humidity${x}`).html(`<strong>Humidity: </strong>${forecastResponse.daily[x].humidity}%`);\n \n $(`#uvindex${x}`).html(`<strong>UV Index: </strong>${forecastResponse.daily[x].uvi}`);\n\n };\n\n \n },\n\n error: $(\"forecast-header\").text(\"Couldn't fetch data: check city name or internet connection\")\n }) \n }", "title": "" }, { "docid": "ff038f6fea96d8d835de1af60a973576", "score": "0.57433915", "text": "function goToNextFiveDays(){\n\t\tdrawCal(currEndDayI + 1, currEndDayI + 5);\n}", "title": "" }, { "docid": "8f738bc6740e7038fc76facd19f95361", "score": "0.5724298", "text": "function day(){\r\n\t\tvar days = ['SUN', 'MON', 'TUES', 'WED', 'THURS', 'FRI', 'SAT'];\r\n\t\tvar day = new Date();\r\n\t\tvar today = day.getDay(); //nextDay = Today + 1 \r\n\r\n\t\tvar putDay = [];\r\n\r\n\t\tfor(var i = 0; i <= 5; i++){\r\n\t\t\tif(today <= 6) {\r\n\t\t\t\tputDay.push(days[today]);\r\n\t\t\t\ttoday++;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\ttoday = 0;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\tconsole.log(putDay);\r\n\t\tsetDay(putDay);\r\n\t}", "title": "" }, { "docid": "98511833a29c187018fea279e670f1e5", "score": "0.5721465", "text": "function fiveDayForcast(city) {\n var queryURLFive = \"https://api.openweathermap.org/data/2.5/forecast?q=\" + city + \"&appid=\" + APIKey;\n\n var dateArray = [];\n var iconArray = [];\n var tempArray = [];\n var humidityArray = [];\n\n $.ajax({\n url: queryURLFive,\n method: \"GET\"\n })\n \n .then(function(response) {\n\n console.log(response);\n console.log(\"Get here - script.js - line 58\");\n\n for (var i = 0; i < 40; i++) {\n var option = response.list[i].dt_txt.substring(11);\n var dateValue = response.list[i].dt_txt.substring(0, 10);\n var currentDate = moment().format(\"YYYY-MM-DD\");\n\n if (\"15:00:00\" == option && dateValue != currentDate) {\n //Convert the date using moment js\n var dateString = response.list[i].dt_txt.substring(0, 10);\n var date = new moment(dateString);\n\n //Format Date\n var formatDate = date.format(\"MM/DD/YYYY\");\n console.log(\"Get here - script.js - line 72. Date Format: \" + formatDate);\n\n //Push formatted date to an array\n dateArray.push(formatDate);\n\n //Icon\n iconArray.push(response.list[i].weather[0].icon);\n \n //Pull Kelvin Temperature & convert to F\n tempArray.push(((response.list[i].main.temp - 273.15) * 1.8 + 32).toFixed(2));\n\n //Humidity\n humidityArray.push(response.list[i].main.humidity);\n };\n };\n\n //Clear the Forcast\n for (var i = 0; i < dateArray.length; i++) {\n $(\".forecast\" + [i]).empty();\n console.log(\"Get here - script.js - line 91 - forcast clearing in the fiveDayForcast()\");\n };\n\n //Append API information to the html page\n for (var i = 0; i < dateArray.length; i++) {\n //Append Date\n var newDate = $(\"<h4>\").text(dateArray[i]);\n $(\".forecast\" + [i]).append(newDate);\n\n //Append Icon\n var newImg = $(\"<img>\");\n newImg.attr(\"src\", \"http://openweathermap.org/img/wn/\" + iconArray[i] + \"@2x.png\");\n $(\".forecast\" + [i]).append(newImg);\n\n //Append Tempurature\n var newTemp = $(\"<p>\").html(\"Temp: \" + tempArray[i] + \"&#176;F\");\n $(\".forecast\" + [i]).append(newTemp);\n\n //Addend Humitity\n var newHumidity = $(\"<p>\").html(\"Humidity: \" + humidityArray[i] + \"%\");\n $(\".forecast\" + [i]).append(newHumidity);\n\n console.log(\"Get here - script.js - line 113\");\n };\n });\n}", "title": "" }, { "docid": "5f78fb7dfa0b63b16fa212805bb3dc67", "score": "0.5720633", "text": "function splitDays(dataArray){\r\n var dates = [];\r\n var testInput = dataArray[0].dt_txt;\r\n var currentDate = new Date(testInput.substr(0,10));\r\n\r\n //generates current date plus 4 more days in an array as the 5 day forecast\r\n for(var a = 0; a < 6; a++){\r\n var d = new Date();\r\n d.setDate(currentDate.getDate() + a);\r\n d.setHours(0);\r\n d.setMinutes(0);\r\n d.setSeconds(0);\r\n dates.push(d);\r\n }\r\n\r\n var dayArray = [[],[],[],[],[]];\r\n\r\n //splits each list item into its specific day\r\n //note, 12AM is included in the previous day and not in the current day no easy workaround found\r\n for(var b = 0; b < dataArray.length; b++){\r\n var inputDate = new Date(dataArray[b].dt_txt);\r\n inputDate.setHours(inputDate.getHours() - 1);\r\n\r\n if(inputDate.getTime() >= dates[0].getTime() && inputDate.getTime() < dates[1].getTime()){\r\n dayArray[0].push(dataArray[b]);\r\n }\r\n\r\n if(inputDate >= dates[1] && inputDate < dates[2]){\r\n dayArray[1].push(dataArray[b]);\r\n }\r\n\r\n if(inputDate >= dates[2] && inputDate < dates[3]){\r\n dayArray[2].push(dataArray[b]);\r\n }\r\n\r\n if(inputDate >= dates[3] && inputDate < dates[4]){\r\n dayArray[3].push(dataArray[b]);\r\n }\r\n\r\n if(inputDate >= dates[4] && inputDate < dates[5]){\r\n dayArray[4].push(dataArray[b]);\r\n }\r\n }\r\n return dayArray;\r\n}", "title": "" }, { "docid": "07fea24aed739c99e86d7592ad20b69f", "score": "0.57154214", "text": "function getForecast(lat, lon) {\n var forecastQueryURL = \"https://api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&exclude=minutely&units=imperial\" + \"&appid=\" + APIKeyWeather;\n $(\"#forecast\").empty();\n $.ajax({\n url: forecastQueryURL,\n method: \"GET\"\n }).then(function (response) {\n console.log(response);\n // loop to create cards for forecasted days\n for (var i = 1; i < 5; i++) {\n // Months array\n var months_arr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n // Convert timestamp to milliseconds\n var date = new Date(response.daily[i].dt * 1000);\n // Month\n var month = months_arr[date.getMonth()];\n // Day\n var day = date.getDate();\n console.log(response.daily[i])\n var col = $(\"<div>\").addClass(\"col-md-3\")\n var card = $(\"<div>\").addClass(\"card\");\n var cardBody = $(\"<div>\").addClass(\"card-body\");\n var cardTitle = $(\"<h4>\").addClass(\"card-title\").text(month + \" \" + day);\n var currTempMax = $(\"<h5>\").text(\"High \" + response.daily[i].temp.max + \" F\");\n var currHumid = $(\"<h5>\").text(\"Humidity \" + response.daily[i].humidity + \"%\");\n var currTempMin = $(\"<h5>\").text(\"Low \" + response.daily[i].temp.min + \" F\");\n \n\n \n \n \n $(\"#forecast\").append(col.append(card.append(cardBody.append(cardTitle, currTempMax, currTempMin, currHumid))))\n }\n });\n }", "title": "" }, { "docid": "18994db63f885bfd5c7564842e7fc7b3", "score": "0.5697226", "text": "function fiveDay(city) {\n fiveDayCont.style.display = \"block\";\n // this variables holds the query for the five day forecast\n var fiveDayQueryURL =\n \"https://api.openweathermap.org/data/2.5/forecast?q=\" +\n city +\n \"&appid=\" +\n APIKey +\n \"&units=imperial\";\n\n $.ajax({\n url: fiveDayQueryURL,\n method: \"GET\",\n }).then(function (response) {\n // these append the five day forecast to the screen.\n $(\".zeroDate\").html(\n new Date(response.list[3].dt * 1000).toLocaleDateString()\n );\n $(\".zeroIcon\").html(\n \"<img src=\" +\n \"https://openweathermap.org/img/wn/\" +\n response.list[3].weather[0].icon +\n \".png\" +\n \">\"\n );\n $(\".zeroTemp\").text(\"Temp: \" + response.list[3].main.temp + \" ºF\");\n $(\".zeroHumidity\").text(\n \"Humidity: \" + response.list[3].main.humidity + \"%\"\n );\n\n $(\".oneDate\").html(\n new Date(response.list[11].dt * 1000).toLocaleDateString()\n );\n $(\".oneIcon\").html(\n \"<img src=\" +\n \"https://openweathermap.org/img/wn/\" +\n response.list[11].weather[0].icon +\n \".png\" +\n \">\"\n );\n $(\".oneTemp\").text(\"Temp: \" + response.list[11].main.temp + \" ºF\");\n $(\".oneHumidity\").text(\n \"Humidity: \" + response.list[11].main.humidity + \"%\"\n );\n\n $(\".twoDate\").html(\n new Date(response.list[19].dt * 1000).toLocaleDateString()\n );\n $(\".twoIcon\").html(\n \"<img src=\" +\n \"https://openweathermap.org/img/wn/\" +\n response.list[19].weather[0].icon +\n \".png\" +\n \">\"\n );\n $(\".twoTemp\").text(\"Temp: \" + response.list[19].main.temp + \" ºF\");\n $(\".twoHumidity\").text(\n \"Humidity: \" + response.list[19].main.humidity + \"%\"\n );\n\n $(\".threeDate\").html(\n new Date(response.list[27].dt * 1000).toLocaleDateString()\n );\n $(\".threeIcon\").html(\n \"<img src=\" +\n \"https://openweathermap.org/img/wn/\" +\n response.list[27].weather[0].icon +\n \".png\" +\n \">\"\n );\n $(\".threeTemp\").text(\"Temp: \" + response.list[27].main.temp + \" ºF\");\n $(\".threeHumidity\").text(\n \"Humidity: \" + response.list[27].main.humidity + \"%\"\n );\n\n $(\".fourDate\").html(\n new Date(response.list[35].dt * 1000).toLocaleDateString()\n );\n $(\".fourIcon\").html(\n \"<img src=\" +\n \"https://openweathermap.org/img/wn/\" +\n response.list[35].weather[0].icon +\n \".png\" +\n \">\"\n );\n $(\".fourTemp\").text(\"Temp: \" + response.list[35].main.temp + \" ºF\");\n $(\".fourHumidity\").text(\n \"Humidity: \" + response.list[35].main.humidity + \"%\"\n );\n });\n }", "title": "" }, { "docid": "1171b6f22805c0db3e659856f5610aa7", "score": "0.5687324", "text": "function weekForecast() {\n\t$.getJSON(\"http://api.openweathermap.org/data/2.5/forecast/daily?q=\" + winners[0].name + \"&appid=9b021461b994f10f96e2234841d14255&units=metric\", getData)\n}", "title": "" }, { "docid": "89347a1e7fa8fbfc19b935012bffc3c5", "score": "0.56859016", "text": "function forecastDays(forecastqueryUrl) {\n\n\n $(\"#forecast\").empty();\n $(\"#5DayForecast\").show();\n $(\"#forecast\").show();\n\n console.log(forecastqueryUrl);\n $.ajax({\n url: forecastqueryUrl,\n method: \"GET\"\n }).then(function (forecastresponse) {\n\n\n var forecast = forecastresponse.list;\n\n for (i = 0; i < forecast.length; i++) {\n\n if ((forecastresponse.list[i].dt_txt).substr(11, 8) == \"00:00:00\") { //because the values are updating every 3hrs\n\n var card = $(\"<div class='card text-white text-center bg-primary mb-10 p-2'>\");\n $(\"#forecast\").append(card);\n\n //date to display\n var date = (forecastresponse.list[i].dt_txt).substr(8, 2);\n var month = (forecastresponse.list[i].dt_txt).substr(5, 2);\n var year = (forecastresponse.list[i].dt_txt).substr(0, 4);\n var tempdate = $(\"<h5 class='card-title'>\").text(date + \"/\" + month + \"/\" + year);\n card.append(tempdate);\n\n //Image Icon\n var image = $(\"<img>\").attr(\"src\", \"https://openweathermap.org/img/wn/\"\n + forecastresponse.list[i].weather[0].icon + \".png\").width('100px').height('100px');\n card.append(image);\n\n //temperature \n var temp = $(\"<p class='card-text'>\").text(\"Temp:\" + forecastresponse.list[i].main.temp);\n card.append(temp);\n\n //humidity\n var humidity = $(\"<p class='card-text'>\").text(\"Humidity: \" + forecastresponse.list[i].main.humidity);\n card.append(humidity);\n }\n }\n });\n\n}", "title": "" }, { "docid": "7a5b51620f0224503f45d06ff5e6beb5", "score": "0.568387", "text": "function forecast(input) {\n let apiKey = \"cda0734d46f3ec29600ebac5178a0156\";\n let forecastURL = \"https://api.openweathermap.org/data/2.5/forecast?appid=\" + apiKey + \"&q=\" + input;\n\n $.ajax({\n url: forecastURL,\n method: \"GET\"\n \n }).then(function(response) {\n console.log(response);\n\n console.log(response.list[0].main.temp);\n console.log(response.list[0].main.humidity);\n\n $(\"#forecast-group\").text(\"\");\n\n // For loop to create the 5 day forecast cards and add response information\n for (let i = 0; i < 5; i++) {\n let weatherIcon = response.list[i].weather[0].icon;\n let iconLink = $(\"<img>\").attr(\"src\", \"https://openweathermap.org/img/wn/\" + weatherIcon + \".png\");\n\n // Formula to convert Kelvin into Fahrenheit\n let kelvinTemp = response.list[i].main.temp;\n let fahrenheitTemp = (kelvinTemp - 273.15) * 1.80 + 32;\n\n let forecastDivEl = $(\"<div>\");\n\n let forecastDateEl = $(\"<div>\").text(moment().add(i + 1, \"days\").format(\"l\"));\n let forecastTempEl = $(\"<div>\").html(\"Temp: \" + fahrenheitTemp.toFixed(2) + \" &deg;F\");\n let forecastHumidityEl = $(\"<div>\").text(\"Humidity: \" + response.list[i].main.humidity + \" %\");\n \n forecastDivEl.attr(\"class\", \"card forecast\");\n iconLink.attr(\"class\", \"forecast-icon\");\n\n $(\"#future-forecast\").text(\"5 Day Forecast:\");\n\n $(\"#forecast-group\").append(forecastDivEl);\n forecastDivEl.append(forecastDateEl);\n forecastDivEl.append(iconLink);\n forecastDivEl.append(forecastTempEl);\n forecastDivEl.append(forecastHumidityEl);\n }\n })\n }", "title": "" }, { "docid": "a398f32740b7c48b4c894008347e384f", "score": "0.56797254", "text": "function getFiveDay(cityName){\n var fiveDayURL = \"https://api.openweathermap.org/data/2.5/forecast?q=\" + cityName + \"&appid=7c116c195b43008fb23ae55ea85959a7&units=imperial\";\n\n // Ajax call to get five day forecast\n $.ajax({\n url: fiveDayURL,\n dataType: \"json\",\n method: \"GET\"\n }).then(function(response){\n console.log(response);\n $(\"#fiveday\").empty();\n // loop to create cards for each day\n for (var i = 4; i < response.list.length; i+=8){\n\n var colDiv = $(\"<div>\").addClass(\"col\");\n var card = $(\"<div>\").addClass(\"forecastCard, bg-primary\");\n\n var day = $(\"<h4>\").text(new Date(response.list[i].dt_txt).toLocaleDateString()).addClass(\"text-white\");\n var maxTemp = $(\"<p>\").text(\"Temp: \" + response.list[i].main.temp_max + \" F\").addClass(\"text-white\");\n var humid = $(\"<p>\").text(\"Humidity: \" + response.list[i].main.humidity + \" %\").addClass(\"text-white\");\n var forecastIcon = $(\"<img>\").addClass(\"forecast-image\").attr(\"src\", \"http://openweathermap.org/img/w/\" + response.list[i].weather[0].icon + \".png\");\n card.append(day, forecastIcon, maxTemp, humid);\n colDiv.append(card);\n $(\"#fiveday\").append(colDiv);\n \n }\n \n })\n }", "title": "" }, { "docid": "62a4a276224d3f81ff339b18249a356b", "score": "0.56337905", "text": "function getForecast(lat, lon) {\n\n // create second query url with coordinates\n var secondURL = `https://api.openweathermap.org/data/2.5/onecall?lat=${lat}&lon=${lon}&units=imperial&appid=${apiKey}`;\n\n $.ajax({\n url: secondURL,\n method: \"GET\"\n }).then(function (forecast) {\n\n // append line break\n weatherResults.append($(\"<br>\"));\n\n // create header\n var header = $(\"<h2>\").text(\"5-Day Forecast:\");\n weatherResults.append(header);\n\n for (var i = 1; i < 6; i++) {\n\n // create forecast cards\n var card = $(\"<div>\").addClass(\"card\");\n var cardBody = $(\"<div>\").addClass(\"card-body\");\n\n // create current date using memento\n var date = $(\"<p>\").html(`<strong>${moment().add(i, 'days').format(\"l\")}</strong>`);\n\n // create icon\n var icon = $(\"<img>\").attr(\"src\", `${iconURL}${forecast.daily[i].weather[0].icon}.png`);\n\n // create temperature\n var temp = $(\"<p>\").text(`Temp: ${forecast.daily[i].temp.day} °F`);\n\n // create humidity\n var humidity = $(\"<p>\").text(`Humidity: ${forecast.daily[i].humidity}%`)\n\n // append to forecast results div\n cardBody.append(date, icon, temp, humidity);\n card.append(cardBody);\n weatherResults.append(card);\n };\n\n // call get uv function using uv index\n getUV(forecast.current.uvi);\n });\n }", "title": "" }, { "docid": "295aa73bf9f090f6cc31a7c6a71dd52f", "score": "0.5582717", "text": "function dailyForcast(lat, lon) {\n var unit = mode();\n var dailyForecastQueryURL = `https://api.openweathermap.org/data/2.5/onecall?lat=${lat}&lon=${lon}&units=${unit}&appid=5dc02834735d933b05d5b154458369e8`;\n\n $.ajax({\n url: dailyForecastQueryURL,\n method: \"GET\"\n }).then(function (response) {\n $(\"#daily-forecast\").removeClass(\"hidden\");\n\n $(\".day\").each(function (index) {\n var nextDay = moment().add(index + 1, 'days').format().substring(0, 10);\n $(this).text(nextDay);\n });\n\n $(\".daily-icon\").each(function (index) {\n $(this).attr(\"src\", `https://openweathermap.org/img/wn/${response.daily[index + 1].weather[0].icon}@2x.png`);\n $(this).attr(\"alt\", response.daily[index + 1].weather[0].description);\n });\n\n $(\".daily-description\").each(function (index) {\n $(this).text(response.daily[index + 1].weather[0].description);\n });\n\n $(\".daily-temp-range\").each(function (index) {\n $(this).text(response.daily[index + 1].temp.min.toFixed(1) + tempSymbol + \" - \" + response.daily[index + 1].temp.max.toFixed(1) + tempSymbol);\n });\n });\n }", "title": "" }, { "docid": "2dc94ebad1b0481982faebc2fd2e248f", "score": "0.55813557", "text": "function getForeCast(request, city){\n \n if ((request.readyState == 4) && (request.status == 200)){\n \n var f=JSON.parse(request.responseText);\n\n ////Update to Make change changeCityValues(city, cityValues)\n var tempAve = f.current.temp_f;\n var humidity = f.current.humidity;\n var wind = f.current.wind_mph;\n var deltaTime= f.current.last_updated_epoch;\n\n var cityValues=[tempAve, humidity, wind, deltaTime];\n\n ///Changes City values when forecast is made\n changeCityValues(city, cityValues);\n\n ////Updates for Forecast below Table\n var timeString=f.forecast.forecastday[1].hour[8].time;\n var day=timeString.substring(0,timeString.length-6);\n var milTime=timeString.substring(timeString.length-6,timeString.length);\n\n var foreCastDay1=\"The forecast for tomorrow \" + day + \" at\" + milTime +\" is:\"; \n\n var foreCastDay2=\"It will be \" + f.forecast.forecastday[1].hour[8].condition.text + \". The temperature will be: \" + f.forecast.forecastday[1].hour[8].temp_f + \" f\";\n\n var foreCastDay3=\"The wind will be: \" + f.forecast.forecastday[1].hour[8].wind_mph + \" mph. In the direction of: \" + f.forecast.forecastday[1].hour[8].wind_dir;\n\n var foreCastDay4=\"The pressure will be: \" + f.forecast.forecastday[1].hour[8].pressure_in + \" in., The precipitation will be: \" + f.forecast.forecastday[1].hour[8].precip_in + \" in., And the humidity will be: \" + f.forecast.forecastday[1].hour[8].humidity + \"%\";\n\n var foreCastDay5=((f.forecast.forecastday[1].hour[8].will_it_rain == 0) ? \"No expected rain. \" : \"It will rain. \") + ((f.forecast.forecastday[1].hour[8].will_it_snow == 0) ? \"No expected snow. \" : \" It will snow.\") + \" The cloud percentage will be: \" + f.forecast.forecastday[1].hour[8].cloud + \"%\";\n\n var foreCastDay6=\"The temperature will feel like: \" + f.forecast.forecastday[1].hour[8].feelslike_f + \" f, With a windchill of: \" + f.forecast.forecastday[1].hour[8].windchill_f + \" f, With a heatindex of: \" + f.forecast.forecastday[1].hour[8].heatindex_f + \" f, and a dewpoint of \" + f.forecast.forecastday[1].hour[8].dewpoint_f + \" f.\";\n\n var timeString2=f.forecast.forecastday[1].hour[20].time;\n var day2=timeString2.substring(0,timeString2.length-6);\n var milTime2=timeString2.substring(timeString2.length-6,timeString2.length);\n\n var foreCastNight1=\"The forecast for tomorrow \" + day2 + \" at\" + milTime2 +\" is:\"; \n\n var foreCastNight2=\"It will be \" + f.forecast.forecastday[1].hour[20].condition.text + \". The temperature will be: \" + f.forecast.forecastday[1].hour[20].temp_f + \" f\";\n\n var foreCastNight3=\"The wind will be: \" + f.forecast.forecastday[1].hour[20].wind_mph + \" mph. In the direction of: \" + f.forecast.forecastday[1].hour[20].wind_dir;\n\n var foreCastNight4=\"The pressure will be: \" + f.forecast.forecastday[1].hour[20].pressure_in + \" in., The precipitation will be: \" + f.forecast.forecastday[1].hour[20].precip_in + \" in., And the humidity will be: \" + f.forecast.forecastday[1].hour[20].humidity + \"%\";\n\n var foreCastNight5=((f.forecast.forecastday[1].hour[8].will_it_rain == 0) ? \"No expected rain. \" : \"It will rain. \") + ((f.forecast.forecastday[1].hour[8].will_it_snow == 0) ? \"No expected snow. \" : \"It will snow.\") + \" The cloud percentage will be: \" + f.forecast.forecastday[1].hour[8].cloud + \"%\";\n\n var foreCastNight6=\"The temperature will feel like: \" + f.forecast.forecastday[1].hour[20].feelslike_f + \" f, With a windchill of: \" + f.forecast.forecastday[1].hour[20].windchill_f + \" f, With a heatindex of: \" + f.forecast.forecastday[1].hour[20].heatindex_f + \" f, and a dewpoint of \" + f.forecast.forecastday[1].hour[20].dewpoint_f + \" f.\";\n\n\n var dayArray = [foreCastDay1, foreCastDay2, foreCastDay3, foreCastDay4, foreCastDay5, foreCastDay6, foreCastNight1, foreCastNight2, foreCastNight3, foreCastNight4, foreCastNight5, foreCastNight6];\n\n var foreCastText=\"<h3>Day Time Forecast for \" + city + \" is: </h3>\"; \n\n for(var i=0; i < dayArray.length; i++){\n if(i==6){\n foreCastText=foreCastText.concat(\"<br><h3>Night Time Forecast for \" + city + \" is: </h3>\");\n }\n foreCastText=foreCastText.concat(\"<p>\" + dayArray[i] + \"</p>\");\n }\n\n document.getElementById(\"foreCastText\").innerHTML = foreCastText + \"<br>\";\n\n ////Gathers data for the Chart\n var hourlyTempValues=[];\n\n for(var i=0; i < 24; i++){\n hourlyTempValues.push([i,f.forecast.forecastday[1].hour[i].temp_f]);\n }\n\n return hourlyTempValues;\n }\n else if(request.status != 200){\n alert(\"Big Oppps, I would run far away quickly: \" + request.status);\n } \n}", "title": "" }, { "docid": "32ed0493a643e3f37cbc5caa4b698c35", "score": "0.5579268", "text": "function generateChartDataETH() {\n var data = [];\n var day = 0;\n var firstDate = new Date();\n var chartData = [];\n for (day = 0; day < 50; day++) {\n var newDate = new Date(firstDate);\n newDate.setDate(newDate.getDate() + day);\n\n chartData.push({\n \"date\": newDate,\n \"price\": [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,0,0]\n });\n }\n\n return chartData;\n}", "title": "" }, { "docid": "9149688d0fd23b1d2503016d4ee0c5c9", "score": "0.5564467", "text": "function displayForecast(data) {\n console.log(data);\n for (let value of [1, 2, 3, 4, 5]) {\n document.getElementById(`day_name${value}`).innerHTML = changeDate(value);\n document.getElementById(`day${value}`).innerHTML = data.list[value * 8 - 1].dt_txt.slice(0, 16);\n document.getElementById(`icon${value}`).src = `http://openweathermap.org/img/wn/${data.list[value*8-1].weather[0].icon}@2x.png`\n document.getElementById(`temp${value}`).innerHTML = Math.ceil(data.list[value * 8 - 1].main.temp) + '&deg;C';\n document.getElementById(`wind${value}`).innerHTML = `<img src=\"img/wind.svg\" alt=\"ikona wiatru\"> : ${data.list[value*8-1].wind.speed}km/h`;\n }\n }", "title": "" }, { "docid": "42d93cf2203da78fc212f0568e3ac37b", "score": "0.55505544", "text": "function forecast(response) {\n\n $.ajax({\n url: \"https://api.openweathermap.org/data/2.5/forecast?q=\" + cityName + \"&appid=6c813c85e9ba5137a719bf680b83be65&units=imperial\",\n method: \"GET\",\n })\n .then(function (response) {\n console.log(\"forecast\", response)\n // will console.log the 5 days but not put append them into the the div\n for (var i =0; i > response.list.length; i++){\n if (response.list[i].dt_txt.indexOf(\"15:00:00\")!==-1){\n\n\n\n\n\n\n var column = $(\"<div>\").addClass(\"col-md-2\")\n var card = $(\"<div>\").addClass(\"card bg-primary text-white\")\n var body = $(\"<div>\").addClass(\"card-body p-2\")\n var img = $(\"<img>\").attr(\"src\", \"http://openweathermap.org/img/w/\" + response.list[i].weather[0].icon + \".png\")\n var date = $(\"<h5>\").addClass(\"card-title\").text(new Date(response.list[i].dt_txt).toLocaleDateString())\n var p = $(\"<p>\").addClass(\"card-text\").text(\"Humidity: \" + response.list[i].main.humidity)\n var p2 = $(\"<p>\").addClass(\"card-text\").text(\"Temperature: \" + response.list[i].main.temp_max)\n column.append(card.append(body.append(date, img, p, p2)))\n $(\"#forecast .row\").append(column)\n }\n }\n });\n forecast();\n }", "title": "" }, { "docid": "9a853aece05933b27b1a63d9e2af3c9d", "score": "0.5550102", "text": "function displayForecast(response) {\n let forecastNextDay = document.querySelector(\"#forecast-next-day\");\n let forecast = response.data.list[7];\n console.log(forecast);\n\n forecastNextDay.innerHTML = `\n ${formatDateFiveDays(forecast.dt * 1000)}\n <br />\n <img src=\"http://openweathermap.org/img/wn/${\n forecast.weather[0].icon\n }@2x.png\"/>\n <br />\n <strong>${Math.round(forecast.main.temp_max)}°</strong>\n ${Math.round(forecast.main.temp_min)}°\n </div>`;\n\n // Rows at the bottom of the page will represent the remaining four days\n\n let forecastNextFourDays = document.querySelector(\"#forecast-next-four-days\");\n forecastNextFourDays.innerHTML = \"\";\n\n let forecastDayOne = response.data.list[15];\n forecastNextFourDays.innerHTML += `\n <div class=\"col col-lg-2\">\n ${formatDateFiveDays(forecastDayOne.dt * 1000)}\n <br />\n <img src=\"http://openweathermap.org/img/wn/${\n forecastDayOne.weather[0].icon\n }@2x.png\"/>\n </div>`;\n\n let forecastDayTwo = response.data.list[23];\n forecastNextFourDays.innerHTML += `\n <div class=\"col col-lg-2\">\n ${formatDateFiveDays(forecastDayTwo.dt * 1000)}\n <br />\n <img src=\"http://openweathermap.org/img/wn/${\n forecastDayTwo.weather[0].icon\n }@2x.png\"/>\n </div>`;\n\n let forecastDayThree = response.data.list[31];\n forecastNextFourDays.innerHTML += `\n <div class=\"col col-lg-2\">\n ${formatDateFiveDays(forecastDayThree.dt * 1000)}\n <br />\n <img src=\"http://openweathermap.org/img/wn/${\n forecastDayThree.weather[0].icon\n }@2x.png\"/>\n </div>`;\n\n let forecastDayFour = response.data.list[39];\n forecastNextFourDays.innerHTML += `\n <div class=\"col col-lg-2\">\n ${formatDateFiveDays(forecastDayFour.dt * 1000)}\n <br />\n <img src=\"http://openweathermap.org/img/wn/${\n forecastDayFour.weather[0].icon\n }@2x.png\"/>\n </div>`;\n}", "title": "" }, { "docid": "e6b2a848229d8e4042a48840bc145dbf", "score": "0.5550064", "text": "function prestonForecast(id) {\n const apiURL = \"https://api.openweathermap.org/data/2.5/forecast?id=\" + id + \"&units=imperial&APPID=96515e8b6f69b72205d859e040349332\";\nfetch(apiURL)\n .then((response) => response.json())\n .then((town) => {\n console.log(town);\n const townList = town.list;\n let counter = 0;\n for (let i = 0; i < townList.length; i++ ) {\n let day = townList[i].dt_txt;\n if (day.substr(11, 19) == '18:00:00') {\n counter++\n /*Get correct day for forecast*/\n /*Display as Month/Day*/\n const months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n let monthDate = parseInt((day[5] + day[6]) - 1);\n let date = day[8] + day[9];\n let month = months[monthDate];\n let fullDate = month + \" \" + date;\n let dateElement = 'date' + counter;\n document.getElementById(dateElement).innerHTML = fullDate;\n\n /*Get description*/\n let discriptionLower = townList[i].weather[0].description;\n let discription = discriptionLower.charAt(0).toUpperCase() + discriptionLower.slice(1);\n let discriptionElement = 'condition' + counter;\n document.getElementById(discriptionElement).innerHTML = discription;\n\n /*Get temp-max*/\n let temp = Math.round(townList[i].main.temp_max) + \" &#176;F\";\n let tempElement = 'day' + counter + '_weather';\n document.getElementById(tempElement).innerHTML = temp;\n\n /*Icon for weather*/\n const imagesrc = 'https://openweathermap.org/img/w/' + townList[i].weather[0].icon + '.png';\n let imageElement = 'weather_icon' + counter;\n document.getElementById(imageElement).setAttribute('src', imagesrc);\n document.getElementById(imageElement).setAttribute('alt', discription);\n windChill();\n }\n }\n });\n}", "title": "" }, { "docid": "5d8c3cadc9e38a639c254ced7d793563", "score": "0.55454683", "text": "function getNextFiveDays() {\n for (i = 0; i < 6; i++) {\n nextFiveDayDates[i] = moment().add(i, \"days\").format(\"M/DD/YYYY\");\n }\n document.getElementById(\"fivedaycarddate0\").innerHTML =\n \" \" + nextFiveDayDates[1];\n document.getElementById(\"fivedaycarddate1\").innerHTML =\n \" \" + nextFiveDayDates[2];\n document.getElementById(\"fivedaycarddate2\").innerHTML =\n \" \" + nextFiveDayDates[3];\n document.getElementById(\"fivedaycarddate3\").innerHTML =\n \" \" + nextFiveDayDates[4];\n document.getElementById(\"fivedaycarddate4\").innerHTML =\n \" \" + nextFiveDayDates[5];\n\n // write the current date to the Current City Search\n document.getElementById(\"current-date\").innerHTML =\n \"(\" + nextFiveDayDates[0] + \")\";\n}", "title": "" }, { "docid": "d79e2cdd6784f5d212fa742fab6bb277", "score": "0.55352473", "text": "function forecast() {\n $.ajax({\n url: \"https://cors-anywhere.herokuapp.com/api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&exclude=current,minutely,hourly&units=imperial&cnt=5&appid=b2d4239aa3e819b8680cdea4c57fe90d\",\n method: \"GET\"\n }).then(function (response) {\n // console.log the response\n console.log(\"5 day forecast \");\n console.log(response);\n\n console.log(\"resonse daily\");\n console.log(response.daily);\n\n // append title weekly forecast\n var h3 = $(\"<h3>Weekly Forecast</h3>\").addClass(\"row col-md-12\");\n\n // change the bg color\n $(\"#weeklyForecast\").append(h3);\n $(\"#weeklyForecast\").attr(\"style\",\"background-color: lightsteelblue;\")\n\n\n // run 5 times for forecast\n for (var i = 0; i < 5; i++) {\n\n console.log(response.daily[i].humidity);\n var humidity = response.daily[i].humidity\n var temp = response.daily[i].temp.day;\n var date = moment.unix(response.daily[i].dt).format('YYYY-MM-DD');\n var weatherIcon = response.daily[i].weather[0].icon;\n console.log(\"humidity\" + humidity);\n\n // create icon img tag and link with icon from object\n var icon = $(\"<img>\");//create icon var\n var iconUrl = \"http://openweathermap.org/img/w/\" + weatherIcon + \".png\";\n icon.attr(\"src\", iconUrl); //set src attribute for icon\n icon.attr(\"width\", \"50px\");\n icon.attr(\"height\", \"50px\");\n\n //create the cards that hold the daily forecasts\n var card = $(\"<div>\").addClass(\"card bg-primary text-white col-md-2\");\n var p1 = $(\"<p>\").addClass(\"card-text\").text(date);\n var p2 = $(\"<p>\").addClass(\"card-text\").text(\"Temp: \" + temp + \" °F\");\n var p3 = $(\"<p>\").addClass(\"card-text\").text(\"Humidity: \" + humidity + \" %\");\n $(\"#weeklyForecast \").append(card.append(p1, icon, p2, p3));\n\n }\n });\n }", "title": "" }, { "docid": "1e0ca50869fc0fef8ffea21ce9201546", "score": "0.551763", "text": "function forcast(){\n\n $.ajax({\n url:\"https://api.openweathermap.org/data/2.5/forecast?q=\"+cityName+\",us&mode=json&appid=\" + APIKey + \"&units=imperial\",\n method:\"GET\"\n }).then(function(response){\n console.log(\"5DAYS\", response);\n $(\"#date1\").append(currentDate);\n $(\"#Icon1\")\n $(\"Temp1\").append()\n })\n\n }", "title": "" }, { "docid": "c0e8239a677d36afc93bb088578810f9", "score": "0.5509004", "text": "function displayWeekForecast(data) {\n var latitude = data.coord.lat;\n var longitude = data.coord.lon;\n\n var cardDate0 = document.querySelector('.day-0-date');\n var cardIcon0 = document.querySelector('.day-0-icon');\n var cardTemp0 = document.querySelector('.day-0-temp');\n var cardHum0 = document.querySelector('.day-0-humidity');\n\n var cardDate1 = document.querySelector('.day-1-date');\n var cardIcon1 = document.querySelector('.day-1-icon');\n var cardTemp1 = document.querySelector('.day-1-temp');\n var cardHum1 = document.querySelector('.day-1-humidity');\n\n var cardDate2 = document.querySelector('.day-2-date');\n var cardIcon2 = document.querySelector('.day-2-icon');\n var cardTemp2 = document.querySelector('.day-2-temp');\n var cardHum2 = document.querySelector('.day-2-humidity');\n\n var cardDate3 = document.querySelector('.day-3-date');\n var cardIcon3 = document.querySelector('.day-3-icon');\n var cardTemp3 = document.querySelector('.day-3-temp');\n var cardHum3 = document.querySelector('.day-3-humidity');\n\n var cardDate4 = document.querySelector('.day-4-date');\n var cardIcon4 = document.querySelector('.day-4-icon');\n var cardTemp4 = document.querySelector('.day-4-temp');\n var cardHum4 = document.querySelector('.day-4-humidity');\n\n var cardDate5 = document.querySelector('.day-5-date');\n var cardIcon5 = document.querySelector('.day-5-icon');\n var cardTemp5 = document.querySelector('.day-5-temp');\n var cardHum5 = document.querySelector('.day-5-humidity');\n\n var cardDate6 = document.querySelector('.day-6-date');\n var cardIcon6 = document.querySelector('.day-6-icon');\n var cardTemp6 = document.querySelector('.day-6-temp');\n var cardHum6 = document.querySelector('.day-6-humidity');\n\n var cardDate7 = document.querySelector('.day-7-date');\n var cardIcon7 = document.querySelector('.day-7-icon');\n var cardTemp7 = document.querySelector('.day-7-temp');\n var cardHum7 = document.querySelector('.day-7-humidity');\n\n // Fetches the 8-Day forecast and populates the HTML to the cooresponding cards\n fetch(`https://api.openweathermap.org/data/2.5/onecall?lat=${latitude}&lon=${longitude}&exclude=current,hourly,minutely,alerts&units=imperial&appid=${weatherAPIKey}`)\n .then(response => response.json())\n .then(data => {\n\n //Current Day\n var tempValue0 = data.daily[0].temp.day;\n var humidValue0 = data.daily[0].humidity;\n cardDate0.innerHTML = moment.unix(data.daily[0].dt).format(\"M/DD/YYYY\");\n cardIcon0.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[0].weather[0].icon}@2x.png\">`;\n cardTemp0.innerHTML = `Temperature:<br> ${tempValue0} °F`;\n cardHum0.innerHTML = `Humidity:<br> ${humidValue0}%`;\n\n //Day One\n var tempValue1 = data.daily[1].temp.day;\n var humidValue1 = data.daily[1].humidity;\n cardDate1.innerHTML = moment.unix(data.daily[1].dt).format(\"M/DD/YYYY\");\n cardIcon1.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[1].weather[0].icon}@2x.png\">`;\n cardTemp1.innerHTML = `Temperature: ${tempValue1} °F`;\n cardHum1.innerHTML = `Humidity: ${humidValue1}%`;\n\n //Day Two\n var tempValue2 = data.daily[2].temp.day;\n var humidValue2 = data.daily[2].humidity;\n cardDate2.innerHTML = moment.unix(data.daily[2].dt).format(\"M/DD/YYYY\");\n cardIcon2.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[2].weather[0].icon}@2x.png\">`;\n cardTemp2.innerHTML = `Temperature: ${tempValue2} °F`;\n cardHum2.innerHTML = `Humidity: ${humidValue2}%`;\n\n //Day Three\n var tempValue3 = data.daily[3].temp.day;\n var humidValue3 = data.daily[3].humidity;\n cardDate3.innerHTML = moment.unix(data.daily[3].dt).format(\"M/DD/YYYY\");\n cardIcon3.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[3].weather[0].icon}@2x.png\">`;\n cardTemp3.innerHTML = `Temperature: ${tempValue3} °F`;\n cardHum3.innerHTML = `Humidity: ${humidValue3}%`;\n\n //Day Four\n var tempValue4 = data.daily[4].temp.day;\n var humidValue4 = data.daily[4].humidity;\n cardDate4.innerHTML = moment.unix(data.daily[4].dt).format(\"M/DD/YYYY\");\n cardIcon4.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[4].weather[0].icon}@2x.png\">`;\n cardTemp4.innerHTML = `Temperature: ${tempValue4} °F`;\n cardHum4.innerHTML = `Humidity: ${humidValue4}%`;\n\n //Day Five\n var tempValue5 = data.daily[5].temp.day;\n var humidValue5 = data.daily[5].humidity;\n cardDate5.innerHTML = moment.unix(data.daily[5].dt).format(\"M/DD/YYYY\");\n cardIcon5.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[5].weather[0].icon}@2x.png\">`;\n cardTemp5.innerHTML = `Temperature: ${tempValue5} °F`;\n cardHum5.innerHTML = `Humidity: ${humidValue5}%`;\n\n //Day Six\n var tempValue6 = data.daily[6].temp.day;\n var humidValue6 = data.daily[6].humidity;\n cardDate6.innerHTML = moment.unix(data.daily[6].dt).format(\"M/DD/YYYY\");\n cardIcon6.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[6].weather[0].icon}@2x.png\">`;\n cardTemp6.innerHTML = `Temperature: ${tempValue6} °F`;\n cardHum6.innerHTML = `Humidity: ${humidValue6}%`;\n\n //Day Seven\n var tempValue7 = data.daily[7].temp.day;\n var humidValue7 = data.daily[7].humidity;\n cardDate7.innerHTML = moment.unix(data.daily[7].dt).format(\"M/DD/YYYY\");\n cardIcon7.innerHTML = `<img src=\"https://openweathermap.org/img/wn/${data.daily[7].weather[0].icon}@2x.png\">`;\n cardTemp7.innerHTML = `Temperature: ${tempValue7} °F`;\n cardHum7.innerHTML = `Humidity: ${humidValue7}%`;\n });\n\n}", "title": "" }, { "docid": "a0566e0778f915fbdce0fc2868c9b83c", "score": "0.5502504", "text": "function showForecast(cityName) {\n var queryURL2 =\n \"https://api.openweathermap.org/data/2.5/forecast?q=\" +\n cityName +\n \"&units=imperial\" +\n \"&appid=\" +\n APIKey;\n\n // call for forecast\n $.ajax({\n url: queryURL2,\n method: \"GET\",\n }).then(function (response2) {\n console.log(response2);\n var forecast = response2.list;\n console.log(forecast);\n\n var indexes = [8, 16, 24, 32, 39];\n for (let i = 0; i < 5; i++) {\n var date = moment.unix(forecast[indexes[i]].dt).format(\"dddd, MM/DD/YYYY\");\n var temp = forecast[indexes[i]].main.temp_max;\n var tempm = forecast[indexes[i]].main.temp_min;\n var hum = forecast[indexes[i]].main.humidity;\n console.log(date);\n $(\".day\" + (i + 1)).html(date);\n $(\".temp\" + (i + 1)).html(\"Temp: \" + temp + \" deg\");\n $(\".tempM1\" + (i + 1)).html(\"Temp: \" + tempm + \" deg\");\n $(\".hum\" + (i + 1)).html(\"Humidity: \" + hum + \"%\");\n }\n });\n}", "title": "" }, { "docid": "2d742b9f715624a9caafd84d2256d021", "score": "0.54916525", "text": "function giveWeather(value){ \r\n var date = new Date()\r\n var viewday = 29 - value;\r\n date.setDate(date.getDate() - viewday); \r\n thirtydays = date.simpleDateString(); \r\n document.getElementById(\"message\").innerHTML = thirtydays;\r\n locationWeatherCache.achieveWeatherInfoAtIndexForDate(locationList,thirtydays,weatherData);\r\n}", "title": "" }, { "docid": "6f533c2b90c799d976ed33fe2f90f814", "score": "0.5489415", "text": "function get5DayForecast(cityid) {\n\nvar forecastURLweather = 'https://api.openweathermap.org/data/2.5/forecast?id=' + cityid + '&appid=c7d023f4cea5310b318c2e583321df8a&units=imperial'; \n\nvar forecastRequest = new XMLHttpRequest();\nforecastRequest.open('Get', forecastURLweather, true);\n\nforecastRequest.responseType = 'json';\nforecastRequest.send();\n\nforecastRequest.onload = function() {\n var forecastData = forecastRequest.response;\n populateForecast(forecastData); } /* Calls the function that will write all content into the city pages */\n}", "title": "" }, { "docid": "898d1476d3bad33ce5a9dbef594eee22", "score": "0.5481221", "text": "function forecastWeather(lat, lon) {\n let queryURL =\n \"https://api.openweathermap.org/data/2.5/onecall?units=imperial&lat=\" +\n lat +\n \"&lon=\" +\n lon +\n \"&exclude=current,minutely,hourly,alerts&appid=\" +\n apiKey;\n\n $.ajax({\n url: queryURL,\n method: \"GET\",\n }).then(function (response) {\n forecastEl.empty();\n\n // 5 day forecast (daily array 0:8 is 7 day forecast)\n //create card for each day in the forecast\n for (let j = 1; j < 6; j++) {\n let card = $(\"<div>\").addClass(\n \"card col-md-2 bg-primary text-white my-2\"\n );\n // forecast date\n let dateString = new Date(response.daily[j].dt * 1000);\n dateString = dateString.toLocaleDateString();\n let forecastDate = $(\"<h5>\").text(dateString);\n \n let forecastIcon = $(\"<img>\").attr(\n \"src\",\n iconURL(response.daily[j].weather[0].icon)\n );\n\n forecastIcon.attr(\"alt\", response.daily[j].weather[0].description);\n let forecastTemp = $(\"<p>\").text(\n \"Temp: \" + Math.round(response.daily[j].temp.max) + \" °F\"\n );\n let forecastHumidity = $(\"<p>\").text(\n \"Humidity: \" + Math.round(response.daily[j].humidity) + \" %\"\n );\n card.append(forecastDate, forecastIcon, forecastTemp, forecastHumidity);\n forecastEl.append(card);\n }\n });\n }", "title": "" }, { "docid": "177f5df6b4da39f0d9db8e892545201e", "score": "0.5474976", "text": "function runAPICall(name) {\n var url;\n // Is days the current day ?\n if(days == 0)\n {\n url = \"http://api.openweathermap.org/data/2.5/weather?q=\" + name + \"&units=metric&APPID=\"+apiKey;\n }\n // Are we checking in the future ? API is different !\n else\n {\n // cnt is a return limit parameter for the API (number of meteo future infos)\n var cnt = 0;\n if (days >=1)\n {\n cnt+= 8 * days;\n }\n url = \"http://api.openweathermap.org/data/2.5/forecast?q=\" + name + \"&cnt=\" + cnt + \"&units=metric&APPID=\"+apiKey;\n }\n console.log(url);\n $.getJSON( url, function( data ) {\n // Set common variables\n var weather;\n var wind;\n var temp;\n var coord;\n var date;\n // Set values depending of the API used\n if(days == 0)\n {\n weather = data.weather[0];\n wind = data.wind;\n temp = data.main.temp;\n coord = data.coord;\n date = data.dt;\n }\n else\n {\n weather = data.list[data.list.length-1].weather[0];\n wind = data.list[data.list.length-1].wind;\n temp = data.list[data.list.length-1].main.temp;\n coord = data.city.coord;\n date = data.list[data.list.length-1].dt;\n }\n \n // To uncomment if random temperatures needed\n //temp = Math.floor((Math.random() * 28) + -10);\n \n // Generate and set date from API data generation timestamp\n var d = new Date(date*1000);\n var dateStr = jours[d.getDay()] + \" \" + d.getDate() + \"-\" + (d.getMonth()+1) + \"-\" + d.getFullYear() + \" \" + d.getHours() + \":\" + d.getMinutes();\n $('#dateLabel').text(dateStr);\n \n // Set base x y and z values for 3D objects (using geoToLocal)\n y = Math.floor((Math.random() * 4) + 2); \n z = -geoToLocal(coord.lat, 43.99, 46.0, -10, 10);\n x = -geoToLocal(coord.lon, 7.0, 5.0, -10, 10);\n \n // Meteo Generation depending off weather\n if(weather.main == \"Rain\" || weather.main == \"Drizzle\")\n {\n generateBlackCloud(x, y, z);\n generateRain(x, y, z); \n }\n else if(weather.main == \"Clouds\" || weather.main == \"Mist\")\n {\n generateCloud(x, y, z);\n }\n else if(weather.main == \"Snow\")\n {\n generateSnow(x, y, z);\n generateCloud(x, y, z);\n }\n else\n {\n generateSun(x, y, z); \n }\n \n // Wind Arrows\n generateWind(x, y+6, z, wind.speed, wind.deg);\n \n // Text Material is based on temp\n var material = new THREE.MultiMaterial( [\n new THREE.MeshBasicMaterial( { color: temperatureHex(temp), overdraw: 0.5 } ),\n new THREE.MeshBasicMaterial( { color: 0x000000, overdraw: 0.5 } )\n ] );\n \n // City Name\n var geometry = new THREE.TextGeometry( name, {\n font: font,\n size: 0.3,\n height: 0,\n curveSegments: 0\n });\n geometry.computeBoundingBox();\n var centerOffset = -0.5 * ( geometry.boundingBox.max.x - geometry.boundingBox.min.x );\n var mesh = new THREE.Mesh( geometry, material );\n mesh.position.set(x+centerOffset,y+2.2,z);\n \n // Temperature\n \n var geometry2 = new THREE.TextGeometry( temp + \" C\", {\n font: font,\n size: 0.25,\n height: 0,\n curveSegments: 0\n });\n geometry2.computeBoundingBox();\n var centerOffset2 = -0.5 * ( geometry2.boundingBox.max.x - geometry2.boundingBox.min.x );\n var mesh2 = new THREE.Mesh( geometry2, material );\n mesh2.position.set(x+centerOffset2,y+1.6,z);\n \n // Adding City and Temperature Texts to scene\n texts.push(mesh);\n scene.add(mesh);\n texts.push(mesh2);\n scene.add(mesh2);\n \n // call treatment ending\n treatedCalls+= 1;\n // check if particles can be added\n addParticles();\n });\n}", "title": "" }, { "docid": "92307c6f3723b5ecd09d9def9ce190f5", "score": "0.54686356", "text": "function loadForecast(result) {\n\n // Loads the current weather UV index\n addUV(result.current.uvi);\n\n // Cycles through the next 5 days\n for (let future = 1; future <= 5; future++) {\n let forecast = result.daily[future - 1];\n id_string = `#day_plus_${future}`;\n let card = document.querySelector(id_string);\n\n // Adds the weather icon for the date\n card.querySelector(\".card-icon\").setAttribute(\"src\", `https://openweathermap.org/img/wn/${forecast.weather[0].icon}@2x.png`);\n card.querySelector(\".card-icon\").setAttribute(\"title\", forecast.weather[0].description);\n card.querySelector(\".card-icon\").setAttribute(\"alt\", forecast.weather[0].description);\n\n // Sets the temperature for the day\n card.querySelector(\".card-temp\").innerHTML = `Temp: ${getTemp(forecast.temp.max)} (low ${getTemp(forecast.temp.min, true)})`;\n\n // Adds the humidity for the day\n card.querySelector(\".card-humidity\").innerHTML = `Humidity: ${forecast.humidity} %`;\n }\n}", "title": "" }, { "docid": "299705bc09814fe0e153dcaf455fa1be", "score": "0.5450486", "text": "function Weather(day){\n this.forecast = day.summary;\n this.time = new Date(day.time*1000).toString().slice(0,15);\n}", "title": "" }, { "docid": "bc10b1e6bfa7fd52b9888c906cc6f706", "score": "0.5445528", "text": "updateWeather(city, country, dataToday, data5Day){\n if(city && country){//check if input exists from form\n if(dataToday.main){ //if successful api call, start filling objects to push to forecast JS\n let dateDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n let next5Days = [];\n let week5Days = [];\n let temp5Days = [];\n let weather5Days = [];\n let desc5Days = [];\n //need to get date when checking for future dates on 5day forecast\n let now = new Date();\n let today = now.getFullYear()+'-'+(now.getMonth()+1)+'-'+(now.getDate());\n //marks if todays date already found when searching object\n let todayNotFound = true;\n let futureDaysFound = 0;\n\n for(let i=0; i<data5Day.list.length;i++){\n //break loop if found 5 dates\n if(futureDaysFound === 5){\n break;\n }\n if(i < 5){\n //check if 5day forecast returns todays date or tomorrows date first\n if(data5Day.list[i].dt_txt.startsWith(today) && todayNotFound){\n week5Days.push(dateDays[now.getDay()])\n next5Days.push(today);\n todayNotFound = false;\n }\n else{\n let next = new Date(now);\n next.setDate(now.getDate()+(i+1));\n let tomorrow = next.getFullYear()+'-'+(next.getMonth()+1)+'-'+(next.getDate());\n week5Days.push(dateDays[next.getDay()])\n next5Days.push(tomorrow);\n }\n }\n //take found day and get weather info from corresponding JSON string\n if(data5Day.list[i].dt_txt.startsWith(next5Days[futureDaysFound])){\n temp5Days.push(data5Day.list[i].main.temp);\n weather5Days.push(data5Day.list[i].weather[0].icon);\n desc5Days.push(data5Day.list[i].weather[0].description);\n futureDaysFound++;\n }\n }\n //set state of component to hold found weather data\n this.setState({\n temperature: dataToday.main.temp,\n humidity: dataToday.main.humidity,\n pressure: dataToday.main.pressure,\n windspeed: dataToday.wind.speed,\n city: dataToday.name,\n country: dataToday.sys.country,\n weather: dataToday.weather[0].icon,\n description: dataToday.weather[0].description,\n day: week5Days,\n dayTemperature: temp5Days,\n dayWeather: weather5Days,\n dayDescription: desc5Days,\n status: ' ',\n });\n }\n else{ //if cannot find city, empty state\n this.setState({\n temperature: null,\n humidity: null,\n pressure: null,\n windspeed: null,\n city: null,\n country: null,\n weather: null,\n description: null,\n day: [],\n dayTemperature: [],\n dayWeather: [],\n dayDescription: [],\n status: 'City could not be found',\n });\n }\n }\n else { //if values missing from form, empty state\n this.setState({\n temperature: null,\n humidity: null,\n pressure: null,\n windspeed: null,\n city: null,\n country: null,\n weather: null,\n description: null,\n day: [],\n dayTemperature: [],\n dayWeather: [],\n dayDescription: [],\n status: 'All values not entered',\n });\n }\n }", "title": "" }, { "docid": "4940be32e4128dbc378fd130848afb6d", "score": "0.5429234", "text": "pollutionsForDay(daysAhead) {\n const currentDayOfWeek = new Date().getDay();\n return this.state.forecastPollutionData.list.filter((weather) => {\n const timestamp = new Date(weather.dt * 1000);\n const dayOfWeek = timestamp.getDay();\n return dayOfWeek === (currentDayOfWeek + daysAhead) % 7;\n });\n }", "title": "" }, { "docid": "88bd52b345adaa06a377ba69ef1ce1c9", "score": "0.54237545", "text": "function buildFiveDayForecast () {\n\n var fiveDayURL = \"https://api.openweathermap.org/data/2.5/forecast?q=\" + inputCity + \"&appid=\" + APIKey;\n \n\n //get the 5 day forecast, and build 5 different cards\n $.ajax({\n url: fiveDayURL,\n method: \"GET\"\n }).then(function(fiveDaysWeather) {\n console.log(fiveDaysWeather);\n $(\"#fivedaywords\").empty();\n $(\"#fivedaysection\").empty(); \n \n $(\"#fivedaywords\").text(\"5-Day Forecast\");\n\n \n var element3PMFirstAppears = 0;\n for (i = 0; i < 8; i++) {\n if (fiveDaysWeather.list[i].dt_txt.includes(\"15:00:00\")) {\n element3PMFirstAppears = i;\n break;\n }\n }\n \n //Get the 3pm element every day for the next 5 days\n for (i = element3PMFirstAppears; i < 40; i+=8) {\n var sectionNbr = \"#section\" + i;\n var newSection = $(\"<section>\",{class: \"col-lg-2\", id: sectionNbr}); \n var newCard = $(\"<div>\").addClass(\"card bg-primary text-white\"); \n var newDiv = $(\"<div>\").addClass(\"card-body\");\n var newH5 = $(\"<h5>\",{class: \"card-title\", text: moment(fiveDaysWeather.list[i].dt_txt).format('MM/DD/YYYY')});\n //Iclude weather icon to the card\n var icon =fiveDaysWeather.list[i].weather[0].icon;\n var iconURL = \"https://openweathermap.org/img/wn/\" + icon + \".png\"\n var newI = $(\"<img>\").attr(\"src\", iconURL); \n //get temp and humidity reading\n var tempFromKelvin = (fiveDaysWeather.list[i].main.temp - 273.15) * 1.80 + 32\n var newP1 = $(\"<p>\",{class: \"card-text\", text: \"Temp: \" + tempFromKelvin.toFixed(1) + \" °F\"}); // alt 0 1 7 6\n var newP2 = $(\"<p>\",{class: \"card-text\", text: \"Humidity: \" + fiveDaysWeather.list[i].main.humidity +\"%\"});\n newDiv.append(newH5, newI, newP1, newP2);\n $(newCard).append(newDiv);\n $(newSection).append(newCard);\n $(\"#fivedaysection\").append(newSection);\n } \n\n });\n\n\n }", "title": "" }, { "docid": "3e62573ad267d1e339a30abcc107644e", "score": "0.5422747", "text": "function forecast (){\n for (i=1; i<=5; i++){\n $('#fore'+i).hide().html(pullForecast(i)[0]).show();\n if(localStorage.metimp == \"imperial\"){\n $('#max'+i).hide().html(Math.round(toF(pullForecast(i)[1])*10)/10).show();\n $('#min'+i).hide().html(Math.round(toF(pullForecast(i)[2])*10)/10).show();\n }else if(localStorage.metimp == \"metric\"){\n $('#max'+i).hide().html(pullForecast(i)[1]).show();\n $('#min'+i).hide().html(pullForecast(i)[2]).show();\n }\n $('#cond'+i).hide().html(pullForecast(i)[3]).show();\n }\n }", "title": "" }, { "docid": "3e62573ad267d1e339a30abcc107644e", "score": "0.5422747", "text": "function forecast (){\n for (i=1; i<=5; i++){\n $('#fore'+i).hide().html(pullForecast(i)[0]).show();\n if(localStorage.metimp == \"imperial\"){\n $('#max'+i).hide().html(Math.round(toF(pullForecast(i)[1])*10)/10).show();\n $('#min'+i).hide().html(Math.round(toF(pullForecast(i)[2])*10)/10).show();\n }else if(localStorage.metimp == \"metric\"){\n $('#max'+i).hide().html(pullForecast(i)[1]).show();\n $('#min'+i).hide().html(pullForecast(i)[2]).show();\n }\n $('#cond'+i).hide().html(pullForecast(i)[3]).show();\n }\n }", "title": "" }, { "docid": "e75afef05e81bcf610a6d685b02b0caf", "score": "0.5418351", "text": "function forecast (){\n for (i=1; i<=5; i++){\n $('#fore'+i).hide().html(pullForecast(i)[0]).show();\n if(localStorage.metimp == \"imperial\"){\n $('#max'+i).hide().html(Math.round(toF(pullForecast(i)[1])*10)/10).show();\n $('#min'+i).hide().html(Math.round(toF(pullForecast(i)[2])*10)/10).show();\n }else if(localStorage.metimp == \"metric\"){\n $('#max'+i).hide().html(pullForecast(i)[1]).show();\n $('#min'+i).hide().html(pullForecast(i)[2]).show();\n }\n $('#cond'+i).hide().html(pullForecast(i)[3]).show();\n }\n }", "title": "" }, { "docid": "bbbc808bac22f13910e5c262c25ee325", "score": "0.5403597", "text": "function getSummaryForecast(forecastList) { \n // Map for storing high, low, weather\n const forecast = [];\n \n // Determine high and low for each day\n forecastList.forEach(function (item) {\n // Extract just the yyyy-mm-dd \n const date = item.dt_txt.substr(0, 10);\n \n // Extract temperature\n const temp = item.main.temp;\n\n // Have this date been seen before?\n if (date in forecast) { \n // Determine if the temperature is a new low or high\n if (temp < forecast[date].low) {\n forecast[date].low = temp;\n }\n if (temp > forecast[date].high) {\n forecast[date].high = temp;\n }\n }\n else {\n // Initialize new forecast\n const temps = {\n high: temp,\n low: temp,\n weather: item.weather[0].main\n } \n \n // Add entry to map \n forecast[date] = temps;\n }\n });\n \n return forecast;\n}", "title": "" }, { "docid": "f38fc284083d8669ff2fe2f4f67c3d66", "score": "0.5385425", "text": "function createDataObject(data){\n days = []\n let currentDay = null\n let currentTime = getTime(data.list[0].dt_txt)\n\n data.list.forEach((el)=>{\n\n let convertedDate = convertToDay(el.dt_txt)\n\n if( currentDay !== convertedDate && currentTime === getTime(el.dt_txt) ){\n currentDay = convertedDate \n days.push(el)\n }\n\n })\n if(days.length === 6){\n days.pop(5)\n }\n}", "title": "" }, { "docid": "bcccfaad3607f5978be614a040411d3e", "score": "0.538522", "text": "function daily() {\n var msg = \"Daily Value\\n\" + getMonster();\n post(msg);\n}", "title": "" }, { "docid": "9687cd14c76c334aec4688a9fbe42a19", "score": "0.53836167", "text": "function fiveDayForecast(newSearch) {\n fetch(newSearch)\n .then(function (response) {\n return response.json();\n })\n .then(function (data) {\n console.log(newSearch);\n dataObj = data;\n console.log(dataObj);\n let uvIndex = dataObj.current.uvi;\n for (var i = 1; i < dataObj.daily.length - 2; i++) {\n console.log(dataObj.daily.length);\n var fiveDayCard = document.createElement('div');\n fiveDayCard.classList.add('col-2', 'card', 'fiveDayCard');\n fiveDayCard.style.marginLeft = '25px';\n var fiveDayBody = document.createElement('div');\n fiveDayBody.classList.add('card-body');\n var fiveDayList = document.createElement('ul');\n fiveDayList.style.listStyle = 'none'\n fiveDayList.style.paddingLeft = '0px'\n\n var dateEl = document.createElement('h5');\n dateEl.textContent = moment.unix(dataObj.daily[i].dt).format(\"MM/DD/YYYY\");\n\n var weatherIcon = document.createElement(\"img\");\n var iconcode = data.daily[i].weather[0].icon;\n var iconurl = \"http://openweathermap.org/img/w/\" + iconcode + \".png\";\n weatherIcon.setAttribute('src', iconurl);\n\n var fiveDayTemp = document.createElement('li');\n fiveDayTemp.textContent = \"Temp: \" + dataObj.daily[i].temp.day + \" °F\";\n\n var fiveDayWind = document.createElement('li');\n fiveDayWind.textContent = \"Wind: \" + dataObj.daily[i].wind_speed + \" MPH\";\n\n var fiveDayHumidity = document.createElement('li');\n fiveDayHumidity.textContent = \"Humidity: \" + dataObj.daily[i].humidity + \"%\";\n\n fiveDayList.append(fiveDayTemp, fiveDayWind, fiveDayHumidity);\n fiveDayBody.append(dateEl, weatherIcon, fiveDayList);\n fiveDayCard.append(fiveDayBody);\n fiveDayContainer.append(fiveDayCard);\n // currently prints the 5-day weather forecast twice with repeat searches. Definitely something to handle in the refactor\n\n }\n // way to display the uv content\n uvIndex.textContent = data.current.uvi;\n $('#uvIndex').html(`UV Index: <span id=\"uvVal\"> ${uvIndex}</span>`);\n if (uvIndex >= 0 && uvIndex < 3) {\n $('#uvVal').attr(\"class\", \"uv-favorable\");\n } else if (uvIndex >= 3 && uvIndex < 8) {\n $('#uvVal').attr(\"class\", \"uv-moderate\");\n } else if (uvIndex >= 8) {\n $('#uvVal').attr(\"class\", \"uv-severe\");\n }\n\n\n });\n}", "title": "" } ]
170336594391bd22b40ca4d993966427
Creating a new record
[ { "docid": "c20954b6cdfe19df0d575df5639bf75c", "score": "0.67583", "text": "async createNewRecord(newRecord) {\n const prevRecords = await this.getAll();\n newRecord.id = crypto.randomBytes(4).toString(\"hex\");\n const updatedRecords = [...prevRecords, newRecord];\n\n await fs.promises.writeFile(\n this.file,\n JSON.stringify(updatedRecords, null, 2)\n );\n return newRecord;\n }", "title": "" } ]
[ { "docid": "831237bb8df84af5a0046e2c915bb072", "score": "0.7415547", "text": "create(data) {\n\t\tconst record = new this.model(data);\n\t\treturn record.save()\n\t\t\t.then( (record) => {\n\t\t\t\treturn record;\n\t\t\t})\n\t\t\t.catch( (error) => {\n\t\t\t\treturn error;\n\t\t\t});\n\t}", "title": "" }, { "docid": "b7cd5d6e7489927be0b307d954e28d40", "score": "0.7186967", "text": "function newRecord() {\n\t\tvar num = Math.round(Math.random() * 10000); // random data\n\t\tdb.transaction(function(tx) {tx.executeSql(\n\t\t\t\"INSERT INTO Table1Test (id, text) VALUES (?, ?)\",\n\t\t\t[num, document.querySelector('#wdb-todoitem').value ],\n\t\t\tfunction(tx, result) {\n\t\t\t\tlog.innerHTML = '';\n\t\t\t\tshowRecords();\n\t\t\t}, onError);\n\t\t});\n\t}", "title": "" }, { "docid": "84b6463884a53d12da9c5d008586f2f0", "score": "0.69805354", "text": "function addRecord() {\n protectName = false;\n protectEmail = false;\n protectType = false;\n protectText = false;\n name = '';\n email = '';\n type = '';\n text = '';\n display.details.execute();\n if (btnCancel) return;\n if (recordExists(name)) {\n displayMessage(\"Record for \" + key_name + \" already exists.\");\n return;\n }\n pjs.query(\"INSERT INTO nodepf1 SET ?\", {\n name: name, email: email, type:type, text:text\n });\n }", "title": "" }, { "docid": "1223e2db3182676f5c149a9d6a868725", "score": "0.6877348", "text": "function create(args, context) {\n\n // Extract person values from context.req.body\n resource = context.req.body;\n\n lastName = resource.name[0].family;\n firstName = resource.name[0].given[0];\n secondName = resource.name[0].given[1];\n birthDate = resource.birthDate;\n gender = resource.gender;\n email = resource.telecom[0].value;\n nickname = resource.name[1].given[0];\n createdAt = new Date().toISOString()\n updatedAt = \" \"\n\n // Match value to keys(columnNames)\n let columnNames = '\"PRSN_FIRST_NAME\",\"PRSN_SECOND_NAME\",\"PRSN_LAST_NAME\",\"PRSN_BIRTH_DATE\", \"PRSN_GENDER\",\"PRSN_EMAIL\",\"PRSN_NICK_NAME\",\"PRSN_CREATE_DATE\"'\n\n let personValues = `firstName,secondName,lastName,birthDate,gender,email,nickname,createdAt`\n\n const db = new Database('./persondb.db', { verbose: console.log })\n\n const stmt = db.prepare(`INSERT INTO PERSON (${columnNames}) VALUES (?, ?, ?, ?, ?, ?, ?,?)`);\n const info = stmt.run(personValues);\n\n // info.lastInsertRowid: the rowid of the last row inserted\n let newId = info.lastInsertRowId\n //This is the new resource id (server assigned)\n personId = newId\n resource.identifier.forEach((identifier) => {\n return createOnePersonDocRecord(personId,identifier)\n })\n\n db.close();\n}", "title": "" }, { "docid": "4efc0a0ff9e4762a218a5a1b231b8dfb", "score": "0.6781765", "text": "function create() {\n model.setData(currentRow);\n return model.insert();\n }", "title": "" }, { "docid": "cae8caf2577797ea1ed23a4458375a16", "score": "0.67603385", "text": "static create(obj){\n var student = new Student(obj);\n return student.save();\n}", "title": "" }, { "docid": "90895225cb55e22eb771275b78384065", "score": "0.6751795", "text": "create() {\n let now = new Date();\n this.set('_created', now.value);\n this.save();\n }", "title": "" }, { "docid": "ef1fb3dc00110990b8bc11d2f6f6e922", "score": "0.66654336", "text": "function createFinanceAllocateRecord(cust_id, zee_id, zee_name, service_id, service_type_id, priceIncreaseAmount, date_eff, service_chg_id, comm_reg_id) {\n var financeAlloc = record.create({\n type: 'customrecord_spc_finance_alloc',\n isDynamic: true\n });\n financeAlloc.setValue({ fieldId: \"name\", value: zee_name, label: \"Name\" }),\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_fin_zee\", value: zee_id, label: \"Franchisee\"});\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_fin_cust_id\", value: cust_id, label: \"Customer ID\"});\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_fin_date_eff\", value: date_eff, label: \"Date Effective\"});\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_fin_serv\", value: service_id, label: \"Service ID\"});\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_fin_serv_type_id\", value: service_type_id, label: \"Service Type ID\"});\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_fin_inc_am\", value: priceIncreaseAmount, label: \"New Service Price\"});\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_it_serv_chg_id\", value: service_chg_id, label: \"Service Change ID\"});\n financeAlloc.setValue({ fieldId: \"custrecord_price_chg_fin_comm_reg\", value: comm_reg_id, label: \"Commencement Register ID\"});\n var finAllocateID = financeAlloc.save();\n // finAllocateID = '1' //Test\n \n return finAllocateID;\n }", "title": "" }, { "docid": "400bdb3c20a109767f73e52a1fa34b60", "score": "0.6650088", "text": "function createTaskRecord(title,message,assignTo,company,printJobId){\n\t\tvar taskRec = record.create({\n\t\t\ttype:record.Type.TASK,\n\t\t\tisDynamic:true\n\t\t});\n\n\t\ttaskRec.setValue({\n\t\t\tfieldId:'title',\n\t\t\tvalue:title\n\t\t});\n\n\t\ttaskRec.setValue({\n\t\t\tfieldId:'company',\n\t\t\tvalue:company\n\t\t});\n\n\t\ttaskRec.setValue({\n\t\t\tfieldId:'transaction',\n\t\t\tvalue:printJobId\n\t\t});\n\n\t\ttaskRec.setValue({\n\t\t\tfieldId:'message',\n\t\t\tvalue:message,\n\t\t\tignoreFieldChange: true\n\t\t});\n\n\t\ttaskRec.setValue({\n\t\t\tfieldId:'assigned',\n\t\t\tvalue:assignTo,\n\t\t\tignoreFieldChange:true\n\t\t});\n\n\t\ttaskRec.setValue({\n\t\t\tfieldId:'priority',\n\t\t\tvalue:'HIGH',\n\t\t\tignoreFieldChange:true\n\t\t});\n\n//\t\tlog.debug('task',title +' '+message);\n\t\tlog.debug('task record id',taskRec.save());\n\t}", "title": "" }, { "docid": "2befd7e791912bcd719b1bf2d9771c4b", "score": "0.66461474", "text": "create(values) {\n return this.db.one(sql.add, {\n // customerId: +values.customerId,\n // companyName: values.coname\n });\n }", "title": "" }, { "docid": "570292867606635b019c28093ea3327b", "score": "0.65996325", "text": "create(data) { \n const record = new this.model(data);\n return record.save()\n .then(async (category) => {\n return category;\n })\n .catch((error) => {\n return error;\n });\n }", "title": "" }, { "docid": "e801ab68afd5449892ca7da0f8b7208c", "score": "0.65865564", "text": "async function newRecord(context) {\n const state = context.state;\n const entity = state.$name;\n return context.dispatch(`${state.$connection}/new`, { entity }, { root: true });\n}", "title": "" }, { "docid": "2277dc6dbeac4c91ff2efbd65f74a151", "score": "0.6584947", "text": "async create(data, params) {}", "title": "" }, { "docid": "7f4aa5e55026890e04a070060433998d", "score": "0.656696", "text": "async create(DATA) {\n return this.ctx.model.Info.create(DATA);\n }", "title": "" }, { "docid": "299ec3ace141fbe1edcd9937a8fad254", "score": "0.6531762", "text": "createRecord( success , error ) {\n\n try {\n\n this.models.createEntry(this,function(success_data){\n\n success(success_data);\n },function(error_data){\n\n error(error_data);\n });\n }catch (err) {\n\n error( Response.sendResponse(false,null,err.message,status_codes.INTERNAL_SERVER_ERROR ) );\n }\n }", "title": "" }, { "docid": "4d8f4c3ca4d0bacb1e3ff620dd11dcb3", "score": "0.6489672", "text": "async function createScanRecord(){\n const x = await newRecord.save()\n try{\n scanRecordMsg= `Scan newRecord with id= ${x._id} was ${x.scanStatus}.`\n scanRecordEntry= x\n }\n catch(err){\n scanRecordMsg= `Error: ${err.message}. Unable to create scan newRecord. Please try again.`\n }\n }", "title": "" }, { "docid": "055f797ea886b51e8fdae184256ce23d", "score": "0.6483047", "text": "function insertRecord(req, res) {\r\n var note = new Note();\r\n note.fullName = req.body.fullName;\r\n note.assigned = req.body.assigned;\r\n note.todoContent = req.body.todoContent;\r\n note.createDate = req.body.createDate;\r\n note.finishDate = req.body.finishDate;\r\n note.save((err, doc) => {\r\n if (!err)\r\n res.redirect('note/list');\r\n else {\r\n if (err.name == 'ValidationError') {\r\n handleValidationErr(err, req.body);\r\n res.render(\"note/CreateOrUpdate\", {\r\n //viewTitle: \"Create todo note!\",\r\n note: req.body\r\n });\r\n }\r\n else\r\n console.log('Error during todo insertion : ' + err);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "2f6d25f5047238342b3d3949819145f8", "score": "0.647331", "text": "async function newRecord$1(_context, payload) {\n return new Query(this, payload.entity).new();\n}", "title": "" }, { "docid": "8bd2f25eeec311a25691b7167d1130b1", "score": "0.64437574", "text": "function CreateRecord(header, entityName, fields) {\n try {\n var resultArray = new Array();\n var attributesList = '';\n\n for (i = 0; i < fields.length; i++) {\n if (fields[i].Value != null)\n attributesList += \"<\" + fields[i].SchemaName + \">\" + fields[i].Value + \"</\" + fields[i].SchemaName + \">\";\n }\n\n\n var xml = \"<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'><entity xsi:type='\" + entityName + \"'>\" + attributesList + \"</entity></Create>\";\n var resultXml = CallCrmService(header,xml, 'Create');\n\n\n if (resultXml) {\n var newid = resultXml.selectSingleNode('//CreateResult').nodeTypedValue;\n return newid;\n }\n }\n catch (err) {\n }\n\n return null;\n}", "title": "" }, { "docid": "9deb61c55fb6c1c71e8084448209086d", "score": "0.6400367", "text": "create(userId, planId, activo, callback){\n\t\tlet like \t\t = new likeSchema();\n\t\tlike.activo \t = activo\n\t\tlike.userId \t = userId \n\t\tlike.planId \t = planId \n\t\tlike.save(callback)\n\t}", "title": "" }, { "docid": "51af770ccb32110e6a17eda23bf154dd", "score": "0.63839585", "text": "function saveRecord(record) {\n\t// open a new transaction with the database with read and write permissions\n\tconst transaction = db.transaction([TABLE_NAME], 'readwrite');\n\n\t// access the object store for `new_budget`\n\tconst transactionObjectStore = transaction.objectStore(TABLE_NAME);\n\n\t// add record to your store with add method\n\ttransactionObjectStore.add(record);\n}", "title": "" }, { "docid": "4132400ea2051c6fcd4cb699be5ba025", "score": "0.63806343", "text": "new() {\n const model = new this.model().$generateId();\n this.commitInsert(model.$getAttributes());\n return model;\n }", "title": "" }, { "docid": "796a8bb5ee639f57fa600ee711fe997b", "score": "0.63514555", "text": "createRecord( success , error ) {\n\n try {\n this.models.createEntry(this,function(success_data){\n\n console.log(\"success\");\n\n success(success_data);\n },function(error_data){\n\n\n error(error_data);\n });\n }catch (err) {\n\n //console.log(err.message);\n error(Response.sendResponse(false,null,err.message,status_codes.INTERNAL_SERVER_ERROR));\n }\n }", "title": "" }, { "docid": "7ea524556919bca0105e9eb2348859ea", "score": "0.6335677", "text": "function saveRecord(record) {\n // open a new transaction with the database with read and write permissions\n const transaction = db.transaction([\"new_pizza\"], \"readwrite\");\n\n // access the object store for `new_pizza`\n const pizzaObjectStore = transaction.objectStore(\"new_pizza\");\n\n // add record to your store with add method\n pizzaObjectStore.add(record);\n}", "title": "" }, { "docid": "fc8e78fbeb67fb575e1808e24a0bd6fb", "score": "0.6334096", "text": "function saveRecord(record) {\n // open a new transaction with the database with read and write permissions\n const transaction = db.transaction([\"new_budget\"], \"readwrite\");\n\n // access the object store for `new_pizza`\n const budgetObjectStore = transaction.objectStore(\"new_budget\");\n\n // add record to your store with add method\n budgetObjectStore.add(record);\n}", "title": "" }, { "docid": "32dc67893319c5c3166f33bea86c9809", "score": "0.6324617", "text": "function saveRecord(record) {\n //open new transaction w/db w/read&write permissions\n const transaction = db.transaction(['new_budget'], 'readwrite');\n\n //access object store for 'new_budget'\n const budgetObjectStore = transaction.objectStore('new_budget');\n\n //add record to store w/add method\n budgetObjectStore.add(record);\n}", "title": "" }, { "docid": "b522b07add5c156944177018e00b727a", "score": "0.6320103", "text": "function ac_create_record(self, event, kw, src)\n {\n var treedb_name = kw.treedb_name;\n var topic_name = kw.topic_name;\n var record = kw.record;\n var options = kw.options || {};\n\n return treedb_create_node(\n self,\n treedb_name,\n topic_name,\n record,\n options\n );\n }", "title": "" }, { "docid": "68233e08d7c576e0fb9c661bf0229833", "score": "0.6309299", "text": "function insertNewEmployee(projectId, name, jobTitle, workingOn, skill, satisfaction, professionalism){\n //TODO Maybe verify values?\n var newEmployee = {\n projectId: projectId,\n name: name,\n jobTitle: jobTitle,\n workingOn: workingOn, \n skill: skill,\n satisfaction: satisfaction,\n\tprofessionalism: professionalism\n };\n \n //Put in database\n database.insertOneRecord(newEmployee, 'employees');\n \n //Add to assistant\n assistant.addEmployee(newEmployee.name);\n}", "title": "" }, { "docid": "92ba81e30ac9d9704dd8e4eaca4cb864", "score": "0.6308621", "text": "createNewPastSearch(username, location, time, eateryType){\n let date = new Date();\n let newPastSearch = {\n Username : username,\n Location : location,\n Time : time,\n EateryType : eateryType,\n DayOfSearch : date.getDate(),\n MonthOfSearch : date.getMonth() + 1,\n YearOfSearch : date.getFullYear()\n };\n\n this.PastSearchesModel.create(newPastSearch, function (err) {\n if (err) return console.log(err);\n });\n\n\n console.log('[PAST_SEARCHES] new past search created');\n console.log(newPastSearch);\n\n return null;\n }", "title": "" }, { "docid": "580f6a5c539326455f8d4df1333a8985", "score": "0.63086045", "text": "static create (mdId, tagId, callback) {\n\t\tModel.factory(TABLE_NAME).on('insert', callback).insert({ mdId: mdId, tagId: tagId });\n\t}", "title": "" }, { "docid": "6b2f50ee1599efeb4663c3160421dff0", "score": "0.63026005", "text": "function Record(){}", "title": "" }, { "docid": "461b04d9c99c7b270fac95baea1d7784", "score": "0.62929106", "text": "generateRecordInputForCreate(record,objectInfo){const recordInput=this._generateRecordInput(record,true,objectInfo);recordInput.apiName=record.apiName;// fields.Id is not required for CREATE which might have been copied over, so delete fields.Id\n delete recordInput.fields.Id;return recordInput;}", "title": "" }, { "docid": "013edc00ea966291f3d8e33796f42aba", "score": "0.62684345", "text": "function saveRecord(record) {\n const transaction =db.transaction(['new-transaction'], 'readwrite');\n const budgetObjectStore = transaction.objectStore('new-transaction');\n budgetObjectStore.add(record);\n}", "title": "" }, { "docid": "5a3ed374d6c4affa2de83017cb6300ad", "score": "0.6260452", "text": "createEntry(tableName, reqObj){\n return knex(tableName).insert(reqObj);\n }", "title": "" }, { "docid": "dcbe63173ce76384d4ee02a8d4b77056", "score": "0.62527895", "text": "create(title, category, author) {\n const newBook = new book(\n title,\n category,\n author,\n new Date().toLocaleDateString() //Gets and format today date\n );\n\n this.save(newBook); //Save this book in the book database\n\n this.addBookToCatalog(\n newBook.getId(),\n newBook.date,\n newBook.title,\n newBook.author\n ); //Record this new book in the catalog\n\n return newBook; //return the new book\n }", "title": "" }, { "docid": "7641bf40a5d045c77e834565c39ddad3", "score": "0.62487876", "text": "function saveRecord(record) {\n // open a new transaction with the database with read and write permissions \n const transaction = db.transaction(['new_budget'], 'readwrite')\n\n // access the object store for new transaction\n const transactionObjectStore = transaction.objectStore('new_budget');\n\n // add record to your store with add method\n transactionObjectStore.add(record);\n}", "title": "" }, { "docid": "69eb54428e14a23890a92cd06acef00e", "score": "0.6242786", "text": "create(data, cb) {\n orm.insertOne(\"burgers\", data, (res) => cb(res));\n }", "title": "" }, { "docid": "9c85a80cfcfd924dee993e1bb39aa958", "score": "0.6227538", "text": "create({ body }, res) {\n\t\tconsole.log(body)\n\t\tvar material = new Material(body);\n\t\tmaterial.save(function(err, material){\n\t\t\tif(err){\n\t\t\t\tres.status(400);\n\t\t\t\tres.json(err);\n\t\t\t}else{\n\t\t\t\tres.status(201);\n\t\t\t\tres.json(material);\n\t\t\t}\n\n\t\t});\n\t}", "title": "" }, { "docid": "89be48349caae3e40a2e1da639fda429", "score": "0.6223898", "text": "function insertRecord(info) {\n db.transaction(function(tx) {\n tx.executeSql(insertIntoTable, info, function(){}, onInsertError);\n });\n }", "title": "" }, { "docid": "929fc9ee5ade6db25a844a4a0e3e7f84", "score": "0.6218542", "text": "function createNewSkill(formobj, sucessCB, errorCB) {\r\n var skillObj = new skill({\r\n candidateid: formobj.mobile,\r\n skills: []\r\n });\r\n //skillObj.skills.push(newskillobj.skills[0]);\r\n // console.log(\"About to save New Skill:\", skillObj);\r\n\r\n skillObj.save(function(err, result) {\r\n // console.log(\"inside save\");\r\n if (err) {\r\n // console.log(err);\r\n errorCB(err);\r\n }\r\n sucessCB(result);\r\n\r\n //Asynch method\r\n //Save empObj to DB\r\n\r\n });\r\n}", "title": "" }, { "docid": "989a3d1c99e18965d281d87701409fcd", "score": "0.6214185", "text": "function saveRecord(record) {\n const transaction = db.transaction(['new_transaction'], 'readwrite');\n\n const budgetObjectStore = transaction.objectStore('new_transaction');\n //add record to store\n budgetObjectStore.add(record);\n}", "title": "" }, { "docid": "e7e1e3c32861ff128a27102a5b82645f", "score": "0.62128943", "text": "create(request, reply) {\n let data = request.payload\n\n this.ToDo.save(data)\n .then((response) => reply(response))\n .catch((err) => reply(this.Boom.wrap(err)))\n }", "title": "" }, { "docid": "1d1af946aa4b02720121acae74826c7c", "score": "0.61923367", "text": "async create(record) {\n if (!record.JobNum) {\n const {\n parameters: {opNextJobNum}\n } = await this.makeRequest('GetNextJobNum', {});\n record.JobNum = opNextJobNum;\n }\n const result = await super.create(R.omit(['JobProd'], record));\n if (record.JobProd) {\n result.JobProd = await this.addJobProds(record.JobNum, record.JobProd);\n }\n return result;\n }", "title": "" }, { "docid": "1d1af946aa4b02720121acae74826c7c", "score": "0.61923367", "text": "async create(record) {\n if (!record.JobNum) {\n const {\n parameters: {opNextJobNum}\n } = await this.makeRequest('GetNextJobNum', {});\n record.JobNum = opNextJobNum;\n }\n const result = await super.create(R.omit(['JobProd'], record));\n if (record.JobProd) {\n result.JobProd = await this.addJobProds(record.JobNum, record.JobProd);\n }\n return result;\n }", "title": "" }, { "docid": "81fe2432dfea98c81861c6a064dc2222", "score": "0.6185698", "text": "createEmptyNote() {\n var newRow = this.get('store').createRecord('private-note', {\n 'modelName': this.get('modelName'),\n 'modelId' : this.get('modelId'),\n 'message' : ''\n });\n return newRow;\n }", "title": "" }, { "docid": "f77209a78fc2373a187c03a1a5050949", "score": "0.618469", "text": "function saveRecord(record) {\n\n // Create a new transaction for the db\n const transaction = db.transaction([\"new_pizza\"], \"readwrite\");\n\n // Acces new_pizza object store\n const pizzaObjectStore = transaction.objectStore(\"new_pizza\");\n\n // Add record to offline store\n pizzaObjectStore.add(record);\n}", "title": "" }, { "docid": "615b30370e8895fe8b42720c34fbb193", "score": "0.6184277", "text": "function _createEntry() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\n\t\t\t//Build the Statement to insert the entries\n\t\t\tvar oStatement = oConnection.prepareStatement('INSERT INTO \"' + gvSchemaName + '\".\"' + gvTableName +\n\t\t\t\t'\" VALUES (?, ?, ?, ?)');\n\n\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t//ID\n\t\t\toStatement.setInt(1, gvId);\n\t\t\t//Item Text\n\t\t\toStatement.setString(2, oBody.ITEM_TEXT);\n\t\t\t//Account Type\n\t\t\toStatement.setString(3, oBody.ACCOUNT_TYPE);\n\t\t\t//Account Category\n\t\t\toStatement.setString(4, oBody.ACCOUNT_CATEGORY);\n\n\t\t\t//Add Batch process to executed on the database\n\t\t\toStatement.addBatch();\n\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries created successfully in Account Type/Category Table;\";\n\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem inserting entries into the Account Type/Category Table, Error: \" + errorObj.message;\n\t\t}\n\t}", "title": "" }, { "docid": "1066b14fbf6be9b39d8ad430678b9617", "score": "0.61763793", "text": "saveRental3(params) {\n var newRental = this.store.createRecord('rental', params);\n newRental.save();\n this.transitionTo('index');\n }", "title": "" }, { "docid": "172d1ebc1f3b20ef40d14f4831262f26", "score": "0.61720157", "text": "function create(info){\n const Info = {\n name: info.name,\n };\n client.db(dbName).collection(collectionName).insertOne(Info);\n}", "title": "" }, { "docid": "84d9a0a944867ef93e42b2d7327bae07", "score": "0.61650527", "text": "function createRecord(con, sql)\n{\n\t//Example for admin\n\t//var sql = \"INSERT INTO account (username, password, type, email, visaagent, ticketagent, uniagent ) VALUES ('admin', 'ByteBlock', 'admin', '[email protected]', 'NA', 'NA', 'NA')\";\n\tcon.query(sql, function (err, result)\n\t{\n\t\tif (err) throw err;\n\t\tconsole.log(\"record inserted\");\n\t});\n}", "title": "" }, { "docid": "218a6b2e99f36b9bb01eaa700ce90ed3", "score": "0.6149894", "text": "create({ body }, res) {\n\t\t\tlet loggy = new Person(body)\n\t\t\tloggy.save(function(err, obj){\n\t\t\t\tif(err) res.error(err)\n\t\t\t\tres.json(obj)\n\t\t\t})\n\t\t}", "title": "" }, { "docid": "d95ad696d4cabc2b9b5df3ffdb898657", "score": "0.6136393", "text": "async create(ent) {\n\t\treturn await CoreHelpers.MongoFuncHelper.$save(this.model, ent);\n\t}", "title": "" }, { "docid": "aead42b9ba32169f9c84800dbb373d9a", "score": "0.6135382", "text": "function createNewRecords() {\n var _dictOfExistingItems = dictOfExistingItems;\n //mixin un copied records\n sh.each(dictOfExistingItems, function addToNewRecords(i, eRecord) {\n if (eRecord == null) {\n //already updated\n return;\n }\n //console.error('creating new instance of id on', eRecord.id)\n eRecord.id = null;\n newRecords.push(eRecord);\n });\n\n if (newRecords.length > 0) {\n self.Table.bulkCreate(newRecords).then(function (objs) {\n\n self.proc('all records created', objs.length);\n //sh.each(objs, function (i, eRecord) {\n // var match = dict[eRecord.id_timestamp.toString() + eRecord.source]\n // eRecord.updateAttributes(match)\n // })\n sh.callIfDefined(fx);\n\n }).catch(function (err) {\n console.error(err, err.stack)\n throw err\n })\n } else {\n self.proc('no records to create')\n sh.callIfDefined(fx)\n }\n\n\n /* sh.callIfDefined(fx)*/\n\n }", "title": "" }, { "docid": "179fae7e156c1900542c69c8fd407319", "score": "0.6130617", "text": "function addRecord()\n{\n\tif( adapter.activeRecord == null )\n\t{\n\t\talert(\"Select a table first.\");\n\t\treturn;\n\t}\n\t\n\tif( divNewRecord.style.display == \"block\" )\n\t\treturn;\n\t\n\tvar columnInfos = adapter.activeRecord.getColumnsInfo();\n\tvar strHtml = \"<form name='newRec' onsubmit='return false'><table class='newRec'>\";\n\t\n\tfor( var i = 0; i < adapter.activeRecord.getColumnsInfo().length; ++i )\n\t{\n\t\tvar colInfo = adapter.activeRecord.getColumnsInfo()[i];\n\t\tstrHtml += \"<tr><td class='cb'>\" + colInfo.name + \"</td> <td><input name='__\" + colInfo.name + \"'\";\n\t\tif( columnInfos[i].isPK )\n\t\t{\n\t\t\tstrHtml += \" disabled\";\n\t\t\tif( columnInfos[i].type == \"int\" )\n\t\t\t\tstrHtml += \" value='0'\";\n\t\t}\n\t\tstrHtml += \"></td></tr>\"\n\t}\n\t\n\tstrHtml += \"</table><br><button class='ui-state-default marged ptr' onclick='onAddRecordClick()'>Add</button> <button class='ui-state-default marged ptr' onclick='onCancelAddRecordClick()'>Cancel</button></form>\";\n\tdivNewRecordContent.innerHTML = strHtml;\n\t\n\tdivNewRecordCaption.innerHTML = \"New \" + Utils.getClassName( adapter.activeRecord );\n\t\n\tdivGrid.style.display = divPager.style.display = divCode.style.display = \"none\";\n\tdivNewRecord.style.display = \"block\";\n}", "title": "" }, { "docid": "a161679fbe0b996730ab89c1b74fc9f0", "score": "0.61300164", "text": "function create(data, cb) {\n\n //Create the entity to be saved in datastore. Each datastore object, or 'entity',\n //consists of a key specifying what 'kind' of entity it is, and the data of the\n //entity.\n var key = ds.key(kind);\n var entity = {\n key: key,\n //Translate the form data from JS-readable to Datastore-readable format.\n //The second paramter indicates which data from the form you don't want\n //to be indexed in datastore, if so.\n data: toDatastore(data, ['description'])\n };\n\n //Save the entity in datastore.\n ds.save(\n entity,\n function (err) {\n data.id = entity.key.id;\n cb(err, err ? null : data);\n }\n );\n}", "title": "" }, { "docid": "cf2196d73b14a076b93d9d09302be9df", "score": "0.61083436", "text": "function CreateContact(firstName, lastName, phoneNumber, email, addNumberPhone, addNewEmail) { \n //assign unique ID to the contact\n uniqueID++;\n this.id = uniqueID;\n this.firstName = firstName;\n this.lastName = lastName;\n this.phoneNumber = [phoneNumber];\n this.addNumberPhone = [addNumberPhone];\n this.email = email;\n this.addNewEmail = [addNewEmail];\n\n}", "title": "" }, { "docid": "a46b08068cab16d5661ef666d15e2e74", "score": "0.61008465", "text": "create(entity) {\n return new model(entity)\n .savePromise();\n }", "title": "" }, { "docid": "fc6afdf09a906bd8c81173f8d0541735", "score": "0.60955393", "text": "create(data, options) {\n return this.persist('create', data, options);\n }", "title": "" }, { "docid": "d6e1d6e0ea5ce1648930c4fb1b62b2b0", "score": "0.6095481", "text": "function saveRecord(record) {\n //start a new transaction with the database with read and write permissions\n const transaction = db.transaction([\"pending_transaction\"], \"readwrite\");\n //access the obj store\n const budgetObjStore = transaction.objectStore(\"pending_transaction\");\n //adds record to store\n budgetObjStore.add(record);\n}", "title": "" }, { "docid": "e0d9971f411c660683b0a6cd0a809870", "score": "0.60907775", "text": "async function createRecord(txn, recordDoc) {\n console.log(\"In the createRecord function with doc: \" + recordDoc);\n const statement = `INSERT INTO Customer ?`;\n return await txn.execute(statement, recordDoc);\n}", "title": "" }, { "docid": "6d5137b3ffd7f5f3ca02af542ef7ed6b", "score": "0.60768074", "text": "function addRecord(req, res){\n\tvar record = {\n date : new Date(),\n record : req.body.record,\n authorId : req.session.user._id\n },\n login = req.session.user.login;\n\n\tRecordService.addRecord(record, function(err){\n\t\tif (!err){\n\t\t\t_informListeners({\n\t\t\t\t\tdate : record.date,\n\t\t\t\t\trecord : record.record,\n\t\t\t\t\tauthorId : {\n\t\t\t\t\t\tlogin : login\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tres.json({status : \"ok\" });\n\t\t} else {\n\t\t\tres.json({status : \"fail\" });\n\t\t}\n\t});\n}", "title": "" }, { "docid": "b4f2049cb9833159931d90ae06da753d", "score": "0.6076407", "text": "create(req, res) {\n Type.create(req.body)\n .then((newType) => {\n res.status(200).json(newType);\n })\n .catch((error) => {\n res.status(500).json(error);\n });\n }", "title": "" }, { "docid": "4c06f2229972433f13d34a856108b6d9", "score": "0.6064183", "text": "function saveRecord(record) {\n // open a new transaction ( temporary connection ) to the database with read and write permissions\n // we have to explicitly do this because we sometimes we are offline and don't have a direct connection, unlike SQL and MongoDB. In fact, this makes possible of the very purpose of indexedDB\n const transaction = db.transaction(['new_pizza'], 'readwrite');\n // access the 'new pizza' object store, which is where we will add data and store in pizzaObjectStore\n const pizzaObjectStore = transaction.objectStore('new_pizza');\n\n // add record to your store with add method.\n pizzaObjectStore.add(record);\n}", "title": "" }, { "docid": "8b0c3d4be0cebe8e73237462779dfd59", "score": "0.6061231", "text": "async createNew(req, res, next) {\n console.log(req.body);\n\n try {\n // Check empty req.body\n if (Object.keys(req.body).length === 0) {\n throw new ErrorHandlers.ErrorHandler(500, \"Nothing to create\");\n }\n\n // Student init model\n const student = new Student({\n ...req.body\n });\n\n // Await the save\n const newStudent = await student.save();\n // If save fail send error via handler\n if (!newStudent) {\n throw new ErrorHandlers.ErrorHandler(\n 400,\n \"Student cannot be saved\"\n );\n }\n\n // All OK send the response with results\n res.status(201).json({ message: \"New student added\", newStudent });\n } catch (err) {\n // Errors\n res.status(500).json(err);\n }\n }", "title": "" }, { "docid": "44f7c86553d4d3021fd02fbc63d1d80e", "score": "0.6056504", "text": "create(req, res) {\n return history\n .create({\n title: req.body.title,\n borrowed: req.body.borrowed,\n returned:req.body.returned,\n user1Id: req.params.user1Id, \n })\n .then(history => res.status(201).send(history))\n .catch(error => console.log(error.message)); \n }", "title": "" }, { "docid": "4f8db59b5ffe734a4177e1f2b2f81173", "score": "0.6050888", "text": "async function createCourse(courseName, author, price) {\n\n //real object (document - row ) that we made from the \"Course\" class \n const course = new Course({\n name: 'Angular.js course',\n author,\n tags: ['Angular', 'backend'],\n isPublish: true,\n price\n });\n\n const result = await course.save();\n console.log(result);\n}", "title": "" }, { "docid": "53dd06ec3d2e8bce986fb4264b1b61a2", "score": "0.60409623", "text": "async function saveRecord(celebData){\r\n var newRecord = new celebRecord();\r\n newRecord = celebData;\r\n newRecord.save((err,data)=>{\r\n if(err){\r\n console.log(err)\r\n } else {\r\n console.log(chalk.green(':::::Celeb Data Saved Successfully To DB: ' + newRecord ))\r\n }\r\n })\r\n}", "title": "" }, { "docid": "4c38421da9a1473ec10a5e73fe60ca5b", "score": "0.6038121", "text": "function createEvent() {\n new Event(newEvent)\n .save()\n .then(() => console.log(\"event was saved!\"))\n .catch((err) => console.error(err))\n}", "title": "" }, { "docid": "5b4b2b911f49c15676c6eee4be8d4729", "score": "0.6027514", "text": "function saveRecord(record) {\n //creates a transaction on the pending db with readwrite access\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n const store = transaction.objectStore(\"pending\");\n store.add(record); \n}", "title": "" }, { "docid": "ec62debdbc647b0ef47f1d745663f5d3", "score": "0.6005877", "text": "async create({ request, response, auth }) {\n const body = await request.all();\n\n const newStudent = await auth.user.student().create({\n first_name: body.first_name,\n last_name: body.last_name,\n year: body.year,\n major: body.major,\n college:body.college,\n bio: body.bio,\n fun_fact: body.fun_fact,\n abroad: body.abroad,\n pre_law: body.pre_law,\n pre_med: body.pre_med,\n pre_dent: body.pre_dent,\n pre_eng: body.pre_eng\n });\n\n const demographic = await newStudent.demographic().create({\n gender: body.gender,\n first_gen: body.first_gen,\n race: body.race,\n athlete: body.athlete\n });\n\n return response.redirect(\"/myprofile\");\n }", "title": "" }, { "docid": "dfd2276657dd293925471401918b5da6", "score": "0.60029393", "text": "create(picId, picInfo) {\n return db(\"attributes\")\n .insert({\n id: picId,\n ...picInfo\n })\n }", "title": "" }, { "docid": "7602c9bc0c5d149105932e82d4af4e18", "score": "0.60005015", "text": "function mealrecord(newobj, userid, picInfo, imageType) {\n newobj.userid = userid;\n newobj.timestamp = picInfo.timestamp;\n newobj.mitimestamp = picInfo.mitimestamp;\n newobj.imageType = imageType;\n newobj.published = false;\n}", "title": "" }, { "docid": "d4ad846c6c59c4a70c9d01cda3f9b24a", "score": "0.59968966", "text": "async create(modelName, properties, params) {\n let model = this.getModel(modelName)\n return await model.create(properties, params)\n }", "title": "" }, { "docid": "9ee12ec41a753901dba2a85a24550eb5", "score": "0.5994365", "text": "@action\n newRequestAction() {\n this.set('entry', this.store.createRecord('timesheet-missing', {\n person_id: this.session.userId,\n position_id: this.positions.firstObject.id,\n }));\n }", "title": "" }, { "docid": "819dd59f6b32821d4612dbd4d892a5d9", "score": "0.59870887", "text": "async create(title, number, term, status) {\n const course = await Course.create({ title, number, term, status });\n return course;\n }", "title": "" }, { "docid": "525ac8006cacc819284f55190f36442c", "score": "0.598344", "text": "function saveRecord(record) {\n // create a transaction on the pending db with readwrite access\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n \n // access your pending object store\n const store = transaction.objectStore(\"pending\");\n \n // add record to your store with add method.\n store.add(record);\n }", "title": "" }, { "docid": "ce42e8e30adcd63f5a97a45264420098", "score": "0.59812593", "text": "function saveTransaction(record) {\n\n const wire = database.transaction(['new_charge'], 'readwrite');\n \n \n const bankObjectStore = wire.objectStore('new_charge');\n \n \n bankObjectStore.add(record);\n}", "title": "" }, { "docid": "bd2586ddac1a3849be4be1a531b7c165", "score": "0.59802085", "text": "async createNewRecord(attributes) {\n // Read filecontents of the stored-activities.json\n const jsonRecords = await\n fs.promises.readFile(this.filename,{\n encoding : 'utf8'\n })\n // Parsing JSON records in JavaScript\n // object type records\n const objRecord = JSON.parse(jsonRecords)\n // Adding new record\n objRecord.push(attributes)\n // Writing all records back to the file\n await fs.promises.writeFile(\n this.filename,\n JSON.stringify(objRecord, null, 2) \n )\n return attributes;\n }", "title": "" }, { "docid": "c4e1cfe414f29b7f3899898a960910ab", "score": "0.5975162", "text": "function saveRecord(record) {\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n const store = transaction.objectStore(\"pending\");\n store.add(record);\n}", "title": "" }, { "docid": "b8fb434309942deebf6f0629a2c4f3be", "score": "0.5972728", "text": "static async create({ title, salary, equity, company_handle }) {\n const result = await db.query(\n `INSERT INTO jobs (title, salary, equity, company_handle)\n VALUES ($1, $2, $3, $4)\n RETURNING id, title, salary, equity, company_handle, date_posted`,\n [title, salary, equity, company_handle]\n );\n\n return result.rows[0]\n }", "title": "" }, { "docid": "1e76dd36d5fa39558859e6c35b4576cc", "score": "0.5969888", "text": "static create(data) {\n var smell = new Smellprofile(data);\n return smell.save()\n .catch((err) => {\n console.log(err);\n return err;\n });\n }", "title": "" }, { "docid": "797a39ed741b38ee02fd1974b2bf4940", "score": "0.5969856", "text": "createNew(tableName, newObject) {\n return fetch(`${remoteURL}/${tableName}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(newObject)\n }).then(data => data.json())\n }", "title": "" }, { "docid": "8d12af00fcb109669d5dfc87d30bcfb2", "score": "0.59623504", "text": "function saveRecord(record) {\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n const store = transaction.objectStore(\"pending\");\n store.add(record)\n}", "title": "" }, { "docid": "4375eb7155c2364708ba59eebe55224f", "score": "0.5958102", "text": "async createAddressRecord(customerId, line_1, line_2, line_3, city, town, postCode, county, houseNumber) {\n\n if (isNaN(customerId) && !customerId) {\n return {msg: 'No product Identifier was passed.', payload: 1};\n }\n\n try {\n\n let createdAddress = await address.create({\n customerId: customerId,\n line_1: line_1,\n line_2: line_2,\n line_3: line_3,\n city: city,\n town: town,\n postCode: postCode,\n county: county,\n houseNumber: houseNumber\n });\n\n return {msg: 'Success', payload: 0, insertedId: createdAddress.dataValues.id};\n } catch (e) {\n return {msg: 'An error occurred while trying to create a new inventory', payload: 1};\n }\n }", "title": "" }, { "docid": "7e01f5f2ae78ee28ae25cd530f6c78c4", "score": "0.5956762", "text": "function createContact() {\n\t//alert(\"saving contact: \" );\n var contacts = blackberry.pim.contacts,\n ContactField = contacts.ContactField,\n name = {},\n workPhone = { type: contacts.ContactField.WORK, value: contactDetails.mphone },\n\t\thomePhone = { type: contacts.ContactField.WORK, value: contactDetails.hphone },\n workEmail = { type: contacts.ContactField.WORK, value: contactDetails.wemail },\n homeEmail = { type: contacts.ContactField.HOME, value: contactDetails.hemail},\n\t\t \n contact;\n \n name.familyName = contactDetails.lname;\n name.givenName = contactDetails.fname;\n contact = contacts.create({\n \"displayName\": \"JJames\" ,\n \"name\": name,\n \"phoneNumbers\": [workPhone, homePhone],\n \"emails\": [workEmail, homeEmail]\n });\n\t//alert(\"before saving contact: \" );\n contact.save(onSaveSuccess, onSaveError);\n}", "title": "" }, { "docid": "0c20905cfdd6beb8120078f84547c677", "score": "0.59541076", "text": "function newItem(description, cost, quantity){\n Items.create({\n description: description,\n cost: cost,\n quantity: quantity\n }).then(function() {\n return {\n status: \"success\",\n message: \"Item added\"\n };\n }).catch(function(err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "b2e339747e72aaaa3ddd4524eb413b65", "score": "0.5953846", "text": "function createProduct(data) { \n const product = new Product({\n title: data.title,\n description: data.description,\n category: data.category,\n price: data.price,\n colors: data.colors,\n sizes: data.sizes,\n tags: data.tags,\n fullDescription: data.fullDescription,\n addditionalInfo: data.addditionalInfo,\n link: data.link,\n reviews: null\n });\n return product.save(); \n}", "title": "" }, { "docid": "762781b6de156d90be3a07cf9a9cf35c", "score": "0.59526294", "text": "create(name, value) {\n const newCoin = { name, value, lastUpdate: new Date().toLocaleString() }\n const coin = new this.model(newCoin)\n\n return coin.save()\n }", "title": "" }, { "docid": "5d527a8e2ec32e0e004b22edcdc5bb75", "score": "0.5949012", "text": "function makeARandomBookingEntry() {\n let dateObj = new Date()\n const newBooking = {\n name: 'random',\n room: process.env.ROOM_NO,\n start_time: new Date(dateObj.getFullYear(), dateObj.getMonth + 1, dateObj.getDate(), 7, 0, 0, 0),\n end_time: new Date(dateObj.getFullYear(), dateObj.getMonth + 1, dateObj.getDate(), 9, 0, 0, 0)\n };\n\n const bookingEntry = new Booking(newBooking);\n bookingEntry\n .save()\n .then(() => {\n console.log(bookingEntry);\n })\n .catch(e => {\n console.log(e)\n });\n}", "title": "" }, { "docid": "f8997b316f9e0d3672a51b28ed3caf27", "score": "0.594392", "text": "async function createCourse(){\r\n\r\n const course = new Course({ \r\n name: 'Angular Course',\r\n author: 'Mosh',\r\n tags: ['Angular' , 'frontend'],\r\n isPublished: true\r\n }); //only these properties defiend here will be saved in db. schema can have more properties\r\n const result = await course.save(); // it returns a id when it successfully saves the data\r\n console.log(result);\r\n}", "title": "" }, { "docid": "8dcc8f8cb3a80f913759aa594e49b0be", "score": "0.59354657", "text": "create (cols, vals, cb) {\n orm.insertOne(\"burgers\", cols, vals, (res) => {\n cb(res);\n });\n }", "title": "" }, { "docid": "63677b6022fa49715dedd9be229d600d", "score": "0.5934885", "text": "function escenario1() {\n idTE = String(idTE)\n clientNew = {\n \"identification\": idTE,\n \"name\": \"Juan\",\n \"type\": \"N\",\n \"date\": \"2020-02-06T00:00:00.000+00:00\",\n \"phone\": \"31292992\",\n \"idLawyer\": \"5e4f358081ffcb2560ee8082\"\n }\n const clienteTemp = new ClientSchema(clientNew);\n clienteTemp.save();\n}", "title": "" }, { "docid": "5ea83cbe2da0928ddb6bb33b9d69da28", "score": "0.5929195", "text": "function create (req, res) {\n db.Post.create(req.body, function (err, post) {\n if (err) {\n console.log('error creating new post: ', err)\n }\n console.log('created post: ', post)\n res.json(post)\n })\n}", "title": "" }, { "docid": "c25b061c5930d0170a897e7d3d847401", "score": "0.5921997", "text": "createRecord(store, typeClass) {\n if (isActionModel(typeClass.modelName)) {\n return this.updateRecord(...arguments);\n } else {\n return this._super(...arguments);\n }\n }", "title": "" }, { "docid": "031bf26f8ad2919ecb16cfa349dcbc8f", "score": "0.59206736", "text": "function create(data){\t//receive data from routes/user\n\t\n\tvar coop = new Coop({\n\t\tname: data.Coop,\n\t\tType: data.CoopType,\n\t\tpeople:[{\n\t\t\ttitle: data.title,\n\t\t\tsalary: data.salary,\n\t\t\ttime: data.worktime,\n\t\t\tyear: data.year\n\t\t}],\n\t\tscore: [{\n\t\t\ta: 0,\n\t\t\tb: 0\n\t\t},{a: 0,b: 0},{a:0,b:0}],\n\t\t//scorepeople: [{\n\t\t//\tFBID: 'first',\n\t\t//\ttype: 5,\n\t\t//\tscore: 5\n\t\t//},{FBID:'second',type:5,score:10}],\n\t\tscorepeople: [{\n\t\t\ta: 0,\n\t\t\tc: 0,\n\t\t\tFBID: 'temp'\n\t\t}],\n\t\tcomment: []\n\t});\n\tcoop.save(function (err, newCoop){\n\t\tconsole.log('create Coop');\n\t\tconsole.log(coop);\n\t\tif(err){\n\t\t\tconsole.error(err);\n\t\t};\n\t});\n}", "title": "" }, { "docid": "669547f68f85a5c2bb686436ff3034cb", "score": "0.5917546", "text": "create(req, res) {\n\t\tMaterial.create(req.body)\n\t\t.then(function (nuevoMaterial) {\n\t\t\tres.status(200).json(nuevoMaterial);\n\t\t})\n\t\t.catch(function (error){\n\t\t\tres.status(500).json(error);\n\t\t});\n\t}", "title": "" }, { "docid": "3160a4ff51ec006e411ab870a9107194", "score": "0.59165454", "text": "function saveRecord(record) {\n let transaction = db.transaction('pending', 'readwrite');\n let storedb = transaction.objectStore('pending');\n storedb.add(record);\n}", "title": "" }, { "docid": "2442361f4b40d91d1dc1b13e5c74fa81", "score": "0.5915935", "text": "addProspect(req, res, next) {\n console.log(req.body);\n User.create(req.body)\n .then(function(user) {\n res.send(user);\n })\n .catch(next);\n }", "title": "" }, { "docid": "615afc826c306ca24d74bdccd0301100", "score": "0.59082174", "text": "create(req, res) {\n Post.create(req.body)\n .then(function (newPost) {\n res.status(200).json(newPost);\n })\n .catch(function (error){\n res.status(500).json(error);\n });\n }", "title": "" }, { "docid": "3702d0a5359e0ee82ec074b64a38be7c", "score": "0.59080714", "text": "function addRecord(tableName, record, lock) {\n var response = checkTableExist(tableName);\n if (!response.error) {\n response = system.data.isObject(record);\n if (!response.error){\n response = getNewRecordId(tableName);\n if (!response.error) {\n \tvar recordId = response.get();\n \tresponse = system.data.copy(record);\n \tif (!response.error) {\n \t\tconsole.log(response);\n \t\trecord = response.get();\n \t\tresponse = initRecord(record, recordId, false);\n \t\tif (!response.error) {\n \t\t\trecord = response.get();\n \t\t\ttables[tableName].push(record);\n response.message = \"Success, record added to \" + tableName + \".\";\n \t\t}\n \t}\n }\n }\n }\n return response;\n }", "title": "" } ]
2edaf4393f03d9637b0041ea53133d5a
checks window width to make menu responsive
[ { "docid": "507b50d0719bc08d514ebf2cdc0618a2", "score": "0.7378061", "text": "function checkWindowWidth(){\n var windowWidth = $(window).width();\n var showLeftNav = $(\"body\").hasClass(\"show-side-nav\");\n if(windowWidth < 991){\n $('body').removeClass('fixed-side-nav');\n $('.left-side-nav').removeClass('fixed');\n $('.left-side-nav').removeAttr(\"style\");\n $('.show-side-nav-btn').css('display','block');\n $('.user-view').css('display','block');\n $('#close-search-btn').css('right','5px !important');\n }else{\n if(showLeftNav){\n $('body').addClass('fixed-side-nav');\n $('.left-side-nav').addClass('fixed');\n $('.show-side-nav-btn').css('display','none');\n $('.user-view').css('display','none');\n }\n }\n }", "title": "" } ]
[ { "docid": "7a272532c54f10369b0c8f9e159a026f", "score": "0.7857003", "text": "function resizeMenu () {\n var windowSize = $(window).width();\n var sm = 480;\n if(windowSize <= sm + 50 ) {\n return false;\n }\n else {\n navClose();\n }\n }", "title": "" }, { "docid": "70a8c79917d27650f9cabfd11beb5e88", "score": "0.77024734", "text": "function checkWidth() {\n if ($window.width() <= 1200) {\n $('#rox-search').removeClass('search-visible').addClass('search-hidden');\n $('.logo').removeClass('logo-big').addClass('logo-small');\n $('.mega-menu').removeClass('rox-menu').addClass('small-sub-menu');\n\n };\n\n if ( $window.width() <=970 || $window.width() > 1201) {\n $('#rox-search').removeClass('search-hidden').addClass('search-visible');\n $('.logo').removeClass('logo-small').addClass('logo-big');\n $('.mega-menu').removeClass('small-sub-menu').addClass('rox-menu');\n }\n\n// responsive menu container width fixing\n if($window.width() <=975){\n $('.rox-header').removeClass('normal-menu').addClass('res-menu');\n }else{\n $('.rox-header').removeClass('res-menu').addClass('normal-menu');\n }\n\n if($window.width() <= 775){\n $('.header-top').removeClass('visible').addClass('hidden');\n }else{\n $('.header-top').removeClass('hidden').addClass('visible');\n }\n\n if($window.width() <=625){\n $('.rox-header').removeClass('res-menu').addClass('mobile-menu-active');\n\n }else {\n $('.rox-header').removeClass('mobile-menu-active');\n }\n\n\n }", "title": "" }, { "docid": "378ac099cad26c10546118f454c92707", "score": "0.7624959", "text": "function navSetupToWidth () {\n if ($(window).width() <= 670) {\n\n $(\"nav\").css(\n {\n \"display\" : \"none\"\n });\n \n $(\".mobile-nav\").css(\n {\n \"display\" : \"none\",\n \"position\" : \"fixed\",\n \"pointer-events\" : \"none\",\n \n });\n $(\".mobile-menu-trigger\").css(\n {\n \t\"pointer-events\" : \"all\",\n \t\"display\" : \"block\"\n });\n }\n else {\n $(\"nav\").css(\n { \n \"display\" : \"block\"\n });\n $(\".mobile-nav\").css(\n {\n \"display\" : \"none\"\n });\n $(\".mobile-menu-trigger\").css(\n {\n \t\"display\" : \"none\"\n }); \n }\n // $(\".menu-trigger\").css(\n // {\n // \t\"pointer-events\": \"all\"\n // });\n }", "title": "" }, { "docid": "f97e38e948143589bfcfeb8239b5af32", "score": "0.7546037", "text": "function checkSize(){\n var maxWidth = window.matchMedia(\"(max-width: 600px)\");\n maxWidth.addListener(WidthChange);\n WidthChange(maxWidth);\n\n function WidthChange(maxWidth){\n var menu = $(\"nav\");\n if(maxWidth.matches){\n $(\"#hamburger\").css(\"display\", \"block\");\n $(\"#hamburger\").css(\"position\", \"fixed\");\n menu .css(\"display\", \"none\");\n menu.css(\"position\", \"fixed\");\n menu.find(\"a\").first().attr(\"href\", \"#header\");\n }else{\n $(\"#hamburger\").css(\"display\", \"none\");\n $(\"#hamburger\").css(\"position\", \"absolute\");\n menu .css(\"display\", \"block\");\n menu.css(\"position\", \"\");\n menu.find(\"a\").first().attr(\"href\", \"#section-mix\");\n if(menu .hasClass(\"show-menu\")){\n menu .removeClass(\"show-menu\");\n $(\"nav\").find(\"li\").removeClass(\"show-li\");\n }\n }\n }\n }", "title": "" }, { "docid": "385c1904f6e0f3180d9c53c3c7924234", "score": "0.74908566", "text": "function checkWidthTablet() {\n // DESKTOP SCREEN SIZES\n if (jQuery(window).width() > 1199) {\n jQuery( \"nav .menu-item-has-children\" ).hover(\n function() {\n jQuery( this ).children('.sub-menu').slideDown(500);\n }, function() {\n jQuery( this ).children('.sub-menu').slideUp(500);\n }\n );\n }\n else {\n jQuery(\"nav .menu-item-has-children\").click(function ($) {\n jQuery(this).children('.sub-menu').slideDown('slow');\n jQuery(this).siblings('.menu-item-has-children').children('.sub-menu').slideUp('slow');\n });\n }\n }", "title": "" }, { "docid": "8dd9de3f9ec51f9e4fc2ecbd39c39bb5", "score": "0.7445537", "text": "function checkMenuDisplay() {\n if($(window).width() > 760 && menuMobile.css('display') != 'none') {\n menuMobile.css('display', 'none');\n }\n}", "title": "" }, { "docid": "e0c5fa576dc56a7d85158cccf065102c", "score": "0.74396956", "text": "function checkWidth() \n{\n\tvar windowWidth = $(window).width(); \n if (windowWidth <= 999) {\n $(\".navouter\").hide();\n\t\t$('.ac_navbar > h4').removeClass('active');\n } \n\telse {\n $(\".navouter\").show();\n\t\t$('.ac_navbar > h4').removeClass('active');\n }\n }", "title": "" }, { "docid": "05e0f42a2bf191757bfe6340e27182af", "score": "0.74115163", "text": "showMenuWhenOnDesktop() {\n let isMenuOpen = props.mw3_menu.css('display') !== 'none';\n\n if (!isMenuOpen && props.app_window.innerWidth >= 990) {\n menuSlider();\n }\n }", "title": "" }, { "docid": "f9a7397110bfcee30a395967268bf4ac", "score": "0.7396998", "text": "function checkWidth() {\n\t\tvar windowSize = $(window).width();\n\t\tif(windowSize < 746) {\n\t\t\t$('.slider').detach().prependTo('main');\n\t\t\t$('.languages-select').detach().prependTo('.navbar.navbar-default > .container')\n\t\t\t\t\t.children('.dropdown-menu').addClass('pull-right');\t\t\n\t\t} else {\n\t\t\t$('.slider').detach().prependTo('body');\n\t\t\t$('.languages-select').detach().appendTo('.navbar-nav')\n\t\t\t\t\t.children('.dropdown-menu').removeClass('pull-right');\n\t\t}\n\t}", "title": "" }, { "docid": "987086f766850a3ec27f531013a1df23", "score": "0.73552656", "text": "function checkWidth() {\n var width = $(window).width();\n var homenav = document.getElementById(\"homenav\"); //workaround due to resize issue\n if (width >= 768) {\n console.log(\"hide all elements except for home\");\n $(\"#about\").hide();\n $(\"#contact\").hide();\n $(\"#portfolio\").hide();\n $(\"#home\").show();\n $(homenav).addClass(\"selected\"); //workaround due to resize issue\n $(homenav).siblings(\"li\").removeClass(\"selected\"); //workaround due to resize issue\n } else {\n console.log(\"show all elements\");\n $(\"#about\").show();\n $(\"#contact\").show();\n $(\"#portfolio\").show();\n }\n }", "title": "" }, { "docid": "b967fd928f1c2d4a446072ef99170ec3", "score": "0.7344625", "text": "function smallNavFunctionality() {\r\n var windowWidth = window.innerWidth;\r\n var mainNav = $(\".navigation-holder\");\r\n var smallNav = $(\".navigation-holder > .small-nav\");\r\n var subMenu = smallNav.find(\".sub-menu\");\r\n var megamenu = smallNav.find(\".mega-menu\");\r\n var menuItemWidthSubMenu = smallNav.find(\".menu-item-has-children > a\");\r\n\r\n if (windowWidth <= 991) {\r\n subMenu.hide();\r\n megamenu.hide();\r\n menuItemWidthSubMenu.on(\"click\", function(e) {\r\n var $this = $(this);\r\n $this.siblings().slideToggle();\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n })\r\n } else if (windowWidth > 991) {\r\n mainNav.find(\".sub-menu\").show();\r\n mainNav.find(\".mega-menu\").show();\r\n }\r\n }", "title": "" }, { "docid": "18e3817879a88fa4d692b96226e9e859", "score": "0.73067623", "text": "function smallNavFunctionality() {\r\n var windowWidth = window.innerWidth;\r\n var mainNav = $(\".navigation-holder\");\r\n var smallNav = $(\".navigation-holder > .small-nav\");\r\n var subMenu = smallNav.find(\".sub-menu\");\r\n var megamenu = smallNav.find(\".mega-menu\");\r\n var menuItemWidthSubMenu = smallNav.find(\".menu-item-has-children > a\");\r\n\r\n if (windowWidth <= 991) {\r\n subMenu.hide();\r\n megamenu.hide();\r\n menuItemWidthSubMenu.on(\"click\", function(e) {\r\n var $this = $(this);\r\n $this.siblings().slideToggle();\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n })\r\n } else if (windowWidth > 991) {\r\n mainNav.find(\".sub-menu\").show();\r\n mainNav.find(\".mega-menu\").show();\r\n }\r\n }", "title": "" }, { "docid": "9de7cd84215246f60daa1e689b92cd9e", "score": "0.729178", "text": "function mostrar_menu_lg(){\n\t$(window).resize(function(){\n\t\t\n\t\tif($(window).width() > 768){\n\t\t\tmenu.css({'display':'block'});\n\t\t}else{\n\t\t\tmenu.hide();\n\t\t}\n\t});\n}", "title": "" }, { "docid": "262349f80e1166a6ec6d5461f46752ae", "score": "0.72631", "text": "function smallNavFunctionality() {\n var windowWidth = window.innerWidth;\n var mainNav = $(\".navigation-holder\");\n var smallNav = $(\".navigation-holder > .small-nav\");\n var subMenu = smallNav.find(\".sub-menu\");\n var megamenu = smallNav.find(\".mega-menu\");\n var menuItemWidthSubMenu = smallNav.find(\".menu-item-has-children > a\");\n\n if (windowWidth <= 991) {\n subMenu.hide();\n megamenu.hide();\n menuItemWidthSubMenu.on(\"click\", function(e) {\n var $this = $(this);\n $this.siblings().slideToggle();\n e.preventDefault();\n e.stopImmediatePropagation();\n })\n } else if (windowWidth > 991) {\n mainNav.find(\".sub-menu\").show();\n mainNav.find(\".mega-menu\").show();\n }\n }", "title": "" }, { "docid": "d216e085a972f51e509d5a386b78dcb7", "score": "0.72519666", "text": "function setMenu() {\n\n $('.cross').hide();\n $('.hamburger').hide();\n\n\n if ($(window).width() < 1000) {\n $('.sticky_list').hide();\n $('.hamburger').show();\n $('.mobileMenu').hide();\n $('.stickylogo').hide();\n\n\n } else {\n $('.sticky_list').show();\n $('.hamburger').hide();\n $('.mobileMenu').hide();\n $('.stickylogo').show();\n }\n }", "title": "" }, { "docid": "250e3e1807fcefda631a42b7c956e3b4", "score": "0.7243733", "text": "function triggerMenu() {\n\n //check if window size is less than trigger size\n if ($(window).width() <= settings.TriggerWidth) {\n\n //show menu toggle\n $(\".\" + settings.MenuToggleClass).show();\n }\n else {\n\n //hide menu toggle\n $(\".\" + settings.MenuToggleClass).hide();\n \n //close menu\n if (menuOpen) {\n toggleMenu();\n }\n }\n }", "title": "" }, { "docid": "c67805a2826533dc06f41ac5b9649de0", "score": "0.7239263", "text": "function checkWidth() {\n\t\tif ($window.width() < 980) {\n\t\t\t$('.nav-one').removeClass('nav-right');\n\t\t\t$('.nav-two').removeClass('nav-left');\n\t\t\t$('.nav-one, .nav-two').addClass('nav-center');\n\t\t};\n\n\t\tif ($window.width() >= 980) {\n\t\t\t$('.nav-one').addClass('nav-right');\n\t\t\t$('.nav-two').addClass('nav-left');\n\t\t\t$('.nav-one, .nav-two').removeClass('nav-center');\n\t\t}\n\t}", "title": "" }, { "docid": "70d5a81819bcec025d51fa7d62c0e963", "score": "0.7237647", "text": "function responsive() {\n\tvar wi = $(window).width();\n\n\tif (wi <= 999){\n\t\t$(\".menu\").removeClass(\"menu\").addClass(\"menu-mobile\");\n\t\t$(\".content\").removeClass(\"content\").addClass(\"content-mobile\");\n\t\t}\n\telse if (wi >= 1000){\n\t\t$(\".menu-mobile\").removeClass(\"menu-mobile\").addClass(\"menu\");\n\t\t$(\".content-mobile\").removeClass(\"content-mobile\").addClass(\"content\");\n\t\t}\n}", "title": "" }, { "docid": "f27bf4a4b7f51521aae679458ab853f7", "score": "0.7215652", "text": "function checkWindowSize() {\n if($(window).width() < 400){\n self.showList(false);\n }\n }", "title": "" }, { "docid": "f27bf4a4b7f51521aae679458ab853f7", "score": "0.7215652", "text": "function checkWindowSize() {\n if($(window).width() < 400){\n self.showList(false);\n }\n }", "title": "" }, { "docid": "da17ffae85408c93d31a97ae9f139d65", "score": "0.71807337", "text": "function checkSize(){\n\tvar screenWidth = window.outerWidth;\n if(screenWidth < 991.98){\n\t\tmobilePerformance();\n\t\tresponsiveStickyMenu();\n\t} else if(screenWidth > 992){\n\t\tdesktopPerformance()\n\t} else if (screenWidth < 767){\n\t\tdashboardMobile()\n\t}\n}", "title": "" }, { "docid": "e1753bda6e9e17fe5967d8af80da1125", "score": "0.71730155", "text": "function checkRes()\n{\n var w = window.innerWidth;\n if(w > 354)\n {\n mNav.style.transform = \"scale(1)\";\n }\n else if(w <= 354)\n {\n mNav.style.transform = \"scale(0 )\";\n }\n}", "title": "" }, { "docid": "30ebba4579a101c35e46a6a2abb9c2fb", "score": "0.71351427", "text": "function checkWidth(init) {\n\n if ($(window).width() > 750) {\n $(\"#navItems\").collapse('hide');\n $('.nav-pills').removeClass('flex-column');\n }\n else{\n $('.nav-pills').addClass('flex-column');\n }\n}", "title": "" }, { "docid": "b1ce16bd1f1dae56f4a08e2781466567", "score": "0.71015865", "text": "checkWindowWidth(windowWidth) {\n if (this.navLayout === 'vertical') {\n if (windowWidth >= 768 && windowWidth <= 1024) {\n this.defaultNavbar = this.defaultVerticalMenu[1];\n this.toggleNavbar = this.onToggleVerticalMenu[1];\n this.navBarEffect = this.navBarMenuEffect[1];\n this.deviceType = this.defaultDeviceType[1];\n } else if (windowWidth < 768) {\n this.defaultNavbar = this.defaultVerticalMenu[0];\n this.toggleNavbar = this.onToggleVerticalMenu[0];\n this.navBarEffect = this.navBarMenuEffect[0];\n this.deviceType = this.defaultDeviceType[0];\n } else {\n this.defaultNavbar = this.defaultVerticalMenu[2];\n this.toggleNavbar = this.onToggleVerticalMenu[2];\n this.navBarEffect = this.navBarMenuEffect[2];\n this.deviceType = this.defaultDeviceType[2];\n }\n } else if (this.navLayout === 'horizontal') {\n if (windowWidth >= 768 && windowWidth <= 1024) {\n this.deviceType = this.defaultDeviceType[1];\n } else if (windowWidth < 768) {\n this.deviceType = this.defaultDeviceType[0];\n } else {\n this.deviceType = this.defaultDeviceType[2];\n }\n }\n\n this.getDefaultNavbar(this.defaultNavbar);\n this.getToggleNavbar(this.toggleNavbar);\n this.getNavBarEffect(this.navBarEffect);\n this.getDeviceType(this.deviceType);\n }", "title": "" }, { "docid": "2c21dc65580baee993641145942acc9f", "score": "0.7097865", "text": "function is_resize(){\n\t\tif($( window ).width() > 600){\n\t\t\t$( '.main-wrap .left-content' ).show();\n\t\t\t$( '.main-wrap .right-content' ).show();\n\t\t\t$( '.main-wrap .left-content' ).css( {\"max-width\":'40%'} );\n\t\t\t$( '.main-wrap .right-content' ).css( {\"max-width\":'60%'} );\n\t\t}else{\n\t\t\tif(isfocus < 1){\n\t\t\t\t$( '.main-wrap .left-content' ).show();\n\t\t\t\t$( '.main-wrap .right-content' ).hide();\n\t\t\t\t$( '.main-wrap .left-content' ).css( {\"max-width\":'100%'} );\n\t\t\t}else\n\t\t\t\tisfocus=0;\n\t\t}\n\t}", "title": "" }, { "docid": "61e3598cc2866bbc839a6590b1aa70b5", "score": "0.7078574", "text": "function width() {\n if ($(window).width() < 834) {\n $('nav').addClass('bg-opac');\n } else {\n $('nav').removeClass('bg-opac');\n }\n }", "title": "" }, { "docid": "35ecce22deeb969abe60171aeed2bb42", "score": "0.70746404", "text": "function isMobile(){\n return ($(window).width() < settings.switchWidth);\n }", "title": "" }, { "docid": "35ecce22deeb969abe60171aeed2bb42", "score": "0.70746404", "text": "function isMobile(){\n return ($(window).width() < settings.switchWidth);\n }", "title": "" }, { "docid": "f5c80164d38a2ed0104362ec65753bef", "score": "0.707217", "text": "function checkWindowSize() { \r\n if ( $(window).width() < 480) { \r\n $('#sidebar').addClass('sidebar-menu-collapsed'); \r\n $('#sidebar').removeClass('sidebar-menu-expanded'); \r\n\t\t$('#sidebar-content').css('display','none');\r\n\t\t$('.navbar-right').css('display','none');\r\n\t\t$('.zoom-level-nav').css('left','80px');\r\n }\r\n}", "title": "" }, { "docid": "5019dd9cdb8baab0a1d36ccc456c4b72", "score": "0.7035212", "text": "function smallScreenWidthMgr() {\n var w = $(window).outerWidth();\n if( w <= 767) {\n $('div[role=\"navigation\"]').css({'marginTop':'73px','position':'absolute'});\n\n // Correct logo placement\n $logo = $('.forge-logo-smaller');\n $logo.css({'marginLeft':((w/2) - 75)+'px'});\n // Add a border to dropdown menu\n //$('#navBarMain').css({'border':'1px solid white'});\n }\n\n // Run same function on any window resize.\n $(window).resize(function() {\n var rW = $(window).outerWidth();\n if(rW < 767) {\n $('div[role=\"navigation\"]').css({'marginTop':'73px','position':'absolute'});\n\n // Correct logo placement\n $logo = $('.forge-logo-smaller');\n $logo.css({'marginLeft':((rW/2)- 75)+'px'});\n\n // Add a border to dropdown menu\n $('#navBarMain').css({'border':'1px solid white'});\n\n } else\n if(rW >= 767) {\n $('div[role=\"navigation\"]').css({'marginTop':'30px','position':'relative'});\n\n // Remove border from dropdown menu, if present\n $('#navBarMain').css({'border':'none'});\n\n }\n });\n}", "title": "" }, { "docid": "bb7afe55287a24328393adc84e371079", "score": "0.70242846", "text": "function checkWidth() {\n var page = $('body'); \n var topBar = $('#top-bar');\n var widthSize = 768;\n \n\n if ($(window).width() < widthSize) {\n page.addClass('mobile'); \n topBar.addClass('inactive');\n \n } else {\n page.removeClass('mobile');\n topBar.removeClass('inactive');\n }\n }", "title": "" }, { "docid": "05ff8e47c6ba406a2de195d34ea39982", "score": "0.6986083", "text": "function isMobile() {\n if($window.width() >= 1300 ){\n $menuContent.slideDown(0);\n mobile = false;\n } else {\n mobile = true;\n }\n }", "title": "" }, { "docid": "618a24795e080e7952b21f90fdddb7a4", "score": "0.6951385", "text": "function equiNavBreakpoint () {\r\n\t$('.equinav ul.navbar-nav > li').each(function(){ breakpoint += $(this).innerWidth(); }); //add up all menu items width for breakpoint\r\n}", "title": "" }, { "docid": "96932c244c20e91c2ed4b1ac469533f9", "score": "0.6942054", "text": "function stickyMenuSize() {\n if(document.body.clientWidth < 480) {\n document.body.querySelector(\".sticky-header\").style.width = getComputedStyle(document.body.querySelector(\"header\")).width;\n }\n document.body.querySelector(\".sticky__tablet-menu\").style.width = getComputedStyle(document.body.querySelector(\".filters\")).width;\n}", "title": "" }, { "docid": "6a1bf5e350b21aa365f1fe94062aa77d", "score": "0.6903981", "text": "function windowLoad(){\n\t var windowWidth=window.outerWidth;\n\t if(windowWidth<=1000)\n\t {\n\t\tif($('.slide-menu').hasClass('hidden-menu'))\n\t\t{\n\t\t\t// do nothing\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\t$(\".slide-menu .rightInfoBar\").click();\n\t\t}\t\n\t }\n}", "title": "" }, { "docid": "9f88646b9e7b192364c6c8ad849a32dc", "score": "0.6898069", "text": "function menu_mobile(){\n if (isMobileWidth == true){\n $(\"#header-nav__list\").hide();\n $('body').click(function(){...};\n }\n else if (isMobileWidth == false){...}\n}", "title": "" }, { "docid": "5b1c51961db3122eaecc8a9140e0c20c", "score": "0.6887924", "text": "function htheme_toggle_menu(window_width){\n\n jQuery('.htheme_icon_mobile').remove();\n\n if(window_width <= global_mobile_break_point){\n jQuery('.htheme_main_navigation').addClass('htheme_mobile');\n jQuery('.htheme_main_navigation').removeClass('htheme_default');\n jQuery('.htheme_inner_navigation').prepend('<div class=\"htheme_icon_mobile\" data-toggle=\"'+htheme_toggle+'\"></div>');\n if(htheme_toggle !== 'close'){\n jQuery('.htheme_mobile .htheme_nav').css({\n 'right':-(window_width)\n })\n }\n //SET BG COLOR\n TweenMax.to( jQuery('.htheme_default_navigation'), 0.5, {\n //backgroundColor:jQuery('.htheme_default_navigation').attr('data-mobile-background'),\n ease:Strong.easeOut\n }\n );\n htheme_check_logo('mobile');\n } else {\n jQuery('.htheme_main_navigation').removeClass('htheme_mobile');\n jQuery('.htheme_main_navigation').addClass('htheme_default');\n jQuery('.htheme_icon_mobile').remove();\n jQuery('body').css({\n 'margin-left':0,\n 'width':'auto'\n });\n //SET BG COLOR\n TweenMax.to( jQuery('.htheme_default_navigation'), 0.5, {\n ease:Strong.easeOut\n }\n );\n //REMOVE STYLES\n jQuery('.htheme_nav').removeAttr('style');\n //ENABLE HOVERS\n htheme_enable_hovers();\n htheme_check_logo('default');\n }\n\n toggle = 'open';\n\n //ENABLE MOBILE\n htheme_enable_toggle();\n\n}", "title": "" }, { "docid": "39d5a2e8bbe22d083d5545e35f88d4ca", "score": "0.6886599", "text": "function openNav() {\n \nif (window.matchMedia('screen and (max-width:970px) , (max-height:465px').matches) {\n// do smth\ndocument.getElementById(\"mySidenav\").style.width = \"100%\";\n} else {\n// do smth.else \ndocument.getElementById(\"mySidenav\").style.width = \"25%\";\n}\n\n\n\n}", "title": "" }, { "docid": "e01a62052b0a55b5e080c0a4545b0f24", "score": "0.68480587", "text": "doSizeCheck() {\n if (window.innerWidth > 640) {\n this.setState({ isMobile: false });\n this.props.updateMenuVisibility(true);\n } else {\n this.setState({ isMobile: true });\n this.props.updateMenuVisibility(false);\n }\n }", "title": "" }, { "docid": "d0f09bea5b9deca33ffbc153f46c91e8", "score": "0.6829698", "text": "function handleWindowResize() {\r\n width = window.innerWidth;\r\n}", "title": "" }, { "docid": "128e3a79eb56316a6c105b52ed96f30a", "score": "0.6823169", "text": "function adjustFlexMenu(){\nif ($(window).width() !== windowWidth || $(window).height() !== windowHeight){\n$(flexObjects).each(function (){\n$(this).flexMenu({\n'undo' :true\n}).flexMenu(this.options);\n});\nwindowWidth = $(window).width();// Store the window width if it changed\nwindowHeight = $(window).height();// Store the window height if it changed\n}\n}", "title": "" }, { "docid": "a431388476dff92880f47b147f328352", "score": "0.68152356", "text": "function adjustNav() {\n\n\tif ($(document).width() < 850) {\n\n\t\t$(\"nav.main-menu\").removeClass(\"full\").addClass(\"compact\");\n\t\t$(\"nav.main-menu ul\").hide();\n\t}\n\n\telse {\n\n\t\t$(\"nav.main-menu\").removeClass(\"compact\").addClass(\"full\");\n\t\t$(\"nav.main-menu ul\").show();\n\t}\n}", "title": "" }, { "docid": "fe284ccdeafdab067146d2b16e8cfd4c", "score": "0.68043846", "text": "function windowSizeClicker() {\n\tif (window.matchMedia(\"(min-width: 950px)\").matches) {\n\t} else {\n\t\thamburger.click();\n\t}\n}", "title": "" }, { "docid": "65a384258da9b13babebb8c0839d1275", "score": "0.6772805", "text": "function center_menu()\n{\n\n\t\n\t//SHOW MENU\n\t\n\tif($('header nav:animated').length == 0)\n\t{\n\t\tif(!($.browser.msie && $.browser.version < 9))\n\t\t{\n\t\t\tif (Modernizr.mq('only screen and (min-width: 730px)') && !Modernizr.mq('only screen and (min-width: 981px)'))\n\t\t\t{\n\t\t\t\tvar body = $('body').width();\n\t\t\t\tvar menu = $('.wrapper-nav-ul').width()\n\t\t\t\tvar final_margin = (body/2)-(menu/2);\n\t\t\t\t$('.wrapper-nav-ul').css('margin-left',final_margin);\n\t\t\t\t//$('header nav').show();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$('.wrapper-nav-ul').css('margin-left','0');\n\t\t\t\t//$('header nav').show();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//REMOVE OVERLAY HEIGHT IF WIDTH > 730 \n\t\t\tif(Modernizr.mq('only screen and (min-width: 730px)') || Modernizr.mq('only screen and (min-width: 981px)') )\n\t\t\t{\n\t\t\t\t$('body').css('height','auto');\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\n}", "title": "" }, { "docid": "5ee6793b91b42a0d6099f2a8270dfb6a", "score": "0.67656237", "text": "function setSocialNavWidth(){\n\tvar width = $(window).width();\n\tvar leftPanelWidth = Math.round((1.328125/100)*width);\n\t/*var rightGap = 354;\n\tvar navContentsWidthFixed = 608;\n\tvar socialTabContentWidthFixed = 94;*/\n\tvar socialTabFixedWidth = 129;\n\tvar socialNavWidth = (socialTabFixedWidth/(width - leftPanelWidth))*100;\n\tif (width>1280) {\n\t\t/*var socialNavWidth = Math.round((width - leftPanelWidth - rightGap - navContentsWidthFixed)/6);\n\t\tsocialNavWidth = socialNavWidth + socialTabContentWidthFixed;*/\n\t\tif (sessionStorage.selectedLanguage === 'ja') {\n\t\t\tsocialNavWidth = socialNavWidth + 1.5;\n\t\t\t$('#socialNav').css('min-width', socialNavWidth + \"%\");\n\t\t} else {\n\t\t\t$('#socialNav').css('min-width', socialNavWidth + \"%\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f06eb648671e3f9e2c70af3f795e149d", "score": "0.6762936", "text": "function theclick_touched_side(){\n 'use strict';\n var $menu = $('.ef5-header-menu');\n if($(window).width() > 1200 ){\n $('#ef5-navigation').attr('style','');\n $menu.find('li').each(function(){\n var $submenu = $(this).find('> .ef5-dropdown');\n if($submenu.length > 0){\n if($submenu.offset().left + $submenu.outerWidth() > $(window).innerWidth()){\n $submenu.addClass('touched');\n } else if($submenu.offset().left < 0){\n $submenu.addClass('touched');\n }\n /* remove css style display from mobile to desktop menu */\n $submenu.css('display','');\n } \n });\n }\n }", "title": "" }, { "docid": "9a753ec710eea45747d2ad44de717d40", "score": "0.67592347", "text": "function openMenu(){\n\n let fullWidth = 40;\n\n if(window.innerWidth < 768){\n fullWidth = 70;\n }\n\n document.getElementById('sideNavItems').style.display = 'none';\n document.getElementById('sideNavBar').style.display = 'block';\n document.getElementById('sideNavBar').style.width = 0;\n\n let width = 0;\n var slideInInterval = setInterval(function(){\n width++;\n document.getElementById('sideNavBar').style.width = width + 'vw';\n if(width >= fullWidth) {\n clearInterval(slideInInterval);\n document.getElementById('sideNavItems').style.display = 'flex';\n }\n }, 10);\n}", "title": "" }, { "docid": "d2cbd77cbff753b034c9cd13afa81ec8", "score": "0.67591095", "text": "function fitMenu() {\n if (el(\"menu0\") != null) {\n el(\"menu0\").style.left = ((window.innerWidth || document.body.clientWidth) / 2) - 457 + \"px\";\n el(\"menu0\").style.top = $(document).scrollTop() + 36 + \"px\";\n }\n}", "title": "" }, { "docid": "73f6b68dbbdd457fa24fdf549743b1c3", "score": "0.67574674", "text": "sbOnResize() {\n\n // If sidebar menu is set to Horizontal mode we return\n // as the menu operates using pure CSS\n if ($('body.sb-top').length) {\n // If window is < 1080px wide collapse both sidebars and add \".mobile-view\" class\n if ($(window).width() < 900 && !$('body').hasClass('sb-top-mobile')) {\n $('body').addClass('sb-top-mobile');\n } else if ($(window).width() > 900) {\n $('body').removeClass('sb-top-mobile');\n }\n return;\n }\n\n // If window is < 1080px wide collapse both sidebars and add \".mobile-view\" class\n if ($(window).width() < 1080 && !$('body').hasClass('mobile-view')) {\n $('body').removeClass('sb-r-o').addClass('mobile-view sb-l-m sb-r-c');\n } else if ($(window).width() > 1080) {\n $('body').removeClass('mobile-view');\n } else {\n return;\n }\n\n this.resizeBody();\n }", "title": "" }, { "docid": "767b065e646e7899850b785b402976f9", "score": "0.67570287", "text": "function setRoleNavWidth(){\n\tvar width = $(window).width();\n\tvar leftPanelWidth = Math.round((1.328125/100)*width);\n\t/*var rightGap = 354;\n\tvar navContentsWidthFixed = 608;\n\tvar roleTabContentWidthFixed = 69;*/\n\tvar roleTabFixedWidth = 104;\n\tvar roleNavWidth = (roleTabFixedWidth/(width - leftPanelWidth))*100;\n\tif (width>1280) {\n//\t\tvar roleNavWidth = Math.round((width - leftPanelWidth - rightGap - navContentsWidthFixed)/6);\n//\t\troleNavWidth = roleNavWidth + roleTabContentWidthFixed;\n\t\t$('#roleNav').css('min-width', roleNavWidth + \"%\");\n\t}\n}", "title": "" }, { "docid": "7581a6f130065b1e19f0d57261362ac8", "score": "0.67535764", "text": "function MessagesMenuWidth() {\n var W = window.innerWidth;\n var W_menu = $('#sidebar-left').outerWidth();\n var w_messages = (W - W_menu) * 16.666666666666664 / 100;\n $('#messages-menu').width(w_messages);\n}", "title": "" }, { "docid": "22d387de00703dccfd36b4ba3332da86", "score": "0.67509156", "text": "function handleWindowResize() {\n width = window.innerWidth;\n }", "title": "" }, { "docid": "d2f31c43cbef0bffcb3dcbcde9da4337", "score": "0.67431515", "text": "function _nav_windowsizeChange() {\n \n if (resolution!='xs') {\n \n // hauteur de la liste\n var notiflistheight = ($('header .open .notif-list>ul>li').length * $('header .open .notif-list>ul>li:first-child').innerHeight()) + 10;\n var menuheight = $('header .header-menu').height()+$('.navbar-container').height();\n if (menurefheight == -1) {\n menurefheight = menuheight;\n _console(\"menurefheight[\"+menurefheight+\"]\");\n }\n _console(\"(\"+resolution+\"): $w.h[\"+$w.innerHeight()+\"] < menurefheight[\"+menurefheight+\"]\");\n var lh;\n \n if ($w.innerHeight()<menurefheight) {\n \n if (!$('header .open .notif-list > ul').hasClass('scrollable')) $('header .open .notif-list > ul').addClass('scrollable');\n \n lh = Math.max($('header .open .notif-list>ul>li:first-child').innerHeight(), notiflistheight - (menurefheight - $w.innerHeight()));\n \n $('header .open .notif-list > ul').height(lh);\n \n } else {\n if ($('header .open .notif-list > ul').hasClass('scrollable')) $('header .open .notif-list > ul').removeClass('scrollable');\n $('header .open .notif-list > ul').attr('style','');\n }\n }\n else {\n \n if ($('header .open .notif-list > ul').hasClass('scrollable')) $('header .open .notif-list > ul').removeClass('scrollable');\n $('header .open .notif-list > ul').attr('style','');\n menurefheight = -1;\n \n if ($('header .nav-menu.open').length>0) {\n var conth = $('header .nav-menu.open').height()+$('header .nav-menu.open').offset().top;\n var menuh = $('header .nav-menu.open .header-menu').height()+$('header .nav-menu.open .header-menu').offset().top;\n var notifbtm = $('header .nav-menu.open .header-menu .notif-list').offset().top+$('header .nav-menu.open .header-menu .notif-list').outerHeight(true);\n var tbtop = $('header .nav-menu.open .header-menu .toolbar').offset().top;\n _console(\"(\"+resolution+\"): menuh[\"+menuh+\"] <= conth[\"+conth+\"] -- tbtop[\"+tbtop+\"] <= notifbtm[\"+notifbtm+\"]\");\n if (menuh<=conth) {\n if (!$('header .nav-menu.open .header-menu .toolbar').hasClass('fixed')) $('header .nav-menu.open .header-menu .toolbar').addClass('fixed');\n if (tbtop+5<notifbtm) {\n if ($('header .nav-menu.open .header-menu .toolbar').hasClass('fixed')) $('header .nav-menu.open .header-menu .toolbar').removeClass('fixed');\n }\n } else {\n if ($('header .nav-menu.open .header-menu .toolbar').hasClass('fixed')) $('header .nav-menu.open .header-menu .toolbar').removeClass('fixed');\n }\n }\n } \n \n}", "title": "" }, { "docid": "1b3f02508757bc5dc12db44038f09647", "score": "0.67399013", "text": "function mobile_version()\n{\n \n // check resolution for the mobile's version\n if($(window).width() <= 600)\n { \n $(\".menu-js\").css(\"display\", \"none\");\n \n // change menu's view\n if(!($(\"div\").is(\"#icon_menu\")))\n {\n // create and add icon\n $(\"#header\").append(\"<div id='icon_menu'></div>\");\n $(\"#icon_menu\").on(\"click\", show_menu);\n }\n \n \n }\n else if($(window).width() > 600 )\n {\n // icon is exist\n if($(\"div\").is(\"#icon_menu\"))\n { \n // delete icon\n $(\"#icon_menu\").remove();\n $(\".menu-js\").css(\"display\", \"inline-block\");\n }\n }\n}", "title": "" }, { "docid": "8a21fef04bf26b098a2d25a81a61d032", "score": "0.673917", "text": "function handleMiniSidenav() {\n dispatch({\n type: \"MINI_SIDENAV\",\n value: window.innerWidth < 1200,\n });\n }", "title": "" }, { "docid": "5b1e828cfbe55846f7b4cc93dee16252", "score": "0.673173", "text": "function checkWidth() {\n var windowsize = $(window).width();\n if( windowsize < 992){\n $(\".hid\").removeClass(\"collapse\");\n $(\".hid\").addClass(\"collapse\");\n }\n if(windowsize > 991){\n $(\".hid\").addClass(\"collapse\");\n $(\".hid\").removeClass(\"collapse\");\n } \n }", "title": "" }, { "docid": "ac8f8197dad07bebd85a161973379dee", "score": "0.6731612", "text": "function checkScreenSize () {\n if ( $(window).width() <= 600 ) {\n body.removeClass('js-lg-screen');\n }\n\n if ( $(window).width() >= 600 && html.hasClass('nav-open') ) {\n html.removeClass('nav-open');\n\n // revert btnMenu attributes to original state\n btnMenu.attr('data-state', 'off');\n btnMenu.attr('aria-label', 'Reveal Navigation');\n btnMenu.attr('aria-expanded', false);\n }\n }", "title": "" }, { "docid": "a18ddd3dc059163ea54e631b41b9afed", "score": "0.67290497", "text": "function screenResize(){\n screenSize = document.body.clientWidth;\n if(screenSize <= 992){\n displayNav3.style.display = \"none\"\n myToggleOpen.style.display = \"inline\";\n myToggleClose.style.display = \"none\";\n secondNavDiv2.style.display = \"none\";\n nav2InputText.style.display = \"none\";\n } else{\n displayNav3.style.display = \"flex\"\n secondNavDiv2.style.display = \"flex\";\n nav2InputText.style.display = \"flex\";\n nav2InputText.style.width = \"17%\";\n }\n}", "title": "" }, { "docid": "59e29087927a33f7e580204d9bbb7f96", "score": "0.6725595", "text": "function mobileMenuHide() {\n var windowWidth = $(window).width();\n if (windowWidth < 1024) {\n $('.site-nav').addClass('mobile-menu-hide');\n }\n }", "title": "" }, { "docid": "e8c3a003b65a1a6072f505e57ab33bfe", "score": "0.67211056", "text": "function casano_resizeMegamenu() {\r\n var window_size = jQuery('body').innerWidth();\r\n window_size += casano_get_scrollbar_width();\r\n if (window_size > 767) {\r\n if ($('#header .main-menu-wrapper').length > 0) {\r\n var container = $('#header .main-menu-wrapper');\r\n if (container != 'undefined') {\r\n var container_width = 0;\r\n container_width = container.innerWidth();\r\n var container_offset = container.offset();\r\n setTimeout(function () {\r\n $('.main-menu .item-megamenu').each(function (index, element) {\r\n $(element).children('.megamenu').css({'max-width': container_width + 'px'});\r\n var sub_menu_width = $(element).children('.megamenu').outerWidth();\r\n var item_width = $(element).outerWidth();\r\n $(element).children('.megamenu').css({'left': '-' + (sub_menu_width / 2 - item_width / 2) + 'px'});\r\n var container_left = container_offset.left;\r\n var container_right = (container_left + container_width);\r\n var item_left = $(element).offset().left;\r\n var overflow_left = (sub_menu_width / 2 > (item_left - container_left));\r\n var overflow_right = ((sub_menu_width / 2 + item_left) > container_right);\r\n if (overflow_left) {\r\n var left = (item_left - container_left);\r\n $(element).children('.megamenu').css({'left': -left + 'px'});\r\n }\r\n if (overflow_right && !overflow_left) {\r\n var left = (item_left - container_left);\r\n left = left - (container_width - sub_menu_width);\r\n $(element).children('.megamenu').css({'left': -left + 'px'});\r\n }\r\n })\r\n }, 100);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "05e4e448b604013250a0d7ca72d66526", "score": "0.67205805", "text": "function checkWidth(){\n\t\tlet width = $(window).width();\n\t\tif(width <= 440){\n\t\t\tincreaseAmt=10;\n\t\t}\n\t\telse{\n\t\t\tincreaseAmt=5;\n\t\t}\n }", "title": "" }, { "docid": "133f63234e8d2974f6f1a0529736d3a7", "score": "0.6709339", "text": "function openNav() {\n var x = window.matchMedia(\"(max-width:800px)\");\n\n if (x.matches) {\n document.getElementById(\"mySidepanel\").style.width = \"80%\";\n } else {\n document.getElementById(\"mySidepanel\").style.width = \"35%\";\n }\n}", "title": "" }, { "docid": "ec56f9b2a395e670fba03c3e0e370373", "score": "0.66999954", "text": "function handleMobileMenu(){\n\t\tif( $( window ).outerWidth() <= 992 ){\n\t\t\t$('.menu').children().prependTo('.mobile-menu-items');\n\t\t}\n\t\tif( $( window ).outerWidth() > 992 ){\n\t\t\t$('.mobile-menu-items').children().prependTo('.menu');\n\t\t}\n\t}", "title": "" }, { "docid": "9991b84d3c45662343dbafa4e385e434", "score": "0.66946185", "text": "function checkWidth() {\n var windowSize = $(window).width();\n\n if (windowSize < 1220) {\n $('#fixed').removeClass('fixed');\n }\n else if (windowSize >= 1220) {\n $('#fixed').addClass('fixed');\n }\n\n\n }", "title": "" }, { "docid": "d5cc812eca74008e7d628e4291b0e734", "score": "0.6683588", "text": "function reajustar(){\n if (window.innerWidth >= 706.05){\n document.getElementById(\"listaNav\").style.display = \"flex\";\n }else{\n document.getElementById(\"listaNav\").style.display = \"none\";\n }\n}", "title": "" }, { "docid": "48342e309ac9ae18237bd2f30852c451", "score": "0.6679706", "text": "function onResize() {\n\n\t\t\t// Check window width has actually changed and it's not just iOS triggering a resize event on scroll\n\t if ($(window).width() != windowWidth) {\n\n\t // Update the window width for next time\n\t windowWidth = $(window).width();\n\n\t\t\t\t// If window size is okay, allow click event\n\t\t\t\t// and hide main navigation.\n\t\t\t\tif ( $( window ).width() < 841 ) {\n\t\t\t\t\tclickAllowed = true;\n\t\t\t\t\t$( '.main-navigation, .social-links' ).hide();\n\t\t\t\t} else {\n\t\t\t\t\t// If window size is not okay, disallow click\n\t\t\t\t\t// event and display main navigation.\n\t\t\t\t\tclickAllowed = false;\n\t\t\t\t\t$( '.main-navigation, .social-links' ).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1d29b9c6b8ecf58a6239330b54eff216", "score": "0.6678869", "text": "function isMobile() {\n\t\t\treturn ($(window).width() < settings.switchWidth);\n\t\t}", "title": "" }, { "docid": "da357229a65c4e51cc6b31d632745f44", "score": "0.66725665", "text": "function automaticallyHideNavMenuInSmallScreen(){\n if(window.matchMedia(\"(max-width: 604px)\").matches){\n mainList.classList.add(\"hide_in_small_screens\")\n }else{\n mainList.classList.remove(\"hide_in_small_screens\")\n }\n\n }", "title": "" }, { "docid": "c623951f20d20616f2ab2e8d859f5749", "score": "0.66690665", "text": "function menu_mobile() {\n if (($(window).width() < 1025) && ($('.navPages-container #menu').length)) {\n $('#menu').appendTo(\"#menu-mobile .themevale_MobileContent\");\n }\n else if (($(window).width() >= 1025) && (!$('.navPages-container #menu').length)) {\n $('#menu-mobile #menu').appendTo(\".navPages-container\");\n $('.themevale_navPages-item.text-right').appendTo(\".navPages-container\");\n }\n }", "title": "" }, { "docid": "1fc8b8b616fcb91e5b627a6feeb5076b", "score": "0.66626155", "text": "function detectWindowWidth() {\n var mobileWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 730;\n\n var isMobileWidth = window.innerWidth < mobileWidth;\n var body = document.body;\n if (isMobileWidth) {\n body.classList.add('is-mobile-width');\n } else {\n body.classList.remove('is-mobile-width');\n }\n}", "title": "" }, { "docid": "ff706dc5f008fff71f6214f15bca089f", "score": "0.6660614", "text": "function linkAndBurger() {\n if (screen.width <= 780) {\n toggleHamburger();\n }\n}", "title": "" }, { "docid": "814035db841bc63e9576ce6d277e031f", "score": "0.66223514", "text": "function openNav() {\n var broWidth = $( document ).width()\n if(broWidth>700){\n document.getElementById(\"mySidenav\").style.width = \"60%\";\n $('.overlay').css(\"display\", \"block\");\n\n}\nelse{\n document.getElementById(\"mySidenav\").style.width = \"100%\";\n $('.overlay').css(\"display\", \"block\");\n\n}\n}", "title": "" }, { "docid": "6173138b5cdda6754533bbc3efdb035f", "score": "0.6621905", "text": "function checkScreenSize() {\n var win = $(this);\n\n win.width() < 600 ? $('.btn_import').html(\"\") : $('.btn_import').html(\" Import\");\n win.width() < 600 ? $('.btn_viewAll').html(\"\") : $('.btn_viewAll').html(\" View All\");\n win.width() < 600 ? $('.btn_addNew').html(\"\") : $('.btn_addNew').html(\" Add\");\n win.width() < 600 ? $('.btn_deleteAll').html(\"\") : $('.btn_deleteAll').html(\" Empty\");\n\n win.width() <= 968 ? $('h1').fadeOut() : $('h1').fadeIn(500);\n }", "title": "" }, { "docid": "2ac9be679c388fae43e0d1d5435ce4f4", "score": "0.66186446", "text": "function getWindowWidth(){return window.innerWidth;}", "title": "" }, { "docid": "07d4c46fcb856adfa852ad7ed1037c90", "score": "0.6605297", "text": "closeMenusOnResize () {\n if (document.clientWidth >= 768) {\n this.closeMenus(this.dropdowns)\n this.collapse.classList.add('collapse');\n this.collapse.classList.remove('in');\n }\n }", "title": "" }, { "docid": "862230f4ef6da45d8dca67901b723863", "score": "0.66006213", "text": "openNav () {\n document.getElementById('mySidenav').style.width = '100%'\n let x = window.matchMedia('(min-width: 700px)')\n if (x.matches) { // If media query matches\n document.getElementById('mySidenav').style.width = '250px'\n document.getElementById('main').style.marginLeft = '250px'\n } else {\n document.getElementById('mySidenav').style.width = '100%'\n }\n \n document.body.style.backgroundColor = 'rgba(0,0,0,0.4)'\n }", "title": "" }, { "docid": "57211829640fd904107feb08c8fdf67e", "score": "0.6591524", "text": "function setBoxNavWidth(){\n\tvar width = $(window).width();\n\tvar leftPanelWidth = Math.round((1.328125/100)*width);\n\t/*var rightGap = 354;\n\tvar navContentsWidthFixed = 608;*/\n\tvar boxTabFixedWidth = 112;\n\tvar boxNavWidth = (boxTabFixedWidth/(width - leftPanelWidth))*100;\n\tif (width>1280) {\n\t\t/*var boxNavWidth = Math.round((width - leftPanelWidth - rightGap - navContentsWidthFixed)/6);\n\t\tboxNavWidth = boxNavWidth + boxTabContentWidthFixed;*/\n\t\t$('#boxNav').css('min-width', boxNavWidth + \"%\");\n\t}\n}", "title": "" }, { "docid": "0ba6d0d3652f93d6fa8010afa1d9b17a", "score": "0.6589515", "text": "function equiNavMenu () {\r\n\t\r\n\t$('.equinav ul.navbar-nav > li').removeAttr('style');\r\n\t\r\n\tvar mq = window.matchMedia('(min-width: 768px)');\r\n\t\r\n\tvar nav = $('.equinav').innerWidth(); // Navbar Width\r\n\tvar items = $('.equinav ul.navbar-nav > li').length; // Total number of menu items\r\n\tvar space = nav - breakpoint; // Empty navbar space\r\n\tvar spacer = parseInt(space / items); // Number of pixels to spread out to individual menu items. Since decimal places is not good with pixels we have to use parseInt.\r\n\tvar xspace = nav - (breakpoint + (spacer * items)); // The remaining space after getting the spacer with parseInt\r\n\tvar xspacer = Math.ceil(xspace / items); // The remaning number of pixels to distribute to menu items\r\n\t\r\n\tvar num = 0;\r\n\t\r\n\tif (mq.matches) {\r\n\t\r\n\t if (nav > breakpoint) {\r\n\t\t\r\n\t\t\t$('.equinav').removeClass('equinav-collapse');\r\n\t\t\t\r\n\t\t\tif (breakpoint == 0) equiNavBreakpoint();\r\n\t\t\t\r\n\t\t\t$('.equinav ul.navbar-nav > li').each(function(){\r\n\t\t\t\t\r\n\t\t\t\t\t$(this).css({'width':'auto'});\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar itemwidth = 0;\r\n\t\t\t\t\titemwidth = (num < xspace) ? ($(this).innerWidth() + spacer) + xspacer : $(this).innerWidth() + spacer;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).css({'width':itemwidth+'px'});\r\n\t\t\t\t\t\r\n\t\t\t\t\tnum++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $(this).find('.dropdown-menu').length != 0 ) {\r\n\t\t\t\t\t\tif (num == items) $(this).find('.dropdown-menu').addClass('pull-right');\r\n\t\t\t\t\t\tif ($(this).find('.dropdown-menu').innerWidth() < $(this).innerWidth()) $(this).find('.dropdown-menu').css({'width':$(this).innerWidth()+'px'});\r\n\t\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t$('.equinav').addClass('equinav-collapse');\r\n\t\t\t$('.equinav ul.navbar-nav > li > .dropdown-menu').removeAttr('style');\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t} else {\r\n\t\t\r\n\t\t$('.equinav').addClass('equinav-collapse');\r\n\t\t$('.equinav ul.navbar-nav > li > .dropdown-menu').removeAttr('style');\r\n\t\t\r\n\t};\r\n}", "title": "" }, { "docid": "fe90ec7bb485989349a7c71eb5eed843", "score": "0.6573095", "text": "collapseMenu() {\n if (window.innerWidth <= 800) {\n const menu = document.querySelector('.menu');\n document.querySelector('.dimmed-full').style.display = 'none';\n menu.style.transform = `translateX(-${menu.offsetWidth + 6}px)`;\n }\n }", "title": "" }, { "docid": "14d949a16b67db162032083426b3123e", "score": "0.65728843", "text": "function openNav() {\n if (width <= 480) {\n sideNav.style.width = \"70vw\";\n } else {\n sideNav.style.width = \"25%\";\n main.style.marginLeft = \"20rem\";\n }\n}", "title": "" }, { "docid": "7ac5691e69649116143b4b51500b4dc3", "score": "0.65674466", "text": "function resizeWindow() {\n\t\tif (windowWidth < 768) {\n\t\t\taddPlus(childItems);\n\t\t\taddClass(childItems);\n\t\t} else {\n\t\t\t//removePlus(addedPlus);\n\t\t\t//addPlus(childItems).stopPropagation();\n\t\t\t//addClass(childItems).stopPropagation();\n\t\t}\n\t}", "title": "" }, { "docid": "f5f3494e6d4e6dd4cafd7a723019f222", "score": "0.6562508", "text": "function window_resize() {\r\n\tif ($(window).width() >= 800) {\r\n\t\t$(\"div.body\").css(\"left\", \"0\");\r\n\t} else if ($(window).width() < 800 && $(window).width() > 378) {\r\n\t\t$(\"nav.sidebar\").css(\"position\", \"absolute\");\r\n\t\t$(\"div.logo\").css(\"position\", \"absolute\");\r\n\t\t$(\"div.logo\").css(\"top\", \"195px\");\r\n\t\t$(\"div.body\").css(\"left\", \"-230px\");\r\n\t}\r\n}", "title": "" }, { "docid": "82b840142104e41c8c07d2a8a6dea433", "score": "0.65619206", "text": "function Resize()\n{\n\tactive = false;\n\tif (window.innerWidth > 700)\n\t{\n\t\tactive = true;\n\t\tStart();\n\t}\n}", "title": "" }, { "docid": "2bce4dfd81c17b89f67a2e861676fdb6", "score": "0.6554463", "text": "function minWidth(width) {\n var screenWidth = $(window).width();\n if ( screenWidth >= width ) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "dccc26763205a8ce20e0427f28ab8002", "score": "0.6554374", "text": "function navResize() {\n if (window.innerWidth < 700) {\n splitView.openedDisplayMode = WinJS.UI.SplitView.OpenedDisplayMode.overlay;\n splitView.closedDisplayMode = WinJS.UI.SplitView.ClosedDisplayMode.none;\n windowSize = 'small';\n } else {\n splitView.openedDisplayMode = WinJS.UI.SplitView.OpenedDisplayMode.overlay;\n splitView.closedDisplayMode = WinJS.UI.SplitView.ClosedDisplayMode.inline;\n }\n }", "title": "" }, { "docid": "2c0f686dd42fc859abc47b241776e8ea", "score": "0.6551418", "text": "function setSnapshotNavWidth(){\n\tvar width = $(window).width();\n\tvar leftPanelWidth = Math.round((1.328125/100)*width);\n\tvar snapshotTabFixedWidth = 140;\n\tvar snapshotNavWidth = (snapshotTabFixedWidth/(width - leftPanelWidth))*100;\n\tif (width>1280) {\n\t\t$('#snapshotNav').css('min-width', snapshotNavWidth + \"%\");\n\t}\n}", "title": "" }, { "docid": "8e25d9159d045c26a08548c252081c7c", "score": "0.6550755", "text": "function checkSize() {\n if (window.matchMedia(\"(min-width: 960px)\").matches) {\n scotchPanel.close();\n }\n }", "title": "" }, { "docid": "eb1144252fb7f08136ac9c9de6655636", "score": "0.6528957", "text": "function openSideNav() {\n if (deviceWidth.matches) {\n document.getElementById(\"cat-menu\").style.width = \"160px\";\n document.getElementById(\"cat-menu\").style.boxShadow = \".05rem .1rem 1rem #cfd8dc\";\n }else{\n document.getElementById(\"cat-menu\").style.width = \"100%\";\n document.getElementById(\"cat-menu\").style.boxShadow = \"none\";\n }\n}", "title": "" }, { "docid": "e9a00bdd440f16f7a895b9f53f34cca1", "score": "0.65285283", "text": "function handleResize() {\n\n triggerMenu();\n }", "title": "" }, { "docid": "932ad69b06bca6a81f318d1031f8e254", "score": "0.6517913", "text": "function conformMenu() {\n var $grandeMenu = $(this),\n $openDropdown,\n position,\n $tooNarrowMenu;\n\n if (!$grandeMenu || ($openDropdown = $grandeMenu.find(\".dropdown-menu\")).length === 0) {\n return;\n }\n\n position = $openDropdown.offset().left;\n\n if ( $window.width() > 752 ) {\n var navDropdownIsSeparatedFromButton = Math.round($grandeMenu.offset().left + $grandeMenu.outerWidth()) > Math.round(position + $openDropdown.outerWidth() + 1);\n\n if ( position <= 10 && !$grandeMenu.hasClass(CLASS_NAME) && !navDropdownIsSeparatedFromButton) {\n $grandeMenu.addClass(CLASS_NAME);\n }\n\n if (navDropdownIsSeparatedFromButton) {\n $grandeMenu.removeClass(CLASS_NAME);\n }\n\n } else {\n if ( ($tooNarrowMenu = $(\".navbar-nav .grande-menu.\"+CLASS_NAME)).length ) {\n $tooNarrowMenu.removeClass(CLASS_NAME);\n }\n }\n\n }", "title": "" }, { "docid": "3c03bf9f538a11e8776ca6f7aad118e7", "score": "0.6513335", "text": "isMiniScreen() {\n\t\tthis.windowResizeDep.depend();\n\t\treturn $(window).width() <= 800;\n\t}", "title": "" }, { "docid": "4a1d67941b56a5247116e3e9526766b7", "score": "0.6509544", "text": "function setMessageNavWidth(){\n\tvar width = $(window).width();\n\tvar leftPanelWidth = Math.round((1.328125/100)*width);\n\t/*var rightGap = 354;\n\tvar navContentsWidthFixed = 608;\n\tvar messageTabContentWidthFixed = 122;*/\n\tvar messageTabFixedWidth = 157;\n\tvar messageNavWidth = (messageTabFixedWidth/(width - leftPanelWidth))*100;\n\tif (width>1280) {\n\t\t/*var messageNavWidth = Math.round((width - leftPanelWidth - rightGap - navContentsWidthFixed)/6);\n\t\tmessageNavWidth = messageNavWidth + messageTabContentWidthFixed;*/\n\t\t$('#messageNav').css('min-width', messageNavWidth + \"%\");\n\t}\n}", "title": "" }, { "docid": "bc9c274fa74a9e2d2e4a57830818bad7", "score": "0.64995116", "text": "checkResize() {\n if (window.innerWidth < this.state.mobileBreakpoint) {\n if (!this.state.isMobileView) {\n // Just transitioned into mobile state, so hide the options menu\n this.setState({\n isMobileView: true,\n isOptionsMenuShowing: false,\n })\n document.documentElement.style.setProperty('--options-width', \"0px\");\n } // else { // We went from mobile to mobile, don't need to do anything\n } else {\n // We are in desktop state\n this.setState({\n isMobileView: false,\n isOptionsMenuShowing: true,\n })\n document.documentElement.style.setProperty('--options-width', \"400px\");\n }\n\n // Redraw with the new mobile conditions\n this.drawMap()\n }", "title": "" }, { "docid": "d4d23dd3f7a4ebff4729212e0df34e20", "score": "0.6494963", "text": "function responsive(){\r\n global.windowWidth = $(window).width();\r\n if(global.windowWidth <=800){\r\n $('#footer-image').show();\r\n var height = $('#footer-image').outerHeight();\r\n $('#wrapp-content').css('padding-bottom',height);\r\n }\r\n else {\r\n maquetacion();\r\n }\r\n }", "title": "" }, { "docid": "a8db2063a0c2512204224aa8a2966670", "score": "0.64850277", "text": "function isMobileWidth() {\n\treturn $(window).width() <= mobileWidth;\n}", "title": "" }, { "docid": "49be45a0bfd04eff4b5f34217dad6ff1", "score": "0.6484243", "text": "function resizeToWindow(){\n\t\n\tvar winWidth = $(window).width()\n\n\tif($('#left-sidebar').width() == parseInt($('#left-sidebar').css('min-width'), 10)){\n\t\t$('#search').css('margin-left', (parseInt($('#left-sidebar').css('min-width'), 10) + 50)); \n\t\t$('.main-content').css('margin-left', 365); \n\t}else{\n\t\t$('#search').css('margin-left', 'calc(25% + 50px)'); \n\t\t$('.main-content').css('margin-left', 'calc(65%/2)');\n\t}\n}", "title": "" }, { "docid": "57265a17a3b3ca27c302a1026859f594", "score": "0.6482628", "text": "function window_resized()\n{\n\t\n\t/*var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n\tvar menu = document.getElementById('menu');\n\t//test.innerHTML = width;\n\tif (width > 568 && menu.style.display == \"none\")\n\t\tmenu.style.display = \"block\";\n\telse if (width < 480 && menu.style.display == \"block\")\n\t\tmenu.style.display = \"none\";\n\t*/\n\t\n\t/* Instead of doing above I need to stop iphone bug of chaning orientation to\n\t\tlandscape works fine, but when changing orientation back to portrait then\n\t\tthe zooming has changed. This fixes it:\n\t*/\n\tdocument.fm.textbox.blur();\n\t\n\tviewport = document.querySelector(\"meta[name=viewport]\");\n\tviewport.setAttribute('content', 'width=520, user-scalable=no, maximum-scale=0.6');\n}", "title": "" }, { "docid": "2b5f342d07a2e818ab491b3683f77980", "score": "0.64735687", "text": "function setStageWidth() {\n\t\t// console.log(\"pozz\");\n if (window.innerWidth < maxPageWidth) {\n resizeStage();\n } else {\n maxStageSize();\n };\n}", "title": "" }, { "docid": "2e1dcbb1022c635c03a099c0125805d3", "score": "0.6471121", "text": "function checkWidth() {\r\n if ($window.width() < 600) {\r\n\t\t\tif($('#detail').hasClass('col-8')){\r\n\t\t\t\t$('#detail').removeClass('col-8').addClass('col-9');\r\n\t\t\t}\r\n };\r\n\r\n if ($window.width() >= 600){\r\n\t\t\tif($('#detail').hasClass('col-9')){\r\n\t\t\t\t$('#detail').removeClass('col-9').addClass('col-8');\r\n\t\t\t}\r\n }\r\n }", "title": "" }, { "docid": "c2972b004691eeb595ef5a487c2f84ed", "score": "0.6468999", "text": "function breakpointCheck() {\n var windoWidth = window.innerWidth;\n if (windoWidth <= defaultOpt.breakpoint) {\n navContainer.removeClass('breakpoint-off').addClass('breakpoint-on');\n } else {\n navContainer.removeClass('breakpoint-on').addClass('breakpoint-off');\n }\n }", "title": "" } ]
2e8300712f153d0c9f5aaa0a9b9e5158
show error message detail
[ { "docid": "fb9e0fe0cb8f8cec9fccbc3f54df3147", "score": "0.0", "text": "function setTipMessage(msg) {\n\t ele_tip_msg_.eq(2).find(\"span\").html(getTimeInfo());\n\t ele_tip_msg_.eq(1).find(\"span\").html(msg);\n\t}", "title": "" } ]
[ { "docid": "e4ca7d367767b680b2966bba57ee04fb", "score": "0.7343929", "text": "function showError(msg)\n\t{\n\t\tresult.setText(msg);\n\t}", "title": "" }, { "docid": "ddf6a36189824ab370b9e62906cefbbc", "score": "0.7074968", "text": "function _displayErrorMessage(){\n\t\tvar $ = NS.jQuery;\n\t\tvar mess = $('#' + diConfig.PRE_MB_CF.MESSAGE.Id).val();\n\t\tif (mess && mess.length > 0){\n\t\t\tnsmess.create({\n\t\t\t\ttitle:\"EDI Error\",\n\t\t\t\tmessage: mess,\n\t\t\t\ttype: nsmess.Type.ERROR\n\t\t\t}).show();\n\t\t}\n\t}", "title": "" }, { "docid": "ab42d40046b50c1f0529c2c3fed5e73f", "score": "0.70533925", "text": "show(info) {\n this.msgs = [{ severity: 'error', summary: 'Message', detail: info }];\n }", "title": "" }, { "docid": "ab42d40046b50c1f0529c2c3fed5e73f", "score": "0.70533925", "text": "show(info) {\n this.msgs = [{ severity: 'error', summary: 'Message', detail: info }];\n }", "title": "" }, { "docid": "8f85ec08683c3df0bc4786e0f776283c", "score": "0.70170367", "text": "showErrorMessage(error) {\n this.showMessage(\"Something is wrong\", error, \"error\");\n }", "title": "" }, { "docid": "0792eebc0f6712bc156bc06faeffc6ce", "score": "0.7012382", "text": "showError(msg, displayArea){\n this.displayMsg(msg, 'warning', displayArea);\n }", "title": "" }, { "docid": "94772f1490a87668ded3b03e7e42500f", "score": "0.6967512", "text": "error(message,title ='Error de consola'){\n this.close();\n if(message.indexOf('CD1000') >=0){ title = 'Opción Inválida'; message = 'Estimado(a), por favor, comuníquese con el desarrollador para ver la solución de este problema. Gracias.'}\n if(iserror){\n this.show(message+\"\",title,States.error);\n }\n else {} \n }", "title": "" }, { "docid": "57c0fe6ced687afe1778345381928045", "score": "0.6929884", "text": "function errorInfo(disp){\n\tfor (var i = 0; i < Error.length; i++) {\n\t\tError[i].style.display = disp;\n\t}\n}", "title": "" }, { "docid": "c48d37b4aa7c4cb37d03328e66d3b87e", "score": "0.69070214", "text": "function showError(error){\n notif.style.display = \"block\";\n notif.innerHTML = `<p> ${error.message} </p>`;\n\n}", "title": "" }, { "docid": "6e9881a0dc2006289f55977a1021b1e8", "score": "0.6866327", "text": "showErrorMessage(error) {\n this.showMessage(\"Something is wrong\", error, \"error\");\n }", "title": "" }, { "docid": "8a24b1aeaa31823b6d0e6471d1d8e215", "score": "0.68614995", "text": "function displayError(msg) {\n displayAlert('danger', msg)\n }", "title": "" }, { "docid": "986287a11cbc8a314319f86e06c65062", "score": "0.68577814", "text": "function displayError(message) {\n\t\t\tCtrl.errorMessage = message.toUpperCase();\n\t\t}", "title": "" }, { "docid": "b4375b6e4d27a88bd570209e9bfa13d8", "score": "0.68484646", "text": "function showError(message)\n{\n writeToElement(latSpanId, '');\n writeToElement(longSpanId, '');\n writeToElement(accSpanId, '');\n writeToElement(altSpanId, '');\n writeToElement(altAccSpanId, '');\n writeToElement(hdgSpanId, '');\n writeToElement(spdSpanId, '');\n\n writeToElement(errorDivId, message);\n}", "title": "" }, { "docid": "63926016f3518578061724b01334ad22", "score": "0.68449193", "text": "function showerror()\n{\n\tpns.device_name.message('text', 'Detect Rack');\n\tpns.device_name.message('activebgcolor', 0.92, 0.95, 0.05, 0.73);\n\tfor(var i=0;i<8;i++)\n\t{\n\t\tpns[Encoders[i]].message('text', Warning[i]);\n\t\tmps[Encoders[i]].message('text', ' ');\n\t}\n}", "title": "" }, { "docid": "485e355849fbbd768ae75e4a97405e09", "score": "0.6834327", "text": "function displayError(error) {\n var errorTypes = {\n 0: \"Unknown error\",\n 1: \"Permission denied by user\",\n 2: \"Position is not available\",\n 3: \"Request timed out\"\n };\n var errorMessage = errorTypes[error.code];\n if (error.code == 0 || error.code == 2) {\n errorMessage = errorMessage + \" \" + error.message;\n }\n var div = document.getElementById(\"location\");\n div.innerHTML = errorMessage;\n }", "title": "" }, { "docid": "6cfe5e4ff7944290de198102d8f02bb9", "score": "0.6830917", "text": "function errorinfo (str) {}", "title": "" }, { "docid": "dc72ac1853726481d21fb97df5895bb2", "score": "0.6828002", "text": "function showError(err){\n Alert.alert('Ops! Ocorreu um problema!', `Mensagem: ${err}`);\n}", "title": "" }, { "docid": "32057536973138123893fb58313111a7", "score": "0.6819766", "text": "showErrors() {\n if (this.isNotEmpty() == false) {\n showError(this.errorElement, \"Invalid input.\");\n } else if (this.isNotNegative() == false) {\n showError(this.errorElement, \"Enter a positive value.\");\n } else if (this.isLessThanHundred() == false) {\n showError(this.errorElement, \"Value should be less than 100.\");\n } else {\n showError(this.errorElement, \"\");\n }\n }", "title": "" }, { "docid": "f07a32265fc39f3cfffc93d6c10aa37b", "score": "0.6817796", "text": "function showError(error){\n\n\t switch(error.code) {\n case error.PERMISSION_DENIED:\n msg.innerHTML = \"User denied the request for Geolocation.\";\n break;\n case error.POSITION_UNAVAILABLE:\n msg.innerHTML = \"Location information is unavailable.\";\n break;\n case error.TIMEOUT:\n msg.innerHTML = \"The request to get user location timed out.\";\n break;\n case error.UNKNOWN_ERROR:\n msg.innerHTML = \"An unknown error occurred.\";\n break;\n default:\n \tmsg.innerHTML = \"Data Loading ...\";\n \tbreak;\n }\n}", "title": "" }, { "docid": "23b3e441e8b0f67152677e210a12f295", "score": "0.6817291", "text": "function displayError(message)\n{\n // display error message, with more technical details if debugMode is true\n displayMessage(\"Error accessing the server! \"+\n (debugMode ? \"<br/>\" + message : \"\"));\n}", "title": "" }, { "docid": "1a6910873d7d6a0de458b7511af0c5c6", "score": "0.6796246", "text": "function showError(err) {\n Alert.alert('Ops! Ocorreu um problema!', `Mensagem: ${err}`)\n}", "title": "" }, { "docid": "fc8d455a3bab926e3036bc766b4cd326", "score": "0.67652124", "text": "function showError(error)\n {\n switch(error.code) \n {\n case error.PERMISSION_DENIED:\n x.innerHTML=\"User denied the request for Geolocation.\"\n break;\n case error.POSITION_UNAVAILABLE:\n x.innerHTML=\"Location information is unavailable.\"\n break;\n case error.TIMEOUT:\n x.innerHTML=\"The request to get user location timed out.\"\n break;\n case error.UNKNOWN_ERROR:\n x.innerHTML=\"An unknown error occurred.\"\n break;\n }\n }", "title": "" }, { "docid": "55b5c5d81715b1525adba510a980da32", "score": "0.6765209", "text": "function showError(err) {\n Alert.alert('Ocorreu um erro!', `Mensagem: ${err}`);\n}", "title": "" }, { "docid": "7c9f0d3d8ed59334ff581e7531235cb8", "score": "0.6760455", "text": "function displayError(message)\n{\n// display error message, with more technical details if debugMode is true\n displayMessage(\"Error accessing the server! \" +\n (debugMode ? \"<br/>\" + message : \"\"));\n}", "title": "" }, { "docid": "ccd63c36210d09c5862bb5b2d7efc860", "score": "0.6759796", "text": "static showError(err) {\n if (typeof err === 'string') {\n toast(err, { type: 'error' });\n } else {\n toast(this.getErrorMsg(err), { type: 'error' })\n }\n }", "title": "" }, { "docid": "a3c5d3003386b70a28c8f2df7b66e73f", "score": "0.6755981", "text": "function showError(prefix, error){\n console.log(error.code)\n hideItem(loading)\n\n switch(error.code) {\n case 'auth/invalid-email':\n\n case 'auth/wrong-password': alert(`${prefix}: Email ou senha inválidos`)\n break;\n\n case 'auth/weak-password': alert(`${prefix}: senha fraca`)\n break;\n\n case 'auth/email-already-in-use': alert(`${prefix}: email já cadastrado`)\n break;\n\n case 'auth/popup-closed-by-user': alert(`${prefix}: o popup de autenticação foi fechado antes da operação ser concluída`)\n break;\n\n case 'storage/canceled': alert(`${prefix}: upload cancelado`)\n break;\n\n case 'storage/unauthorized': alert(`${prefix}: Falha ao acessar o cloud storage`)\n break;\n\n default: alert(`${prefix} ${error.message}`)\n }\n}", "title": "" }, { "docid": "a0dd68b4c54659a46e3b85f0508a5bcd", "score": "0.6740166", "text": "function showError(error){\n NOTIFICATION.style.display = \"block\";\n NOTIFICATION.innerHTML = `<p>${error.message}</p>`;\n}", "title": "" }, { "docid": "20174b512f3e8b9bb094d81cf8acde66", "score": "0.67298204", "text": "showErrors() {\n if (this.isNotEmpty() == false) {\n showError(this.errorElement, \"Invalid input.\");\n } else if (this.isNotNegative() == false) {\n showError(this.errorElement, \"Enter a positive value.\");\n } else if (this.lengthLessThanTwenty() == false) {\n showError(this.errorElement, \"Too long! Enter a valid value.\");\n } else {\n showError(this.errorElement, \"\");\n }\n }", "title": "" }, { "docid": "f7a30b39465a199cf7e98b8c16a8268b", "score": "0.6723524", "text": "function showError(response)\n{\n var error = response.getContentText();\n error = JSON.parse(error);\n \n var error_message = response.getResponseCode() + ' - '+error['error']['message'];\n return error_message;\n}", "title": "" }, { "docid": "43590880d35a62f9f01cf33c6d234b5c", "score": "0.67217666", "text": "function showError(type, text){\n window.console && window.console[type] && window.console[type]('fullPage: ' + text);\n }", "title": "" }, { "docid": "43590880d35a62f9f01cf33c6d234b5c", "score": "0.67217666", "text": "function showError(type, text){\n window.console && window.console[type] && window.console[type]('fullPage: ' + text);\n }", "title": "" }, { "docid": "1c37301bc9d5d1e286688ce7f6bb1413", "score": "0.67020255", "text": "showErrMsg(errors) {\n\t\tconst {showPopup} = this.props;\n\t\tconst errMsg = (\n\t\t\t<div className=\"pu-body\" style={{color: '#ff0b0b', textAlign: 'left'}}>\n\t\t\t\t<ul>\n\t\t\t\t\t{errors.map((err, i) => <li key={i}>{err}</li>)}\n\t\t\t\t</ul>\n\t\t\t</div>)\n\t\tshowPopup(['Error', 'warning', errMsg, true])\n\t}", "title": "" }, { "docid": "0d683a2571ce39c913d27a9553b30a8b", "score": "0.66911787", "text": "function showErr(error) {\n notificationElement.style.display = \"block\";\n notificationElement.innerHTML = `<p> ${error.message}</p>`;\n}", "title": "" }, { "docid": "176fb3bbee6063421733ec4848f1a859", "score": "0.6684582", "text": "error() {\n $(\".content\").html(\"Er is iets fout gegaan bij het laden van het diagram. Probeer het opnieuw.\");\n }", "title": "" }, { "docid": "3bcc8ffa81a2b8cb2e5ba27afb69fa35", "score": "0.66549486", "text": "function showError(type, text){\n console && console[type] && console[type]('fullPage: ' + text);\n }", "title": "" }, { "docid": "e3196bd53e9988530810f02905cd167a", "score": "0.6654393", "text": "function displayError(message)\n{\n displayMessage(\"Error accessing the server! \"+(debugMode ? \"<br/>\" + message : \"\"));\n}", "title": "" }, { "docid": "5159eb2f6c322effdee148c479a6585d", "score": "0.6652344", "text": "showErrors() {\n if (this.isNotEmpty() == false) {\n showError(this.errorElement, \"Invalid input.\");\n } else if (this.isNotNegative() == false) {\n showError(this.errorElement, \"Enter a positive value.\");\n } else if (this.isNotZero() == false) {\n showError(this.errorElement, \"Value cannot be 0.\");\n } else if (this.lengthLessThanTwenty() == false) {\n showError(this.errorElement, \"Too long! Enter a valid value.\");\n } else {\n showError(this.errorElement, \"\");\n }\n }", "title": "" }, { "docid": "76eb2febc66052d1a3384e49d913834b", "score": "0.6651725", "text": "function showError(type, text){\r\n console && console[type] && console[type]('fullPage: ' + text);\r\n }", "title": "" }, { "docid": "8323799c1c3915ff97b2ea6224fedde2", "score": "0.663451", "text": "showErrorMsg( error ) {\n this.setLastActivity();\n\n if ( error.error ) {\n toastr.error( i18n.general[ error.error ] );\n\n if ( error.error === 'token_expired' ) { router.push( '/login' ); }\n } else if ( error.response && error.response.status === 403 ) {\n toastr.error( i18n.general.permission_denied );\n } else if ( error.response && error.response.status === 404 ) {\n toastr.error( i18n.general.invalid_link );\n } else if ( error.errors.message ) { toastr.error( error.errors.message[ 0 ] ); }\n }", "title": "" }, { "docid": "8d20cbd5e87bf4d9f4d395966ea36521", "score": "0.6633601", "text": "function showError(error) {\n //console.log(error);\n window.alert('An error has occurred, please try again.');\n }", "title": "" }, { "docid": "17f034acf6d80fb8353e25de7bcd1f08", "score": "0.6633214", "text": "function showError(error)\n{\n\tvar x=document.getElementById(\"results\");\n\tswitch(error.code) \n\t{\n\t\tcase error.PERMISSION_DENIED:\n\t\t x.innerHTML=\"Vous avez refus&eacute; l&rsquo;acc&egrave;s &agrave; la G&eacute;olocalisation.\"\n\t\t break;\n\t\tcase error.POSITION_UNAVAILABLE:\n\t\t x.innerHTML=\"G&eacute;olocalisation indisponible, veuillez regarder dans l&rsquo;aide ou activer le service dans les reglages de votre appareil.\"\n\t\t break;\n\t\tcase error.TIMEOUT:\n\t\t x.innerHTML=\"La demande de G&eacute;olocalisation a expir&eacute;(user location request timed out).\"\n\t\t break;\n\t\tcase error.UNKNOWN_ERROR:\n\t\t x.innerHTML=\"Erreur inconnue de G&eacute;olocalisation (unknown error occurred).\"\n\t\t break;\n\t}\n}", "title": "" }, { "docid": "79ebb9de764c89275027384e4fe58be9", "score": "0.6631669", "text": "function showError(type, text) {\n console && console[type] && console[type]('fullPage: ' + text);\n }", "title": "" }, { "docid": "79ebb9de764c89275027384e4fe58be9", "score": "0.6631669", "text": "function showError(type, text) {\n console && console[type] && console[type]('fullPage: ' + text);\n }", "title": "" }, { "docid": "984124bcd96df2cee6a0e4fb95739efc", "score": "0.6630332", "text": "function showErrorMessage() {\n $loader.hide();\n $errorContainer.show();\n }", "title": "" }, { "docid": "0fbb06f5ca0f7df0af11ce664ab05c74", "score": "0.6628539", "text": "_errorMsg(err)\n {\n this._loading(false);\n if (! err) return;\n this.refs['popup'].getWrappedInstance().show(err.toString());\n }", "title": "" }, { "docid": "d9a417a5c7f59ae8566aafcf3cad99a5", "score": "0.66255033", "text": "function showError(errorMsg) {\r\n $ionicPopup.alert({\r\n title: 'AutoTrakk System Message',\r\n template: errorMsg\r\n });\r\n }", "title": "" }, { "docid": "798c669e95146980c4a8130d61c112dd", "score": "0.662375", "text": "function showErrorMessage(title, error) {\n console.error(error);\n var options = {\n title: title,\n body: error.message || \"File \" + title,\n buttons: [apputils_1.Dialog.okButton()],\n okText: 'DISMISS'\n };\n return apputils_1.showDialog(options).then(function () { });\n}", "title": "" }, { "docid": "798c669e95146980c4a8130d61c112dd", "score": "0.662375", "text": "function showErrorMessage(title, error) {\n console.error(error);\n var options = {\n title: title,\n body: error.message || \"File \" + title,\n buttons: [apputils_1.Dialog.okButton()],\n okText: 'DISMISS'\n };\n return apputils_1.showDialog(options).then(function () { });\n}", "title": "" }, { "docid": "399585c03d32c80cf87b412439b91577", "score": "0.6608517", "text": "function showError(givenMessage) {\n var givenDetail = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n var detail = void 0;\n var message = void 0;\n if (message instanceof Error) {\n detail = message.stack;\n message = message.message;\n } else {\n detail = givenDetail;\n message = givenMessage;\n }\n atom.notifications.addError('[' + _constants.CONSOLE_PLUGIN_NAME + '] ' + message, {\n detail: detail,\n dismissable: true\n });\n}", "title": "" }, { "docid": "69d3294216955e911e6bac94704b434f", "score": "0.6607475", "text": "function displayMessage(str){\n\tif(str){\n\t\taa.env.setValue(\"ErrorCode\", \"-1\");\n\t\taa.env.setValue(\"ErrorMessage\", str);\n\t}\n}", "title": "" }, { "docid": "2a29d9b54349ce87d385e21d47658e35", "score": "0.66017723", "text": "showDataErrorMsg( error ) {\n this.setLastActivity();\n\n if ( error.error ) {\n toastr.error( i18n.general[ error.error ] );\n\n if ( error.error === 'token_expired' ) { router.push( '/login' ); }\n } else if ( error.response && error.response.status === 403 ) {\n toastr.error( i18n.general.permission_denied );\n } else if ( error.response && error.response.status === 404 ) {\n toastr.error( i18n.general.invalid_link );\n } else if ( error.response.data.errors.message ) { toastr.error( error.response.data.errors.message[ 0 ] ); }\n }", "title": "" }, { "docid": "7550506a193a9df86de5a2d550cb8147", "score": "0.6592454", "text": "function errorMessage(msg, fullMessage) {\n\t// Show complex error for developers in the console\n\tif(fullMessage) {\n\t\t// Get the message from an Ajax response object\n\t\ttry {\n\t\t\tif(typeof fullMessage == 'object') fullMessage = fullMessage.status + '//' + fullMessage.responseText;\n\t\t} catch(er) {\n\t\t\tfullMessage = \"\";\n\t\t}\n\t\tconsole.error(fullMessage);\n\t}\n\t\n\tmsg = msg.replace(/\\n/g,'<br>');\n\n\t$('statusMessage').showMessage(msg,'bad');\n}", "title": "" }, { "docid": "a56b824b5ddd9742de076dd2bd7a3682", "score": "0.6591967", "text": "function displayError() {\n phoneNumberError = true;\n var alertPopup = $ionicPopup.alert({\n title: '<div class=\"errorTitle\">There is no phone number for this member.</div>',\n template: '<div class=\"errorTemplate\">Please contact the system administrator.</div>',\n buttons: [{ // Array[Object] (optional). Buttons to place in the popup footer.\n text: 'Okay',\n type: 'button-calm'\n }]\n });\n alertPopup.then(function (res) {\n\n });\n }", "title": "" }, { "docid": "35cf5dba879eb6f9d57eb34d3e023c7e", "score": "0.65863454", "text": "function showError(error) {\n hideFilters();\n\n $('.selections').show();\n $('.picker').hide();\n $('.show-another').hide();\n $('.heading').html(`<span>${error}</span><a href = \"index2.html\"><br><div style = \"margin-top: 50px\" class = \"button\">Try Again</div></a>`);\n }", "title": "" }, { "docid": "61e83f9d49565a3c17cdbc451e455a13", "score": "0.65829575", "text": "function showError(result) {\n hideResponses();\n\n document.getElementById(\"error\").innerHTML = result;\n document.getElementById(\"error\").style.display = \"block\";\n}", "title": "" }, { "docid": "d836c2ead0a82480449dc52813131271", "score": "0.6563831", "text": "function resultError(msg, type){\n jQuery('#' + type + '_error').html(msg).show();\n}", "title": "" }, { "docid": "6ad611f0d480882285c213b596813182", "score": "0.65596783", "text": "function showError(error) {\n var text = \"\";\n switch(error.code) {\n case error.PERMISSION_DENIED:\n text = \"You denied the request for Geolocation\";\n break;\n case error.POSITION_UNAVAILABLE:\n text = \"Location information is unavailable\";\n break;\n case error.TIMEOUT:\n text = \"The request to get location timed out. Please try again\";\n break;\n case error.UNKNOWN_ERROR:\n text = \"An unknown error occurred\";\n break;\n }\n printError(weather, text);\n }", "title": "" }, { "docid": "e4adc46ecc6d84b46aeced3f7ce6eb18", "score": "0.6558149", "text": "function showError(error) {\r\n notificationElement.style.display = \"block\";\r\n notificationElement.innerHTML = `<p> ${error.message} </p>`;\r\n }", "title": "" }, { "docid": "01214404e850b5d8e73b15601e013442", "score": "0.6554958", "text": "function showError(error) {\n if(error.code == 1) {\n result.innerHTML = \"Your location is not enabled.\";\n } else if(error.code == 2) {\n result.innerHTML = \"The network is down or the positioning service can't be reached.\";\n } else if(error.code == 3) {\n result.innerHTML = \"The attempt timed out before it could get the location data.\";\n } else {\n result.innerHTML = \"Geolocation failed due to unknown error.\";\n }\n}", "title": "" }, { "docid": "d78a2b43cfd74b9af6dc46a1289126a6", "score": "0.65439487", "text": "function showError(menssage, boldMensage=\"\"){\n hideError();\n hideCorrectMessage();\n $(\"#errorText\").text(menssage);\n $(\"#errorBoldText\").text(boldMensage);\n $(\"#msjErr\").show();\n}", "title": "" }, { "docid": "17a8edde1a1a2bc6e871546c1f1d415a", "score": "0.65438014", "text": "function displaymessage(x, m) {\n let errorId = x.id + \"Error\";\n x.style.border = \"1px solid red\";\n\n let it = document.getElementById(errorId);\n it.innerText = m;\n x.focus();\n }", "title": "" }, { "docid": "c3fb97b58e355fa8a3b3a08d18f32772", "score": "0.65312815", "text": "function showError() {\n var prob = document.getElementById('error');\n prob.textContent = message;\n prob.style.visibility = \"visible\";\n\n}", "title": "" }, { "docid": "9c88bf04f9c7aedb46aa6e206a9020dd", "score": "0.6523881", "text": "function showError() {\n error.innerText = \"\";\n error.style.display = \"flex\";\n // if (!regLog.test(userId.value)) {\n // error.innerText +=\n // \"Логін має складатися з латинських літер та \\n\" +\n // \"чисел та входити в проміжок від 3 до 16 символів\";\n // return false;\n // }\n if (!regEmail.test(email.value)) {\n error.innerText += \"Електронна пошта введена не правильно\";\n return false;\n }\n if (!regPhone.test(phone.value)) {\n error.innerText += \"Введіть номер телефону у форматі +380XXXXXXXXX\";\n return false;\n }\n if (password.value === passwordRepeat.value) {\n if (!regPass.test(password.value)) {\n error.innerText +=\n \"Пароль має містити числа, літери верхнього та нижнього \\n\" +\n \"регістру та входити в проміжок від 8 до 16 символів\";\n return false;\n }\n } else {\n error.innerText += \"Паролі не збігаються\";\n return false;\n }\n\n error.style.display = \"none\";\n return true;\n}", "title": "" }, { "docid": "4a6748c7f5a7c74006eabcefa526ff41", "score": "0.65153784", "text": "function showError(error){\n notificationElemet.style.display = \"block\";\n notificationElemet.innerHTML =`<p> ${error.messege}`;\n}", "title": "" }, { "docid": "204ffd58a4393b3cfe0d56e841f8bb14", "score": "0.6505505", "text": "function showError(msg) {\n\n // Hide the calculated results\n document.querySelector('#results').style.display = 'none';\n\n // Hide the loading gif\n document.querySelector('#loading').style.display = 'none';\n\n // Get UI elements\n const card = document.querySelector('.card');\n const heading = document.querySelector('.heading');\n\n // Create a div element\n const errorDiv = document.createElement('div');\n\n // Assign classes to the div element\n errorDiv.className = \"alert alert-danger\";\n\n // Add the message to the div\n errorDiv.appendChild(document.createTextNode(msg));\n\n // Insert the error message into the DOM before the heading\n card.insertBefore(errorDiv, heading);\n\n // Delete the error message after five seconds\n setTimeout(deleteError, 3000);\n\n}", "title": "" }, { "docid": "1e50d67155511dde79dcba305eed8be1", "score": "0.65023655", "text": "function showError(err) {\r\n if (confirm('An unknown error has occurred.\\n' +\r\n 'Would you like to see more information?', true, 'Unknown Error')) {\r\n alert(err + ': on line ' + err.line, 'Script Error', true);\r\n }\r\n}", "title": "" }, { "docid": "27a9e8a0e4cf131fd7dce9100cde477c", "score": "0.65013963", "text": "function showError(msg) {\n\talert(msg);\n}", "title": "" }, { "docid": "65c5ef9701ba017b203fd77e47f35cdc", "score": "0.6492312", "text": "function show_error($this, error) {\n var group = $this.parents('.control-group');\n group.addClass('error');\n\n // Create the help message span if none exists.\n var $message = $('.help-inline', group);\n if ($message.length === 0) {\n $message = $('<span class=\"help-inline\"></span>');\n $message.appendTo($this.parent());\n }\n\n $message.text(error);\n }", "title": "" }, { "docid": "42b5bce05179600be2a21c603029436d", "score": "0.6478171", "text": "function showError(error) {\n switch(error.code) {\n case error.PERMISSION_DENIED:\n x.innerHTML = \"User denied the request for Geolocation.\"\n break;\n case error.POSITION_UNAVAILABLE:\n x.innerHTML = \"Location information is unavailable.\"\n break;\n case error.TIMEOUT:\n x.innerHTML = \"The request to get user location timed out.\"\n break;\n case error.UNKNOWN_ERROR:\n x.innerHTML = \"An unknown error occurred.\"\n break;\n }\n}", "title": "" }, { "docid": "42b5bce05179600be2a21c603029436d", "score": "0.6478171", "text": "function showError(error) {\n switch(error.code) {\n case error.PERMISSION_DENIED:\n x.innerHTML = \"User denied the request for Geolocation.\"\n break;\n case error.POSITION_UNAVAILABLE:\n x.innerHTML = \"Location information is unavailable.\"\n break;\n case error.TIMEOUT:\n x.innerHTML = \"The request to get user location timed out.\"\n break;\n case error.UNKNOWN_ERROR:\n x.innerHTML = \"An unknown error occurred.\"\n break;\n }\n}", "title": "" }, { "docid": "feec8d3fa5a82ac5bfb9aadcd60a877b", "score": "0.64752895", "text": "_error(err) {\n this._loading(false);\n if (! err.message) return;\n this.refs['popup'].getWrappedInstance().show(err.message);\n }", "title": "" }, { "docid": "f09c4808aa15f30990649ca23818ec3e", "score": "0.647371", "text": "function error() {\n status.textContent = 'Unable to retrieve your location. Please enter a city instead.'\n }", "title": "" }, { "docid": "af59bba80791bf2f55e7db021bc696e2", "score": "0.6473255", "text": "errorMsg(message) {\n this.clearMain();\n const error = document.createElement('p');\n error.id = 'error';\n error.textContent = `❗${message}`;\n this.main.appendChild(error);\n }", "title": "" }, { "docid": "09643348dbb1272f6bdef5df34d91ae6", "score": "0.64644223", "text": "function dniMsgError() {\n \n if (dni.validity.valueMissing) { \n dniError.textContent = 'Debe introducir un DNI';\n } else if (dni.validity.patternMismatch) { \n dniError.textContent = 'El DNI solo puede contener numeros y una única letra';\n } else if (dni.validity.tooShort) {\n dniError.textContent = 'El dni debe tener ${ dni.minLength } caracteres; ha introducido ${ dni.value.length }.';\n }\n \n}", "title": "" }, { "docid": "71257791ada32cdfc530fd59e3130bae", "score": "0.6454033", "text": "function displayError() {\n document.getElementById('result').innerText = 'Error Model';\n document.getElementById('retr').style.display = 'inline-block';\n}", "title": "" }, { "docid": "4019ed0fb66fc4c2ba2194ee0da87ba9", "score": "0.6449785", "text": "function errorUserDetails(error){\n\t\t\tconsole.log(error);\n\t\t}", "title": "" }, { "docid": "88ebc57a75fbceb40ec3f948dd0b6752", "score": "0.6446044", "text": "function errback(err) {\n that.rdbAdmin.showErrorMessage('<pre>' + err[0] + ':' + err[1] + '</pre>');\n }", "title": "" }, { "docid": "01946a07e327aa1ade5526189324dd74", "score": "0.64449847", "text": "function showErr() {\n var err = document.getElementById(\"error\");\n err.style.display = \"block\"; //Toggle css display on \n err.innerHTML = \"*All fields required\"; //Add & display error message\n}", "title": "" }, { "docid": "a70b52fc32ff3969f9f904cfc8d847d5", "score": "0.64430463", "text": "function displayError(err) {\n var errorDiv = $('errorMessages');\n if (errorDivr) {\n errorDiv.append('<p>' + msg + '</p>');\n }\n}", "title": "" }, { "docid": "0c017646b9ea0ae08bb0f9256db3a906", "score": "0.6440549", "text": "formatErrorMessage({ code, message, more_info, details }) {\n const moreInfoMessage = more_info ? `See ${more_info} for more info.` : '';\n const error = {\n message: `Error code ${code || 'N/A'} from Twilio: ${message || 'No message provided'}. ${moreInfoMessage}`,\n code,\n details,\n };\n\n return error;\n }", "title": "" }, { "docid": "f02566188901bab73f421f8e841da8a9", "score": "0.6437429", "text": "function showError(_ref2) {\n var title = _ref2.title,\n description = _ref2.description;\n\n _addons.default.getChannel().emit(_coreEvents.default.STORY_ERRORED, {\n title: title,\n description: description\n });\n\n showErrorDisplay({\n message: title,\n stack: description\n });\n} // showException is used if we fail to render the story and it is uncaught by the app layer", "title": "" }, { "docid": "bcd0e33b4316e745b5b52578570ec710", "score": "0.64300746", "text": "function error_function(data){\n \n swal(\"Error al validar\",validation.errors_stringify(data.message),\"error\");\n }", "title": "" }, { "docid": "3180eab5695012d69ad68cd9b9a34955", "score": "0.6423844", "text": "function showServerError(response) {\n Ext.MessageBox.show({\n title: app_error_server_title,\n msg: response.errors ? response.errors[0].message : response.message,\n buttons: Ext.MessageBox.OK,\n icon: Ext.MessageBox.ERROR\n });\n}", "title": "" }, { "docid": "7691191fa4771379020cb0f3407e97f8", "score": "0.6421695", "text": "function error(msg, title) {\n msgBox(msg, title, OptionPaneClass.ERROR_MESSAGE);\n }", "title": "" }, { "docid": "c1dfc3db9aa07b93fdd210b2ef0564cb", "score": "0.64195657", "text": "function ErrorMessage({ message }) {\r\n return (v$1(\"div\", { class: \"dataview dataview-error-box\" },\r\n v$1(\"p\", { class: \"dataview dataview-error-message\" }, message)));\r\n}", "title": "" }, { "docid": "9444e382e43d98ba1d9a7c87fa997d41", "score": "0.6418374", "text": "function _error(s)\n{\n\tvar obj;\n\t\n\tobj = getDomElement(\"errors\");\n\tobj.innerHTML = s + \"<br/>\" + obj.innerHTML;\n\tobj.style.display = \"block\";\n}", "title": "" }, { "docid": "7d05856be9b44076942ffe34f48a4046", "score": "0.6415843", "text": "function errorDialog(err){\r\n\t\tvar dlg = new dijit.Dialog({\r\n\t\t\ttitle: err.message, \r\n\t\t\textractContent: true,//important in the case of server response, it'll screw your css. \r\n\t\t\tonClick: function(evt){this.hide();},//click anywhere to close\r\n\t\t\tcontent: err.response.text?err.response.text:err.stack\r\n\t\t});\r\n\t\tdlg.show();\r\n\t\tif(!err.responseText) throw err.stack;//extremely useful for asycronons errors, stack otherwise gets lost\r\n\t}", "title": "" }, { "docid": "928bd9791e9d9ea5dac3c3542ace8d43", "score": "0.64154774", "text": "function printError(e) {\n print(e.name);\n print(e.number);\n print(e.description);\n}", "title": "" }, { "docid": "f47acc30119eccf34e33e4998be0f448", "score": "0.64148414", "text": "getErrMessage(){\n const status = this.input.validity;\n\n if(status.typeMismatch){\n this.addError(\"Entry doesn't match the field type\");\n }\n\n if(status.valueMissing){\n this.addError('Must not be left blank');\n }\n }", "title": "" }, { "docid": "e9eeb21dc79fd68e6c9b36698481ee55", "score": "0.6414151", "text": "function error() {\n Spicetify.PopupModal.display({\n title: \"Error\",\n content: \"Selected artist does not have a WikiPedia page, Sorry.\"\n });\n }", "title": "" }, { "docid": "88a535506be1e7753059af001a6d9421", "score": "0.6413754", "text": "function displayError($message, $purpose)\n{\n\tswitch($purpose)\n\t{\n\t\tcase \"validateNsubmit\":\n\t\t\t// ignore errors if showErrors is false. showErrors initialized in validate.js\n\t\t\tif (showErrors)\n\t\t\t{\n\t\t\t\t// turn error displaying Off\n\t\t\t\tshowErrors = false;\n\t\t\t\t// display error message\n\t\t\t\talertmessages(\"Error\",\"Error encountered: \\n\" + $message);\n\t\t\t\t// retry validation after 10 seconds\n\t\t\t\tsetTimeout(\"validateNsubmit();\", 5000);\n\t\t\t}//if\n\t\t\tbreak;\n\t\tcase \"suggest\":\n\t\t\t// display error message, with more technical details if debugMode is true\n \t\t\talert(\"Error accessing the server! \"+(debugMode ? \"\\n\" + $message : \"\"));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\talertmessages(\"Error\",\"Error encountered: \\n\" + $message);\n\t\t\tbreak;\n\t}//\n}//displayError()", "title": "" }, { "docid": "9f725cc36c7337e2af7e322e76d4b30b", "score": "0.6410254", "text": "function errorMessage() {\n console.log('something went wrong');\n }", "title": "" }, { "docid": "ea008b5f4f46bd225864f5da1207fee2", "score": "0.64057565", "text": "function ShowError(ids, msg) {\n document.getElementById(ids)\n .innerHTML = msg;\n return false;\n }", "title": "" }, { "docid": "ad738eb5fde35bdcbd68a63a6a1425ed", "score": "0.6405602", "text": "function displayValidationErrorMsg(msg){\n\tdojo.byId('errorMsg').innerHTML = msg;\n}", "title": "" }, { "docid": "00c05610aaa8b0d459111c556a4249b6", "score": "0.6400006", "text": "function displayErrorMessage(){\n\n}", "title": "" }, { "docid": "7701b50a8d204dc560474a35a63fa2ae", "score": "0.6395123", "text": "function staffFormError(title, errMsg) {\n alertify.alert().setting({\n 'transition': 'zoom',\n 'movable': false,\n 'modal': true,\n 'labels': 'OK'\n }).setHeader(title).show();\n\n //Parse the json data\n var msg = JSON.parse(JSON.stringify(errMsg));\n\n //Loop through the data and display the message\n Object.keys(msg).forEach(function (key) {\n $('.ajs-content').append(\"- \" + msg[key][0] + \"<br/>\");\n });\n}", "title": "" }, { "docid": "c9bd3da76d0dd5439b81754d7a83f776", "score": "0.63851607", "text": "function showError(error) {\n notificationELement.style.display = \"block\";\n notificationELement.innerHTML = `<p>${error.message}</p>`;\n}", "title": "" }, { "docid": "719a91f1fdc0b593e252b61867e6d510", "score": "0.63845164", "text": "function showError(input, message) {\n\tinput.classList.add('form__text-input--failure');\n\tconst formControl = input.parentElement;\n\tconst small = formControl.querySelector('small');\n\tsmall.innerText = message;\n}", "title": "" }, { "docid": "7edaaa3ecfe787b8f1bc145fe9d031ac", "score": "0.6382116", "text": "function showErros(exr) {\n\n\t\t\t\tif (settings.listErrorPositionBlock) {\n\t\t\t\t\tvar errors = \"\", i= 0;\n\t\t\t\t\t$.each(exr.responseJSON.errors, function(a, b) {\n\t\t\t\t\t\tif (b != undefined) {\n\t\t\t\t\t\t\terrors += \"<p>\" + eval(i + 1) + \" - \" + b + \"</p>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tvar objErrors = '<div class=\"olform-error-list\">';\n\t\t\t\t\tobjErrors += '<div class=\"alert alert-danger\">';\n\t\t\t\t\tobjErrors += '<h3>' + exr.responseJSON.message + '</h3>';\n\t\t\t\t\tobjErrors += errors;\n\t\t\t\t\tobjErrors += '</div>';\n\t\t\t\t\tobjErrors += '</div>';\n\t\t\t\t\tvar $blockError = $(settings.listErrorPositionBlock);\n\t\t\t\t\tsettings.listErrorPosition == 'after' ? $blockError.after(objErrors) : $blockError.before(objErrors);\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "d4e88817baad239107dc233429f87795", "score": "0.6381508", "text": "function showError(input, message) {\n const formControl = input.parentElement;\n formControl.className = \"form-control attn error\";\n const small = formControl.querySelector(\"small\");\n small.innerText = message;\n }", "title": "" }, { "docid": "75f68d28f068ad60f8ec275b68d3c7c5", "score": "0.6380563", "text": "function showAJAXError (data, status) {\n let errorMsg = 'Error: ' + JSON.stringify(data) + \" <br/> \" +\n \"Read this to know what's happening: Try another username,please.\";\n showError(errorMsg);\n}", "title": "" } ]
69fc84e56aa9bbc2e0e022912fa25e3b
An Utility which runs a function with a timeout While in queue, if asked to run again that request will be discarded Timeout start with the "last run time", not the current time
[ { "docid": "2b1d869b59500d35904c47304c4668af", "score": "0.0", "text": "function Runner(callback, self) {\n\n var lastRunAt = 0;\n var scheduled = false;\n\n this.triggerIn = function(millis, args) {\n\n if(!scheduled) {\n var now = Date.now();\n var timeDiff = now - lastRunAt;\n \n if(timeDiff > millis) {\n triggerFunction(args);\n } else {\n scheduled = true;\n setTimeout(function() {\n triggerFunction(args);\n }, millis - timeDiff);\n }\n }\n };\n\n function triggerFunction(args) {\n \n scheduled = false;\n lastRunAt = Date.now();\n callback.apply(self, args);\n }\n}", "title": "" } ]
[ { "docid": "7214f918583efc82af59932caa345cf7", "score": "0.6504906", "text": "function nextTick(fn) {\r\n timeouts.push(fn);\r\n window.postMessage(messageName, \"*\");\r\n }", "title": "" }, { "docid": "ba8b52fe38cb19cbb60eb851413492a1", "score": "0.6499331", "text": "function f() {\n console.log('Running 1 second Timeout');\n }", "title": "" }, { "docid": "1ee237c616b344407a40543afff4c88e", "score": "0.64719397", "text": "function nextTick(fn) {\n timeouts.push(fn);\n window.postMessage(messageName, \"*\");\n }", "title": "" }, { "docid": "f0941c0bf46807e7a3a370f7b1cc5652", "score": "0.64336437", "text": "function schedule()\n {\n if (timeout !== null) {\n window.clearTimeout(timeout)\n timeout = null\n }\n\n timeout = window.setTimeout(callback, delay)\n }", "title": "" }, { "docid": "4283928f318f62a2133b8040d0f65808", "score": "0.63610744", "text": "function setTimeout() {}", "title": "" }, { "docid": "4283928f318f62a2133b8040d0f65808", "score": "0.63610744", "text": "function setTimeout() {}", "title": "" }, { "docid": "a450d5a51428e99daf3c74be76b9dcac", "score": "0.6358932", "text": "function setImmediate(fn) {\n timeouts.push(fn);\n window.postMessage(messageName, \"*\");\n }", "title": "" }, { "docid": "594cf2459d000f535cca927eb71a5947", "score": "0.6297242", "text": "waitAndCall(timeInMillieconds, aFunction) {\n this.timer = window.setTimeout(aFunction, timeInMillieconds);\n }", "title": "" }, { "docid": "419b9cf6ffed4ece1ebdb69f9ebf8f91", "score": "0.6254712", "text": "function execute(funcAsArg){\n setTimeout(funcAsArg,5000);\n//The setTimeout() method calls a function or evaluates an expression after a specified number of milliseconds.\n\n}", "title": "" }, { "docid": "52224e7b02bcafcd525bbc4ee0d00db4", "score": "0.6231309", "text": "function timeoutDefer(fn) {\n \tvar time = +new Date(),\n \t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n \tlastTime = time + timeToCall;\n \treturn window.setTimeout(fn, timeToCall);\n }", "title": "" }, { "docid": "52224e7b02bcafcd525bbc4ee0d00db4", "score": "0.6231309", "text": "function timeoutDefer(fn) {\n \tvar time = +new Date(),\n \t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n \tlastTime = time + timeToCall;\n \treturn window.setTimeout(fn, timeToCall);\n }", "title": "" }, { "docid": "52224e7b02bcafcd525bbc4ee0d00db4", "score": "0.6231309", "text": "function timeoutDefer(fn) {\n \tvar time = +new Date(),\n \t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n \tlastTime = time + timeToCall;\n \treturn window.setTimeout(fn, timeToCall);\n }", "title": "" }, { "docid": "f2645cee0e1b6a95ac2306d9de1e8f43", "score": "0.6221543", "text": "function delayed () {\n // if we're executing at the end of the detection period\n if (!execAsap)\n func.apply(obj, args); // execute now\n // clear timeout handle\n timeout = null; \n }", "title": "" }, { "docid": "dec20822209267954fe29bfe75d529b7", "score": "0.62053406", "text": "function timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}", "title": "" }, { "docid": "dec20822209267954fe29bfe75d529b7", "score": "0.62053406", "text": "function timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}", "title": "" }, { "docid": "dec20822209267954fe29bfe75d529b7", "score": "0.62053406", "text": "function timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}", "title": "" }, { "docid": "dec20822209267954fe29bfe75d529b7", "score": "0.62053406", "text": "function timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}", "title": "" }, { "docid": "dec20822209267954fe29bfe75d529b7", "score": "0.62053406", "text": "function timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}", "title": "" }, { "docid": "dec20822209267954fe29bfe75d529b7", "score": "0.62053406", "text": "function timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}", "title": "" }, { "docid": "a089f0041f020f1bb6f568b911506566", "score": "0.619592", "text": "scheduleTimeout () {\n clearTimeout(this.timer)\n\n this.timer = setTimeout(() => {\n this.tries = this.tries + 1\n this.callback()\n }, this.timerCalc(this.tries + 1))\n }", "title": "" }, { "docid": "4094cfe63c46e83f8519044dd67d36ad", "score": "0.61935645", "text": "function timeoutDefer(fn) {\n\t\t\tvar time = +new Date(),\n\t\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\t\t\tlastTime = time + timeToCall;\n\t\t\treturn window.setTimeout(fn, timeToCall);\n\t\t}", "title": "" }, { "docid": "b3600f37d7f022530786b67aa26f0d19", "score": "0.61898255", "text": "function timeoutDefer(fn) {\n var time = +new Date(),\n timeToCall = Math.max(0, 16 - (time - lastTime));\n lastTime = time + timeToCall;\n return window.setTimeout(fn, timeToCall);\n }", "title": "" }, { "docid": "de330bdc0a42dd26d8c8539e924ee182", "score": "0.6188913", "text": "function timeoutDefer(fn) {\n var time = +new Date(),\n timeToCall = Math.max(0, 16 - (time - lastTime));\n\n lastTime = time + timeToCall;\n return window.setTimeout(fn, timeToCall);\n }", "title": "" }, { "docid": "45a8436397c5564e0add61935d6ce8b1", "score": "0.61842144", "text": "function runLater () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }", "title": "" }, { "docid": "ca79ed9b72428351267e084268130f72", "score": "0.61825407", "text": "function timeoutDefer(fn) {\n\t\tvar time = +new Date(),\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\t\tlastTime = time + timeToCall;\n\t\treturn window.setTimeout(fn, timeToCall);\n\t}", "title": "" }, { "docid": "ca79ed9b72428351267e084268130f72", "score": "0.61825407", "text": "function timeoutDefer(fn) {\n\t\tvar time = +new Date(),\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\t\tlastTime = time + timeToCall;\n\t\treturn window.setTimeout(fn, timeToCall);\n\t}", "title": "" }, { "docid": "ca79ed9b72428351267e084268130f72", "score": "0.61825407", "text": "function timeoutDefer(fn) {\n\t\tvar time = +new Date(),\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\t\tlastTime = time + timeToCall;\n\t\treturn window.setTimeout(fn, timeToCall);\n\t}", "title": "" }, { "docid": "92f62b4b0dc7a020df06f68e39f99e76", "score": "0.61820096", "text": "function clearExistingTimeout() {\n\t if (timeoutID) {\n\t clearTimeout(timeoutID);\n\t }\n\t } // Function to cancel next exec", "title": "" }, { "docid": "f91134e28a7c8e69165f9fa4ae88bfcf", "score": "0.6179968", "text": "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "title": "" }, { "docid": "f91134e28a7c8e69165f9fa4ae88bfcf", "score": "0.6179968", "text": "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "title": "" }, { "docid": "f91134e28a7c8e69165f9fa4ae88bfcf", "score": "0.6179968", "text": "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "title": "" }, { "docid": "f91134e28a7c8e69165f9fa4ae88bfcf", "score": "0.6179968", "text": "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "title": "" }, { "docid": "f91134e28a7c8e69165f9fa4ae88bfcf", "score": "0.6179968", "text": "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "title": "" }, { "docid": "f91134e28a7c8e69165f9fa4ae88bfcf", "score": "0.6179968", "text": "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "title": "" }, { "docid": "82a61dc4fbde4bca0bbad3bc70ed72a8", "score": "0.6169378", "text": "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "title": "" }, { "docid": "67b65201d1ded383c06fb4cd923f2166", "score": "0.61682445", "text": "timeout(script, period = 0, ...args) {\n const future = { tick: exports.session.task.tick + Math.ceil(period < 0 ? 0 : period), args, script };\n exports.session.task.list.add(future);\n return future;\n }", "title": "" }, { "docid": "9ece30da9b27b305395e9106a137fc53", "score": "0.61623424", "text": "static runFunctionWithRetriesAndMaxTimeout(\n\t\t\tfunc, initialTimeout, increment, maxTimeout){\n\n\t\tvar overallTimeout = Helpers.delay(maxTimeout).then(function(){\n\t\t\t// Reset the function so that it will succeed and no \n\t\t\t// longer keep retrying.\n\t\t\tfunc = function(){ return Promise.resolve() };\n\t\t\tthrow new Error('Function hit the maximum timeout');\n\t\t});\n\n\t\t// Keep trying to execute 'func' forever.\n\t\tvar operation = Helpers.runFunctionWithRetries(function(){\n\t\t\treturn func();\n\t\t}, initialTimeout, increment);\n\n\t\t// Wait for either the retries to succeed, or the timeout to be hit.\n\t\treturn Promise.race([operation, overallTimeout]);\n\t}", "title": "" }, { "docid": "0f098345efe977a8c3faad5cbd77e7e5", "score": "0.6154754", "text": "function timeoutDefer(fn) {\r\n\t\t\tvar time = +new Date(),\r\n\t\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\t\tlastTime = time + timeToCall;\r\n\t\t\treturn window.setTimeout(fn, timeToCall);\r\n\t\t}", "title": "" }, { "docid": "9a61f0a21f427db5e9e9f9de234a9fd9", "score": "0.6153295", "text": "function timeoutDefer(fn) {\n var time = +new Date(),\n timeToCall = Math.max(0, 16 - (time - lastTime));\n\n lastTime = time + timeToCall;\n return window.setTimeout(fn, timeToCall);\n }", "title": "" }, { "docid": "c432a768eccf6db2475615f645c4ae7b", "score": "0.61370265", "text": "function be(){return C.setTimeout(function(){fe=void 0}),fe=Date.now()}", "title": "" }, { "docid": "8f3deda72443fcc1086beccb543f0587", "score": "0.6131073", "text": "function timeoutDefer(fn) {\n var time = +new Date(),\n timeToCall = Math.max(0, 16 - (time - lastTime));\n\n lastTime = time + timeToCall;\n return window.setTimeout(fn, timeToCall);\n}", "title": "" }, { "docid": "19141facfff6b5ca57b290ae1444c31d", "score": "0.61308205", "text": "function clearExistingTimeout() {\n \t if (timeoutID) {\n \t clearTimeout(timeoutID);\n \t }\n \t } // Function to cancel next exec", "title": "" }, { "docid": "15571ecdee688d8f7193de7fce8f89df", "score": "0.6127965", "text": "function timeoutDefer(fn) {\n var time = +new Date(),\n timeToCall = Math.max(0, 16 - (time - lastTime));\n\n lastTime = time + timeToCall;\n return window.setTimeout(fn, timeToCall);\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "db9f2df05c79c7016ecd58139d322402", "score": "0.6099001", "text": "function timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}", "title": "" }, { "docid": "d7716638645ae50f94c2bb9386e25480", "score": "0.60857046", "text": "function timeoutDefer(fn) {\n\tvar time = +new Date(),\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\tlastTime = time + timeToCall;\n\treturn window.setTimeout(fn, timeToCall);\n}", "title": "" }, { "docid": "d7716638645ae50f94c2bb9386e25480", "score": "0.60857046", "text": "function timeoutDefer(fn) {\n\tvar time = +new Date(),\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\tlastTime = time + timeToCall;\n\treturn window.setTimeout(fn, timeToCall);\n}", "title": "" }, { "docid": "d7716638645ae50f94c2bb9386e25480", "score": "0.60857046", "text": "function timeoutDefer(fn) {\n\tvar time = +new Date(),\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\tlastTime = time + timeToCall;\n\treturn window.setTimeout(fn, timeToCall);\n}", "title": "" }, { "docid": "d7716638645ae50f94c2bb9386e25480", "score": "0.60857046", "text": "function timeoutDefer(fn) {\n\tvar time = +new Date(),\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\tlastTime = time + timeToCall;\n\treturn window.setTimeout(fn, timeToCall);\n}", "title": "" }, { "docid": "d7716638645ae50f94c2bb9386e25480", "score": "0.60857046", "text": "function timeoutDefer(fn) {\n\tvar time = +new Date(),\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\n\n\tlastTime = time + timeToCall;\n\treturn window.setTimeout(fn, timeToCall);\n}", "title": "" }, { "docid": "d7b183829f5d9ce17209804694ece933", "score": "0.60587806", "text": "async run() {\n\t\twhile(true) {\n\t\t\tawait this.processTask();\n\t\t\tawait this.timeout(process.env.TIME_INTERVAL || 5000);\n\t\t}\n\t}", "title": "" }, { "docid": "fd64a1759abfc9299b40a6d50ef3e17c", "score": "0.6039688", "text": "function setTimeout_request(JSON_data,re_try,delay_time){\n\t\n\tsetTimeout(() => { send_request(JSON_data,re_try++); }, delay_time);\n}", "title": "" }, { "docid": "617d828f6006921f8fff46f7376d802e", "score": "0.60297835", "text": "function wi_scheduleNext(){\n wi_waitDelay += wi_waitDelay;\n if(wi_waitDelay>60) wi_waitDelay=60;\n else if(wi_waitDelay>30) wi_waitDelay=30;\n else if(wi_waitDelay<1) wi_waitDelay=1;\n wi_timeId=setTimeout(wi_checkPending,1000*wi_waitDelay);\n}", "title": "" }, { "docid": "949c767a220acf0e67bc6e28d00dd875", "score": "0.60017294", "text": "function myFn(callback){\r\n var futureTime = new Date().getTime() + 3000;\r\n var i = 0;\r\n \r\n while(new Date() < futureTime ){\r\n //nothing, just for delay\r\n };\r\n \r\n callback();\r\n}", "title": "" }, { "docid": "2e84fec16a80474e638a6f0b7061cd76", "score": "0.5963616", "text": "function delayedTask(fn, time) {\n\t\treturn new Promise((res) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (fn) fn()\n\t\t\t\tres()\n\t\t\t}, time)\n\t\t})\n\t}", "title": "" }, { "docid": "6e1b720f85d2e424ea9849bea7343be5", "score": "0.5947334", "text": "function waitingFn(timeInMs)\n{\n while (Date.now);\n\n return timeInMs;\n\n}", "title": "" }, { "docid": "1122836be551c3f982d6c2830c438481", "score": "0.59242743", "text": "function create_continuous_ajax_request_with_delay(uri, func, max_timeout, message_interval) {\n var xhr = init_xhr_object(uri, func, max_timeout, message_interval);\n if (xhr == null) {\n //alert(\"Xhr object is null.\");\n return;\n }\n _continuous_ajax_request_with_delay(xhr);\n}", "title": "" }, { "docid": "fac7864cfb5b8e50f1831ed681b3a82e", "score": "0.59222853", "text": "async function time(f) {\n const clock = sinon.useFakeTimers() // Will only advance automatically if runAll() doesn't work.\n\n // Run the function\n let done = false;\n (async () => {\n await handleLater(f) // await f to either resolve or reject\n done = true\n })()\n\n // Run the clock, allowing the function's delays to complete\n while (!done) {\n clock.runAll() // Even though it's called 'runAll', calling it multiple times is necessary\n await Promise.resolve() // Yield to the function that's running\n }\n\n // Finish up\n const end = new Date().getTime()\n clock.restore()\n return end\n}", "title": "" }, { "docid": "7ab24bbe1d7781df4e35d2dc188d786e", "score": "0.59202534", "text": "function DelayRun(element,time,method,page,source) { \n\n\tvar function_string = method + '(\\'' + page + '\\',\\'' + source + '\\')'; \n\n\tvar action = function () { eval(function_string); }; \n\n\tif (element.zid) { \n\t\tclearTimeout(element.zid); \n\t}\n\n\telement.zid = setTimeout(action,time); \n\n} // DelayRun", "title": "" }, { "docid": "528f1a5910795a352dc65fd7e8dd6bb8", "score": "0.59117424", "text": "function doLotsOfWork(type, tiredEshraq, res){\n console.log(`Doing lots of ${type}`);\n setTimeout(function(){\n tiredEshraq(res)\n }, 5000);\n}", "title": "" }, { "docid": "7ff484d9af74da6117cfba0958c963c7", "score": "0.59100527", "text": "function next() {\n var timeout = expired.shift();\n if (timeout) {\n _execTimeout(timeout, next);\n }\n else {\n // schedule the next round\n _schedule();\n }\n }", "title": "" }, { "docid": "09a2edcf472b227c33bf02de422501b1", "score": "0.58950454", "text": "function timeout(){\n clearTimeout(time);\n console.log(\"timeout\");\n return setTimeout(()=>{\n printQuote();\n timeout();\n },5000);\n}", "title": "" }, { "docid": "fa77ccfd60bc7b8188b567bf781ac988", "score": "0.58949244", "text": "function next() {\n\t var timeout = expired.shift();\n\t if (timeout) {\n\t _execTimeout(timeout, next);\n\t }\n\t else {\n\t // schedule the next round\n\t _schedule();\n\t }\n\t }", "title": "" }, { "docid": "096ef1031717dc6f045b4ac8913bc006", "score": "0.58932126", "text": "function execAfterThisTick(fnc) {\n setTimeout(fnc, 0)\n}", "title": "" }, { "docid": "6909087b4d5c55c055e91c04579b807f", "score": "0.58877075", "text": "function runQueue() {\n var f;\n if(queue.length) {\n f = queue.shift();\n window.setTimeout(function () {\n f();\n runQueue();\n }, 50);\n }\n }", "title": "" }, { "docid": "c20faddbcc8e22c8229791a71c2363cb", "score": "0.58845216", "text": "function setTimeout(f, time) {\n\t var args = [];\n\t for (var _i = 2; _i < arguments.length; _i++) {\n\t args[_i - 2] = arguments[_i];\n\t }\n\t if (time === 0) {\n\t f(args);\n\t return -1;\n\t }\n\t else {\n\t return window.setTimeout(f, time, args);\n\t }\n\t }", "title": "" }, { "docid": "2ff905ef8d68603d164baa644a351176", "score": "0.58801645", "text": "function smartTimeout(fn, delay = 0, ...args) {\n const newToken = Symbol('cancel id');\n const checkRun = () => {\n if (timeoutRefs.has(newToken)) {\n timeoutRefs.delete(newToken);\n return fn(...args);\n } else return false;\n };\n const promise = pause(delay).then(checkRun);\n //$FlowIssue\n promise[cancelToken] = newToken;\n return promise;\n}", "title": "" }, { "docid": "fec5cdeb631820099a5264458fd2505a", "score": "0.58766735", "text": "ontimeout() {}", "title": "" }, { "docid": "e25089f74a93dda185e150a3a10d24c4", "score": "0.58716816", "text": "static get sleepTimeout() {}", "title": "" }, { "docid": "28aa064b2e3a893ec537d0e392abfbfd", "score": "0.5852975", "text": "function setTimeout(func, when) {\n func();\n}", "title": "" }, { "docid": "7168eb1b5cb5d97f0b17f53b02262319", "score": "0.5850328", "text": "schedule(taskFn, delay) {\n const id = setTimeout(taskFn, delay);\n return () => clearTimeout(id);\n }", "title": "" }, { "docid": "596e6bbf6d16bc921e096a9f3d58dced", "score": "0.5848456", "text": "function setTimeout(f, time) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (time === 0) {\n f(args);\n return -1;\n }\n else {\n return window.setTimeout(f, time, args);\n }\n}", "title": "" }, { "docid": "ed523c79a90545baa338bca3f3c919b1", "score": "0.58344436", "text": "function macroTask(fn, timer) {\r\n if (timer === void 0) { timer = 1; }\r\n // adds longer timers for passing tests in IE and Edge\r\n _zone.runOutsideAngular(function () { return async_1.TimerWrapper.setTimeout(fn, needsLongerTimers ? timer : 1); });\r\n}", "title": "" }, { "docid": "0a7cc5b0d12305bfe48ba913325d06f6", "score": "0.58323765", "text": "function executeFunc() {\n clearTimeout(timer);\n timer = null;\n result = func.apply(THIS, args);\n }", "title": "" }, { "docid": "e11878b939f2ae24e03d57a962c83f04", "score": "0.5828996", "text": "static runFunctionWithRetries(func, initialTimeout, increment){\n\t\treturn func().catch(function(err){\n\t\t\treturn Helpers.delay(initialTimeout).then(function(){\n\t\t\t\treturn Helpers.runFunctionWithRetries(\n\t\t\t\t\t\tfunc, initialTimeout + increment, increment);\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "c099a0db0ff46e7d011e40ca4ca0a40c", "score": "0.5828163", "text": "trialWaitTimeOut() { }", "title": "" }, { "docid": "bdc177873c55471bb176f63dc0a6be4f", "score": "0.5814009", "text": "function wrapper() {\n\t\tcontext = this;\n\t\targs = arguments;\n\n\t\t//run it now?\n\t\tif(!last || +new Date() - wait > last){\n\t\t\tcancel();\n\t\t\tping();\n\t\t}\n\t\telse {\n\t\t\tcancel();\n\t\t\ttimeout = setTimeout(ping, wait);\n\t\t}\n\t}", "title": "" }, { "docid": "fd2a4d9d00ac7bb6eaf75d05d2e547ba", "score": "0.5792678", "text": "function wrapper() {\n\t\t\t/*jshint validthis:true */\n\t\t\tvar that = this;\n\t\t\tvar elapsed = +new Date() - lastExec;\n\t\t\tvar args = arguments;\n\n\t\t\tfunction clear() {\n\t\t\t\tif (timeoutId) {\n\t\t\t\t\ttimeoutId = clearTimeout(timeoutId);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction exec() {\n\t\t\t\tlastExec = +new Date();\n\t\t\t\tcallback.apply(that, args);\n\t\t\t\tclear();\n\t\t\t}\n\n\t\t\tclear();\n\n\t\t\tif (elapsed > delay) {\n\t\t\t\texec();\n\t\t\t} else {\n\t\t\t\ttimeoutId = setTimeout(exec, delay - elapsed);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "709610f2aeff5d2cb0d06d0d2cd5d875", "score": "0.57864636", "text": "periodically (interval, name, fn) {\n let iterator = () => {\n debug('Running ' + name);\n Promise.resolve(fn()).catch((err) => {\n console.log('Failed while %s: %s', name, err);\n }).then(() => {\n setTimeout(iterator, interval);\n });\n };\n setTimeout(iterator, interval);\n }", "title": "" }, { "docid": "d7d44424a7d35fb4acd76e5486350a62", "score": "0.5767004", "text": "function realtimequiz_delayed_request(code, time) {\n if (realtimequiz.resendtimer != null) {\n clearTimeout(realtimequiz.resendtimer);\n realtimequiz.resendtimer = null;\n }\n realtimequiz.resendtimer = setTimeout(code, time);\n}", "title": "" }, { "docid": "7a8922950f1cfa8d0a865f7dca52fdad", "score": "0.57629585", "text": "function funcTimer(f){\n\tvar then = new Date().getTime()\n\tf()\n\treturn (new Date().getTime() - then)\n}", "title": "" }, { "docid": "f253847bf75f6d72982baeb5e197a418", "score": "0.57617044", "text": "function reqestOnQuit(){\r\n webix.ajax().sync().post(\"./data/stop.php\", { status:\"stop\"});\r\n var ms=500; // wait some time\r\n ms += new Date().getTime();\r\n while (new Date() < ms){};\r\n// return reqestOnTryClose();\n}", "title": "" }, { "docid": "9529818fb1009cf2c532b3ab866e93c9", "score": "0.57569104", "text": "function doSomethingLater( fn, time ){\n var dfd = $.Deferred();\n\n setTimeout(function() {\n dfd.resolve( fn() );\n }, time || 0);\n\n return dfd.promise();\n}", "title": "" }, { "docid": "ddb2e0323cbfc30f0cda082f5368459b", "score": "0.5748793", "text": "function schedule(fn, delay) {\n if (arguments.length === 1) {\n delay = 0;\n }\n setTimeout(fn, delay);\n }", "title": "" }, { "docid": "b755c1d226252639784de5109e788ee8", "score": "0.5741191", "text": "function delayed(fn, time, name){\n if( __timers[name] != undefined ){\n clearTimeout(__timers[name]);\n }\n __timers[name] = setTimeout(function(){ fn(); }, time);\n}", "title": "" }, { "docid": "13c162fed7c9e08d6879e3e5123a6f59", "score": "0.57361317", "text": "function schedule() {\n\t\tcheck = false;\n\t\twindow.clearTimeout( timeout );\n\t\ttimeout = window.setTimeout( function(){ check = true; }, 300000 );\n\t}", "title": "" }, { "docid": "eda9bdd26b8c3e559e600cf4a74e1528", "score": "0.5735784", "text": "function setZeroTimeout(fn) {\n\t\ttimeouts.push(fn);\n\t\twindow.postMessage(messageName, \"*\");\n\t}", "title": "" }, { "docid": "b6b8a3b07bf288724a11a43b82e99110", "score": "0.5728629", "text": "function loopAsynchRequests () {\n setTimeout(performAsynchAPIRequest);\n}", "title": "" }, { "docid": "41e15df8ca5cc954ac804269a4e10e0b", "score": "0.57260275", "text": "function setZeroTimeout(fn) {\n timeouts.push(fn);\n window.postMessage(messageName, \"*\");\n }", "title": "" }, { "docid": "4b7c5fd6b85a065fae2e18ab38ff74c5", "score": "0.5725326", "text": "function doSomethingLater( fn, time ){\n var dfd = $.Deferred();\n\n setTimeout(function(), {\n dfd.resolve( fn() );\n }, time || 0);\n\n return dfd.promise();\n}", "title": "" }, { "docid": "abb1f7ceb3082038c7b67105c4a189c0", "score": "0.5722102", "text": "function setMyTimeout(res, tokenTime) {\n\t\tsetTimeout(function() {\n\t\t\tif (tokenTime == commandLastTime)\n\t\t\t\tsetMyTimeout(res, tokenTime);\n\t\t\telse {\n\t\t\t\tres.send('#');\n\t\t\t\tconsole.log('got here (at time ' + (new Date).getTime() + ')');\n\t\t\t}\n\t\t}, 1);\n\t}", "title": "" }, { "docid": "dffe6be75c67b7950b5c07a82ea8d017", "score": "0.57196134", "text": "function wrapper()\n\t\t\t\t{\n\n\t\t\t\t\tvar me = this,\n\t\t\t\t\t\telapsed = factoryName === 'UtilsWaitLast' ? 0 : ((+new Date) - lastExec),\n\t\t\t\t\t\targs = arguments;\n\n\t\t\t\t\ttimeoutId && clearTimer();\n\n\t\t\t\t\tif (elapsed > delay) {\n\t\t\t\t\t\texec();\n\t\t\t\t\t}\n\t\t\t\t\telse if (! noTrailing)\n\t\t\t\t\t{\n\t\t\t\t\t\ttimeoutId = setTimeout(function () {exec()}, delay - elapsed);\n\t\t\t\t\t\tstoreTimer();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Executing given function\n\t\t\t\t\tfunction exec()\n\t\t\t\t\t{\n\t\t\t\t\t\tlastExec = +new Date;\n\t\t\t\t\t\tclearTimer();\n\t\t\t\t\t\tcallback.apply(me, args);\n\t\t\t\t\t\tif (! $scope.$$phase) {\n\t\t\t\t\t\t\t$scope.$digest();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction storeTimer()\n\t\t\t\t\t{\n\t\t\t\t\t\tallTimeouts[unique] = timeoutId;\n\t\t\t\t\t}\n\t\t\t\t\tfunction clearTimer()\n\t\t\t\t\t{\n\t\t\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\t\t\tallTimeouts[unique] = timeoutId;\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "b44f38e0a36bba4de697fe8948a3d734", "score": "0.57096314", "text": "function wrapper() {\n\t\tcontext = this;\n\t\targs = arguments;\n\t\tif (!no_postpone) {\n\t\t\tcancel();\n\t\t\ttimeout = setTimeout(ping, wait);\n\t\t}\n\t\telse if (executed) {\n\t\t\texecuted = false;\n\t\t\ttimeout = setTimeout(ping, wait);\n\t\t}\n\t}", "title": "" }, { "docid": "f5cdbec6c8b74a78e0987c5ceaf8b541", "score": "0.5704727", "text": "function setZeroTimeout(fn) {\n timeouts.push(fn);\n window.postMessage(messageName, '*');\n }", "title": "" } ]
1ddd9f5c3ef598d597750df907407fd7
Este no lo estoy usuando por ahora, pero lo guardo
[ { "docid": "d240c14c1bb5c3824c7d38b5879f4785", "score": "0.0", "text": "fetchUsuariosCollection () {\n Api.getUsersRoles()\n .then( ( {data} ) => {\n if ( data ) {\n console.log( 'Api.getUsuarios' );\n this.usuarios = data.data\n }\n })\n .catch( error => {\n console.error( 'shit, api.getroles falló' );\n console.error( \"el toString del error: \" + error.toString() );\n console.log( error );\n console.error( 'despues de error.toString()' );\n });\n }", "title": "" } ]
[ { "docid": "c2e7411d98504dab7f97aeb47eebcddd", "score": "0.6528034", "text": "function iniciarSesion() {\n if (nombreUsuario ===\"pepe\") {\n logueado=true;\n }\n}", "title": "" }, { "docid": "e17af04ee07996bf3709bc9d9da70074", "score": "0.64062935", "text": "function AgregarPerfilAdmin() {\r\n var Nombre = document.getElementById(\"nom\").value;\r\n var Apellido = document.getElementById(\"ape\").value;\r\n var Nacimiento = document.getElementById(\"nac\").value;\r\n var Defuncion = document.getElementById(\"def\").value;\r\n\r\n if (Nombre === \"\" || Apellido === \"\" || Nacimiento === \"\" || Defuncion === \"\") {\r\n alert(\"Aún hay campos vacíos.\");\r\n return false;\r\n }\r\n\r\n AdmiPer.CrearPerfil();\r\n AdmiPer.SetApellido(Apellido);\r\n AdmiPer.SetDefuncion(Defuncion);\r\n AdmiPer.SetNacimiento(Nacimiento);\r\n AdmiPer.SetNombre(Nombre);\r\n AdmiPer.SetUrl(\"\");\r\n AdmiPer.per.id = sessionStorage.getItem(\"idDifunto\");\r\n\r\n return true;\r\n}", "title": "" }, { "docid": "f7218e4a4842dd0b59cab17e801d220a", "score": "0.6294004", "text": "function registrar(){\n var campos = [\n {campo:'nombre',valido:false},\n {campo:'apellido',valido:false},\n {campo:'email',valido:false},\n {campo:'usuario',valido:false},\n {campo:'password',valido:false}\n ];\n \n for (var i=0;i<campos.length;i++){\n campos[i].valido = validarCampoVacio(campos[i].campo);\n }\n\n for(var i=0;i<campos.length;i++){\n if (!campos[i].valido)\n return;\n }\n \n //Todo esta bien, todo saldra bien,... OK?\n document.getElementById('div-mensaje-exito').style.display = 'block';\n\n var transaccion = db.transaction([\"usuarios\"],\"readwrite\");///readwrite: Escritura/lectura, readonly: Solo lectura\n var objectStoreUsuarios = transaccion.objectStore(\"usuarios\");\n var solicitud = objectStoreUsuarios.add({\n nombre:document.getElementById('nombre').value,\n apellido:document.getElementById('apellido').value,\n email:document.getElementById('email').value,\n usuario:document.getElementById('usuario').value,\n password:document.getElementById('password').value\n });\n solicitud.onsuccess = function(evento){\n console.log(\"Se agrego el registro con éxito, Actualizar tabla\");\n actualizarTabla();\n }\n \n \n \n}", "title": "" }, { "docid": "84cf3f769724f68f907d83591cdf682f", "score": "0.6291594", "text": "function guardarUsuarios() {\n //si nuestro navegador soporta el almacenamiento en el local storage\n if (typeof Storage !== \"undefined\") {\n //guardamos en formato JSON\n localStorage.setItem(\"usuarios\", JSON.stringify(usuarios));\n //si no lo admite\n } else {\n alert(\n \"tu navegador no soporta el almacenamiento de datos, prueba con otro.\"\n );\n }\n}", "title": "" }, { "docid": "4024db5b6a700a2c638690a44e14ff1e", "score": "0.628295", "text": "function finalEjercicio() {\n\tvar faseActual = faseActualCuento;\n\n\t//Si estoy en la fase de lectura avanzo a la fase de ejercitacion\n\tif (faseActual == 'Lectura') {\n\t\tfaseActualCuento = 'Ejercitacion';\n\t\tcargarEjercicio();\n\t\tiniciarEjercicio();\n\t} else {\n\t\tvar pasos = pasoActual; //me guardo el paso actual\n\t\tlocalStorage.setItem('resultadosCuentos', JSON.stringify({ alumno: alumno, cuento: cuento, palabrasEjercitadas: palabrasEjercitadas }));\n\t\tsetTimeout(function() {\n\t\t\tlocation.href = 'configuracionCuentos.html';\n\t\t}, 1500);\n\t\t//Debo realizar el INSERT EN LA BD CON LOS RESULTADOS DEL EJERCICIO\n\t}\n}", "title": "" }, { "docid": "099203a502deb8451dfa600beea08b44", "score": "0.62603194", "text": "guardar(){\n localStorage.name = this.usuario.nombre;\n localStorage.apellido = this.usuario.apellido;\n localStorage.edad = this.usuario.edad;\n localStorage.nickname = this.usuario.nickname;\n }", "title": "" }, { "docid": "29d8a8b8522afde3ec87ffe02ff58abb", "score": "0.620884", "text": "function anularSaldos(){\n\tsaldoCuenta= 0;\n\tsaldoDolar=0;\n\tlimiteExtraccion=0;\n\tnombreUsuario=\"Intruso\";\n}", "title": "" }, { "docid": "c8c1166281e2f4ed120983f38abd2809", "score": "0.61427134", "text": "function guardarLogin() {\n //si el navegador lo admite\n if (typeof Storage !== \"undefined\") {\n //lo pasamos a json\n localStorage.setItem(\"usuario\", JSON.stringify(usuarioActual));\n } else {\n alert(\n \"tu navegador no soporta el almacenamiento de datos, prueba con otro.\"\n );\n }\n}", "title": "" }, { "docid": "2875861ba805f3b246dbd4ab36663011", "score": "0.6106007", "text": "function adminQushish() {\n let form = document.forms['createAdminForm'];\n let check = {}\n check.name = form[\"name\"].value;\n check.number = form[\"number\"].value;\n check.password = form[\"password\"].value;\n check.username = form[\"username\"].value;\n check.qushilganVaqti = null;\n check.lavozimlar = [\"ADMIN\"];\n check.aktiv = 1;\n user_service.create(JSON.stringify(check), location.reload(), console.log(\"gg\"));\n}", "title": "" }, { "docid": "66207f93dede4e103524d0adb2108c6f", "score": "0.6065566", "text": "haSaltado(){ this._saltado = true; }", "title": "" }, { "docid": "90e9ed866a24282f10bd1d9766136140", "score": "0.60521436", "text": "guarduarUsuarioTemporal(){\n\t\tlet {asignados, asignadosUsuarios, nombre, filteredData} = this.state\n\t\taxios.post(\"/x/v1/user/usuariosTemporales\", {nombre})\n\t\t.then(res=>{\n\t\t\tasignados.push(res.data.user._id)\n\t\t\tres.data.user[\"estado\"] = false\n\t\t\tasignadosUsuarios.unshift(res.data.user)\n\t\t\tfilteredData.unshift(res.data.user)\n\t\t\tthis.setState({asignados, asignadosUsuarios, modalUsuario:false, filteredData, nombre:\"\"})\n\t\t})\n\t\t.catch(err=>console.log(err))\n\n \n\t}", "title": "" }, { "docid": "1bc8905c82a28af7fb84e153824cadba", "score": "0.6002111", "text": "function agregarUsuario(usuario) {\r\n if (usuario != undefined) { //viene del modificar \r\n console.log(usuario.id);\r\n formAltaUsuario();\r\n $('#idUsuario').val(usuario.id);\r\n $('#inputApellido').val(usuario.apellido);\r\n $('#inputNombre').val(usuario.nombre);\r\n $('#inputDni').val(usuario.dni);\r\n $('#inputPassword').val(usuario.clave);\r\n $('#inputUsuario').val(usuario.usuario);\r\n $('#inputCumpleanios').val(usuario.fechadecumpleanios);\r\n $('#inputEmail').val(usuario.email);\r\n $('#inputPerfil').val(usuario.perfil);\r\n $('#inputTurno').val(usuario.turno);\r\n $('#inputTel').val(usuario.tel);\r\n $('#inputCel').val(usuario.celular);\r\n $('#inputAddress').val(usuario.direccion1);\r\n $('#inputAddress2').val(usuario.direccion2);\r\n $('#inputState').val(usuario.provincia);\r\n $('#inputCity').val(usuario.ciudad);\r\n $('#inputZip').val(usuario.codigopostal);\r\n $(\"#btnAgregar\").attr(\"onclick\", 'Test.validarTodoFormModificarUsiario()');\r\n $('#btnAgregar').text('Modificar');\r\n }\r\n else { // viene del agregar \r\n var pagina = \"backend/uss/\";\r\n var tokken = localStorage.getItem('tokken');\r\n var datoObjeto = {\r\n \"apellido\": $('#inputApellido').val(),\r\n \"nombre\": $('#inputNombre').val(),\r\n \"dni\": $('#inputDni').val(),\r\n \"clave\": $('#inputPassword').val(),\r\n \"usuario\": $('#inputUsuario').val(),\r\n \"fechadecumpleanios\": $('#inputCumpleanios').val(),\r\n \"email\": $('#inputEmail').val(),\r\n \"perfil\": $('#inputPerfil').val(),\r\n \"turno\": $('#inputTurno').val(),\r\n \"tel\": $('#inputTel').val(),\r\n \"celular\": $('#inputCel').val(),\r\n \"direccion1\": $('#inputAddress').val(),\r\n \"direccion2\": $('#inputAddress2').val(),\r\n \"provincia\": $('#inputState').val(),\r\n \"ciudad\": $('#inputCity').val(),\r\n \"codigopostal\": $('#inputZip').val(),\r\n \"tokken\": tokken\r\n };\r\n //LIMPIO EL CONTENIDO DEL DIV \r\n $(\"#divResultado\").html(\"\");\r\n $.ajax({\r\n type: 'POST',\r\n url: pagina,\r\n dataType: \"text\",\r\n data: datoObjeto,\r\n async: true\r\n })\r\n .done(function (resultado) {\r\n //$(\"#divResultado\").html('');\r\n //console.log(objJSON);\r\n if (resultado != null) {\r\n $(\"#divResultado\").html(\"\");\r\n alert(\"Usuario Agregado Con Exito!!!\");\r\n }\r\n })\r\n .fail(function (jqXHR, textStatus, errorThrown) {\r\n alert(jqXHR.responseText + \"\\n\" + textStatus + \"\\n\" + errorThrown);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "3fba5d31c129676721badce94bbcb7a7", "score": "0.5995994", "text": "function guardar(){ \n var clave = document.getElementById('correo').value; /*Cogemos el valor con la id correo del archivo de registro.html*/\n var valor = document.getElementById('contrasena').value; /*Cogemos el valor con la id contrasena del archivo de login.html*/\n \n storage.setItem(clave, valor); /*El método setItem de storage dice que esta clave y este valor los almacenará en el navegador*/\n \n limpiar(); /*Inicializamos la función limpiar descrita abajo*/\n window.open(\"login.html\"); /*Le decimos que nos abra la ventana de login*/\n\n }", "title": "" }, { "docid": "8ba381aaf7d5ca6342cb314b03b82bdf", "score": "0.59943837", "text": "altaPaciente(posicionPaciente) {\n\n if (posicionPaciente !== -1) {\n //si existe le pongo una fecha de alta\n this.hospital.pacientes[posicionPaciente].fechaAlta(new Date());\n alert(\"Usuario dado de alta con éxito\");\n updateDatosById(this.hospital.nPacientes, \"numPacientes\");\n this.mostrarDatos(this.hospital.pacientes);\n } else {\n //si no existe digo que no existe\n alert(\"el usuario No existe\");\n }\n\n }", "title": "" }, { "docid": "bf2a7eacc42d759844ef32edd1381f04", "score": "0.5993052", "text": "function usuarioIntruso(){\n\tif (nombreUsuario==\"Intruso\"){\n\t\talert(\"Lo sentimos, Usted no tiene permitido realizar la operación\");\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "37c5de0ec68fe3412444e8f5392599fd", "score": "0.5980291", "text": "function validacaoLogin(){\n try{\n var usuario = \"usuario=\"+$(\"#inputUsuario\").val();\n //cria um json para a requisicao post\n var data = usuario+\"&senha=\"+$(\"#inputSenha\").val();\n\n $.post(\"http://\"+window.ipServidor+\"/Projeto_BioID-war/servico/pessoa/validacao\", data, function(dados){\n //teste da requisicao no banco esta correta\n if(dados.sucesso){\n //guarda dados do usuario no local storge\n var logSession = JSON.stringify({\n idpessoa: dados.idpessoa,\n idSession: dados.idSession,\n logTempo: dados.logTempo,\n papel: dados.papel,\n idunidade: dados.idunidade\n });\n window.localStorage.setItem(\"logSession\", logSession);\n\n\n window.papel = dados.papel;\n //limpa o campo senha\n $(\"#inputSenha\").val(\"\");\n //verifica o tipo de funcionario\n if(window.papel === \"a\"){\n //rest popular propriedades\n //chama o metodo que busca dados no servidor e armazena no localStorage\n //para outro metodo acessar e criar a lista de cultivares recebidos\n window.iniciarAgricultor();\n window.servArmazenarCulRecebdo(dados.idpessoa);\n activate_page(\"#page_3\");\n }else{\n window.listarEstoque(dados.idunidade);\n //c(dados.idunidade);\n window.iniciarGerEntrev();\n activate_page(\"#page_4\");\n $('.uib_w_154').hide();\n $('.uib_w_154').fadeIn();\n\n }\n\n\n\n\n //informa se o usuario ou senha esta incorreta\n }else if($(\"#inputUsuario\").val()=== \"\"){\n navigator.notification.confirm(\n 'O campo usuário não pode ser vazio!', // message\n function(){\n $(\"#inputUsuario\").focus();\n }, // callback to invoke with index of button pressed\n 'Erro', // title\n ['Sair'] // buttonLabels\n );\n\n\n }else if($(\"#inputSenha\").val()=== \"\"){\n navigator.notification.confirm(\n 'O campo senha não pode ser vazio!', // message\n function(){\n $(\"#inputSenha\").focus();\n }, // callback to invoke with index of button pressed\n 'Erro', // title\n ['Sair'] // buttonLabels\n );\n }else{\n navigator.notification.confirm(\n 'Usuário ou Senha incorretos!', // message\n function(){\n $(\"#inputUsuario\").focus();\n }, // callback to invoke with index of button pressed\n 'Erro', // title\n ['Sair'] // buttonLabels\n );\n }\n\n },\"json\")\n //Tratamento de erro da requisicao servico RESt login\n .fail(function(){\n navigator.notification.confirm(\n 'Sem conexão com o servidor!',\n function() {\n //limpa o campo senha\n $(\"#inputSenha\").val('');\n //limpa a tela e vai para a pagina inicial\n window.clearGoMainPage();\n },\n 'Erro',\n ['OK']\n );\n\n\n });\n\n\n }catch(e){\n window.alert(\"Erro validacaoLogin: \"+ e.message);\n window.clearGoMainPage();\n }\n\n }", "title": "" }, { "docid": "deca28c9dcff962f09fd75340720797b", "score": "0.5974622", "text": "function AgregarDifunto() {\r\n if (AgregarPerfilAdmin()) {\r\n AdmiPer.EnviarPerfilCrear();\r\n }\r\n}", "title": "" }, { "docid": "dc424be5b2927a40ee0d1736f76a7aea", "score": "0.59421134", "text": "function esNoRegistrado() {\n var userid = localStorage.getItem(\"id\");\n if(userid == -1) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "b17e334368c84d90e966bdfe51b43275", "score": "0.5940321", "text": "function valida_sesion_iniciada()\n{\n\n //validar si esta en alguna sesion\n id_plan = buscarlocal('id_plan');\n id_sesion = buscarlocal('id_sesion');\n\n\n if(id_plan === null && id_sesion === null)\n {\n console.log(\"no existe ninguno en local\");\n estadoPlan = false;\n estadoSesion = false;\n\n }else if(id_plan =! null && id_sesion === null)\n {\n console.log(\"solo existe el plan, mas no la sesion\");\n console.log(id_plan);\n estadoPlan = true;\n estadoSesion = false;\n\n }else\n {\n console.log(\"existen las dos en el local\");\n console.log(id_plan);\n console.log(id_sesion);\n estadoPlan = true;\n estadoSesion = true;\n }\n\n}", "title": "" }, { "docid": "75e665f31274065ed1422c1b69b86cb0", "score": "0.5935303", "text": "function guardaValores() {\n\n}", "title": "" }, { "docid": "184f2dfd4a21cda0709702d827f89e6e", "score": "0.5935242", "text": "function AgregarUsuario(informacion) {\n settings.set('user', {\n id : informacion.ID,\n email: informacion.email,\n nombre: informacion.Nombre,\n Apellidos: informacion.Apellidos,\n empresa: informacion.empresaid,\n rol: informacion.rol,\n estatus: informacion.estatus,\n auth: true\n })\n} // END AgregarUsuario", "title": "" }, { "docid": "793c5977e10c2f6616efb766a134af97", "score": "0.5912579", "text": "function registrarDatosUsuarioUdg()\n{\n /* COMPROBAR QUE LOS DATOS NO ESTEN VACIOS */\n var placas = document.getElementById('placas').value;\n var telefono = document.getElementById('telefono').value;\n\n if(!placas)\n ons.notification.alert(\"Las placas no pueden estar vacías\");\n else if(!telefono)\n ons.notification.alert(\"El teléfono no puede estar vacío\");\n else\n {\n \tcerrarDialog(dialogUsuarioUdg);\n registrarUsuarioBD(codigoAlumno, nombreAlumno, placas, telefono, \"\");\n }\n}", "title": "" }, { "docid": "3e450ed0fd00bdb4def54f2f1de3169f", "score": "0.5903085", "text": "function registrarNuevoUsuario()\n{\n\t//paginaRegistro.querySelector(\"#botonRegistrarNuevo\").disabled = true;\n\t//paginaRegistro.querySelector(\"#botonRegistrarNuevo\").innerHTML = \"Registrando ...\";\n\n\n var codigo = paginaRegistro.querySelector('#codigoGenerado').innerText;\n var nombre = paginaRegistro.querySelector('#nombreNuevoUsuario').value;\n var placas = paginaRegistro.querySelector('#placasNuevoUsuario').value;\n var telefono = paginaRegistro.querySelector('#telefonoNuevoUsuario').value;\n var contrasenia = paginaRegistro.querySelector('#contraseniaNuevoUsuario').value;\n var contraseniaRepetida = paginaRegistro.querySelector('#contrasenia2NuevoUsuario').value;\n\n if(!nombre)\n ons.notification.alert(\"El nombre no puede estar vacío\");\n else if(!placas)\n ons.notification.alert(\"Placas no válidas\");\n else if(!(regExpTelefono.test(telefono)))\n ons.notification.alert(\"Teléfono no válido\");\n else if(!contrasenia)\n ons.notification.alert(\"La contraseña no puede estar vacía\");\n else if(!contraseniaRepetida)\n ons.notification.alert(\"Es necesario repetir la contraseña\");\n else\n {\n if(contrasenia != contraseniaRepetida)\n \tons.notification.alert(\"Las contraseñas no coinciden\");\n else\n {\n registrarUsuarioBD(codigo, nombre, placas, telefono, contrasenia);\n }\n }\n\n //paginaRegistro.querySelector(\"#botonRegistrarNuevo\").disabled = false;\n\t//paginaRegistro.querySelector(\"#botonRegistrarNuevo\").innerHTML = \"Registrarse\";\n}", "title": "" }, { "docid": "e07814f47cfa01b98e14b710836e47a4", "score": "0.5873616", "text": "function guardarUsuario(unUsuario, unaContraseña, unPrimerNombre, unSegundoNombre, unPrimerApellido, unSegundoApellido, unMail, unTelefono){\n let usuario = {\n usuario: unUsuario,\n contraseña: unaContraseña,\n primerNombre: unPrimerNombre,\n segundoNombre: unSegundoNombre,\n primerApellido: unPrimerApellido,\n segundoApellido: unSegundoApellido,\n email: unMail,\n telefono: unTelefono\n }\n unUsuario=usuario;\n localStorage.clear();\n localStorage.setItem(\"usuarioGuardado\", JSON.stringify(usuario));\n location.href = \"index.html\";\n\n}", "title": "" }, { "docid": "f8e1af24c6f2c6f0cdf0cb56b5aa4abc", "score": "0.58544105", "text": "function guardarModificarDocumentoN3(){\n\n if(MODIFICAR == 1){\n guardarModificacionDocumentoN3();\n }else{\n guardarDocumentoN3();\n }\n}", "title": "" }, { "docid": "100576a6cb229148f2542d0f0904aac3", "score": "0.5848242", "text": "function validarCampos2() {\n\tsaveUsuarios();\n}", "title": "" }, { "docid": "ea36743c7c4c396a80b333c17bcc2507", "score": "0.58376294", "text": "function checkLastLogin() {\n\n }", "title": "" }, { "docid": "5b9d81bfaa44ea7f21e3119dfb66da2a", "score": "0.582465", "text": "function observa() {\n firebase.auth().onAuthStateChanged((user) => {\n if (user) {\n var observador = \"existe\";\n console.log(observador);\n $$(\"#pantalla_ingresado\").removeClass('oculto').addClass('visible');\n $$(\"#pantalla_sin_ingresar\").removeClass('visible').addClass('oculto');\n $$(\"#barra\").removeClass('oculto').addClass('visible');\n $$(\"#barra2\").removeClass('oculto').addClass('visible');\n } else {\n observador = \"no existe\";\n console.log(observador);\n $$(\"#pantalla_ingresado\").removeClass('visible').addClass('oculto');\n $$(\"#pantalla_sin_ingresar\").removeClass('oculto').addClass('visible');\n $$(\"#barra\").removeClass('visible').addClass('oculto');\n $$(\"#barra2\").removeClass('visible').addClass('oculto');\n }\n });\n}", "title": "" }, { "docid": "1a2b968286bcbce0977a0f071c499b1b", "score": "0.58205444", "text": "function GuardarDatos() {\n if (comprobarUso() && ModoCambiado == true) {\n var modo = localStorage.getItem(\"Modo\");\n if (modo == \"auto\") {\n localStorage.setItem(\"ModoEstadisticas\", \"Automático\");\n localStorage.setItem(\"Velocidad auto\", arrayVelocidad);\n localStorage.setItem(\"Tiempo total auto\", tiempo);\n } else if (modo == \"manual\") {\n localStorage.setItem(\"ModoEstadisticas\", \"Manual\");\n localStorage.setItem(\"Velocidad manual\", arrayVelocidad);\n localStorage.setItem(\"Tiempo total manual\", tiempo);\n } else {\n localStorage.setItem(\"ModoEstadisticas\", \"Por cotas\");\n localStorage.setItem(\"Velocidad cotas\", arrayVelocidad);\n localStorage.setItem(\"Tiempo total cotas\", tiempo);\n }\n window.open(\"pages/estadisticas.html\");\n }\n}", "title": "" }, { "docid": "a2ddfc261b9ee5e51441ebf50737c58e", "score": "0.5804696", "text": "function handlePerfil() {\n localStorage.setItem('owner', 'true')\n history.push('/perfil');\n history.go(0);\n }", "title": "" }, { "docid": "684b89c1d1ea6c4a36814fd49f271f9f", "score": "0.5803076", "text": "async save() {\n if (this.user && this.user.fname && this.user.lname\n && this.user.email && this.user.password)\n await this.users.saveUser(this.user);\n await this.getUsers();\n this.back();\n }", "title": "" }, { "docid": "0d36ef7b0cfcada1b39987b041f5508c", "score": "0.58020884", "text": "function procesarRegistro(data) {\n\t\tif (data.resultado == REGISTRO_USUARIO_EXISTENTE) \n\t\t\tUILG.error(1, 367, ERROR_USUARIO_EXISTENTE, '');\n\t\telse if (data.resultado == REGISTRO_CORREO_EXISTENTE)\n\t\t\tUILG.error(1, 367, ERROR_CORREO_EXISTENTE, '');\n\t\telse {\n\t\t\t$(\"#lg_user\").val(data.idUsuario);\n\t\t\t$(\"#lg_panel_registro\").hide();\n\t\t\t$(\"#lg_panel_login\").show();\n\t\t\t$(\"#lg_password\").focus();\n\t\t}\n\t}", "title": "" }, { "docid": "e5f5af4c596d778f775ac783beabb961", "score": "0.5775238", "text": "function clNuevoUsuario(){ mostid(\"idnuevosuser\");}", "title": "" }, { "docid": "1c072cc7ee1867fc7cc9f4b466814c84", "score": "0.5773921", "text": "function inactividad() {\n //Solo se excedera el tiempo cuando la sesion cuente como iniciada\n if (localStorage.getItem(\"Cookie_Sesion\") == \"true\") {\n alert(\"SESION EXPIRADA\");\n localStorage.setItem(\"Cookie_Sesion\", \"false\");\n localStorage.removeItem(\"user\");\n }\n}", "title": "" }, { "docid": "5a36d55fe5a489eb03f35f005422961f", "score": "0.5766951", "text": "function guardaDados(){\n let nomeDeUsuario = selectId(\"nomeDeUsuario\").value;\n let email = selectId(\"email\").value;\n let senha = selectId(\"senha\").value;\n let dadosDoUsuario = {email:email, senha:senha};\n localStorage.setItem(nomeDeUsuario, JSON.stringify(dadosDoUsuario));\n}", "title": "" }, { "docid": "d5ace7a0f967abcba978057848e4069c", "score": "0.57607675", "text": "function comprobarGanador() {\n //si hemos introducido todas las letras de la palabra\n if (contadorLetras == palabra.length) {\n //deshabilitamos el input\n inputLetra.disabled = true;\n //esperamos 3 segundos y mostramos el mensaje de ganar, reseteando todos los campos\n setTimeout(function() {\n mostrarParte4();\n pTextoFinal.innerHTML = \"Has acertado\";\n contadorLetras = 0;\n contadorFallos = 0;\n pFallos.innerHTML = \"FALLO 0 / 10\";\n //incrementamos la posicion de la palabra del usuario actual, para que a la próxima jugada nos muestre la siguiente palabra\n usuarioActual.palabra++;\n //guardamos el usuario en el local storage con la posición de la palabra actualizada\n guardarUsuario();\n\n //si se han terminado las palabras\n if (usuarioActual.palabra == 10) {\n //reiniciamos el contador palabras y guardamos los cambios\n usuarioActual.palabra = 0;\n guardarUsuario();\n }\n }, 3000);\n }\n}", "title": "" }, { "docid": "8e911ed180d790485f4760a610faa120", "score": "0.57605684", "text": "verificar() {\n var idIngresado = document.getElementById(\"id\").value;\n if (!idVer && idIngresado != \"\") {\n if (alertarCorreo(\"El id ingresado ¡No está asociado a ningún dato!\",true,idIngresado)) {\n validacion(true, \"<p>Se ha enviado el aviso al administrador, puedes seguir cargando.</p>\", \"validador\");\n metodoParaCargar.id.disabled;\n document.getElementById(\"botonCargar\").focus();\n return idVer = true;\n } else {\n validacion(false, \"<p>El ID ingresado no está asociado en la base de datos.</p>\", \"validador\");\n idVer = 3;\n document.getElementById(\"pesoEntrada\").value = \"\";\n document.getElementById(\"id\").value = \"\";\n return document.getElementById(\"pesoEntrada\").focus();\n }\n } else if (idVer && document.getElementById(\"id\").value != \"\") {\n validacion(true, \"<p>El id está asociado a: \" + nombre + \"</p>\", \"validador\");\n }\n\n document.getElementById(\"botonCargar\").disabled = !(idVer && pesoVer && idVer != 3);\n }", "title": "" }, { "docid": "454e036c980adbf2c1e72b095f37472c", "score": "0.5755633", "text": "prefillForm(){\r\n\t this.undoButton.style.opacity = \"0\";\r\n\t\t\t\tif((localStorage.getItem(\"your family name :\")) && (localStorage.getItem(\"your name :\"))) {\r\n\t\t\t\t\tthis.userSurname.value = localStorage.getItem(\"your family name :\");\r\n\t\t\t\t\tthis.userName.value = localStorage.getItem(\"your name :\");\r\n\t\t\t\t\tsessionStorage.removeItem(\"your station :\");\r\n\t\t\t\t\tsessionStorage.removeItem(\"station address :\");\r\n\t\t\t\t\tsessionStorage.removeItem(\"resting time min :\");\r\n\t\t\t\t\tsessionStorage.removeItem(\"resting time sec :\");\r\n\t\t\t\t}\r\n\t}", "title": "" }, { "docid": "7b26c3a85f1c0457aff98abff58d2e5d", "score": "0.5749905", "text": "function dibujar_usuario_inexistente() {\n //OCULTAR EL SPINNER DE CARGA\n document.getElementById('carga-repositorios-perfil').className = 'd-none';\n //REMOVER EL MENSAJE DE REPOSITORIOS\n informacion_repositorios_perfil.innerText = \"\";\n //MOSTRAR ALERTA DE USUARIO INEXISTENTE\n alerta(\"Este usuario no existe.\", \"alert-danger\");\n //MOSTRAR MENSAJE DE USUARIO INEXISTENTE\n let h4 = document.createElement('h4');\n h4.className = 'text-center mx-auto mt-5 w-100';\n h4.innerText = 'Este usuario no existe...';\n contenedor_tarjetas_repositorios.appendChild(h4);\n let p = document.createElement('p');\n p.className = \"text-center mx-auto mt-2 w-100\";\n p.innerText = \"Error: 404\";\n contenedor_tarjetas_repositorios.appendChild(p);\n //BOTON PARA CREAR UN NUEVO REPOSITORIO\n let button = document.createElement('button');\n button.className = \"boton-acento mx-auto w-auto\";\n button.innerText = \"Volver a inicio\";\n button.onclick = () => {\n window.location.href = \"/dashboard\";\n }\n contenedor_tarjetas_repositorios.appendChild(button);\n}", "title": "" }, { "docid": "ab478945f215cabf65811b2a86296c50", "score": "0.5749761", "text": "function compruebo(){\n\n\tif(sessionStorage.getItem(\"usuario\")){\n\t}\n\telse{\n\n\t\tlocation.href=\"index.html\";\n\n\t}\n}", "title": "" }, { "docid": "c7510f62a1711b9b8df3c02c60361e33", "score": "0.5744492", "text": "function iniciarSesion() {\n\tcodigoSeguridadIngreso = obtenerCodigo();\n\tif (codigoSeguridad == codigoSeguridadIngreso) {\n\t\treturn alert('Bienvenido '+ nombreUsuario + ' ya puedes realizar operaciones');\n\t}\n\telse {\n\t\tsaldoCuenta = 0;\n\t\treturn alert('Codigo incorrecto. Tu dinero ha sido retenido por medidas de seguridad');\t\n\t}\n}", "title": "" }, { "docid": "fc04ab4be8c6f22cd0602edaf956ccc1", "score": "0.5738331", "text": "function validarObservacion()\n{\n\tdbShell.transaction(function(tx) \n\t{ \n\t\tvar numero = document.getElementById(\"txtNumero\").value;\n\n\t\ttx.executeSql(\"SELECT * FROM UsuariosServicios where Numero=?\",[numero], \n\t\tfunction(tx, result)\n\t\t{\n\t\t\tvar lect = result.rows.item(0)['LecturaActual'];\n\t\t\tvar cau = result.rows.item(0)['CausalActual'];\n\n\t\t\t//\n\t\t\t//\n\n\t\t\tif(lect != '' || cau > 0)\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"txtCausal\").value = 0;\n\t\t\t\tdocument.getElementById(\"txtObservacion\").value = 0;\n\t\t\t\tdocument.getElementById(\"txtObservacion2\").value = 0;\n\t\t\t\tdocument.getElementById(\"txtObservacion3\").value = 0;\n\t\t\t\twindow.location.href=\"#/observacionuno\";\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar Observacion1 = document.getElementById(\"txtObservacion\").value;\n\t\t\t\tvar Observacion2 = document.getElementById(\"txtObservacion2\").value;\n\n\t\t\t\tif(Observacion1 > 0)\n\t\t\t\t{\n\t\t\t\t\tif(Observacion2 > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.location.href=\"#/observaciontres\";\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.location.href=\"#/observaciondos\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twindow.location.href=\"#/observacionuno\";\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}", "title": "" }, { "docid": "804a5dfc84277f5b899c023ff7ee4304", "score": "0.5731007", "text": "function guardarDatosUsuario() {\n\nconsole.log('entra a a guardar');\nnombre = $$(\"#nombreregistro\").val();\napellido = $$(\"#apellidoregistro\").val();\nnick = $$(\"#nick\").val();\ndescripcion = $$(\"#descripcionusuario\").val();\nif (urlFotoPerfil == \"\") {\n urlFotoPerfil = $$(\"#mifoto\").attr('src');\n};\n\n\n\nvar datos = {\n nombre: nombre,\n apellido: apellido,\n nick: nick,\n descripcion: descripcion,\n fotodeperfil: urlFotoPerfil,\n\n}\ndb.collection(\"usuarios\").doc(email).set(datos);\napp.popup.close(\".my-popup3\");\ntienePerfil= true;\n\n}", "title": "" }, { "docid": "c409986d4ae82ef83b18254baccc8e56", "score": "0.57201374", "text": "function botonEntrar(){\n // obtiene el usuario y clave ingresados\n let _usuario = document.getElementById('usuario').value;\n let _clave = document.getElementById('clave').value;\n\n // obtiene el usuario y clave de la base de datos\n admin.query('SELECT id,clave FROM usuarioAdmin WHERE usuario = ?', [_usuario], function (error, resultado, campos) {\n if (resultado.length > 0){\n //los compara\n if (resultado[0].clave == _clave){ \n remote.getGlobal('variables').user = resultado[0].id; \n ipcRenderer.send('abrir-busca-asociados');\n }\n } else {\n console.log(\"NO EXISTES WEY\");\n }\n });\n}", "title": "" }, { "docid": "103010d7a1021b1633067119834e0af6", "score": "0.57024115", "text": "function irAAgregarHorario(){\r\n\tvar msg = \"Desea Agregar un NUEVO REGISTRO?.. \";\r\n\t//Obtengo el valor que define si el formulario a sufrido cambios, para definir el mensaje de confirmacion\r\n\tvar cambiosSinGuardar = $(\"#h_cambios\").val();\r\n\tif(cambiosSinGuardar == \"true\") msg = 'Puede haber cambios sin guardar en el formulario, ¿Desea agregar un NUEVO Registro de todas formas?.';\r\n\tif(confirm(msg)) Cons_horario('', 'agregar');\r\n}", "title": "" }, { "docid": "d7c5a04522d0b9376f1bc09caee28606", "score": "0.5699241", "text": "function autenticacaoProduto(tipo) {\r\n const situacao = autenticacaoLogin()\r\n\r\n if (\r\n JSON.parse(situacao).tipo == 'Administrador' ||\r\n JSON.parse(situacao).tipo == 'Comum'\r\n ) {\r\n if (tipo == 'Cadastrar') {\r\n document.getElementById('janela2').innerHTML = telaProduto(tipo)\r\n carregarListaDeFornecedoresEmProduto()\r\n } else if (tipo == 'Atualizar') {\r\n document.getElementById('janela2').innerHTML = telaBuscarProduto()\r\n }\r\n } else {\r\n mensagemDeErro('Usuário não autorizado!')\r\n }\r\n}", "title": "" }, { "docid": "072936bd331f3956a7fb8c99ea4dcd3c", "score": "0.56976974", "text": "async handleAddUser() {\n const { goBack } = this.props.navigation;\n const { nom, prenom, sex, date, distance } = this.state;\n if (nom!=\"\" && prenom!=\"\" && date!=\"\" && distance!=\"\"){\n await User.addUser(nom, prenom, sex, date.toISOString(), distance);\n goBack();\n }else{\n showAlert(\"Veuillez remplir tous les champs\", null, [], \"Erreur lors de l'ajout du patient\")\n }\n }", "title": "" }, { "docid": "b27911ccf8e6a8541b8b33afc42aff6a", "score": "0.5692939", "text": "function Validar_Login() {\n const email = document.querySelector(\"#txt_user_email\");\n const pass = document.querySelector(\"#txt_user_pass\");\n\n if (email.value != \"\"\n && pass.value != \"\") {\n for (let i in usuarios) {\n if (email.value == usuarios[i]['correo']\n && pass.value == usuarios[i]['clave']) {\n localStorage.setItem('sesion', 1);\n localStorage.setItem('logged_user', i)\n }\n }\n if (localStorage.getItem('sesion')) {\n sesion = localStorage.getItem('sesion');\n if (sesion == \"1\") {\n window.location.href = 'libros.html';\n }\n } else {\n alert('Usuario no existe y/o usuario y contraseña no coinciden');\n }\n } else {\n alert('Debe llenar los dos campos');\n }\n}", "title": "" }, { "docid": "c9238ed4fdeeb6f700f50318c0e49308", "score": "0.5685492", "text": "function guardardatos(){\n\tvar taxownerscar_id = $('#RadiotaxicarTaxownerscarId').val();\n\tif(taxownerscar_id == undefined || taxownerscar_id == ''){\n\t\t$().toastmessage('showToast', {\n\t\t\t text : 'Debe Ingresar una licencia valida para asociar',\n\t\t\t sticky : false,\n\t\t\t position : 'top-right',\n\t\t\t type : 'error',\n\t\t\t closeText: '',\n\t\t\t close : function () {\n\t\t\t }\n\t\t });\n\t\t $('#TaxownerscarRegisterpermision').focus();\n\t\treturn;\n\t}\n\t$('form#RadiotaxicarAddForm').submit();\n}", "title": "" }, { "docid": "3e689d29903fa572c0b08da873978b31", "score": "0.5669251", "text": "function guardarDatosI()\n{ \n var clave = 'apellido';\n var valor = document.getElementById('apellido').value;\n if(valor === '')\n {\n valor = 'NO DEFINIDO';\n }\n else\n {\n valor = eliminarEspacios(valor);\n valor = valor.toLowerCase();\n valor = valor.Capitaliza();\n //alert('esto es ' + valor); \n }\n storage.setItem(clave,valor);\n \n var clave = 'nombre';\n var valor = document.getElementById('nombre').value;\n if(valor === '')\n {\n valor = 'NO DEFINIDO';\n }\n else\n {\n valor = eliminarEspacios(valor);\n //alert(valor);\n valor = valor.toLowerCase();\n //alert(valor);\n valor = valor.Capitaliza();\n //alert(valor);\n }\n storage.setItem(clave,valor);\n \n var clave = 'dni';\n var valor = document.getElementById('dni').value;\n if(valor === '')\n {\n valor = 'NO DEFINIDO';\n }\n valor = eliminarEspacios(valor);\n storage.setItem(clave,valor);\n \n var clave = 'tipo';\n var valor = document.getElementById('tipo_comensal').value;\n //alert('tipo es '+valor);\n if(valor === 'Seleccione el tipo de comensal')\n {\n valor = 'NO DEFINIDO';\n }\n else if(valor === '1')\n {\n valor = 'Estudiante de carrera de grado';\n }\n else if(valor === '2')\n {\n valor = 'Docente - No docente';\n }\n else if(valor === '3')\n {\n valor = 'Invitado';\n }\n storage.setItem(clave,valor);\n \n var clave = 'facultad';\n var valor = document.getElementById('facultad').value;\n if(valor === 'Seleccione la institución donde trabaja y/o estudiá')\n {\n valor = 'NO DEFINIDO';\n }\n storage.setItem(clave,valor);\n \n var clave = 'carrera';\n var valor = document.getElementById('carrera').value;\n if(valor === 'Seleccione la carrera que estudiá')\n {\n valor = 'NO DEFINIDO';\n }\n storage.setItem(clave,valor);\n \n var clave = 'correo';\n var valor = document.getElementById('correo').value;\n if(valor === '')\n {\n valor = 'NO DEFINIDO';\n }\n valor = eliminarEspacios(valor);\n storage.setItem(clave,valor);\n \n var clave = 'codtelefono';\n var valor = document.getElementById('codtelefono').value;\n if(valor === '')\n {\n valor = 'NO DEFINIDO';\n }\n valor = eliminarEspacios(valor);\n storage.setItem(clave,valor);\n \n var clave = 'telefono';\n var valor = document.getElementById('telefono').value;\n if(valor === '')\n {\n valor = 'NO DEFINIDO';\n }\n valor = eliminarEspacios(valor);\n storage.setItem(clave,valor);\n \n var clave = 'celiaco';\n var valor = document.getElementById('celiaco').checked ;\n //alert('celiaco es ' + valor);\n //\n if(valor === true) \n {\n //alert('guardo el si');\n valor = 'SI';\n }\n else\n {\n //alert('guardo el no');\n valor = 'NO';\n }\n \n storage.setItem(clave,valor);\n \n var clave = 'vegetariano';\n var valor = document.getElementById('vegetariano').checked;\n //\n if(valor === true )\n valor = 'SI';\n else\n valor = 'NO';\n storage.setItem(clave,valor);\n \n return true;\n}", "title": "" }, { "docid": "3da2216a1a72608b5f4cd4f2bb6e7437", "score": "0.56651896", "text": "function preguntarPresupuesto(){\n const presupuestoUsuario = prompt(\"¿Cual es tu presupuesto?\")\n\n /* console.log( Number( presupuestoUsuario) ); */ //Number () convierte texto a numero si es posible sino da NaN\n \n //Si el presupuesto esta vacio o pone cancelar\n if(presupuestoUsuario === \"\" || presupuestoUsuario === null || isNaN(presupuestoUsuario) || presupuestoUsuario <=0 ){\n window.location.reload(); //Recarga la ventana actual\n } \n\n //Presupuesto valido\n presupuesto = new Presupuesto(presupuestoUsuario);\n console.log(presupuesto);\n\n ui.insertarPresupuesto(presupuesto);\n\n}", "title": "" }, { "docid": "c74b06c481034ff8a4ef33b66e17ad0d", "score": "0.56623167", "text": "function guardarDatos(usuarios) {\n // Guardar en BD: Usar el método .set()\n database.ref(\"/\").set(usuarios);\n} //como si nos refirieramos a una tabla usuarios", "title": "" }, { "docid": "1c8a1190aa9e4b0731dbe8ce904ae905", "score": "0.5660493", "text": "setUser() {}", "title": "" }, { "docid": "706bd51e889cc5fec4b12370738f767e", "score": "0.56597507", "text": "function irAAgregarCliente() {\r\n var msg = \"Desea Agregar un NUEVO REGISTRO?.. \";\r\n //Obtengo el valor que define si el formulario a sufrido cambios, para definir el mensaje de confirmacion\r\n var cambiosSinGuardar = $(\"#c_cambios\").val();\r\n if (cambiosSinGuardar == \"true\")\r\n msg =\r\n \"Puede haber cambios sin guardar en el formulario, ¿Desea agregar un NUEVO Registro de todas formas?.\";\r\n if (confirm(msg)) Cons_cliente(\"\", \"agregar\");\r\n}", "title": "" }, { "docid": "30524fc4c8351a932e56cdb219a28486", "score": "0.56552166", "text": "function guardarModificarDocumentoN1(){\n\n if(MODIFICAR == 1){\n guardarModificacionDocumentoN1();\n }else{\n guardarDocumentoN1();\n }\n}", "title": "" }, { "docid": "456605c213095fb4688d5a8b38977bbc", "score": "0.56533974", "text": "function buscarEmail()\n{\n alert('buscando el email');\n var emailABuscar = document.getElementById(\"correo\").value;\n var contraseñaABuscar = document.getElementById(\"contraseña\").value;\n\n //----------- CONECTAR A LA BD ---------------- \n var active = database.result;\n var transaccion = active.transaction([\"cliente\"], \"readonly\");\n var almacen = transaccion.objectStore(\"cliente\");\n var puntero = almacen.openCursor();\n var elementos = [];\n\n puntero.onsuccess = function (e) {\n var result = e.target.result;\n if (result === null) {\n return;\n }\n elementos.push(result.value);\n result.continue();\n };\n\n transaccion.oncomplete = function ()\n {\n var encontrado = false;\n var i = 0;\n while (i < elementos.length && !encontrado)\n {\n if (elementos[i].email === emailABuscar && elementos[i].contraseña === contraseñaABuscar)\n {\n alert(\"Contraseña verificada\");\n encontrado = true;\n\n var clave = elementos[i].email;\n var contraseña = elementos[i].contraseña;\n\n var datos = new Array();//Creamos un nuevo array vacío\n datos[0] = elementos[i].nombre;\n datos[1] = clave;\n datos[2] = contraseña;\n\n //en sessionStorage cuando cierras la pestaña no se guarda la info\n window.sessionStorage[ window.sessionStorage.length ] = JSON.stringify(datos);\n //en localStorage cuando cierras la pestaña si se guarda la info\n window.localStorage[ window.localStorage.length ] = JSON.stringify(datos);\n\n usuario = elementos[i].nombre;\n\n holaU = document.getElementById(\"correo\").innerHTML = 'Hola, ' + usuario;\n\n //CAMBIA DE PAGINA SEGUN SEA CLIENTE O DIETISTA\n if (clave === \"[email protected]\") {\n alert('diet');\n location.href = \"Dietista.html\";\n } else {\n alert('hola, '+usuario);\n location.href = \"Cliente.html\";\n }\n\n } else if (elementos[i].email === emailABuscar && elementos[i].contraseña !== contraseñaABuscar)\n {\n alert(\"Contraseña incorrecta!!!!\");\n encontrado = true;\n } else\n {\n i++;\n }\n }\n if (!encontrado)\n alert(\"El email no esta en la BD\");\n };\n}", "title": "" }, { "docid": "29763c1fc77b0b7f0a2c5c25ef3e6493", "score": "0.5648687", "text": "function guardado(){ \nvar GuardarMail = document.getElementById(\"loginemail\");\nlocalStorage.setItem(\"eMail\", GuardarMail.value);\nlocalStorage.setItem(\"contLogin\", 1)\n}", "title": "" }, { "docid": "63531fb1c0308c13c13900d21563a8c5", "score": "0.5645827", "text": "function RegistrarUsuario(){\r\n\r\n if(txtcor==\"\" txtcor==null){\r\n alert{\"Ingresa el Correo\"};\r\n txtCor.focus();\r\n } else if(txtCon.value==\"\" txtCon==null){\r\n alert(\"Ingrese la Contraseña\");\r\n txtCon.focus();\r\n }else{\r\n //Capturando Valores\r\n var cor=txtCor.value;\r\n var cor=txtCor.value;\r\n //llamamos a la funcion de firebase para crear usuarios\r\n .auth().createUserWithEmailAndPassword(email, password)\r\n .then((userCredential) => {\r\n // Signed in\r\n alert(\"se registró el usuario en firebase\");\r\n Limpiar();\r\n })\r\n.catch((error) => {\r\n alert(\"No se pudo regitrar el usuario en Firebase\");\r\n limpiar();\r\n });\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "fea6a1f2ffc3df572984b7bad3458452", "score": "0.5644552", "text": "function existeUsu() {\n \n var emailABuscar = document.getElementById(\"correo\").value;\n fechaI = document.getElementById(\"fechaI\").value;\n fechaF = document.getElementById(\"fechaF\").value;\n var active = database.result;\n var transaccion = active.transaction([\"cliente\"], \"readonly\");\n var almacen = transaccion.objectStore(\"cliente\");\n var puntero = almacen.openCursor();\n var elementos = [];\n \n puntero.onsuccess = function (e) {\n var result = e.target.result;\n if (result === null) {\n return;\n }\n elementos.push(result.value);\n result.continue();\n };\n transaccion.oncomplete = function ()\n {\n var encontrado = false;\n var i = 0;\n while (i < elementos.length && !encontrado)\n {\n if(emailABuscar === elementos[i].email){\n if (fechaI <= fechaF) {\n buscarActividad();\n encontrado = true;\n } \n else\n alert('fecha incorrecta');\n }\n else\n i++;\n }\n \n if (!encontrado)\n alert(\"El email no esta en la BD\");\n else\n alert(\"Usuario encontrado;\");\n };\n}", "title": "" }, { "docid": "91a32142069f57ead3e04a57e20ef82a", "score": "0.5643824", "text": "inicio() {\n firebase.auth().onAuthStateChanged((user) => {\n if (user) {\n var uid = user.uid;\n db.collection(\"Usuarios\")\n .doc(uid)\n .onSnapshot((doc) => {\n const apeliidomaterno = doc.data().ApellidoMaterno;\n const apeliidopaterno = doc.data().ApellidoPaterno;\n const nombre = doc.data().Nombre;\n const cedula = doc.data().Cedula;\n const consulta = doc.data().Costoconsulta;\n const correo = doc.data().Email;\n const telefono = doc.data().Telefono;\n const estado = doc.data().Estado;\n const especialidad = doc.data().Especialidad;\n const descripcion = doc.data().Descripcion;\n const terminoinscripcion = doc.data().Terminoinscripcion;\n const nacimiento = doc.data().Fecha;\n const imagenperfil = doc.data().ImagenPerfil;\n var terminoinscrip = new Date(\n terminoinscripcion\n ).toLocaleDateString(\"en-US\");\n document.getElementById(\"nombre\").innerText =\n nombre + \" \" + apeliidopaterno + \" \" + apeliidomaterno;\n document.getElementById(\"cedula\").innerText = cedula;\n document.getElementById(\"consulta\").innerText = consulta;\n document.getElementById(\"correo\").innerText = correo;\n document.getElementById(\"telefono\").innerText = telefono;\n document.getElementById(\"estado\").innerText = estado;\n document.getElementById(\"terminoinscripcion\").innerText =\n terminoinscrip;\n document.getElementById(\"especialidad\").innerText =\n especialidad;\n document.getElementById(\"descripcion\").innerText =\n descripcion;\n document.getElementById(\"imagenperfil\").src = imagenperfil;\n\n document.getElementById(\"nombremodificar\").value = nombre;\n document.getElementById(\"apellidoPmodificar\").value =\n apeliidopaterno;\n document.getElementById(\"apellidoMmodificar\").value =\n apeliidomaterno;\n document.getElementById(\"costomodificar\").value = consulta;\n document.getElementById(\"telefonomodificar\").value = telefono;\n document.getElementById(\"descripcionmodificar\").value =\n descripcion;\n var convercion = new Date(nacimiento);\n var hoy = new Date();\n var edad = hoy.getFullYear() - convercion.getFullYear();\n document.getElementById(\"edadMedico\").innerText = edad;\n });\n } else {\n alert(\"Usuario no logeado\");\n window.location.href = \"/\";\n }\n });\n }", "title": "" }, { "docid": "e582f36b9b81c1b09b16678154fe8cbb", "score": "0.56428003", "text": "doLogin() {\n this.usuarios = this.serviceLoggin.getUser(this.usuario);\n console.log(this.usuarios);\n this.usuarios.forEach(element => {\n console.log(element.length);\n this.length = element.length;\n localStorage.setItem(\"idUsuario\", element[0][\"idUsuario\"]);\n if (this.length == 1) {\n this.showConfirm();\n }\n else {\n this.showAlert();\n }\n });\n }", "title": "" }, { "docid": "379f3a7daa3e12b871ac4292984838b9", "score": "0.56420386", "text": "save() {\n const user = this.state.user\n const method = 'post'\n const url = baseUrl\n const methodP = 'post'\n const urlP = baseUrlPerfil\n\n const perfil = this.state.perfil\n perfil.url_img_perfil = \"branca.png\"\n\n var senhaConf = document.getElementById('senhaCon').value\n user.senha == senhaConf && user.nome_user != '' && user.data_nascimento != ''\n && user.email != '' && user.telefone != '' && user.genero != '' && user.cpf != ''\n && user.senha != '' ? (\n axios[method](url, user)\n .then(resp => {\n perfil.id_user = resp.data.id\n axios[methodP](urlP, perfil)\n alert(\"CADASTRO REALIZADO COM SUCESSO!\")\n })\n ) : (\n alert(\"FALHA AO CADASTRAR!\")\n )\n }", "title": "" }, { "docid": "8ab4ff8e2db0a78937b38c342c41938c", "score": "0.56401974", "text": "function guardarDatos() {\n \tlocalStorage.password = document.getElementById(\"contraseñaid\").value;\n\t}", "title": "" }, { "docid": "571a0df507c64727cb2b13371e73615a", "score": "0.563592", "text": "function clienteLogueado() {\n const cliente = 'Juan';\n console.log(cliente);\n\n if (login) {\n const cliente = 'Admin';\n console.log(cliente);\n }\n}", "title": "" }, { "docid": "90530131240780fffef4428955775f40", "score": "0.5635231", "text": "function testOk() {\n //datos dados para su verificacion.\n const resultadoType = saveUser(true);\n //resultado que se espera.\n const esperadoType = '';\n //se verifica si el resultado es el deseado o no.\n if (resultadoType != esperadoType) {\n console.log('No hay es vacio.');\n }\n else {\n //Se presenta que el resultado no es el esperado.\n throw new Error('Hay datos vacios')\n }\n}", "title": "" }, { "docid": "0494cc636a20025de5e99bb3f83291c7", "score": "0.5634849", "text": "function irAAgregarTurno(){\r\n\tvar msg = \"Desea Agregar un NUEVO REGISTRO?.. \";\r\n\t//Obtengo el valor que define si el formulario a sufrido cambios, para definir el mensaje de confirmacion\r\n\tvar cambiosSinGuardar = $(\"#t_cambios\").val();\r\n\tif(cambiosSinGuardar == \"true\") msg = 'Puede haber cambios sin guardar en el formulario, ¿Desea agregar un NUEVO Registro de todas formas?.';\r\n\tif(confirm(msg)) Cons_turno('', 'agregar');\r\n}", "title": "" }, { "docid": "970ba62f6b93df3834c61b6fb0d7da51", "score": "0.563398", "text": "function guardarModificarDocumentoN2(){\n\n if(MODIFICAR == 1){\n guardarModificacionDocumentoN2();\n }else{\n guardarDocumentoN2();\n }\n}", "title": "" }, { "docid": "ebf50b0826e7a22b46fef72f204e272f", "score": "0.5632925", "text": "async ListAdmin() { // comprueva el login si el cliente con los datos existe\n fetch(urlbase + \"api/ApiManager.php?ob=clie&A=list\"\n + \"&tip=3\"\n + \"&uss=\" + this.corre\n + \"&pas=\")\n .then(response => response.json())\n .catch(Error => console.log(Error))\n .then(data => {\n data.forEach(element => {\n console.log(element);\n localStorage.setItem(\"valid\", element.dni_user);\n });\n //$('#ContenerAdmin').html(html_codeIten);\n }).catch(Error => console.log(Error));\n }", "title": "" }, { "docid": "85e5d10876985de708fff7b0227dbb81", "score": "0.56268346", "text": "function enviarOcorrencia(){\n\t\n\t// verificando se a cidade do cidadão tem nossos serviços contratados\n\tif (verificaCidadeContratada(window.localStorage.getItem(\"cidade\")) == false){\n\t\tmyApp.alert(\"Sua cidade ainda não possui o Cidadão Auditor! \\n Vamos receber sua ocorrência e entrar em contato com a sua prefeitura\", \"Atenção!\");\n\t\treturn false;\n\t}\n\n\t\n\tif ($(\"#tipoOcorrencia option:selected\").val() == 0){ \n\t\tmyApp.alert(\"O Tipo da Ocorrência deve ser informado.\", \"Atenção!\");\n\t\treturn false;\n\t}\n\t\n\tif ($(\"#observacao\").val() == \"\"){\n\t\tmyApp.alert(\"Você deve nos informar o que está acontecendo.\", \"Atenção!\");\n\t\treturn false;\n\t}\n\t\n\t// verificando se o usuario está logado no sistema\n\tif (window.localStorage.getItem(\"email_usuario\") == \"\" || window.localStorage.getItem(\"email_usuario\") == undefined){\n\t\t// caso não esteja logado exibe a mensgem informando que é necessário estar logado\n\t\tmyApp.alert(\"Você precisa estar logado para enviar suas ocorrências\", \"Atenção!\");\n }\n\t\n\trealizaEnvioOcorrencia();\n}", "title": "" }, { "docid": "6a8231f37c83644e0728f71256b4ad7a", "score": "0.5623342", "text": "function verificarUsuario() {\n\tusuario=$('#idInpUsuario').val();\n\tif(usuario.trim()!=''){\n\t\tocultarOpcionesLoginInicio();\n\t\tmostrarOpcionesLogin();\n\t\t$('#idLabelNombreUsuario').html(usuario);\n\t\t\n\t}else{\n\t\talert('El campo Usuario se encuentra en blanco.');\n\t\t$('#idInpUsuario').focus();\n\t}\n\t\n}", "title": "" }, { "docid": "2a1fcbe5755df963c14bcaa091d70240", "score": "0.56226516", "text": "clckAceptar() {\n\n\n if (this.items.nombre == \"\" || this.items.compania == \"\" || !this.files2.length || this.items.clave == \"\") {\n this.println(\"Hay que llenar todos los campos\");\n return;\n }\n\n this.barra = true;\n this.subirImag(this.files2[0]); //con est estoy subiendo la imagen al servidor \n\n }", "title": "" }, { "docid": "1af792d5ce7ddf2d92250e86e96e6dec", "score": "0.56221956", "text": "function redireccionaSiNoEstasLogueado(){\n \n if(window.localStorage){\n //alert(\"Va\");\n if(sessionStorage.getItem(\"login\")){ // Si hay datos en loginStorage ...\n \n }else{\n alert(\"No estas logueado. No puedes estar aquí.\");\n location.href=\"/rutalandia/login.html\";\n }\n }\n}", "title": "" }, { "docid": "e8cac0736ffb34d0000151c6bc0de7f8", "score": "0.56172264", "text": "function guardarProgreso() {\r\n\tCrafty.storage('progreso', progreso);\r\n}", "title": "" }, { "docid": "5c0debe6edf5204165ef58225ed12a18", "score": "0.56141", "text": "function cargar(){\n //obtiene la informacion del usuario online\n online();\n //espera 100 milisegundos para setear la informacion dentro de los inputs del sitio\n window.setTimeout(function(){ \n llenar_perfil(info_usuario);\n }, 100);\n}", "title": "" }, { "docid": "8040d19dd27b5334c6b26a5c98ac1c88", "score": "0.56126267", "text": "function modificarPerfil(){\r\n\r\n}", "title": "" }, { "docid": "defa71705bf070027cd86649550164a1", "score": "0.5606738", "text": "function guardarDatos() {\n localStorage.name = document.getElementById(\"nombreid\").value;\n localStorage.surname = document.getElementById(\"apellidoid\").value;\n\t}", "title": "" }, { "docid": "94f0f361fd95f3785f8fcc97aa96bc7f", "score": "0.56036633", "text": "function comprobarRecordatorio(ComprobandoRecordatorio) {\r\n var recordatorioExistente = localStorage.getItem(\"recordatorios\");\r\nif(!recordatorioValido(recordatorioExistente)) {\r\n// Usuario Nuevos\r\n\r\n var recordatoriosRetenidos = [];\r\n console.log('hola')\r\n recordatoriosRetenidos.push(ComprobandoRecordatorio);\r\nguardarRecordatorio(recordatoriosRetenidos);\r\n\r\nmostrarRecordatorios();\r\n\r\n}else {\r\n // Usuarios Ya existentes\r\n console.log(\"dsda\");\r\n \r\n var recordatoriosRecuperados = JSON.parse(recordatorioExistente);\r\n recordatoriosRecuperados.push(ComprobandoRecordatorio);\r\n console.log(recordatoriosRecuperados)\r\nguardarRecordatorio(recordatoriosRecuperados);\r\n\r\n\r\n}\r\n\r\n}", "title": "" }, { "docid": "d7abe381032eb09e08f22cb92fc6c1a3", "score": "0.55976295", "text": "CompruebaLleno() {\n if (this.state.nombre != undefined && this.state.username != undefined && this.state.contra != undefined) {\n //cambiamos el estado de la variable permitir a true, esto permitirá poder acceder a la funcion que realizar el POST en el JSON\n this.setState({ permitir: true });\n }\n else{\n Alert.alert('Tienes que completar todos los campos');\n }\n //comprobamos que el campo de la contraseña es igual que el de repetir contraseña para poder validar la propia\n if ((this.state.contra === this.state.contraRepite)) {\n //aquí comprobamos que todos los campos han sido seleccionados con el bool que cambiará en caso de que eso suceda \n if ((this.state.permitir == true)) {\n //Aquí llamamos a la propia funcion con la que vamos a hacer el post en el fichero JSON\n this.InsertoAlumnos();\n }\n }\n }", "title": "" }, { "docid": "9b1b223640099fdb7d6f778c433f504c", "score": "0.55972034", "text": "allow(userId) {\n //Chequea que solo el usuario administrador tenga acceso a ver la tabla animadores\n var usuario=Meteor.users.findOne({_id:userId});\n var salida=false;\n if (usuario.rol===\"Administrador\") {salida=true};\n //console.log(\"salida allow - TabularTables.inscriptosTab: \"+salida);\n return salida; // don't allow this person to subscribe to the data\n }", "title": "" }, { "docid": "9b1b223640099fdb7d6f778c433f504c", "score": "0.55972034", "text": "allow(userId) {\n //Chequea que solo el usuario administrador tenga acceso a ver la tabla animadores\n var usuario=Meteor.users.findOne({_id:userId});\n var salida=false;\n if (usuario.rol===\"Administrador\") {salida=true};\n //console.log(\"salida allow - TabularTables.inscriptosTab: \"+salida);\n return salida; // don't allow this person to subscribe to the data\n }", "title": "" }, { "docid": "9b1b223640099fdb7d6f778c433f504c", "score": "0.55972034", "text": "allow(userId) {\n //Chequea que solo el usuario administrador tenga acceso a ver la tabla animadores\n var usuario=Meteor.users.findOne({_id:userId});\n var salida=false;\n if (usuario.rol===\"Administrador\") {salida=true};\n //console.log(\"salida allow - TabularTables.inscriptosTab: \"+salida);\n return salida; // don't allow this person to subscribe to the data\n }", "title": "" }, { "docid": "b328abe55010ab463cb2ac43bc4e564c", "score": "0.55968386", "text": "function validardisponiblestudiante(form){\n\tvar error=\"por favor, complete los campos\\n\\n\";\n\tvar a=\"\";\t\n\tif(form.nombreusuario.value==\"\"){\n\t\ta +=\"Nombre Usuario\\n\";\t\n\t}\n\telse {\n\t\tform.action=\"logindisponiblestudiante.php\";\t\t\n\t}\n\tif(a!=\"\"){\n\t\talert(error + a);\n\t\treturn true;\n\t}\n\tform.disponible();\n}", "title": "" }, { "docid": "0d98f0735943bf6caf90cef9b2290cfa", "score": "0.55967224", "text": "reAsignarPersonal(clase, posicion) {\n //cojo el nombre del paciente y el nombre seleccionado\n let datosFormulario = this.obtenerDatosFormulario(clase);\n this.hospital.pacientes[posicion].personalAsignado = datosFormulario[1];\n alert(\"reasignacion realizada\");\n this.mostrarDatos(this.hospital.pacientes);\n }", "title": "" }, { "docid": "04511e22a225f661f1255aeeeb40b6c7", "score": "0.5594883", "text": "function IniciarSeccion(){\r\n\tvar email = document.getElementById('inputEmail').value; \r\n\tvar password = document.getElementById(\"inputPassword\").value;\r\n var errores = false;\r\n\r\n\r\n\tfirebaseAuth.signInWithEmailAndPassword(email, password).catch(function(error) {\r\n\t var errorCode = error.code;\r\n\t var errorMessage = error.message;\r\n\r\n\t //MANEJO DE ERRORES\r\n\t if (errorCode === 'auth/wrong-password'){\r\n errores = true;\r\n alert('Contraseña equivocada.');\r\n return;\r\n } else if (errorCode === 'auth/user-not-found'){\r\n errores = true;\r\n alert('Usuario no encontrado.');\r\n return;\r\n\r\n \t } else if(errorCode === 'auth/invalid-email'){\r\n errores = true;\r\n \t \talert('Email invalido.');\r\n \t \treturn;\r\n\r\n \t } else if(errorCode === 'auth/user-disabled'){\r\n errores = true;\r\n \t \talert('Usuario bloqueado.');\r\n \t \treturn;\r\n\r\n \t }else{\r\n errores = true;\r\n \t \talert(errorMessage);\r\n \t \treturn;\r\n \t }\r\n\t});\r\n\r\n window.alert(\"Bienvenido \" + email + \" que bueno tenerte de vuelta\");\r\n localStorage.setItem(\"PROVEEDOR\",\"LOCAL\");\r\n setTimeout(function() {\r\n if(errores == false){\r\n window.location.href=\"../../index.html\";\r\n }\r\n }, 1000);\r\n \r\n}", "title": "" }, { "docid": "99160e3ca5c063a85409fc900b7a01f6", "score": "0.55922085", "text": "function desconectar() {\n localStorage.clear();\n muestraLogin();\n} /////////////////////////////CREAR JUEGO//////////////////////////////////", "title": "" }, { "docid": "931a90e5a9395f7e27d80bc79403ea10", "score": "0.55906427", "text": "function esElPerfilDeLaPersonaLogin() {//esta funcion se usa para entrar al perfil de la persona que se encuentra logueada en la aplicacion\n return usuario._id === usuarioDueñoDelPerfil._id;//retornamos que cuando el id del usuario sea exactamente igual al del logueado\n }", "title": "" }, { "docid": "0f8e4ad086c639c7b6e551f1a2d14488", "score": "0.558507", "text": "registerUser(e) {\n let self = this;\n e.preventDefault();\n var data = {\n //Dati per update profilo fornitore\n Nome: '', //text\n Cognome: '',\n AccessoMail: '',\n Passwd: '',\n Ruolo: '',\n Lingua: '',\n Telefono: '',\n NomeForn: '',\n Categoria: 1,\n SottoCategoria: '',\n IvaForn: '',\n TelefonoAziendale: '',\n FGiurid: '',\n ATECO: '', //alfanumerico\n AnnoCCIAA: '', //da implementare\n ProvinciaCCIAA: '',\n NumeroREA: '',\n SitoWeb: '',\n PEC: '',\n AreaServizio: '',//da implementare\n SubAreaServizio: '',//da implementare\n SLStato: '',\n SLRegione: '',\n SLProvincia: '',\n SLIndirizzo: '',\n SLCAP: '',\n SLFAX: '',\n SAmmStato: '',\n SAmmRegione: '',\n SAmmProvincia: '',\n SAmmCAP: '',\n SAmmFAX: '',\n SAmmProvincia: '',\n SAmmIndirizzo: '',\n FattAnnuo1: '',//da implementare\n FattAnnuo2: '',//da implementare\n FattAnnuo3: '',//da implementare\n OrgMedio1: '',//da implementare\n OrgMedio2: '',//da implementare\n OrgMedio3: '',//da implementare\n TipoCCNL: '',//da implementare\n PosINPS: '',//da implementare\n PosINAIL: '',//da implementare\n CapSociale: '', //da implementare\n NDipendenti: '',//da implementare\n NStabilimenti: '',//da implementare\n }\n\n //controllo che siano stati accettati tutti i termini\n if (this.state.Policy & this.state.Privacy & this.state.TermCond & this.state.CodEtic) {\n axios.post('/api/register', {\n data: this.state.data\n })\n .then((response) => {\n //const res = response.clone();\n if (response.status >= 400) {\n throw new Error(\"Bad response from server\");\n }\n return response;\n }).then(function (result) {\n\n //console.log(\"risultato\" + result);\n if (result.data.length != 0) { //diverso da null se ricevo una risposta altrimenti do un alert di reinserimento dati\n eventBus.addNotification('success', \"Utente reigstrato con successo!\");\n window.location.reload()\n } else {\n eventBus.addNotification('error', 'Registrazione non risucita, controllare la correttezza dei campi!');\n }\n }).catch(function (error) {\n console.log(error);\n });\n }else{\n eventBus.addNotification('error', 'Devi accettare tutte le condizioni prima di registrarti!');\n }\n }", "title": "" }, { "docid": "de6dd7fe539de94f3aa6d277e8f148b6", "score": "0.55832916", "text": "function observador() {\r\n firebase.auth().onAuthStateChanged(function(user) {\r\n if (user) {\r\n console.log(' hay alguien')\r\n //pasamos la variable usuario al mensaje para saver si el usuario a verificado el correo \r\n msgInicioExitoso(user);\r\n\r\n // User is signed in.\r\n var displayName = user.displayName;\r\n var email = user.email;\r\n var emailVerified = user.emailVerified;\r\n var photoURL = user.photoURL;\r\n var isAnonymous = user.isAnonymous;\r\n var uid = user.uid;\r\n var providerData = user.providerData;\r\n // ...\r\n } else {\r\n // User is signed out.\r\n\r\n msg.innerHTML = `\r\n `;\r\n console.log('no hay nadie')\r\n }\r\n });\r\n}", "title": "" }, { "docid": "21f5c7b6bdaf836abb039421e80a369b", "score": "0.55798197", "text": "function guardarDatos(alias, nombre, pass, sexo, fechaNaci, aficiones) {\n var fechaNacimiento = fechaNaci.selectedIndex;\n var textoCookie = \"\";\n var tamSexo = sexo.length;\n var tamAficiones = aficiones.length;\n\n for(i=0; i<tamSexo;i++){\n if(sexo[i].checked==true){\n textoCookie += sexo[i].value + \"#\";\n }\n }\n textoCookie += fechaNacimiento + \"#\";\n for(i=0;i<tamAficiones;i++){\n if(aficiones[i].checked){\n textoCookie += aficiones[i].value + \"#\";\n }\n }\n\n var tamanio = textoCookie.length -1;\n textoCookie = textoCookie.substring(0, tamanio);\n\n if(debug){\n console.log(\"Cookie: \"+textoCookie);\n }\n document.cookie = textoCookie;\n\n if(debug){\n console.log(\"Esta es la cookie => \" +document.cookie);\n }\n\n\n\n}", "title": "" }, { "docid": "17dd935da9ae9aaac8cc3623cd65c58e", "score": "0.5576407", "text": "function enviarSugestao(){\n\t\n\t// verificando se a cidade do cidadão tem nossos serviços contratados\n\tif (verificaCidadeContratada(window.localStorage.getItem(\"cidade\")) == false){\n\t\tmyApp.alert(\"Sua cidade ainda não possui o Cidadão Auditor! \\n Vamos receber sua sugestão e entrar em contato com a sua prefeitura\", \"Atenção!\");\n//\t\treturn false;\n\t}\n\n\t\n\tif (window.localStorage.getItem(\"email_usuario\") == null){\n\t\tmyApp.alert(\"Você precisa estar logado para enviar suas sugestões.\", \"Atenção!\");\n\t\treturn false;\n\t}\n\t\n\t// verificando se informou os dados obrigatorios\n if ($(\"#tituloSugestao\").val() == \"\"){ \n myApp.alert(\"Você deve informar o título da sua sugestão.\", \"Atenção!\");\n\t\treturn false; \n }\n\n if ($(\"#descricaoSugestao\").val() == \"\"){ \n\t\tmyApp.alert(\"Você deve descrever sua sugestão.\", \"Atenção!\");\n return false; \n }\n\n // gerando o token para o acesso ao servidor\n token = gerarTokenSync(window.localStorage.getItem(\"email_usuario\"), \n window.localStorage.getItem(\"senha_usuario\")); \n\n // gerando a url de envio dos dados\n var urlSyncSugestao = getUrlSync() + \"sugestao?token=\" + token + \"(\" + window.localStorage.getItem(\"email_usuario\") + \")\";\n\n var sugestao = new Object();\n var pessoa = new Object();\n //tipoOcorrencia.descricao = $(\"#tipoOcorrencia option:selected\").text();\n pessoa.email = window.localStorage.getItem(\"email_usuario\");\n sugestao.pessoa = pessoa;\n\tsugestao.descTipo = $(\"#tipoSugestao option:selected\").val();\n\tsugestao.titulo = $(\"#tituloSugestao\").val();\n\tsugestao.endereco = $(\"#enderecoSugestao\").val();\n\tsugestao.descricao = $(\"#descricaoSugestao\").val();\n\t\n // transformando o objeto em uma string json\n var obj = JSON.stringify({ sugestao: sugestao }); \n\tmyApp.showIndicator();\t\n // enviando os dados\n $.ajax({\n url: urlSyncSugestao,\n type: \"POST\",\n contentType: \"application.mob/json; charset=utf8\",\n data: obj,\n //async: false,\n dataType: \"json\", \n success: function (data) { \n\t\t\t\n\t\t\tif (data.messages != null && data.messages.erro != null && data.messages.erro[0] != null){\n \t\tmyApp.alert(data.messages.erro[0], \"Atenção\");\n \t\tmyApp.hideIndicator();\n \t\treturn false;\n \t}\n\t\t\n myApp.alert(\n 'Sugestão enviada com sucesso!\\n' + \n 'PROTOCOLO\\n' +\n data.sugestao.protocolo + \"\\n Guarde o nº do protocolo para consultar o que achamos da sua sugestao!\",\n 'Atenção!');\n\t\t\t\t\n\t\t\tmyApp.hideIndicator();\n\t\t\t\t\n },\n \n // retorno de erro da chamada\n error: function(jqXHR, exception) {\n\t\t\tmyApp.hideIndicator();\n trataErroSincronizacao(jqXHR, exception);\n return false;\n }\n\n }); \t\n\t\n}", "title": "" }, { "docid": "1bd60576c2f0ba2a98d94ec1390ce978", "score": "0.5573869", "text": "function iniciarApp()\n {\n var controlInicio = localStorage.getItem(\"controlInicio\");\n if(!controlInicio)\n {\n /* Creamos BD */\n db = createTable();\n insert();\n }\n else\n { \n /* Inicializamos BD */\n db = createTable();\n }\n }", "title": "" }, { "docid": "9486a4ad7e194a0a58534e5c3fd38653", "score": "0.5571862", "text": "function DatosUsuarioBaseDatos(){\n var nombre = document.getElementById('nombre').value;\n this.datos.nombre = nombre;\n\n var correo = document.getElementById('correo').value;\n this.datos.correo = correo;\n\n var telefono = document.getElementById('telefono').value;\n this.datos.telefono = telefono;\n\n var ciudad = document.getElementById('ciudad').value;\n this.datos.ciudad = ciudad;\n\n this.datos.hora = Date(Date.now()).toString();\n\n var refUsers = firebase.database();\n \n var datos = this.datos;\n console.log(datos);\n refUsers.ref(\"CLIENTES\").push({\n datos\n }).then((snap) => {\n var key = snap.key;\n var password = \"000000\";\n localStorage.setItem('KEY', key);\n refUsers.ref(\"CLIENTES\").child(snap.key).update({\"id\": snap.key})\n\n /* firebaseAuth.createUserWithEmailAndPassword(correo, password).catch(function(error) {\n var errorCode = error.code;\n var errorMessage = error.message;\n\n if (errorCode === 'auth/wrong-password') {\n alert('Contraseña equivocada.');\n return;\n } else {\n alert(errorMessage);\n return;\n }\n }); */\n }).then((snap) => {\n window.location.href= \"confirmacion.html\";\n });\n}", "title": "" }, { "docid": "8fd57420d6cc20ae607fcf82c2f28ec6", "score": "0.5569799", "text": "function validateReg(data) {\n if (data.scriptResp == 'regsuccess') {\n console.log('login usuario exitoso');\n// localStorage.setItem(\"userData\", JSON.stringify(data.userIntel));\n// localStorage.setItem(\"panel\", \"newOrder\"); // DEFAULT PANEL AFTER LOGIN\n// window.location.href = \"in/index.html\";\n $('body').html('');\n return false;\n }\n if (data.scriptResp == 'userAlreadyInDB') {\n $(\".username-row, .password-row, .phone-row\").velocity(\"callout.shake\");\n return false;\n }\n if (data.scriptResp != 'regsuccess' && data.scriptResp != 'userAlreadyInDB') {\n $(\".username-row, .password-row, .phone-row\").velocity(\"callout.shake\");\n return false;\n }\n}", "title": "" }, { "docid": "1aa51ad476155813f45efc7bb2464201", "score": "0.5569004", "text": "storeUserData() {}", "title": "" }, { "docid": "e74e9e70ebe9660415a31936b0cc212d", "score": "0.556886", "text": "function verificarAutenticacion(peticion, respuesta, next){\r\n\tif(peticion.session.usuario)\r\n\t\treturn next();\r\n\telse\r\n\t\trespuesta.send(\"ERROR, ACCESO NO AUTORIZADO\");\r\n}", "title": "" }, { "docid": "c1eccfd0492631e04283c9dec6881739", "score": "0.55679005", "text": "function check() {\n\n //damos acceso con true o lo negamos con false es una funcion que regresa boleano\n access = true \n // guradamos en una variable local el contenido del localstorage\n var storedName = localStorage.getItem('name');\n var storedPw = localStorage.getItem('pw');\n\n // guardamos los datos que nos proporciona el usuaio al momento del login(no registro)\n var userName = document.getElementById('userName');\n var userPw = document.getElementById('userPw');\n\n //comparamos valores de las variables y damos acceso o lo denegamos \n if(userName.value == storedName && userPw.value == storedPw) {\n alert('te has registrado correctamente.');\n access = true;\n return access;\n }else {\n alert('ERROR.');\n access = false;\n return access;\n }\n}", "title": "" }, { "docid": "5d51325c37b556b816ff3e926cc60ec1", "score": "0.55667424", "text": "function iniciar()\n{\n \n var todo_bien = true;\n\n if(document.getElementById('usuario').value.length < 2 ){\n alert('El usuario no puede quedar en blanco');\n document.getElementById('usuario').value=\"\";\n document.getElementById('usuario').focus();\n return todo_bien ==false;\n }\n\n if(document.getElementById('contraseña').value.length < 2 ){\n alert('La contraseña no puede quedar en blanco');\n document.getElementById('contraseña').value=\"\";\n document.getElementById('contraseña').focus();\n return todo_bien ==false;\n }\n \n if(todo_bien ==true)\n {\n alert('Inicio de sesion correcto');\n document.getElementById('nombre').value=\"\";\n document.getElementById('password').value=\"\"; \n }\n else\n {\n return todo_bien\n }\n}", "title": "" }, { "docid": "598d5321d6caba7af193b81062deb26b", "score": "0.5562593", "text": "function comprobarSesion(){\n if(window.localStorage){\n\n //alert(\"Va\");\n avisoRegistroCorrecto();\n\n if(sessionStorage.getItem(\"login\")){ // Si hay datos en loginStorage ...\n alert(\"Estas logueado como \" + sessionStorage.getItem(\"login\") + \" con clave de sesión \" + sessionStorage.getItem(\"pass\"));\n }else{\n alert(\"No estas logueado!\");\n }\n }\n\n}", "title": "" }, { "docid": "c973c1606b7076d66c712be73a3c87f0", "score": "0.5562278", "text": "guardarUser() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function* () {\n const path = 'Cliente';\n const name = this.cliente.nombre;\n if (this.newFile !== undefined) {\n const res = yield this.firestorageService.uploadImage(this.newFile, path, name);\n this.cliente.foto = res;\n }\n this.firestoreService.createDoc(this.cliente, path, this.cliente.uid).then(res => {\n console.log('guardado con exito');\n }).catch(error => {\n });\n });\n }", "title": "" }, { "docid": "249afaf98e39a861de31ae198881e06b", "score": "0.555794", "text": "function guardarNuevoAlumno() {\n console.log(\"click guardar\");\n // Valores de Añadir alumno nuevo\n let newId = document.getElementById(\"inputId\").value;\n let newNombre = document.getElementById(\"inputNombre\").value;\n let newAvatar = document.getElementById(\"inputAvatar\").value;\n let newGenero = document.getElementById(\"checkHombre\").checked ? \"h\" : \"m\";\n\n let alumno = {\n id: newId,\n nombre: newNombre,\n avatar: newAvatar,\n sexo: newGenero,\n };\n //Crear registro\n console.log(\"alumno a crear: %o\", alumno);\n axios\n .post(alumnosApi, alumno)\n .then((response) => {\n console.info(response);\n listarAlumnos();\n })\n .catch((error) => {\n if (error.response.status == 409) {\n alert(\"No se permiten nombre duplicados\");\n } else if (error.response.status == 400) {\n alert(\"Revise los datos\");\n }\n console.info(error.message);\n });\n}", "title": "" }, { "docid": "c36fc5b1aed335e57fdb06dd9a03f9cb", "score": "0.5557262", "text": "function deleteUsuarioLogueado() {\n localStorage.removeItem('actualUsuario');\n localStorage.removeItem('menu');\n }", "title": "" } ]
7322eabf799b0d3cf1945565f7cc9f26
Note: helper only, not part of the RFC: an atom without the optional surrounding CFWS. dot is included for obsphrase
[ { "docid": "d5194b12e26f88a03e905426856d5773", "score": "0.568327", "text": "static get atom_b_obs() { return `(?:(?:${this.atext}|\\\\.)+)`; }", "title": "" } ]
[ { "docid": "1ee05871ba2178e9504101ff722a29b5", "score": "0.5926237", "text": "function dotAtom() {\n return wrap('dot-atom', and(invis(opt(cfws)), dotAtomText, invis(opt(cfws)))());\n }", "title": "" }, { "docid": "b8ef21f7c50e490f00260ee57cbdfa05", "score": "0.58517605", "text": "function atom() {\n return wrap('atom', and(colwsp(opt(cfws)), star(atext, 1), colwsp(opt(cfws)))());\n }", "title": "" }, { "docid": "a0954fcc7bc6bbb4c1c739f91e68d347", "score": "0.57744783", "text": "function obsFws() {\n return opts.strict ? null : wrap('obs-FWS', star(\n and(invis(opt(crlf)), wsp),\n 1\n )());\n }", "title": "" }, { "docid": "f58340b43783cc59a2882e4cfee16202", "score": "0.56615335", "text": "function dotAtomText() {\n var s, maybeText;\n s = wrap('dot-atom-text', star(atext, 1)());\n if (s === null) { return s; }\n maybeText = star(and(literal('.'), star(atext, 1)))();\n if (maybeText !== null) {\n add(s, maybeText);\n }\n return s;\n }", "title": "" }, { "docid": "93dd97e05845b5d9f62dc4d919557bf1", "score": "0.5613421", "text": "static get FWS() { return `(?:${this.WSP}*(?:\\r\\n)?${this.WSP}+)`; }", "title": "" }, { "docid": "a9b15e31fe2b75269056265fd1dd7588", "score": "0.55533427", "text": "static get phrase() { return `(?:${this.CFWS_op}${this.word_chain}(?:${this.CFWS}${this.word_chain})*${this.CFWS_op})`; }", "title": "" }, { "docid": "b3479374a0883a6069f18624222f0e58", "score": "0.54842514", "text": "static get CFWS_op() { return `${this.CFWS}?`; }", "title": "" }, { "docid": "a0ef0d3ae2f1911327aac20ade9f040c", "score": "0.5466858", "text": "function cfws() {\n return wrap('cfws', or(\n and(\n star(\n and(opt(fws), comment),\n 1\n ),\n opt(fws)\n ),\n fws\n )());\n }", "title": "" }, { "docid": "b7ac21235240c1416c0ffb5e3854a808", "score": "0.5380024", "text": "static get word_chain() { return `(?:(?:${this.atom_b_obs}|(?:${this.atom_b_obs}?${this.quoted_string})+${this.atom_b_obs}?))`; }", "title": "" }, { "docid": "d3f667749218e37203edec878c013fdc", "score": "0.5236864", "text": "static get domain() { return `(?:${this.dot_atom})`; }", "title": "" }, { "docid": "a91ac1965dd95aecc7aa96d044e6c4ce", "score": "0.52010334", "text": "function fws() {\n return wrap('fws', or(\n obsFws,\n and(\n opt(and(\n star(wsp),\n invis(crlf)\n )),\n star(wsp, 1)\n )\n )());\n }", "title": "" }, { "docid": "2efd8863d9215e6d094876faf1ed8e20", "score": "0.5130678", "text": "static get angle_addr() { return `(?:${this.CFWS_op}<${this.addr_spec}>${this.CFWS_op})`; }", "title": "" }, { "docid": "5688c2f4e1ee4e884c3ba6d7a72466c9", "score": "0.50464106", "text": "static get ccontent() { return `(?:${this.ctext}|${this.quoted_pair})`; }", "title": "" }, { "docid": "065f6380a01bde8d0ec3b759dc8119b4", "score": "0.49988624", "text": "static get FWS_op() { return `${this.FWS}?`; }", "title": "" }, { "docid": "00ad843ed5f2bcbbcbc876ce7925c066", "score": "0.4950342", "text": "function obsPhrase() {\n return opts.strict ? null : wrap('obs-phrase', and(\n word,\n star(or(word, literal('.'), colwsp(cfws)))\n )());\n }", "title": "" }, { "docid": "4afc2602d6281144c82b76d5f4006c91", "score": "0.49397174", "text": "get isAtom() { return this.isLeaf || this.spec.atom }", "title": "" }, { "docid": "a0491a5ab8c7023221c51a1250216c0e", "score": "0.49143922", "text": "static get local_part() { return `(?:${this.dot_atom}|${this.quoted_string})`; }", "title": "" }, { "docid": "b838075107e3a568765efd44ea8fa851", "score": "0.48090327", "text": "function canonicalizationBodyRelaxed(body) {\n\t\t// Ignore all whitespace at the end of lines\n\t\tbody = body.replace(/[ \\t]+\\r\\n/g,\"\\r\\n\");\n\t\t// Reduce all sequences of WSP within a line to a single SP character\n\t\tbody = body.replace(/[ \\t]+/g,\" \");\n\t\t\n\t\t// Ignore all empty lines at the end of the message body\n\t\t// If the body is non-empty but does not end with a CRLF, a CRLF is added\n\t\t// for some reason /(\\r\\n)*$/ doesn't work all the time\n\t\t// (especially in large strings; matching only last \"\\r\\n\")\n\t\tbody = body.replace(/((\\r\\n)+)?$/,\"\\r\\n\");\n\t\t\n\t\t// If only one \\r\\n rests, there were only emtpy lines or body was empty.\n\t\tif (body === \"\\r\\n\") {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn body;\n\t}", "title": "" }, { "docid": "84fd4594e37273e6fd6171d11b2e1bfa", "score": "0.4795811", "text": "function ods_to_csf_formula(f) {\n\t\tif(f.substr(0,3) == \"of:\") f = f.substr(3);\n\t\t/* 5.2 Basic Expressions */\n\t\tif(f.charCodeAt(0) == 61) {\n\t\t\tf = f.substr(1);\n\t\t\tif(f.charCodeAt(0) == 61) f = f.substr(1);\n\t\t}\n\t\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t\t/* Part 3 Section 5.8 References */\n\t\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t\t/* TODO: something other than this */\n\t\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\t\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n\t}", "title": "" }, { "docid": "b92dd8110cd61b56eeca39fe901918b3", "score": "0.4720548", "text": "function froot(fld) {\n return fld.replace(/^#/, '').replace(/\\..*/, '');\n}", "title": "" }, { "docid": "3ec0629a294e6ca9b486315ea2c887f2", "score": "0.47103837", "text": "function ods_to_csf_formula(f) {\n\tif(f.substr(0,3) == \"of:\") f = f.substr(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.substr(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.substr(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "3ec0629a294e6ca9b486315ea2c887f2", "score": "0.47103837", "text": "function ods_to_csf_formula(f) {\n\tif(f.substr(0,3) == \"of:\") f = f.substr(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.substr(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.substr(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "3ec0629a294e6ca9b486315ea2c887f2", "score": "0.47103837", "text": "function ods_to_csf_formula(f) {\n\tif(f.substr(0,3) == \"of:\") f = f.substr(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.substr(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.substr(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "daa72f7a9e45092778090e91552c38a4", "score": "0.46754986", "text": "function ods_to_csf_formula(f) {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "daa72f7a9e45092778090e91552c38a4", "score": "0.46754986", "text": "function ods_to_csf_formula(f) {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "daa72f7a9e45092778090e91552c38a4", "score": "0.46754986", "text": "function ods_to_csf_formula(f) {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "daa72f7a9e45092778090e91552c38a4", "score": "0.46754986", "text": "function ods_to_csf_formula(f) {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "daa72f7a9e45092778090e91552c38a4", "score": "0.46754986", "text": "function ods_to_csf_formula(f) {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "daa72f7a9e45092778090e91552c38a4", "score": "0.46754986", "text": "function ods_to_csf_formula(f) {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}", "title": "" }, { "docid": "cddcc53236a153fd48397cd99ee6f083", "score": "0.46564606", "text": "function nullCharacterInForeignContent(p, token) {\r\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\r\n p._insertCharacters(token);\r\n}", "title": "" }, { "docid": "ec2dc825720e0a398159911fa3f1b676", "score": "0.46526325", "text": "function nsIsFull(ns){\n\tvar tmp = ns.split(\".\");\n\treturn tmp.length > 1 && tmp[1] !== \"\";\n}", "title": "" }, { "docid": "82391f86107a9948fbeb9f6045ecc521", "score": "0.46357495", "text": "function ods_to_csf_formula(f) {\n if (f.slice(0, 3) == \"of:\") f = f.slice(3);\n /* 5.2 Basic Expressions */\n\n if (f.charCodeAt(0) == 61) {\n f = f.slice(1);\n if (f.charCodeAt(0) == 61) f = f.slice(1);\n }\n\n f = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n /* Part 3 Section 5.8 References */\n\n f = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function ($$, $1) {\n return $1.replace(/\\./g, \"\");\n });\n /* TODO: something other than this */\n\n f = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n return f.replace(/[;~]/g, \",\").replace(/\\|/g, \";\");\n }", "title": "" }, { "docid": "86ca7f759b5c7d86c7ec285ac989347d", "score": "0.4626421", "text": "function ods_to_csf_formula(f) {\n if (f.slice(0, 3) == \"of:\") f = f.slice(3);\n /* 5.2 Basic Expressions */\n\n if (f.charCodeAt(0) == 61) {\n f = f.slice(1);\n if (f.charCodeAt(0) == 61) f = f.slice(1);\n }\n\n f = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n /* Part 3 Section 5.8 References */\n\n f = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function ($$, $1) {\n return $1.replace(/\\./g, \"\");\n });\n /* TODO: something other than this */\n\n f = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n return f.replace(/[;~]/g, \",\").replace(/\\|/g, \";\");\n }", "title": "" }, { "docid": "86ca7f759b5c7d86c7ec285ac989347d", "score": "0.4626421", "text": "function ods_to_csf_formula(f) {\n if (f.slice(0, 3) == \"of:\") f = f.slice(3);\n /* 5.2 Basic Expressions */\n\n if (f.charCodeAt(0) == 61) {\n f = f.slice(1);\n if (f.charCodeAt(0) == 61) f = f.slice(1);\n }\n\n f = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n /* Part 3 Section 5.8 References */\n\n f = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function ($$, $1) {\n return $1.replace(/\\./g, \"\");\n });\n /* TODO: something other than this */\n\n f = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n return f.replace(/[;~]/g, \",\").replace(/\\|/g, \";\");\n }", "title": "" }, { "docid": "0b64fb36963f93803f9d706290782de0", "score": "0.46198004", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "0b64fb36963f93803f9d706290782de0", "score": "0.46198004", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "0b64fb36963f93803f9d706290782de0", "score": "0.46198004", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "0b64fb36963f93803f9d706290782de0", "score": "0.46198004", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "0b64fb36963f93803f9d706290782de0", "score": "0.46198004", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = UNICODE.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "9e212f23adc644d3f7ba7564bbafdbc0", "score": "0.46027482", "text": "function obsLocalPart() {\n return opts.strict ? null : wrap('obs-local-part', and(word, star(and(literal('.'), word)))());\n }", "title": "" }, { "docid": "7755dcb35c8f0c8a83bc2c9b76122213", "score": "0.45989496", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "7755dcb35c8f0c8a83bc2c9b76122213", "score": "0.45989496", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "7755dcb35c8f0c8a83bc2c9b76122213", "score": "0.45989496", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "3cdd905b5f1dd304db399b47e941f3a4", "score": "0.4596377", "text": "function word() {\n return wrap('word', or(atom, quotedString)());\n }", "title": "" }, { "docid": "3c2950481335302f51dbde13eb06966b", "score": "0.45856175", "text": "function nullCharacterInForeignContent(p, token) {\n\t token.chars = UNICODE.REPLACEMENT_CHARACTER;\n\t p._insertCharacters(token);\n\t}", "title": "" }, { "docid": "3c2950481335302f51dbde13eb06966b", "score": "0.45856175", "text": "function nullCharacterInForeignContent(p, token) {\n\t token.chars = UNICODE.REPLACEMENT_CHARACTER;\n\t p._insertCharacters(token);\n\t}", "title": "" }, { "docid": "7efe2e0bbc88f6aaa3d7436255f13906", "score": "0.45846403", "text": "value (token) { return token === '~' ? '\\xa0' : ' ' }", "title": "" }, { "docid": "8a4f6e43da88433422e4950630f55ac3", "score": "0.45777377", "text": "function stripOpenXmlCrap(type){\n if(type.indexOf('vnd.openxmlformats')>0){\n var start = type.indexOf('/');\n var end = type.lastIndexOf('.')+1;\n type = type.replace(type.substring(start,end),'/');\n }\n return type;\n }", "title": "" }, { "docid": "6f779cac8235a5ec8313e11f4568700a", "score": "0.4566635", "text": "function atom(){\n\tswitch(lt().type){\n\tcase 'STRING_LITERAL':\n\t\tif(lt(2, 'RANGE')){\n\t\t\tvar chr = [];\n\t\t\tchr.push(consume());\n\t\t\tvar rangeNode = consume();\n\t\t\tchr.push(match('STRING_LITERAL'));\n\t\t\trangeNode.chr = chr;\n\t\t\treturn rangeNode;\n\t\t}\n\t\treturn consume();\n\tcase 'TOKEN_REF':\n\t\treturn consume();\n\tcase 'RULE_REF':\n\t\treturn ruleref();\n\tcase 'NOT':\n\t\treturn notSet();\n\tcase 'DOT':\n\t\treturn wildcard();\n\t}\n}", "title": "" }, { "docid": "78bd529d21ffe46cc5775db969f443a7", "score": "0.45661885", "text": "function nullCharacterInForeignContent(p, token) {\r\n\t token.chars = UNICODE.REPLACEMENT_CHARACTER;\r\n\t p._insertCharacters(token);\r\n\t}", "title": "" }, { "docid": "50658f1c237a362e3158220cad07d7af", "score": "0.45645237", "text": "function isNsCharOrWhitespace(c) {\n return isPrintable$1(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN$1\n && c !== CHAR_LINE_FEED$1;\n}", "title": "" }, { "docid": "4227ce2c5582f2a43e06faa235dd8867", "score": "0.45434186", "text": "function obsNoWsCtl() {\n return opts.strict ? null : wrap('obs-NO-WS-CTL', compareToken(function (tok) {\n var code = tok.charCodeAt(0);\n return ((1 <= code && code <= 8) ||\n (11 === code || 12 === code) ||\n (14 <= code && code <= 31) ||\n (127 === code));\n }));\n }", "title": "" }, { "docid": "da4ea795fae924d79221eeeb5ffe542b", "score": "0.45416492", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "da4ea795fae924d79221eeeb5ffe542b", "score": "0.45416492", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "da4ea795fae924d79221eeeb5ffe542b", "score": "0.45416492", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "da4ea795fae924d79221eeeb5ffe542b", "score": "0.45416492", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "da4ea795fae924d79221eeeb5ffe542b", "score": "0.45416492", "text": "function nullCharacterInForeignContent(p, token) {\n token.chars = unicode.REPLACEMENT_CHARACTER;\n p._insertCharacters(token);\n}", "title": "" }, { "docid": "11858f046557f1262556f3b7c2f62645", "score": "0.4536954", "text": "static get ctext() { return \"[!-'*-[\\\\]-~]\"; }", "title": "" }, { "docid": "3ea5f0b90b845e584588f85f7f5c48dd", "score": "0.45226023", "text": "function nullCharacterInForeignContent(p, token) {\n\t\ttoken.chars = REPLACEMENT_CHARACTER;\n\t\tp._insertCharacters(token);\n\t}", "title": "" }, { "docid": "5381ecbe9ffc16b8df85af433c7774a9", "score": "0.45043826", "text": "function isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}", "title": "" }, { "docid": "5381ecbe9ffc16b8df85af433c7774a9", "score": "0.45043826", "text": "function isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}", "title": "" }, { "docid": "5381ecbe9ffc16b8df85af433c7774a9", "score": "0.45043826", "text": "function isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}", "title": "" }, { "docid": "b3f83644b75d6ef93821e6313b443bdb", "score": "0.4493281", "text": "function nottableAtom (leader = \"\") {\n const ret = { }\n ret[leader + \"shapeNot\"] = [\n { regex: /\\s/, token: t.whitespace },\n { regex: anyCase(\"NOT\"), token: t.booleanOperator, next: leader + \"shapeAtom\" },\n { regex: /(?:)/, next: leader + \"shapeAtom\" }\n ]\n ret[leader + \"shapeAtom\"] = [\n { regex: nonLitNodeConstraint_LA, push: leader + \"nonLitNodeConstraint\", next: leader + \"shapeOrRefOpt\" },\n { regex: litNodeConstraint_LA, push: leader + \"litNodeConstraint\", next: leader + \"andOrOpt\" },\n { regex: shapeDefinition_LA, push: \"shape\", next: leader + \"nonLitNodeConstraintOpt\" },\n { regex: /@/, token: t.operator, push: \"shapeRef\", next: leader + \"nonLitNodeConstraintOpt\" },\n { regex: /\\(/, token: t.lparen, push: \"nested_shapeNot\", next: leader + \"andOrOpt\" },\n { regex: /\\./, token: t.operator, next: leader + \"andOrOpt\" },\n allInvalid\n ]\n ret[leader + \"nonLitNodeConstraint\"] = [\n { regex: nonLitNodeKind_RE, token: t.nodeKind, next: leader + \"stringFacetStar\" },\n { regex: stringLength_RE, token: t.facet, push: \"integer\", next: leader + \"stringFacetStar\" },\n { regex: \"\\\\/(?!/)\", token: j(t.string, t.regexp), push: \"regex\", next: leader + \"stringFacetStar\" },\n allInvalid\n ]\n ret[leader + \"nonLitNodeConstraintOpt\"] = [\n { regex: nonLitNodeKind_RE, token: t.nodeKind, next: leader + \"andOrOpt\" },\n { regex: stringLength_RE, token: t.facet, push: \"integer\", next: leader + \"andOrOpt\" },\n { regex: \"\\\\/(?!/)\", token: j(t.string, t.regexp), push: \"regex\", next: leader + \"andOrOpt\" },\n { regex: /(?:)/, next: leader + \"andOrOpt\" }\n ]\n ret[leader + \"litNodeConstraint\"] = [\n { regex: litNodeKind_RE, token: t.nodeKind, next: leader + \"xsFacetStar\" },\n iri(t.datatype, { next: leader + \"xsFacetStar\" }),\n { regex: valueSet_RE, token: t.operator, push: \"valueSet\", next: leader + \"xsFacetStar\" },\n { regex: numericRange_RE, token: t.facet, push: \"numeric\" },\n { regex: numericLength_RE, token: t.facet, push: \"integer\", next: leader + \"xsFacetStar\" },\n allInvalid\n ]\n ret[leader + \"shapeOrRefOpt\"] = [\n { regex: shapeDefinition_LA, push: \"shape\", next: leader + \"andOrOpt\" },\n { regex: /@/, token: t.operator, push: \"shapeRef\", next: leader + \"andOrOpt\" },\n { regex: /(?:)/, next: leader + \"andOrOpt\" }\n ]\n ret[leader + \"stringFacetStar\"] = [\n { regex: /\\s/, token: t.whitespace },\n { regex: stringLength_RE, token: t.facet, push: \"integer\", next: leader + \"stringFacetStar\" },\n { regex: \"\\\\/(?!/)\", token: j(t.string, t.regexp), push: \"regex\", next: leader + \"stringFacetStar\" },\n { regex: /(?:)/, next: \"pop\" }\n ]\n ret[leader + \"xsFacetStar\"] = [\n { regex: /\\s/, token: t.whitespace },\n { regex: stringLength_RE, token: t.facet, push: \"integer\", next: leader + \"xsFacetStar\" },\n { regex: \"\\\\/(?!/)\", token: j(t.string, t.regexp), push: \"regex\", next: leader + \"xsFacetStar\" },\n { regex: numericRange_RE, token: t.facet, push: \"numeric\", next: leader + \"xsFacetStar\" },\n { regex: numericLength_RE, token: t.facet, push: \"integer\", next: leader + \"xsFacetStar\" },\n { regex: /(?:)/, next: \"pop\" }\n ]\n return ret\n }", "title": "" }, { "docid": "6ddb0f0e55d4d9814687ef0762ff85da", "score": "0.44717646", "text": "_readPredicateAfterBlank(token) {\n switch (token.type) {\n case '.':\n case '}':\n // No predicate is coming if the triple is terminated here\n this._subject = null;\n return this._readPunctuation(token);\n default:\n return this._readPredicate(token);\n }\n }", "title": "" }, { "docid": "6ddb0f0e55d4d9814687ef0762ff85da", "score": "0.44717646", "text": "_readPredicateAfterBlank(token) {\n switch (token.type) {\n case '.':\n case '}':\n // No predicate is coming if the triple is terminated here\n this._subject = null;\n return this._readPunctuation(token);\n default:\n return this._readPredicate(token);\n }\n }", "title": "" }, { "docid": "6bf7f801d742f0b2c7e32b91572b5e44", "score": "0.4467877", "text": "function isAtom(obj) {\n return obj && obj.isAtom;\n}", "title": "" }, { "docid": "c7e036a832fc8407077fc2be115c3cb8", "score": "0.44582334", "text": "function is_all_ws( nod )\r\n{\r\n// Use ECMA-262 Edition 3 String and RegExp features\r\n return !(/[^\\t\\n\\r ]/.test(nod.data));\r\n}", "title": "" }, { "docid": "68cafe44cd29c4d565dbc817aba73984", "score": "0.4452002", "text": "_stateDoctypeSystemIdentifierSingleQuoted(cp) {\n\t\t\tconst token = this.currentToken;\n\t\t\tswitch (cp) {\n\t\t\t\tcase CODE_POINTS.APOSTROPHE: {\n\t\t\t\t\tthis.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.NULL: {\n\t\t\t\t\tthis._err(ERR.unexpectedNullCharacter);\n\t\t\t\t\ttoken.systemId += REPLACEMENT_CHARACTER;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.GREATER_THAN_SIGN: {\n\t\t\t\t\tthis._err(ERR.abruptDoctypeSystemIdentifier);\n\t\t\t\t\ttoken.forceQuirks = true;\n\t\t\t\t\tthis.emitCurrentDoctype(token);\n\t\t\t\t\tthis.state = State.DATA;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.EOF: {\n\t\t\t\t\tthis._err(ERR.eofInDoctype);\n\t\t\t\t\ttoken.forceQuirks = true;\n\t\t\t\t\tthis.emitCurrentDoctype(token);\n\t\t\t\t\tthis._emitEOFToken();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\ttoken.systemId += String.fromCodePoint(cp);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "21a2c7225f80f983379ecf812377a362", "score": "0.44448984", "text": "_stateDoctypePublicIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case unicode_js_1.CODE_POINTS.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case unicode_js_1.CODE_POINTS.NULL: {\n this._err(error_codes_js_1.ERR.unexpectedNullCharacter);\n token.publicId += unicode_js_1.REPLACEMENT_CHARACTER;\n break;\n }\n case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: {\n this._err(error_codes_js_1.ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case unicode_js_1.CODE_POINTS.EOF: {\n this._err(error_codes_js_1.ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }", "title": "" }, { "docid": "d7ef7d84ea2c292bf2c6a9bf40eb04f2", "score": "0.4441933", "text": "function yucomment (s, isComponent, isFullURI) {\n return privFilters.yc(isComponent ? privFilters.yuc(s) : isFullURI ? privFilters.yufull(s) : privFilters.yu(s));\n}", "title": "" }, { "docid": "21cf29d2f61ca7feb72bd325f5cab66b", "score": "0.44389606", "text": "function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||\"http://www.w3.org/1999/xhtml\"==b}", "title": "" }, { "docid": "13e3202dd6056fd64b6f84fec6949a39", "score": "0.44387788", "text": "_stateDoctypePublicIdentifierSingleQuoted(cp) {\n\t\t\tconst token = this.currentToken;\n\t\t\tswitch (cp) {\n\t\t\t\tcase CODE_POINTS.APOSTROPHE: {\n\t\t\t\t\tthis.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.NULL: {\n\t\t\t\t\tthis._err(ERR.unexpectedNullCharacter);\n\t\t\t\t\ttoken.publicId += REPLACEMENT_CHARACTER;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.GREATER_THAN_SIGN: {\n\t\t\t\t\tthis._err(ERR.abruptDoctypePublicIdentifier);\n\t\t\t\t\ttoken.forceQuirks = true;\n\t\t\t\t\tthis.emitCurrentDoctype(token);\n\t\t\t\t\tthis.state = State.DATA;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.EOF: {\n\t\t\t\t\tthis._err(ERR.eofInDoctype);\n\t\t\t\t\ttoken.forceQuirks = true;\n\t\t\t\t\tthis.emitCurrentDoctype(token);\n\t\t\t\t\tthis._emitEOFToken();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\ttoken.publicId += String.fromCodePoint(cp);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a7212383639264e077ed69d6350417fe", "score": "0.4415446", "text": "[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $$3.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $$3.NULL) {\n this._err(errorCodes.unexpectedNullCharacter);\n\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $$3.GREATER_THAN_SIGN) {\n this._err(errorCodes.abruptDoctypePublicIdentifier);\n\n this.currentToken.forceQuirks = true;\n\n this._emitCurrentToken();\n\n this.state = DATA_STATE;\n } else if (cp === $$3.EOF) {\n this._err(errorCodes.eofInDoctype);\n\n this.currentToken.forceQuirks = true;\n\n this._emitCurrentToken();\n\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }", "title": "" }, { "docid": "1cb01b178573cdbf1d91973dee4eec93", "score": "0.44036213", "text": "_stateDoctypeSystemIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case unicode_js_1.CODE_POINTS.APOSTROPHE: {\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n }\n case unicode_js_1.CODE_POINTS.NULL: {\n this._err(error_codes_js_1.ERR.unexpectedNullCharacter);\n token.systemId += unicode_js_1.REPLACEMENT_CHARACTER;\n break;\n }\n case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: {\n this._err(error_codes_js_1.ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case unicode_js_1.CODE_POINTS.EOF: {\n this._err(error_codes_js_1.ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.systemId += String.fromCodePoint(cp);\n }\n }\n }", "title": "" }, { "docid": "cb0e65ead42204c38e5e52645e2b5cfc", "score": "0.44015017", "text": "function is_all_ws( nod )\n{\n // Use ECMA-262 Edition 3 String and RegExp features\n return !(/[^\\t\\n\\r ]/.test(nod.textContent));\n}", "title": "" }, { "docid": "ea211521d155db4ff5ae7d154f125da7", "score": "0.4400226", "text": "parseExprAtom(refShorthandDefaultPos) {\n if (this.match(types.dot) && this.state.numberFollowsDot) {\n this.unexpected(null, \"Decimal numbers must be prefixed with a `0` in LightScript (eg; `0.1`).\");\n }\n\n return super.parseExprAtom(refShorthandDefaultPos);\n }", "title": "" }, { "docid": "a9c0be0b1c9b40d6e12d6ceb38d00746", "score": "0.43953112", "text": "function uu106860() { return '; fo'; }", "title": "" }, { "docid": "5ff28dd3322c216ba9583c1fb232c3de", "score": "0.43944618", "text": "function noYelling(phrase) {\n let arr = phrase.split(' ')\n let start = arr.slice(0, -1), end = phrase.split(' ').pop();\n let clean = end.replace(/\\W/g, '');\n let result = start.join(' ') + ` ${clean}`\n \n if (!(phrase.endsWith('?') || phrase.endsWith('!'))) {\n\t\treturn phrase;\t\t\n\t} else if ((phrase.endsWith('?') || phrase.endsWith('!'))) {\n\t\tif (phrase.endsWith('?')) {\n\t\t\treturn result.trim() + '?'\n\t\t} else if (phrase.endsWith('!')) {\n return result.trim() + '!'\n }\n } \n}", "title": "" }, { "docid": "70be301a78a76885236e11ba222eac06", "score": "0.4385138", "text": "function isPlainSafeFirst$1(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable$1(c) && c !== CHAR_BOM\n && !isWhitespace$1(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS$1\n && c !== CHAR_QUESTION$1\n && c !== CHAR_COLON$1\n && c !== CHAR_COMMA$1\n && c !== CHAR_LEFT_SQUARE_BRACKET$1\n && c !== CHAR_RIGHT_SQUARE_BRACKET$1\n && c !== CHAR_LEFT_CURLY_BRACKET$1\n && c !== CHAR_RIGHT_CURLY_BRACKET$1\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP$1\n && c !== CHAR_AMPERSAND$1\n && c !== CHAR_ASTERISK$1\n && c !== CHAR_EXCLAMATION$1\n && c !== CHAR_VERTICAL_LINE$1\n && c !== CHAR_EQUALS$1\n && c !== CHAR_GREATER_THAN$1\n && c !== CHAR_SINGLE_QUOTE$1\n && c !== CHAR_DOUBLE_QUOTE$1\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT$1\n && c !== CHAR_COMMERCIAL_AT$1\n && c !== CHAR_GRAVE_ACCENT$1;\n}", "title": "" }, { "docid": "a8b114a15f6c636372236da4a0811584", "score": "0.43844077", "text": "_isSimbol(value) {\n return (\n value[value.length-1] === \"+\" ||\n value[value.length-1] === \"-\" ||\n value[value.length-1] === \"x\" ||\n value[value.length-1] === \"/\" ||\n value[value.length-1] === \"%\" ||\n value[value.length-1] === \".\"\n );\n }", "title": "" }, { "docid": "c978798b93e1ccd1c787f822d43a3653", "score": "0.4376612", "text": "_stateDoctypePublicIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case unicode_js_1.CODE_POINTS.QUOTATION_MARK: {\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n }\n case unicode_js_1.CODE_POINTS.NULL: {\n this._err(error_codes_js_1.ERR.unexpectedNullCharacter);\n token.publicId += unicode_js_1.REPLACEMENT_CHARACTER;\n break;\n }\n case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: {\n this._err(error_codes_js_1.ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case unicode_js_1.CODE_POINTS.EOF: {\n this._err(error_codes_js_1.ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default: {\n token.publicId += String.fromCodePoint(cp);\n }\n }\n }", "title": "" }, { "docid": "85d1a2aebb5d2e7b61e25bbb39a75b2e", "score": "0.4376205", "text": "function canonicalizationHeaderFieldRelaxed(headerField) {\n\t\t// Convert header field name (not the header field values) to lowercase\n\t\theaderField = headerField.replace(\n\t\t\t/^\\S[^:]*/,\n\t\t\tfunction(match) {\n\t\t\t\treturn match.toLowerCase();\n\t\t\t}\n\t\t);\n\n\t\t// Unfold header field continuation lines\n\t\theaderField = headerField.replace(/\\r\\n[ \\t]/g,\" \");\n\t\t\n\t\t// Convert all sequences of one or more WSP characters to a single SP character.\n\t\t// WSP characters here include those before and after a line folding boundary.\n\t\theaderField = headerField.replace(/[ \\t]+/g,\" \");\n\t\t\n\t\t// Delete all WSP characters at the end of each unfolded header field value.\n\t\theaderField = headerField.replace(/[ \\t]+\\r\\n/,\"\\r\\n\");\n\t\t\n\t\t// Delete any WSP characters remaining before and after the colon \n\t\t// separating the header field name from the header field value.\n\t\t// The colon separator MUST be retained.\n\t\theaderField = headerField.replace(/[ \\t]*:[ \\t]*/,\":\");\n\n\t\treturn headerField;\n\t}", "title": "" }, { "docid": "834f86c69670d6375133d711320adcff", "score": "0.43758565", "text": "[DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $$3.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;\n } else if (cp === $$3.NULL) {\n this._err(errorCodes.unexpectedNullCharacter);\n\n this.currentToken.systemId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $$3.GREATER_THAN_SIGN) {\n this._err(errorCodes.abruptDoctypeSystemIdentifier);\n\n this.currentToken.forceQuirks = true;\n\n this._emitCurrentToken();\n\n this.state = DATA_STATE;\n } else if (cp === $$3.EOF) {\n this._err(errorCodes.eofInDoctype);\n\n this.currentToken.forceQuirks = true;\n\n this._emitCurrentToken();\n\n this._emitEOFToken();\n } else {\n this.currentToken.systemId += toChar(cp);\n }\n }", "title": "" }, { "docid": "12e6448ad91da6ed7b4680bc73ea3d54", "score": "0.43740624", "text": "function is_codefence(data, syntax) {\n\t\tvar i = 0, syn_len = 0;\n\t\ti = prefix_codefence(data);\n\t\tif (i == 0) return 0;\n\n\n\t\twhile (i < data.length && data[i] == ' ') i++;\n\n\t\tvar syn_start;\n\t\t//syn_start = data + i;\n\t\tsyn_start = i;\n\n\t\tif (i < data.length && data[i] == '{') {\n\t\t\ti++; syn_start++;\n\n\t\t\twhile (i < data.length && data[i] != '}' && data[i] != '\\n') {\n\t\t\t\tsyn_len++; i++;\n\t\t\t}\n\n\t\t\tif (i == data.length || data[i] != '}')\n\t\t\t\treturn 0;\n\n\t\t\t/* strip all whitespace at the beginning and the end\n\t\t\t * of the {} block */\n\t\t\t/*remember not to remove the +0, it helps me keep syncronised with snudown*/\n\t\t\twhile (syn_len > 0 && _isspace(data[syn_start+0])) {\n\t\t\t\tsyn_start++; syn_len--;\n\t\t\t}\n\n\t\t\t// while (syn_len > 0 && _isspace(syn_start[syn_len - 1]))\n\t\t\twhile (syn_len > 0 && _isspace(data[syn_start+syn_len - 1]))\n\t\t\t\tsyn_len--;\n\n\t\t\ti++;\n\t\t} else {\n\t\t\twhile (i < data.length && !_isspace(data[i])) {\n\t\t\t\tsyn_len++; i++;\n\t\t\t}\n\t\t}\n\n\t\tif (syntax) syntax.s = data.substr(syn_start, syn_len);\n\t\t// syntax->size = syn;\n\n\t\twhile (i < data.length && data[i] != '\\n') {\n\t\t\tif (!_isspace(data[i])) return 0;\n\n\t\t\ti++;\n\t\t}\n\n\t\treturn i + 1;\n\t}", "title": "" }, { "docid": "d49819dcd82f4c0b1226ab51425b61c6", "score": "0.43630734", "text": "function hereDoc(f) {\n return f.toString().\n replace(/^[^\\/]+\\/\\*!?/, '').\n replace(/\\*\\/[^\\/]+$/, '')\n}", "title": "" }, { "docid": "7c973f6a83f570fc2e84adc6375bd1c0", "score": "0.4348612", "text": "function normalize(token) {\n return (token + '').trim();\n} // Not `||`", "title": "" }, { "docid": "d81136874bd890b633353a2f71df3574", "score": "0.43372044", "text": "[DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $$3.QUOTATION_MARK) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $$3.NULL) {\n this._err(errorCodes.unexpectedNullCharacter);\n\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $$3.GREATER_THAN_SIGN) {\n this._err(errorCodes.abruptDoctypePublicIdentifier);\n\n this.currentToken.forceQuirks = true;\n\n this._emitCurrentToken();\n\n this.state = DATA_STATE;\n } else if (cp === $$3.EOF) {\n this._err(errorCodes.eofInDoctype);\n\n this.currentToken.forceQuirks = true;\n\n this._emitCurrentToken();\n\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }", "title": "" }, { "docid": "9858c3088539db396cbc38c3e27c760b", "score": "0.43322292", "text": "function comment() {\n return wrap('comment', and(\n literal('('),\n star(and(opt(fws), ccontent)),\n opt(fws),\n literal(')')\n )());\n }", "title": "" }, { "docid": "acd8ae23daae59f0b2ace1c714e382a0", "score": "0.4328128", "text": "[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }", "title": "" }, { "docid": "acd8ae23daae59f0b2ace1c714e382a0", "score": "0.4328128", "text": "[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }", "title": "" }, { "docid": "acd8ae23daae59f0b2ace1c714e382a0", "score": "0.4328128", "text": "[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }", "title": "" }, { "docid": "acd8ae23daae59f0b2ace1c714e382a0", "score": "0.4328128", "text": "[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }", "title": "" }, { "docid": "acd8ae23daae59f0b2ace1c714e382a0", "score": "0.4328128", "text": "[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }", "title": "" }, { "docid": "3f49144c575c12a322a7da94c462876e", "score": "0.43146065", "text": "outer(node, content) {\n let res = \"<\" + node.localName;\n\n for (let i = 0; i < node.attributes.length; i++) {\n let attribute = node.attributes[i];\n\n if (!attribute.noValue) {\n let quotChar = '\"';\n\n if (attribute.value.indexOf('\"') > -1) {\n if (attribute.value.indexOf(\"'\") > -1) {\n console.error(\n `Attribute \"{attribute.name}\" with value \"${\n attribute.value\n }\"of element ${node.localName} contains ' and \".`\n );\n } else {\n quotChar = \"'\";\n }\n }\n\n res += ` ${attribute.name}=${quotChar}${attribute.value}${quotChar}`;\n } else {\n res += ` ${attribute.name}`;\n }\n }\n if (content) {\n res += \">\";\n res += content;\n res += \"</\" + node.localName + \">\";\n } else {\n res += \"/>\";\n }\n\n return res;\n }", "title": "" }, { "docid": "d113ff060a26e69bd90569e12867cffa", "score": "0.43127963", "text": "function preposition(phrase) {\n\t\tvar parts = phrase.PP;\n\t\tvar head = parts[0]['#text'];\n\t\tvar constituents = parts.slice(1);\n\t\tvar object = extractNoun(constituents);\n\t\t// \"forwards\"\n\t\tif (!object) {\n\t\t\treturn head;\n\t\t}\n\t\treturn object;\n\t}", "title": "" }, { "docid": "78823025037f6090c79d5c7172c19057", "score": "0.43117756", "text": "function nullClarify(symbol, exchangeToProgram, currencies) {\n if (exchangeToProgram) {\n for (var c in currencies)\n if (symbol.endsWith(currencies[c]))\n return symbol.replace(currencies[c], '/' + currencies[c])\n } else {\n return symbol.replace('/', '')\n }\n}", "title": "" }, { "docid": "09b262901d16805f6fdb3d0048a40772", "score": "0.43091908", "text": "[BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $$3.QUOTATION_MARK) {\n this.currentToken.publicId = '';\n this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;\n } else if (cp === $$3.APOSTROPHE) {\n this.currentToken.publicId = '';\n this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;\n } else if (cp === $$3.GREATER_THAN_SIGN) {\n this._err(errorCodes.missingDoctypePublicIdentifier);\n\n this.currentToken.forceQuirks = true;\n this.state = DATA_STATE;\n\n this._emitCurrentToken();\n } else if (cp === $$3.EOF) {\n this._err(errorCodes.eofInDoctype);\n\n this.currentToken.forceQuirks = true;\n\n this._emitCurrentToken();\n\n this._emitEOFToken();\n } else {\n this._err(errorCodes.missingQuoteBeforeDoctypePublicIdentifier);\n\n this.currentToken.forceQuirks = true;\n\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }", "title": "" }, { "docid": "5536c30b8a6abb268e046fab85533e8e", "score": "0.43089688", "text": "_stateDoctypePublicIdentifierDoubleQuoted(cp) {\n\t\t\tconst token = this.currentToken;\n\t\t\tswitch (cp) {\n\t\t\t\tcase CODE_POINTS.QUOTATION_MARK: {\n\t\t\t\t\tthis.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.NULL: {\n\t\t\t\t\tthis._err(ERR.unexpectedNullCharacter);\n\t\t\t\t\ttoken.publicId += REPLACEMENT_CHARACTER;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.GREATER_THAN_SIGN: {\n\t\t\t\t\tthis._err(ERR.abruptDoctypePublicIdentifier);\n\t\t\t\t\ttoken.forceQuirks = true;\n\t\t\t\t\tthis.emitCurrentDoctype(token);\n\t\t\t\t\tthis.state = State.DATA;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CODE_POINTS.EOF: {\n\t\t\t\t\tthis._err(ERR.eofInDoctype);\n\t\t\t\t\ttoken.forceQuirks = true;\n\t\t\t\t\tthis.emitCurrentDoctype(token);\n\t\t\t\t\tthis._emitEOFToken();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\ttoken.publicId += String.fromCodePoint(cp);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5303aa6f23cc8531c38e87beb4b455ac", "score": "0.4303266", "text": "function expandStraat(token) {\n return token.replace(REGEX_MATCH_STREET_ABBR_SUFFIX,'$1$2traat');\n}", "title": "" }, { "docid": "b7e1dabaea199f4e055bee3fbebe907a", "score": "0.4302251", "text": "function nonest (shapeAtom) {\n delete shapeAtom.nested;\n return shapeAtom;\n }", "title": "" } ]
fc73913fc600a349f1e4cb257aca9eeb
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected it returns a single octet. By augmenting the instances, we can avoid modifying the `Uint8Array` prototype.
[ { "docid": "7c2640afdd88400691acc188585d8c85", "score": "0.73215544", "text": "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "title": "" } ]
[ { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.7386806", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.7386806", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.7386806", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.7386806", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.7386806", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.7386806", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.7386806", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.7383032", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "23312aa37c242874a3323faba55bf0b7", "score": "0.73098266", "text": "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "title": "" }, { "docid": "8aa5753adfbc730bd331a2dbd05b2966", "score": "0.73060274", "text": "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "title": "" }, { "docid": "8aa5753adfbc730bd331a2dbd05b2966", "score": "0.73060274", "text": "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "title": "" }, { "docid": "4c718d0643d96e89a15b054166fe7696", "score": "0.727149", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\n\tif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" }, { "docid": "d5dbb254eedb73855abf1cf5d5bf6364", "score": "0.724367", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" }, { "docid": "d5dbb254eedb73855abf1cf5d5bf6364", "score": "0.724367", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" }, { "docid": "37a88b4ce21fe4632ed0606b22c843a1", "score": "0.7198388", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "title": "" }, { "docid": "8fa94882bb4032d6f8269ab3f9872d2e", "score": "0.719682", "text": "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1)\n return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n // Unusual.\n return fromObject(this, arg);\n }", "title": "" }, { "docid": "0cfb82773a55d202b95baa3893c5c7ca", "score": "0.7195739", "text": "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "title": "" }, { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.71845585", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.71845585", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.71845585", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.71845585", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "3bb8641ca6325883632b83d17e23ccd0", "score": "0.7161749", "text": "function Buffer(arg){if(!(this instanceof Buffer)){ // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\nif(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg);}if(!Buffer.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined;} // Common case.\nif(typeof arg==='number'){return fromNumber(this,arg);} // Slightly less common case.\nif(typeof arg==='string'){return fromString(this,arg,arguments.length>1?arguments[1]:'utf8');} // Unusual.\nreturn fromObject(this,arg);}", "title": "" }, { "docid": "de0ce0782648928cf5ed26caf29816b9", "score": "0.71505415", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n \n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "beb956e585082dd11ed59e0d0180c70b", "score": "0.7140498", "text": "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n\n // Unusual.\n return fromObject(this, arg);\n }", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.71245754", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.71204585", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "f330b00c59c5f1076605cd57748f5c22", "score": "0.71156096", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "f330b00c59c5f1076605cd57748f5c22", "score": "0.71156096", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "f330b00c59c5f1076605cd57748f5c22", "score": "0.71156096", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "135053f8808b573062fcf5707fff92d7", "score": "0.71090746", "text": "function Buffer (arg) {\n\t\t if (!(this instanceof Buffer)) {\n\t\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t\t return new Buffer(arg)\n\t\t }\n\t\t\n\t\t this.length = 0\n\t\t this.parent = undefined\n\t\t\n\t\t // Common case.\n\t\t if (typeof arg === 'number') {\n\t\t return fromNumber(this, arg)\n\t\t }\n\t\t\n\t\t // Slightly less common case.\n\t\t if (typeof arg === 'string') {\n\t\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t\t }\n\t\t\n\t\t // Unusual.\n\t\t return fromObject(this, arg)\n\t\t}", "title": "" }, { "docid": "78bcb6b76ecc20a435eb309de0c536fd", "score": "0.7099691", "text": "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "title": "" }, { "docid": "78bcb6b76ecc20a435eb309de0c536fd", "score": "0.7099691", "text": "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "title": "" }, { "docid": "350f6a9057e63e9aac93f86be41112f0", "score": "0.70929146", "text": "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "title": "" }, { "docid": "350f6a9057e63e9aac93f86be41112f0", "score": "0.70929146", "text": "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "title": "" }, { "docid": "350f6a9057e63e9aac93f86be41112f0", "score": "0.70929146", "text": "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "title": "" }, { "docid": "6108aecb40ac86f11f56df7fdb44d0f1", "score": "0.7090229", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "6108aecb40ac86f11f56df7fdb44d0f1", "score": "0.7090229", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "6108aecb40ac86f11f56df7fdb44d0f1", "score": "0.7090229", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "6108aecb40ac86f11f56df7fdb44d0f1", "score": "0.7090229", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "6108aecb40ac86f11f56df7fdb44d0f1", "score": "0.7090229", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "6108aecb40ac86f11f56df7fdb44d0f1", "score": "0.7090229", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t this.length = 0\n\t this.parent = undefined\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "ad75aa62fbcacc74958266fb14d5e912", "score": "0.7087834", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "ad75aa62fbcacc74958266fb14d5e912", "score": "0.7087834", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" } ]
1469d992f5d187c1e7037144b8461006
Helper: initializes the notifier instance
[ { "docid": "c9654a7584cf75d8bee58bff278586ec", "score": "0.0", "text": "function initialize(instance) {\r\n\r\n if (!instance.__internal) {\r\n instance.__internal = {\r\n position: alertify.defaults.notifier.position,\r\n delay: alertify.defaults.notifier.delay,\r\n };\r\n\r\n element = document.createElement('DIV');\r\n\r\n updatePosition(instance);\r\n }\r\n\r\n //add to DOM tree.\r\n if (element.parentNode !== document.body) {\r\n document.body.appendChild(element);\r\n }\r\n }", "title": "" } ]
[ { "docid": "e3742b1d278895e0a0a8fa856d61e641", "score": "0.7191998", "text": "constructor(context, notifier) {\n super();\n this.context = context;\n this.notifier = notifier;\n }", "title": "" }, { "docid": "25b99028b0e075e8ac19602d7d4f0f48", "score": "0.71681744", "text": "constructor() { \n \n Notifications.initialize(this);\n }", "title": "" }, { "docid": "e8b04c88b129ecd5cf6073431a2be145", "score": "0.69477355", "text": "function init() {\n\n // assign variables\n hasAlert = false;\n\n attachListeners();\n }", "title": "" }, { "docid": "82a08c3390b91122d1f3b09b694028fb", "score": "0.69315356", "text": "_init() {\n this._initLastUpdatedTime();\n this._initPollingInterval();\n }", "title": "" }, { "docid": "24c31a51da42b51c980297fa4227b29f", "score": "0.6816089", "text": "constructor() {\n super();\n\n /**\n * Called when the \"notify\" event is emitted via IPC.\n *\n * @type Function\n * @private\n */\n this._handleNotify = this._onNotify.bind(this);\n\n this._init();\n }", "title": "" }, { "docid": "da4bcc6fb4b5e83e296a39ffedf91797", "score": "0.6788063", "text": "constructor() {\n this.__notifyFunc = [];\n }", "title": "" }, { "docid": "0f6d0fdc245a541bffaa3020db7cfb82", "score": "0.664843", "text": "constructor() { \n \n ConnectionNotification.initialize(this);\n }", "title": "" }, { "docid": "ca7d1ef3ceb80c2f0539392d5188bc77", "score": "0.66045517", "text": "function init() {\n \n runPoll();\n \n }", "title": "" }, { "docid": "f75eba23ae8afabde7f58d94af2f7a06", "score": "0.6526715", "text": "initialized() {\r\n this._sendNotification('initialized', {});\r\n }", "title": "" }, { "docid": "09b99226ab5346267f776db9d36532ec", "score": "0.64532804", "text": "init() {\n // bind events\n this.bindEvents();\n }", "title": "" }, { "docid": "7f9ec93330811834a0c4e6bfe63c53bf", "score": "0.6391423", "text": "init() {\n\t\tthis.onAddress();\n\t\tthis.onAddressNew();\n\t\tthis.onCheckMandatory();\n\t}", "title": "" }, { "docid": "720a0f2984aa98d8351ddc4c29dae0e6", "score": "0.63844514", "text": "initializeNotifier(key) {\n this.multitonKey = String(key);\n }", "title": "" }, { "docid": "364233a8a5e69d4e107514c0f58549a8", "score": "0.6373879", "text": "init() {\n\t\tthis.status(this.STATUS_OK)\n\n\t\tthis.initVariables()\n\t\tthis.initFeedbacks()\n\n\t\tthis.initTCP()\n\t}", "title": "" }, { "docid": "bbf94dd9a48b8a338f2b482eb3649d00", "score": "0.63496053", "text": "init() {\n this\n .setup()\n .build()\n .handleEvents();\n }", "title": "" }, { "docid": "5393ec462d94e972cd5ad84f8db3031b", "score": "0.6349259", "text": "function init() {\n getMonitoringData();\n setReloadInterval();\n}", "title": "" }, { "docid": "db8e04ca801151c02dd8c7d867e8d69d", "score": "0.6333057", "text": "function clientInitNotifier() {\n\tconst defaultCoverUrl = 'https://music.yandex.ru/blocks/common/default.80x80.png';\n\tconst ipc = require('electron').ipcRenderer\n\n\tipc.on('yaplayer:macos-notification:show', (e, track) => {\n\t\t// Set artist name\n\t\tlet artist = _.map(track.artists, 'title').join(', ');\n\n\t\t// Set cover URL\n\t\tlet coverUri = track.album.cover;\n\t\tlet url = coverUri ? [\n\t\t\t'https://',\n\t\t\tcoverUri.replace('%%', '80x80')\n\t\t].join('') : defaultCoverUrl;\n\n\t\t// Create notification message\n\t\tnew Notification(track.title, {\n\t\t\tbody: artist,\n\t\t\ticon: url,\n\t\t\tsilent: true\n\t\t});\n\t});\n}", "title": "" }, { "docid": "d7a39a1d20284d3de52e98a894c2425b", "score": "0.6314928", "text": "_init() {\n this._initEvents();\n }", "title": "" }, { "docid": "4ce65151785f065496458c9fdf1ebec2", "score": "0.6299694", "text": "function AbstractNotifier(){}", "title": "" }, { "docid": "80132963e5a4cbfbed9c7ef61d7dab47", "score": "0.626398", "text": "init() {\n\t\tthis.initDOMListeners();\n\t}", "title": "" }, { "docid": "ad34caf49c677eb8b903c2a56b912aea", "score": "0.6249849", "text": "init() {\n if (this._initialized) {\n return;\n }\n\n this._dbService = Cc[\"@mozilla.org/msgDatabase/msgDBService;1\"].getService(\n Ci.nsIMsgDBService\n );\n\n // we listen for \"quit-application-granted\" instead of\n // \"quit-application-requested\" because other observers of the\n // latter can cancel the shutdown.\n Services.obs.addObserver(this, \"quit-application-granted\");\n\n this.startPeriodicCheck();\n\n this._initialized = true;\n }", "title": "" }, { "docid": "787345dd1cd231e43afd6fece7bb1f75", "score": "0.6232281", "text": "_initObservers() {\n this.observers();\n }", "title": "" }, { "docid": "be69f8e46d85b9e3b3fe6de285c1cfc0", "score": "0.6214296", "text": "initialise() {\n this.ready = true;\n }", "title": "" }, { "docid": "fe06f0b540b3b2d7c61ab3fa7759632e", "score": "0.62017256", "text": "init(socketReceiver_, channelReceiver_, presenceReceiver_) {\n socketReceiver = socketReceiver_\n channelReceiver = channelReceiver_\n presenceReceiver = presenceReceiver_\n }", "title": "" }, { "docid": "15b2c549b81674d4f33074efa8088c63", "score": "0.62010837", "text": "function init() {\n notificationApi.getTotalNotifications(function (data) {\n $rootScope.totalNotifications = 0;\n if (data && data.total) {\n $rootScope.totalNotifications = data.total;\n } else {\n console.warn(\" No notification found: data = \" + JSON.stringify(data));\n }\n });\n\n paymentApi.getPaymentStatus(function (data) {\n $rootScope.licencePaymentApproved = false;\n if (data && data.paymentApproved) {\n $rootScope.licencePaymentApproved = data.paymentApproved;\n } else {\n console.warn(\" Payment not approved: data = \" + JSON.stringify(data));\n }\n });\n\n }", "title": "" }, { "docid": "0704849eb399655361baaa0bd5423273", "score": "0.6190796", "text": "function Notifier (options) {\n\t\tif (typeof options === 'undefined') {\n\t\t\toptions = {};\n\t\t}\n\t\tthis.selector = (options.selector) || '.notifier';\n\t\tthis.$elt = $(this.selector);\n\t\tthis.notifications = [];\n\t\tthis.addDuplicates = false;\n\t\tthis.template = (\t\t\t\t\t// Best if this is styled (see: notifier.css)\n\t\t\t'<li class=\"notification\">'\n\t\t\t\t+ '<span class=\"message\">'\n\t\t\t\t\t+ '{{message}}'\n\t\t\t\t+ '</span>'\n\t\t\t\t+ '<button type=\"button\" class=\"dismiss-notification\">X</button>'\n\t\t\t+ '</li>'\n\t\t);\n\t\tthis.appendFunctionName = \"prepend\"; // could be append, etc.\n\t\tif (this.$elt.length > 0) {\n\t\t\tthis.setup();\n\t\t}\n\t}", "title": "" }, { "docid": "578a7ecded76eb90823183893f0f393d", "score": "0.61825085", "text": "init () {\n this._getImpl().documentObserver.init()\n }", "title": "" }, { "docid": "a34410e2d8a793dfc3beb6ce466c0420", "score": "0.61799496", "text": "initialize() {\n this.listenTo(this.owner, converter_1.Converter.EVENT_RESOLVE, this.onResolve, -10);\n }", "title": "" }, { "docid": "2edcafb63c9934fcca53a89c8b602060", "score": "0.6176766", "text": "init() {\n\n\t\tthis._super(...arguments);\n\n\t\tthis.enabled = this.config.version.enabled;\n\n\t\tif (feature.fastboot() === true) return;\n\n\t\tif (feature.windowLocation() === false) return;\n\n\t\tif (this.config.version.enabled === true) {\n\t\t\tif (this.config.version.frequency) {\n\t\t\t\tthis.timer = setInterval(\n\t\t\t\t\tthis.check.bind(this),\n\t\t\t\t\tthis.config.version.frequency,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.on('updatefound', () => {\n\t\t\tswitch (this.config.version.autoupdate) {\n\t\t\tcase false:\n\t\t\t\treturn this.set('updatefound', true);\n\t\t\tcase true:\n\t\t\t\treturn this.reset();\n\t\t\t}\n\t\t});\n\n\t\tthis.check();\n\n\t}", "title": "" }, { "docid": "1812073946b35ee71caa6f9234845829", "score": "0.6144164", "text": "initialize() {\n this.listenTo(this.owner, {\n [converter_1.Converter.EVENT_RESOLVE]: this.onResolve,\n [converter_1.Converter.EVENT_RESOLVE_END]: this.onResolveEnd,\n });\n }", "title": "" }, { "docid": "c2385c425ca384936d588a315c88a397", "score": "0.6135945", "text": "_initListeners() {\n this.listeners();\n }", "title": "" }, { "docid": "e4916740dfca53c9c83edb39fcc610eb", "score": "0.6123983", "text": "function NotifMgr() { }", "title": "" }, { "docid": "9c062a0c78f26b74bb28b0c6505d393c", "score": "0.6116455", "text": "initialize() {\n this.listenTo(this.owner, {\n [converter_1.Converter.EVENT_BEGIN]: this.onBegin,\n [converter_1.Converter.EVENT_RESOLVE]: this.onResolve,\n [converter_1.Converter.EVENT_RESOLVE_END]: this.onEndResolve,\n }, undefined, -200);\n }", "title": "" }, { "docid": "3a0802ded7e52aec352e338a66daf09d", "score": "0.61051023", "text": "initialize() {\n this.listenTo(this.owner, {\n [converter_1.Converter.EVENT_RESOLVE]: this.onResolve,\n [converter_1.Converter.EVENT_RESOLVE_END]: this.onEndResolve,\n });\n }", "title": "" }, { "docid": "40caf531effdfd724083e2a28d25b28e", "score": "0.6102468", "text": "init(){\n\t\tthis.active = false;\n\t\tthis.package = null;\n\t\t\n\t\tsetImmediate(() => this.updateStatus());\n\t\tthis.disposables.add(\n\t\t\tatom.packages.onDidActivatePackage(() => this.updateStatus()),\n\t\t\tatom.packages.onDidDeactivatePackage(() => this.updateStatus()),\n\t\t\tatom.packages.onDidActivateInitialPackages(() => this.updateStatus())\n\t\t);\n\t}", "title": "" }, { "docid": "f0a8d9d851ed86732438c56b8aa6301d", "score": "0.61001486", "text": "constructor(config, logger) {\n if (!logger) {\n console.log('log mechanism empty');\n }\n if (!config) {\n console.log('no config for monitor');\n }\n this.config = config;\n this.ip = ip.address();\n this.status = 'initializing';\n this.logger = logger;\n }", "title": "" }, { "docid": "e5b3d2a18ad7e718d91e9f11a3ae907c", "score": "0.608567", "text": "initializing() {\n\t\tthis.config.defaults(configFile.setup.empty);\n\t\tthis.bindEvents();\n\t}", "title": "" }, { "docid": "9e952ebbb0e6a5b10303e537ff170608", "score": "0.60813236", "text": "initListener() {}", "title": "" }, { "docid": "363152759f32c0c4abd592e56187c996", "score": "0.6077529", "text": "function new_messages_observe_setup(){\r\n\tvar perf_collector = msh.PerfCollector.get_instance();\r\n //perf_collector.$2 takes more time to get filled in so must check that I get it and not a blank OBJ.\r\n var JSItem = {is_js:true, js_obj: perf_collector};\r\n getItem(\"$2\",got_messenger_instance_1,JSItem);\r\n\r\n notification_sound = new Audio(NOTIFICATION_SOUND_URL);\r\n typing_sound = new Audio(NOTIFICATION_TYPING_URL);\r\n notifications = new Array();\r\n unsafeWindow.messages = new Array();\r\n\r\n unsafeWindow.notifications = new Array();\r\n unsafeWindow.notifications_new = new Array();\r\n}", "title": "" }, { "docid": "934840917380bc7d780671ee161a3f6d", "score": "0.6071553", "text": "function init() {\n if(Titanium.Notification) {\n notification = Titanium.Notification.createNotification(Titanium.UI.createWindow());\n self.createNotification = createNotificationTitanium;\n } else if(window.webkitNotifications) {\n notification = window.webkitNotifications;\n allowed = true;\n if(notification.checkPermission() !== 0){\n allowed = false;\n notification.requestPermission(function(){\n allowed = true;\n });\n }\n self.createNotification = createNotificationWebkit;\n }\n\n if (!notification) {\n self.createNotification = createNotification;\n }\n\n $(window).unload(function(){\n if(popup && typeof popup.cancel === 'function'){\n popup.cancel();\n }\n });\n }", "title": "" }, { "docid": "40b07bb5aab78430ef5aa9f5f337754c", "score": "0.60686016", "text": "constructor() {\n\n\n\t\t// initialize after construction\n\t\tthis.init();\n\t}", "title": "" }, { "docid": "54f3f6cd93f601ca0cc50658b942ae86", "score": "0.60634696", "text": "init() {\n\t\tdebug = this.debug;\n\t\tlog = this.log;\n\n\t\tthis.initVariables();\n\t\tthis.initFeedbacks();\n\t\t//this.initPresets();\n\n\t\tthis.initTCP();\n\t}", "title": "" }, { "docid": "fde9f6baa0cb5ed1fb2a1082805fcb92", "score": "0.6047689", "text": "function init() {\n }", "title": "" }, { "docid": "718fe7406324e674cccc6e37ea4dcbbf", "score": "0.6044565", "text": "function init() {\r\n\t\tif(typeof EventManager != 'undefined') {\r\n\t\t\teventManager = EventManager.getDefault();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e070f5367e9ee549808f3600739d944a", "score": "0.6029926", "text": "function _init() {\n\t\tlatest();\n\t}", "title": "" }, { "docid": "a4621aeb768f70d81536ef230e242096", "score": "0.6029135", "text": "function init() {\n\t\tinitDigitalWatch();\n\t\tupdateDate(0);\n\t\tbindEvents();\n\t}", "title": "" }, { "docid": "0186459e4ce622a72f71947a8077227c", "score": "0.60275567", "text": "init() {\n\n\t}", "title": "" }, { "docid": "a67085a836c811448cbe2785aa4989e8", "score": "0.59989464", "text": "init() {\n this.track = this.inputs.getProp('track');\n this.errors = {\n moderators: [],\n };\n }", "title": "" }, { "docid": "6015dd4fe186e2bdc1b52e8e2bb0cb8e", "score": "0.5984244", "text": "function init() {\n initDigitalWatch();\n updateDate(0);\n\n bindEvents();\n }", "title": "" }, { "docid": "2aa4c254dc7d6801ac89f2f7f1a7148d", "score": "0.59818757", "text": "init() {\n this.readyCount = 0;\n }", "title": "" }, { "docid": "bec901e21e135c9e227f375b88935330", "score": "0.5962346", "text": "function init() {\r\n bindEventListeners();\r\n }", "title": "" }, { "docid": "ee30d2421c09520665642f475c3b17b6", "score": "0.5960687", "text": "initialize() {\n this.listenTo(this.owner, converter_1.Converter.EVENT_RESOLVE_BEGIN, this.onBeginResolve, 512);\n }", "title": "" }, { "docid": "b3ecfed1f967fcf4ff361fd11922b9c8", "score": "0.5950817", "text": "function main() {\n\tlog.verbose( 'main', 'Begin' );\n\tui.init({main: Notification});\n}", "title": "" }, { "docid": "19b87164eb21dec7eb6d4bdf5b9a868d", "score": "0.59502125", "text": "initialize(){\n\t\tthis.bindEvents();\n\t}", "title": "" }, { "docid": "6c752e324490ed3ca1ad7b19251fa226", "score": "0.5949412", "text": "constructor() {\n this.listeners = {}\n }", "title": "" }, { "docid": "31b50dfc8e8374d9bdf8de0a020401e7", "score": "0.5947046", "text": "function init() {\n\n }", "title": "" }, { "docid": "31b50dfc8e8374d9bdf8de0a020401e7", "score": "0.5947046", "text": "function init() {\n\n }", "title": "" }, { "docid": "babf93e0187640ff772c88910e88f27b", "score": "0.5936554", "text": "function init() {\n cache();\n bindEvents();\n }", "title": "" }, { "docid": "e2296105daa3dce5401f0ee7e5bcb4a2", "score": "0.5932685", "text": "function init()\n {\n setTimeout(checkReady, 100);\n installBoardChangeHook();\n }", "title": "" }, { "docid": "063baf3521bc6a80d6adf535db158a1d", "score": "0.59295774", "text": "function initPolling() {\n if (angular.isDefined(pollingInterval)) {\n return;\n }\n\n // Activate listener\n $rootScope.$on('syncUnreadMessagesCount', poll);\n\n // Check for unread messages in intervals\n setPollingInterval();\n }", "title": "" }, { "docid": "7b804678f7d80c59c71b3ae24af9d3e0", "score": "0.59285057", "text": "function init() {\n queue = new Queue('requests');\n if (settings.get('config') && settings.get('config').server) {\n domain = settings.get('config').server;\n }\n\n // If any tracking calls are made whilst offline, try sending them the next time the device comes online\n utils.addEvent(window, 'online', run);\n\n // On startup, try sending any requests queued from a previous session.\n run();\n }", "title": "" }, { "docid": "5c9c9f0ac5f970f09a19f484485c7c15", "score": "0.59249026", "text": "init (finish) {\n\n this.log.debug(` Initialising ${this.cfg.type} notification...`);\n\n /* Nothing required. */\n\n this.log.debug(' Done.');\n\n return finish(null);\n\n }", "title": "" }, { "docid": "6b8bc94e7eb2bdc07c33dcfbadc5fe8f", "score": "0.59218013", "text": "init() {\n this.initDOMListeners()\n }", "title": "" }, { "docid": "4d8c0e7fee1322f320e8e9d6211843ad", "score": "0.5912093", "text": "init() {\n if (this.tooltips.length) {\n this.addTooltipsEvent();\n }\n return this;\n }", "title": "" }, { "docid": "d60aaa499f3e6300112abc3b8ba9a6e2", "score": "0.5903614", "text": "function _init(){\n\t\t\n\t\t_events();\n\t\t\n\t}", "title": "" }, { "docid": "52efc6be9df7f2da136886a06c28dd4a", "score": "0.5903007", "text": "constructor() { \n \n ComDayCqMailerDefaultMailServiceProperties.initialize(this);\n }", "title": "" }, { "docid": "10dd42dc94626c754a2749c9bd0caa06", "score": "0.58976096", "text": "constructor() {\n super();\n this._poll = null;\n }", "title": "" }, { "docid": "7e44fc35f3b1b0469769648548bc3952", "score": "0.5893202", "text": "function _init() {\n }", "title": "" }, { "docid": "70404ade03f449221fe1b6a2233c6f49", "score": "0.58885074", "text": "init() {\n this._super(...arguments);\n this.setup();\n }", "title": "" }, { "docid": "51cea732847f2da4213977db3b49fecf", "score": "0.5887483", "text": "init() {\n // override me do\n }", "title": "" }, { "docid": "3a007644cb047445e910218186b0bbbf", "score": "0.58832335", "text": "initialize() {\n this.initializeDispatch();\n this.fetchVotes();\n this.scheduleSubmission();\n }", "title": "" }, { "docid": "1d1cd2f4d3dd53f90bac1ca0fe1ea6b6", "score": "0.58780074", "text": "constructor() {\n this._initialize();\n }", "title": "" }, { "docid": "ebbfbc36de57bef9ccb4157ed0959d7b", "score": "0.58726966", "text": "initialize() {\n this._saveInstanceProperties(); // ensures first update will be caught by an early access of\n // `updateComplete`\n\n\n this._requestUpdate();\n }", "title": "" }, { "docid": "d0804e96e154c958ef2654763ea7f03d", "score": "0.5863159", "text": "init() {\n\t\tthis.client\n\t\t\t.init({\n\t\t\t\tmessage: this.messageReceiveHandler.bind(this),\n\t\t\t\tpassThrough: this.passThroughReceiveHandler.bind(this),\n\t\t\t\tconnection: {\n\t\t\t\t\tclose: this.connectionCloseHandler.bind(this),\n\t\t\t\t\tattempt: this.connectionAttemptHandler.bind(this),\n\t\t\t\t\topen: this.connectionOpenHandler.bind(this)\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(() => this.bindActionEvents());\n\t}", "title": "" }, { "docid": "87ba5db910aa2c77a1edf1eb941b0e15", "score": "0.5859039", "text": "init() {\n return this.ready = this._init()\n }", "title": "" }, { "docid": "87ba5db910aa2c77a1edf1eb941b0e15", "score": "0.5859039", "text": "init() {\n return this.ready = this._init()\n }", "title": "" }, { "docid": "b597c669ef76e4dc13b21b2b9ee1db69", "score": "0.585576", "text": "setupWatcherBus() {\n logger.debug('Setting watcher bus up');\n this.watcherBus = new WatcherBus(this.bot);\n }", "title": "" }, { "docid": "ce596583ba0a20482b08d4c190eb47ef", "score": "0.58551484", "text": "init() { }", "title": "" }, { "docid": "ce596583ba0a20482b08d4c190eb47ef", "score": "0.58551484", "text": "init() { }", "title": "" }, { "docid": "ce596583ba0a20482b08d4c190eb47ef", "score": "0.58551484", "text": "init() { }", "title": "" }, { "docid": "ce596583ba0a20482b08d4c190eb47ef", "score": "0.58551484", "text": "init() { }", "title": "" }, { "docid": "6f507ccbe12ba3072fcb30fbc09d371e", "score": "0.5853159", "text": "function init() {\r\n\r\n }", "title": "" }, { "docid": "34756a39f585fb7f0636bc1a8eabf528", "score": "0.5846877", "text": "constructor() {\n this._setup(); // DO NOT REMOVE\n }", "title": "" }, { "docid": "6a9fa21947c4562369190ba523667370", "score": "0.5833104", "text": "init() {\r\n // Call accessibility\r\n this.attachEvents();\r\n }", "title": "" }, { "docid": "7c07cdc5a5a806e56086a3c386a740ab", "score": "0.5827943", "text": "initialise() { }", "title": "" }, { "docid": "75fcb2b236d2fe5916aa91626cf99966", "score": "0.58084035", "text": "#init(config) {\n this.config = {...this.getDefaultConfig(), ...config};\n\n // Initialize notifications parent\n this.parent = document.createElement(\"div\");\n this.parent.classList.add(\"notification-manager\");\n Object.assign(this.parent.style, {\n \"left\": \"50%\",\n \"maxWidth\": this.config.display?.width || \"600px\",\n \"position\": \"fixed\",\n \"top\": \"8px\",\n \"transform\": \"translateX(-50%)\",\n \"width\": \"100%\",\n \"zIndex\": \"9999\",\n });\n\n // Append notification parent to document\n document.body.appendChild(this.parent);\n\n this.confirmationDiv = document.createElement(\"div\");\n document.body.appendChild(this.confirmationDiv);\n }", "title": "" }, { "docid": "dae51fc9526bd23c00ce1a1b540cc56c", "score": "0.58008987", "text": "function initialize() {\n\t\t\tthis.$cache = {};\n\t\t\tthis.$config = {};\n\t\t\tthis._ready.resolve();\n\t\t}", "title": "" }, { "docid": "5f79e3e6029038b568219de138ebda84", "score": "0.58000654", "text": "init(){\n \n\t}", "title": "" }, { "docid": "164321ea288582097b24cd2ebe73d83b", "score": "0.57992476", "text": "function initialize(instance) {\n\n if (!instance.__internal) {\n instance.__internal = {\n position: alertify.defaults.notifier.position,\n delay: alertify.defaults.notifier.delay,\n };\n\n element = document.createElement('DIV');\n\n updatePosition(instance);\n }\n\n //add to DOM tree.\n if (element.parentNode !== document.body) {\n document.body.appendChild(element);\n }\n }", "title": "" }, { "docid": "164321ea288582097b24cd2ebe73d83b", "score": "0.57992476", "text": "function initialize(instance) {\n\n if (!instance.__internal) {\n instance.__internal = {\n position: alertify.defaults.notifier.position,\n delay: alertify.defaults.notifier.delay,\n };\n\n element = document.createElement('DIV');\n\n updatePosition(instance);\n }\n\n //add to DOM tree.\n if (element.parentNode !== document.body) {\n document.body.appendChild(element);\n }\n }", "title": "" }, { "docid": "164321ea288582097b24cd2ebe73d83b", "score": "0.57992476", "text": "function initialize(instance) {\n\n if (!instance.__internal) {\n instance.__internal = {\n position: alertify.defaults.notifier.position,\n delay: alertify.defaults.notifier.delay,\n };\n\n element = document.createElement('DIV');\n\n updatePosition(instance);\n }\n\n //add to DOM tree.\n if (element.parentNode !== document.body) {\n document.body.appendChild(element);\n }\n }", "title": "" }, { "docid": "6b19583356c2f425efd315483c5a0559", "score": "0.57930344", "text": "constructor() { \n BaseResponse.initialize(this);MailThreadOneAllOf.initialize(this);\n MailThreadOne.initialize(this);\n }", "title": "" }, { "docid": "44dd5cd2177b38a16a0f40616d9145d7", "score": "0.57927036", "text": "initialize() {\n this._saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this._requestUpdate();\n }", "title": "" }, { "docid": "0f34c88471951f2acd33e0c4e0c5fc4e", "score": "0.57879925", "text": "async initialize() {\n if (this._eventHandlers.processInitialize) {\n await this._eventHandlers.processInitialize(this);\n }\n }", "title": "" }, { "docid": "d198e9f66003e50ea332f6175c520b06", "score": "0.5787389", "text": "function init() {\n\t\t\t// init code here\n\t\t\n\t\t}", "title": "" }, { "docid": "6980e937131c3d24edf098ad82f13206", "score": "0.5785431", "text": "function setup(model)\n{\n model.once(\"notificationService\",notificationFactory);\n}", "title": "" }, { "docid": "b74c1355d1f195f671e0c7a676f3f3cb", "score": "0.57849216", "text": "function init () {\n\n \n }", "title": "" }, { "docid": "d4ab0a0af3e76f688b50321513bd481c", "score": "0.5776721", "text": "function init() {\n\t\tapplySettings();\n\t\tpopulateHTML();\n\t\teventHandler();\n\t}", "title": "" }, { "docid": "ae01c0d4bba7b60dc4f7263ac7960d87", "score": "0.57731944", "text": "initialize() {\n this._saveInstanceProperties(); // ensures first update will be caught by an early access of `updateComplete`\n\n\n this._requestUpdate();\n }", "title": "" }, { "docid": "ae01c0d4bba7b60dc4f7263ac7960d87", "score": "0.57731944", "text": "initialize() {\n this._saveInstanceProperties(); // ensures first update will be caught by an early access of `updateComplete`\n\n\n this._requestUpdate();\n }", "title": "" }, { "docid": "18598e122c53650f9c71cdedc8592684", "score": "0.5771428", "text": "__init() {\n this.__setupBlockerElement();\n\n if (qx.core.Environment.get(\"engine.name\") == \"mshtml\") {\n this.__setupIframeElement();\n }\n }", "title": "" }, { "docid": "03fc58d40f92e9131a79f10bbcd40146", "score": "0.5767391", "text": "init() {\n this.emit('ready');\n }", "title": "" } ]
698b5cf1b6e77c82da827b9e627af08d
Calculates index of next image based on number of steps
[ { "docid": "a99ba4128233a8032418771e910f9fda", "score": "0.8144729", "text": "function calcIndex(steps) {\n let newIndex = state.currIndex + steps;\n if (newIndex < 0) {\n newIndex += data.imagesLength;\n } else if (newIndex >= data.imagesLength) {\n newIndex -= (data.imagesLength);\n }\n return newIndex;\n }", "title": "" } ]
[ { "docid": "56f21033c85c8cd9dd66fa963e6f3543", "score": "0.7184123", "text": "function nextImage() {\n if (currentImage < images.length - 1) {\n currentImage++;\n } else {\n currentImage = 0;\n }\n}", "title": "" }, { "docid": "2c68abfeb9f1cc541a6eeed56ee71882", "score": "0.70265204", "text": "function nextImg() {\n imageIndex++;\n if (imageIndex === numberOfImages) {\n imageIndex = 0;\n }\n slider(imageIndex);\n}", "title": "" }, { "docid": "21f8a1cfacb04b3a6d9fda3935b10bcc", "score": "0.69727707", "text": "function next(){\n current_image = current_image + 1;\n \n if(current_image > imagelist.length - 1){\n current_image = 0;\n }\n print(\"next image is \" + current_image);\n}", "title": "" }, { "docid": "da8e483f314be303b481f9738855cd0b", "score": "0.6861526", "text": "function nextImage() { \n if(++Id >= image.length){\n Id = 0;\n }\n console.log(Id);\n currentImageID();\n}", "title": "" }, { "docid": "9ef429257b08ad8276579ff4789324a1", "score": "0.6805499", "text": "getNextImage(image) {\n const splitted = image.src.split('/')\n const lastImage = splitted[splitted.length-1].split('.png')[0]\n let lastIndex = Number(lastImage[lastImage.length-1])\n\n if(this.animStop) {\n return lastImage.slice(0, lastImage.length-1) + 2\n }\n\n if(lastIndex + 1 === 4) {\n return lastImage.slice(0, lastImage.length-1) + 1\n }\n\n return lastImage.slice(0, lastImage.length-1) + (lastIndex + 1);\n }", "title": "" }, { "docid": "806ee3e54d648de54194a4efc5ace63c", "score": "0.67913944", "text": "function getNextIndex(images, index) {\n var len = images.length\n var triesRemaining = len\n\n while (triesRemaining > 0) {\n var index = (index + 1) % len\n if (images[index]._succeeded) {\n return index\n }\n triesRemaining--\n }\n\n return null\n}", "title": "" }, { "docid": "a703ad26ad5196d66320fe9a62dc1c72", "score": "0.66883457", "text": "nextImage() {\n\t\tlet index = this.state.imageIndex;\n\n\t\t//We want to increase the image index for the carousel, but if this paging action takes us past the length of the image array, we need to reset\n\t\tif (index + 1 > this.props.app.images.length) {\n\t\t\tindex = 0;\n\t\t} else {\n\t\t\tindex++;\n\t\t}\n\n\n\t\tthis.setState({\n\t\t\timageIndex: index\n\t\t});\n\t}", "title": "" }, { "docid": "239a533e27dfe482ded799fd51f894cc", "score": "0.6671283", "text": "function nextImage(){\n\t\ti =(i+1);\n\t\timgGallery.src = stepImgs[i];\n\t\tcaption.innerHTML = stepCaptions[i];\n\n\t\tif(i===stepImgs.length){\n\t\t\ti = 0;\n\t\t\timgGallery.src = stepImgs[i];\n\t\t\tcaption.innerHTML = stepCaptions[i];\n\t\t}\n\t}", "title": "" }, { "docid": "08bf0ca4edf525ad9aa6689b9c63f51c", "score": "0.6661133", "text": "function showNextImage() {\n\t/* Increase the index by 1, round up to the first image if the index is\n\t larger than the number of images */\n\tconst numImages = imageList.length\n\timageIdx = (imageIdx + 1) % numImages;\n\tshowImageWithCurrentIdx();\n }", "title": "" }, { "docid": "84e9c6b3b770edea6bfcb412632c9af1", "score": "0.66078067", "text": "function viewNextImg(n) {\n viewLightbox(imageNum += n);\n}", "title": "" }, { "docid": "1963633f2fafbacfb9740c774184c146", "score": "0.66000533", "text": "function prevImage(n) {\n currentPosition == 0 ? null : moveImage((currentPosition += n));\n}", "title": "" }, { "docid": "1832b0816267dd26ae90c354530c0885", "score": "0.65900797", "text": "get nextImage() {\n\t\tthis.currentImage++;\n\t\treturn this.images[this.currentImage - 1];\n\t}", "title": "" }, { "docid": "0b0c00bf8814f011cadbb0a4e328aeb5", "score": "0.65784234", "text": "function next(){\r\n if(i>11){\r\n var l = i\r\n } else {\r\n var l = i+=1;\r\n }\r\n document.imgSrc.src = myImgSrc + myImg[l] + myImgEnd;\r\n}", "title": "" }, { "docid": "f357d3e2e42c5c23f64e888f31852da5", "score": "0.6572644", "text": "nextPicture(){\n if(this.count < 4){\n this.count++\n } else {\n this.count = 0\n }\n }", "title": "" }, { "docid": "8f345cbbaca235eaddd551a6a3c9b7fb", "score": "0.6568182", "text": "function NextImageClick()\n {\n if (currentIndex == ImageArray.length -1)\n {\n currentIndex =0;\n }\n else\n {\n currentIndex += 1;\n }\n timeCounter -= 1;\n LoadImages();\n }", "title": "" }, { "docid": "a9eb0f1d09348ac69998994fe8bc573a", "score": "0.6555769", "text": "function nextStep(){\n setStep(step+1);\n }", "title": "" }, { "docid": "a98bd104cf4bb43f4a1200c5a2d3c1a0", "score": "0.6511208", "text": "function next(){\r\n idx++;\r\n if(idx > $imgLength-1){\r\n idx = 0;\r\n }\r\n play();\r\n }", "title": "" }, { "docid": "0ec6e4d844657004cc38630ac9aa6942", "score": "0.6490194", "text": "function countSteps(n) {}", "title": "" }, { "docid": "a9134cc318c86be63c4047fb3c2b375a", "score": "0.6487958", "text": "increaseIndex() {\n this.currentIndex = this.currentIndex < this.images.length - 1 ? this.currentIndex + 1 : 0;\n }", "title": "" }, { "docid": "f42237a988ac526252fcff70647a05fe", "score": "0.64811724", "text": "function next(i,images){\n return images[i];\n}", "title": "" }, { "docid": "f7140b6a60142fd9a36d1f37ab6e6e42", "score": "0.64652306", "text": "function nextImage () {\n\t'use strict';\n\timageGalleryIndex++;//increment the gallery index tracker\n\tif (imageGalleryIndex >= imageFilePaths.length) {//check to make sure the index tracker has not outgrown the array length\n\t\timageGalleryIndex = 0;//reset the index tracker if we reached the end of the array\n\t}\n\tchangeImage();//call the function to change the image\n}", "title": "" }, { "docid": "f0151ecbead14cb6e3d7e996ecbd9886", "score": "0.6457981", "text": "function nextImage(carousel) {\r\n\tif (currentImg === \"undefined\") currentImg = 0;\r\n\tcurrentImg = Math.min(currentImg+1, maxImages-1);\r\n\tscrollImages( IMG_WIDTH * currentImg, speed, carousel);\r\n}", "title": "" }, { "docid": "423fab4f449cb94994d9e160b191ce6c", "score": "0.6454782", "text": "function nextImage() {\n // current + 1 % count\n current = (current + 1) % count;\n // load image\n loadImage('/assets/default/default_backgrounds/background_' +\n current + '.jpg');\n }", "title": "" }, { "docid": "02bc61f05014c9d8bf5752dc17d413ca", "score": "0.6445893", "text": "nextSlide() {\r\n if (this.state.index !== this.state.imagePaths.length - 1) {\r\n this.setState({ index: this.state.index + 1 });\r\n } else {\r\n this.setState({ index: 0 });\r\n }\r\n }", "title": "" }, { "docid": "b18745149129144873f78dc059725ce1", "score": "0.6438936", "text": "function nextImage() {\n sliderIndex++;\n if(sliderIndex > sliderImages.length - 1)\n sliderIndex = 0;\n showImage(sliderIndex); \n }", "title": "" }, { "docid": "6c4c7a01490a9a856a9f84576b2b65eb", "score": "0.6376767", "text": "function next_step(idx){\n\t\t$('#steps li').eq(idx-1).removeClass('current_step');\n\t\t$('#steps li').eq(idx).addClass('current_step');\n\t\tupdate_progress(idx+1);\n\t}", "title": "" }, { "docid": "478fefdcfa3d584253da88a1ea0c8a01", "score": "0.63637877", "text": "function nextImage(carousel) {\n\tif (currentImg === \"undefined\") currentImg = 0;\n\tcurrentImg = Math.min(currentImg+1, maxImages-1);\n\tscrollImages( IMG_WIDTH * currentImg, speed, carousel);\n}", "title": "" }, { "docid": "1f38e315b76d618025d2bc7a6504b889", "score": "0.6358226", "text": "function nextOtterPic() {\r\n index = (index + 1) % otters;\r\n setDetailsFromThumb(thumbnails[index]);\r\n}", "title": "" }, { "docid": "f705c1a2a5c34ad25453a244fafcf373", "score": "0.63451225", "text": "function nextAnimationIx(anim)\n{\n for (i=0; i<animations.length; i++)\n {\n if (animations[i].name==anim.next)\n {\n return i;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "a59debee406243cf8bc7ebeffac489b0", "score": "0.63397014", "text": "next () {\n var next = steps.indexOf( activeStep ) + 1;\n next = next < steps.length ? steps[ next ] : steps[ 0 ];\n\n return this.moveTo(next);\n }", "title": "" }, { "docid": "ecfdc4fbb00d5de42591fb3ddb16fc0b", "score": "0.6315226", "text": "function next() {\n\t\t\tanimateOut(currentIndex, ANIMATION_DURATION);\n\n\t\t\tlet nextIndex = (++currentIndex) % (IMAGES.length);\n\t\t\tanimateIn(nextIndex, ANIMATION_DURATION);\n\n\t\t\tcurrentIndex = nextIndex;\n\t\t\tif (isFirst) {\n\t\t\t\tsetInterval(next, TRANSITION_DURATION * 1000);\n\t\t\t\tisFirst = false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0bf5be2b31f886193e2a2a9a82ca772a", "score": "0.63095576", "text": "async getNextImageIndex(folderPath) {\n let index = 0;\n let mediaPath = path.join(folderPath, Config.mediaFolder);\n if (path.isAbsolute(Config.mediaFolder)) {\n mediaPath = Config.mediaFolder;\n }\n if(!await this.fileExists(mediaPath)){\n return 0;\n }\n const entries = await vscode.workspace.fs.readDirectory(vscode.Uri.file(mediaPath));\n for (const entry of entries) {\n if (entry[1] != vscode.FileType.File || !entry[0].toLowerCase().startsWith(imgPrefix.toLowerCase())){\n continue;\n }\n var re = new RegExp(`.*${imgPrefix}(\\\\d*)\\\\..*$`, \"g\");\n let match = re.exec(entry[0]);\n if(match){\n let val = parseInt(match[1]);\n if (index <= val){\n index = val + 1;\n }\n }\n }\n return index;\n }", "title": "" }, { "docid": "1466fb6590e18fb3b6342a89e26accae", "score": "0.6305853", "text": "function nextButtonClick() {\n\t\t// update current position by one\n\t\tcurrPosition += 1; // the same as: currPosition = currPosition+1\n\n\t\t// IF WE REACHED THE END OF THE ARRAY, RESET \n\t\t// currPosition TO ZERO\n\t\tif ( currPosition == images.length ) {\n\t\t\tcurrPosition = 0;\n\t\t}\n\n\t\t// grab the src of the new image \n\t\tvar newImageSrc = images[ currPosition ];\n\t\tconsole.log( newImageSrc, currPosition )\n\t\t// set imageEl src attribute to the new image src\n\t\timageEl.attr( 'src', newImageSrc );\n\t}", "title": "" }, { "docid": "3a66a82aa5e869b398e089af370740a6", "score": "0.6305671", "text": "function next_image(){\n \n for(i = 0; i < lenght; i++){\n \n //cycle the images:\n if (img[i] == currentImage){\n \n if(i + 1 < lenght){\n currentImage = img[i+1];\n $(\"#img_panel\").attr(\"src\", img[i+1]);\n return false;\n }else{\n currentImage = img[0];\n $(\"#img_panel\").attr(\"src\", img[0]);\n return false;\n }\n \n }\n \n }\n}", "title": "" }, { "docid": "6c77048586d8796d1b22bee634bbfb3a", "score": "0.6297438", "text": "function nextImage() {\n console.log('next image');\n let imageForward = images.findIndex(image => image === currentImage) + 1;\n //console.log(imageForward);\n \n if (imageForward < images.length) {\n slide.backgroundImage = `url(./img/gallerie/${images[imageForward]})`; //switches to next image in array\n currentImage = images[imageForward];\n } else {\n slide.backgroundImage = `url(./img/gallerie/${images[0]})`; //switches to first image in array\n currentImage = images[0];\n }\n toggleDot();\n}", "title": "" }, { "docid": "a914e4c3e9924f4e7ef10967df02d11e", "score": "0.629229", "text": "getNextStep() {\n return (this.step == 9) ? this.step : this.step + 1;\n }", "title": "" }, { "docid": "72d9711293345d609325ef277a008d09", "score": "0.6257822", "text": "function next(){\n if(i>4){\n var l = i\n } else {\n var l = i+=1;\n }\n document.productImg.src = myImgSrc + myImg[l] + myImgEnd;\n}", "title": "" }, { "docid": "7233f0f44aa514fca98fde4ed7405b46", "score": "0.6249086", "text": "function calcNext(length, current) {\n return (current + 1) % length;\n}", "title": "" }, { "docid": "8b61258146d760a5640a2abbb9052e59", "score": "0.62257725", "text": "nextStep() {\n\t\t\tthis.currentStep++;\n\t\t}", "title": "" }, { "docid": "2214208868b9a12326d4439959d9491b", "score": "0.62247187", "text": "function plusImage(n) {\n showImage(imageIndex += n);\n}", "title": "" }, { "docid": "0b5b1de55113890d3bd802a22e028a41", "score": "0.62236947", "text": "function nextThumb() {\n if (thumbImage + 4 < images.length - 1) {\n thumbImage++;\n }\n}", "title": "" }, { "docid": "5cade401a0406d8e3d8856ce2ee9e4ba", "score": "0.62189955", "text": "nextImage() {\n this.setState({\n currentImage: this.state.currentImage + 1,\n })\n }", "title": "" }, { "docid": "ecdc794717f84d7ce78c1670e8ec7482", "score": "0.6190079", "text": "function next() {\n\t\n\timagebox.jumpto(\n\t\t\n\t\t// wrap to beginning\n\t\t_options.continuousGalleries && current === gallery.length-1? 0:\n\t\t// next image\n\t\tcurrent < gallery.length? current+1:\n\t\t// don't jump\n\t\tnull\n\t);\n}", "title": "" }, { "docid": "d864e3fc1237a441da5b879a9143ece9", "score": "0.61867535", "text": "_nextStep() {\n if (this.state.currentStep !== this._stepCount() - 1) {\n this.setState(\n ({ currentStep }) => ({ currentStep: currentStep + 1 }),\n () => {\n Animated.parallel(this._getStepAnimation(this.state.currentStep, true)).start();\n },\n );\n }\n }", "title": "" }, { "docid": "8a281373d64eee9322a2cd1cc239386b", "score": "0.6133611", "text": "function prevImg() {\n if (imageIndex === 0) {\n imageIndex = numberOfImages;\n }\n slider(--imageIndex);\n}", "title": "" }, { "docid": "66f2ed5e33356e45f07cf8e40903883f", "score": "0.61163735", "text": "step(timestamp) {\n let deltaTime = timestamp - this.lastStepTime;\n if (isNaN(deltaTime)) deltaTime = 0;\n\n for (let image of this.splittedImages) {\n image.step(deltaTime, this.targetXOffset);\n }\n\n // If user stopped scrolling, target offset becomes zero.\n if (window.scrollY === this.scrollPosition) {\n this.targetXOffset = 0;\n }\n\n this.lastStepTime = timestamp;\n\n requestAnimationFrame((timestamp) => {\n this.step(timestamp);\n });\n }", "title": "" }, { "docid": "abed63c3e739dcb32a678d66d87fdb3b", "score": "0.6104032", "text": "function nextORImage() {\n x = (x === or_images.length - 1) ? 0 : x + 1;\n document.getElementById(\"changeORImage\").src = or_images[x];\n}", "title": "" }, { "docid": "fbab80032d843487bb1a2594eeb87f3f", "score": "0.6101545", "text": "function next_image()\r\n\t{\r\n\t\tvar present_slide=\"#slide\"+list[current];\r\n\t\tvar next_slide=\"#slide\"+list[current+1];\r\n\t\t$(present_slide).css(\"left\",\"-100%\");\r\n\t\t$(next_slide).css(\"left\",\"0%\");\r\n\t\tcurrent++;\r\n\t\tif (current>=total_slide) {\r\n\t\t\tcurrent = 0;\r\n\t\t\tfor(i=1;i<=total_slide;i++)\r\n\t\t\t{\r\n\t\t\t\t$(\"#slide\"+i).css(\"left\",\"-100%\");\r\n\t\t\t}\r\n\t\t\t$(\"#slide1\").css(\"left\",\"0%\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "47a9c0e5b17e133c284df9bf858f1725", "score": "0.60900414", "text": "function next (state) {\n state.index++\n }", "title": "" }, { "docid": "871e56404637f2a2e9c2c1fb41b688fe", "score": "0.6084958", "text": "function nextImage() {\n let next_image = current_image+1;\n if (next_image == total_images) next_image = 0;\n images[current_image].className = images[current_image].className.replace('pictures__image--show', '').trim();\n images[next_image].className += ' pictures__image--show';\n current_image = next_image;\n }", "title": "" }, { "docid": "aab68df5599713ff69d759ad9919e1bc", "score": "0.6082285", "text": "function nextIndex(length, current) {\n return (current + 1) % length;\n }", "title": "" }, { "docid": "4a0eb8b71be315dfacc65ecc82d3fc2d", "score": "0.60817206", "text": "function next(){\r\n\tsetCurrent(current+1);\r\n\tshowImage();\r\n}", "title": "" }, { "docid": "e992c40db454e784493b4bc7b3b5d334", "score": "0.6078038", "text": "function getNextIdx(idx, amt) {\n\tif (amt == undefined) { amt = 1; }\n\n\tvar rv = idx + amt;\n\tif (rv >= numLights) {\n\t\treturn rv % numLights;\n\t} else {\n\t\treturn rv;\n\t}\n}", "title": "" }, { "docid": "ca8a4e07efd6ed08e0a90602561ce2c2", "score": "0.606299", "text": "function handleanimationControlPanelBtnNext(){\n setCurImg(curImg + 1);\n}", "title": "" }, { "docid": "805becff8c5d6e8d24a8a441328d7a8c", "score": "0.603222", "text": "function next() {\n // scope.currentIndex<scope.images.length-1?scope.currentIndex++:scope.currentIndex=0;\n if (scope.currentIndex < scope.images.length - 1) {\n scope.currentIndex++;\n scope.likes = scope.images[scope.currentIndex].likes;\n scope.dislikes = scope.images[scope.currentIndex].dislikes;\n scope.cyrcles();\n } else {\n scope.currentIndex = 0;\n }\n }", "title": "" }, { "docid": "fd9f79576a11591fc762562e797bd499", "score": "0.6029951", "text": "function nextImage() {\n if(imageIndex >= 3){\n imageIndex = 0;\n }\n let arrImg = document.getElementById(\"arrImg\");\n arrImg.innerHTML = imageList[imageIndex].makeHTML();\n imageIndex += 1;\n}", "title": "" }, { "docid": "9e4ea9bffe2d6c1c7ef3543f30710097", "score": "0.6020251", "text": "function getIndex(x, y) {\n return (x + y * srcImage.width) * 4\n}", "title": "" }, { "docid": "9e4ea9bffe2d6c1c7ef3543f30710097", "score": "0.6020251", "text": "function getIndex(x, y) {\n return (x + y * srcImage.width) * 4\n}", "title": "" }, { "docid": "c31afdd5ceb524399bcf2121b5a9c632", "score": "0.6016896", "text": "function next(state) {\n state.index++;\n }", "title": "" }, { "docid": "c31afdd5ceb524399bcf2121b5a9c632", "score": "0.6016896", "text": "function next(state) {\n state.index++;\n }", "title": "" }, { "docid": "c31afdd5ceb524399bcf2121b5a9c632", "score": "0.6016896", "text": "function next(state) {\n state.index++;\n }", "title": "" }, { "docid": "c31afdd5ceb524399bcf2121b5a9c632", "score": "0.6016896", "text": "function next(state) {\n state.index++;\n }", "title": "" }, { "docid": "a3a633d53c3f95eeb0688fdfa84c40ce", "score": "0.6016189", "text": "function nextImage(){\n //Se suma una unidad en el array de imágenes\n numberImage += 1;\n //Se carga la imagen\n loadImage();\n //Se limpia el mapa\n resetMapElements();\n document.getElementById(\"imageScore\").innerHTML = \"\"\n}", "title": "" }, { "docid": "70757216d760911611f3a73487544d90", "score": "0.6011902", "text": "function next(){\n var cartelera = document.getElementById(\"pelis\");\n num++;\n if(num>=images.length){\n\tnum = 0;\n }\n cartelera.src = images[num];\n}", "title": "" }, { "docid": "126468fdbf212099fe1090ef3359ff77", "score": "0.6004514", "text": "function switch_next_img(increment, adjustedPage, numberOfImages, imgLarge){\n\t$('.photoLarge').css(\"opacity\", \"0\");\n\tvar img_integer = parseInt($('.photoLarge').attr('src').split('/')[1].split('.')[0]);\n\tif(increment === -1 && img_integer === 0){\n\t\timg_integer = numberOfImages;\n\t}\n\tvar nextImg = (img_integer + increment) % numberOfImages;\n\t$('.photoLarge').attr('src', (adjustedPage + \"Large\") + '/' + nextImg + '.jpg');\n\t$('.photoLarge').on(\"load\", function(){\n\t\t$('.photoLarge').css(\"opacity\", \"1\");\n\t})\n}", "title": "" }, { "docid": "e4e1930ad6f33fd077c3c9ca0138968e", "score": "0.6000019", "text": "function showNextImage() {\n return show(currentIndex + 1);\n }", "title": "" }, { "docid": "47b48df669645075f38b05433cc38602", "score": "0.59817547", "text": "function s2_increaseI(){\n if(s2_i == s2_images.length - 1){\n s2_i = 0;\n } else {\n s2_i++;\n }\n}", "title": "" }, { "docid": "ab709e47bb56a3da8f8e4c7062927836", "score": "0.5980123", "text": "function showPrevImage() {\n\t// Decrease the index by 1, round up to the last image if the index become -1\n\tconst numImages = imageList.length\n\timageIdx = (imageIdx - 1 + numImages) % numImages;\n\tshowImageWithCurrentIdx();\n }", "title": "" }, { "docid": "8b5cea2aac32696042f6ec3ce50ed2aa", "score": "0.59628105", "text": "get moveToNext() {\r\n return ++this.index < this.photos.length;\r\n }", "title": "" }, { "docid": "4c9bde0b3907f6e2136c43f2b162faf8", "score": "0.596165", "text": "function nextImage(){\n if (imgIndex < images.length) {\n imgIndex++;\n} else {\n\timgIndex = 0;\n}\n\n $(\"#main-image\").attr(\"src\", images[imgIndex]);\n // console.log(images[imgIndex]);\n}", "title": "" }, { "docid": "3ecb85a1cf7b4ac2d175e68f98dc9c34", "score": "0.5960728", "text": "next() {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }", "title": "" }, { "docid": "d9a1e29735ac250f44f9cdd402b17943", "score": "0.5949798", "text": "nextStep() {\n this.setState({ stepIndex: this.state.stepIndex + 1 });\n }", "title": "" }, { "docid": "23b453d625946fadb7042ecab6b99a7b", "score": "0.5949505", "text": "next() {\n this.step++;\n\n if(this.currentElement)\n this.toggleResizeObserver(false);\n\n if(this.step < this.steps.length) {\n this.makeStep();\n } else {\n this.endTour();\n }\n }", "title": "" }, { "docid": "d15100a6e18668b93545b4e354bc6d2a", "score": "0.59388584", "text": "function prevImage() {\n if ( --Id < 0) {\n Id = image.length-1;\n }\n console.log(Id);\n currentImageID();\n}", "title": "" }, { "docid": "a4c4a3aac8f773a05994bb636a40ab12", "score": "0.592861", "text": "function getTheHOfNextImage() {\n var CurrentPage = GetCurrentPage();\n var NextPage = CurrentPage + 1;\n var listofImg = GetListOfImg(CosmicComicsTempI);\n var image = new Image();\n image.src = CosmicComicsTempI + listofImg[NextPage];\n var H = DetectHorizontal(image);\n return H;\n}", "title": "" }, { "docid": "b8ea013b9d494cb25821345aad2d39fd", "score": "0.5920218", "text": "function next(state) {\n state.index++;\n }", "title": "" }, { "docid": "bda5431edee7ef48dcc9ba508087aa20", "score": "0.591594", "text": "function doNext() {\r\n\tif (document.images && thisPic < myPix.length-1) {\r\n\t\tthisPic++\r\n\t\tdocument.myPicture.src=myPix[thisPic]\r\n\t}\r\n}", "title": "" }, { "docid": "f820ad26ba3fb0fd25b70f4ae18a05e5", "score": "0.5909861", "text": "nextSlide(e) {\n e.preventDefault()\n\n let index = this.state.currentIndex\n let slidesLength = this.props.images.length - 1\n\n if (index === slidesLength) {\n index = -1;\n }\n\n ++index;\n\n this.setState({\n currentIndex: index\n });\n }", "title": "" }, { "docid": "bdc6c57c10a5493fd3dd429e92b71c3e", "score": "0.5889471", "text": "function run(){\r\n idx++;\r\n //When index is upper than the numbers of images, index come back to 0\r\n if(idx > img.length -1) {\r\n idx = 0;\r\n }\r\n /*Each time run function is called, the length X takes 500px less multiplicate \r\n by the index to go to the next image (separate eachother by 500px)\r\n For example -500px for the first, -1000px for the second ect...*/\r\n imgs.style.transform = `translateX(${-idx * 500}px)`;\r\n}", "title": "" }, { "docid": "d73b3267d4778b3dc11a07508fd83134", "score": "0.58881587", "text": "function animImageInc_3() {\n\tif (imageIndex_3 < numOfImages_3)\n\t\timageIndex_3++\n\telse\n\t\timageIndex_3 = 1;\n}", "title": "" }, { "docid": "ccc55fa76239e911b77f218d55495089", "score": "0.5887093", "text": "function getTotalSteps() {\n return TOTALSTEPS - 1;\n }", "title": "" }, { "docid": "196a43fcdd70bfb0ae233be974cd6162", "score": "0.5886838", "text": "function loadNextImage() {\n currentImageIndex += 1;\n if (currentImageIndex >= images.length) {\n currentImageIndex = 0;\n }\n\n var nextImage = images[currentImageIndex];\n loadImage(nextImage);\n}", "title": "" }, { "docid": "59e9b81d4a990fd0d2db9816e71ba2ee", "score": "0.588643", "text": "function nextPicture() {\n COUNTER_OBJ.picturesIndex++;\n COUNTER_OBJ.picturesIndex = COUNTER_OBJ.picturesIndex === ALL_PICS.length? 0 : COUNTER_OBJ.picturesIndex; \n changePictureInDom();\n}", "title": "" }, { "docid": "b5665e5bdc8bb57b66e8f553f1f9dcad", "score": "0.5878099", "text": "function nextFrame() {\n \n if (LOOPING.currentImage < LOOPING.slideImages.length) {\n drawImage(LOOPING.currentImage);\n LOOPING.currentImage++;\n } else {\n resetFrames();\n }\n \n}", "title": "" }, { "docid": "58e9dd7d940f263eaf0a3f63b3ec6fe3", "score": "0.5876689", "text": "calculateFrameIndex(index) {\n var posX = (index * this.frameWidth) % this.spriteSheet.width;\n var posY =\n (Math.floor(index / (this.spriteSheet.width / this.frameWidth)) *\n this.frameHeight) %\n this.spriteSheet.height;\n return {\n x: posX,\n y: posY,\n };\n }", "title": "" }, { "docid": "a44fcf581713620f5d65fd4a55326121", "score": "0.58687824", "text": "function nextImage(){\n\tvar current = images.indexOf(theimage.src);\n\tvar next = current + 1;\n\n\t// wrap around the length of the array\n\tif (images.length > next){\n\t\ttheimage.src = images[next];\n\t\t// give the image a random rotation\n\t\tnewdeg = getRandomRotation();\n\t\ttheimage.style.WebkitTransform = \"rotate(\"+ newdeg + \"deg)\";\n\t\tdeg = newdeg;\n\t}\n\telse {\n\t\ttheimage.src = images[0];\n\t\t// give the image a random rotation\n\t\tnewdeg = getRandomRotation();\n\t\ttheimage.style.WebkitTransform = \"rotate(\"+ newdeg + \"deg)\";\n\t\tdeg = newdeg;\n\t}\n}", "title": "" }, { "docid": "41b19789731b50a28da83148c83288d4", "score": "0.58625174", "text": "function next(next){\n var posicion = parseInt(next.id) + 1;\n if(posicion == gallery.totalImagesload){\n posicion = 0;\n }\n var card = document.getElementById(posicion);\n paintOverlay(card,false);\n}", "title": "" }, { "docid": "95ddc3fb2099e0d9a9521594b505be9f", "score": "0.58595884", "text": "function next(img,i){\n setTimeout(()=>{\n img.src = './assets/cena/'+imgs[i]\n next(img, (i+1)%3)\n },2000)\n}", "title": "" }, { "docid": "90ea1f9a09b9d5d20db10df3a61bf290", "score": "0.5856324", "text": "function nextImage(key) {\n let currAttr = $('#slider .slider-current img').attr('getimg');\n\n let index = $.inArray(currAttr, IMAGES);\n if (key == LEFT) {\n index--;\n } else if (key == RIGHT) {\n index++;\n } else {\n return false;\n }\n\n if (index < 0) {\n return IMAGES[IMAGES.length - 1];\n }\n if (index >= IMAGES.length) {\n return IMAGES[0];\n }\n return IMAGES[index];\n}", "title": "" }, { "docid": "e652e057c2ed7f718c6b2e4482c5fefb", "score": "0.5843965", "text": "function nextImage() {\n\tif (isModalVisible()) {\n\t\timgIndex++;\n\t\tif (imgIndex >= userPhotosResp.data.length) {\n\t\t\timgIndex = 0;\n\t\t}\n\t\tshowImage(imgIndex);\n\t}\n}", "title": "" }, { "docid": "666dec763af7180df41952ee59471510", "score": "0.5842426", "text": "function imageNext() {\n\tvar slides = document.getElementsByClassName(\"imageList\");\n\n\tfor (var i = 0; i < slides.length; i++) {\n\t\tslides[i].style.zIndex = '1';\n\t}\n\t\n\tif (currentImage < slides.length-1) {\n\t\t// ++currentImage increments the variable, returning the new value\n\t\t// Displays the next picture in front of the others\n\t\tslides[++currentImage].style.zIndex = '2';\n\t}\n\telse {\n\t\tslides[0].style.zIndex = '2';\n\t\tcurrentImage = 0;\n\t}\n}", "title": "" }, { "docid": "06eaf9922ecd32c435e2c0a5280a893d", "score": "0.582816", "text": "function NextImage(e, dir) {\n\t\t\tStopEvent(e);\n\t\t\tif (image.length <= 2) return;\n\t\t\tif (!dir) dir = (e.Element && e.Element.id == \"lb_back\" ? -1 : 1);\n\t\t\tif (cImage !== null) {\n\t\t\t\tvar i = cImage + dir;\n\t\t\t\tvar il = image.length - 1;\n\t\t\t\ti = (i > il ? 0 : (i < 0 ? il : i));\n\t\t\t\tif (i != cImage) ShowImage(i);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "10ffa88bccc5ae3b7cf23326387a6276", "score": "0.582329", "text": "next() {\n\t const index = this.steps.indexOf(this.currentStep);\n\n\t if (index === this.steps.length - 1) {\n\t this.complete();\n\t } else {\n\t this.show(index + 1, true);\n\t }\n\t }", "title": "" }, { "docid": "a3e2b1f1c7eb394b9c275997cc7a2634", "score": "0.5812547", "text": "function showNextImage_3() {\n\t// change imageNum\n\timageNum_3 += 1;\n\tcheckControls_3();\n\t// how many pixels from the left should imageRow now be?\n\tlet pixelsFromLeft_3 = -carouselWidth_3 * imageNum_3;\n\t// change css for imageRow\n\timageRow_3.style.left = pixelsFromLeft_3 + \"px\";\n}", "title": "" }, { "docid": "01dbf0ad7530d9f48a229315ee71ec94", "score": "0.58076096", "text": "step() {\n this.count += 1;\n }", "title": "" }, { "docid": "01dbf0ad7530d9f48a229315ee71ec94", "score": "0.58076096", "text": "step() {\n this.count += 1;\n }", "title": "" }, { "docid": "7e7be6406af101fedac92d0a79d71e4f", "score": "0.5798489", "text": "next() {\n // If no internal steps, or already at the last one, go to next slide\n const stepCount = this.steps.length;\n if (!stepCount || this.currentStepIndex === stepCount) {\n this.displaySlide(\n Math.min(this.currentSlideIndex + 1, this.slides.length - 1)\n );\n return;\n }\n\n // Show the next step\n this.currentStepIndex += 1;\n this.currentStep().classList.add('js-step-visible');\n }", "title": "" }, { "docid": "ad04be4a6b92a33b85a2992f7f41f860", "score": "0.57872385", "text": "goToNext() {\n const { dispatch } = this.props;\n const { currentImage, photos } = this.props;\n let nextPhotoId = Number(currentImage.id) + 1;\n if (nextPhotoId > photos.length) {\n nextPhotoId = 1;\n }\n const action = ActionCreators.updateCurrentImage(nextPhotoId);\n dispatch(action);\n }", "title": "" }, { "docid": "201d37ba4e31f58e5b2e45361a82f24e", "score": "0.57862043", "text": "function next_slide() { // incrment function to show next slide\n\n\timageIndex++;\t// increment image idex by 1 ( slide2.jpg will be replaced by slide3.jpg )\n\t\n\tif (imageIndex >= ArrayImage.length ){ // reset the image index value to 0 if it reaches image array's length\n\t\timageIndex = 0;\n\t}\n\n\timage_number.innerHTML = (imageIndex+1)+\" / \"+ArrayImage.length; // show current slide number in div id=\"image_number\"\n\n\timage_container.style.backgroundImage = \"url('\"+ ArrayImage[imageIndex] +\"')\"; // change slide image\n}", "title": "" }, { "docid": "e9901b7c2c84997ff74011724cf6e070", "score": "0.5776431", "text": "switchImage() {\n if (this.state.currentImage < this.state.images.length - 1) {\n this.setState({\n currentImage: this.state.currentImage + 1,\n });\n } else {\n this.setState({\n currentImage: 0,\n });\n }\n return this.currentImage;\n }", "title": "" } ]
92400311e95ad724a170497fbbff2748
Objects Functions Function for calculating tip from a bill
[ { "docid": "3c1860d9e45d9c98d1bcd6ea9ec3ef10", "score": "0.72787154", "text": "function calcTip(bill) {\n let tip = 0;\n\n if (50 < bill && bill < 300) {\n tip = bill * 0.15;\n } else {\n tip = bill * 0.2;\n }\n\n return tip;\n}", "title": "" } ]
[ { "docid": "b13729e6bfd67059ce7d5662eac44ad4", "score": "0.7648096", "text": "function tipCalculator() {\n return (bill*tax + bill)*percent\n}", "title": "" }, { "docid": "79a1abb1767f39d39582dfd15c72b744", "score": "0.74424547", "text": "function tipAmount(bill){\n var tip = 0;\n \n if (bill < 50){ // If the bill is less then $50\n return tip = bill * .20; \n }\n else if (bill >= 50 && bill < 200){\n return tip = bill *.15; \n }\n else{\n return tip = bill *.10; \n }\n }", "title": "" }, { "docid": "35da1a12769280be56434bda04dc4273", "score": "0.7408614", "text": "function tipCalculator (bill) {\n if (bill < 50) {\n tip = (20/100) * bill\n }else if (bill >= 50 && bill < 200) {\n tip = (15/100) * bill\n }else tip = (10/100) * bill\n return tip\n}", "title": "" }, { "docid": "44212a9b5e5df57d9d8928b66c55050c", "score": "0.73377436", "text": "function calcForTip(billTotal, tipAmount) { \n let total = billTotal * tipAmount;\n return total;\n}", "title": "" }, { "docid": "cf328b7fcbfd3725ebc78c8997275af9", "score": "0.73241204", "text": "function calculateTip(bill) {\n if (bill < 50 && bill > 0) {\n return bill * (20/100);\n } else if (bill >= 50 && bill < 200) {\n return bill * (15/100);\n } else if (bill >= 200) {\n return bill * (10/100);\n } else {\n return 'invalid bill';\n }\n}", "title": "" }, { "docid": "1cfdd3005922424b4beb171a6eb60e01", "score": "0.7245375", "text": "function calcTip(billAmount, tipPercent){\r\n let tipAmount = billAmount * tipPercent\r\n return tipAmount + billAmount\r\n}", "title": "" }, { "docid": "bb466092578e35f9c87699241f1986f4", "score": "0.72377396", "text": "function calculateTipAndBill () {\r\n return Math.round((calculateTip() + parseInt(bill)) * 100) / 100; \r\n \r\n \r\n}", "title": "" }, { "docid": "d693c6c74eb31e6e83c9372cc81c4c1b", "score": "0.7230521", "text": "function calculateTip(tipPercent, totalBill) {\n return tipPercent * totalBill\n}", "title": "" }, { "docid": "1f42f4afc19a30f96832109de96ed2cb", "score": "0.71341366", "text": "function calcTip(bill) {\n \n return bill >= 50 && bill <= 300 ? bill * 0.15 :\n bill * 0.2;\n}", "title": "" }, { "docid": "6b487e244d2ab54326122fcbd907149a", "score": "0.7055593", "text": "function tip(bill, twentyPercent) {\n let tip = bill * twentyPercent;\n return tip;\n}", "title": "" }, { "docid": "6b487e244d2ab54326122fcbd907149a", "score": "0.7055593", "text": "function tip(bill, twentyPercent) {\n let tip = bill * twentyPercent;\n return tip;\n}", "title": "" }, { "docid": "38863679a66fc4a4afc220b2f2024259", "score": "0.70489275", "text": "function tipCalculator(bill) {\n var percentage;\n if (bill < 50) {\n percentage = 0.2;\n } else if (bill >= 50 && bill <= 200) {\n percentage = 0.15;\n } else {\n percentage = 0.1;\n }\n return percentage * bill;\n}", "title": "" }, { "docid": "86e294cefb7220e29454409ec5a28a23", "score": "0.7002296", "text": "function tipCalc(bill){\n let tip =(bill *0.2)\n return tip.toFixed(2)\n}", "title": "" }, { "docid": "c44916e3a02f23562d9d245d9fc419a6", "score": "0.69075453", "text": "function calculateBill (total, tax = 0.13, tip = 0.15) {\n\n return total + (total * tax) + (total * tip)\n}", "title": "" }, { "docid": "f9f65ccec6d0e53db2c51d7cda00948b", "score": "0.68788296", "text": "function calcTip(bill) {\r\n\r\n var percentage;\r\n if (bill < 50) {\r\n\r\n percentage = 0.2;\r\n\r\n } else if (bill >= 50 && bill <= 200) {\r\n\r\n percentage = 0.15;\r\n\r\n } else {\r\n\r\n percentage = 0.10;\r\n }\r\n return percentage * bill;\r\n}", "title": "" }, { "docid": "7ad7a9db05394d1fc5a6608f4e2833b7", "score": "0.67665315", "text": "function calcTip(billValue) {\n let tip, finalBill;\n if (billValue >=50 && billValue <=300) {\n tip = billValue * 0.15;\n tips.push(tip);\n } else {\n tip = billValue * 0.20;\n tips.push(tip);\n }\n finalBill = billValue + tip;\n total.push(finalBill);\n return finalBill;\n //return billValue >=50 && billValue <=300 ? billValue * 0.15 : billValue * 0.2;\n}", "title": "" }, { "docid": "a619f2171a74a9aaffb01d4d1537374f", "score": "0.672104", "text": "function tipCalc(){\n let tipTotal = ((billAmount*100)* tipPercentage / 100);\n tipTotal = tipTotal.toFixed(2);\n return tipTotal;\n }", "title": "" }, { "docid": "dc91970b68c6312fb83a3965cc6697f3", "score": "0.6670337", "text": "function totalAmount(bill){\n var tip = 0;\n \n if (bill < 50){ \n return tip = bill+(bill * .20); \n }\n else if (50 < bill > 200 ){\n return tip = bill + (bill *.15); \n }\n else{\n return tip = bill + (bill *.10); \n }\n }", "title": "" }, { "docid": "a0a32dba1e1eb332d6ccd7a0b26a6aca", "score": "0.6610877", "text": "clacTip(){\n var calcTip = (this.bill / this.numPeople) * this.servicePeople;\n calcTip = Math.round(calcTip * 100) / 100;\n return calcTip;\n }", "title": "" }, { "docid": "a0a32dba1e1eb332d6ccd7a0b26a6aca", "score": "0.6610877", "text": "clacTip(){\n var calcTip = (this.bill / this.numPeople) * this.servicePeople;\n calcTip = Math.round(calcTip * 100) / 100;\n return calcTip;\n }", "title": "" }, { "docid": "10fcb72e1e3aa17b760c09d2f4e9e1a6", "score": "0.6605288", "text": "function calcTipAndBillPerPerson(billA, tipP, noP){\n if(noP == 0 | noP == null){\n tipPerPerson = 0.00;\n totalBillPerPerson = 0.00;\n } else {\n tipPerPerson = (billA*tipP)/(100*noP);\n totalBillPerPerson = billA/noP + tipPerPerson;\n }\n displayToScreen();\n}", "title": "" }, { "docid": "e8c564603f0e0d2373a4a1b40e382c28", "score": "0.6562402", "text": "function tipsCal(bill, numberOfPeople, tipPercentage) {\n let tip = bill * tipPercentage;\n let tipPerPerson = tip / numberOfPeople;\n let tipPer = document.getElementById(\"tipPer\");\n if (isNaN(tipPerPerson)) {\n tipPerPerson = 0;\n }\n //if tip is not finite, in other words, infiite, tip will be 0\n else if (!isFinite(tipPerPerson)) {\n tipPerPerson = 0;\n }\n if (tipPerPerson > 99999) {\n tipPerPerson = 0;\n totalPerPerson = 0;\n }\n tipPer.innerHTML = \"$\" + parseFloat(tipPerPerson).toFixed(2);\n}", "title": "" }, { "docid": "2662b0215b88a4bbd0100139801df1e0", "score": "0.65500325", "text": "function tipCalculator(receipt) {\n let tip = 0.2;\n let total = receipt * tip + receipt;\n return total\n}", "title": "" }, { "docid": "f54631640cce2733703bd9bdf074002b", "score": "0.652264", "text": "function tipAmount () {\n return \"$\" + base * service.good\n}", "title": "" }, { "docid": "da6d97230cbfbc29968cc154714e706e", "score": "0.65001255", "text": "function calculateTip()\n{\n var new_tip= (function(){\n var single_instance; //private variable storing the object\n function init(){\n var billAmt,serviceQual,numOfPeople;\n initalize=function(){\n this.billAmt = parseFloat(document.getElementById(\"billamt\").value);\n this.serviceQual = parseFloat(document.getElementById(\"serviceQual\").value);\n this.numOfPeople = parseInt(document.getElementById(\"peopleamt\").value); \n };\n function validate_i()\n {\n if (this.billAmt <=0 || this.serviceQual == 0 || this.numOfPeople == 0) \n {\n alert(\"Please enter values\");\n return false;\n }\n return true;\n };\n return{\n validate_public : validate_i,\n calculate_public : function()\n {\n var total = (this.billAmt*this.serviceQual)/(this.numOfPeople);\n total = Math.round(total * 100) / 100;\n total = total.toFixed(2);\n document.getElementById(\"totalTip\").style.display = \"block\";\n document.getElementById(\"tip\").innerHTML = total;\n },\n init1 : initalize\n\n };\n }\n return {\n get:function(){\n if(!single_instance)\n single_instance=init(); // logic for creating only one object\n return single_instance;\n }\n };\n })(); \n \n var instance=new_tip.get();\n instance.init1();\n if(instance.validate_public())\n {\n instance.calculate_public();\n }\n else\n {\n return;\n }\n}", "title": "" }, { "docid": "53cee034c530cd4508f522488809b10f", "score": "0.64401317", "text": "function getTotalTips (){\n return calculateTips(billArr[0])+calculateTips(billArr[1])+calculateTips(billArr[2])+calculateTips(billArr[3]);\n}", "title": "" }, { "docid": "a7dfb697a3719b7a69053c753e120265", "score": "0.6420358", "text": "function calculateTip() {\n\tconst billValue = parseInt(billInput.value);\n\tconst tipValue = parseInt(tipInput.value);\n\tconst pepleValue = parseInt(peopleInput.value);\n\tif (isNaN(billValue) || isNaN(tipValue) || isNaN(pepleValue)) {\n\t\tconsole.log(`Please Enter A Number`);\n\t\treturn;\n\t}\n\tconst tipAmount = parseFloat(\n\t\t((billValue * (tipValue / 100)) / pepleValue).toFixed(2)\n\t);\n\tconst totalAmount = (tipAmount + billValue).toFixed(2);\n\tdisplayTip.innerHTML = `$${tipAmount}`;\n\tdisplayTotal.innerHTML = `$${totalAmount}`;\n}", "title": "" }, { "docid": "30024c683659fe871e289f375960a651", "score": "0.6341599", "text": "function calcTip(){\r\n if(tip_value && people_value && bill_value){\r\n\r\n let tipAmount = ((tip_value/100) * bill_value)/people_value;\r\n \r\n let totalAmount = (bill_value/people_value) + tipAmount;\r\n\r\n \r\n tipAmount = Math.round(tipAmount * 100 / 100).toFixed(2)\r\n\r\n totalAmount = Math.round(totalAmount * 100 / 100).toFixed(2)\r\n\r\n tip_display.innerHTML = \"$\"+ tipAmount;\r\n total_display.innerHTML = \"$\"+totalAmount;\r\n\r\n reset_btn.style.backgroundColor = \"#26c0ab\";\r\n reset_btn.disabled = false;\r\n reset_btn.style.cursor = \"pointer\"\r\n }\r\n}", "title": "" }, { "docid": "634a2809451476b8fcf272e050c2fb09", "score": "0.63362056", "text": "constructor(billAmt,serviceQual,numOfPeople){\n const newTipCalc = new NewTipCalculator(billAmt,serviceQual,numOfPeople);\n newTipCalc.validation();\n this.total = newTipCalc.calculation();\n }", "title": "" }, { "docid": "300a1c40c5acc4c55de8e80a24f8e3d9", "score": "0.63041323", "text": "function addTip() {\n return totalPrice(0) * .15;\n }", "title": "" }, { "docid": "fc03dfeff0b42594b846b34e891cc00e", "score": "0.63040704", "text": "function tipAmount(bill, service) {\n if (service == 'good') {\n return bill * 0.20;\n } else if (service == 'fair') {\n return bill * 0.15;\n } else if (service == 'bad') {\n return bill * 0.10;\n }\n}", "title": "" }, { "docid": "cad4f94e70c90da3e2f97a08a7fbe070", "score": "0.62781787", "text": "function tip(a)\n{\n var bill=parseInt(a);\n console.log(\"Your bill with tip \"+(bill+5));\n}", "title": "" }, { "docid": "208cd7f5c675f30ece11a13dd6a97680", "score": "0.62592715", "text": "function tipAmount(bill, service) {\n\tif (service == 'good') {\n\t\ttip = bill * 0.2;\n\t} else if (service == 'fair') {\n\t\ttip = bill * 0.15;\n\t} else if (service == 'bad') {\n\t\ttip = bill * 0.1;\n\t}\n\tconsole.log(`The tip amount is ${tip}.`);\n}", "title": "" }, { "docid": "75eb1e0f9e91bf8d8c9c0977d551fda8", "score": "0.6258499", "text": "function tipCalculation(e) {\n // Converting the percentages to a decimal//\n currentTip = parseFloat(e.target.textContent) / 100;\n\n if (currentBill == \"\") {\n alert(\"Input a bill amount\");\n return;\n } else {\n tipAmount.textContent = roundNumber(\n (currentTip * currentBill) / currentPeople\n );\n totalAmount.textContent = roundNumber(\n (parseFloat(currentBill) * currentTip + parseFloat(currentBill)) /\n currentPeople\n );\n }\n}", "title": "" }, { "docid": "486c12ee6a1b8e0ebf079539d8aa26c2", "score": "0.624024", "text": "function bill() {\n\tbills = Number(document.getElementById(\"iconone\").value);\n\n\tif (bills <= 0) {\n\t\tdocument.getElementById(\"billerrorMessage\").style.display = \"block\";\n\t} else {\n\t\tdocument.getElementById(\"billerrorMessage\").style.display = \"none\";\n\t\t// here I call fn to calculate the total tip\n\t\tcalcTotalTip();\n\t}\n}", "title": "" }, { "docid": "4b36cd5ae1236112006f7171c2ca39f6", "score": "0.61904943", "text": "function calculateBill(billAmount, taxRate = 0.13, tipRate = 0.15) {\r\n // taxRate and tipRate are assigned default values if they aren't input later\r\n // this is the function body\r\n console.log('Running Calculate Bill!!');\r\n const total = billAmount + billAmount * taxRate + billAmount * tipRate;\r\n return total;\r\n}", "title": "" }, { "docid": "9b7b67eedf615f8a90142c66e11c9d67", "score": "0.61775875", "text": "function calculateBillWithTaxAndTip() {\n \n var amountEntered = document.querySelector('#total').value;\n var rateEntered = document.querySelector('#rate').value ;\n \n // validate fields\n if( isNaN(amountEntered) || amountEntered == 0 ) {\n alert(\"Please enter amount in $\");\n document.querySelector('#total').focus();\n return false;\n } else if( isNaN(rateEntered) || rateEntered == 0) {\n alert(\"Please enter rate in % \");\n document.querySelector('#rate').focus();\n return false;\n }\n \n var totalAmount = parseFloat(amountEntered);\n var tipPercent = parseFloat(rateEntered);\n \n // logic\n var tip = totalAmount * (tipPercent/100);\n var tax = totalAmount * (TAX_RATE/100);\n var grandTotal = totalAmount + tip + tax;\n \n // Setting results to the fields\n document.querySelector('#tip').innerHTML = tip.toFixed(2);\n document.querySelector('#tax').innerHTML = tax.toFixed(2);\n document.querySelector('#grand-total').innerHTML = grandTotal.toFixed(2);\n }", "title": "" }, { "docid": "7e052e41526f486a3555841114ed9c3f", "score": "0.6168616", "text": "function calculateBillTotal(preTaxAndTipAmount) {\n let sum = 0;\n let afterTip = preTaxAndTipAmount * 0.15;\n let afterTax = preTaxAndTipAmount * 0.095;\n return preTaxAndTipAmount+afterTip+afterTax;\n}", "title": "" }, { "docid": "cd7a4d48efedd3e59d8f8f7b61c98287", "score": "0.6130305", "text": "function customTipCalculation(e) {\n currentTip = e.target.value / 100;\n\n if (e.target.value > 100) {\n e.target.value = \"100\";\n }\n if (currentBill == \"\") {\n alert(\"Enter a bill first\");\n e.target.value = \"\";\n } else if (e.target.value == \"\") {\n return;\n } else {\n tipAmount.textContent = roundNumber(\n (currentBill * currentTip) / currentPeople\n );\n\n totalAmount.textContent = roundNumber(\n (parseFloat(currentBill) * currentTip + parseFloat(currentBill)) /\n currentPeople\n );\n }\n}", "title": "" }, { "docid": "a4e393c313a50ba25dfa2e774f422ddc", "score": "0.60480326", "text": "function tipAmount(bill, serviceLevel) {\n var tipPercent;\n if (serviceLevel === 'good') {\n tipPercent = 0.2;\n } else if (serviceLevel === 'fair') {\n tipPercent = 0.15;\n } else {\n tipPercent = 0.1;\n }\n return bill * tipPercent;\n}", "title": "" }, { "docid": "157122485cd9a771e631c5b0eb80b1b0", "score": "0.60184544", "text": "function calculateTip()\n{\n var new_tip= (function(){ // <- module\n var billAmt,serviceQual,numOfPeople;\n function initalize(){\n this.billAmt = parseFloat(document.getElementById(\"billamt\").value);\n this.serviceQual = parseFloat(document.getElementById(\"serviceQual\").value);\n this.numOfPeople = parseInt(document.getElementById(\"peopleamt\").value); \n }\n function validate_i()\n {\n \n if (this.billAmt <=0 || this.serviceQual == 0 || this.numOfPeople == 0) \n {\n alert(\"Please enter values\");\n return false;\n }\n return true;\n }\n function calculate(){\n var total = (this.billAmt*this.serviceQual)/(this.numOfPeople);\n total = Math.round(total * 100) / 100;\n total = total.toFixed(2);\n document.getElementById(\"totalTip\").style.display = \"block\";\n document.getElementById(\"tip\").innerHTML = total;\n }\n function initalize_p(){\n initalize();\n }\n function validate_p(){\n return validate_i();\n }\n function calculate_p(){\n calculate();\n \n }\n return{\n validate_public : validate_p,\n calculate_public : calculate_p,\n init : initalize_p\n };\n })();\n\n new_tip.init();\n if(new_tip.validate_public())\n {\n new_tip.calculate_public();\n }\n else\n {\n return;\n }\n}", "title": "" }, { "docid": "a5fbff0977a43a84d85996f4d3d80c3a", "score": "0.60037094", "text": "function calculateBill(billAmount, taxRate=0.13, tipRate=0.15) {\n // Function block or body\n console.log(`Current bill is ${billAmount} with ${taxRate*100}% tax.`);\n const total = billAmount + (billAmount * taxRate) + (billAmount * tipRate); // Block scoping. Only available locally inside function\n return total; // Return value makes item available for use. Otherwise will return \"undefined\"\n}", "title": "" }, { "docid": "f6419bd132b5fb627e8cee483e09f8b6", "score": "0.59727365", "text": "function solve(meal_cost, tip_percent, tax_percent) {\n let tipAmount = meal_cost * (tip_percent * .01);\n let taxAmount = meal_cost * (tax_percent * .01);\n let totalBill = meal_cost + tipAmount + taxAmount;\n console.log(Math.round(totalBill));\n}", "title": "" }, { "docid": "86f5cc3cd8d4577c5003ccb662f46c01", "score": "0.5921505", "text": "function calculateTip()\n{\n try \n {\n let billAmount = parseFloat(document.getElementById(\"input\").value);\n let pay = billAmount + billAmount * (tip/100)\n if(pay != NaN) document.getElementById(\"amountToPay\").innerText = \"$\" + Math.round(pay * 100) / 100;\n else document.getElementById(\"amountToPay\").innerText = \"$0\"\n } catch (error) {\n alert(\"Unable to Calculate tip needed to pay, please try again\");\n }\n finally {\n return;\n }\n}", "title": "" }, { "docid": "e6546276fecbc77047a8d92c1e9b2b74", "score": "0.59175235", "text": "function tipAmount(bill, service) {\n\tif (service == 'good') {\n\t\ttotal = bill + bill * 0.2;\n\t} else if (service == 'fair') {\n\t\ttotal = bill + bill * 0.15;\n\t} else if (service == 'bad') {\n\t\ttotal = bill + bill * 0.1;\n\t}\n\tconsole.log(`The total amount is ${total}.`);\n}", "title": "" }, { "docid": "abf68aa775d2f5defc250fda5e808717", "score": "0.5873959", "text": "tipForDiner(total) {\n\t\treturn (total * 0.20); \n\t}", "title": "" }, { "docid": "c96d938f74e3d7ecac998893f5e32cfc", "score": "0.5866834", "text": "function gracefulTipping(bill) {\n let num = bill * 1.15;\n if (num < 10) {\n num = Math.ceil(num);\n } else if (num < 100) {\n num = Math.ceil(num / 5) * 5;\n } else if (num < 1000) {\n num = Math.ceil(num / 50) * 50;\n } else if (num < 10000) {\n num = Math.ceil(num / 500) * 500;\n } else if (num < 100000) {\n num = Math.ceil(num / 5000) * 5000;\n } else if (num < 1000000) {\n num = Math.ceil(num / 50000) * 50000;\n } else if (num < 10000000) {\n num = Math.ceil(num / 500000) * 500000;\n }\n return num;\n}", "title": "" }, { "docid": "4faca7926ca38aebe805db61f056b204", "score": "0.58485395", "text": "function calcTip(billVal){\n switch(billVal){// switch statement to calculate the tip \n case(billVal > 30.00 && billVal < 300.00): // case 1 is met, print value \n return (0.15 * billVal); // tip is .15%\n \n case(billVal <= 30.00 || billVal >= 300.00): // case 2 is met, print value \n return (0.20 * billVal); // tip is .20%\n \n }//end switch block\n }", "title": "" }, { "docid": "e8c8181e40ac6dd58978067205e4f65e", "score": "0.58230495", "text": "function calculateTipPercent(billAmt, tipAmt) {\n return Math.round(100 / (billAmt / tipAmt));\n}", "title": "" }, { "docid": "ef768663b264d55318d1db399c8bd0a1", "score": "0.5761453", "text": "function calculateTip(subtotalAmount, tipPercent) {\n return subtotalAmount * (tipPercent/100);\n}", "title": "" }, { "docid": "be8a32e882978e3e61bd62133d6746bf", "score": "0.5760422", "text": "calculateBillTotalDiner(subTotal, tax, tip) {\n let bill = Number(subTotal);\n let taxes = Number(tax);\n let tips = this.billTip;\n let total = (bill + taxes + tips).toFixed(2);\n return total;\n }", "title": "" }, { "docid": "3fadcf5d939db0d2e8653356aba370d1", "score": "0.5726603", "text": "function dinnerPrice(price, tip){\n\tvar totalTip = price * tip;\n\tvar dinnerPrice = totalTip + price;\n\treturn dinnerPrice;\n}", "title": "" }, { "docid": "027f2bfeea2f7ebd0e0de2cb0eeec049", "score": "0.5701453", "text": "function splitBill () {\r\n \r\n return Math.round((calculateTipAndBill() / parseInt(NOSplitting)) * 100) / 100;\r\n \r\n}", "title": "" }, { "docid": "99e9b44c20950a17aa1bbc4862a08d3a", "score": "0.5688648", "text": "function calculate(total = 1, tip = 1, people = 1) {\n\ttipAmount.innerText = ''\n\ttotalAmount.innerText = ''\n\ttipAmount.classList.remove('active')\n\ttotalAmount.classList.remove('active')\n\n\tconst tipFull = (total / 100) * tip\n\tconst tipPerPerson = (tipFull / people).toFixed(2)\n\tconst totalPerPerson = ((total + tipFull) / people).toFixed(2)\n\n\tconst textTip = document.createTextNode(tipPerPerson || '$0.00')\n\tconst textTotal = document.createTextNode(totalPerPerson || '$0.00')\n\ttipAmount.append(textTip)\n\ttotalAmount.append(textTotal)\n\ttipAmount.classList.add('active')\n\ttotalAmount.classList.add('active')\n}", "title": "" }, { "docid": "e58eff05c48dc40b2decdde72b3e6a0d", "score": "0.5683978", "text": "function produceTipCalculator(percentTip) {\n return function tip(fare) {\n return fare * percentTip\n }\n}", "title": "" }, { "docid": "cb4a06aca8299c31a0625e5b698724a1", "score": "0.5670044", "text": "tip(object, align) {\n\t\t\ttips.Tip(object, {create: this.render, close: 5}).show(align || \"top\");\n\t\t}", "title": "" }, { "docid": "cbe8646bc5207fdb6f7a6fb619fb0de8", "score": "0.5643933", "text": "function tipAmount(billAmount, service) {\n if(service == \"good\") {\n return billAmount * .2\n }\n else if(service == \"fair\") {\n return billAmount * .15\n }\n else if(service == \"bad\") {\n return billAmount * .1\n }\n else {\n return \"Incorrect input\"\n }\n}", "title": "" }, { "docid": "01cc9efc846ee2f964d885e3c253d78b", "score": "0.5632001", "text": "function calculate()\n{\n //Obtain values from all the fields entered by the user\n let amount = document.getElementById('amt').value;\n let tip_percent = document.getElementById('tip').value;\n let people = document.getElementById('people').value;\n\n //Total tip amount\n let tip_amt = tip_percent*0.01*amount;\n \n try{\n if(people==0)\n throw new Error(\"Number of People cannot be 0\"); \n if(amount<0)\n throw new Error(\"Bill amount cannot be negative please re-enter\");\n if(tip_percent>30)\n throw new Error(\"Tip amount must not exceed 30%\"); \n\n //Tip amount per person\n tip_amt = tip_amt/people;\n //Bill amount per person\n amount=amount/people + tip_amt;\n\n }\n catch(e)\n { //display error as an alert if exception occurs\n alert(e.message);\n }\n //Round to 2 decimal places\n amount=amount.toFixed(2);\n tip_amt = tip_amt.toFixed(2);\n //set bill amount to be displayed\n document.getElementById('bill_amt').innerHTML = amount;\n //Make total bill amount visible\n document.getElementById('display_bill').style.display=\"block\";\n\n //set tip amount to be displayed\n document.getElementById('tip_amt').innerHTML = tip_amt;\n //Make total tip amount visible\n document.getElementById('display_tip').style.display=\"block\";\n\n}", "title": "" }, { "docid": "b9d37bf71447fd88b26b8e5d4040c7e0", "score": "0.5613668", "text": "function calculate() {\n let totalBill = document.getElementById(\"total-bill\").value;\n console.log(document.getElementById(\"total-bill\").value);\n\n let totalTip = totalBill * (20/100);\n //Let's assume 20% is the tip percentage\n\n let partySize = document.getElementById(\"party-size\").value;\n\n let tipPerPerson = totalTip / partySize;\n\n //convert tipPerPerson to a more formatted version of itself, like instead of\n // $40 it needs to say $40.00...\n\n //tipPerPerson = tipPerPerson.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});\n\n if(tipPerPerson !== 0)\n {\n document.getElementById(\"tip-per-person\").innerHTML = `The total tip per person is: $${tipPerPerson.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}`;\n\n }\n\n \n console.log(\"$\" + tipPerPerson.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}));\n\n }", "title": "" }, { "docid": "3a1a60fd8cab35403934ec34a07b792f", "score": "0.5544448", "text": "function calcTotalTip() {\n\t//\n\tconst tips = bills * (tipSelected / 100);\n\tconst tipAmount = document.getElementById(\"tipAmount\");\n\n\tif (isNumeric((tips / totalPeople).toFixed(2))) {\n\t\tcalcTotalAmount(tips);\n\t\treturn (tipAmount.innerHTML = `${(tips / totalPeople).toFixed(2)}`);\n\t}\n}", "title": "" }, { "docid": "206075d8d65370d828f54ca7ee85e0fc", "score": "0.55181944", "text": "function updateTrayPrice(tip){\n if (!place) { var place = '1 Main Street, Weston, 77840'; }\n Ordrin.r.deliveryFee(currRest.restaurant_id, new Money(tray.price), new Money(tip), time, place, function(data){\n data = JSON.parse(data);\n total = parseFloat(tray.price) + parseFloat(data.fee) + parseFloat($(\"#tip\").val()) + parseFloat(data.tax.toFixed(2));\n\n $('#trayTemplate').tmpl(data).appendTo('#tray');\n $(\"#trayTotal\").html(\"$\" + total);\n $('#tray').listview('refresh');\n });\n}", "title": "" }, { "docid": "2b3f1d032461b1daa6dbb857122641e7", "score": "0.5476336", "text": "function updateTipAndBillSection (){\n onChangeOfValue(tipTextBox, 0, 100);\n onChangeOfValue(numPeopleTextBox, 1, 1000);\n \n tipTextBox.value = Math.round((tipTextBox.value));\n numPeopleTextBox.value = Math.round((numPeopleTextBox.value));\n \n var oldValue = billTextBox.defaultValue;\n var newValue = billTextBox.value;\n\n if(hasNumber(billTextBox.value)){\n billTextBox.defaultValue = newValue;\n } else {\n billTextBox.value = billTextBox.defaultValue;\n } \n \n var removeAlpha = billTextBox.value.replace(/[^\\d.-]/g, '');\n billTextBox.value = parseFloat(removeAlpha).toFixed(2);\n\n tipSection.innerHTML = calculateTip ().toFixed(2);\n billSection.innerHTML = calculateTotal ().toFixed(2);\n }", "title": "" }, { "docid": "f08f95c09c28c3088c78eded399e1d4f", "score": "0.54539627", "text": "function payable_tax(t)\r\n{\r\n if (t <= 250000)\r\n {\r\n return 0;\r\n }\r\n else if (t > 250000 && t <= 400000)\r\n {\r\n return (t-250000)*0.20;\r\n }\r\n else if (t > 400000 && t <= 800000)\r\n {\r\n return 30000+((t-400000)*0.25);\r\n }\r\n else if (t > 800000 && t <= 2000000)\r\n {\r\n return 130000+((t-800000)*0.30);\r\n }\r\n else if (t > 2000000 && t <= 8000000)\r\n {\r\n return 490000+((t-2000000)*0.32);\r\n }\r\n else if (t > 8000000)\r\n {\r\n return 2410000+((t-8000000)*0.35)\r\n }\r\n\r\n}", "title": "" }, { "docid": "40c3bf94e04c84569102a0e1e9e6048c", "score": "0.540124", "text": "function calculateTip() {\n\n const amountBillElement = document.getElementById('amountBill');\n const percentageTipElement = document.getElementById('percentageTip');\n const peopleNumberElement = document.getElementById('peopleNumber');\n\n //Getting the value of the Bill, TipPercentage and no of people\n const billAmount = Math.abs(parseFloat(amountBillElement.value));\n const tipPercentage = Math.abs(parseFloat(percentageTipElement.value));\n const peolpeNumber = Math.abs(parseInt(peopleNumberElement.value));\n //------------------------------------------------------------------------\n\n\n //------------Checking for Invalid Input----------------------------------\n if(isNaN(billAmount) || isNaN(tipPercentage) || isNaN(peolpeNumber))\n {\n alert(\"Please make sure all values are entered and are correct.\");\n }\n //------------------------------------------------------------------------\n\n \n //-------------Tip percentage valid value checking------------------------\n let totalTip;\n\n if(tipPercentage>=0 && tipPercentage<=100)\n {\n totalTip = billAmount * tipPercentage / 100;\n }\n else if(tipPercentage<=0 || tipPercentage>=100)\n {\n alert(\"Please provide a tip percentage that is greater than 0 or less than 100.\")\n }\n //-------------------------------------------------------------------------------------\n\n\n let totalToPay;\n let tipPerPerson;\n\n //--------------Checking for the valid no of people------------------------------------\n if(peolpeNumber>0)\n {\n totalToPay = (billAmount + totalTip)/peolpeNumber;\n tipPerPerson = totalTip / peolpeNumber;\n }\n\n else if(peolpeNumber<=0)\n {\n alert(\"The number of people cannot be less than one.\");\n }\n //--------------------------------------------------------------------------------------\n \n\n //-----------------Always set to two decimal places.------------------------------------\n totalTip = totalTip.toFixed(2);\n totalToPay = totalToPay.toFixed(2);\n tipPerPerson = tipPerPerson.toFixed(2);\n //--------------------------------------------------------------------------------------\n\n\n //---------------Display the result-----------------------------------------------------\n document.getElementById('totalPayPerson').innerText = totalToPay;\n document.getElementById('perPerson').innerText = tipPerPerson;\n\n\n}", "title": "" }, { "docid": "b006fe9ef3d4493c0310a5078d8fd396", "score": "0.5394485", "text": "get tipPosition() {\n let cannon = this.cannon;\n // Subtracting the y position to align with center of tip\n let rotationPoint = new Vector(cannon.relativeRotationPoint.x,\n cannon.relativeRotationPoint.y - 22);\n let pipeLength = cannon.size.x - cannon.size.x * cannon.origin.x;\n let angle = cannon.angle.toRadians();\n let delta = new Vector(Math.cos(angle) * pipeLength, Math.sin(angle) * pipeLength);\n\n return Vector.add(rotationPoint, delta);\n }", "title": "" }, { "docid": "a654f3c83d618105a9dd6ce8903ec196", "score": "0.53905267", "text": "function getTip(total, tipPercent) {\n let percent = tipPercent * 100;\n let result = total * tipPercent;\n return `A ${tipPercent}% tip of ${total} would be ${result}`;\n}", "title": "" }, { "docid": "db286525992e65b074eb2d046f19c335", "score": "0.53904647", "text": "function Obj( prop1, prop2, prop3 ) { \n \t\t\t\treturn { \n \t\t\t\t \td1 : prop1,\n \t\t\t\t \tnodes1 : prop2,\n \t\t\t\t \tk1 : prop3, \n \t\t\t\teval : function(x){ return evaluateBSplineInPointX(this.d1,this.nodes1,this.k1+1,x); }, \n \t\t\t\t\t }; \t\t\t\n\t\t\t}", "title": "" }, { "docid": "06eba8e066018b95c04af8f27e02426b", "score": "0.5383348", "text": "function calculateTotalBill(partPrice, taxPercent, laborPercent){\n\tvar taxOnParts=partPrice*(taxPercent*.01);\n\t//document.write(\"taxOnParts: \"+taxOnParts + \" \");\n\n\tvar partCostWithTax = parseFloat(partPrice) + parseFloat(taxOnParts);\n\t//document.write(\"partCostWithTax: \" + partCostWithTax + \" \");\n\n\tvar laborCost=partCostWithTax*(laborPercent*.01);\n\t//document.write(\"laborCost: \" + laborCost);\nreturn laborCost+partCostWithTax;\n}", "title": "" }, { "docid": "76e03ec8c4b361a1c799a8ef15182b6a", "score": "0.538104", "text": "function tipper(a){\n var bill = parseInt(a);\n console.log(\"Your tip is \", bill+5);\n}", "title": "" }, { "docid": "1a4bfd28eec43652cfd47024e3b8996b", "score": "0.53660995", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(25, x).mul(5)\n return cost.floor()\n }", "title": "" }, { "docid": "9052a34c2bf537302fac85ba5eec931a", "score": "0.5364634", "text": "function simpletip(a){\n var bill=parseInt(a);\n console.log(\"Your bill with tip \"+(bill+5));\n}", "title": "" }, { "docid": "b6db037a4d181b486e93cbc279ce1eed", "score": "0.5360914", "text": "function getMyTaxReturnAndDoMyTaxesAndStuff(a, x, y, z){\n let myInc = a * x;\n let myTaxes = myInc - y;\n let total = myTaxes + z;\n return total; \n}", "title": "" }, { "docid": "362d3e6d97942c01186e5d545441b9b6", "score": "0.5350179", "text": "function totalCalc(billAmount, percentTip, splitNum) {//function setup\n var total = (percentTip / 100 + 1) * billAmount / splitNum;//actually doing the calculation\n return total;//returning the calc's answer back to the variable\n}//end function", "title": "" }, { "docid": "35a411ffd3e077fb074772ade41720b2", "score": "0.5344237", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(5, x).mul(10)\n return cost.floor()\n }", "title": "" }, { "docid": "35a411ffd3e077fb074772ade41720b2", "score": "0.5344237", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(5, x).mul(10)\n return cost.floor()\n }", "title": "" }, { "docid": "49e31fa68f20aeb562c37fbbe5009a24", "score": "0.53354794", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(5, x).mul(1)\n return cost.floor()\n }", "title": "" }, { "docid": "66788dbe9586aa32f2a71e288f503bb2", "score": "0.5326097", "text": "function calculateTax(amount){\n let result = amount * 0.0825;\n return result;\n\n}", "title": "" }, { "docid": "6b44af53468436dd4bf7aa0a7baa0093", "score": "0.5323331", "text": "function solve($meal_cost, $tip_percent, $tax_percent) {\n $tip = $meal_cost*($tip_percent/100);\n $tax = $meal_cost*($tax_percent/100);\n $totalCost = $meal_cost + $tip + $tax;\n echo round($totalCost);\n}", "title": "" }, { "docid": "81411b7626164d7bc2228e5f93d50550", "score": "0.5316988", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(10, x).mul(5)\n return cost.floor()\n }", "title": "" }, { "docid": "fa3c2d1bb10023c8a5c38174916ed8b2", "score": "0.531568", "text": "function calcTotalAmount(tips) {\n\tconst person = ((bills + tips) / totalPeople).toFixed(2);\n\tconst totalPerson = document.getElementById(\"totalAmount\");\n\n\tif (isNumeric(person)) {\n\t\treturn (totalPerson.innerHTML = `${person}`);\n\t}\n}", "title": "" }, { "docid": "72be4165f7ebaf7b9dadf48d57263890", "score": "0.5313944", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(3, x).mul(25)\n return cost.floor()\n }", "title": "" }, { "docid": "c3761a1d01b2963b6d1487ac65673036", "score": "0.53086823", "text": "function calculate_incomeTax(NSSF, PAYE) {\n //the value of taxes is obtained from the product of the sum of the parameters 'NSSF' and 'PAYE' and function calculate_grossPay\n taxes = (NSSF + PAYE) * calculate_grossPay(3000000);\n //by evoking using return, the value of taxes will be accessed when called in another function\n return taxes\n}", "title": "" }, { "docid": "948bbdd5017706bbc18e53e47a1af37e", "score": "0.5299487", "text": "function _empowersbc_pmt_formula($interest, $months, $loan) {\n var remaining_balance_amount = 0;\n // As per Ticket:#9692404, If Loan is greater than 30K then use only 30K\n if($loan > 30000) {\n remaining_balance_amount = $loan - 30000;\n $loan = 30000;\n }\n jQuery(\"#edit-submitted-civicrm-2-contact-1-fieldset-fieldset-civicrm-2-contact-1-relationship-custom-476\").val(parseFloat(remaining_balance_amount).toFixed(2));\n\n $months = $months;\n $interest = $interest / 1200;\n var amount = $interest * -$loan * Math.pow((1 + $interest), $months) / (1 - Math.pow((1 + $interest), $months));\n jQuery(\"#edit-submitted-civicrm-2-contact-1-fieldset-fieldset-civicrm-2-contact-1-relationship-custom-412\").val(parseFloat(amount).toFixed(2));\n }", "title": "" }, { "docid": "841b43b805466457aef589642214df65", "score": "0.5296121", "text": "function bonus(meal){\n let cost = Math.ceil(meal * 1.2);\n let tip = meal * .2;\n return meal + \" + \" + tip + \" = \" + (cost);\n\n}", "title": "" }, { "docid": "2b6d55038c29bd36528aa03118d60e00", "score": "0.5295127", "text": "function Tip()\n{\n\ttt_Tip(arguments, null);\n}", "title": "" }, { "docid": "618fd914658c82dd27d2366137a76460", "score": "0.5292341", "text": "function Tip()\n{\n tt_Tip(arguments, null);\n}", "title": "" }, { "docid": "1c01da2ebd8fa2e035862c636c4b4ce9", "score": "0.5290975", "text": "function calculateProfitAmountWalletTrtPolo(poloPrice,trtBidsAmount,trtBidsPrice,walletPolo,walletTrt){\n\n maxQuantityToBuy = walletTrt.usd / trtBidsPrice;\n //compra maxUqantiity to buy\n var PoloOffert = poloPrice * maxQuantityToBuy;\n var TrtOffert = trtBidsPrice * maxQuantityToBuy; \n var feePolo = (PoloOffert / 100) * 0.2; \n var feeTrt = (TrtOffert / 100) * 0.2;\n var totFees = feePolo + feeTrt\n var profit = PoloOffert - TrtOffert - totFees;\n if (profit > 0 && maxQuantityToBuy < walletPolo.btc){\n //compare\n walletTrt.usd = walletTrt.usd -TrtOffert;\n walletTrt.btc = walletTrt.btc + maxQuantityToBuy;\n walletPolo.usd = walletPolo.usd + (poloPrice * maxQuantityToBuy);\n walletPolo.btc = walletPolo.btc - maxQuantityToBuy;\n html.innerHTML = 'compro su trt e vendo su polo';\n console.log(walletTrt);\n console.log(walletPolo);\n }\n return profit;\n}", "title": "" }, { "docid": "d6c3d295a6ff0d8df9198bfecb21cdda", "score": "0.5290562", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(6, x).mul(25)\n return cost.floor()\n }", "title": "" }, { "docid": "43e01f8eee852d3b17b2719ddb1628c3", "score": "0.5282522", "text": "function productAfterTax(amount, price, tax) {\n\tvar tax = 0.07;\n\tvar taxDetails = amount * price * tax;\n\tvar productDetails = taxDetails + (amount * price);\n\tconsole.log(productDetails)\n}", "title": "" }, { "docid": "bd879158ec97777fc8a4c8150df08f2f", "score": "0.5280955", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(7.5, x).mul(7.5)\n return cost.floor()\n }", "title": "" }, { "docid": "9bfd1687c24eb61bca82f95bc13ce158", "score": "0.5278189", "text": "priceWithTax(plan) {\n return plan.price + this.taxAmount(plan);\n }", "title": "" }, { "docid": "cc4b50fe041667b35093b741a337e2d5", "score": "0.5276391", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n if (x.gte(25)) x = x.pow(2).div(25)\n let cost = Decimal.pow(2, x.pow(1.5))\n return cost.floor()\n }", "title": "" }, { "docid": "9db46000a5186e46245f38e450d183d4", "score": "0.52728444", "text": "function getMilk(bottles) { \n var cost = bottles * 1.5;\n}", "title": "" }, { "docid": "f6881fcdb7ec9bfb8db3069011689745", "score": "0.526116", "text": "function totalBill(newArr) { /*Moja custom-made funkcija koja sabire elemente niza */\n var sum = 0;\n for (var i = 0; i < newArr.length; i++) {\n sum = sum + newArr[i];\n }\n return sum;\n this.item = item;\n this.price = price;\n }", "title": "" }, { "docid": "962797c181bb101aafe14a05d63cb179", "score": "0.5258144", "text": "function tooltipsBox(used, hsm, overdraft, available, unit, is_cost_view) {\n var tooltip_label = '';\n\n if (is_cost_view) {\n var disk_tape_part = '<div style=\"padding: 5px 5px 5px 5px; font-size: 11px;\">' +\n '<table>' +\n '<tr>' +\n '<td><span style=\"background-color:#ddcc77; border: solid 1px #5a5a5a\"> &nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td align=\"right\"> Used (Disk): </td>' +\n '<td>&nbsp;</td>' +\n '<td align=\"left\"> ' + unit + ' </td>' +\n '<td align=\"left\"> &nbsp;<b>' + getNumWithCommas(used) + '</b></td>' +\n '</tr>' +\n '<tr>' +\n '<td><span style=\"background-color:#999933; border: solid 1px #5a5a5a\"> &nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td align=\"right\"> HSM (Tape): </td>' +\n '<td>&nbsp;</td>' +\n '<td align=\"left\"> ' + unit + ' </td>' +\n '<td align=\"left\"> &nbsp;<b>' + getNumWithCommas(hsm) + '</b></td>' +\n '</tr>';\n var overdraft_part = '<tr><td><span style=\"background-color:#cc6677; border: solid 1px #5a5a5a\">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td align=\"right\"> Overdraft: </td>' +\n '<td>&nbsp;</td>' +\n '<td align=\"left\"> ' + unit + ' </td>' +\n '<td align=\"left\"> &nbsp;<b>' + getNumWithCommas(overdraft) + '</b></td>' +\n '</tr>';\n var available_part = '<tr>' +\n '<td width=\"10%\"><span style=\"background-color:#88ccee; border: solid 1px #5a5a5a\">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td width=\"35%\" align=\"right\"> Available: </td>' +\n '<td width=\"5%\">&nbsp;</td>' +\n '<td width=\"10%\" align=\"left\"> ' + unit + ' </td>' +\n '<td width=\"40%\" align=\"left\"> &nbsp;<b>' + getNumWithCommas(available) + '</b></td>' +\n '</tr>';\n\n var close_part = '</table>' + '</div>';\n if (overdraft === 0 && available !== 0) {\n tooltip_label = disk_tape_part + available_part + close_part;\n }\n if (overdraft !== 0 && available === 0) {\n tooltip_label = disk_tape_part + overdraft_part + close_part;\n }\n if (overdraft === 0 && available === 0) {\n tooltip_label = disk_tape_part + available_part + close_part;\n }\n return tooltip_label;\n\n } else {\n // set unit to TB\n unit = 'TB';\n var u_disk_tape_part = '<div style=\"padding: 5px 5px 5px 5px; font-size: 11px;\">' +\n '<table>' +\n '<tr>' +\n '<td><span style=\"background-color:#ddcc77; border: solid 1px #5a5a5a\"> &nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td align=\"right\"> Used (Disk): </td>' +\n '<td>&nbsp;</td>' +\n '<td align=\"right\"> <b>' + getTBWithCommas(used) + '</b>&nbsp; </td>' +\n '<td align=\"left\"> ' + unit + ' </td>' +\n '</tr>' +\n '<tr>' +\n '<td><span style=\"background-color:#999933; border: solid 1px #5a5a5a\"> &nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td align=\"right\"> HSM (Tape): </td>' +\n '<td>&nbsp;</td>' +\n '<td align=\"right\"> <b>' + getTBWithCommas(hsm) + '</b>&nbsp; </td>' +\n '<td align=\"left\"> ' + unit + ' </td>' +\n '</tr>' +\n '<tr>';\n var u_overdraft_part =\n '<td><span style=\"background-color:#cc6677; border: solid 1px #5a5a5a\">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td align=\"right\"> Overdraft: </td>' +\n '<td>&nbsp;</td>' +\n '<td align=\"right\"> <b>' + getTBWithCommas(overdraft) + '</b>&nbsp; </td>' +\n '<td align=\"left\"> ' + unit + ' </td>' +\n '</tr>';\n var u_available_part =\n '<tr>' +\n '<td width=\"10%\"><span style=\"background-color:#88ccee; border: solid 1px #5a5a5a\">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>' +\n '<td width=\"35%\" align=\"right\"> Available: </td>' +\n '<td width=\"5%\">&nbsp;</td>' +\n '<td width=\"40%\" align=\"right\"> <b>' + getTBWithCommas(available) + '</b>&nbsp; </td>' +\n '<td width=\"10%\" align=\"left\"> ' + unit + ' </td>' +\n '</tr>';\n var u_close_part = '</table>' + '</div>';\n if (overdraft === 0 && available !== 0) {\n tooltip_label = u_disk_tape_part + u_available_part + u_close_part;\n }\n if (overdraft !== 0 && available === 0) {\n tooltip_label = u_disk_tape_part + u_overdraft_part + u_close_part;\n }\n if (overdraft === 0 && available === 0) {\n tooltip_label = u_disk_tape_part + u_available_part + u_close_part;\n }\n return tooltip_label;\n }\n }", "title": "" }, { "docid": "dbcc5bb874b4ae9e92d17ecb4a044f8d", "score": "0.52545065", "text": "cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies\n let cost = Decimal.pow(2, x).mul(125)\n return cost.floor()\n }", "title": "" }, { "docid": "b8476cce731874d216540915cbfef864", "score": "0.52541375", "text": "function Tipbox(tips) {\n this.tipCount = parseInt(tips);\n this.getRow = function(n) {\n return (n-1) % 8 + 1;\n }\n this.getColumn = function(n) {\n return ((n-1) - (n-1) % 8) / 8 + 1;\n }\n this.hasTip = function() {\n return this.tipCount > 0;\n }\n this.isEmpty = function() {\n return this.tipCount < 1;\n }\n // Methods takeTip and putTip returns the next position and increments if\n // \"successful\":\n this.takeTip = function() {\n var tip = new Array(2);\n // Find the \"last\" tip:\n tip[0] = this.getRow(this.tipCount);\n tip[1] = this.getColumn(this.tipCount);\n if(tip[0] > 0 && tip[1] > 0) {\n this.tipCount--;\n } else {\n tip = undefined;\n }\n return tip;\n }\n this.putTip = function() {\n var temp = this.tipCount + 1;\n var tip = new Array(2);\n // Find the \"last\" empty position:\n tip[0] = this.getRow(temp);\n tip[1] = this.getColumn(temp);\n if(tip[1] < 13 && tip[0] > 0 && tip[1] > 0) {\n this.tipCount++;\n } else {\n tip = undefined;\n }\n return tip;\n }\n // The following methods allow retrieval of coords without incrementation:\n this.getNextTipPosition = function() {\n var tip = new Array(2);\n // Find the \"last\" tip:\n tip[0] = this.getRow(this.tipCount);\n tip[1] = this.getColumn(this.tipCount);\n if(tip[0] < 1 || tip[1] < 1) {\n tip = undefined;\n }\n return tip;\n }\n this.getNextEmptyPosition = function() {\n var temp = this.tipCount + 1;\n var tip = new Array(2);\n // Find the \"last\" empty position:\n tip[0] = this.getRow(temp);\n tip[1] = this.getColumn(temp);\n if(tip[1] > 12 || tip[0] < 1 || tip[1] < 1) {\n tip = undefined;\n }\n return tip;\n }\n this.increment = function() {\n this.tipCount++;\n }\n this.decrement = function() {\n this.tipCount--;\n }\n}", "title": "" }, { "docid": "d80ef98a6e6de40e01b4cad4ae2c8bc2", "score": "0.52392167", "text": "function getTips() {\n var tips = TIPS;\n for (let i = 0; i < tips.length; i++) {\n tips[i].number = i + 1;\n }\n return tips;\n}", "title": "" }, { "docid": "b0d2907f74e5182f7389b878b1e38e16", "score": "0.52359587", "text": "function iva (subtotal) {\n let result2 = subtotal * tax\n return result2\n}", "title": "" } ]